-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Steps to reproduce: Make the minus operator in ExpressionWithSynthesizedAttributes.tcs right associative and then run the TestOperatorParsingScenarios tests.
The actual problem is within the generated parsers:
public final void setOclRef(Object object, String propertyName, String keyName, Object keyValue, String query,
boolean optional, String propInitURI, ModelUpdaterRegistry modelUpdaterRegistry) {
ANTLR3LocationToken lastToken = (ANTLR3LocationToken) input.LT(-1);
<snip>
...
}
SetOCLRef is called within ret=exp.... But at this point in time the minus token has not yet been parsed. input.LT(-1) thus returns the wrong token. This leads to problems in any code relying on the token value (e.g., ReferenceHandlerImpl#resolveRemainingReferences)