Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Serialization: Missing whitespaces lead to parsing failure
Serialization: Missing whitespaces lead to parsing failure [message #656023] Wed, 23 February 2011 19:23
Martin  is currently offline Martin Friend
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:

state startState {
}


After EMF editing the serializaer produces:

statestartStateTest {
}


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:

true | false


With the EMF Editor I change the operator to logical AND which produces:

true| false


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:

true | false

Previous Topic:Serialization: Default Values?
Next Topic:Serialization: Tolerant Expressions Grammar
Goto Forum:
  


Current Time: Fri Mar 29 02:17:06 GMT 2024

Powered by FUDForum. Page generated in 0.01858 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top