DIRECTORY
	ThreeC4BaseDecl1Def,
	ThreeC4RecFcnDeclDef,
	ThreeC4BasicAbTypesDef,
	ThreeC4BaseDecl2Def;

ThreeC4RootAbGramDef: CEDAR DEFINITIONS = 
BEGIN
OPEN ThreeC4BaseDecl1Def, ThreeC4RecFcnDeclDef, ThreeC4BasicAbTypesDef, ThreeC4BaseDecl2Def;
InspectContext: PROC[LookupContextNode] RETURNS[BOOLEAN];


--MainGoal

MainGoalNode: TYPE = REF MainGoalNodeBody;
MainGoalNodeBody: TYPE = RECORD[
	position: INT, length: INT,
	procs: MainGoalNodeProcs,
	data: REF ANY];

MainGoalNodeProcs: TYPE = REF MainGoalNodeProcsBody;
MainGoalNodeProcsBody: TYPE = RECORD[

	FormFileSeq: FormFileSeqProcType];


-- MainGoalProd

MainGoalProdData: TYPE = REF MainGoalProdDataBody;
MainGoalProdDataBody: TYPE = RECORD[
WholeFile: WholeFileNode];

MainGoalProdProcs: MainGoalNodeProcs;

BuildMainGoalProdNode: PROC[position: INT, length: INT, WholeFile: WholeFileNode]
	RETURNS[MainGoalNode];

MainGoalProdFormFileSeq: FormFileSeqProcType;

-- WholeFileProd

WholeFileProdData: TYPE = REF WholeFileProdDataBody;
WholeFileProdDataBody: TYPE = RECORD[
IncludeClause: IncludeClauseNode, ModuleList: ModuleListNode];

WholeFileProdProcs: WholeFileNodeProcs;

BuildWholeFileProdNode: PROC[position: INT, length: INT, IncludeClause: IncludeClauseNode, ModuleList: ModuleListNode]
	RETURNS[WholeFileNode];

WholeFileProdFormFileSeq: FormFileSeqProcType;
WholeFileProdCollectValueTypes: CollectValueTypesProcType;
WholeFileProdCollectFunctionTypes: CollectFunctionTypesProcType;
WholeFileProdCollectRightSideSymbols: CollectRightSideSymbolsProcType;
WholeFileProdFormLinkCallCode: FormLinkCallCodeProcType;
WholeFileProdSyntaxFileCodes: SyntaxFileCodesProcType;

--IncludeClause

IncludeClauseNode: TYPE = REF IncludeClauseNodeBody;
IncludeClauseNodeBody: TYPE = RECORD[
	position: INT, length: INT,
	procs: IncludeClauseNodeProcs,
	data: REF ANY];

IncludeClauseNodeProcs: TYPE = REF IncludeClauseNodeProcsBody;
IncludeClauseNodeProcsBody: TYPE = RECORD[

	CollectValueTypes: CollectValueTypesProcType, 
	CollectFunctionTypes: CollectFunctionTypesProcType, 
	CollectRightSideSymbols: CollectRightSideSymbolsProcType, 
	FormLinkCallCode: FormLinkCallCodeProcType, 
	SyntaxFileCodes: SyntaxFileCodesProcType];


-- IncludeClauseProd

IncludeClauseProdData: TYPE = REF IncludeClauseProdDataBody;
IncludeClauseProdDataBody: TYPE = RECORD[
IdList: IdListNode];

IncludeClauseProdProcs: IncludeClauseNodeProcs;

BuildIncludeClauseProdNode: PROC[position: INT, length: INT, IdList: IdListNode]
	RETURNS[IncludeClauseNode];

IncludeClauseProdCollectValueTypes: CollectValueTypesProcType;
IncludeClauseProdCollectFunctionTypes: CollectFunctionTypesProcType;
IncludeClauseProdCollectRightSideSymbols: CollectRightSideSymbolsProcType;
IncludeClauseProdFormLinkCallCode: FormLinkCallCodeProcType;
IncludeClauseProdSyntaxFileCodes: SyntaxFileCodesProcType;

--ModuleList

ModuleListNode: TYPE = REF ModuleListNodeBody;
ModuleListNodeBody: TYPE = RECORD[
	position: INT, length: INT,
	procs: ModuleListNodeProcs,
	data: REF ANY];

ModuleListNodeProcs: TYPE = REF ModuleListNodeProcsBody;
ModuleListNodeProcsBody: TYPE = RECORD[

	CollectValueTypes: CollectValueTypesProcType, 
	CollectFunctionTypes: CollectFunctionTypesProcType, 
	CollectProductions: CollectProductionsProcType, 
	CollectRightSideSymbols: CollectRightSideSymbolsProcType, 
	SyntaxFileCodes: SyntaxFileCodesProcType, 
	MakeFileSeq: MakeFileSeqProcType, 
	TestFormControlFile: TestFormControlFileProcType, 
	FormLinkCallCode: FormLinkCallCodeProcType, 
	FormControlFileList: FormControlFileListProcType];


-- ModuleListOneProd

ModuleListOneProdData: TYPE = REF ModuleListOneProdDataBody;
ModuleListOneProdDataBody: TYPE = RECORD[
ModuleBody: ModuleBodyNode];

ModuleListOneProdProcs: ModuleListNodeProcs;

BuildModuleListOneProdNode: PROC[position: INT, length: INT, ModuleBody: ModuleBodyNode]
	RETURNS[ModuleListNode];

ModuleListOneProdCollectValueTypes: CollectValueTypesProcType;
ModuleListOneProdCollectFunctionTypes: CollectFunctionTypesProcType;
ModuleListOneProdCollectProductions: CollectProductionsProcType;
ModuleListOneProdCollectRightSideSymbols: CollectRightSideSymbolsProcType;
ModuleListOneProdSyntaxFileCodes: SyntaxFileCodesProcType;
ModuleListOneProdMakeFileSeq: MakeFileSeqProcType;
ModuleListOneProdTestFormControlFile: TestFormControlFileProcType;
ModuleListOneProdFormLinkCallCode: FormLinkCallCodeProcType;
ModuleListOneProdFormControlFileList: FormControlFileListProcType;

-- ModuleListManyProd

ModuleListManyProdData: TYPE = REF ModuleListManyProdDataBody;
ModuleListManyProdDataBody: TYPE = RECORD[
ModuleList: ModuleListNode, ModuleBody: ModuleBodyNode];

ModuleListManyProdProcs: ModuleListNodeProcs;

BuildModuleListManyProdNode: PROC[position: INT, length: INT, ModuleList: ModuleListNode, ModuleBody: ModuleBodyNode]
	RETURNS[ModuleListNode];

ModuleListManyProdCollectValueTypes: CollectValueTypesProcType;
ModuleListManyProdCollectFunctionTypes: CollectFunctionTypesProcType;
ModuleListManyProdCollectProductions: CollectProductionsProcType;
ModuleListManyProdCollectRightSideSymbols: CollectRightSideSymbolsProcType;
ModuleListManyProdSyntaxFileCodes: SyntaxFileCodesProcType;
ModuleListManyProdMakeFileSeq: MakeFileSeqProcType;
ModuleListManyProdTestFormControlFile: TestFormControlFileProcType;
ModuleListManyProdFormLinkCallCode: FormLinkCallCodeProcType;
ModuleListManyProdFormControlFileList: FormControlFileListProcType;

--ModuleBody

ModuleBodyNode: TYPE = REF ModuleBodyNodeBody;
ModuleBodyNodeBody: TYPE = RECORD[
	position: INT, length: INT,
	procs: ModuleBodyNodeProcs,
	data: REF ANY];

ModuleBodyNodeProcs: TYPE = REF ModuleBodyNodeProcsBody;
ModuleBodyNodeProcsBody: TYPE = RECORD[

	CollectValueTypes: CollectValueTypesProcType, 
	CollectFunctionTypes: CollectFunctionTypesProcType, 
	CollectProductions: CollectProductionsProcType, 
	CollectRightSideSymbols: CollectRightSideSymbolsProcType, 
	SyntaxFileCodes: SyntaxFileCodesProcType, 
	MakeFileSeq: MakeFileSeqProcType, 
	TestFormControlFile: TestFormControlFileProcType, 
	FormLinkCallCode: FormLinkCallCodeProcType, 
	FormControlFileList: FormControlFileListProcType];


-- ModuleBodycontrolProd

ModuleBodycontrolProdData: TYPE = REF ModuleBodycontrolProdDataBody;
ModuleBodycontrolProdDataBody: TYPE = RECORD[
Identifier: IdentifierNode];

ModuleBodycontrolProdProcs: ModuleBodyNodeProcs;

BuildModuleBodycontrolProdNode: PROC[position: INT, length: INT, Identifier: IdentifierNode]
	RETURNS[ModuleBodyNode];

ModuleBodycontrolProdCollectValueTypes: CollectValueTypesProcType;
ModuleBodycontrolProdCollectFunctionTypes: CollectFunctionTypesProcType;
ModuleBodycontrolProdCollectProductions: CollectProductionsProcType;
ModuleBodycontrolProdCollectRightSideSymbols: CollectRightSideSymbolsProcType;
ModuleBodycontrolProdSyntaxFileCodes: SyntaxFileCodesProcType;
ModuleBodycontrolProdMakeFileSeq: MakeFileSeqProcType;
ModuleBodycontrolProdTestFormControlFile: TestFormControlFileProcType;
ModuleBodycontrolProdFormLinkCallCode: FormLinkCallCodeProcType;
ModuleBodycontrolProdFormControlFileList: FormControlFileListProcType;

-- ModuleBodynormalProd

ModuleBodynormalProdData: TYPE = REF ModuleBodynormalProdDataBody;
ModuleBodynormalProdDataBody: TYPE = RECORD[
Identifier: IdentifierNode, ModuleItemList: ModuleItemListNode];

ModuleBodynormalProdProcs: ModuleBodyNodeProcs;

BuildModuleBodynormalProdNode: PROC[position: INT, length: INT, Identifier: IdentifierNode, ModuleItemList: ModuleItemListNode]
	RETURNS[ModuleBodyNode];

ModuleBodynormalProdCollectValueTypes: CollectValueTypesProcType;
ModuleBodynormalProdCollectFunctionTypes: CollectFunctionTypesProcType;
ModuleBodynormalProdCollectProductions: CollectProductionsProcType;
ModuleBodynormalProdCollectRightSideSymbols: CollectRightSideSymbolsProcType;
ModuleBodynormalProdSyntaxFileCodes: SyntaxFileCodesProcType;
ModuleBodynormalProdMakeFileSeq: MakeFileSeqProcType;
ModuleBodynormalProdTestFormControlFile: TestFormControlFileProcType;
ModuleBodynormalProdFormLinkCallCode: FormLinkCallCodeProcType;
ModuleBodynormalProdFormControlFileList: FormControlFileListProcType;

--ModuleItemList

ModuleItemListNode: TYPE = REF ModuleItemListNodeBody;
ModuleItemListNodeBody: TYPE = RECORD[
	position: INT, length: INT,
	procs: ModuleItemListNodeProcs,
	data: REF ANY];

ModuleItemListNodeProcs: TYPE = REF ModuleItemListNodeProcsBody;
ModuleItemListNodeProcsBody: TYPE = RECORD[

	CollectModuleValueTypes: CollectModuleValueTypesProcType, 
	CollectModuleFunctionTypes: CollectModuleFunctionTypesProcType, 
	CollectProductions: CollectProductionsProcType, 
	CollectRightSideSymbols: CollectRightSideSymbolsProcType, 
	DefFileCode: DefFileCodeProcType, 
	ImplFileCode: ImplFileCodeProcType, 
	LinkFileCode: LinkFileCodeProcType, 
	SyntaxFileCodes: SyntaxFileCodesProcType, 
	TestLinkPresent: TestLinkPresentProcType];


-- ModuleItemListOneProd

ModuleItemListOneProdData: TYPE = REF ModuleItemListOneProdDataBody;
ModuleItemListOneProdDataBody: TYPE = RECORD[
ModuleItem: ModuleItemNode];

ModuleItemListOneProdProcs: ModuleItemListNodeProcs;

BuildModuleItemListOneProdNode: PROC[position: INT, length: INT, ModuleItem: ModuleItemNode]
	RETURNS[ModuleItemListNode];

ModuleItemListOneProdCollectModuleValueTypes: CollectModuleValueTypesProcType;
ModuleItemListOneProdCollectModuleFunctionTypes: CollectModuleFunctionTypesProcType;
ModuleItemListOneProdCollectProductions: CollectProductionsProcType;
ModuleItemListOneProdCollectRightSideSymbols: CollectRightSideSymbolsProcType;
ModuleItemListOneProdDefFileCode: DefFileCodeProcType;
ModuleItemListOneProdImplFileCode: ImplFileCodeProcType;
ModuleItemListOneProdLinkFileCode: LinkFileCodeProcType;
ModuleItemListOneProdSyntaxFileCodes: SyntaxFileCodesProcType;
ModuleItemListOneProdTestLinkPresent: TestLinkPresentProcType;

-- ModuleItemListManyProd

ModuleItemListManyProdData: TYPE = REF ModuleItemListManyProdDataBody;
ModuleItemListManyProdDataBody: TYPE = RECORD[
ModuleItemList: ModuleItemListNode, ModuleItem: ModuleItemNode];

ModuleItemListManyProdProcs: ModuleItemListNodeProcs;

BuildModuleItemListManyProdNode: PROC[position: INT, length: INT, ModuleItemList: ModuleItemListNode, ModuleItem: ModuleItemNode]
	RETURNS[ModuleItemListNode];

ModuleItemListManyProdCollectModuleValueTypes: CollectModuleValueTypesProcType;
ModuleItemListManyProdCollectModuleFunctionTypes: CollectModuleFunctionTypesProcType;
ModuleItemListManyProdCollectProductions: CollectProductionsProcType;
ModuleItemListManyProdCollectRightSideSymbols: CollectRightSideSymbolsProcType;
ModuleItemListManyProdDefFileCode: DefFileCodeProcType;
ModuleItemListManyProdImplFileCode: ImplFileCodeProcType;
ModuleItemListManyProdLinkFileCode: LinkFileCodeProcType;
ModuleItemListManyProdSyntaxFileCodes: SyntaxFileCodesProcType;
ModuleItemListManyProdTestLinkPresent: TestLinkPresentProcType;
END..