Line comments |
/text |
Ignored by the parser |
Inline & block comments |
((text)) |
Ignored by the parser |
Brackets |
[code] |
Like parenthesis |
Definition |
identifier: body |
Defines a rule |
Reference |
ruleName |
References / “calls” a named rule |
Literal |
"text" or 'text' |
Matches exact text |
Set |
<characters> |
Matches any single contained character |
Sequences |
rule1 rule2 ... |
Matches several rules in order |
Choice |
rule1 | rule2 | ... * |
Matches any of several rules |
Optional |
?rule |
Optionally matches a rule |
Oneplus |
+rule |
Matches a rule once or more |
Zeroplus |
*rule |
Matches a rule zero or more times |
Lambda |
{rule} |
Makes a new state for rule |
Result |
#rule |
Sets the state to value from rule |
Adjoinment |
$rule |
Appends text from rule to state |
Property |
key=rule |
Maps key on state to value from rule |
Extension |
&rule |
Appends a node to the state |