Skip to content

Commit

Permalink
fix parser
Browse files Browse the repository at this point in the history
  • Loading branch information
christophmark committed Dec 4, 2021
1 parent ea2285b commit d429d39
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bayesloop/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down

0 comments on commit d429d39

Please sign in to comment.