Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Why I can't use one digit int ?
Why I can't use one digit int ? [message #1804925] Wed, 03 April 2019 11:41 Go to next message
Marshall Charron is currently offline Marshall CharronFriend
Messages: 72
Registered: August 2018
Member
Hi

I have this rule in Xtext :
InstanceObject :
	'object' name=ID  ('['NumberOfObject=INT']')? ':' objectToInstantiate=[Object]
;


But when I write a one digit int in the editor I get an error, for example with this :
object car1[5]:Car

I get this error : mismatched input '5' expecting RULE_INT

while this works fine :
object car1[15]:Car


Do you see why I get this error ?

[Updated on: Wed, 03 April 2019 11:43]

Report message to a moderator

Re: Why I can't use one digit int ? [message #1804926 is a reply to message #1804925] Wed, 03 April 2019 11:43 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
hi,

can you please provide a complete minimal grammar.
i assume you have another terminal or keyword rule conflicting with INT


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Why I can't use one digit int ? [message #1804973 is a reply to message #1804926] Thu, 04 April 2019 07:03 Go to previous message
Marshall Charron is currently offline Marshall CharronFriend
Messages: 72
Registered: August 2018
Member
Thank you for your reply. Indeed I had conflicting rules.
Previous Topic:Release of Xtext and Xtend 2.17.1
Next Topic:Proper Integration with Sirius
Goto Forum:
  


Current Time: Thu Apr 25 10:03:12 GMT 2024

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

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

Back to the top