Grammar rules have the following characteristics: itemization( it() The construction verb( exp: exp '+' exp ; ) is a recursive rule definition, stating that when two tt(exp) groupings, with a `+' token in between, have been recognized, these three elements themselves represent an tt(exp) gouping. it() Whitespace in rules is only used for separating symbols. it() em(Action blocks) determining the semantics of the rule can be inserted between the elements of production rules. An action block looks like this: verb( { C++ statements } ) Usually there is only one action block, defined at the end of production rules . See section ref(ACTIONS). it() Multiple production rules for the same grouping can be written separately or can be separated from each other using the vertical-bar character `|' as follows: verb( result: first-production-rule | second-production-rule | ... ; ) it() Alternatively, multiple rules of the same grouping can be defined. E.g., the previous definition of tt(result:) could also have been defined as: verb( result: first-production-rule ; result: second-production-rule ; ) However, this is a potentially dangerous practice, since one of the two tt(result) rules could also have used a misspelled rule-name (maybe the second tt(result)) should have been tt(results). Therefore, b() generates a warning if the same nonterminal is used repeatedly when defining production rules. it() Production rules can be empty. This means that em(result) can match any token, which then isn't processed by the production rule, although the rule's nonterminal has been recognized. Such a alternative is called an em(empty production rule). For example, here is how to define a comma-separated sequence of zero or more tt(exp) nonterminals: verb( expseq: expseq1 | // empty ; expseq1: expseq1 ',' exp | exp ; ) By convention, to improve the visibility of an empty production rule, it contains the comment `tt(// empty)'. Empty production rules may contain action blocks. Statements in such action blocks are executed when the parser has recognized the empty production rule. In such cases the tt(// empty) comment is omitted. )