-
Notifications
You must be signed in to change notification settings - Fork 50
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
updates to grammar to successfully generate lexer/parser/visitor with Antlr4.7.1 #428
Conversation
OK, so this is not exactly the latest version of Antlr4, but the one from the Ubuntu package repository--the actually latest Antlr4 (4.7.1) fails to parse the grammar, and complains about "custom channels are not supported in combined grammars". This might be a separate issue that we have to figure out. |
A slight change in the Antlr4 grammar (PyNestML.g4) seems to have fixed the issue. |
…s on defining literals only in lexer grammar
I filed this PR because I couldn't generate the lexer/parser/visitor.py from the PyNESTML grammar with antlr4.7.1. In general, Antlr recommends that you separate your lexer grammar and your parser grammar. The lexer grammar is the old This PR implements the necessary changes. Note that the target language is set to Python2; this is also Python3 compatible (but not vice versa). I would still like to include lexer/parser/visitor generation as part of the Travis CI build script. |
With the latest commit, lexer/parser/visitor generation has been included in the Travis CI build script. This means that during installation, the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks for this update. I did not check any single line of the change and trust that @clinssen knows what he is doing.
No description provided.