Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Xtext Vs. Antlr(In what instances should I choose Xtext over Antlr)
Xtext Vs. Antlr [message #1801263] Tue, 15 January 2019 21:31 Go to next message
Eclipse UserFriend
Hi,

Can you please let me know in which instances is is best to choose Xtext to generate a DSL instead of ANTLR?
I have worked with a project that involves generating a .jar file from Xtext, and I know that ANTLR does not support generating binaries as such.
How do I explain it technically? What are the other advantages of using Xtext over ANTLR?

Regards!
Re: Xtext Vs. Antlr [message #1801275 is a reply to message #1801263] Wed, 16 January 2019 00:59 Go to previous messageGo to next message
Eclipse UserFriend
I don't understand

Antlr gives you a parser

Xtext gives you semantic validation, generator, ide
Re: Xtext Vs. Antlr [message #1801288 is a reply to message #1801263] Wed, 16 January 2019 03:32 Go to previous messageGo to next message
Eclipse UserFriend
As Christian said, ANTLR "only" provides a parser for you. Nothing what you can and have to do *with* the parser. Xtext adds a complete sophisticated infrastructure on top of that and *uses* ANTLR for parsing under the hood. There are some cases where you could leverage ANTLR features which Xtext does not reveal, and Xtext uses ANTLR 3.

In general, Xtext is the way to go unless you have some very specific language requirements that you cannot solve with Xtext easily (and with ANTLR neither). Then you should rethink your language's design or decide to go the hard way and implement everything on top on your own (editor support, build infrastructure etc.). You should consider that Xtext is developing since more than 10 years on that.
Re: Xtext Vs. Antlr [message #1801297 is a reply to message #1801288] Wed, 16 January 2019 04:44 Go to previous messageGo to next message
Eclipse UserFriend
Hi

As well as magic things like an almost free IDE, Xtext also provides powerful EMF integration that is very useful internally and may also enables the grammar to be for other modelling purposes.

Regards

Ed Willink
Re: Xtext Vs. Antlr [message #1801332 is a reply to message #1801297] Wed, 16 January 2019 22:22 Go to previous message
Eclipse UserFriend
Thank You Christian, Karsten, and Ed for the answers; they were very useful to me.

Regards!
Previous Topic:Error in building shadowJar in command prompt
Next Topic:XtextRunner and Parser class issue
Goto Forum:
  


Current Time: Sun Jun 15 15:36:05 EDT 2025

Powered by FUDForum. Page generated in 0.23972 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top