|
|
|
|
|
|
|
|
|
|
Re: Infer questions [message #997874 is a reply to message #997165] |
Tue, 08 January 2013 18:02   |
Eclipse User |
|
|
|
On 01/04/2013 09:49 AM, Tommaso De Sica wrote:
> And is it possible to debug a dsl that generate java code without using
> of Xbase?
>
> In this way I can create a simulation environment in java for debug dsl
> and then (if all is ok), generate the C code.
Although I didn't make further experiments, in this project
https://github.com/LorenzoBettini/Xtext-Buckminster-Example
the grammar derives from Xbase, but basically does not use its rules
https://github.com/LorenzoBettini/Xtext-Buckminster-Example/blob/master/org.xtext.example.hellobuck/src/org/xtext/example/hellobuck/HelloBuck.xtext
(the DSL in this example is pretty stupid, since that was not the final
subject :)
it then uses the inferrer to generate Java code (you can use it also if
you don't use elements from Xbase):
https://github.com/LorenzoBettini/Xtext-Buckminster-Example/blob/master/org.xtext.example.hellobuck/src/org/xtext/example/hellobuck/jvmmodel/HelloBuckJvmModelInferrer.xtend
since the generation relies on the inferrer you should get also
debugging functionalities, but they are limited, I guess, to the Java
elements you map to your model elements, and for generated Java methods
you will have to deal with trace functionalities yourself (probably
taking inspiration from XbaseCompiler).
cheers
Lorenzo
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
|
|
|
Re: Infer questions [message #997933 is a reply to message #997165] |
Tue, 08 January 2013 21:28  |
Eclipse User |
|
|
|
On 2013-04-01 9:49, Tommaso De Sica wrote:
> And is it possible to debug a dsl that generate java code without using
> of Xbase?
>
> In this way I can create a simulation environment in java for debug dsl
> and then (if all is ok), generate the C code.
Reading Lorenzos reply, I realized I may have misunderstood your question.
What is it you want to debug? The evaluation of the DSL model, or the
parsing/construction of the model (as done by Xtext). Or put
differently, do you want users of your DSL to be able to debug what they
have written, or do you want to debug the grammar (and model)?
Regards
- henrik
|
|
|
Powered by
FUDForum. Page generated in 0.25606 seconds