Notational conventions

Syntactic and lexical grammars

This document uses the following notation to define one or more productions of a nonterminal of the syntactic grammar:

    Symbol :
      Production1 Symbol1
      ProductionN

This document uses double colon (::) notation to define productions of a nonterminal of the lexical grammar:

    Symbol ::
      terminal

The opt subscript is used to indicate that a nonterminal symbol is optional.

    Symbol ::
      Symbol1opt

A bracketed clause or predicate may appear between the rules of a production, such as in:

    Symbol ::
      [lookahead ∈ { 0 }] Symbol1
      [lookahead ∉ { default }] Symbol2
      SourceCharacters [but no embedded <![CDATA[]

The «empty» clause is matched by the grammar where other rules do not match otherwise.

    Symbol :
      «empty»

Braces subscripts are used to quantify a rule:

  • Symbol{4} — Four of Symbol
  • Symbol{2,} — At least two of Symbol
  • Symbol{1,4} — One to four of Symbol