Rule formatting
Some general rule writing guidelines are:
- Each rule should be on a separate line
- Lines that begin with # are comments and rules in these lines are not used by the grammar
- Blank lines are simply ignored
- Do not use plus signs as they have a special significance to the parser internals
- Each rule should have only one delimiter symbol (-> for syntactic rules and : for lexical rules)
Syntactic rules
- Syntactic rules should use an arrow (->) to separate mothers from daughters.
- Rules should be of the form
Mother -> Daughter1 Daughter2 Daughter3 ... - Notice that the daughters are separated by spaces.
- If you specify terms on the right of the -> they all must be specified on the left hand side of one of your other rules.
- Optional elements can be specified using parenthesis
- There is currently no way to indicate repetition. This is a target for a future release
- A pipe symbol (|) can be used to indicate a series of rules that all share a mother
Lexical rules
- Lexical rules should use a colon (:) to separate part of speech labels from words.
- Multiple words can be specified for a single part of speech using brackets ({}) and separating the words using a comma