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

Are there any plans to move to Antlr4? #1929

Closed
parrotcar00 opened this issue Feb 2, 2021 · 5 comments
Closed

Are there any plans to move to Antlr4? #1929

parrotcar00 opened this issue Feb 2, 2021 · 5 comments
Labels

Comments

@parrotcar00
Copy link

I see that Xtext uses Antl3 grammar under the hood. Are there any plans to start using Antlr4?

@cdietrich
Copy link
Member

no. there are no plans

@miklossy
Copy link
Contributor

miklossy commented Feb 2, 2021

@parrotcar00
Copy link
Author

@miklossy Thanks!
I understand that Antlr4 has undergone bunch of changes in the backend and its API, but are there any changes in the syntax of the grammar files themselves?

I'm planning on doing a desing of DSL in Antlr4 but I think I should be fine using Xtext as the grammar syntax should be mostly same across Antlr 3 and 4, right?

@szarnekow
Copy link
Contributor

Joining the discussion here to clarify a few things:
Antlr3 offers very powerful static analysis features (if backtracking is disabled). They help users to figure if their language is ambiguous or not. To my best knowledge, Antlr4 resorts to runtime-disambiguation which is only good idea at the first glance. We also did some careful tuning to the way the Xtext grammar is translated to Antlr3. All performance analysis that we did with Antlr4 showed that it is a little slower even when all known best practices are applied. Not dramatically slower but a little (also related to the way the predication works). Both of these conclusions don't help to make a compelling argument to exchange the backend with Antlr4 in Xtext.

About the Xtext grammar language itself: Even if there was a rewrite towards Antlr4 as the parser technology, the grammar language itself would remain fully backwards compatible. As a user, you wouldn't notice a difference.

@szarnekow
Copy link
Contributor

I'm closing this issue since it's more a question than a ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants