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
TheEMF User is currently offline TheEMF UserFriend
Messages: 71
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: 13155
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


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
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
TheEMF User is currently offline TheEMF UserFriend
Messages: 71
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: Tue Oct 15 22:18:19 GMT 2019

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

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

Back to the top