<CesFile> ::= <CesFileBlock>
| <CesFileBlock> <CesFile> ;
<CesFileBlock> ::= <ImmediateDef>
| <PropBlock>
| <CapBlock>
| <MulBlock>
| <InhBlock> ;
;; Structure definition, immediate form
<ImmediateDef> ::= <ImmediateSig> "{" <Rex> "}" ;
<ImmediateSig> ::= "ces" <Identifier> ;
;; Structure instantiation
<CesInstance> ::= <Identifier> "(" ")"
| <Identifier> "!" "(" <InstanceArgs> ")" ;
<InstanceArgs> ::= <PlainInstanceArgs>
| <PlainInstanceArgs> "," ;
<PlainInstanceArgs> ::= <ArgValue>
| <ArgValue> "," <PlainInstanceArgs> ;
<ArgValue> ::= <Identifier> ;
;; Presentation context
<PropSelector> ::= "vis" | "sat" ;
<PropBlock> ::= <PropSelector> "{" <PropList> "}" ;
<PropList> ::= <PlainPropList>
| <PlainPropList> "," ;
<PlainPropList> ::= <PropField>
| <PropField> "," <PlainPropList> ;
<PropField> ::= <Identifier> ":" <PropValue> ;
<PropValue> ::= <Size>
| <Name>
| <Identifier>
| "{" <PropList> "}" ;
;; Capacities
<CapBlock> ::= "cap" "{" <CapList> "}" ;
<CapList> ::= <PlainCapList>
| <PlainCapList> "," ;
<PlainCapList> ::= <CapField>
| <CapField> "," <PlainCapList> ;
<CapField> ::= <Size> <NodeList>
;; Multiplicities
<MulBlock> ::= "mul" "{" <MulList> "}" ;
<MulList> ::= <PlainMulList>
| <PlainMulList> "," ;
<PlainMulList> ::= <MulField>
| <MulField> "," <PlainMulList> ;
<MulField> ::= <Size> <NodeList> "->" <NodeList>
| <Size> <NodeList> "<-" <NodeList>;
;; Inhibitors
<InhBlock> ::= "inh" "{" <InhList> "}" ;
<InhList> ::= <PlainInhList>
| <PlainInhList> "," ;
<PlainInhList> ::= <InhField>
| <InhField> "," <PlainInhList> ;
<InhField> ::= <NodeList> "->" <NodeList>
| <NodeList> "<-" <NodeList>;
;; Rule expression
<Rex> ::= <ThinArrowRule>
| <FatArrowRule>
| <RexTermSeq> ;
<RexTermSeq> ::= <RexTerm>
| <RexTerm> <RexTermSeq>
| <RexTerm> "+" <RexTermSeq> ;
<RexTerm> ::= <CesInstance>
| "{" <Rex> "}" ;
;; Arrow rules
<ThinArrowRule> ::= <E-Rule> | <C-Rule> | <EC-Rule> | <CE-Rule> | <FW-Rule> | <BW-Rule> ;
; effect polynomial with explicit node list on the left
<E-Rule> ::= <NodeList> "->" <Polynomial> ;
; cause polynomial with explicit node list on the left
<C-Rule> ::= <NodeList> "<-" <Polynomial> ;
; effect-then-cause polynomial with explicit node list on the left
<EC-Rule> ::= <NodeList> "->" <Polynomial> "<-" <Polynomial> ;
; cause-then-effect polynomial with explicit node list on the left
<CE-Rule> ::= <NodeList> "<-" <Polynomial> "->" <Polynomial> ;
; cause-then-effect pair of polynomials with explicit node list in the
; middle
<FW-Rule> ::= <Polynomial> "->" <NodeList> "->" <Polynomial> ;
; effect-then-cause pair of polynomials with explicit node list in the
; middle
<BW-Rule> ::= <Polynomial> "<-" <NodeList> "<-" <Polynomial> ;
; multi-polynomial rule with implicit node lists
<FatArrowRule> ::= <Polynomial> <FatArrow> <FatArrowRuleTail> ;
<FatArrowRuleTail> ::= <Polynomial>
| <Polynomial> <FatArrow> <FatArrowRuleTail> ;
<FatArrow> ::= "=>" | "<=" | "<=>" ;
;; Polynomial
<Polynomial> ::= <PolyTermSeq>
| "+" <PolyTermSeq>
| <Polynomial> "+" <PolyTermSeq> ;
<PolyTermSeq> ::= <PolyTerm>
| <PolyTerm> <PolyTermSeq> ;
<PolyTerm> ::= <Identifier>
| "(" <Polynomial> ")" ;
<NodeList> ::= <Polynomial> ;
;; Identifiers
; FIXME
<Identifier> ::= "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m"
| "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" ;
; FIXME
<Size> ::= "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
; FIXME
<Name> ::= "\"A\"" | "\"B\"" | "\"C\"" | "\"D\"" | "\"E\"" | "\"F\"" | "\"G\"" | "\"H\"" | "\"I\""
| "\"J\"" | "\"K\"" | "\"L\"" | "\"M\"" | "\"N\"" | "\"O\"" | "\"P\"" | "\"Q\"" | "\"R\""
| "\"S\"" | "\"T\"" | "\"U\"" | "\"V\"" | "\"W\"" | "\"X\"" | "\"Y\"" | "\"Z\"" ;