Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Multiple-variable declaration randomly broken up to many single-variable declarations(vars : {x,y} sometimes randomly gets turned into vars:{x} vars:{y})
Multiple-variable declaration randomly broken up to many single-variable declarations [message #811044] Thu, 01 March 2012 21:35 Go to next message
Michalis Famelis is currently offline Michalis FamelisFriend
Messages: 8
Registered: October 2009
Junior Member
Hello,

I am getting a weird behavior regarding the definitions of variables in my DSL. I use my DSL to define an input model, manipulate it and then serialize it as an output model.

My manipulation does not affect the variable declarations in any way, but I still some non-deterministic behavior. For example when my input is:
variables : {v, k}


Some times the output is identical (which is good) but some times it will produce:
variables : {v}
variables : {k}



The relevant fragment of my grammar is:
Problem:
.....

('variables'':''{'
	varDecl +=VariableDeclaration (',' varDecl +=VariableDeclaration)* '}'
)? &

.....
;

VariableDeclaration:
	name =ID
;


Any ideas why I'm getting that behavior and/or how to fix it?

[Updated on: Fri, 02 March 2012 17:09]

Report message to a moderator

Re: Random changes in unaffected part of my model after manipulation [message #811425 is a reply to message #811044] Fri, 02 March 2012 10:24 Go to previous message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
Could be a bug in the serializer with respect to unordered groups. It
would be great if you could strip it down to a minimal grammar that can
reproduce the bug.


Am 01.03.12 22:35, schrieb Michalis Famelis:
> Hello,
>
> I am getting a weird behavior regarding the definitions of variables in
> my DSL. I use my DSL to define an input model, manipulate it and then
> serialize it as an output model.
>
> My manipulation does not affect the variable declarations in any way,
> but I still some non-deterministic behavior. For example when my input is:
>
> variables : {v, k}
>
>
> Some times the output is identical (which is good) but some times it
> will produce:
>
> variables : {v}
> variables : {k}
>
>
>
> The relevant fragment of my grammar is:
>
> Problem:
> ....
>
> ('variables'':''{'
> 'varDecl +=VariableDeclaration (',' varDecl +=VariableDeclaration)* '}'
> )? &
>
> ....
> ;
>
> VariableDeclaration:
> name =ID
> ;
>
>
> Any ideas why I'm getting that behavior?
>
> (PS. Apologies for the vagueness of the post title, but I don't know how
> to best describe this.)


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


---
Get professional support from the Xtext committers at www.typefox.io
Previous Topic:Hyperlinks - more than one possible hyperlink destinations?
Next Topic:Xtext 2.2.1 != Xtext 2.0.1 on Enumeration elements?
Goto Forum:
  


Current Time: Tue Apr 16 09:32:57 GMT 2024

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

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

Back to the top