Calling parser/generator programmatically [message #1220230] |
Tue, 10 December 2013 09:02  |
Eclipse User |
|
|
|
Hi guys,
I am creating a new grammar and code generator but I don't want to use it in an Eclipse editor. I actually would like to create a REST service to receive the file the unit to be compiled and then code would be generated. For this, I would need to call the xtext parser and generator programmatically within a Java Web project (tomcat).
How can I do it?
In this same context, another question is: is it ok to return a JSON resource with the possible compilation errors present on the given unit from REST service call?
Thanks in advance,
[Updated on: Tue, 10 December 2013 09:50] by Moderator
|
|
|
|
|
|
|
|
Re: Calling parser/generator programmatically [message #1721272 is a reply to message #1721234] |
Tue, 26 January 2016 04:05  |
Eclipse User |
|
|
|
In Lorenzo Bettinis famous book near the end of chapter 7, there is something about unit-testing eclipse functionality like opening editors etc.
Perhaps this may give you some hint how you con start re-generation for some DSL files.
And at the very end of chapter 5, there are some instructions how to get a "standalone command-line compiler" which takes the DSL file path as an argument for the generator.
So it's just a one-liner in a batch command file
Greetings from Frankfurt/Germany,
Uli
[Updated on: Tue, 26 January 2016 08:34] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.04925 seconds