DIRECTORY Convert, ParserPrivateDef, Rope, SiroccoPrivate, ThreeC4Support, WartDef, AbstractTypesDef, HashTable, AbstractProductionsDef; AbstractSyntaxImpl: CEDAR PROGRAM IMPORTS Convert, ParserPrivateDef, Rope, ThreeC4Support, HashTable EXPORTS AbstractProductionsDef= BEGIN OPEN Convert, ParserPrivateDef, Rope, SiroccoPrivate, ThreeC4Support, WartDef, AbstractTypesDef, HashTable, AbstractProductionsDef; ProgramProdMakeSymbolTable: PUBLIC PROC[ref: REF ANY] RETURNS[temp0: TABLES] = BEGIN tree: ProgramNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ProgramProdData _ NARROW[tree.data]; BEGIN tables2: TABLES; programKey: ROPE; tables1: TABLES; tables: TABLES; tables _ CreateTables[]; tables1 _ treeData.DeclarationList.procs.RecordNames[treeData.DeclarationList, tables]; programKey _ CreateCanonicalKey[treeData.identifier, treeData.numberDprogno, treeData.numberDverno]; tables2 _ treeData.ReferencedProgramList.procs.ReadInTable[treeData.ReferencedProgramList, tables1]; temp0 _ treeData.DeclarationList.procs.BuildTable[treeData.DeclarationList, tables2]; END; END END; ReferencedProgramListemptyProdReadInTable: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: ReferencedProgramListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ CopyTables[tables]; END END; ReferencedProgramListmoreProdReadInTable: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: ReferencedProgramListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ReferencedProgramListmoreProdData _ NARROW[tree.data]; BEGIN tables1: TABLES; tables1 _ treeData.ReferencedProgramList.procs.ReadInTable[treeData.ReferencedProgramList, tables]; temp0 _ treeData.ReferencedProgram.procs.ReadInTable[treeData.ReferencedProgram, tables1]; END; END END; ReferencedProgramProdReadInTable: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: ReferencedProgramNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ReferencedProgramProdData _ NARROW[tree.data]; temp0 _ DiskToTable[tables, treeData.identifier, treeData.numberDprogno, treeData.numberDverno]; END END; DeclarationListemptyProdRecordNames: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: DeclarationListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ CopyTables[tables]; END END; DeclarationListemptyProdBuildTable: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: DeclarationListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ CopyTables[tables]; END END; DeclarationListmoreProdRecordNames: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: DeclarationListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: DeclarationListmoreProdData _ NARROW[tree.data]; temp0 _ treeData.DeclarationList.procs.RecordNames[treeData.DeclarationList, treeData.Declaration.procs.RecordNames[treeData.Declaration, tables]]; END END; DeclarationListmoreProdBuildTable: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: DeclarationListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: DeclarationListmoreProdData _ NARROW[tree.data]; BEGIN tables2: TABLES; tables1: TABLES; tables1 _ treeData.Declaration.procs.BuildTable[treeData.Declaration, tables]; tables2 _ treeData.DeclarationList.procs.BuildTable[treeData.DeclarationList, tables1]; temp0 _ tables2; END; END END; DeclarationtypeProdRecordNames: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: DeclarationNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: DeclarationtypeProdData _ NARROW[tree.data]; temp0 _ IntoUnresolvedTypeTable[tables, CreateKey[treeData.identifier], treeData.Type]; END END; DeclarationtypeProdBuildTable: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: DeclarationNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: DeclarationtypeProdData _ NARROW[tree.data]; BEGIN canonicalType: ROPE; typeTree: CType; tables1: TABLES; [canonicalType, typeTree, tables1] _ CanonicaliseLocalReferenceType[treeData.identifier, tables]; temp0 _ tables1; END; END END; DeclarationconstantProdRecordNames: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: DeclarationNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: DeclarationconstantProdData _ NARROW[tree.data]; temp0 _ IntoUnresolvedConstantTable[tables, CreateKey[treeData.identifier], treeData.Type, treeData.Constant]; END END; DeclarationconstantProdBuildTable: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: DeclarationNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: DeclarationconstantProdData _ NARROW[tree.data]; BEGIN canonicalType: ROPE; constantTree: CType; value: ConstantNode; tables1: TABLES; [canonicalType, constantTree, value, tables1] _ GetConstantType[treeData.identifier, tables]; temp0 _ tables1; END; END END; TypearrayProdCanonicaliseType: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: ROPE, temp1: CType, temp2: TABLES] = BEGIN tree: TypeNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: TypearrayProdData _ NARROW[tree.data]; BEGIN cType2: CType; bound: CARD; tables2: TABLES; cComponent: CComponent; cName1: ROPE; cType1: CType; tables1: TABLES; [cName1, cType1, tables1] _ treeData.Type.procs.CanonicaliseType[treeData.Type, tables]; cComponent _ MkCComponent["", 0, cName1, MkNILCComponent[]]; [bound, tables2] _ treeData.Constant.procs.GetCARDINAL[treeData.Constant, tables1]; cType2 _ MkCType[Generic.array, int[bound], cComponent]; temp2 _ tables2; temp1 _ cType2; temp0 _ "DEFAULT"; END; END END; TypebooleanProdCanonicaliseType: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: ROPE, temp1: CType, temp2: TABLES] = BEGIN tree: TypeNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp2 _ CopyTables[tables]; temp1 _ MkCType[Generic.boolean, 0, MkNILCComponent[]]; temp0 _ "BOOLEAN"; END END; TypebulkDataSinkProdCanonicaliseType: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: ROPE, temp1: CType, temp2: TABLES] = BEGIN tree: TypeNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp2 _ CopyTables[tables]; temp1 _ MkCType[Generic.bulkDataSink, 0, MkNILCComponent[]]; temp0 _ "SINK"; END END; TypebulkDataSourceProdCanonicaliseType: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: ROPE, temp1: CType, temp2: TABLES] = BEGIN tree: TypeNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp2 _ CopyTables[tables]; temp1 _ MkCType[Generic.bulkDataSource, 0, MkNILCComponent[]]; temp0 _ "SOURCE"; END END; TypecardinalProdCanonicaliseType: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: ROPE, temp1: CType, temp2: TABLES] = BEGIN tree: TypeNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp2 _ CopyTables[tables]; temp1 _ MkCType[Generic.cardinal, 0, MkNILCComponent[]]; temp0 _ "CARDINAL"; END END; TypechoiceProdCanonicaliseType: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: ROPE, temp1: CType, temp2: TABLES] = BEGIN tree: TypeNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: TypechoiceProdData _ NARROW[tree.data]; BEGIN cType2: CType; cComponent2: CComponent; cComponent1: CComponent; tables5: TABLES; junk: TABLES; tables3: TABLES; tables2: TABLES; match: CComponent; cName1: ROPE; cType1: CType; tables1: TABLES; [cName1, cType1, tables1] _ treeData.Type.procs.CanonicaliseType[treeData.Type, tables]; match _ CompareClass[cType1, Generic.enumeration]; tables2 _ FillWorkTable[cType1, tables1]; tables3 _ treeData.CandidateList.procs.EmptyWorkTableOfNames[treeData.CandidateList, tables2]; junk _ CheckIfEmpty[tables3]; [cComponent1, tables5] _ treeData.CandidateList.procs.CanonicaliseCandidateList[treeData.CandidateList, MkNILCComponent[], cType1, tables3]; cComponent2 _ MkCComponent["", 0, cName1, cComponent1]; cType2 _ MkCType[Generic.choice, 0, cComponent2]; temp2 _ tables5; temp1 _ cType2; temp0 _ "DEFAULT"; END; END END; TypeemptyRecordProdCanonicaliseType: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: ROPE, temp1: CType, temp2: TABLES] = BEGIN tree: TypeNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; BEGIN cType: CType; cType _ MkCType[Generic.record, 0, MkNILCComponent[]]; temp2 _ CopyTables[tables]; temp1 _ cType; temp0 _ "DEFAULT"; END; END END; TypeenumerationProdCanonicaliseType: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: ROPE, temp1: CType, temp2: TABLES] = BEGIN tree: TypeNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: TypeenumerationProdData _ NARROW[tree.data]; BEGIN cType: CType; cComponent: CComponent; tables2: TABLES; tables1: TABLES; tables1 _ treeData.CorrespondenceList.procs.CheckCorrespondenceList[treeData.CorrespondenceList, ClearWorkTable[tables]]; [cComponent, tables2] _ treeData.CorrespondenceList.procs.CanonicaliseCorrespondenceList[treeData.CorrespondenceList, MkNILCComponent[], tables1]; cType _ MkCType[Generic.enumeration, 0, cComponent]; temp2 _ tables2; temp1 _ cType; temp0 _ "DEFAULT"; END; END END; TypeerrorProdCanonicaliseType: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: ROPE, temp1: CType, temp2: TABLES] = BEGIN tree: TypeNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: TypeerrorProdData _ NARROW[tree.data]; BEGIN cType: CType; cComponent: CComponent; tables1: TABLES; [cComponent, tables1] _ treeData.FieldList.procs.CanonicaliseFieldList[treeData.FieldList, MkNILCComponent[], tables]; cType _ MkCType[Generic.error, 0, cComponent]; temp2 _ tables1; temp1 _ cType; temp0 _ "DEFAULT"; END; END END; TypeintegerProdCanonicaliseType: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: ROPE, temp1: CType, temp2: TABLES] = BEGIN tree: TypeNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp2 _ CopyTables[tables]; temp1 _ MkCType[Generic.integer, 0, MkNILCComponent[]]; temp0 _ "INTEGER"; END END; TypelocalReferenceProdCanonicaliseType: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: ROPE, temp1: CType, temp2: TABLES] = BEGIN tree: TypeNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: TypelocalReferenceProdData _ NARROW[tree.data]; [temp0, temp1, temp2] _ CanonicaliseLocalReferenceType[treeData.identifier, tables]; END END; TypelongCardinalProdCanonicaliseType: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: ROPE, temp1: CType, temp2: TABLES] = BEGIN tree: TypeNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp2 _ CopyTables[tables]; temp1 _ MkCType[Generic.longCardinal, 0, MkNILCComponent[]]; temp0 _ "LONGCARDINAL"; END END; TypelongIntegerProdCanonicaliseType: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: ROPE, temp1: CType, temp2: TABLES] = BEGIN tree: TypeNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp2 _ CopyTables[tables]; temp1 _ MkCType[Generic.longInteger, 0, MkNILCComponent[]]; temp0 _ "LONGINTEGER"; END END; TypeprocedureProdCanonicaliseType: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: ROPE, temp1: CType, temp2: TABLES] = BEGIN tree: TypeNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: TypeprocedureProdData _ NARROW[tree.data]; BEGIN cType: CType; nArgs: INT; cComponent: CComponent; tables3: TABLES; nResults: INT; okay: INT; resultCComponent: CComponent; tables2: TABLES; tables1: TABLES; tables1 _ treeData.NameList.procs.CheckIfErrorNames[treeData.NameList, tables]; [resultCComponent, tables2] _ treeData.FieldListres.procs.CanonicaliseFieldList[treeData.FieldListres, MkNILCComponent[], tables1]; okay _ CheckResultsForSourceAndSink[resultCComponent]; nResults _ GetLengthOfCComponentList[resultCComponent, 0]; [cComponent, tables3] _ treeData.FieldListarg.procs.CanonicaliseFieldList[treeData.FieldListarg, resultCComponent, tables2]; nArgs _ GetLengthOfCComponentList[cComponent, nResults]; cType _ MkCType[Generic.procedure, nArgs, cComponent]; temp2 _ tables3; temp1 _ cType; temp0 _ "DEFAULT"; END; END END; TyperecordProdCanonicaliseType: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: ROPE, temp1: CType, temp2: TABLES] = BEGIN tree: TypeNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: TyperecordProdData _ NARROW[tree.data]; BEGIN cType: CType; cComponent: CComponent; tables1: TABLES; [cComponent, tables1] _ treeData.FieldList.procs.CanonicaliseFieldList[treeData.FieldList, MkNILCComponent[], tables]; cType _ MkCType[Generic.record, 0, cComponent]; temp2 _ tables1; temp1 _ cType; temp0 _ "DEFAULT"; END; END END; TyperemoteReferenceProdCanonicaliseType: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: ROPE, temp1: CType, temp2: TABLES] = BEGIN tree: TypeNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: TyperemoteReferenceProdData _ NARROW[tree.data]; BEGIN cType: CType; canonicalName: ROPE; okay: INT; successful: BOOLEAN; DirectoryEntry: Value; remoteDirectory: Table; remoteDirectory _ FetchFromGlobalTable[tables, CreateKey[treeData.identifiera]]; [successful, DirectoryEntry] _ Fetch[remoteDirectory, CreateKey[treeData.identifierb]]; IF successful THEN {okay _ 0; } ELSE {okay _ int[SendError["Undeclared Remote Identifier"]]; }; canonicalName _ ValueToRope[DirectoryEntry]; cType _ FetchFromTypeTable[tables, canonicalName]; temp2 _ CopyTables[tables]; temp1 _ cType; temp0 _ canonicalName; END; END END; TypesequenceProdCanonicaliseType: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: ROPE, temp1: CType, temp2: TABLES] = BEGIN tree: TypeNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: TypesequenceProdData _ NARROW[tree.data]; BEGIN cType2: CType; bound: CARD; tables2: TABLES; cComponent: CComponent; cName1: ROPE; cType1: CType; tables1: TABLES; [cName1, cType1, tables1] _ treeData.Type.procs.CanonicaliseType[treeData.Type, tables]; cComponent _ MkCComponent["", 0, cName1, MkNILCComponent[]]; [bound, tables2] _ treeData.Constant.procs.GetCARDINAL[treeData.Constant, tables1]; cType2 _ MkCType[Generic.sequence, int[bound], cComponent]; temp2 _ tables2; temp1 _ cType2; temp0 _ "DEFAULT"; END; END END; TypestringProdCanonicaliseType: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: ROPE, temp1: CType, temp2: TABLES] = BEGIN tree: TypeNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp2 _ CopyTables[tables]; temp1 _ MkCType[Generic.string, 0, MkNILCComponent[]]; temp0 _ "STRING"; END END; TypeunspecifiedProdCanonicaliseType: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: ROPE, temp1: CType, temp2: TABLES] = BEGIN tree: TypeNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp2 _ CopyTables[tables]; temp1 _ MkCType[Generic.unspecified, 0, MkNILCComponent[]]; temp0 _ "UNSPECIFIED"; END END; CorrespondenceListoneProdCheckCorrespondenceList: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: CorrespondenceListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CorrespondenceListoneProdData _ NARROW[tree.data]; BEGIN value: CARD; tables1: TABLES; [value, tables1] _ treeData.Constant.procs.GetCARDINAL[treeData.Constant, tables]; temp0 _ SeeIfDuplicated[tables1, treeData.identifier, value]; END; END END; CorrespondenceListoneProdCanonicaliseCorrespondenceList: PUBLIC PROC[ref: REF ANY, cComponentArg: CComponent, tables: TABLES] RETURNS[temp0: CComponent, temp1: TABLES] = BEGIN tree: CorrespondenceListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CorrespondenceListoneProdData _ NARROW[tree.data]; BEGIN cComponent: CComponent; value: CARD; tables1: TABLES; [value, tables1] _ treeData.Constant.procs.GetCARDINAL[treeData.Constant, tables]; cComponent _ MkCComponent[CreateKey[treeData.identifier], int[value], "", cComponentArg]; temp1 _ tables1; temp0 _ cComponent; END; END END; CorrespondenceListmoreProdCheckCorrespondenceList: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: CorrespondenceListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CorrespondenceListmoreProdData _ NARROW[tree.data]; temp0 _ treeData.CorrespondenceListnext.procs.CheckCorrespondenceList[treeData.CorrespondenceListnext, treeData.CorrespondenceListvalue.procs.CheckCorrespondenceList[treeData.CorrespondenceListvalue, tables]]; END END; CorrespondenceListmoreProdCanonicaliseCorrespondenceList: PUBLIC PROC[ref: REF ANY, cComponentArg: CComponent, tables: TABLES] RETURNS[temp0: CComponent, temp1: TABLES] = BEGIN tree: CorrespondenceListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CorrespondenceListmoreProdData _ NARROW[tree.data]; BEGIN cComponent1: CComponent; tables1: TABLES; [cComponent1, tables1] _ treeData.CorrespondenceListnext.procs.CanonicaliseCorrespondenceList[treeData.CorrespondenceListnext, cComponentArg, tables]; [temp0, temp1] _ treeData.CorrespondenceListvalue.procs.CanonicaliseCorrespondenceList[treeData.CorrespondenceListvalue, cComponent1, tables1]; END; END END; CandidateListoneProdEmptyWorkTableOfNames: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: CandidateListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CandidateListoneProdData _ NARROW[tree.data]; temp0 _ treeData.NameList.procs.EmptyWorkTableOfNames[treeData.NameList, tables]; END END; CandidateListoneProdCanonicaliseCandidateList: PUBLIC PROC[ref: REF ANY, cComponentArg: CComponent, cTypeTag: CType, tables: TABLES] RETURNS[temp0: CComponent, temp1: TABLES] = BEGIN tree: CandidateListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CandidateListoneProdData _ NARROW[tree.data]; BEGIN variantCName: ROPE; variantCType: CType; tables1: TABLES; [variantCName, variantCType, tables1] _ treeData.Type.procs.CanonicaliseType[treeData.Type, tables]; [temp0, temp1] _ treeData.NameList.procs.CanonicaliseFieldsFromNameList[treeData.NameList, variantCName, cComponentArg, tables1]; END; END END; CandidateListmoreProdEmptyWorkTableOfNames: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: CandidateListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CandidateListmoreProdData _ NARROW[tree.data]; temp0 _ treeData.CandidateListnext.procs.EmptyWorkTableOfNames[treeData.CandidateListnext, treeData.CandidateListvalue.procs.EmptyWorkTableOfNames[treeData.CandidateListvalue, tables]]; END END; CandidateListmoreProdCanonicaliseCandidateList: PUBLIC PROC[ref: REF ANY, cComponentArg: CComponent, cTypeTag: CType, tables: TABLES] RETURNS[temp0: CComponent, temp1: TABLES] = BEGIN tree: CandidateListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: CandidateListmoreProdData _ NARROW[tree.data]; BEGIN cComponent1: CComponent; tables1: TABLES; [cComponent1, tables1] _ treeData.CandidateListnext.procs.CanonicaliseCandidateList[treeData.CandidateListnext, cComponentArg, cTypeTag, tables]; [temp0, temp1] _ treeData.CandidateListvalue.procs.CanonicaliseCandidateList[treeData.CandidateListvalue, cComponent1, cTypeTag, tables1]; END; END END; FieldListemptyProdCanonicaliseFieldList: PUBLIC PROC[ref: REF ANY, CComponentArg: CComponent, tables: TABLES] RETURNS[temp0: CComponent, temp1: TABLES] = BEGIN tree: FieldListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp1 _ CopyTables[tables]; temp0 _ CopyCComponent[CComponentArg]; END END; FieldListoneProdCanonicaliseFieldList: PUBLIC PROC[ref: REF ANY, cComponentArg: CComponent, tables: TABLES] RETURNS[temp0: CComponent, temp1: TABLES] = BEGIN tree: FieldListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: FieldListoneProdData _ NARROW[tree.data]; BEGIN cName: ROPE; cType: CType; tables1: TABLES; [cName, cType, tables1] _ treeData.Type.procs.CanonicaliseType[treeData.Type, tables]; [temp0, temp1] _ treeData.NameList.procs.CanonicaliseFieldsFromNameList[treeData.NameList, cName, cComponentArg, tables1]; END; END END; FieldListmoreProdCanonicaliseFieldList: PUBLIC PROC[ref: REF ANY, CComponentArg: CComponent, tables: TABLES] RETURNS[temp0: CComponent, temp1: TABLES] = BEGIN tree: FieldListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: FieldListmoreProdData _ NARROW[tree.data]; BEGIN cComponent1: CComponent; tables1: TABLES; [cComponent1, tables1] _ treeData.FieldListrest.procs.CanonicaliseFieldList[treeData.FieldListrest, CComponentArg, tables]; [temp0, temp1] _ treeData.FieldListvalue.procs.CanonicaliseFieldList[treeData.FieldListvalue, cComponent1, tables1]; END; END END; ConstantchoiceProdConstantToRope: PUBLIC PROC[ref: REF ANY, constantType: ROPE, tables: TABLES] RETURNS[temp0: ROPE, temp1: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ConstantchoiceProdData _ NARROW[tree.data]; BEGIN value: ROPE; tables1: TABLES; constantType1: ROPE; constantType1 _ GetTypeOfComponent[treeData.identifier, constantType, tables]; [value, tables1] _ treeData.Constant.procs.ConstantToRope[treeData.Constant, constantType1, tables]; temp1 _ tables1; temp0 _ Cat[CreateKey[treeData.identifier], " ", value]; END; END END; ConstantchoiceProdCoerce: PUBLIC PROC[ref: REF ANY, typeCtype: CType, typeTypeName: ROPE, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ConstantchoiceProdData _ NARROW[tree.data]; BEGIN cType: CType; ctypeName: ROPE; cComponent: CComponent; cComponent _ GetCTypeFirstChild[typeCtype]; [cType, ctypeName] _ GetCType[treeData.identifier, cComponent, tables]; temp0 _ treeData.Constant.procs.Coerce[treeData.Constant, cType, ctypeName, tables]; END; END END; ConstantchoiceProdGetCARDINAL: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: CARD, temp1: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ConstantchoiceProdData _ NARROW[tree.data]; temp1 _ CopyTables[tables]; temp0 _ SendError["Expected CARDINAL found Choice"]; END END; ConstantcomponentlistProdConstantToRope: PUBLIC PROC[ref: REF ANY, constantType: ROPE, tables: TABLES] RETURNS[temp0: ROPE, temp1: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ConstantcomponentlistProdData _ NARROW[tree.data]; [temp0, temp1] _ treeData.ComponentList.procs.ConstantToRope[treeData.ComponentList, constantType, tables]; END END; ConstantcomponentlistProdCoerce: PUBLIC PROC[ref: REF ANY, typeCtype: CType, typeTypeName: ROPE, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ConstantcomponentlistProdData _ NARROW[tree.data]; BEGIN junk: TABLES; tables2: TABLES; tables1: TABLES; cComponent: CComponent; cComponent _ CompareClass[typeCtype, Generic.record]; tables1 _ EnterNamesIntoWorkTable[typeCtype, tables]; tables2 _ treeData.ComponentList.procs.CheckAllNames[treeData.ComponentList, tables1]; junk _ CheckIfEmpty[tables2]; temp0 _ treeData.ComponentList.procs.CoerceComponents[treeData.ComponentList, cComponent, tables2]; END; END END; ConstantcomponentlistProdGetCARDINAL: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: CARD, temp1: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ConstantcomponentlistProdData _ NARROW[tree.data]; temp1 _ CopyTables[tables]; temp0 _ SendError["Expected CARDINAL found Record"]; END END; ConstantelementListProdConstantToRope: PUBLIC PROC[ref: REF ANY, constantType: ROPE, tables: TABLES] RETURNS[temp0: ROPE, temp1: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ConstantelementListProdData _ NARROW[tree.data]; BEGIN lengthRope: ROPE; valueRope: ROPE; length: INT; tables1: TABLES; elementType: ROPE; elementType _ GetTypeOfElement[constantType, tables]; [valueRope, length, tables1] _ treeData.ElementList.procs.ElementListConstantToRope[treeData.ElementList, elementType, tables]; lengthRope _ RopeFromInt[length]; temp1 _ tables1; temp0 _ Cat[lengthRope, " ", valueRope]; END; END END; ConstantelementListProdCoerce: PUBLIC PROC[ref: REF ANY, typeCtype: CType, typeTypeName: ROPE, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ConstantelementListProdData _ NARROW[tree.data]; BEGIN cType: CType; cName: ROPE; numberOfElementInList: INT; numberOfElementInList _ treeData.ElementList.procs.Size[treeData.ElementList, 0]; [cType, cName] _ SeeIfArrOrSeq[typeCtype, numberOfElementInList, tables]; temp0 _ treeData.ElementList.procs.CoerceElementList[treeData.ElementList, cType, cName, tables]; END; END END; ConstantelementListProdGetCARDINAL: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: CARD, temp1: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ConstantelementListProdData _ NARROW[tree.data]; temp1 _ CopyTables[tables]; temp0 _ SendError["Expected CARDINAL found ElementList"]; END END; ConstantemptyProdConstantToRope: PUBLIC PROC[ref: REF ANY, constantType: ROPE, tables: TABLES] RETURNS[temp0: ROPE, temp1: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp1 _ CopyTables[tables]; temp0 _ ""; END END; ConstantemptyProdCoerce: PUBLIC PROC[ref: REF ANY, typeCtype: CType, typeTypeName: ROPE, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; BEGIN junk: TABLES; tables1: TABLES; cComponent: CComponent; cComponent _ CompareClass[typeCtype, Generic.record]; tables1 _ EnterNamesIntoWorkTable[typeCtype, tables]; junk _ CheckIfEmpty[tables1]; temp0 _ tables1; END; END END; ConstantemptyProdGetCARDINAL: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: CARD, temp1: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp1 _ CopyTables[tables]; temp0 _ SendError["Expected CARDINAL found Empty ElementList"]; END END; ConstantfalseProdConstantToRope: PUBLIC PROC[ref: REF ANY, constantType: ROPE, tables: TABLES] RETURNS[temp0: ROPE, temp1: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp1 _ CopyTables[tables]; temp0 _ "FALSE "; END END; ConstantfalseProdCoerce: PUBLIC PROC[ref: REF ANY, type: CType, typeTypeName: ROPE, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ CheckCanonicalType[typeTypeName, "BOOLEAN", tables]; END END; ConstantfalseProdGetCARDINAL: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: CARD, temp1: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp1 _ CopyTables[tables]; temp0 _ SendError["Expected CARDINAL found Boolean"]; END END; ConstantidProdConstantToRope: PUBLIC PROC[ref: REF ANY, constantType: ROPE, tables: TABLES] RETURNS[temp0: ROPE, temp1: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ConstantidProdData _ NARROW[tree.data]; [temp0, temp1] _ LocalConstantToRope[treeData.identifier, constantType, tables]; END END; ConstantidProdCoerce: PUBLIC PROC[ref: REF ANY, typeCtype: CType, typeTypeName: ROPE, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ConstantidProdData _ NARROW[tree.data]; BEGIN match: INT; constantTypeName: ROPE; ConstantCType: CType; value: ConstantNode; tables1: TABLES; IF NotEnumeration[typeCtype] THEN {[constantTypeName, ConstantCType, value, tables1] _ GetConstantType[treeData.identifier, tables]; } ELSE {BEGIN junk: INT; junk _ IsEnumerationConstant[typeCtype, treeData.identifier]; [constantTypeName, ConstantCType, value, tables1] _ Copy[typeTypeName, typeCtype, tree, tables]; END; }; IF Equal[typeTypeName, constantTypeName] THEN {match _ 0; } ELSE {match _ CompareTypes[typeCtype, ConstantCType, tables1]; }; temp0 _ tables1; END; END END; ConstantidProdGetCARDINAL: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: CARD, temp1: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ConstantidProdData _ NARROW[tree.data]; BEGIN constantType: ROPE; constantTree: CType; value: ConstantNode; tables1: TABLES; [constantType, constantTree, value, tables1] _ GetConstantType[treeData.identifier, tables]; [temp0, temp1] _ value.procs.GetCARDINAL[value, tables1]; END; END END; ConstantnegativeNumberProdConstantToRope: PUBLIC PROC[ref: REF ANY, constantType: ROPE, tables: TABLES] RETURNS[temp0: ROPE, temp1: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ConstantnegativeNumberProdData _ NARROW[tree.data]; temp1 _ CopyTables[tables]; temp0 _ Cat["-", RopeFromCard[treeData.number.procs.NumberToCard[treeData.number]], " "]; END END; ConstantnegativeNumberProdCoerce: PUBLIC PROC[ref: REF ANY, ctype: CType, typeName: ROPE, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ConstantnegativeNumberProdData _ NARROW[tree.data]; BEGIN okay: INT; value: CARD; tables1: TABLES; junk: BOOLEAN; junk _ SeeIfInt[ctype]; [value, tables1] _ treeData.number.procs.GetCARDINAL[treeData.number, tables]; okay _ TryToCoerceNumber[ctype, value]; temp0 _ tables1; END; END END; ConstantnegativeNumberProdGetCARDINAL: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: CARD, temp1: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ConstantnegativeNumberProdData _ NARROW[tree.data]; temp1 _ CopyTables[tables]; temp0 _ SendError["Expected CARDINAL found Negative Number"]; END END; ConstantnumberProdConstantToRope: PUBLIC PROC[ref: REF ANY, constantType: ROPE, tables: TABLES] RETURNS[temp0: ROPE, temp1: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ConstantnumberProdData _ NARROW[tree.data]; temp1 _ CopyTables[tables]; temp0 _ Concat[RopeFromCard[treeData.number.procs.NumberToCard[treeData.number]], " "]; END END; ConstantnumberProdCoerce: PUBLIC PROC[ref: REF ANY, ctype: CType, typeName: ROPE, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ConstantnumberProdData _ NARROW[tree.data]; BEGIN okay: INT; value: CARD; tables1: TABLES; [value, tables1] _ treeData.number.procs.GetCARDINAL[treeData.number, tables]; okay _ TryToCoerceNumber[ctype, value]; temp0 _ tables1; END; END END; ConstantnumberProdGetCARDINAL: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: CARD, temp1: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ConstantnumberProdData _ NARROW[tree.data]; [temp0, temp1] _ treeData.number.procs.GetCARDINAL[treeData.number, tables]; END END; ConstantremoteReferenceProdConstantToRope: PUBLIC PROC[ref: REF ANY, constantType: ROPE, tables: TABLES] RETURNS[temp0: ROPE, temp1: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ConstantremoteReferenceProdData _ NARROW[tree.data]; BEGIN successful2: BOOLEAN; directoryEntry: Value; remoteDirectory: Table; remoteDirectory _ FetchFromGlobalTable[tables, CreateKey[treeData.identifierleft]]; [successful2, directoryEntry] _ Fetch[remoteDirectory, CreateKey[treeData.identifierright]]; temp1 _ CopyTables[tables]; temp0 _ ValueToRopeConstant[directoryEntry]; END; END END; ConstantremoteReferenceProdCoerce: PUBLIC PROC[ref: REF ANY, typeCtype: CType, typeTypeName: ROPE, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ConstantremoteReferenceProdData _ NARROW[tree.data]; BEGIN match: INT; value: ConstantNode; ConstantCType: CType; constantTypeName: ROPE; successful2: BOOLEAN; DirectoryEntry: Value; remoteDirectory: Table; remoteDirectory _ FetchFromGlobalTable[tables, CreateKey[treeData.identifierleft]]; [successful2, DirectoryEntry] _ Fetch[remoteDirectory, CreateKey[treeData.identifierright]]; constantTypeName _ ValueToRope[DirectoryEntry]; ConstantCType _ FetchFromTypeTable[tables, constantTypeName]; value _ ValueToConstant[DirectoryEntry]; IF Equal[typeTypeName, constantTypeName] THEN {match _ 0; } ELSE {match _ CompareTypes[ConstantCType, typeCtype, tables]; }; temp0 _ CopyTables[tables]; END; END END; ConstantremoteReferenceProdGetCARDINAL: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: CARD, temp1: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ConstantremoteReferenceProdData _ NARROW[tree.data]; BEGIN value: ConstantNode; constantType: ROPE; okay: INT; successful: BOOLEAN; DirectoryEntry: Value; remoteDirectory: Table; remoteDirectory _ FetchFromGlobalTable[tables, CreateKey[treeData.identifierleft]]; [successful, DirectoryEntry] _ Fetch[remoteDirectory, CreateKey[treeData.identifierright]]; IF successful THEN {okay _ 0; } ELSE {okay _ int[SendError["Undeclared Remote Identifier"]]; }; constantType _ ValueToRope[DirectoryEntry]; value _ ValueToConstant[DirectoryEntry]; [temp0, temp1] _ value.procs.GetCARDINAL[value, tables]; END; END END; ConstantstringProdConstantToRope: PUBLIC PROC[ref: REF ANY, constantType: ROPE, tables: TABLES] RETURNS[temp0: ROPE, temp1: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ConstantstringProdData _ NARROW[tree.data]; BEGIN lengthRope: ROPE; value: ROPE; value _ Concat[RopeTokenToROPE[treeData.Rope], " "]; lengthRope _ RopeFromInt[Subtract[Length[value], 3]]; temp1 _ CopyTables[tables]; temp0 _ Cat[lengthRope, " ", value]; END; END END; ConstantstringProdCoerce: PUBLIC PROC[ref: REF ANY, type: CType, canonicalType: ROPE, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ConstantstringProdData _ NARROW[tree.data]; temp0 _ CheckCanonicalType[canonicalType, "STRING", tables]; END END; ConstantstringProdGetCARDINAL: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: CARD, temp1: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ConstantstringProdData _ NARROW[tree.data]; temp1 _ CopyTables[tables]; temp0 _ SendError["Expected CARDINAL found String"]; END END; ConstanttrueProdConstantToRope: PUBLIC PROC[ref: REF ANY, constantType: ROPE, tables: TABLES] RETURNS[temp0: ROPE, temp1: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp1 _ CopyTables[tables]; temp0 _ "TRUE "; END END; ConstanttrueProdCoerce: PUBLIC PROC[ref: REF ANY, type: CType, typeTypeName: ROPE, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ CheckCanonicalType[typeTypeName, "BOOLEAN", tables]; END END; ConstanttrueProdGetCARDINAL: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: CARD, temp1: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp1 _ CopyTables[tables]; temp0 _ SendError["Expected CARDINAL found Boolean"]; END END; ConstantunboundedProdConstantToRope: PUBLIC PROC[ref: REF ANY, constantType: ROPE, tables: TABLES] RETURNS[temp0: ROPE, temp1: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp1 _ CopyTables[tables]; temp0 _ "65536 "; END END; ConstantunboundedProdCoerce: PUBLIC PROC[ref: REF ANY, type: CType, canonicalType: ROPE, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ CheckCanonicalType[canonicalType, "UNBOUNDED", tables]; END END; ConstantunboundedProdGetCARDINAL: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: CARD, temp1: TABLES] = BEGIN tree: ConstantNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp1 _ CopyTables[tables]; temp0 _ card[65536]; END END; ElementListoneProdElementListConstantToRope: PUBLIC PROC[ref: REF ANY, elementType: ROPE, tables: TABLES] RETURNS[temp0: ROPE, temp1: INT, temp2: TABLES] = BEGIN tree: ElementListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ElementListoneProdData _ NARROW[tree.data]; BEGIN value: ROPE; tables1: TABLES; [value, tables1] _ treeData.Constant.procs.ConstantToRope[treeData.Constant, elementType, tables]; temp2 _ tables1; temp1 _ 1; temp0 _ value; END; END END; ElementListoneProdSize: PUBLIC PROC[ref: REF ANY, numberOfElementInList: INT] RETURNS[temp0: INT] = BEGIN tree: ElementListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ElementListoneProdData _ NARROW[tree.data]; temp0 _ AddOne[numberOfElementInList]; END END; ElementListoneProdCoerceElementList: PUBLIC PROC[ref: REF ANY, cType: CType, ctypeName: ROPE, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: ElementListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ElementListoneProdData _ NARROW[tree.data]; temp0 _ treeData.Constant.procs.Coerce[treeData.Constant, cType, ctypeName, tables]; END END; ElementListmoreProdElementListConstantToRope: PUBLIC PROC[ref: REF ANY, elementType: ROPE, tables: TABLES] RETURNS[temp0: ROPE, temp1: INT, temp2: TABLES] = BEGIN tree: ElementListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ElementListmoreProdData _ NARROW[tree.data]; BEGIN rest: ROPE; size: INT; tables2: TABLES; first: ROPE; tables1: TABLES; [first, tables1] _ treeData.Constant.procs.ConstantToRope[treeData.Constant, elementType, tables]; [rest, size, tables2] _ treeData.ElementList.procs.ElementListConstantToRope[treeData.ElementList, elementType, tables1]; temp2 _ tables2; temp1 _ AddOne[size]; temp0 _ Concat[first, rest]; END; END END; ElementListmoreProdSize: PUBLIC PROC[ref: REF ANY, numberOfElementInList: INT] RETURNS[temp0: INT] = BEGIN tree: ElementListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ElementListmoreProdData _ NARROW[tree.data]; temp0 _ treeData.ElementList.procs.Size[treeData.ElementList, AddOne[numberOfElementInList]]; END END; ElementListmoreProdCoerceElementList: PUBLIC PROC[ref: REF ANY, cType: CType, ctypeName: ROPE, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: ElementListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ElementListmoreProdData _ NARROW[tree.data]; BEGIN tables1: TABLES; tables1 _ treeData.Constant.procs.Coerce[treeData.Constant, cType, ctypeName, tables]; temp0 _ treeData.ElementList.procs.CoerceElementList[treeData.ElementList, cType, ctypeName, tables1]; END; END END; ComponentListoneProdCheckAllNames: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: ComponentListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ComponentListoneProdData _ NARROW[tree.data]; temp0 _ treeData.Component.procs.CheckAllNames[treeData.Component, tables]; END END; ComponentListoneProdConstantToRope: PUBLIC PROC[ref: REF ANY, componentListType: ROPE, tables: TABLES] RETURNS[temp0: ROPE, temp1: TABLES] = BEGIN tree: ComponentListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ComponentListoneProdData _ NARROW[tree.data]; [temp0, temp1] _ treeData.Component.procs.ConstantToRope[treeData.Component, componentListType, tables]; END END; ComponentListoneProdCoerceComponents: PUBLIC PROC[ref: REF ANY, cComponent: CComponent, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: ComponentListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ComponentListoneProdData _ NARROW[tree.data]; temp0 _ treeData.Component.procs.CoerceComponents[treeData.Component, cComponent, tables]; END END; ComponentListmoreProdCheckAllNames: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: ComponentListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ComponentListmoreProdData _ NARROW[tree.data]; temp0 _ treeData.ComponentList.procs.CheckAllNames[treeData.ComponentList, treeData.Component.procs.CheckAllNames[treeData.Component, tables]]; END END; ComponentListmoreProdConstantToRope: PUBLIC PROC[ref: REF ANY, componentListType: ROPE, tables: TABLES] RETURNS[temp0: ROPE, temp1: TABLES] = BEGIN tree: ComponentListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ComponentListmoreProdData _ NARROW[tree.data]; BEGIN rest: ROPE; tables2: TABLES; first: ROPE; tables1: TABLES; [first, tables1] _ treeData.Component.procs.ConstantToRope[treeData.Component, componentListType, tables]; [rest, tables2] _ treeData.ComponentList.procs.ConstantToRope[treeData.ComponentList, componentListType, tables1]; temp1 _ tables2; temp0 _ Concat[first, rest]; END; END END; ComponentListmoreProdCoerceComponents: PUBLIC PROC[ref: REF ANY, cComponent: CComponent, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: ComponentListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ComponentListmoreProdData _ NARROW[tree.data]; BEGIN tables1: TABLES; tables1 _ treeData.Component.procs.CoerceComponents[treeData.Component, cComponent, tables]; temp0 _ treeData.ComponentList.procs.CoerceComponents[treeData.ComponentList, cComponent, tables1]; END; END END; ComponentProdCheckAllNames: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: ComponentNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ComponentProdData _ NARROW[tree.data]; temp0 _ treeData.NameList.procs.EmptyWorkTableOfNames[treeData.NameList, tables]; END END; ComponentProdConstantToRope: PUBLIC PROC[ref: REF ANY, componentListType: ROPE, tables: TABLES] RETURNS[temp0: ROPE, temp1: TABLES] = BEGIN tree: ComponentNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ComponentProdData _ NARROW[tree.data]; BEGIN value: ROPE; tables1: TABLES; componentType: ROPE; componentType _ treeData.NameList.procs.TypeOfNameList[treeData.NameList, componentListType, tables]; [value, tables1] _ treeData.Constant.procs.ConstantToRope[treeData.Constant, componentType, tables]; temp1 _ tables1; temp0 _ treeData.NameList.procs.NameListToRope[treeData.NameList, value]; END; END END; ComponentProdCoerceComponents: PUBLIC PROC[ref: REF ANY, cComponent: CComponent, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: ComponentNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: ComponentProdData _ NARROW[tree.data]; temp0 _ treeData.NameList.procs.CoerceComponentNameList[treeData.NameList, treeData.Constant, cComponent, tables]; END END; NameListemptyProdTypeOfNameList: PUBLIC PROC[ref: REF ANY, constantType: ROPE, tables: TABLES] RETURNS[temp0: ROPE] = BEGIN tree: NameListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ CopyRope[constantType]; END END; NameListemptyProdEmptyWorkTableOfNames: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: NameListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ CopyTables[tables]; END END; NameListemptyProdNameListToRope: PUBLIC PROC[ref: REF ANY, constantRope: ROPE] RETURNS[temp0: ROPE] = BEGIN tree: NameListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ ""; END END; NameListemptyProdCoerceComponentNameList: PUBLIC PROC[ref: REF ANY, constant: ConstantNode, cComponent: CComponent, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: NameListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ CopyTables[tables]; END END; NameListemptyProdCanonicaliseFieldsFromNameList: PUBLIC PROC[ref: REF ANY, cName: ROPE, cComponentArg: CComponent, tables: TABLES] RETURNS[temp0: CComponent, temp1: TABLES] = BEGIN tree: NameListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp1 _ CopyTables[tables]; temp0 _ MkNILCComponent[]; END END; NameListemptyProdCheckIfErrorNames: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: NameListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp0 _ CopyTables[tables]; END END; NameListoneProdTypeOfNameList: PUBLIC PROC[ref: REF ANY, constantType: ROPE, tables: TABLES] RETURNS[temp0: ROPE] = BEGIN tree: NameListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: NameListoneProdData _ NARROW[tree.data]; temp0 _ GetTypeOfComponent[treeData.identifier, constantType, tables]; END END; NameListoneProdEmptyWorkTableOfNames: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: NameListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: NameListoneProdData _ NARROW[tree.data]; temp0 _ Remove[treeData.identifier, tables]; END END; NameListoneProdNameListToRope: PUBLIC PROC[ref: REF ANY, constantRope: ROPE] RETURNS[temp0: ROPE] = BEGIN tree: NameListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: NameListoneProdData _ NARROW[tree.data]; temp0 _ Cat[CreateKey[treeData.identifier], " ", constantRope]; END END; NameListoneProdCoerceComponentNameList: PUBLIC PROC[ref: REF ANY, constant: ConstantNode, cComponent: CComponent, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: NameListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: NameListoneProdData _ NARROW[tree.data]; BEGIN cType: CType; ctypeName: ROPE; [cType, ctypeName] _ GetCType[treeData.identifier, cComponent, tables]; temp0 _ constant.procs.Coerce[constant, cType, ctypeName, tables]; END; END END; NameListoneProdCanonicaliseFieldsFromNameList: PUBLIC PROC[ref: REF ANY, cName: ROPE, cComponentArg: CComponent, tables: TABLES] RETURNS[temp0: CComponent, temp1: TABLES] = BEGIN tree: NameListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: NameListoneProdData _ NARROW[tree.data]; BEGIN cComponentres: CComponent; cComponentres _ MkCComponent[CreateKey[treeData.identifier], 0, cName, cComponentArg]; temp1 _ CopyTables[tables]; temp0 _ cComponentres; END; END END; NameListoneProdCheckIfErrorNames: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: NameListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: NameListoneProdData _ NARROW[tree.data]; temp0 _ InsureErrorType[treeData.identifier, tables]; END END; NameListmoreProdTypeOfNameList: PUBLIC PROC[ref: REF ANY, constantType: ROPE, tables: TABLES] RETURNS[temp0: ROPE] = BEGIN tree: NameListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: NameListmoreProdData _ NARROW[tree.data]; temp0 _ GetTypeOfComponent[treeData.identifier, constantType, tables]; END END; NameListmoreProdEmptyWorkTableOfNames: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: NameListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: NameListmoreProdData _ NARROW[tree.data]; temp0 _ treeData.NameList.procs.EmptyWorkTableOfNames[treeData.NameList, Remove[treeData.identifier, tables]]; END END; NameListmoreProdNameListToRope: PUBLIC PROC[ref: REF ANY, constantRope: ROPE] RETURNS[temp0: ROPE] = BEGIN tree: NameListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: NameListmoreProdData _ NARROW[tree.data]; BEGIN rest: ROPE; first: ROPE; first _ Cat[CreateKey[treeData.identifier], " ", constantRope]; rest _ treeData.NameList.procs.NameListToRope[treeData.NameList, constantRope]; temp0 _ Concat[first, rest]; END; END END; NameListmoreProdCoerceComponentNameList: PUBLIC PROC[ref: REF ANY, constant: ConstantNode, cComponent: CComponent, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: NameListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: NameListmoreProdData _ NARROW[tree.data]; BEGIN tables2: TABLES; tables1: TABLES; cType: CType; ctypeName: ROPE; [cType, ctypeName] _ GetCType[treeData.identifier, cComponent, tables]; tables1 _ constant.procs.Coerce[constant, cType, ctypeName, tables]; tables2 _ treeData.NameList.procs.CoerceComponentNameList[treeData.NameList, constant, cComponent, tables1]; temp0 _ tables2; END; END END; NameListmoreProdCanonicaliseFieldsFromNameList: PUBLIC PROC[ref: REF ANY, cName: ROPE, cComponentArg: CComponent, tables: TABLES] RETURNS[temp0: CComponent, temp1: TABLES] = BEGIN tree: NameListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: NameListmoreProdData _ NARROW[tree.data]; BEGIN cComponentres: CComponent; cComponent1: CComponent; tables1: TABLES; [cComponent1, tables1] _ treeData.NameList.procs.CanonicaliseFieldsFromNameList[treeData.NameList, cName, cComponentArg, tables]; cComponentres _ MkCComponent[CreateKey[treeData.identifier], 0, cName, cComponent1]; temp1 _ CopyTables[tables1]; temp0 _ cComponentres; END; END END; NameListmoreProdCheckIfErrorNames: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: TABLES] = BEGIN tree: NameListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: NameListmoreProdData _ NARROW[tree.data]; BEGIN tables1: TABLES; tables1 _ InsureErrorType[treeData.identifier, tables]; temp0 _ treeData.NameList.procs.CheckIfErrorNames[treeData.NameList, tables1]; END; END END; numberdecimalProdNumberToCard: PUBLIC PROC[ref: REF ANY] RETURNS[temp0: CARD] = BEGIN tree: numberNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: numberdecimalProdData _ NARROW[tree.data]; temp0 _ GetCardFromDecimal[treeData.numberD]; END END; numberdecimalProdGetCARDINAL: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: CARD, temp1: TABLES] = BEGIN tree: numberNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: numberdecimalProdData _ NARROW[tree.data]; temp1 _ CopyTables[tables]; temp0 _ GetCardFromDecimal[treeData.numberD]; END END; numberhexProdNumberToCard: PUBLIC PROC[ref: REF ANY] RETURNS[temp0: CARD] = BEGIN tree: numberNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: numberhexProdData _ NARROW[tree.data]; temp0 _ GetCardFromHex[treeData.numberH]; END END; numberhexProdGetCARDINAL: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: CARD, temp1: TABLES] = BEGIN tree: numberNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: numberhexProdData _ NARROW[tree.data]; temp1 _ CopyTables[tables]; temp0 _ GetCardFromHex[treeData.numberH]; END END; numberoctalProdNumberToCard: PUBLIC PROC[ref: REF ANY] RETURNS[temp0: CARD] = BEGIN tree: numberNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: numberoctalProdData _ NARROW[tree.data]; temp0 _ GetCardFromOctal[treeData.numberO]; END END; numberoctalProdGetCARDINAL: PUBLIC PROC[ref: REF ANY, tables: TABLES] RETURNS[temp0: CARD, temp1: TABLES] = BEGIN tree: numberNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: numberoctalProdData _ NARROW[tree.data]; temp1 _ CopyTables[tables]; temp0 _ GetCardFromOctal[treeData.numberO]; END END; END..