Notation

  1. Syntactic categories (or non-terminals) are written thus: item. Depending on the section, a category may represent a class of either terms, token lists, or character strings.
  2. A syntactic rule takes the general form
              C ::= F1 | F2 | F3 | ...
              

    which states that an entity of category C may take any of the alternative forms F1, F2, F3, etc.

  3. Certain definitions and restrictions are given in ordinary English, enclosed in { } brackets.
  4. A category written as C... denotes a sequence of one or more Cs.
  5. A category written as ?C denotes an optional C. Therefore ?C... denotes a sequence of zero or more Cs.
  6. A few syntactic categories have names with arguments, and rules in which they appear may contain meta-variables looking thus: X. The meaning of such rules should be clear from analogy with the definite clause grammars (see Term and Goal Expansion).
  7. In the section describing the syntax of terms and tokens (see Term Token) particular tokens of the category name are written thus: name, while tokens that are individual punctuation characters are written literally.