-- ThreeC4RootAbGram.ThreeC4
-- Sturgis, May 7, 1986 4:55:36 pm PDT
Include[ThreeC4BaseDecl, ThreeC4RecFcnDecl, ThreeC4BasicAbTypes];
ThreeC4RootAbGram: Module =
Begin
-- this declaration should move to BaseDecl
InspectContext: BaseFunction[LookupContext] Returns[BOOLEAN];
-- Here are the root abstract types and productions.
-- (WholeFile is declared in BasicAbTypes)
MainGoal: AbstractType[FormFileSeq];
MainGoal: AbstractProduction[WholeFile];
WholeFile: AbstractProduction[IncludeClause, ModuleList];
IncludeClause: AbstractType[CollectValueTypes, CollectFunctionTypes,
CollectRightSideSymbols, FormLinkCallCode, SyntaxFileCodes];
IncludeClause: AbstractProduction[IdList];
-- next, the structure within a single file.
ModuleList: AbstractType[CollectValueTypes, CollectFunctionTypes, CollectProductions, CollectRightSideSymbols, SyntaxFileCodes, MakeFileSeq, TestFormControlFile, FormLinkCallCode, FormControlFileList];
ModuleList.One: AbstractProduction[ModuleBody];
ModuleList.Many: AbstractProduction[ModuleList, ModuleBody];
ModuleBody: AbstractType[CollectValueTypes, CollectFunctionTypes, CollectProductions, CollectRightSideSymbols, SyntaxFileCodes, MakeFileSeq, TestFormControlFile, FormLinkCallCode, FormControlFileList];
ModuleBody.control: AbstractProduction[Identifier];
ModuleBody.normal: AbstractProduction[Identifier, ModuleItemList];
ModuleItemList: AbstractType[CollectModuleValueTypes, CollectModuleFunctionTypes,
CollectProductions, CollectRightSideSymbols, DefFileCode, ImplFileCode,
LinkFileCode, SyntaxFileCodes, TestLinkPresent];
ModuleItemList.One: AbstractProduction[ModuleItem];
ModuleItemList.Many: AbstractProduction[ModuleItemList, ModuleItem]
End.