SaffronPreprocessDeclsImpl.mesa
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Generated by BJackson.pa at April 27, 1987 11:24:15 pm PDT
using ThreeCasabaFour [1.1] of April 14, 1987 6:34:07 pm PDT
DIRECTORY
CedarBaseContext,
SaffronAG4Def,
SaffronAG5Def,
ThreeC4Support,
SaffronATDef,
CedarBaseType;
SaffronPreprocessDeclsImpl: CEDAR PROGRAM IMPORTS CedarBaseContext, ThreeC4Support, CedarBaseType EXPORTS SaffronAG4Def, SaffronAG5Def=
BEGIN
OPEN CedarBaseContext, SaffronAG4Def, SaffronAG5Def, ThreeC4Support, SaffronATDef, CedarBaseType;
DeclarationopaquetypeProdPreprocessDecls: PUBLIC PROC[ref: REF ANY, localContext: LocalContext, typeGraph: TypeGraph] RETURNS[temp0: LocalContext, temp1: TypeGraph] =
BEGIN
tree: DeclarationNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: DeclarationopaquetypeProdData ← NARROW[tree.data];
BEGIN
localContext1: LocalContext;
descriptor: Descriptor;
typeGraph1: TypeGraph;
typeIndex: TypeIndex;
typeNode: TypeNode;
typeNode ← BuildSuspendedType[tree];
[typeGraph1, typeIndex] ← AddType[typeGraph, typeNode];
descriptor ← BuildTypeDescriptor[typeIndex];
localContext1 ← treeData.IdentList.procs.InsertDescriptor[treeData.IdentList, descriptor, localContext];
temp1 ← typeGraph1;
temp0 ← localContext1;
END;
END
END;
DeclarationtypeProdPreprocessDecls: PUBLIC PROC[ref: REF ANY, localContext: LocalContext, typeGraph: TypeGraph] RETURNS[temp0: LocalContext, temp1: TypeGraph] =
BEGIN
tree: DeclarationNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: DeclarationtypeProdData ← NARROW[tree.data];
BEGIN
localContext1: LocalContext;
descriptor: Descriptor;
typeGraph1: TypeGraph;
typeIndex: TypeIndex;
typeNode: TypeNode;
typeNode ← BuildSuspendedType[tree];
[typeGraph1, typeIndex] ← AddType[typeGraph, typeNode];
descriptor ← BuildTypeDescriptor[typeIndex];
localContext1 ← treeData.IdentList.procs.InsertDescriptor[treeData.IdentList, descriptor, localContext];
temp1 ← typeGraph1;
temp0 ← localContext1;
END;
END
END;
DeclarationvalueProdPreprocessDecls: PUBLIC PROC[ref: REF ANY, localContext: LocalContext, typeGraph: TypeGraph] RETURNS[temp0: LocalContext, temp1: TypeGraph] =
BEGIN
tree: DeclarationNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: DeclarationvalueProdData ← NARROW[tree.data];
BEGIN
localContext1: LocalContext;
descriptor: Descriptor;
descriptor ← BuildSuspendedDescriptor[tree];
localContext1 ← treeData.IdentList.procs.InsertDescriptor[treeData.IdentList, descriptor, localContext];
temp1 ← XTypeGraph[typeGraph];
temp0 ← localContext1;
END;
END
END;
DecListmanyProdPreprocessDecls: PUBLIC PROC[ref: REF ANY, localContext: LocalContext, typeGraph: TypeGraph] RETURNS[temp0: LocalContext, temp1: TypeGraph] =
BEGIN
tree: DecListNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: DecListmanyProdData ← NARROW[tree.data];
BEGIN
localContext2: LocalContext;
typeGraph2: TypeGraph;
localContext1: LocalContext;
typeGraph1: TypeGraph;
[localContext1, typeGraph1] ← treeData.DecListhead.procs.PreprocessDecls[treeData.DecListhead, localContext, typeGraph];
[localContext2, typeGraph2] ← treeData.DecListtail.procs.PreprocessDecls[treeData.DecListtail, localContext1, typeGraph1];
temp1 ← typeGraph2;
temp0 ← localContext2;
END;
END
END;
DecListoneProdPreprocessDecls: PUBLIC PROC[ref: REF ANY, localContext: LocalContext, typeGraph: TypeGraph] RETURNS[temp0: LocalContext, temp1: TypeGraph] =
BEGIN
tree: DecListNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: DecListoneProdData ← NARROW[tree.data];
[temp0, temp1] ← treeData.Declaration.procs.PreprocessDecls[treeData.Declaration, localContext, typeGraph];
END
END;
OptDecListabsentProdPreprocessDecls: PUBLIC PROC[ref: REF ANY, localContext: LocalContext, typeGraph: TypeGraph] RETURNS[temp0: LocalContext, temp1: TypeGraph] =
BEGIN
tree: OptDecListNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
temp1 ← XTypeGraph[typeGraph];
temp0 ← XLocalContext[localContext];
END
END;
OptDecListpresentProdPreprocessDecls: PUBLIC PROC[ref: REF ANY, localContext: LocalContext, typeGraph: TypeGraph] RETURNS[temp0: LocalContext, temp1: TypeGraph] =
BEGIN
tree: OptDecListNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: OptDecListpresentProdData ← NARROW[tree.data];
[temp0, temp1] ← treeData.DecList.procs.PreprocessDecls[treeData.DecList, localContext, typeGraph];
END
END;
END..