8 lines
538 B
Text
8 lines
538 B
Text
<syntax> ::= <rule> | <rule> <syntax>
|
|
<rule> ::= <opt-whitespace> "<" <rule-name> ">" <opt-whitespace> "::=" <opt-whitespace> <expression> <line-end>
|
|
<opt-whitespace> ::= " " <opt-whitespace> | ""
|
|
<expression> ::= <list> | <list> <opt-whitespace> "|" <opt-whitespace> <expression>
|
|
<line-end> ::= <opt-whitespace> <EOL> | <line-end> <line-end>
|
|
<list> ::= <term> | <term> <opt-whitespace> <list>
|
|
<term> ::= <literal> | "<" <rule-name> ">"
|
|
<literal> ::= '"' <text> '"' | "'" <text> "'"
|