Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext with other AST generators(Ability and requirements to use other AST generators than ANTLR)
Xtext with other AST generators [message #1786831] Sun, 13 May 2018 16:32 Go to next message
Chester John is currently offline Chester JohnFriend
Messages: 1
Registered: May 2018
Junior Member
Is it possible to use other generators of AST's than Antlr?
If so what is the Java interface for those AST's?
I have a requirement to machine generate them and use the results in XText.
Is this even reasonable?
Re: Xtext with other AST generators [message #1786876 is a reply to message #1786831] Mon, 14 May 2018 16:46 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
What do you mean by „use"

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext with other AST generators [message #1786877 is a reply to message #1786876] Mon, 14 May 2018 17:10 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Your terminology is confusing. ANTLR uses a grammar not an AST. The unique contribution of Xtext is to link the maintenance of the AST to the grammar production rules and also do serialization and editing. The AST is a fairly standard Ecore model; I'm not clear why you would want something else.

There are grammar alternatives, but if you want an editor, Xtext has comprehensive facilities.

If you only want a parser, or want a smaller/faster parser then other options may be better. I have done some preliminary work on Xtext2LPG which you may find at http://git.eclipse.org/c/ocl/org.eclipse.ocl.git/tree/examples/org.eclipse.ocl.examples.xtext2lpg with the original intention of getting proper shift/reduce diagnostics of backtracking hazards; and one day getting better performance. See http://www.eclipse.org/modeling/mdt/ocl/docs/publications/MODELS2010OCLWorkshop/oclxtext.pdf

Regards

Ed Willink
Previous Topic:Setting rule values implicitly in Xtext Grammar by keyword appereance
Next Topic:Xtend Active annotations: Statically import method
Goto Forum:
  


Current Time: Thu Mar 28 14:05:39 GMT 2024

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

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

Back to the top