Skip to main content



      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 12:32 Go to next message
Eclipse UserFriend
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 12:46 Go to previous messageGo to next message
Eclipse UserFriend
What do you mean by „use"
Re: Xtext with other AST generators [message #1786877 is a reply to message #1786876] Mon, 14 May 2018 13:10 Go to previous message
Eclipse UserFriend
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: Wed Jun 18 11:11:04 EDT 2025

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

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

Back to the top