generated ParsetreeConstructor file doesn't compile after upgrade from xtext 2.9.2 to xtext 2.13 [message #1781887] |
Wed, 14 February 2018 05:38  |
Eclipse User |
|
|
|
We've been facing an issue after updating from xtext 2.9.2 to xtext 2.13 and from Eclipse Luna to Eclipse Oxygen. The generated *ParsetreeConstructor files from our various grammars do not compile, because part of the .xtext input grammar ends up in it! Here's an excerpt of a generated ParsetreeConstructor:
/************ begin Rule EmbeddedSection ****************
*
* /* opening and closing stratumId should match */ EmbeddedSection:
* "*O" WS? stratumID=NON_ASTERISK_STRING CR
* embeddedSmaps+=SMAP*
* "*C" WS? closingStratumID=NON_ASTERISK_STRING CR;
*
**/
Note how "EmbeddedSection" isn't in a comment. It comes from the corresponding part of the .xtext grammar:
/* opening and closing stratumId should match */
EmbeddedSection:
"*O" WS? stratumID=NON_ASTERISK_STRING CR
embeddedSmaps+=SMAP*
"*C" WS? closingStratumID=NON_ASTERISK_STRING CR;
It is related to the handling of comments, the disturbing part being "/* opening and closing stratumId should match */" in our grammar. If I remove it, generation works. I have several examples of the same kind (in the same grammar, and in other grammars too).
We are still using the old Generator class in our mwe2 files (org.eclipse.xtext.generator). I know it's not being maintained, but you know time flies and our grammars are 5 years old now :-)
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07317 seconds