Leia

Notation

Leia syntax is specified with Extended Backus-Naur Form.

Production  = production_name "=" Expression "." ;
Expression  = Term { "|" Term } ;
Term        = Factor { Factor } ;
Factor      = production_name | token | Group | Option | Repetition ;
Group       = "(" Expression ")" ;
Option      = "[" Expression "]" ;
Repetition  = "{" Expression "}" ;

The grammar appendix uses semicolons at the end of productions:

program = { separator | statement } EOF ;

Lowercase production names denote lexical tokens or helper productions. Double-quoted strings denote literal tokens. Informal prose may use ellipses for omitted examples; an ellipsis is not a source token unless written as the three-character token ....

The words must, must not, may, implementation-defined, stable, and experimental have their ordinary specification meaning:

Examples are explanatory unless a surrounding section says they are normative.