Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » New Target Language
New Target Language [message #1060594] Mon, 27 May 2013 04:35 Go to next message
anduril elendil is currently offline anduril elendil
Messages: 4
Registered: May 2013
Junior Member
Hi everyone,

I am new to XText, so please forgive me if this is a stupid question. But I would like to have these information before I invest days or weeks of learning.

What I would like to do is use XText to create a domain specific language which will be translated to a scripting language of a specific program. Is it possible to generate something else than Java code by defining the output grammer and suchlike?

Greetings
Re: New Target Language [message #1060642 is a reply to message #1060594] Mon, 27 May 2013 08:51 Go to previous messageGo to next message
Claudio Heeg is currently offline Claudio Heeg
Messages: 75
Registered: April 2013
Member
Yes, the generator can generate any kind of code.
Re: New Target Language [message #1060655 is a reply to message #1060642] Mon, 27 May 2013 10:03 Go to previous messageGo to next message
anduril elendil is currently offline anduril elendil
Messages: 4
Registered: May 2013
Junior Member
thank you, thats the answer I hoped to read Smile
Re: New Target Language [message #1060751 is a reply to message #1060642] Tue, 28 May 2013 07:06 Go to previous messageGo to next message
anduril elendil is currently offline anduril elendil
Messages: 4
Registered: May 2013
Junior Member
Hi,

do you have a link for a tutorial or something else? I wrote my first small grammer and would like to translate it to a xml file. But I can't find anything about how to do this. The only thing I found was XSD and XPAND in the documentation of Eclipse Indigo. How Can I do this with Xtend or do I have to use something else? Currently I use Eclipse Juno.

Thx
Re: New Target Language [message #1060756 is a reply to message #1060751] Tue, 28 May 2013 07:23 Go to previous messageGo to next message
Claudio Heeg is currently offline Claudio Heeg
Messages: 75
Registered: April 2013
Member
http://www.eclipse.org/Xtext/documentation.html#TutorialCodeGeneration
should give you a nice starting point, I reckon?
It is java based but you can see the static and dynamic parts of the code to be generated, it should be pretty straightforward for other languages.
And, just to prove that other languages are indeed possible:
http://christiandietrich.wordpress.com/2013/04/12/xtext-model-visualization-with-plantuml/

[Updated on: Tue, 28 May 2013 07:32]

Report message to a moderator

Re: New Target Language [message #1060757 is a reply to message #1060751] Tue, 28 May 2013 07:25 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6230
Registered: July 2009
Senior Member
Have a look at the 15 mins example extended from the docs

--
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
Re: New Target Language [message #1060758 is a reply to message #1060594] Tue, 28 May 2013 07:38 Go to previous message
anduril elendil is currently offline anduril elendil
Messages: 4
Registered: May 2013
Junior Member
ok thank you, I'll work that through
Previous Topic:Maven errors question
Next Topic:grammar ignore until next keyword
Goto Forum:
  


Current Time: Fri Aug 29 01:28:42 EDT 2014

Powered by FUDForum. Page generated in 0.02851 seconds