standalone parser and generator [message #699778] |
Fri, 22 July 2011 05:41  |
Eclipse User |
|
|
|
Hello,
I have a maybe naive question, but I cannot find a clear answer.
Can I use Xtext to output the parser and the code generator for my grammar as a standalone software, which can be run without eclipse?
Let's say I'd like to get a .jar and give it to a friend, so that after writing his model file (with a plain text editor) he can just use java to parse the text (to check for errors) and generate code out of it.
I found similar questions on the forum, and in the FAQ, but it seems they are concerned about manipulating the model with a custom java program (please correct me if I am wrong), which is not what I want to do.
Thanks a lot
B
|
|
|
|
|
|
|
|
|
Re: standalone parser and generator [message #699920 is a reply to message #699888] |
Fri, 22 July 2011 11:16  |
Eclipse User |
|
|
|
Ed,
the "export as executable jar" (see the blog of Sebastian) is not working properly, it complains that it cannot find a class with the main() method.
But the "wrapper" class
Quote:
Never the less a Wrapper (Delegate) around org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher should be a notbrainer
public class MyMwe2Launcher {
public static void main(String[] args) {
Mwe2Launcher.main(args);
}
}
is very easy and does the trick. You need to select it when creating the run configuration that you then apply to the exported jar.
Thanks Christian
|
|
|
Powered by
FUDForum. Page generated in 0.52862 seconds