Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Duplicate methodes in generated SemanticSequencer
Duplicate methodes in generated SemanticSequencer [message #1065599] Wed, 26 June 2013 15:38 Go to next message
Jens Kuenzer is currently offline Jens KuenzerFriend
Messages: 29
Registered: October 2009
Junior Member
Hi,

I slightly modified the arithmetics example (every thing else says untouched):
Expression:
	Signed;

Signed returns Expression: 
	Addition | ({UnaryOperation} op=('+'|'-') operation=Addition);

Addition returns Expression:
	Multiplication ({Operation.left=current} op=('+' | '-') right=Multiplication)*;

Multiplication returns Expression:
	Absolute ({Operation.left=current} op=('*' | '/') right=Absolute)*;

Absolute returns Expression:
	PrimaryExpression | ({UnaryOperation} op='ABS' operation=PrimaryExpression);


This somehow confuses the AbstractSemanticSequencer so that it generates this function twice:
	/**
	 * Constraint:
	 *     ((op='ABS' operation=PrimaryExpression) | ((op='+' | op='-') operation=Addition))
	 */
	protected void sequence_Absolute_Signed(EObject context, UnaryOperation semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}


I am not sure what happens here, maybe the Constraint.getSimpleName() is not unique.
As a workaround I use two different names for the two UnaryOperation.
Re: Duplicate methodes in generated SemanticSequencer [message #1066202 is a reply to message #1065599] Mon, 01 July 2013 14:15 Go to previous messageGo to next message
Jens Kuenzer is currently offline Jens KuenzerFriend
Messages: 29
Registered: October 2009
Junior Member
I hit this kind of problem again but in a different case.
Am I doing soenthing wrong or is this a bug in the SerializerFragment ?
Re: Duplicate methodes in generated SemanticSequencer [message #1066212 is a reply to message #1066202] Mon, 01 July 2013 14:51 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
I guess it is a bug

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Duplicate methodes in generated SemanticSequencer [message #1066252 is a reply to message #1065599] Mon, 01 July 2013 17:39 Go to previous message
Jens Kuenzer is currently offline Jens KuenzerFriend
Messages: 29
Registered: October 2009
Junior Member
Thank's for answer.
I created Bug 412044 so that it don't get lost.
Previous Topic:restriction/clear of index
Next Topic:How to use xtext and xpand together
Goto Forum:
  


Current Time: Thu Apr 18 23:30:44 GMT 2024

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

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

Back to the top