|
Re: xText Standalone Setup Parsing a DSL from a File [message #637050 is a reply to message #637014] |
Wed, 03 November 2010 22:56 |
Sebastian Zarnekow Messages: 3118 Registered: July 2009 |
Senior Member |
|
|
Hi Christian,
please try to invoke EcoreUtil.resolveAll(resource) before you query the
resource for errors. This will add linking problems to the resource's
error list.
Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Am 03.11.10 19:37, schrieb Christian Ammann:
> Hello everybody,
>
> i have developed a DSL and tried to load it into memory with the
> EMF/Xtext APIs. According to the Xtext Docs at:
>
> http://www.eclipse.org/Xtext/documentation/latest/xtext.html
>
> i used the following code snippet (my DSl is called "udl"):
>
>
> new UDLStandaloneSetup().createInjectorAndDoEMFRegistration();
> ResourceSet rs = new ResourceSetImpl();
> Resource resource = rs.getResource(URI.createURI(input_file), true);
> System.out.println(resource.getErrors());
>
>
> I have modified my test case dsl files a little bit, that they contain
> some errors. The problem is: When i open them with the generated eclipse
> editor plugin, the parsing errors are detected and marked, when i parse
> my dsl files with code above, some parsing errors aren't reported. My
> question is: Why does the code above miss some parser errors? Is some
> init code missing in the code above?
>
> I tried to reproduce the problem with a very simple grammar but without
> success. My original grammar is very big and complex so im not posting
> it here (yet ;) ).
>
> Christian
>
> PS: I also tried this method:
>
> http://www.vorburger.ch/blog1/2009/08/xtext-standalone-setup -parsing-dsl-from.html
>
>
> but with the same results :-/
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.02845 seconds