Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [Xtext] ZUnassigned Rule Call not Allowed
[Xtext] ZUnassigned Rule Call not Allowed [message #57411] Mon, 13 July 2009 09:10 Go to next message
Helko Glathe is currently offline Helko GlatheFriend
Messages: 55
Registered: July 2009
Member
Hi

A part of my grammar is as follows:

Line :
'Line'
SectionOpen
(lineParamValuePair+=ParamValuePair)+
SectionClose
;

SectionOpen :
'{'
;

SectionClose :
'}'
;

Here, SectionClose is marked as an error, saying that:

"Multiple markers at this line
- Cannot change type twice within a rule
- An unassigned rule call is not allowed, when the 'current' was already
created."

What is wrong here?

Regards, Helko
Re: [Xtext] ZUnassigned Rule Call not Allowed [message #57539 is a reply to message #57411] Mon, 13 July 2009 13:32 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1771
Registered: July 2009
Senior Member
In parser rules it is not allowed to call other parser rules without
assigning the outcome to something. There's only one exception, which we
refer to as unassigned rules calls.
They have a special semantic (see documentation
http://www.eclipse.org/Xtext/documentation/0_7_0/xtext.html and search
for 'unassigned').

I think the analysis is not correct here, since it is only a datatype
rule you are referring to, which shouldn't be a problem. Could you
please file a bugzilla?

But for now, you'll have to either embed the curly brace directly into
the rule (that is what we usually do) or the rules have to become
terminal rules (i.e. you add the 'terminal' keyword).

Regards,
Sven


Helko Glathe schrieb:
> Hi
>
> A part of my grammar is as follows:
>
> Line :
> 'Line'
> SectionOpen
> (lineParamValuePair+=ParamValuePair)+
> SectionClose
> ;
>
> SectionOpen :
> '{'
> ;
>
> SectionClose :
> '}'
> ;
>
> Here, SectionClose is marked as an error, saying that:
>
> "Multiple markers at this line
> - Cannot change type twice within a rule
> - An unassigned rule call is not allowed, when the 'current' was already
> created."
>
> What is wrong here?
>
> Regards, Helko
>


--
Need professional support on Xtext or Xtend?
Mail to: xtext (at) itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
Re: [Xtext] ZUnassigned Rule Call not Allowed [message #57659 is a reply to message #57539] Mon, 13 July 2009 15:49 Go to previous message
Helko Glathe is currently offline Helko GlatheFriend
Messages: 55
Registered: July 2009
Member
Bug report has been created.


Regards, Helko
Previous Topic:[Xtext] Parsing terminals as ecore::EDouble
Next Topic:Error generating UI [ropject from TMF grammar
Goto Forum:
  


Current Time: Sat Dec 20 03:47:45 GMT 2014

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

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