-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[python3] Remove obsolete grammar python3 #3865
Conversation
Hi, |
Not necessary. I'll be done with the remaining ports by the end of the weekend. Also, I want to review this grammar more carefully. For example, I noticed my static checks flagged there were useless parentheses. I was going to correct that, but then realized that those parentheses included negative lookahead checks that were in the PEG grammar that you didn't add. Did you check these cases carefully? I also noticed there are no .tree files to test parse trees. |
Thanks for the porting help. I started to investigate these lookaheads and I came to the conclusion that they are only due to speedups in the PEG grammar, which in turn cause a slowdown in ANTLR4 due to the semantic predicates. |
Sorry, but I don't know what you mean by testing .tree files. |
The .tree files are the parse trees as represented by the |
I understand. So comparing the text-tree of the same input with an older Python parser and the current python3_12_0. |
Unfortunately, this is not a feasible way, because the Python parser rules in older versions have different names than the rule names in python3_12_0. |
The trees aren't used between different versions of Python and the .peg. After all, when a new version of python and .peg come along, an entirely new grammar will be created. The tests can be copied over and trees re-mastered. |
Can I help something about translations? |
@RobEin I'm working on the C++ port. I haven't had time to visit this lately because of the many issues with the builds for the repo. I am planning to continue this port soon. |
I may start the javascript port if it does not cause collision. |
That'll be great. Thanks. |
The JavaScript port is ready.
I will also make a PR to the antlr/grammars-v4 soon. |
This is a fix for #3833.
To do:
Reset()
methods to parser and lexer base classes to reinitialize. Critical for standard template drivers-tokens
argument.