From 5e6cec5f58c679a6bb715a9080805a50c3c425ea Mon Sep 17 00:00:00 2001 From: lafrite Date: Sun, 19 Jan 2014 18:44:16 +0100 Subject: [PATCH] change priority of "/" to have the priority over "*" and ":" --- expression.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/expression.py b/expression.py index ff616d1..c268135 100644 --- a/expression.py +++ b/expression.py @@ -10,7 +10,7 @@ from formal import FormalExp class Expression(object): """A calculus expression. Today it can andle only expression with numbers later it will be able to manipulate unknown""" - PRIORITY = {"*" : 3, "/": 3, ":": 3, "+": 2, "-":2, "(": 1} + PRIORITY = {"*" : 3, "/": 4, ":": 3, "+": 2, "-":2, "(": 1} def __init__(self, exp): """ Initiate the expression