Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Error message in xtext editor
Error message in xtext editor [message #1111493] Wed, 18 September 2013 09:43 Go to next message
Ashwini Nayak is currently offline Ashwini Nayak
Messages: 19
Registered: July 2013
Junior Member
Hi,
My grammar has a field 'variable'. The xtext grammar is as below:


VariableType:
"varType" (name=ID)? "{"
"variable" variable=SignedDouble
"}"
;

SignedDouble returns ecore::EDouble:
('-')? (INT '.' INT)
;

terminal INT returns ecore::EInt:
'0'..'9' ('0'..'9'|'_')*
;

xcore file is as below:

class VariableType{
String name
Double variable
}

When I enter variable 1.0 in my editor, it shows the below error message :
Multiple markers at this line
- Couldn't convert 'null' to EDouble.
- mismatched input '1.0' expecting RULE_INT


Could anybody tell me what the problem is?

Thanks in advance
Re: Error message in xtext editor [message #1111526 is a reply to message #1111493] Wed, 18 September 2013 10:37 Go to previous message
Alexander Nittka is currently offline Alexander Nittka
Messages: 1156
Registered: July 2009
Senior Member
Are you sure that you do not have a terminal rule that consumes 1.0?

Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext@itemis.de
Previous Topic:Content assist within strings?
Next Topic:5 Minute Tutorial doesnt work
Goto Forum:
  


Current Time: Fri Oct 24 13:02:08 GMT 2014

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

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