HANDBOOK / GENTLE PRIMER / Describing Syntax /

Nonterm Predicates

Nonterminals must be declared as predicates of the class 'nonterm'. For example, the full declaration of Statement might be


   'nonterm' Statement

      'rule' Statement: Variable ":=" Expression
      'rule' Statement: "IF" Expression "THEN" Statement "ELSE" Statement
      'rule' Statement: "WHILE" Expression "DO" Statement
      'rule' Statement: "BEGIN" StmtSeq "END"