SiroccoMethodsBImpl.mesa
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Generated by BJackson.pa at August 26, 1987 3:45:38 pm PDT
using ThreeCasabaFour [1.2] of June 1, 1987 6:00:00 pm PDT
DIRECTORY
SiroccoAG2Def,
Rope,
SiroccoBaseDef,
SiroccoCGDef,
SiroccoPrivate,
ThreeC4Support,
SiroccoATDef;
SiroccoMethodsBImpl: CEDAR PROGRAM IMPORTS SiroccoBaseDef, ThreeC4Support EXPORTS SiroccoAG2Def=
BEGIN
OPEN SiroccoAG2Def, Rope, SiroccoBaseDef, SiroccoCGDef, SiroccoPrivate, ThreeC4Support, SiroccoATDef;
EnumerationoneProdBuildTGN: PUBLIC PROC[ref: REF ANY, context: CONTEXT] RETURNS[temp0: TypeGraphNode] =
BEGIN
tree: EnumerationNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: EnumerationoneProdData ← NARROW[tree.data];
BEGIN
node: TypeGraphNode;
tag: ROPE;
ordinal: AbstractValue;
ordinal ← treeData.Constant.procs.BuildAbstractValue[treeData.Constant, context];
tag ← TextFromID[treeData.id];
node ← CreateFieldListTGN[tag, ordinal];
temp0 ← node;
END;
END
END;
EnumerationmoreProdBuildTGN: PUBLIC PROC[ref: REF ANY, context: CONTEXT] RETURNS[temp0: TypeGraphNode] =
BEGIN
tree: EnumerationNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: EnumerationmoreProdData ← NARROW[tree.data];
BEGIN
nodeC: TypeGraphNode;
nodeB: TypeGraphNode;
nodeA: TypeGraphNode;
nodeA ← treeData.Enumerationvalue.procs.BuildTGN[treeData.Enumerationvalue, context];
nodeB ← treeData.Enumerationnext.procs.BuildTGN[treeData.Enumerationnext, context];
nodeC ← FieldListTGNConcat[nodeA, nodeB];
temp0 ← nodeC;
END;
END
END;
UniononeProdBuildTGN: PUBLIC PROC[ref: REF ANY, context: CONTEXT] RETURNS[temp0: TypeGraphNode] =
BEGIN
tree: UnionNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: UniononeProdData ← NARROW[tree.data];
BEGIN
nodeC: TypeGraphNode;
nodeB: TypeGraphNode;
nodeA: TypeGraphNode;
nodeA ← treeData.Type.procs.BuildTGN[treeData.Type, context];
nodeB ← treeData.NameList.procs.BuildTGN[treeData.NameList, context];
nodeC ← CreateUnionTGN[nodeB, nodeA];
temp0 ← nodeC;
END;
END
END;
UnionmoreProdBuildTGN: PUBLIC PROC[ref: REF ANY, context: CONTEXT] RETURNS[temp0: TypeGraphNode] =
BEGIN
tree: UnionNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: UnionmoreProdData ← NARROW[tree.data];
BEGIN
nodeC: TypeGraphNode;
nodeB: TypeGraphNode;
nodeA: TypeGraphNode;
nodeA ← treeData.Unionvalue.procs.BuildTGN[treeData.Unionvalue, context];
nodeB ← treeData.Unionnext.procs.BuildTGN[treeData.Unionnext, context];
nodeC ← UnionTGNConcat[nodeA, nodeB];
temp0 ← nodeC;
END;
END
END;
FieldListemptyProdBuildTGN: PUBLIC PROC[ref: REF ANY, context: CONTEXT] RETURNS[temp0: TypeGraphNode] =
BEGIN
tree: FieldListNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
BEGIN
nodeA: TypeGraphNode;
nodeA ← CreateEmptyFieldTGN[];
temp0 ← nodeA;
END;
END
END;
FieldListoneProdBuildTGN: PUBLIC PROC[ref: REF ANY, context: CONTEXT] RETURNS[temp0: TypeGraphNode] =
BEGIN
tree: FieldListNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: FieldListoneProdData ← NARROW[tree.data];
BEGIN
nodeC: TypeGraphNode;
nodeB: TypeGraphNode;
nodeA: TypeGraphNode;
nodeA ← treeData.Type.procs.BuildTGN[treeData.Type, context];
nodeB ← treeData.NameList.procs.BuildTGN[treeData.NameList, context];
nodeC ← CreateFieldTGN[nodeB, nodeA];
temp0 ← nodeC;
END;
END
END;
FieldListmoreProdBuildTGN: PUBLIC PROC[ref: REF ANY, context: CONTEXT] RETURNS[temp0: TypeGraphNode] =
BEGIN
tree: FieldListNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: FieldListmoreProdData ← NARROW[tree.data];
BEGIN
nodeC: TypeGraphNode;
nodeB: TypeGraphNode;
nodeA: TypeGraphNode;
nodeA ← treeData.FieldListvalue.procs.BuildTGN[treeData.FieldListvalue, context];
nodeB ← treeData.FieldListrest.procs.BuildTGN[treeData.FieldListrest, context];
nodeC ← FieldTGNConcat[nodeA, nodeB];
temp0 ← nodeC;
END;
END
END;
GroupingoneProdBuildAbstractValue: PUBLIC PROC[ref: REF ANY, context: CONTEXT] RETURNS[temp0: AbstractValue] =
BEGIN
tree: GroupingNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: GroupingoneProdData ← NARROW[tree.data];
BEGIN
value: AbstractValue;
nodeA: AbstractValue;
nodeA ← treeData.Constant.procs.BuildAbstractValue[treeData.Constant, context];
value ← CreateGroupingAVN[nodeA];
temp0 ← value;
END;
END
END;
GroupingmoreProdBuildAbstractValue: PUBLIC PROC[ref: REF ANY, context: CONTEXT] RETURNS[temp0: AbstractValue] =
BEGIN
tree: GroupingNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: GroupingmoreProdData ← NARROW[tree.data];
BEGIN
nodeC: AbstractValue;
nodeB: AbstractValue;
nodeA: AbstractValue;
nodeA ← treeData.Grouping.procs.BuildAbstractValue[treeData.Grouping, context];
nodeB ← treeData.Constant.procs.BuildAbstractValue[treeData.Constant, context];
nodeC ← GroupingAVNConcat[nodeA, nodeB];
temp0 ← nodeC;
END;
END
END;
ConstructoroneProdBuildAbstractValue: PUBLIC PROC[ref: REF ANY, context: CONTEXT] RETURNS[temp0: AbstractValue] =
BEGIN
tree: ConstructorNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: ConstructoroneProdData ← NARROW[tree.data];
BEGIN
value: AbstractValue;
nodeA: AbstractValue;
nodeA ← treeData.Binding.procs.BuildAbstractValue[treeData.Binding, context];
value ← CreateConstructorAVN[nodeA];
temp0 ← value;
END;
END
END;
ConstructormoreProdBuildAbstractValue: PUBLIC PROC[ref: REF ANY, context: CONTEXT] RETURNS[temp0: AbstractValue] =
BEGIN
tree: ConstructorNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: ConstructormoreProdData ← NARROW[tree.data];
BEGIN
nodeC: AbstractValue;
nodeB: AbstractValue;
nodeA: AbstractValue;
nodeA ← treeData.Constructor.procs.BuildAbstractValue[treeData.Constructor, context];
nodeB ← treeData.Binding.procs.BuildAbstractValue[treeData.Binding, context];
nodeC ← ConstructorAVNConcat[nodeA, nodeB];
temp0 ← nodeC;
END;
END
END;
BindingProdBuildAbstractValue: PUBLIC PROC[ref: REF ANY, context: CONTEXT] RETURNS[temp0: AbstractValue] =
BEGIN
tree: BindingNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: BindingProdData ← NARROW[tree.data];
BEGIN
value: AbstractValue;
nodeA: TypeGraphNode;
nodeB: AbstractValue;
nodeB ← treeData.Constant.procs.BuildAbstractValue[treeData.Constant, context];
nodeA ← treeData.NameList.procs.BuildTGN[treeData.NameList, context];
value ← CreateBindingAVN[nodeA, nodeB];
temp0 ← value;
END;
END
END;
NameListemptyProdBuildTGN: PUBLIC PROC[ref: REF ANY, context: CONTEXT] RETURNS[temp0: TypeGraphNode] =
BEGIN
tree: NameListNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
BEGIN
node: TypeGraphNode;
node ← CreatePrimitiveTGN[Generic.record];
temp0 ← node;
END;
END
END;
NameListoneProdBuildTGN: PUBLIC PROC[ref: REF ANY, context: CONTEXT] RETURNS[temp0: TypeGraphNode] =
BEGIN
tree: NameListNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: NameListoneProdData ← NARROW[tree.data];
BEGIN
node: TypeGraphNode;
node ← CreatePrimitiveTGN[Generic.record];
temp0 ← node;
END;
END
END;
NameListmoreProdBuildTGN: PUBLIC PROC[ref: REF ANY, context: CONTEXT] RETURNS[temp0: TypeGraphNode] =
BEGIN
tree: NameListNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: NameListmoreProdData ← NARROW[tree.data];
BEGIN
node: TypeGraphNode;
node ← CreatePrimitiveTGN[Generic.record];
temp0 ← node;
END;
END
END;
NumberdecimalProdBuildAbstractValue: PUBLIC PROC[ref: REF ANY, context: CONTEXT] RETURNS[temp0: AbstractValue] =
BEGIN
tree: NumberNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: NumberdecimalProdData ← NARROW[tree.data];
BEGIN
value: AbstractValue;
card: CARD;
card ← CardFromDecimal[treeData.decimal];
value ← CreateNumericalAVN[card];
temp0 ← value;
END;
END
END;
NumberhexProdBuildAbstractValue: PUBLIC PROC[ref: REF ANY, context: CONTEXT] RETURNS[temp0: AbstractValue] =
BEGIN
tree: NumberNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: NumberhexProdData ← NARROW[tree.data];
BEGIN
value: AbstractValue;
card: CARD;
card ← CardFromHex[treeData.hex];
value ← CreateNumericalAVN[card];
temp0 ← value;
END;
END
END;
NumberoctalProdBuildAbstractValue: PUBLIC PROC[ref: REF ANY, context: CONTEXT] RETURNS[temp0: AbstractValue] =
BEGIN
tree: NumberNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: NumberoctalProdData ← NARROW[tree.data];
BEGIN
value: AbstractValue;
card: CARD;
card ← CardFromOctal[treeData.octal];
value ← CreateNumericalAVN[card];
temp0 ← value;
END;
END
END;
END..