DIRECTORY
	ThreeC4BaseDecl1Def,
	Rope,
	ThreeC4Support,
	ThreeC4BaseDecl2Def,
	ThreeC4BasicAbTypesDef,
	ThreeC4OtherModItemsAbGramDef;

ThreeC4OtherModItemsImplImpl: CEDAR PROGRAM IMPORTS ThreeC4BaseDecl1Def, ThreeC4Support, ThreeC4BaseDecl2Def, ThreeC4BasicAbTypesDef EXPORTS ThreeC4OtherModItemsAbGramDef= 
BEGIN
OPEN ThreeC4BaseDecl1Def, Rope, ThreeC4Support, ThreeC4BaseDecl2Def, ThreeC4BasicAbTypesDef, ThreeC4OtherModItemsAbGramDef;
BaseItemsbaseTypesProdImplFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] =
BEGIN
tree: BaseItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: BaseItemsbaseTypesProdData ← NARROW[tree.data];
temp1 ← FakeUsageCopy[usage];
temp0 ← BuildEmptyCode[];
END
END;

BaseItemsbaseTypesProdDefFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] =
BEGIN
tree: BaseItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: BaseItemsbaseTypesProdData ← NARROW[tree.data];
temp1 ← FakeUsageCopy[usage];
temp0 ← treeData.IdList.procs.BaseDeclCode[treeData.IdList, context];
END
END;

BaseItemsbaseTypesProdCollectModuleFunctionTypes: PUBLIC PROC[ref: REF ANY, file: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] =
BEGIN
tree: BaseItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: BaseItemsbaseTypesProdData ← NARROW[tree.data];
temp0 ← FakeCopyContextForConditional[context];
END
END;

BaseItemsbaseTypesProdCollectModuleValueTypes: PUBLIC PROC[ref: REF ANY, file: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] =
BEGIN
tree: BaseItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: BaseItemsbaseTypesProdData ← NARROW[tree.data];
temp0 ← treeData.IdList.procs.RecordMultipleBaseTypes[treeData.IdList, file, context];
END
END;

BaseItemsenumBaseTypeProdImplFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] =
BEGIN
tree: BaseItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: BaseItemsenumBaseTypeProdData ← NARROW[tree.data];
temp1 ← FakeUsageCopy[usage];
temp0 ← BuildEmptyCode[];
END
END;

BaseItemsenumBaseTypeProdDefFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] =
BEGIN
tree: BaseItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: BaseItemsenumBaseTypeProdData ← NARROW[tree.data];
BEGIN
code: MesaCodeNode;
code ← RopeCode2["%g: TYPE = {%g};\N", IdFill[treeData.Identifier], CodeFill[BuildNameSeqArgCode[treeData.IdList.procs.FormNameList[treeData.IdList]]]];
temp1 ← FakeUsageCopy[usage];
temp0 ← code;
END;
END
END;

BaseItemsenumBaseTypeProdCollectModuleFunctionTypes: PUBLIC PROC[ref: REF ANY, file: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] =
BEGIN
tree: BaseItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: BaseItemsenumBaseTypeProdData ← NARROW[tree.data];
temp0 ← FakeCopyContextForConditional[context];
END
END;

BaseItemsenumBaseTypeProdCollectModuleValueTypes: PUBLIC PROC[ref: REF ANY, file: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] =
BEGIN
tree: BaseItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: BaseItemsenumBaseTypeProdData ← NARROW[tree.data];
BEGIN
name: NameNode;
names: NameListNode;
codeName: MesaCodeNode;
codeName ← RopeCode1["%g", IdFill[treeData.Identifier]];
names ← treeData.IdList.procs.FormNameList[treeData.IdList];
name ← BuildName[treeData.Identifier];
temp0 ← RecordEnumeratedBaseType[context, name, file, names, codeName];
END;
END
END;

BaseItemsbaseFcnProdImplFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] =
BEGIN
tree: BaseItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: BaseItemsbaseFcnProdData ← NARROW[tree.data];
temp1 ← FakeUsageCopy[usage];
temp0 ← BuildEmptyCode[];
END
END;

BaseItemsbaseFcnProdDefFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] =
BEGIN
tree: BaseItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: BaseItemsbaseFcnProdData ← NARROW[tree.data];
BEGIN
code: MesaCodeNode;
argsCode: MesaCodeNode;
argsCode1: MesaCodeNode;
use: UsageNode;
resultsCode: MesaCodeNode;
use1: UsageNode;
[resultsCode, use1] ← treeData.ModIdListresults.procs.FormTypesCode[treeData.ModIdListresults, context, usage];
[argsCode1, use] ← treeData.ModIdListargs.procs.FormTypesCode[treeData.ModIdListargs, context, use1];
IF TestEmptyCode[argsCode1] THEN {argsCode ← BuildEmptyCode[];
} ELSE {argsCode ← RopeCode1["[%g]", CodeFill[argsCode1]];
};
code ← RopeCode3["%g: PROC%g RETURNS[%g];\N\N", IdFill[treeData.Identifier], CodeFill[argsCode], CodeFill[resultsCode]];
temp1 ← use;
temp0 ← code;
END;
END
END;

BaseItemsbaseFcnProdCollectModuleFunctionTypes: PUBLIC PROC[ref: REF ANY, file: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] =
BEGIN
tree: BaseItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: BaseItemsbaseFcnProdData ← NARROW[tree.data];
BEGIN
argTypes: TypeListNode;
resultTypes: TypeListNode;
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];
resultTypes ← treeData.ModIdListresults.procs.FormTypeListEarly[treeData.ModIdListresults, context];
argTypes ← treeData.ModIdListargs.procs.FormTypeListEarly[treeData.ModIdListargs, context];
temp0 ← RecordBaseFcnDef[context, BuildName[treeData.Identifier], file, argTypes, resultTypes, fcnDefGraph];
END;
END
END;

BaseItemsbaseFcnProdCollectModuleValueTypes: PUBLIC PROC[ref: REF ANY, file: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] =
BEGIN
tree: BaseItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: BaseItemsbaseFcnProdData ← NARROW[tree.data];
temp0 ← FakeCopyContextForConditional[context];
END
END;

BaseItemstreeRecFcnProdImplFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] =
BEGIN
tree: BaseItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: BaseItemstreeRecFcnProdData ← NARROW[tree.data];
temp1 ← FakeUsageCopy[usage];
temp0 ← BuildEmptyCode[];
END
END;

BaseItemstreeRecFcnProdDefFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] =
BEGIN
tree: BaseItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: BaseItemstreeRecFcnProdData ← NARROW[tree.data];
BEGIN
code: MesaCodeNode;
argCode: MesaCodeNode;
use: UsageNode;
resultsCode: MesaCodeNode;
use1: UsageNode;
[resultsCode, use1] ← treeData.ModIdListresults.procs.FormTypesCode[treeData.ModIdListresults, context, usage];
[argCode, use] ← treeData.ModIdListargs.procs.FormTypesCode[treeData.ModIdListargs, context, use1];
code ← RopeCode3["%gProcType: TYPE = PROC[%g] RETURNS[%g];\N\N", IdFill[treeData.Identifier], CodeFill[argCode], CodeFill[resultsCode]];
temp1 ← use;
temp0 ← code;
END;
END
END;

BaseItemstreeRecFcnProdCollectModuleFunctionTypes: PUBLIC PROC[ref: REF ANY, file: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] =
BEGIN
tree: BaseItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: BaseItemstreeRecFcnProdData ← NARROW[tree.data];
BEGIN
check: BOOLEAN;
argTypes: TypeListNode;
resultTypes: TypeListNode;
procTypeName: NameNode;
fcnDefGraph: FcnDefGraphNode;
fcnDefGraph2: 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];
fcnDefGraph2 ← treeData.DamageShareAssertions.procs.FormRecordOfDamageShareAssertion[treeData.DamageShareAssertions, fcnDefGraph1];
fcnDefGraph ← PrepareRecFcnDefGraph[fcnDefGraph2];
procTypeName ← BuildRopeName[ConcatRopes2[RopeFromIdentifierNode[treeData.Identifier], "ProcType"]];
resultTypes ← treeData.ModIdListresults.procs.FormTypeListEarly[treeData.ModIdListresults, context];
argTypes ← treeData.ModIdListargs.procs.FormTypeListEarly[treeData.ModIdListargs, context];
check ← CheckForEqualTypeLists[BuildOneTypeList[GetFirstType[argTypes]], BuildOneTypeList[FindType[context, BuildRopeName["Tree"]]]];
temp0 ← RecordRecFcnDef[context, BuildName[treeData.Identifier], file, argTypes, resultTypes, fcnDefGraph];
END;
END
END;

BaseItemstreeRecFcnProdCollectModuleValueTypes: PUBLIC PROC[ref: REF ANY, file: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] =
BEGIN
tree: BaseItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: BaseItemstreeRecFcnProdData ← NARROW[tree.data];
temp0 ← FakeCopyContextForConditional[context];
END
END;

AbGramItemsabTypeProdImplFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] =
BEGIN
tree: AbGramItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: AbGramItemsabTypeProdData ← NARROW[tree.data];
temp1 ← FakeUsageCopy[usage];
temp0 ← BuildEmptyCode[];
END
END;

AbGramItemsabTypeProdDefFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] =
BEGIN
tree: AbGramItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: AbGramItemsabTypeProdData ← NARROW[tree.data];
BEGIN
code: MesaCodeNode;
header: MesaCodeNode;
nodeCode: MesaCodeNode;
nodeBodyCode: MesaCodeNode;
nodeProcsCode: MesaCodeNode;
nodeProcsBodyCode: MesaCodeNode;
typeCode: MesaCodeNode;
use1: UsageNode;
nameCode: MesaCodeNode;
name: NameNode;
name ← BuildName[treeData.Identifier];
nameCode ← GetTypeCodeName[LookUpType[context, name]];
[typeCode, use1] ← treeData.IdList.procs.ProcFieldTypeCode[treeData.IdList, context, usage];
nodeProcsBodyCode ← ConcatCode3[RopeCode1["%gProcsBody: TYPE = RECORD[\N", CodeFill[nameCode]], typeCode, RopeCode["];\N\N"]];
nodeProcsCode ← RopeCode2["%gProcs: TYPE = REF %gProcsBody;\N", CodeFill[nameCode], CodeFill[nameCode]];
nodeBodyCode ← ConcatCode4[RopeCode1["%gBody: TYPE = RECORD[\N", CodeFill[nameCode]], RopeCode["\Tposition: INT, length: INT,\N"], RopeCode1["\Tprocs: %gProcs,\N", CodeFill[nameCode]], RopeCode["\Tdata: REF ANY];\N\N"]];
nodeCode ← RopeCode2["%g: TYPE = REF %gBody;\N", CodeFill[nameCode], CodeFill[nameCode]];
header ← RopeCode1["\N--%g\N\N", IdFill[treeData.Identifier]];
code ← ConcatCode5[header, nodeCode, nodeBodyCode, nodeProcsCode, nodeProcsBodyCode];
temp1 ← use1;
temp0 ← code;
END;
END
END;

AbGramItemsabTypeProdCollectModuleFunctionTypes: PUBLIC PROC[ref: REF ANY, file: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] =
BEGIN
tree: AbGramItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: AbGramItemsabTypeProdData ← NARROW[tree.data];
temp0 ← FakeCopyContextForConditional[context];
END
END;

AbGramItemsabTypeProdCollectModuleValueTypes: PUBLIC PROC[ref: REF ANY, file: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] =
BEGIN
tree: AbGramItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: AbGramItemsabTypeProdData ← NARROW[tree.data];
BEGIN
name: NameNode;
codeName: MesaCodeNode;
nameList: NameListNode;
nameList ← treeData.IdList.procs.FormNameList[treeData.IdList];
codeName ← RopeCode1["%gNode", IdFill[treeData.Identifier]];
name ← BuildName[treeData.Identifier];
temp0 ← RecordAbstractType[context, name, file, codeName, treeData.IdList, nameList];
END;
END
END;

AbGramItemsabProdProdImplFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] =
BEGIN
tree: AbGramItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: AbGramItemsabProdProdData ← NARROW[tree.data];
BEGIN
code: MesaCodeNode;
use: UsageNode;
headerCode: MesaCodeNode;
procsImplCode: MesaCodeNode;
procsNamesCode: MesaCodeNode;
procNamesIdList: IdListNode;
buildImplCode: MesaCodeNode;
dataRcdCode: MesaCodeNode;
dataRefCode: MesaCodeNode;
nameSeqArgCode: MesaCodeNode;
typeNameCode: MesaCodeNode;
use1: UsageNode;
use0: UsageNode;
typeName: NameNode;
prodNameCode: MesaCodeNode;
prodName: NameNode;
prodName ← treeData.ModId.procs.FormName[treeData.ModId];
prodNameCode ← RopeCode1["%gProd", NameFill[prodName]];
typeName ← BuildName[treeData.ModId.procs.FormFirstId[treeData.ModId]];
use0 ← RecordAbstProdUse[usage, prodName, Use.import, context];
use1 ← RecordAbstProdUse[use0, prodName, Use.export, context];
typeNameCode ← GetTypeCodeName[LookUpType[context, typeName]];
nameSeqArgCode ← BuildNameSeqArgCode[treeData.ModIdList.procs.FormNameList[treeData.ModIdList]];
IF TestEmptyCode[nameSeqArgCode] THEN {dataRefCode ← RopeCode["NIL"];
} ELSE {dataRefCode ← RopeCode["data"];
};
IF TestEmptyCode[nameSeqArgCode] THEN {dataRcdCode ← BuildEmptyCode[];
} ELSE {dataRcdCode ← ConcatCode3[RopeCode1["\T\Tdata: %gData ←\N", CodeFill[prodNameCode]], RopeCode1["\T\T\TNEW[%gDataBody←[\N", CodeFill[prodNameCode]], RopeCode1["\T\T\T%g]];\N", CodeFill[nameSeqArgCode]]];
};
buildImplCode ← ConcatCode6[RopeCode2["Build%gNode: PUBLIC PROC[position: INT, length: INT%g]\N", CodeFill[prodNameCode], CodeFill[treeData.ModIdList.procs.DataBodyFieldTypeCode[treeData.ModIdList, context]]], RopeCode1["\TRETURNS[%g] =\N", CodeFill[typeNameCode]], RopeCode["\T\TBEGIN\N"], dataRcdCode, RopeCode3["\T\TRETURN[NEW[%gBody←[position, length, %gProcs, %g]]];\N", CodeFill[typeNameCode], CodeFill[prodNameCode], CodeFill[dataRefCode]], RopeCode["\T\TEND;\N\N"]];
procNamesIdList ← LookUpAbTypeRecFcnsIdList[context, typeName];
procsNamesCode ← procNamesIdList.procs.FormProcsNamesCode[procNamesIdList, prodNameCode];
procsImplCode ← ConcatCode4[RopeCode2["%gProcs: PUBLIC %gProcs ←\N", CodeFill[prodNameCode], CodeFill[typeNameCode]], RopeCode1["\TNEW[%gProcsBody ← [", CodeFill[typeNameCode]], procsNamesCode, RopeCode["]];\N\N"]];
headerCode ← RopeCode1["\N-- %g\N\N", CodeFill[prodNameCode]];
use ← treeData.ModIdList.procs.FormTypeUse[treeData.ModIdList, use1, context];
code ← ConcatCode3[headerCode, procsImplCode, buildImplCode];
temp1 ← use;
temp0 ← code;
END;
END
END;

AbGramItemsabProdProdDefFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] =
BEGIN
tree: AbGramItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: AbGramItemsabProdProdData ← NARROW[tree.data];
BEGIN
code: MesaCodeNode;
use: UsageNode;
headerCode: MesaCodeNode;
dataTypeCode: MesaCodeNode;
argNameCode: MesaCodeNode;
fieldNames: NameListNode;
fieldTypes: TypeListNode;
procsCode: MesaCodeNode;
buildCode: MesaCodeNode;
typeNameCode: MesaCodeNode;
code1: MesaCodeNode;
use1: UsageNode;
temp2: IdListNode;
typeName: NameNode;
prodNameCode: MesaCodeNode;
prodNameCode ← RopeCode1["%gProd", NameFill[treeData.ModId.procs.FormName[treeData.ModId]]];
typeName ← BuildName[treeData.ModId.procs.FormFirstId[treeData.ModId]];
temp2 ← LookUpAbTypeRecFcnsIdList[context, typeName];
[code1, use1] ← temp2.procs.FormRecFcnsDeclCode[temp2, prodNameCode, context, usage];
typeNameCode ← GetTypeCodeName[LookUpType[context, typeName]];
buildCode ← ConcatCode2[RopeCode2["Build%gNode: PROC[position: INT, length: INT%g]\N", CodeFill[prodNameCode], CodeFill[treeData.ModIdList.procs.DataBodyFieldTypeCode[treeData.ModIdList, context]]], RopeCode1["\TRETURNS[%g];\N\N", CodeFill[typeNameCode]]];
procsCode ← RopeCode2["%gProcs: %gProcs;\N\N", CodeFill[prodNameCode], CodeFill[typeNameCode]];
fieldTypes ← treeData.ModIdList.procs.FormTypeList[treeData.ModIdList, context];
fieldNames ← treeData.ModIdList.procs.FormNameList[treeData.ModIdList];
argNameCode ← BuildArgNameTypeCode[fieldNames, fieldTypes];
dataTypeCode ← ConcatCode2[RopeCode2["%gData: TYPE = REF %gDataBody;\N", CodeFill[prodNameCode], CodeFill[prodNameCode]], ConcatCode3[RopeCode1["%gDataBody: TYPE = RECORD[\N", CodeFill[prodNameCode]], argNameCode, RopeCode["];\N\N"]]];
headerCode ← RopeCode1["\N-- %g\N\N", CodeFill[prodNameCode]];
use ← treeData.ModIdList.procs.FormTypeUse[treeData.ModIdList, use1, context];
code ← ConcatCode5[headerCode, dataTypeCode, procsCode, buildCode, code1];
temp1 ← use;
temp0 ← code;
END;
END
END;

AbGramItemsabProdProdCollectModuleFunctionTypes: PUBLIC PROC[ref: REF ANY, file: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] =
BEGIN
tree: AbGramItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: AbGramItemsabProdProdData ← NARROW[tree.data];
temp0 ← FakeCopyContextForConditional[context];
END
END;

AbGramItemsabProdProdCollectModuleValueTypes: PUBLIC PROC[ref: REF ANY, file: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] =
BEGIN
tree: AbGramItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: AbGramItemsabProdProdData ← NARROW[tree.data];
BEGIN
name: NameNode;
rightSideList: NameListNode;
prodContext: LockedContextNode;
prodContext ← LockContext[treeData.ModIdList.procs.FormAbstRightSideContext[treeData.ModIdList, BuildEmptyContext[]]];
rightSideList ← treeData.ModIdList.procs.FormNameList[treeData.ModIdList];
name ← treeData.ModId.procs.FormName[treeData.ModId];
temp0 ← RecordAbstractProduction[context, name, file, rightSideList, prodContext];
END;
END
END;

AbGramItemsabProdFcnImplProdImplFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] =
BEGIN
tree: AbGramItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: AbGramItemsabProdFcnImplProdData ← NARROW[tree.data];
[temp0, temp1] ← treeData.AbProductionFcnImpl.procs.ImplFileCode[treeData.AbProductionFcnImpl, context, usage];
END
END;

AbGramItemsabProdFcnImplProdDefFileCode: PUBLIC PROC[ref: REF ANY, context: LookupContextNode, usage: UsageNode] RETURNS[temp0: MesaCodeNode, temp1: UsageNode] =
BEGIN
tree: AbGramItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: AbGramItemsabProdFcnImplProdData ← NARROW[tree.data];
temp1 ← FakeUsageCopy[usage];
temp0 ← BuildEmptyCode[];
END
END;

AbGramItemsabProdFcnImplProdCollectModuleFunctionTypes: PUBLIC PROC[ref: REF ANY, file: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] =
BEGIN
tree: AbGramItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: AbGramItemsabProdFcnImplProdData ← NARROW[tree.data];
temp0 ← FakeCopyContextForConditional[context];
END
END;

AbGramItemsabProdFcnImplProdCollectModuleValueTypes: PUBLIC PROC[ref: REF ANY, file: ROPE, context: ContextNode] RETURNS[temp0: ContextNode] =
BEGIN
tree: AbGramItemsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: AbGramItemsabProdFcnImplProdData ← NARROW[tree.data];
temp0 ← FakeCopyContextForConditional[context];
END
END;

END..