Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Generating Graphical AST
Generating Graphical AST [message #1107705] Thu, 12 September 2013 20:30 Go to next message
mcse mcse is currently offline mcse mcseFriend
Messages: 53
Registered: August 2012
Member
Hi,

I have grammar developed in Xtext. However, I need to use the graphical form of the AST for my grammar. Is there a way to generate a tree diagram from my grammar ?

Thanks
Re: Generating Graphical AST [message #1107945 is a reply to message #1107705] Fri, 13 September 2013 05:37 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13493
Registered: July 2009
Senior Member
Hi i am not sure what you are talking about. But Süd you try right
click -> open with -> sample ecore model editor (or so) on the
*.mydsl file

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Generating Graphical AST [message #1107965 is a reply to message #1107945] Fri, 13 September 2013 06:19 Go to previous messageGo to next message
mcse mcse is currently offline mcse mcseFriend
Messages: 53
Registered: August 2012
Member
Hi,

Thanks for the reply.

I am looking for a way to generate a tree from the grammar where there is single root node representing the compilation unit in my grammar. The tree then expands until the leaves representing the terminals in my grammar.
So, this is called abstract syntax tree, is not it ? Is not there a way to generate a diagram of such a tree ?
Re: Generating Graphical AST [message #1107971 is a reply to message #1107965] Fri, 13 September 2013 06:26 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13493
Registered: July 2009
Senior Member
Hi so you are one metalevel up?
There is/ was a visualization view for the grammar shipped with xtext
but this represents the concrete synatx. And there is the .xtextbin
or .xmi file (I think one can configure which to get) of the grammar
itself as Xtext sees it. At least the xmi file you can open with emf
tools as mentioned before.

You can write a own generator fragment to deal with that

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Generating Graphical AST [message #1110011 is a reply to message #1107705] Mon, 16 September 2013 08:32 Go to previous message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
If you're interested in a visualization of the lexical structure, you
might also have a look at the Window->Show View->Other...->Xtext->Xtext
Syntax Graph.

Am 12.09.13 22:30, schrieb mcse mcse:
> Hi,
>
> I have grammar developed in Xtext. However, I need to use the graphical
> form of the AST for my grammar. Is there a way to generate a tree
> diagram from my grammar ?
>
> Thanks


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


---
Get professional support from the Xtext committers at www.typefox.io
Previous Topic:Value Converter is not getting called
Next Topic:Simple example - generation problem
Goto Forum:
  


Current Time: Sun Jul 12 13:35:34 GMT 2020

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

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

Back to the top