Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Literal string conflict
Literal string conflict [message #1301938] Fri, 18 April 2014 12:01 Go to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
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 #1301957 is a reply to message #1301938] Fri, 18 April 2014 12:18 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

without giving it a deeper loo:
dont use blanks in keyword

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Literal string conflict [message #1301970 is a reply to message #1301957] Fri, 18 April 2014 12:26 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
HI

Use multiple tokens.

Surely

VALUE NOTATION ...

is the 'VALUE NOTATION' keyword too?

Regards

Ed Willink

On 18/04/2014 13:18, Christian Dietrich wrote:
> Hi,
>
> without giving it a deeper loo:
> dont use blanks in keyword
>
Re: Literal string conflict [message #1301978 is a reply to message #1301970] Fri, 18 April 2014 12:34 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
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.


> Regards
>
> Ed Willink
>
> On 18/04/2014 13:18, Christian Dietrich wrote:
>> Hi,
>>
>> without giving it a deeper loo:
>> dont use blanks in keyword
>>
>
Re: Literal string conflict [message #1301991 is a reply to message #1301978] Fri, 18 April 2014 12:44 Go to previous message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
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
>>>
>>
>
Previous Topic:numeric representation too big for Integer.
Next Topic:Xtext definition and instance in same grammar
Goto Forum:
  


Current Time: Wed Apr 24 16:37:34 GMT 2024

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

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

Back to the top