Terminal confusion [message #760144] |
Thu, 01 December 2011 08:34  |
Eclipse User |
|
|
|
Dear Xtext-Gurus,
in which order are terminals matched during the parsing?
I am running into the following problem. My grammar both has possibilities to specify multiplicities
Multiplicity: "[" lower=INT ('..' (upper=INT|unbounded?='*'))? "]";
as well as NUMBER (used at some other place)
terminal NUMBER returns ecore::EBigDecimal:
('-')?('0'..'9')+ ('.' ('0'..'9')+);
Before introducing NUMBER, multiplicities worked fine with a syntax like this :
However, this now results in:
Multiple markers at this line
- required (...)+ loop did not match anything at character '.'
- extraneous input '.' expecting RULE_INT
and I have to add extra whitespace.
I have now idea why it gets confused, because NUMBER should not match anything in that statement.
Any ideas?
Thanks,
Andreas
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04174 seconds