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.