From d429d399ee3308874aaf2f94ef098d627aa72e69 Mon Sep 17 00:00:00 2001 From: Christoph Mark Date: Sat, 4 Dec 2021 13:09:57 +0100 Subject: [PATCH] fix parser --- bayesloop/parser.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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): """