Closed andreasabel closed 4 years ago
The use of numeric prefixes in token
names confuses BNFC:
Foo. Main ::= Main1 "fun";
token Main1 {"main"};
BNFC maps Main1
to Main
in the AST definition, consequently, the parser contains type errors.
Solution: raise an error when the user defines a token name with a numeric suffix.
BNFC should reject this ambiguous grammar, rather than letting the backends crash: