Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » StackOverFlowError
StackOverFlowError [message #707059] Mon, 01 August 2011 07:37 Go to next message
Arun  is currently offline Arun Friend
Messages: 26
Registered: July 2011
Junior Member
Hi,

A huge StackOverFlowError is shown for my grammar. What could be the reason?

51295 [main] ERROR mf.mwe2.launch.runtime.Mwe2Launcher -
java.lang.StackOverflowError
at org.eclipse.xtext.parsetree.NodeContentAdapter.updateCompositeNode(NodeContentAdapter.java:121)
at org.eclipse.xtext.parsetree.NodeContentAdapter.updateCompositeNode(NodeContentAdapter.java:132)
at org.eclipse.xtext.parsetree.NodeContentAdapter.updateCompositeNode(NodeContentAdapter.java:132)
at org.eclipse.xtext.parsetree.NodeContentAdapter.updateCompositeNode(NodeContentAdapter.java:132)
at org.eclipse.xtext.parsetree.NodeContentAdapter.updateCompositeNode(NodeContentAdapter.java:132)
at org.eclipse.xtext.parsetree.NodeContentAdapter.updateCompositeNode(NodeContentAdapter.java:132)
...
...
...

Thanks,
Arun
Re: StackOverFlowError [message #707067 is a reply to message #707059] Mon, 01 August 2011 07:48 Go to previous messageGo to next message
Arun  is currently offline Arun Friend
Messages: 26
Registered: July 2011
Junior Member
Adding to that,

The error occurs for unordered group,

CProperty1:
"property" name=ID "{"
(
("mappedTo" mappedTo=STRING)?
("type" mappedType=MappedType)?
("repository" repository=STRING)?
&("queryable" queryableOP=TrueFalseOption)?
&("readable" readableOP=TrueFalseOption)?
&("writable" writableOP=TrueFalseOption)?
&("required" requiredOP=FalseTrueOption)?
&("hidden" hiddenOP=FalseTrueOption)?
&("expert" expertOP=FalseTrueOption)?
&("cascade" cascade=CascadeType)?
&("cache-mode" cachMode=CacheType)?
&("group" group=ID)?
&("description" description=STRING)?
&("description-resource" descriptionResource=STRING)?
&("displayname" displayName=STRING)?
&("displayname-resource" displayNameResource=STRING)?
&("category" category=STRING)?
&("category-resource" categoryResource=STRING)?

)?
"}"
;

If i remove the '&' no error is reported. But my requirement is unordered group.

Thanks,
Arun
Re: StackOverFlowError [message #707083 is a reply to message #707067] Mon, 01 August 2011 08:00 Go to previous message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3109
Registered: July 2009
Senior Member
Hi Arun,

did you consider to upgrade to Xtext 2.0? There were fixes in this field.

Another thing that seems suspicious to me is the first part of your
unordered group:

("mappedTo" mappedTo=STRING)?
("type" mappedType=MappedType)?
("repository" repository=STRING)? &("queryable"
queryableOP=TrueFalseOption)?
&("readable" readableOP=TrueFalseOption)? ..

is essentially the same as

(
("mappedTo" mappedTo=STRING)?
("type" mappedType=MappedType)?
("repository" repository=STRING)?
)

&("queryable" queryableOP=TrueFalseOption)?
&("readable" readableOP=TrueFalseOption)? ..

I'm not sure about your syntax but I guess it should more look like this:

("mappedTo" mappedTo=STRING)?
("type" mappedType=MappedType)?
(
("repository" repository=STRING)?
&("queryable" queryableOP=TrueFalseOption)?
&("readable" readableOP=TrueFalseOption)? ..
)

Hope that helps,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

On 01.08.11 09:48, Arun wrote:
> Adding to that,
>
> The error occurs for unordered group,
>
> CProperty1:
> "property" name=ID "{"
> (
> ("mappedTo" mappedTo=STRING)?
> ("type" mappedType=MappedType)?
> ("repository" repository=STRING)? &("queryable"
> queryableOP=TrueFalseOption)?
> &("readable" readableOP=TrueFalseOption)?
> &("writable" writableOP=TrueFalseOption)?
> &("required" requiredOP=FalseTrueOption)?
> &("hidden" hiddenOP=FalseTrueOption)? &("expert" expertOP=FalseTrueOption)?
> &("cascade" cascade=CascadeType)?
> &("cache-mode" cachMode=CacheType)?
> &("group" group=ID)?
> &("description" description=STRING)?
> &("description-resource" descriptionResource=STRING)?
> &("displayname" displayName=STRING)?
> &("displayname-resource" displayNameResource=STRING)?
> &("category" category=STRING)?
> &("category-resource" categoryResource=STRING)?
>
> )? "}"
> ;
>
> If i remove the '&' no error is reported. But my requirement is
> unordered group.
> Thanks,
> Arun
Previous Topic:[Xtend] Increase a postfix in a for loop
Next Topic:(no subject)
Goto Forum:
  


Current Time: Thu May 13 19:00:13 GMT 2021

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

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

Back to the top