SaffronProcessDeclsImpl.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,
SaffronAG7Def,
SaffronAG5Def,
SaffronAG4Def,
CedarBaseMisc,
ThreeC4Support,
CedarBaseNarrow,
SaffronATDef,
CedarBaseType;
SaffronProcessDeclsImpl: CEDAR PROGRAM IMPORTS CedarBaseContext, CedarBaseMisc, ThreeC4Support, CedarBaseNarrow, CedarBaseType EXPORTS SaffronAG7Def, SaffronAG5Def, SaffronAG4Def=
BEGIN
OPEN CedarBaseContext, SaffronAG7Def, SaffronAG5Def, SaffronAG4Def, CedarBaseMisc, ThreeC4Support, CedarBaseNarrow, SaffronATDef, CedarBaseType;
OptDecListabsentProdProcessDecls: PUBLIC PROC[ref: REF ANY, localContext: LocalContext, ribContext: RibContext, 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;
OptDecListpresentProdProcessDecls: PUBLIC PROC[ref: REF ANY, localContext: LocalContext, ribContext: RibContext, 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.ProcessDecls[treeData.DecList, localContext, ribContext, typeGraph];
END
END;
DecListmanyProdProcessDecls: PUBLIC PROC[ref: REF ANY, localContext: LocalContext, ribContext: RibContext, 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.ProcessDecls[treeData.DecListhead, localContext, ribContext, typeGraph];
[localContext2, typeGraph2] ← treeData.DecListtail.procs.ProcessDecls[treeData.DecListtail, localContext1, ribContext, typeGraph1];
temp1 ← typeGraph2;
temp0 ← localContext2;
END;
END
END;
DecListoneProdProcessDecls: PUBLIC PROC[ref: REF ANY, localContext: LocalContext, ribContext: RibContext, 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.ProcessDecls[treeData.Declaration, localContext, ribContext, typeGraph];
END
END;
DeclarationopaquetypeProdProcessDecls: PUBLIC PROC[ref: REF ANY, localContext: LocalContext, ribContext: RibContext, 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];
[temp0, temp1] ← treeData.IdentList.procs.ProcessDecls[treeData.IdentList, localContext, ribContext, typeGraph];
END
END;
DeclarationtypeProdProcessDecls: PUBLIC PROC[ref: REF ANY, localContext: LocalContext, ribContext: RibContext, 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];
[temp0, temp1] ← treeData.IdentList.procs.ProcessDecls[treeData.IdentList, localContext, ribContext, typeGraph];
END
END;
DeclarationvalueProdProcessDecls: PUBLIC PROC[ref: REF ANY, localContext: LocalContext, ribContext: RibContext, 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];
[temp0, temp1] ← treeData.IdentList.procs.ProcessDecls[treeData.IdentList, localContext, ribContext, typeGraph];
END
END;
IdentListmanyProdProcessDecls: PUBLIC PROC[ref: REF ANY, localContext: LocalContext, ribContext: RibContext, typeGraph: TypeGraph] RETURNS[temp0: LocalContext, temp1: TypeGraph] =
BEGIN
tree: IdentListNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: IdentListmanyProdData ← NARROW[tree.data];
BEGIN
localContext2: LocalContext;
typeGraph2: TypeGraph;
localContext1: LocalContext;
typeGraph1: TypeGraph;
[localContext1, typeGraph1] ← treeData.IdentListhead.procs.ProcessDecls[treeData.IdentListhead, localContext, ribContext, typeGraph];
[localContext2, typeGraph2] ← treeData.IdentListtail.procs.ProcessDecls[treeData.IdentListtail, localContext1, ribContext, typeGraph1];
temp1 ← typeGraph2;
temp0 ← localContext2;
END;
END
END;
IdentListoneProdProcessDecls: PUBLIC PROC[ref: REF ANY, localContext: LocalContext, ribContext: RibContext, typeGraph: TypeGraph] RETURNS[temp0: LocalContext, temp1: TypeGraph] =
BEGIN
tree: IdentListNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: IdentListoneProdData ← NARROW[tree.data];
[temp0, temp1] ← treeData.Ident.procs.ProcessDecls[treeData.Ident, localContext, ribContext, typeGraph];
END
END;
IdentidProdProcessDecls: PUBLIC PROC[ref: REF ANY, localContext: LocalContext, ribContext: RibContext, typeGraph: TypeGraph] RETURNS[temp0: LocalContext, temp1: TypeGraph] =
BEGIN
tree: IdentNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: IdentidProdData ← NARROW[tree.data];
BEGIN
temp2: DeclarationNode;
assert1: BOOLEAN;
assert: BOOLEAN;
descriptor: Descriptor;
descriptor ← LocalLookup[localContext, treeData.id];
assert ← Assert[Not[IsUndefinedDescriptor[descriptor]], "undefined descriptor", BotchAction.debug];
assert1 ← Assert[Not[IsInaccessibleDescriptor[descriptor]], "inaccessible descriptor", BotchAction.debug];
IF IsSuspendedDescriptor[descriptor] THEN {temp2 ← NarrowToDeclaration[DescriptorGetDecl[descriptor]];
[temp0, temp1] ← temp2.procs.ProcessOneDecl[temp2, UndefinedTypeIndex[], localContext, ribContext, typeGraph];
} ELSE {IF IsValueDescriptor[descriptor] THEN {temp1 ← XTypeGraph[typeGraph];
temp0 ← XLocalContext[localContext];
} ELSE {BEGIN
temp3: DeclarationNode;
typeNode: TypeNode;
typeIndex: TypeIndex;
typeIndex ← GetType[descriptor];
typeNode ← RawFetchType[typeGraph, typeIndex];
IF IsSuspendedType[typeNode] THEN {temp3 ← NarrowToDeclaration[GetTypeDecl[typeNode]];
[temp0, temp1] ← temp3.procs.ProcessOneDecl[temp3, typeIndex, localContext, ribContext, typeGraph];
} ELSE {temp1 ← XTypeGraph[typeGraph];
temp0 ← XLocalContext[localContext];
};
END;
};
};
END;
END
END;
END..