-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
how to find the grammer file? #3652
Comments
No way. You can try to ask repository's author or try to search it over Google. |
I had tried these ways, but no result. |
I don't think it's fully possible because part of information is lost. Also, I think it's a rare case and such tool won't be implemented. |
One can likely reverse engineer the generated code, but there's little demand to write such a tool, especially for Antlr3, which is extremely old. Besides, What you can try is this:
If you do that (~30m work), you get a start:
With this grammar in hand, I would highly advise you move to Antlr4. If you insist on an AST rather than CST constructed, you can write a bottom-up visitor to synthesize the AST, but keep with Antlr4. |
Thanks a lot. |
If performance matters, I'd recommend using bottom-up listener with turned off |
Hi,Bro. The second is the COMMENT define deifferrence like this: Thanks first. Update-2022-05-10 |
https://github.com/TarsCloud/TarsJava/tree/v1.7.x/tools/tars-maven-plugin/src/main/java/com/qq/tars/maven/parse
I have the java file ,how to get back the antlr grammer file.
the file is lost.
Thanks first.
The text was updated successfully, but these errors were encountered: