Skip to content
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

[antlr/antlr4] Implement target agnostic ports for antlr4. #4435

Draft
wants to merge 33 commits into
base: master
Choose a base branch
from

Conversation

kaby76
Copy link
Contributor

@kaby76 kaby76 commented Mar 6, 2025

This PR fixes #4434, implements the rest of the ports for the antlr/antlr4 grammar, and fixes the build for split grammars for the Cpp target by updating the the latest Trash Toolkit.

The build was broken for PR #4424, so that PR never got a clean bill of health from testing. The old Maven tester could have been used instead, but it wasn't done either. The .errors files needed to be remastered. In addition, the changes broken the Python3 and Cpp ports.

To get things back on track, I fixed the build--more or less--with #4425. That PR removed the Cpp and Python3 ports for the antlr/antlr4 grammar, and it remastered a couple of .errors files that changed due to a change in the grammar. The changes that Mike did to antlr/antlr4 grammar itself were fine and I kept them.

But, that didn't fix everything. This PR completes the fixes.

NB: I did not add a Go port because it goes back to the problem with the Go target not implementing a class structure correctly. I can't really do justice because I need to define emit(), and I have to jump through hoops to bypass the problem. I'm just not interested.

As it is, I had to do some incredibly bad things because Antlr Python3 has issues of trying to reference mode constants, and because the Dart target does not have a way to get the size of the mode stack!

@kaby76 kaby76 marked this pull request as ready for review March 8, 2025 11:51
@kaby76 kaby76 marked this pull request as draft March 8, 2025 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[antlr/antlr4] Ports broken. Tests broken.
1 participant