DIRECTORY ThreeC4BaseDecl1Def, Rope, ThreeC4Support, ThreeC4BaseDecl2Def, ThreeC4BasicAbTypesDef, ThreeC4ModItemAbGramDef; ThreeC4ModItemImplImpl: CEDAR PROGRAM IMPORTS ThreeC4BaseDecl1Def, ThreeC4Support, ThreeC4BaseDecl2Def EXPORTS ThreeC4ModItemAbGramDef= BEGIN OPEN ThreeC4BaseDecl1Def, Rope, ThreeC4Support, ThreeC4BaseDecl2Def, ThreeC4BasicAbTypesDef, ThreeC4ModItemAbGramDef; ModuleItemcedarItemsProdTestLinkPresent: PUBLIC PROC[ref: REF ANY] RETURNS[temp0: BOOLEAN] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemcedarItemsProdData ← NARROW[tree.data]; temp0 ← EqualRopes["True", "False"]; END END; ModuleItemcedarItemsProdSyntaxFileCodes: PUBLIC PROC[ref: REF ANY, context: LookupContextNode] RETURNS[temp0: MesaCodeNode, temp1: MesaCodeNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemcedarItemsProdData ← NARROW[tree.data]; temp1 ← BuildEmptyCode[]; temp0 ← BuildEmptyCode[]; END END; ModuleItemcedarItemsProdLinkFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemcedarItemsProdData ← NARROW[tree.data]; temp1 ← FakeUsageCopy[usage]; temp0 ← BuildEmptyCode[]; END END; ModuleItemcedarItemsProdImplFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemcedarItemsProdData ← NARROW[tree.data]; temp1 ← FakeUsageCopy[usage]; temp0 ← BuildEmptyCode[]; END END; ModuleItemcedarItemsProdDefFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemcedarItemsProdData ← NARROW[tree.data]; temp1 ← FakeUsageCopy[usage]; temp0 ← BuildEmptyCode[]; END END; ModuleItemcedarItemsProdCollectRightSideSymbols: PUBLIC PROC[ref: REF ANY, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemcedarItemsProdData ← NARROW[tree.data]; temp0 ← FakeCopyContextForConditional[context]; END END; ModuleItemcedarItemsProdCollectProductions: PUBLIC PROC[ref: REF ANY, first: INT, context: ContextNode] RETURNS[temp0: INT, temp1: ContextNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemcedarItemsProdData ← NARROW[tree.data]; temp1 ← FakeCopyContextForConditional[context]; temp0 ← FakeCopyInt[first]; END END; ModuleItemcedarItemsProdCollectModuleFunctionTypes: PUBLIC PROC[ref: REF ANY, defFileName: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemcedarItemsProdData ← NARROW[tree.data]; temp0 ← treeData.CedarItems.procs.CollectModuleFunctionTypes[treeData.CedarItems, defFileName, context]; END END; ModuleItemcedarItemsProdCollectModuleValueTypes: PUBLIC PROC[ref: REF ANY, defFileName: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemcedarItemsProdData ← NARROW[tree.data]; temp0 ← treeData.CedarItems.procs.CollectModuleValueTypes[treeData.CedarItems, defFileName, context]; END END; ModuleItembaseItemsProdTestLinkPresent: PUBLIC PROC[ref: REF ANY] RETURNS[temp0: BOOLEAN] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItembaseItemsProdData ← NARROW[tree.data]; temp0 ← EqualRopes["True", "False"]; END END; ModuleItembaseItemsProdSyntaxFileCodes: PUBLIC PROC[ref: REF ANY, context: LookupContextNode] RETURNS[temp0: MesaCodeNode, temp1: MesaCodeNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItembaseItemsProdData ← NARROW[tree.data]; temp1 ← BuildEmptyCode[]; temp0 ← BuildEmptyCode[]; END END; ModuleItembaseItemsProdLinkFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItembaseItemsProdData ← NARROW[tree.data]; temp1 ← FakeUsageCopy[usage]; temp0 ← BuildEmptyCode[]; END END; ModuleItembaseItemsProdImplFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItembaseItemsProdData ← NARROW[tree.data]; [temp0, temp1] ← treeData.BaseItems.procs.ImplFileCode[treeData.BaseItems, context, usage]; END END; ModuleItembaseItemsProdDefFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItembaseItemsProdData ← NARROW[tree.data]; [temp0, temp1] ← treeData.BaseItems.procs.DefFileCode[treeData.BaseItems, context, usage]; END END; ModuleItembaseItemsProdCollectRightSideSymbols: PUBLIC PROC[ref: REF ANY, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItembaseItemsProdData ← NARROW[tree.data]; temp0 ← FakeCopyContextForConditional[context]; END END; ModuleItembaseItemsProdCollectProductions: PUBLIC PROC[ref: REF ANY, first: INT, context: ContextNode] RETURNS[temp0: INT, temp1: ContextNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItembaseItemsProdData ← NARROW[tree.data]; temp1 ← FakeCopyContextForConditional[context]; temp0 ← FakeCopyInt[first]; END END; ModuleItembaseItemsProdCollectModuleFunctionTypes: PUBLIC PROC[ref: REF ANY, defFileName: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItembaseItemsProdData ← NARROW[tree.data]; temp0 ← treeData.BaseItems.procs.CollectModuleFunctionTypes[treeData.BaseItems, defFileName, context]; END END; ModuleItembaseItemsProdCollectModuleValueTypes: PUBLIC PROC[ref: REF ANY, defFileName: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItembaseItemsProdData ← NARROW[tree.data]; temp0 ← treeData.BaseItems.procs.CollectModuleValueTypes[treeData.BaseItems, defFileName, context]; END END; ModuleItemabGramItemsProdTestLinkPresent: PUBLIC PROC[ref: REF ANY] RETURNS[temp0: BOOLEAN] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemabGramItemsProdData ← NARROW[tree.data]; temp0 ← EqualRopes["True", "False"]; END END; ModuleItemabGramItemsProdSyntaxFileCodes: PUBLIC PROC[ref: REF ANY, context: LookupContextNode] RETURNS[temp0: MesaCodeNode, temp1: MesaCodeNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemabGramItemsProdData ← NARROW[tree.data]; temp1 ← BuildEmptyCode[]; temp0 ← BuildEmptyCode[]; END END; ModuleItemabGramItemsProdLinkFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemabGramItemsProdData ← NARROW[tree.data]; temp1 ← FakeUsageCopy[usage]; temp0 ← BuildEmptyCode[]; END END; ModuleItemabGramItemsProdImplFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemabGramItemsProdData ← NARROW[tree.data]; [temp0, temp1] ← treeData.AbGramItems.procs.ImplFileCode[treeData.AbGramItems, context, usage]; END END; ModuleItemabGramItemsProdDefFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemabGramItemsProdData ← NARROW[tree.data]; [temp0, temp1] ← treeData.AbGramItems.procs.DefFileCode[treeData.AbGramItems, context, usage]; END END; ModuleItemabGramItemsProdCollectRightSideSymbols: PUBLIC PROC[ref: REF ANY, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemabGramItemsProdData ← NARROW[tree.data]; temp0 ← FakeCopyContextForConditional[context]; END END; ModuleItemabGramItemsProdCollectProductions: PUBLIC PROC[ref: REF ANY, first: INT, context: ContextNode] RETURNS[temp0: INT, temp1: ContextNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemabGramItemsProdData ← NARROW[tree.data]; temp1 ← FakeCopyContextForConditional[context]; temp0 ← FakeCopyInt[first]; END END; ModuleItemabGramItemsProdCollectModuleFunctionTypes: PUBLIC PROC[ref: REF ANY, defFileName: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemabGramItemsProdData ← NARROW[tree.data]; temp0 ← treeData.AbGramItems.procs.CollectModuleFunctionTypes[treeData.AbGramItems, defFileName, context]; END END; ModuleItemabGramItemsProdCollectModuleValueTypes: PUBLIC PROC[ref: REF ANY, defFileName: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemabGramItemsProdData ← NARROW[tree.data]; temp0 ← treeData.AbGramItems.procs.CollectModuleValueTypes[treeData.AbGramItems, defFileName, context]; END END; ModuleItemcGramItemsProdTestLinkPresent: PUBLIC PROC[ref: REF ANY] RETURNS[temp0: BOOLEAN] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemcGramItemsProdData ← NARROW[tree.data]; temp0 ← treeData.CGramItems.procs.TestLinkPresent[treeData.CGramItems]; END END; ModuleItemcGramItemsProdSyntaxFileCodes: PUBLIC PROC[ref: REF ANY, context: LookupContextNode] RETURNS[temp0: MesaCodeNode, temp1: MesaCodeNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemcGramItemsProdData ← NARROW[tree.data]; [temp0, temp1] ← treeData.CGramItems.procs.SyntaxFileCodes[treeData.CGramItems, context]; END END; ModuleItemcGramItemsProdLinkFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemcGramItemsProdData ← NARROW[tree.data]; [temp0, temp1] ← treeData.CGramItems.procs.LinkFileCode[treeData.CGramItems, context, usage]; END END; ModuleItemcGramItemsProdImplFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemcGramItemsProdData ← NARROW[tree.data]; [temp0, temp1] ← treeData.CGramItems.procs.ImplFileCode[treeData.CGramItems, context, usage]; END END; ModuleItemcGramItemsProdDefFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemcGramItemsProdData ← NARROW[tree.data]; temp1 ← FakeUsageCopy[usage]; temp0 ← BuildEmptyCode[]; END END; ModuleItemcGramItemsProdCollectRightSideSymbols: PUBLIC PROC[ref: REF ANY, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemcGramItemsProdData ← NARROW[tree.data]; temp0 ← treeData.CGramItems.procs.CollectRightSideSymbols[treeData.CGramItems, context]; END END; ModuleItemcGramItemsProdCollectProductions: PUBLIC PROC[ref: REF ANY, first: INT, context: ContextNode] RETURNS[temp0: INT, temp1: ContextNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemcGramItemsProdData ← NARROW[tree.data]; [temp0, temp1] ← treeData.CGramItems.procs.CollectProductions[treeData.CGramItems, first, context]; END END; ModuleItemcGramItemsProdCollectModuleFunctionTypes: PUBLIC PROC[ref: REF ANY, defFileName: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemcGramItemsProdData ← NARROW[tree.data]; temp0 ← FakeCopyContextForConditional[context]; END END; ModuleItemcGramItemsProdCollectModuleValueTypes: PUBLIC PROC[ref: REF ANY, defFileName: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemcGramItemsProdData ← NARROW[tree.data]; temp0 ← FakeCopyContextForConditional[context]; END END; ModuleItemgenTknProdTestLinkPresent: PUBLIC PROC[ref: REF ANY] RETURNS[temp0: BOOLEAN] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemgenTknProdData ← NARROW[tree.data]; temp0 ← EqualRopes["True", "True"]; END END; ModuleItemgenTknProdSyntaxFileCodes: PUBLIC PROC[ref: REF ANY, context: LookupContextNode] RETURNS[temp0: MesaCodeNode, temp1: MesaCodeNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemgenTknProdData ← NARROW[tree.data]; BEGIN tkn: MesaCodeNode; prod: MesaCodeNode; prod ← BuildEmptyCode[]; tkn ← RopeCode2["%g: GenericToken = \"%g\" ;\N", IdFill[treeData.Identifier], CodeFill[RopeCode[RopeFromRopeNode[treeData.RopetknName]]]]; temp1 ← prod; temp0 ← tkn; END; END END; ModuleItemgenTknProdLinkFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemgenTknProdData ← NARROW[tree.data]; BEGIN code: MesaCodeNode; code ← RopeCode2["tknLinkArray[%g] ← Build%gNode;\N", CodeFill[RopeCode[RopeFromRopeNode[treeData.RopetknName]]], IdFill[treeData.Identifier]]; temp1 ← FakeUsageCopy[usage]; temp0 ← code; END; END END; ModuleItemgenTknProdImplFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemgenTknProdData ← NARROW[tree.data]; BEGIN code: MesaCodeNode; use5: UsageNode; use4: UsageNode; use3: UsageNode; headerCode: MesaCodeNode; buildImplCode: MesaCodeNode; nameCode: MesaCodeNode; use2: UsageNode; use1: UsageNode; name: NameNode; name ← BuildName[treeData.Identifier]; use1 ← RecordGenericTokenUse[usage, name, Use.export, context]; use2 ← RecordGenericTokenUse[use1, name, Use.ref, context]; nameCode ← GetTypeCodeName[LookUpType[context, name]]; buildImplCode ← ConcatCode2[RopeCode2["Build%g: PUBLIC PROC[text: Rope.ROPE, firstCharPosition: INT] RETURNS[%g] =\N", CodeFill[nameCode], CodeFill[nameCode]], RopeCode1["\T{RETURN[NEW[%gBody←[text, firstCharPosition, Length[text]]]]};\N\N", CodeFill[nameCode]]]; headerCode ← RopeCode1["\N--%g\N\N", IdFill[treeData.Identifier]]; use3 ← RecordTypeUse[use2, LookUpType[context, BuildRopeName["ROPE"]]]; use4 ← RecordTypeUse[use3, LookUpType[context, BuildRopeName["INT"]]]; use5 ← RecordDefFileUse[use4, "Rope", Use.import]; code ← ConcatCode2[headerCode, buildImplCode]; temp1 ← use5; temp0 ← code; END; END END; ModuleItemgenTknProdDefFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemgenTknProdData ← NARROW[tree.data]; BEGIN code: MesaCodeNode; use2: UsageNode; use1: UsageNode; headerCode: MesaCodeNode; nodeCode: MesaCodeNode; nodeBodyCode: MesaCodeNode; codeName: MesaCodeNode; name: NameNode; name ← BuildName[treeData.Identifier]; codeName ← GetTypeCodeName[LookUpType[context, name]]; nodeBodyCode ← ConcatCode3[RopeCode1["%gBody: TYPE = RECORD[\N", CodeFill[codeName]], RopeCode["\Ttext: Rope.ROPE,\N"], RopeCode["\Tposition, length: INT];\N\N"]]; nodeCode ← RopeCode2["%g: TYPE = REF %gBody;\N", CodeFill[codeName], CodeFill[codeName]]; headerCode ← RopeCode1["\N--%g\N\N", IdFill[treeData.Identifier]]; use1 ← RecordTypeUse[usage, LookUpType[context, BuildRopeName["ROPE"]]]; use2 ← RecordTypeUse[use1, LookUpType[context, BuildRopeName["INT"]]]; code ← ConcatCode3[headerCode, nodeCode, nodeBodyCode]; temp1 ← use2; temp0 ← code; END; END END; ModuleItemgenTknProdCollectRightSideSymbols: PUBLIC PROC[ref: REF ANY, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemgenTknProdData ← NARROW[tree.data]; temp0 ← FakeCopyContextForConditional[context]; END END; ModuleItemgenTknProdCollectProductions: PUBLIC PROC[ref: REF ANY, first: INT, context: ContextNode] RETURNS[temp0: INT, temp1: ContextNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemgenTknProdData ← NARROW[tree.data]; temp1 ← FakeCopyContextForConditional[context]; temp0 ← FakeCopyInt[first]; END END; ModuleItemgenTknProdCollectModuleFunctionTypes: PUBLIC PROC[ref: REF ANY, file: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemgenTknProdData ← NARROW[tree.data]; temp0 ← FakeCopyContextForConditional[context]; END END; ModuleItemgenTknProdCollectModuleValueTypes: PUBLIC PROC[ref: REF ANY, file: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: ModuleItemNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModuleItemgenTknProdData ← NARROW[tree.data]; BEGIN name: NameNode; codeName: MesaCodeNode; codeName ← RopeCode1["%gNode", IdFill[treeData.Identifier]]; name ← BuildName[treeData.Identifier]; temp0 ← RecordGenericToken[context, name, file, codeName]; END; END END; CedarItemscedarTypesProdCollectModuleFunctionTypes: PUBLIC PROC[ref: REF ANY, defFileName: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: CedarItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CedarItemscedarTypesProdData ← NARROW[tree.data]; temp0 ← FakeCopyContextForConditional[context]; END END; CedarItemscedarTypesProdCollectModuleValueTypes: PUBLIC PROC[ref: REF ANY, defFileName: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: CedarItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CedarItemscedarTypesProdData ← NARROW[tree.data]; temp0 ← treeData.IdList.procs.RecordCedarTypes[treeData.IdList, context]; END END; CedarItemscedarTypesFromProdCollectModuleFunctionTypes: PUBLIC PROC[ref: REF ANY, defFileName: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: CedarItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CedarItemscedarTypesFromProdData ← NARROW[tree.data]; temp0 ← FakeCopyContextForConditional[context]; END END; CedarItemscedarTypesFromProdCollectModuleValueTypes: PUBLIC PROC[ref: REF ANY, defFileName: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: CedarItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CedarItemscedarTypesFromProdData ← NARROW[tree.data]; BEGIN file: ROPE; file ← RopeFromIdentifierNode[treeData.Identifier]; temp0 ← treeData.IdList.procs.RecordCedarTypesFrom[treeData.IdList, file, context]; END; END END; CedarItemscedarEnumTypeFromProdCollectModuleFunctionTypes: PUBLIC PROC[ref: REF ANY, defFileName: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: CedarItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CedarItemscedarEnumTypeFromProdData ← NARROW[tree.data]; temp0 ← FakeCopyContextForConditional[context]; END END; CedarItemscedarEnumTypeFromProdCollectModuleValueTypes: PUBLIC PROC[ref: REF ANY, defFileName: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: CedarItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CedarItemscedarEnumTypeFromProdData ← NARROW[tree.data]; BEGIN name: NameNode; names: NameListNode; file: ROPE; codeName: MesaCodeNode; codeName ← RopeCode1["%g", IdFill[treeData.IdentifiertypeName]]; file ← RopeFromIdentifierNode[treeData.IdentifierfileName]; names ← treeData.IdListvalues.procs.FormNameList[treeData.IdListvalues]; name ← BuildName[treeData.IdentifiertypeName]; temp0 ← RecordEnumeratedBaseType[context, name, file, names, codeName]; END; END END; CedarItemscedarFunctionFromProdCollectModuleFunctionTypes: PUBLIC PROC[ref: REF ANY, defFileName: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: CedarItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CedarItemscedarFunctionFromProdData ← NARROW[tree.data]; BEGIN argTypes: TypeListNode; resultTypes: TypeListNode; defFileName: ROPE; fcnDefGraph: FcnDefGraphNode; fcnDefGraph1: FcnDefGraphNode; argNames: NameListNode; resultNames: NameListNode; resultNames ← treeData.ModIdListresults.procs.FormNameList[treeData.ModIdListresults]; argNames ← treeData.ModIdListargs.procs.FormNameList[treeData.ModIdListargs]; fcnDefGraph1 ← BuildFcnBaseGraph[argNames, resultNames]; fcnDefGraph ← treeData.DamageShareAssertions.procs.FormRecordOfDamageShareAssertion[treeData.DamageShareAssertions, fcnDefGraph1]; defFileName ← RopeFromIdentifierNode[treeData.IdentifierfileName]; resultTypes ← treeData.ModIdListresults.procs.FormTypeListEarly[treeData.ModIdListresults, context]; argTypes ← treeData.ModIdListargs.procs.FormTypeListEarly[treeData.ModIdListargs, context]; temp0 ← RecordBaseFunction[context, BuildName[treeData.IdentifierfunName], defFileName, argTypes, resultTypes, fcnDefGraph]; END; END END; CedarItemscedarFunctionFromProdCollectModuleValueTypes: PUBLIC PROC[ref: REF ANY, defFileName: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: CedarItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CedarItemscedarFunctionFromProdData ← NARROW[tree.data]; temp0 ← FakeCopyContextForConditional[context]; END END; CGramItemssimpleTokensProdTestLinkPresent: PUBLIC PROC[ref: REF ANY] RETURNS[temp0: BOOLEAN] = BEGIN tree: CGramItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CGramItemssimpleTokensProdData ← NARROW[tree.data]; temp0 ← EqualRopes["True", "False"]; END END; CGramItemssimpleTokensProdSyntaxFileCodes: PUBLIC PROC[ref: REF ANY, context: LookupContextNode] RETURNS[temp0: MesaCodeNode, temp1: MesaCodeNode] = BEGIN tree: CGramItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CGramItemssimpleTokensProdData ← NARROW[tree.data]; BEGIN tkn: MesaCodeNode; simples: MesaCodeNode; unused: MesaCodeNode; prod: MesaCodeNode; prod ← BuildEmptyCode[]; [simples, unused] ← treeData.RopeList.procs.SyntaxFileCodes[treeData.RopeList, context]; tkn ← RopeCode1["{ %g }: SimpleTokens;\N", CodeFill[simples]]; temp1 ← prod; temp0 ← tkn; END; END END; CGramItemssimpleTokensProdLinkFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: CGramItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CGramItemssimpleTokensProdData ← NARROW[tree.data]; temp1 ← FakeUsageCopy[usage]; temp0 ← BuildEmptyCode[]; END END; CGramItemssimpleTokensProdImplFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: CGramItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CGramItemssimpleTokensProdData ← NARROW[tree.data]; temp1 ← FakeUsageCopy[usage]; temp0 ← BuildEmptyCode[]; END END; CGramItemssimpleTokensProdDefFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: CGramItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CGramItemssimpleTokensProdData ← NARROW[tree.data]; temp1 ← FakeUsageCopy[usage]; temp0 ← BuildEmptyCode[]; END END; CGramItemssimpleTokensProdCollectRightSideSymbols: PUBLIC PROC[ref: REF ANY, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: CGramItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CGramItemssimpleTokensProdData ← NARROW[tree.data]; temp0 ← treeData.RopeList.procs.CollectRightSideSymbols[treeData.RopeList, context]; END END; CGramItemssimpleTokensProdCollectProductions: PUBLIC PROC[ref: REF ANY, first: INT, context: ContextNode] RETURNS[temp0: INT, temp1: ContextNode] = BEGIN tree: CGramItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CGramItemssimpleTokensProdData ← NARROW[tree.data]; temp1 ← FakeCopyContextForConditional[context]; temp0 ← FakeCopyInt[first]; END END; CGramItemsnonTerminalProdTestLinkPresent: PUBLIC PROC[ref: REF ANY] RETURNS[temp0: BOOLEAN] = BEGIN tree: CGramItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CGramItemsnonTerminalProdData ← NARROW[tree.data]; temp0 ← EqualRopes["True", "False"]; END END; CGramItemsnonTerminalProdSyntaxFileCodes: PUBLIC PROC[ref: REF ANY, context: LookupContextNode] RETURNS[temp0: MesaCodeNode, temp1: MesaCodeNode] = BEGIN tree: CGramItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CGramItemsnonTerminalProdData ← NARROW[tree.data]; BEGIN tkn: MesaCodeNode; prod: MesaCodeNode; prod ← BuildEmptyCode[]; tkn ← RopeCode1["%g: NonTerminal;\N", IdFill[treeData.Identifiername]]; temp1 ← prod; temp0 ← tkn; END; END END; CGramItemsnonTerminalProdLinkFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: CGramItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CGramItemsnonTerminalProdData ← NARROW[tree.data]; temp1 ← FakeUsageCopy[usage]; temp0 ← BuildEmptyCode[]; END END; CGramItemsnonTerminalProdImplFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: CGramItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CGramItemsnonTerminalProdData ← NARROW[tree.data]; temp1 ← FakeUsageCopy[usage]; temp0 ← BuildEmptyCode[]; END END; CGramItemsnonTerminalProdDefFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: CGramItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CGramItemsnonTerminalProdData ← NARROW[tree.data]; temp1 ← FakeUsageCopy[usage]; temp0 ← BuildEmptyCode[]; END END; CGramItemsnonTerminalProdCollectRightSideSymbols: PUBLIC PROC[ref: REF ANY, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: CGramItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CGramItemsnonTerminalProdData ← NARROW[tree.data]; BEGIN ntName: NameNode; atName: NameNode; atName ← BuildName[treeData.Identifierbuilds]; ntName ← BuildName[treeData.Identifiername]; temp0 ← RecordNonTerminalToken[context, ntName, atName]; END; END END; CGramItemsnonTerminalProdCollectProductions: PUBLIC PROC[ref: REF ANY, first: INT, context: ContextNode] RETURNS[temp0: INT, temp1: ContextNode] = BEGIN tree: CGramItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CGramItemsnonTerminalProdData ← NARROW[tree.data]; temp1 ← FakeCopyContextForConditional[context]; temp0 ← FakeCopyInt[first]; END END; CGramItemsconcreteProductionProdTestLinkPresent: PUBLIC PROC[ref: REF ANY] RETURNS[temp0: BOOLEAN] = BEGIN tree: CGramItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CGramItemsconcreteProductionProdData ← NARROW[tree.data]; temp0 ← EqualRopes["True", "True"]; END END; CGramItemsconcreteProductionProdSyntaxFileCodes: PUBLIC PROC[ref: REF ANY, context: LookupContextNode] RETURNS[temp0: MesaCodeNode, temp1: MesaCodeNode] = BEGIN tree: CGramItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CGramItemsconcreteProductionProdData ← NARROW[tree.data]; [temp0, temp1] ← treeData.ConcreteProduction.procs.SyntaxFileCodes[treeData.ConcreteProduction, context]; END END; CGramItemsconcreteProductionProdLinkFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: CGramItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CGramItemsconcreteProductionProdData ← NARROW[tree.data]; [temp0, temp1] ← treeData.ConcreteProduction.procs.LinkFileCode[treeData.ConcreteProduction, context, usage]; END END; CGramItemsconcreteProductionProdImplFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: CGramItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CGramItemsconcreteProductionProdData ← NARROW[tree.data]; [temp0, temp1] ← treeData.ConcreteProduction.procs.ImplFileCode[treeData.ConcreteProduction, context, usage]; END END; CGramItemsconcreteProductionProdDefFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: CGramItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CGramItemsconcreteProductionProdData ← NARROW[tree.data]; temp1 ← FakeUsageCopy[usage]; temp0 ← BuildEmptyCode[]; END END; CGramItemsconcreteProductionProdCollectRightSideSymbols: PUBLIC PROC[ref: REF ANY, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: CGramItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CGramItemsconcreteProductionProdData ← NARROW[tree.data]; temp0 ← FakeCopyContextForConditional[context]; END END; CGramItemsconcreteProductionProdCollectProductions: PUBLIC PROC[ref: REF ANY, first: INT, context: ContextNode] RETURNS[temp0: INT, temp1: ContextNode] = BEGIN tree: CGramItemsNode← NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CGramItemsconcreteProductionProdData ← NARROW[tree.data]; [temp0, temp1] ← treeData.ConcreteProduction.procs.CollectProductions[treeData.ConcreteProduction, first, context]; END END; END..