Skip to main content



      Home
Home » Modeling » TMF (Xtext) » How to call AST contents
How to call AST contents [message #1729806] Tue, 19 April 2016 04:44 Go to next message
Eclipse UserFriend
Hi

I am a beginner in Java and Xtext world, I have defined my DSL grammar and generate all my DSL artefacts. and now am trying to develop a code generator.

so my question is how to call the AST (Node Model or parse tree that generated after writing a program using my DSL) parameters in the xtend file, so I can configure my code generator to parse the generated AST and generate a customized template.

and to inspect the generated AST, is it better to contribute in the xtend file or the serializer file

and is there any simple tutorial that you can refer that help in my task

Best Regards
AYMEN
Re: How to call AST contents [message #1729808 is a reply to message #1729806] Tue, 19 April 2016 04:55 Go to previous message
Eclipse UserFriend
Hi,

i am not sure if i get your question. you may have a look at https://www.eclipse.org/Xtext/documentation/103_domainmodelnextsteps.html#tutorial-code-generation.

to have access to the node model use the NodeModelUtils class (you usually should not need to to that in the first place)
Previous Topic:Interger declared as keyword cannot be reused in other rules.
Next Topic:Content Assist with INT
Goto Forum:
  


Current Time: Wed Jul 16 04:27:00 EDT 2025

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

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

Back to the top