DIRECTORY
	ThreeC4BaseDecl1Def,
	ThreeC4RootAbGramDef,
	ThreeC4BasicAbTypesDef;

ThreeC4RootAbGramImpl: CEDAR PROGRAM IMPORTS ThreeC4RootAbGramDef EXPORTS ThreeC4RootAbGramDef= 
BEGIN
OPEN ThreeC4BaseDecl1Def, ThreeC4RootAbGramDef, ThreeC4BasicAbTypesDef;

-- MainGoalProd

MainGoalProdProcs: PUBLIC MainGoalNodeProcs ←
	NEW[MainGoalNodeProcsBody ← [MainGoalProdFormFileSeq]];

BuildMainGoalProdNode: PUBLIC PROC[position: INT, length: INT, WholeFile: WholeFileNode]
	RETURNS[MainGoalNode] =
		BEGIN
		data: MainGoalProdData ←
			NEW[MainGoalProdDataBody←[
			WholeFile]];
		RETURN[NEW[MainGoalNodeBody←[position, length, MainGoalProdProcs, data]]];
		END;


-- WholeFileProd

WholeFileProdProcs: PUBLIC WholeFileNodeProcs ←
	NEW[WholeFileNodeProcsBody ← [WholeFileProdFormFileSeq, WholeFileProdCollectValueTypes, WholeFileProdCollectFunctionTypes, WholeFileProdCollectRightSideSymbols, WholeFileProdFormLinkCallCode, WholeFileProdSyntaxFileCodes]];

BuildWholeFileProdNode: PUBLIC PROC[position: INT, length: INT, IncludeClause: IncludeClauseNode, ModuleList: ModuleListNode]
	RETURNS[WholeFileNode] =
		BEGIN
		data: WholeFileProdData ←
			NEW[WholeFileProdDataBody←[
			IncludeClause, ModuleList]];
		RETURN[NEW[WholeFileNodeBody←[position, length, WholeFileProdProcs, data]]];
		END;


-- IncludeClauseProd

IncludeClauseProdProcs: PUBLIC IncludeClauseNodeProcs ←
	NEW[IncludeClauseNodeProcsBody ← [IncludeClauseProdCollectValueTypes, IncludeClauseProdCollectFunctionTypes, IncludeClauseProdCollectRightSideSymbols, IncludeClauseProdFormLinkCallCode, IncludeClauseProdSyntaxFileCodes]];

BuildIncludeClauseProdNode: PUBLIC PROC[position: INT, length: INT, IdList: IdListNode]
	RETURNS[IncludeClauseNode] =
		BEGIN
		data: IncludeClauseProdData ←
			NEW[IncludeClauseProdDataBody←[
			IdList]];
		RETURN[NEW[IncludeClauseNodeBody←[position, length, IncludeClauseProdProcs, data]]];
		END;


-- ModuleListOneProd

ModuleListOneProdProcs: PUBLIC ModuleListNodeProcs ←
	NEW[ModuleListNodeProcsBody ← [ModuleListOneProdCollectValueTypes, ModuleListOneProdCollectFunctionTypes, ModuleListOneProdCollectProductions, ModuleListOneProdCollectRightSideSymbols, ModuleListOneProdSyntaxFileCodes, ModuleListOneProdMakeFileSeq, ModuleListOneProdTestFormControlFile, ModuleListOneProdFormLinkCallCode, ModuleListOneProdFormControlFileList]];

BuildModuleListOneProdNode: PUBLIC PROC[position: INT, length: INT, ModuleBody: ModuleBodyNode]
	RETURNS[ModuleListNode] =
		BEGIN
		data: ModuleListOneProdData ←
			NEW[ModuleListOneProdDataBody←[
			ModuleBody]];
		RETURN[NEW[ModuleListNodeBody←[position, length, ModuleListOneProdProcs, data]]];
		END;


-- ModuleListManyProd

ModuleListManyProdProcs: PUBLIC ModuleListNodeProcs ←
	NEW[ModuleListNodeProcsBody ← [ModuleListManyProdCollectValueTypes, ModuleListManyProdCollectFunctionTypes, ModuleListManyProdCollectProductions, ModuleListManyProdCollectRightSideSymbols, ModuleListManyProdSyntaxFileCodes, ModuleListManyProdMakeFileSeq, ModuleListManyProdTestFormControlFile, ModuleListManyProdFormLinkCallCode, ModuleListManyProdFormControlFileList]];

BuildModuleListManyProdNode: PUBLIC PROC[position: INT, length: INT, ModuleList: ModuleListNode, ModuleBody: ModuleBodyNode]
	RETURNS[ModuleListNode] =
		BEGIN
		data: ModuleListManyProdData ←
			NEW[ModuleListManyProdDataBody←[
			ModuleList, ModuleBody]];
		RETURN[NEW[ModuleListNodeBody←[position, length, ModuleListManyProdProcs, data]]];
		END;


-- ModuleBodycontrolProd

ModuleBodycontrolProdProcs: PUBLIC ModuleBodyNodeProcs ←
	NEW[ModuleBodyNodeProcsBody ← [ModuleBodycontrolProdCollectValueTypes, ModuleBodycontrolProdCollectFunctionTypes, ModuleBodycontrolProdCollectProductions, ModuleBodycontrolProdCollectRightSideSymbols, ModuleBodycontrolProdSyntaxFileCodes, ModuleBodycontrolProdMakeFileSeq, ModuleBodycontrolProdTestFormControlFile, ModuleBodycontrolProdFormLinkCallCode, ModuleBodycontrolProdFormControlFileList]];

BuildModuleBodycontrolProdNode: PUBLIC PROC[position: INT, length: INT, Identifier: IdentifierNode]
	RETURNS[ModuleBodyNode] =
		BEGIN
		data: ModuleBodycontrolProdData ←
			NEW[ModuleBodycontrolProdDataBody←[
			Identifier]];
		RETURN[NEW[ModuleBodyNodeBody←[position, length, ModuleBodycontrolProdProcs, data]]];
		END;


-- ModuleBodynormalProd

ModuleBodynormalProdProcs: PUBLIC ModuleBodyNodeProcs ←
	NEW[ModuleBodyNodeProcsBody ← [ModuleBodynormalProdCollectValueTypes, ModuleBodynormalProdCollectFunctionTypes, ModuleBodynormalProdCollectProductions, ModuleBodynormalProdCollectRightSideSymbols, ModuleBodynormalProdSyntaxFileCodes, ModuleBodynormalProdMakeFileSeq, ModuleBodynormalProdTestFormControlFile, ModuleBodynormalProdFormLinkCallCode, ModuleBodynormalProdFormControlFileList]];

BuildModuleBodynormalProdNode: PUBLIC PROC[position: INT, length: INT, Identifier: IdentifierNode, ModuleItemList: ModuleItemListNode]
	RETURNS[ModuleBodyNode] =
		BEGIN
		data: ModuleBodynormalProdData ←
			NEW[ModuleBodynormalProdDataBody←[
			Identifier, ModuleItemList]];
		RETURN[NEW[ModuleBodyNodeBody←[position, length, ModuleBodynormalProdProcs, data]]];
		END;


-- ModuleItemListOneProd

ModuleItemListOneProdProcs: PUBLIC ModuleItemListNodeProcs ←
	NEW[ModuleItemListNodeProcsBody ← [ModuleItemListOneProdCollectModuleValueTypes, ModuleItemListOneProdCollectModuleFunctionTypes, ModuleItemListOneProdCollectProductions, ModuleItemListOneProdCollectRightSideSymbols, ModuleItemListOneProdDefFileCode, ModuleItemListOneProdImplFileCode, ModuleItemListOneProdLinkFileCode, ModuleItemListOneProdSyntaxFileCodes, ModuleItemListOneProdTestLinkPresent]];

BuildModuleItemListOneProdNode: PUBLIC PROC[position: INT, length: INT, ModuleItem: ModuleItemNode]
	RETURNS[ModuleItemListNode] =
		BEGIN
		data: ModuleItemListOneProdData ←
			NEW[ModuleItemListOneProdDataBody←[
			ModuleItem]];
		RETURN[NEW[ModuleItemListNodeBody←[position, length, ModuleItemListOneProdProcs, data]]];
		END;


-- ModuleItemListManyProd

ModuleItemListManyProdProcs: PUBLIC ModuleItemListNodeProcs ←
	NEW[ModuleItemListNodeProcsBody ← [ModuleItemListManyProdCollectModuleValueTypes, ModuleItemListManyProdCollectModuleFunctionTypes, ModuleItemListManyProdCollectProductions, ModuleItemListManyProdCollectRightSideSymbols, ModuleItemListManyProdDefFileCode, ModuleItemListManyProdImplFileCode, ModuleItemListManyProdLinkFileCode, ModuleItemListManyProdSyntaxFileCodes, ModuleItemListManyProdTestLinkPresent]];

BuildModuleItemListManyProdNode: PUBLIC PROC[position: INT, length: INT, ModuleItemList: ModuleItemListNode, ModuleItem: ModuleItemNode]
	RETURNS[ModuleItemListNode] =
		BEGIN
		data: ModuleItemListManyProdData ←
			NEW[ModuleItemListManyProdDataBody←[
			ModuleItemList, ModuleItem]];
		RETURN[NEW[ModuleItemListNodeBody←[position, length, ModuleItemListManyProdProcs, data]]];
		END;

END..