Parse EBNF/Tests: Difference between revisions
m
Replace <lang> tags with <syntaxhighlight>
Underscore (talk | contribs) (Created page with "The flavor of EBNF used here is the same as that defined [http://karmin.ch/ebnf/index here], except a literal can't contain the character used for quoting, and an identifier can'...") |
m (Replace <lang> tags with <syntaxhighlight>) |
||
Line 2:
==A one-liner==
<
a = "a1" ( "a2" | "a3" ) { "a4" } [ "a5" ] "a6" ;
} "z"</
Some valid inputs:
Line 18:
==Arithmetic expressions==
<
expr = term { plus term } .
term = factor { times factor } .
Line 28:
number = digit { digit } .
digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" .
}</
Some valid inputs:
Line 41:
==Some invalid EBNF==
<
<
<
<
|