-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Go target: missing constructor call to the superclass of the generated parser or lexer #4625
Comments
RobEin
changed the title
Missing constructor call to the superclass of the generated parser or lexer
Go target: missing constructor call to the superclass of the generated parser or lexer
May 23, 2024
RobEin
added a commit
to RobEin/antlr4
that referenced
this issue
May 23, 2024
RobEin
added a commit
to RobEin/antlr4
that referenced
this issue
May 23, 2024
related issue: antlr#4625 Signed-off-by: Robert Einhorn <robert.einhorn.hu@gmail.com>
RobEin
added a commit
to RobEin/antlr4
that referenced
this issue
May 23, 2024
related issue: antlr#4625 Signed-off-by: Robert Einhorn <robert.einhorn.hu@gmail.com>
I submitted a PR to fix it. |
RobEin
added a commit
to RobEin/antlr4
that referenced
this issue
May 24, 2024
related issue: antlr#4625 Signed-off-by: Robert Einhorn <robert.einhorn.hu@gmail.com>
Thanks for looking at a few issues Robert. I have some big changes coming through this weekend, including generic walkers, after which cI will look at your PRs. I may already have addressed some of them I think
… On May 23, 2024, at 12:25, Robert Einhorn ***@***.***> wrote:
To fix it, I submitted a PR <b91a6aa> regarding this.
—
Reply to this email directly, view it on GitHub <#4625 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAJ7TMALWA7BXNUSHATOHBTZDYYBHAVCNFSM6AAAAABIEHAXOCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRXG44DMNBWGM>.
You are receiving this because you are subscribed to this thread.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is currently no constructor support for superclasses from the generated lexer/parser classes.
Without this, the initial values of a superclass instance can only be set in individually way.
Here is a short example for a lexer implementation:
my PythonLexer.g4:
my PythonLexerBase superclass:
current generated lexer:
suggested generated lexer:
I think this suggestion follows the practices of the Go language and those common in other ANTLR target languages.
The generated parser class should be created in the same way.
similar issue: #3446
The text was updated successfully, but these errors were encountered: