Replies: 1 comment 2 replies
-
The Antlr4 grammar doesn't recognize your proposed syntax. The main problem with this syntax is that the action code itself is target specific. In fact, all action code is in a specific target language, even though it can be made to "look" target agnostic by pushing all the code into a method call.. This syntactic extension could be handled by a tree write system, but there isn't one available yet. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was pleased to read about this in Parr's book, a good book it is too!
The examples are enough to give me a basis for supporting multiple dialects, I tried this and it works fine:
Here if the source uses English "goto" its recognized when we set langcode to "en" at runtime, and setting it to "fr" works too.
But is there a way to group these by "langcode"
Is there any such notation possible?
Beta Was this translation helpful? Give feedback.
All reactions