ebnf
ebnf copied to clipboard
Factor expected using the example ebnf
Hi,
I was taking a quick look at the repo and doing some tests, when using the default ebnf example, like this
{
syntax = [ title ] "{" { rule } "}" [ meta ] .
rule = identifier ( "=" | ":" | ":==" ) expression ( "." | ";" ) .
expression = term { "|" term } .
term = factor { factor } .
factor = identifier
| literal
| range
| comment
| "[" expression "]"
| "(" expression ")"
| "{" expression "}" .
identifier = character { character } .
range = character ".." character .
title = literal .
meta = literal .
literal = "'" character { character } "'"
| '"' character { character } '"' .
comment = "(*" character { character } "*)" .
character = "a" .. "z"
| "A" .. "Z"
| "0" .. "9" .
}
I'm getting a $ bin/ebnf.php -t -s ebnf.ebnf Syntax error: Factor expected at (20, 18) (code: 0)!