Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » boolean(why is this boolean not allowed)
boolean [message #1044291] Thu, 18 April 2013 18:21 Go to next message
T Pot is currently offline T PotFriend
Messages: 2
Registered: April 2013
Junior Member
I have the following rule:

Else_Statement:
{Else_Statement}
(hasElse ?= (ELSE else_statement=Statement_List)?)?
;

Terminal ELSE:
'ELSE'
;

The line (hasElse ?= (ELSE else_statement=Statement_List)?)?
gives the following error:

Multiple markers at this line:
- missing ')' at else_statement
- mismatched input ')' expecting ';'

How come this is not allowed?
Re: boolean [message #1044386 is a reply to message #1044291] Thu, 18 April 2013 21:18 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6494
Registered: July 2009
Senior Member
Hi,

the placement is false. you have to add it before a terminal/datatype rule

Else_Statement:
{Else_Statement}
( (hasElse ?=ELSE else_statement=Statement_List)?)?
;
Re: boolean [message #1044637 is a reply to message #1044291] Fri, 19 April 2013 06:45 Go to previous message
T Pot is currently offline T PotFriend
Messages: 2
Registered: April 2013
Junior Member
Thx,

That's the solution,

Cheers,

Timo Pot
Previous Topic:Xtext 2.4.1 Update Available
Next Topic:A couple of questions about Scope
Goto Forum:
  


Current Time: Wed Nov 26 00:57:48 GMT 2014

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

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