Extensions

In addition to this standard definition of EBNF, the following notational conventions are used.

The counting repetition: Anything enclosed by "{" and "}" and followed by a superscripted expression x must appear exactlyx times. x may also be a non-terminal. In the following example, exactly four stars are allowed:

Stars = {"*"}4.

The size in bytes: Any identifier immediately followed by a number n in square brackets ("[" and "]") may be assumed to be a binary number with the most significant byte stored first, having exactly n bytes. See the example in the following listing.

Listing: Example of a 4-byte identifier - FilePos
Struct = RefNo FilePos[4].

In some examples, text is enclosed by "<" and ">". This text is a meta-literal, i.e., whatever the text says may be inserted in place of the text (confer <any char> in the following listing, where any character can be inserted).