diff --git a/bayesloop/parser.py b/bayesloop/parser.py index a5c3911..dfb3fe8 100644 --- a/bayesloop/parser.py +++ b/bayesloop/parser.py @@ -120,12 +120,12 @@ def __init__(self, *studies): atom = (parameter | fnumber) # expression based on operator precedence - self.expr = pp.operatorPrecedence(atom, [(funcop, 1, pp.opAssoc.RIGHT), - (atop, 2, pp.opAssoc.LEFT), - (expop, 2, pp.opAssoc.RIGHT), - (signop, 1, pp.opAssoc.RIGHT), - (multop, 2, pp.opAssoc.LEFT), - (plusop, 2, pp.opAssoc.LEFT)]) + self.expr = pp.infixNotation(atom, [(funcop, 1, pp.opAssoc.RIGHT), + (atop, 2, pp.opAssoc.LEFT), + (expop, 2, pp.opAssoc.RIGHT), + (signop, 1, pp.opAssoc.RIGHT), + (multop, 2, pp.opAssoc.LEFT), + (plusop, 2, pp.opAssoc.LEFT)]) def _evaluate(self, parsedString): """