BNF Notation

The format of the various data files is specified using a subset of the Backus-Naur Form (BNF).

  • A BNF rule is composed of a name enclosed in angle brackets, the separator ( ::= ), and a sequence of tokens defining the set of values which the name can represent.
  • Tokens in bold should be typed exactly as shown.
  • Tokens enclosed in angle brackets (<Type>) should be replaced by the value represented by that token, based on the appropriate BNF rule. The exception is the string <Tag> which should be typed exactly as shown.
  • A vertical bar ( | ) is used to indicate alternative possible values.
  • Square brackets ( [ ] ) are used to group tokens together. Tokens in square brackets may be omitted.
  • An asterisk ( * ) following a group of tokens indicates a repetition of zero or more instances of that group.
  • A plus sign ( + ) following a group of tokens indicates a repetition of one or more instances of that group.

Rules are numbered using the format (N).

Some common tokens, listed below, are not defined explicitly in the rules.

<Name> Either a sequence of characters enclosed in spaces and not containing any quotes, or a sequence of characters, including spaces, enclosed in quotes.

<Integer> A sequence of digits, possibly preceded by a minus sign ( - )

<Number> A sequence of digits, possibly preceded by a minus sign ( - ) and possibly followed by a decimal point ( . ) and a sequence of digits.

See “Class Mapping File” for examples of class mapping files that apply these rules.