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

command line parameter to omit built-in lexical elements? #420

Open
jasper-e opened this issue Apr 1, 2022 · 2 comments
Open

command line parameter to omit built-in lexical elements? #420

jasper-e opened this issue Apr 1, 2022 · 2 comments
Labels
builtin Concerning built-in tokens like Integer, String etc. enhancement lexer Concerning the generated lexer

Comments

@jasper-e
Copy link

jasper-e commented Apr 1, 2022

Hello,

Let me repeat my old request to have a way to omit some built-in lexical elements.
Especially identifier is in my way, as i have an LALR(1) grammar for music notation to be typed quickly, with single characters used as lexical elements at many places (for note pitch or duration etc.)

I had a wworkaround patchfile wich works with 2.8.3, I tried to upgrade to newest bnfc recently as using --functor is appealing.
However the generated lexer is in a different format and I get alex syntax errors (at end of file, I dont understand why) when I try to re-do my changes in the new format...

@andreasabel
Copy link
Member

Let me repeat my old request to have a way to omit some built-in lexical elements.

This is #302 (comment), I suppose.

@andreasabel andreasabel added lexer Concerning the generated lexer builtin Concerning built-in tokens like Integer, String etc. enhancement labels Apr 1, 2022
@jasper-e
Copy link
Author

jasper-e commented Apr 8, 2022

That was not mine... I made the comment just on the mailing list long long ago...
I have checked around, and I do not need any reserved words. For quick typing my keywords are single characters anyway and I can easily prevent ambiguity by defining the grammar in the right way.
So it could be acceptable to switch off identifier token and keyword handling simultanously, I would highly appreciate a command line option or pragma at start that could allow this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builtin Concerning built-in tokens like Integer, String etc. enhancement lexer Concerning the generated lexer
Projects
None yet
Development

No branches or pull requests

2 participants