clj-antlr
clj-antlr copied to clipboard
ANLTR Alternative Labels support
Hi!
It seems to me that at the moment there is no support for ANTLRv4 Alternative Labels in clj-antlr
. Am I wrong? Is there any hope it will be introduced? If not, what would be the best way to introduce it in given the current structure of the library?
Best, Adam
Hi @talesa. Sorry, but I don't know how alternative labels work, and I haven't worked on this in three years so... your guess is as good as mine. You're welcome to make a PR though! Happy to cut a new release for ya with that feature.
I've got it to work, but it's a rather dirty hack for now. It's using a 'heavier' ParserInterpreter, so I'd expected to be slower, but I dunno how much slower. I've uploaded the code to my fork in case someone needs it, I'll try to find time later to integrate it better and do a pull request. Thanks!
👍 on the need for this. I tried the fork and it works great! @talesa , if you have the time, I strongly encourage you to PR this. It is extremely useful.