Browse Source

Fixed operator precedence for power and modulo operator thanks to help from Joachim Klein.

tempestpy_adaptions
Matthias Volk 5 years ago
parent
commit
9e63a89db7
  1. 4
      src/storm-parsers/parser/ExpressionParser.cpp

4
src/storm-parsers/parser/ExpressionParser.cpp

@ -91,9 +91,9 @@ namespace storm {
unaryExpression.name("unary expression"); unaryExpression.name("unary expression");
if (allowBacktracking) { if (allowBacktracking) {
infixPowerModuloExpression = unaryExpression[qi::_val = qi::_1] >> -(infixPowerModuloOperator_ >> expression)[qi::_val = phoenix::bind(&ExpressionCreator::createPowerModuloExpression, phoenix::ref(*expressionCreator), qi::_val, qi::_1, qi::_2, qi::_pass)];
infixPowerModuloExpression = unaryExpression[qi::_val = qi::_1] >> -(infixPowerModuloOperator_ >> unaryExpression)[qi::_val = phoenix::bind(&ExpressionCreator::createPowerModuloExpression, phoenix::ref(*expressionCreator), qi::_val, qi::_1, qi::_2, qi::_pass)];
} else { } else {
infixPowerModuloExpression = unaryExpression[qi::_val = qi::_1] > -(infixPowerModuloOperator_ >> expression)[qi::_val = phoenix::bind(&ExpressionCreator::createPowerModuloExpression, phoenix::ref(*expressionCreator), qi::_val, qi::_1, qi::_2, qi::_pass)];
infixPowerModuloExpression = unaryExpression[qi::_val = qi::_1] > -(infixPowerModuloOperator_ >> unaryExpression)[qi::_val = phoenix::bind(&ExpressionCreator::createPowerModuloExpression, phoenix::ref(*expressionCreator), qi::_val, qi::_1, qi::_2, qi::_pass)];
} }
infixPowerModuloExpression.name("(infix) power/modulo expression"); infixPowerModuloExpression.name("(infix) power/modulo expression");

Loading…
Cancel
Save