Skip to main content



      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 07:41 Go to next message
Eclipse UserFriend
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 07:43] by Moderator

Re: Why I can't use one digit int ? [message #1804926 is a reply to message #1804925] Wed, 03 April 2019 07:43 Go to previous messageGo to next message
Eclipse UserFriend
hi,

can you please provide a complete minimal grammar.
i assume you have another terminal or keyword rule conflicting with INT
Re: Why I can't use one digit int ? [message #1804973 is a reply to message #1804926] Thu, 04 April 2019 03:03 Go to previous message
Eclipse UserFriend
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: Sun Jun 22 02:45:33 EDT 2025

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

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

Back to the top