Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Error message in xtext editor
Error message in xtext editor [message #1111493] Wed, 18 September 2013 05:43 Go to next message
Eclipse UserFriend
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 06:37 Go to previous message
Eclipse UserFriend
Are you sure that you do not have a terminal rule that consumes 1.0?
Previous Topic:ValueConverter class is not getting called during runtime
Next Topic:5 Minute Tutorial doesnt work
Goto Forum:
  


Current Time: Wed Jul 23 17:40:39 EDT 2025

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

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

Back to the top