Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext without code generation(Mapping AST to existing Java model)
Xtext without code generation [message #901901] Tue, 14 August 2012 22:52 Go to next message
Karel Alfonso is currently offline Karel AlfonsoFriend
Messages: 3
Registered: August 2012
Junior Member
Hi all,

I have designed a DSL in Xtext and would like to grab the AST and map it directly to existing Java Models instead of using code generation. Most of the documentation out there uses code generation. Is there a tutorial that shows how to achieve this?

Thanks in advance,

Karel
Re: Xtext without code generation [message #902077 is a reply to message #901901] Wed, 15 August 2012 18:16 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

i am not quite sure what you want to do. could you come up with an example.

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext without code generation [message #902088 is a reply to message #901901] Wed, 15 August 2012 19:15 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
On 2012-15-08 24:52, Karel Alfonso wrote:
> Hi all,
>
> I have designed a DSL in Xtext and would like to grab the AST and map
> it directly to existing Java Models instead of using code generation.
> Most of the documentation out there uses code generation. Is there a
> tutorial that shows how to achieve this?
>
Do you mean like an interpreter (interpret the DSL model and make calls
to "existing java model" (what ever you mean by that).

If so, you would just get the XtextResource, get the model and fire away.

- henrik
Re: Xtext without code generation [message #902113 is a reply to message #902088] Wed, 15 August 2012 22:30 Go to previous message
Karel Alfonso is currently offline Karel AlfonsoFriend
Messages: 3
Registered: August 2012
Junior Member
Hi Henrik,

Yes, that's exactly what I want to do, to interpret the DSL model into a predefined domain model, instead of generating code.

Thanks a lot,

Karel
Previous Topic:Deploying Xtext parser along with the code generator
Next Topic:Loading of huge model
Goto Forum:
  


Current Time: Tue Apr 23 15:30:16 GMT 2024

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

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

Back to the top