[1] ebnf ::= ( declaration | rule) *
[2] declaration ::= "@terminals" | pass
[3] rule ::= LHS expression
[4] expression ::= alt
[5] alt ::= seq ( "|" seq) *
[6] seq ::= diff+
[7] diff ::= postfix ( "-" postfix) ?
[8] postfix ::= primary POSTFIX?
[9] primary ::= HEX | SYMBOL | O_RANGE | RANGE | STRING1 | STRING2 | ( "(" expression ")")
[10] pass ::= "@pass" expression
@terminals # Productions for terminals
[11] LHS ::= ( "[" SYMBOL "]" #x20+ ) ? SYMBOL #x20* "::="
[12] SYMBOL ::= ( [ a-z] | [ A-Z] | [ 0-9] | "_" | ".") +
[13] HEX ::= "#x" ( [ a-f] | [ A-F] | [ 0-9] ) +
[14] RANGE ::= "[" ( ( R_CHAR "-" R_CHAR) | ( HEX "-" HEX) | R_CHAR | HEX) + "-"? ( "]" - LHS)
[15] O_RANGE ::= "[^" ( ( R_CHAR "-" R_CHAR) | ( HEX "-" HEX) | R_CHAR | HEX) + "-"? "]"
[16] STRING1 ::= '"' ( CHAR - '"') * '"'
[17] STRING2 ::= "'" ( CHAR - "'") * "'"
[18] CHAR ::= [ #x09#x0A#x0D] | [ #x20-#xD7FF] | [ #xE000-#xFFFD] | [ #x00010000-#x0010FFFF]
[19] R_CHAR ::= CHAR - ( "]" | "-" | HEX)
[20] POSTFIX ::= [ ?*+]
[21] PASS ::= [ #x09#x0A#x0D#x20]
| ( ( ( "#" - "#x") | "//") [ ^#x0A#x0D] * )
| ( "/*" ( ( "*" [ ^/] ) ? | [ ^*] ) * "*/")
| ( "(*" ( ( "*" [ ^)] ) ? | [ ^*] ) * "*)")
@pass PASS