Literal string conflict [message #1301938] |
Fri, 18 April 2014 08:01  |
Eclipse User |
|
|
|
Hi,
I have two rules which include a Literal String overlapping each other
and in conflict when validating the edited file.
Here is a snippet of the relevant part of the grammar, the 'VALUE'
literal is in conflict. Not during the generation of the code and model,
but when editing the file.
******
ValueNotation:
'VALUE NOTATION' '::=' value+=Value*
;
Value:
'VALUE' INT
terminal INT
........
*******
Sample model:
VALUE NOTATION ::= VALUE 6
**********
Here the right hand side 6 gives a marker, expecting 'N'.
So this makes me think this a String literal conflict.
Is this expected? How do I solve it? (After typing this email, I will
try make both Literals terminals and see what happens.
Cheers Christophe
|
|
|
|
|
|
Re: Literal string conflict [message #1301991 is a reply to message #1301978] |
Fri, 18 April 2014 08:44  |
Eclipse User |
|
|
|
On 18-04-14 14:34, Christophe Bouhier wrote:
> On 18-04-14 14:26, Ed Willink wrote:
>> HI
>>
>> Use multiple tokens.
>>
>> Surely
>>
>> VALUE NOTATION ...
>>
>> is the 'VALUE NOTATION' keyword too?
>>
> mmmh token conflict appearantly also happen in Parser rules?
> I thought this as an issue of the Lexer.
>
Thanks guys, spliting the token to: 'VALUE' 'NOTATION' solved the issue.
>
>> Regards
>>
>> Ed Willink
>>
>> On 18/04/2014 13:18, Christian Dietrich wrote:
>>> Hi,
>>>
>>> without giving it a deeper loo:
>>> dont use blanks in keyword
>>>
>>
>
|
|
|
Powered by
FUDForum. Page generated in 0.05569 seconds