Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
andreasabel opened this issue May 21, 2019 · 2 comments
Closed

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

andreasabel opened this issue May 21, 2019 · 2 comments
Assignees
Labels
enhancement lexer Concerning the generated lexer
Milestone

Comments

@andreasabel
Copy link
Member

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
Copy link

jchook commented Jun 29, 2019

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
Copy link
Member Author

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

@andreasabel andreasabel added this to the 2.8.3 milestone Aug 27, 2019
@andreasabel andreasabel self-assigned this Aug 27, 2019
@andreasabel andreasabel added the lexer Concerning the generated lexer label Dec 15, 2019
andreasabel added a commit that referenced this issue Jan 19, 2020
Don't use showLitChar for unicode characters!

b8701c3 broke #249 for Java/ANTLR in the lexer,
c49d1fd for Java/CUP.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement lexer Concerning the generated lexer
Projects
None yet
Development

No branches or pull requests

2 participants