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 NayakFriend
Messages: 19
Registered: July 2013
Junior Member
My grammar has a field 'variable'. The xtext grammar is as below:

"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 NittkaFriend
Messages: 1193
Registered: July 2009
Senior Member
Are you sure that you do not have a terminal rule that consumes 1.0?
Previous Topic:Content assist within strings?
Next Topic:Code Generator in java
Goto Forum:

Current Time: Thu Mar 30 08:59:44 GMT 2017

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

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