DIRECTORY ThreeC4BaseDecl1Def, Rope, ThreeC4MiscAbGramDef, ThreeC4Support, ThreeC4BaseDecl2Def, ThreeC4BasicAbTypesDef; ThreeC4MiscImplImpl: CEDAR PROGRAM IMPORTS ThreeC4BaseDecl1Def, ThreeC4Support, ThreeC4BaseDecl2Def, ThreeC4BasicAbTypesDef EXPORTS ThreeC4MiscAbGramDef= BEGIN OPEN ThreeC4BaseDecl1Def, Rope, ThreeC4MiscAbGramDef, ThreeC4Support, ThreeC4BaseDecl2Def, ThreeC4BasicAbTypesDef; ModIdoneIdProdFormTypeEarly: PUBLIC PROC[ref: REF ANY, context: ContextNode] RETURNS[temp0: TypeNode] = BEGIN tree: ModIdNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModIdoneIdProdData _ NARROW[tree.data]; temp0 _ FindType[context, BuildName[treeData.Identifier]]; END END; ModIdoneIdProdFormTypeUse: PUBLIC PROC[ref: REF ANY, usage: UsageNode, context: LookupContextNode] RETURNS[temp0: UsageNode] = BEGIN tree: ModIdNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModIdoneIdProdData _ NARROW[tree.data]; temp0 _ RecordTypeUse[usage, LookUpType[context, BuildName[treeData.Identifier]]]; END END; ModIdoneIdProdFormExpCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: TypeNode, temp2: UsageNode] = BEGIN tree: ModIdNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModIdoneIdProdData _ NARROW[tree.data]; BEGIN code: MesaCodeNode; check: BOOLEAN; type: TypeNode; name: NameNode; name _ tree.procs.FormName[tree]; type _ LookUpRightSideSymbol[context, name]; check _ Check[FoundType[type]]; code _ RopeCode1["%g", NameFill[name]]; temp2 _ FakeUsageCopy[usage]; temp1 _ type; temp0 _ code; END; END END; ModIdoneIdProdFormValueInfo: PUBLIC PROC[ref: REF ANY, context: LookupContextNode] RETURNS[temp0: TypeNode, temp1: MesaCodeNode] = BEGIN tree: ModIdNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModIdoneIdProdData _ NARROW[tree.data]; [temp0, temp1] _ LookUpSimpleValue[context, treeData.Identifier]; END END; ModIdoneIdProdFormType: PUBLIC PROC[ref: REF ANY, context: LookupContextNode] RETURNS[temp0: TypeNode] = BEGIN tree: ModIdNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModIdoneIdProdData _ NARROW[tree.data]; temp0 _ LookUpType[context, BuildName[treeData.Identifier]]; END END; ModIdoneIdProdFormFirstId: PUBLIC PROC[ref: REF ANY] RETURNS[temp0: IdentifierNode] = BEGIN tree: ModIdNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModIdoneIdProdData _ NARROW[tree.data]; temp0 _ treeData.Identifier; END END; ModIdoneIdProdFormName: PUBLIC PROC[ref: REF ANY] RETURNS[temp0: NameNode] = BEGIN tree: ModIdNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModIdoneIdProdData _ NARROW[tree.data]; temp0 _ BuildName[treeData.Identifier]; END END; ModIdtwoIdsProdFormTypeEarly: PUBLIC PROC[ref: REF ANY, context: ContextNode] RETURNS[temp0: TypeNode] = BEGIN tree: ModIdNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModIdtwoIdsProdData _ NARROW[tree.data]; temp0 _ FindType[context, BuildName[treeData.Identifierleft]]; END END; ModIdtwoIdsProdFormTypeUse: PUBLIC PROC[ref: REF ANY, usage: UsageNode, context: LookupContextNode] RETURNS[temp0: UsageNode] = BEGIN tree: ModIdNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModIdtwoIdsProdData _ NARROW[tree.data]; temp0 _ RecordTypeUse[usage, LookUpType[context, BuildName[treeData.Identifierleft]]]; END END; ModIdtwoIdsProdFormExpCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: TypeNode, temp2: UsageNode] = BEGIN tree: ModIdNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModIdtwoIdsProdData _ NARROW[tree.data]; BEGIN type1: TypeNode; name1: NameNode; name1 _ tree.procs.FormName[tree]; type1 _ LookUpRightSideSymbol[context, name1]; IF FoundType[type1] THEN {temp2 _ FakeUsageCopy[usage]; temp1 _ type1; temp0 _ RopeCode1["%g", NameFill[name1]]; } ELSE {BEGIN use2: UsageNode; type2: TypeNode; code2: MesaCodeNode; [type2, code2] _ LookUpEnumTypeVal[context, BuildName[treeData.Identifierleft], BuildName[treeData.Identifierright]]; use2 _ RecordTypeUse[usage, type2]; temp2 _ use2; temp1 _ type2; temp0 _ code2; END; }; END; END END; ModIdtwoIdsProdFormValueInfo: PUBLIC PROC[ref: REF ANY, context: LookupContextNode] RETURNS[temp0: TypeNode, temp1: MesaCodeNode] = BEGIN tree: ModIdNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModIdtwoIdsProdData _ NARROW[tree.data]; [temp0, temp1] _ LookUpValue2[context, treeData.Identifierleft, treeData.Identifierright]; END END; ModIdtwoIdsProdFormType: PUBLIC PROC[ref: REF ANY, context: LookupContextNode] RETURNS[temp0: TypeNode] = BEGIN tree: ModIdNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModIdtwoIdsProdData _ NARROW[tree.data]; temp0 _ LookUpType[context, BuildName[treeData.Identifierleft]]; END END; ModIdtwoIdsProdFormFirstId: PUBLIC PROC[ref: REF ANY] RETURNS[temp0: IdentifierNode] = BEGIN tree: ModIdNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModIdtwoIdsProdData _ NARROW[tree.data]; temp0 _ treeData.Identifierleft; END END; ModIdtwoIdsProdFormName: PUBLIC PROC[ref: REF ANY] RETURNS[temp0: NameNode] = BEGIN tree: ModIdNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModIdtwoIdsProdData _ NARROW[tree.data]; temp0 _ BuildName2[treeData.Identifierleft, treeData.Identifierright]; END END; ModIdListEmptyProdFormTypesCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: ModIdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp1 _ FakeUsageCopy[usage]; temp0 _ BuildEmptyCode[]; END END; ModIdListEmptyProdFormTypeListEarly: PUBLIC PROC[ref: REF ANY, context: ContextNode] RETURNS[temp0: TypeListNode] = BEGIN tree: ModIdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ BuildEmptyTypeList[]; END END; ModIdListEmptyProdProdBuildDataRcdCode: PUBLIC PROC[ref: REF ANY, typeNameCode: MesaCodeNode, prodNameCode: MesaCodeNode] RETURNS[temp0: MesaCodeNode] = BEGIN tree: ModIdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ BuildErrorCode["GetRidOf ProdBuildDataRcdCode as it is never used"]; END END; ModIdListEmptyProdDataBodyFieldTypeCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode] RETURNS[temp0: MesaCodeNode] = BEGIN tree: ModIdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ BuildEmptyCode[]; END END; ModIdListEmptyProdProdDataTypeDefCode: PUBLIC PROC[ref: REF ANY, prodNameCode: MesaCodeNode, context: LookupContextNode] RETURNS[temp0: MesaCodeNode] = BEGIN tree: ModIdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ BuildErrorCode["GetRidOf ProdDataTypeDefCode as it is never used"]; END END; ModIdListEmptyProdFormTypeUse: PUBLIC PROC[ref: REF ANY, usage: UsageNode, context: LookupContextNode] RETURNS[temp0: UsageNode] = BEGIN tree: ModIdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ FakeUsageCopy[usage]; END END; ModIdListEmptyProdFormAbstRightSideContext: PUBLIC PROC[ref: REF ANY, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: ModIdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ FakeCopyContextForConditional[context]; END END; ModIdListEmptyProdFormTypeList: PUBLIC PROC[ref: REF ANY, context: LookupContextNode] RETURNS[temp0: TypeListNode] = BEGIN tree: ModIdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ BuildEmptyTypeList[]; END END; ModIdListEmptyProdFormNameList: PUBLIC PROC[ref: REF ANY] RETURNS[temp0: NameListNode] = BEGIN tree: ModIdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ BuildEmptyNameList[]; END END; ModIdListManyProdFormTypesCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: ModIdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModIdListManyProdData _ NARROW[tree.data]; BEGIN code: MesaCodeNode; temp2: BOOLEAN; use: UsageNode; type: TypeNode; listCode: MesaCodeNode; use1: UsageNode; [listCode, use1] _ treeData.ModIdList.procs.FormTypesCode[treeData.ModIdList, context, usage]; type _ treeData.ModId.procs.FormType[treeData.ModId, context]; use _ RecordTypeUse[use1, type]; IF temp2 _ TestEmptyCode[listCode] THEN { NULL; } ELSE {NULL; }; code _ ConcatCode2[(IF temp2 THEN BuildEmptyCode[] ELSE RopeCode1["%g, ", CodeFill[listCode]]), GetTypeCodeName[type]]; temp1 _ use; temp0 _ code; END; END END; ModIdListManyProdFormTypeListEarly: PUBLIC PROC[ref: REF ANY, context: ContextNode] RETURNS[temp0: TypeListNode] = BEGIN tree: ModIdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModIdListManyProdData _ NARROW[tree.data]; temp0 _ AppendToTypeList[treeData.ModIdList.procs.FormTypeListEarly[treeData.ModIdList, context], treeData.ModId.procs.FormTypeEarly[treeData.ModId, context]]; END END; ModIdListManyProdProdBuildDataRcdCode: PUBLIC PROC[ref: REF ANY, typeNameCode: MesaCodeNode, prodNameCode: MesaCodeNode] RETURNS[temp0: MesaCodeNode] = BEGIN tree: ModIdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModIdListManyProdData _ NARROW[tree.data]; temp0 _ BuildErrorCode["GetRidOf ProdBuildDataRcdCode as it is never used"]; END END; ModIdListManyProdDataBodyFieldTypeCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode] RETURNS[temp0: MesaCodeNode] = BEGIN tree: ModIdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModIdListManyProdData _ NARROW[tree.data]; BEGIN names: NameListNode; types: TypeListNode; types _ tree.procs.FormTypeList[tree, context]; names _ tree.procs.FormNameList[tree]; temp0 _ RopeCode1[", %g", CodeFill[BuildArgNameTypeCode[names, types]]]; END; END END; ModIdListManyProdProdDataTypeDefCode: PUBLIC PROC[ref: REF ANY, prodNameCode: MesaCodeNode, context: LookupContextNode] RETURNS[temp0: MesaCodeNode] = BEGIN tree: ModIdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModIdListManyProdData _ NARROW[tree.data]; temp0 _ BuildErrorCode["GetRidOf ProdDataTypeDefCode as it is never used"]; END END; ModIdListManyProdFormTypeUse: PUBLIC PROC[ref: REF ANY, usage: UsageNode, context: LookupContextNode] RETURNS[temp0: UsageNode] = BEGIN tree: ModIdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModIdListManyProdData _ NARROW[tree.data]; temp0 _ treeData.ModId.procs.FormTypeUse[treeData.ModId, treeData.ModIdList.procs.FormTypeUse[treeData.ModIdList, usage, context], context]; END END; ModIdListManyProdFormAbstRightSideContext: PUBLIC PROC[ref: REF ANY, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: ModIdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModIdListManyProdData _ NARROW[tree.data]; temp0 _ RecordAbstRightSideSymbol[treeData.ModIdList.procs.FormAbstRightSideContext[treeData.ModIdList, context], treeData.ModId.procs.FormName[treeData.ModId], BuildName[treeData.ModId.procs.FormFirstId[treeData.ModId]]]; END END; ModIdListManyProdFormTypeList: PUBLIC PROC[ref: REF ANY, context: LookupContextNode] RETURNS[temp0: TypeListNode] = BEGIN tree: ModIdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModIdListManyProdData _ NARROW[tree.data]; temp0 _ AppendToTypeList[treeData.ModIdList.procs.FormTypeList[treeData.ModIdList, context], treeData.ModId.procs.FormType[treeData.ModId, context]]; END END; ModIdListManyProdFormNameList: PUBLIC PROC[ref: REF ANY] RETURNS[temp0: NameListNode] = BEGIN tree: ModIdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ModIdListManyProdData _ NARROW[tree.data]; temp0 _ AppendToNameList[treeData.ModIdList.procs.FormNameList[treeData.ModIdList], treeData.ModId.procs.FormName[treeData.ModId]]; END END; IdListEmptyProdSyntaxFileCodes: PUBLIC PROC[ref: REF ANY, context: LookupContextNode] RETURNS[temp0: MesaCodeNode, temp1: MesaCodeNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp1 _ BuildEmptyCode[]; temp0 _ BuildEmptyCode[]; END END; IdListEmptyProdFormLinkCallCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp1 _ FakeUsageCopy[usage]; temp0 _ BuildEmptyCode[]; END END; IdListEmptyProdFormVarDeclCode: PUBLIC PROC[ref: REF ANY, types: TypeListNode] RETURNS[temp0: MesaCodeNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ BuildEmptyCode[]; END END; IdListEmptyProdFormRecFcnsDeclCode: PUBLIC PROC[ref: REF ANY, prodNameCode: MesaCodeNode, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp1 _ FakeUsageCopy[usage]; temp0 _ BuildEmptyCode[]; END END; IdListEmptyProdFormTypesCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp1 _ FakeUsageCopy[usage]; temp0 _ BuildEmptyCode[]; END END; IdListEmptyProdFormProcsNamesCode: PUBLIC PROC[ref: REF ANY, prodNameCode: MesaCodeNode] RETURNS[temp0: MesaCodeNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ BuildEmptyCode[]; END END; IdListEmptyProdBaseDeclCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode] RETURNS[temp0: MesaCodeNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ BuildEmptyCode[]; END END; IdListEmptyProdProcFieldTypeCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp1 _ FakeUsageCopy[usage]; temp0 _ BuildEmptyCode[]; END END; IdListEmptyProdRecordMultipleBaseTypes: PUBLIC PROC[ref: REF ANY, file: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ FakeCopyContextForConditional[context]; END END; IdListEmptyProdCollectRightSideSymbols: PUBLIC PROC[ref: REF ANY, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ FakeCopyContextForConditional[context]; END END; IdListEmptyProdCollectFunctionTypes: PUBLIC PROC[ref: REF ANY, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ FakeCopyContextForConditional[context]; END END; IdListEmptyProdCollectValueTypes: PUBLIC PROC[ref: REF ANY, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ FakeCopyContextForConditional[context]; END END; IdListEmptyProdFormNameList: PUBLIC PROC[ref: REF ANY] RETURNS[temp0: NameListNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ BuildEmptyNameList[]; END END; IdListEmptyProdFormTypeListEarly: PUBLIC PROC[ref: REF ANY, context: ContextNode] RETURNS[temp0: TypeListNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ BuildEmptyTypeList[]; END END; IdListEmptyProdRecordCedarTypes: PUBLIC PROC[ref: REF ANY, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ FakeCopyContextForConditional[context]; END END; IdListEmptyProdRecordCedarTypesFrom: PUBLIC PROC[ref: REF ANY, defFileName: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ FakeCopyContextForConditional[context]; END END; IdListnonEmptyProdSyntaxFileCodes: PUBLIC PROC[ref: REF ANY, context: LookupContextNode] RETURNS[temp0: MesaCodeNode, temp1: MesaCodeNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: IdListnonEmptyProdData _ NARROW[tree.data]; BEGIN temp4: MesaCodeNode; temp5: MesaCodeNode; temp2: MesaCodeNode; temp3: MesaCodeNode; fileTree: WholeFileNode; fileTree _ LookUpParseTree[context, BuildName[treeData.Identifier]]; [temp4, temp5] _ treeData.IdList.procs.SyntaxFileCodes[treeData.IdList, context]; [temp2, temp3] _ fileTree.procs.SyntaxFileCodes[fileTree, context]; [temp0, temp1] _ ConcatCodePairs2[temp2, temp3, temp4, temp5]; END; END END; IdListnonEmptyProdFormLinkCallCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: IdListnonEmptyProdData _ NARROW[tree.data]; BEGIN manyCode: MesaCodeNode; use2: UsageNode; oneCode: MesaCodeNode; use1: UsageNode; fileTree: WholeFileNode; fileTree _ LookUpParseTree[context, BuildName[treeData.Identifier]]; [oneCode, use1] _ fileTree.procs.FormLinkCallCode[fileTree, context, usage]; [manyCode, use2] _ treeData.IdList.procs.FormLinkCallCode[treeData.IdList, context, use1]; temp1 _ use2; temp0 _ ConcatCode2[oneCode, manyCode]; END; END END; IdListnonEmptyProdFormVarDeclCode: PUBLIC PROC[ref: REF ANY, types: TypeListNode] RETURNS[temp0: MesaCodeNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: IdListnonEmptyProdData _ NARROW[tree.data]; BEGIN firstType: TypeNode; restTypes: TypeListNode; [firstType, restTypes] _ PartitionFirstType[types]; temp0 _ ConcatCode2[RopeCode2["%g: %g;\N", IdFill[treeData.Identifier], CodeFill[GetTypeCodeName[firstType]]], treeData.IdList.procs.FormVarDeclCode[treeData.IdList, restTypes]]; END; END END; IdListnonEmptyProdFormRecFcnsDeclCode: PUBLIC PROC[ref: REF ANY, prodNameCode: MesaCodeNode, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: IdListnonEmptyProdData _ NARROW[tree.data]; BEGIN code: MesaCodeNode; use: UsageNode; idListCode: MesaCodeNode; use1: UsageNode; [idListCode, use1] _ treeData.IdList.procs.FormRecFcnsDeclCode[treeData.IdList, prodNameCode, context, usage]; use _ RecordFcnUse[use1, BuildName[treeData.Identifier], Use.ref, context]; code _ ConcatCode2[RopeCode3["%g%g: %gProcType;\N", CodeFill[prodNameCode], IdFill[treeData.Identifier], IdFill[treeData.Identifier]], idListCode]; temp1 _ use; temp0 _ code; END; END END; IdListnonEmptyProdFormTypesCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: IdListnonEmptyProdData _ NARROW[tree.data]; BEGIN code: MesaCodeNode; temp2: BOOLEAN; use: UsageNode; type: TypeNode; idListCode: MesaCodeNode; use1: UsageNode; [idListCode, use1] _ treeData.IdList.procs.FormTypesCode[treeData.IdList, context, usage]; type _ LookUpType[context, BuildName[treeData.Identifier]]; use _ RecordTypeUse[use1, type]; IF temp2 _ TestEmptyCode[idListCode] THEN { NULL; } ELSE {NULL; }; code _ ConcatCode2[GetTypeCodeName[type], (IF temp2 THEN BuildEmptyCode[] ELSE RopeCode1[", %g", CodeFill[idListCode]])]; temp1 _ use; temp0 _ code; END; END END; IdListnonEmptyProdFormProcsNamesCode: PUBLIC PROC[ref: REF ANY, prodNameCode: MesaCodeNode] RETURNS[temp0: MesaCodeNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: IdListnonEmptyProdData _ NARROW[tree.data]; BEGIN temp1: BOOLEAN; idListCode: MesaCodeNode; idListCode _ treeData.IdList.procs.FormProcsNamesCode[treeData.IdList, prodNameCode]; IF temp1 _ TestEmptyCode[idListCode] THEN { NULL; } ELSE {NULL; }; temp0 _ ConcatCode2[RopeCode2["%g%g", CodeFill[prodNameCode], IdFill[treeData.Identifier]], (IF temp1 THEN BuildEmptyCode[] ELSE RopeCode1[", %g", CodeFill[idListCode]])]; END; END END; IdListnonEmptyProdBaseDeclCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode] RETURNS[temp0: MesaCodeNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: IdListnonEmptyProdData _ NARROW[tree.data]; BEGIN codeName: MesaCodeNode; codeName _ GetTypeCodeName[LookUpType[context, BuildName[treeData.Identifier]]]; temp0 _ ConcatCode2[ConcatCode2[RopeCode2["%g: TYPE = REF %gBody;\N", CodeFill[codeName], CodeFill[codeName]], RopeCode1["%gBody: TYPE;\N\N", CodeFill[codeName]]], treeData.IdList.procs.BaseDeclCode[treeData.IdList, context]]; END; END END; IdListnonEmptyProdProcFieldTypeCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: IdListnonEmptyProdData _ NARROW[tree.data]; BEGIN code: MesaCodeNode; use: UsageNode; tailCode: MesaCodeNode; idListCode: MesaCodeNode; use1: UsageNode; [idListCode, use1] _ treeData.IdList.procs.ProcFieldTypeCode[treeData.IdList, context, usage]; IF TestEmptyCode[idListCode] THEN {tailCode _ BuildEmptyCode[]; } ELSE {tailCode _ ConcatCode2[RopeCode[", "], idListCode]; }; use _ RecordFcnUse[use1, BuildName[treeData.Identifier], Use.ref, context]; code _ ConcatCode2[RopeCode2["\N\T%g: %gProcType", IdFill[treeData.Identifier], IdFill[treeData.Identifier]], tailCode]; temp1 _ use; temp0 _ code; END; END END; IdListnonEmptyProdRecordMultipleBaseTypes: PUBLIC PROC[ref: REF ANY, file: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: IdListnonEmptyProdData _ NARROW[tree.data]; BEGIN name: NameNode; codeName: MesaCodeNode; context1: ContextNode; context1 _ treeData.IdList.procs.RecordMultipleBaseTypes[treeData.IdList, file, context]; codeName _ RopeCode1["%gNode", IdFill[treeData.Identifier]]; name _ BuildName[treeData.Identifier]; temp0 _ RecordSimpleBaseType[context1, name, file, codeName]; END; END END; IdListnonEmptyProdCollectRightSideSymbols: PUBLIC PROC[ref: REF ANY, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: IdListnonEmptyProdData _ NARROW[tree.data]; BEGIN fileTree: WholeFileNode; context1: ContextNode; context1 _ treeData.IdList.procs.CollectRightSideSymbols[treeData.IdList, context]; fileTree _ FindParseTree[context1, BuildName[treeData.Identifier]]; temp0 _ fileTree.procs.CollectRightSideSymbols[fileTree, context1]; END; END END; IdListnonEmptyProdCollectFunctionTypes: PUBLIC PROC[ref: REF ANY, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: IdListnonEmptyProdData _ NARROW[tree.data]; BEGIN fileTree: WholeFileNode; context1: ContextNode; context1 _ treeData.IdList.procs.CollectFunctionTypes[treeData.IdList, context]; fileTree _ FindParseTree[context1, BuildName[treeData.Identifier]]; temp0 _ fileTree.procs.CollectFunctionTypes[fileTree, context1]; END; END END; IdListnonEmptyProdCollectValueTypes: PUBLIC PROC[ref: REF ANY, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: IdListnonEmptyProdData _ NARROW[tree.data]; BEGIN context2: ContextNode; fileTree: WholeFileNode; context1: ContextNode; context1 _ treeData.IdList.procs.CollectValueTypes[treeData.IdList, context]; [context2, fileTree] _ FindOrReadAndParseTree[context1, BuildName[treeData.Identifier]]; temp0 _ fileTree.procs.CollectValueTypes[fileTree, context2]; END; END END; IdListnonEmptyProdFormNameList: PUBLIC PROC[ref: REF ANY] RETURNS[temp0: NameListNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: IdListnonEmptyProdData _ NARROW[tree.data]; temp0 _ PrefixToNameList[BuildName[treeData.Identifier], treeData.IdList.procs.FormNameList[treeData.IdList]]; END END; IdListnonEmptyProdFormTypeListEarly: PUBLIC PROC[ref: REF ANY, context: ContextNode] RETURNS[temp0: TypeListNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: IdListnonEmptyProdData _ NARROW[tree.data]; temp0 _ PrefixToTypeList[FindType[context, BuildName[treeData.Identifier]], treeData.IdList.procs.FormTypeListEarly[treeData.IdList, context]]; END END; IdListnonEmptyProdRecordCedarTypes: PUBLIC PROC[ref: REF ANY, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: IdListnonEmptyProdData _ NARROW[tree.data]; temp1: ContextNode; BEGIN codeName: MesaCodeNode; codeName _ RopeCode1["%g", IdFill[treeData.Identifier]]; temp1 _ RecordPreDefinedCedarType[context, BuildName[treeData.Identifier], codeName]; END; temp0 _ treeData.IdList.procs.RecordCedarTypes[treeData.IdList, temp1]; END END; IdListnonEmptyProdRecordCedarTypesFrom: PUBLIC PROC[ref: REF ANY, defFileName: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: IdListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: IdListnonEmptyProdData _ NARROW[tree.data]; temp1: ContextNode; BEGIN codeName: MesaCodeNode; codeName _ RopeCode1["%g", IdFill[treeData.Identifier]]; temp1 _ RecordCedarType[context, BuildName[treeData.Identifier], defFileName, codeName]; END; temp0 _ treeData.IdList.procs.RecordCedarTypesFrom[treeData.IdList, defFileName, temp1]; END END; RopeListOneProdSpecialSyntaxTokenFileCode: PUBLIC PROC[ref: REF ANY] RETURNS[temp0: MesaCodeNode] = BEGIN tree: RopeListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: RopeListOneProdData _ NARROW[tree.data]; IF EqualRopes[";", RopeFromRopeNode[treeData.Rope]] THEN {temp0 _ RopeCode["SpelledTerminals: semiColon ; ;\N"]; } ELSE {temp0 _ BuildEmptyCode[]; }; END END; RopeListOneProdSyntaxFileCodes: PUBLIC PROC[ref: REF ANY, context: LookupContextNode] RETURNS[temp0: MesaCodeNode, temp1: MesaCodeNode] = BEGIN tree: RopeListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: RopeListOneProdData _ NARROW[tree.data]; BEGIN tkn: MesaCodeNode; tkn _ RopeCode1["\"%g\"", CodeFill[RopeCode[RopeFromRopeNode[treeData.Rope]]]]; temp1 _ BuildEmptyCode[]; temp0 _ tkn; END; END END; RopeListOneProdCollectRightSideSymbols: PUBLIC PROC[ref: REF ANY, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: RopeListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: RopeListOneProdData _ NARROW[tree.data]; temp0 _ RecordRopeToken[context, treeData.Rope]; END END; RopeListManyProdSpecialSyntaxTokenFileCode: PUBLIC PROC[ref: REF ANY] RETURNS[temp0: MesaCodeNode] = BEGIN tree: RopeListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: RopeListManyProdData _ NARROW[tree.data]; temp1: BOOLEAN; IF temp1 _ EqualRopes[";", RopeFromRopeNode[treeData.Rope]] THEN { NULL; } ELSE {NULL; }; temp0 _ ConcatCode2[treeData.RopeList.procs.SpecialSyntaxTokenFileCode[treeData.RopeList], (IF temp1 THEN RopeCode["SpelledTerminals: semiColon ; ;\N"] ELSE BuildEmptyCode[])]; END END; RopeListManyProdSyntaxFileCodes: PUBLIC PROC[ref: REF ANY, context: LookupContextNode] RETURNS[temp0: MesaCodeNode, temp1: MesaCodeNode] = BEGIN tree: RopeListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: RopeListManyProdData _ NARROW[tree.data]; BEGIN tkn: MesaCodeNode; listCode: MesaCodeNode; unused: MesaCodeNode; [listCode, unused] _ treeData.RopeList.procs.SyntaxFileCodes[treeData.RopeList, context]; tkn _ ConcatCode3[listCode, RopeCode[" "], RopeCode1["\"%g\"", CodeFill[RopeCode[RopeFromRopeNode[treeData.Rope]]]]]; temp1 _ BuildEmptyCode[]; temp0 _ tkn; END; END END; RopeListManyProdCollectRightSideSymbols: PUBLIC PROC[ref: REF ANY, context: ContextNode] RETURNS[temp0: ContextNode] = BEGIN tree: RopeListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: RopeListManyProdData _ NARROW[tree.data]; temp0 _ RecordRopeToken[treeData.RopeList.procs.CollectRightSideSymbols[treeData.RopeList, context], treeData.Rope]; END END; END..