Reputation: 3516
I'm wondering if it is possible to use Antlr v4 with Xtext?
I know currently (and the near future) Xtext is relying on Antlr v3 because they say they'd have to rewrite all their functions to fit Antlr v4, but I thoughtit might be possible to either add the Antlr v4 library to the buildpath of the Xtext onstead of let it download the v3 itself or if that is not possible if it is possible to generate the Parser with Antlr v4 and then insert the generated java code into Xtext.
Or could you think of another way using v4 with Xtext?
If you are wondering why I want to use v4: As far as I know it automatically handles ambigious grammar (it rewrites the grammar so everything is solvable by the computer) and that is the thing I'mstruggling with the most
Thanks for your help
Krzmbrzl
Upvotes: 1
Views: 702
Reputation: 170138
No, there is no trivial way to plug ANTLR4 into Xtext.
Note that ANTLR4's parsing algorithms are more powerful than those of ANTLR3, but it isn't magic. If you have a highly ambiguous grammar, you might (likely?) still get issues with v4.
I recommend you create a new question and post your Xtext grammar and explain where you're having issues.
Upvotes: 3