BNFC / bnfc

BNF Converter
http://bnfc.digitalgrammars.com/
586 stars 165 forks source link

BNFC does not support \r and \f (lexer error) #257

Closed andreasabel closed 5 years ago

andreasabel commented 5 years ago

BNFC chokes on a definition like the following in the grammar file.

token Name (char - [ "-(){};.@\" \n\r\t\f" ]) + ;

The reason is that the BNF lexer does handle \r (carriage return) and \f (form feed).

jchook commented 5 years ago

This seems like a critical issue.

If I cherry-pick your commits, will it fix this issue?

Also it appears BNFC does not support grammars with \0.

andreasabel commented 5 years ago

I now merged my PR. Let me know if there are problems still.