|
|
Re: compile Xtext programs [message #757523 is a reply to message #757393] |
Fri, 18 November 2011 18:29 |
Max Goltzsche Messages: 40 Registered: November 2011 |
Member |
|
|
Xbase comes with Xtext 2 as far as I know. It gives you the possibility to use all features of a highlevel programming language in your dsl.
Now, you can easily infer a JvmType of a instantiated grammar element of your language. There's also a module that allows you to generate java code from the infered jvm model of your grammar model or parts of it.
In the best case you only create your grammar which may extend from xbase and use xbase's grammar rules, implement an IJvmModelInferrer for your own specific grammar rules (there are methods like clazz=yourRule.toClass(); clazz.members += yourRule.toField(); clazz.members += yourRule.toMethod()) and use the JvmModelGenerator to generate executable java code from an inferred jvm model of your dsl as Christian Dietrich says in http://www.eclipse.org/forums/index.php/mv/msg/262355/757497/#msg_757497. I have not yet tried the last part with 2.1 but as far I've evaluated Xtext it works well.
[Updated on: Fri, 18 November 2011 18:40] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03688 seconds