ebnf icon indicating copy to clipboard operation
ebnf copied to clipboard

Factor expected using the example ebnf

Open steinkel opened this issue 10 years ago • 0 comments

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)!

steinkel avatar Dec 13 '14 15:12 steinkel