-
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
VBA Conditional Compilation Grammar #4137
Conversation
Adding vba_cc grammar
I see that there is a failure in only one of the build matricies. I’m more than happy to fix this if someone can tell me what it means. |
The problem is that there are symbol conflicts: EMPTY, WIN16, WIN32, WIN64. In your grammar .g4 file, append an underscore ( Please enter a bug in https://github.com/antlr/antlr4/issues saying that for the Cpp target, EMPTY, WIN16, WIN32, WIN64 are known conflicts, like because there are |
Readd target when regression is fixed.
I’ve removed that target. I can re-add it in a a few days when I add the VBA 7.1 grammar. |
Renamed tokens after the ninja edit and re-added the CPP target. Good to go. |
In case you were waiting for this..I also filed the big report as requested: |
@Beakerboy thanks! |
VBA includes a precompiler of sorts, with its own grammar. The existing vba6 grammar tries to shoehorn it in with the main language, but there are situations where a VBA file with CC statements is not valid VBA until after the precompiler is run.
For example:
This new grammar powers a precompiler which can turn this example into valid VBA given a set of environment variables.