Serialization: Missing whitespaces lead to parsing failure [message #656023] |
Wed, 23 February 2011 19:23 |
Martin Messages: 17 Registered: February 2011 |
Junior Member |
|
|
Hi,
I just encountered the following problem in my Sample EMF Editor and XTextEditor combination:
My grammar allows to have some keyword followed by an identifier.
When I open a file in the Sample EMF Editor and change the identifier's value I can save the model back to the file without any issues. But the serializer saved the wrong content, it missed a whitespace between the keyword and the identifier. In consequence, when I open the file in the XTextEditor, the parser does not find the keyword, it merely sees a long identifier I guess.
For example: My grammar allows to have states like:
After EMF editing the serializaer produces:
Which makes the parser now complain about the missing state keyword.
Can you help me how to fix this?
The same happens when saving other stuff, for example expressions.
For example: I have the following expression in a file:
With the EMF Editor I change the operator to logical AND which produces:
But this does not make parsing fail. In the XTextEditor I can now hit CTRL+SHIFT+F which gives me a properly formatted one again:
|
|
|
Powered by
FUDForum. Page generated in 0.01858 seconds