Open RobEin opened 4 months ago
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 https://github.com/antlr/antlr4/commit/b91a6aac16d19d01e168a8c30da904262181d546 regarding this.
— Reply to this email directly, view it on GitHub https://github.com/antlr/antlr4/issues/4625#issuecomment-2127786463, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ7TMALWA7BXNUSHATOHBTZDYYBHAVCNFSM6AAAAABIEHAXOCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRXG44DMNBWGM. You are receiving this because you are subscribed to this thread.
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