Extended Backus-Naur Form grammar

The Extended Backus-Naur Form (BNF) grammar for phrase definitions is:

phrase-definition ::=
define phrase NAME; phrase-stmt... end phrase;
phrase-stmt ::=
phrase-check {phrase-check-option,... }= phrase-expr ; phrase-check continue = phrase-expr ; length-encoded {length-encoded-option,...} = phrase-expr ; field NAME = phrase-expr ; phrase expr;
phrase-expr ::=
variable-array (char-set)
fixed-array (INTEGER, phrase-expr)
begin phrase-stmt... end
char-set
phrase-check option ::=
method: NAME
modulo: INTEGER
store-in: NAME
encoding: encoding
char-set
CHAR
STRING
NAME
not (char-set, ...)
or (char-set, ...)