Begin
{ "Include" "Module" "Control" "Begin" "End" }: SimpleTokens;
{ ":" "=" "[" "]" "," "←" "." "{" "}" ";" }: SimpleTokens;
{ "CedarType" "CedarFunction" "AbstractType" "From" }: SimpleTokens;
{ "BaseType" "EnumeratedBaseType" "BaseFunction" }: SimpleTokens;
{ "AbstractProduction" "TreeRecursiveFunction" }: SimpleTokens;
{ "Returns" "CedarEnumType" "GenericToken" "SimpleTokens" "NonTerminal" }: SimpleTokens;
{ "Builds" "Build" }: SimpleTokens;
{ "for" "let" "in" "if" "then" "else" "where" "(" ")" "<" ">" }: SimpleTokens;
{ "SourcePosition" "SourceLength" }: SimpleTokens;
{ "DamagedReps" "SharedReps" }: SimpleTokens;
MainGoal: NonTerminal;
WholeFile: NonTerminal;
OptionalIncludeClause: NonTerminal;
ModuleList: NonTerminal;
ModuleBody: NonTerminal;
ModuleItemList: NonTerminal;
ModuleItem: NonTerminal;
CedarItems: NonTerminal;
CGramItems: NonTerminal;
BaseItems: NonTerminal;
OptionalArgModIdList: NonTerminal;
AbGramItems: NonTerminal;
AbProductionFcnImpl: NonTerminal;
RecFcnImplList: NonTerminal;
RecExpression: NonTerminal;
RecExp1: NonTerminal;
OptionalRecExpSeq: NonTerminal;
RecExpSeq: NonTerminal;
WhereExpSeq: NonTerminal;
WhereExp: NonTerminal;
LetList: NonTerminal;
LetExp: NonTerminal;
OptionalConcreteRightSideList: NonTerminal;
ConcreteRightSideList: NonTerminal;
ConcreteRightSideItem: NonTerminal;
BuildExp: NonTerminal;
IntervalExp: NonTerminal;
BuildExpList: NonTerminal;
ModId: NonTerminal;
IdList: NonTerminal;
OptionalModIdList: NonTerminal;
ModIdList: NonTerminal;
RopeList: NonTerminal;
DamageShareAssertionList: NonTerminal;
DamageShareAssertionList1: NonTerminal;
DamageShareAssertion: NonTerminal;
Identifier: GenericToken = "tokenID" ;
Rope: GenericToken = "tokenROPE" ;
NonNegInteger: GenericToken = "tokenDECIMAL" ;
MainGoal ← WholeFile ;
WholeFile ← OptionalIncludeClause ModuleList  "." ;
OptionalIncludeClause.empty ← ;
OptionalIncludeClause.nonEmpty ←  "Include"  "[" IdList  "]"  ";" ;
ModuleList.one ← ModuleBody ;
ModuleList.many ← ModuleList  ";" ModuleBody ;
ModuleBody.control ← Identifier  ":"  "Control"  "Module" ;
ModuleBody.normalNoSemi ← Identifier  ":"  "Module"  "="  "Begin" ModuleItemList  "End" ;
ModuleBody.normalSemi ← Identifier  ":"  "Module"  "="  "Begin" ModuleItemList  ";"  "End" ;
ModuleItemList.one ← ModuleItem ;
ModuleItemList.many ← ModuleItemList  ";" ModuleItem ;
ModuleItem.cedarItems ← CedarItems ;
ModuleItem.baseItems ← BaseItems ;
ModuleItem.abGramItems ← AbGramItems ;
ModuleItem.cGramItems ← CGramItems ;
ModuleItem.genTkn ← Identifier  ":"  "GenericToken"  "=" Rope ;
CedarItems.cedarTypesFromOne ← Identifier  ":"  "CedarType"  "From" Identifier ;
CedarItems.cedarTypesFromMany ← Identifier  "," IdList  ":"  "CedarType"  "From" Identifier ;
CedarItems.cedarTypesOne ← Identifier  ":"  "CedarType" ;
CedarItems.cedarTypesMany ← Identifier  "," IdList  ":"  "CedarType" ;
CedarItems.cedarEnumTypeFrom ← Identifier  ":"  "CedarEnumType"  "="  "{" IdList  "}"  "From" Identifier ;
CedarItems.cedarFnFrom ← Identifier  ":"  "CedarFunction" OptionalArgModIdList  "Returns"  "[" ModIdList  "]"  "From" Identifier DamageShareAssertionList ;
CedarItems.cedarFnFrom1 ← Identifier  ":"  "CedarFunction" OptionalArgModIdList  "Returns"  "[" ModIdList  "]" DamageShareAssertionList1  "From" Identifier ;
CGramItems.simpleTokens ←  "{" RopeList  "}"  ":"  "SimpleTokens" ;
CGramItems.nonTerminal ← Identifier  ":"  "NonTerminal"  "Builds" Identifier ;
CGramItems.concreteProduction ←  "for" ModId  "←" OptionalConcreteRightSideList  "Build" BuildExp ;
BaseItems.oneBaseType ← Identifier  ":"  "BaseType" ;
BaseItems.manyBaseTypes ← Identifier  "," IdList  ":"  "BaseType" ;
BaseItems.enumBaseType ← Identifier  ":"  "EnumeratedBaseType"  "="  "{" IdList  "}" ;
BaseItems.baseFcn ← Identifier  ":"  "BaseFunction" OptionalArgModIdList  "Returns"  "[" ModIdList  "]" DamageShareAssertionList ;
BaseItems.treeRecFcn ← Identifier  ":"  "TreeRecursiveFunction"  "[" ModIdList  "]"  "Returns"  "[" ModIdList  "]" DamageShareAssertionList ;
OptionalArgModIdList.empty1 ← ;
OptionalArgModIdList.empty2 ←  "["  "]" ;
OptionalArgModIdList.present ←  "[" ModIdList  "]" ;
AbGramItems.abType ← Identifier  ":"  "AbstractType"  "[" IdList  "]" ;
AbGramItems.abProdTwoIds ← Identifier  "." Identifier  ":"  "AbstractProduction"  "[" OptionalModIdList  "]" ;
AbGramItems.abProdOneId ← Identifier  ":"  "AbstractProduction"  "[" OptionalModIdList  "]" ;
AbGramItems.abProdFcnImpl ← AbProductionFcnImpl ;
AbProductionFcnImpl.oneId ←  "for" Identifier  ":"  "AbstractProduction"  "[" OptionalModIdList  "]" RecFcnImplList ;
AbProductionFcnImpl.twoIds ←  "for" Identifier  "." Identifier  ":"  "AbstractProduction"  "[" OptionalModIdList  "]" RecFcnImplList ;
RecFcnImplList.one ←  "let" Identifier  "[" IdList  "]"  "←" RecExpression ;
RecFcnImplList.many ← RecFcnImplList  "let" Identifier  "[" IdList  "]"  "←" RecExpression ;
RecExpression.RecExp1 ← RecExp1 ;
RecExpression.withWhereList ← RecExp1 WhereExpSeq ;
RecExpression.withLetList ←  "let" LetList  "in" RecExp1 ;
RecExp1.cond ←  "if" RecExp1  "then" RecExp1  "else" RecExp1 ;
RecExp1.paranthesis ←  "(" RecExpression  ")" ;
RecExp1.call ← Identifier  "[" OptionalRecExpSeq  "]" ;
RecExp1.seq ←  "<" RecExpSeq  ">" ;
RecExp1.id ← Identifier ;
RecExp1.modId ← Identifier  "." Identifier ;
RecExp1.rope ← Rope ;
RecExp1.numb ← NonNegInteger ;
RecExp1.sourcePosition ←  "SourcePosition"  "[" ModId  "]" ;
RecExp1.sourceLength ←  "SourceLength"  "[" ModId  "]" ;
OptionalRecExpSeq.empty ← ;
OptionalRecExpSeq.nonEmpty ← RecExpSeq ;
RecExpSeq.one ← RecExpression ;
RecExpSeq.many ← RecExpSeq  "," RecExpression ;
WhereExpSeq.one ← WhereExp ;
WhereExpSeq.many ← WhereExpSeq WhereExp ;
WhereExp.oneId ←  "where" Identifier  "←" RecExp1 ;
WhereExp.manyIds ←  "where"  "<" IdList  ">"  "←" RecExp1 ;
LetList.one ← LetExp ;
LetList.many ← LetExp  "," LetList ;
LetExp.oneId ← Identifier  "←" RecExp1 ;
LetExp.manyIds ←  "<" IdList  ">"  "←" RecExp1 ;
OptionalConcreteRightSideList.empty ← ;
OptionalConcreteRightSideList.nonEmpty ← ConcreteRightSideList ;
ConcreteRightSideList.one ← ConcreteRightSideItem ;
ConcreteRightSideList.many ← ConcreteRightSideList ConcreteRightSideItem ;
ConcreteRightSideItem.rope ← Rope ;
ConcreteRightSideItem.modId ← ModId ;
BuildExp.modId ← ModId ;
BuildExp.buildNodeBoth ← ModId  "[" IntervalExp  "," BuildExpList  "]" ;
BuildExp.buildNodeListOnly ← ModId  "[" BuildExpList  "]" ;
BuildExp.buildNodeIntervalOnly ← ModId  "[" IntervalExp  "]" ;
BuildExp.buildNodeNeither ← ModId  "["  "]" ;
IntervalExp.closed ←  "[" ModId  "," ModId  "]" ;
IntervalExp.leftOpen ←  "(" ModId  "," ModId  "]" ;
IntervalExp.rightOpen ←  "[" ModId  "," ModId  ")" ;
IntervalExp.fullOpen ←  "(" ModId  "," ModId  ")" ;
BuildExpList.one ← BuildExp ;
BuildExpList.many ← BuildExpList  "," BuildExp ;
ModId.oneId ← Identifier ;
ModId.twoIds ← Identifier  "." Identifier ;
IdList.one ← Identifier ;
IdList.many ← Identifier  "," IdList ;
OptionalModIdList.empty ← ;
OptionalModIdList.nonEmpty ← ModIdList ;
ModIdList.one ← ModId ;
ModIdList.many ← ModIdList  "," ModId ;
RopeList.one ← Rope ;
RopeList.many ← RopeList Rope ;
DamageShareAssertionList.empty ← ;
DamageShareAssertionList.nonEmpty ← DamageShareAssertionList DamageShareAssertion ;
DamageShareAssertionList1.one ← DamageShareAssertion ;
DamageShareAssertionList1.many ← DamageShareAssertionList1 DamageShareAssertion ;
DamageShareAssertion.damageAssertion ←  "DamagedReps"  "[" ModIdList  "]" ;
DamageShareAssertion.shareAssertion ←  "SharedReps"  "[" ModIdList  "]" ;
End.