Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to call AST contents
How to call AST contents [message #1729806] Tue, 19 April 2016 08:44 Go to next message
AYMEN SALMAN is currently offline AYMEN SALMANFriend
Messages: 18
Registered: October 2015
Location: England
Junior Member
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 08:55 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14716
Registered: July 2009
Senior Member
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)


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Interger declared as keyword cannot be reused in other rules.
Next Topic:Content Assist with INT
Goto Forum:
  


Current Time: Thu Sep 26 01:29:49 GMT 2024

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

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

Back to the top