Skip to main content



      Home
Home » Modeling » TMF (Xtext) » boolean(why is this boolean not allowed)
boolean [message #1044291] Thu, 18 April 2013 14:21 Go to next message
Eclipse UserFriend
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 17:18 Go to previous messageGo to next message
Eclipse UserFriend
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 02:45 Go to previous message
Eclipse UserFriend
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: Tue Jul 22 20:57:55 EDT 2025

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

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

Back to the top