A simple error break a whole file: how to avoid? [message #1016202] |
Tue, 05 March 2013 13:29 |
Victor Noël Messages: 112 Registered: June 2010 |
Senior Member |
|
|
Hi,
I have a new question, following my previous one there:
http://www.eclipse.org/forums/index.php/m/1016189/
As a reminder, I have this language:
https://anon:anon@wwwsecu.irit.fr/hg/SMAC/victor-noel-phd/may/may-xtext2/
There is an ecore model, and then an xtext language built on top of it.
The point of interest here is the language description in xtext (in fr.irit.smac.may.speadl), I put some comments when there is things that could seem strange. There is some french comments but they are unimportant.
I'm using xtext 2.4M5.
I only committed the code I changed, for the rest one need to execute both mwe2 workflow in fr.irit.smac.may.spead then fr.irit.smac.may.speadl.
So my problem is as follow:
When editing a file (see the aforementioned thread for an example), if a line is not finished:
Then the file is full of errors and even the second element defined (in the example) is also considered full of error.
This prevent the content assist and the scope to use the type of the "a" element to complete the line!
Is there a way to avoid that?
It seems that if I put ";" at the end of line it could work, but I would prefer to avoid it.
Another solution seems to be to have something in the ComponentPart declaration delimiting the beginning of a new Binding, something like:
ComponentPart returns spead::ComponentPart:
"part" name=ValidID ":" type=ComponentParameterizedTypeReference ("{"
('bind' bindings+=Binding)*
"}")?;
So that xtext understand that if it sees "bind", it means a new instance of the Binding rule should be consumed, but the problem is in that case I have to keep "bind" in the RequiredPortReference rule, because of the problem we talked in the aforementioned thread...
I guess there should be another solution?
Thank you :)
|
|
|
|
Powered by
FUDForum. Page generated in 0.02848 seconds