06-11-2012, 07:29 PM
Hi, Britlion.
In effect, the operators priority was not the standard one.
I think this one is the expected one. :?:
Note: The "left" and "right" refers to the operator associativity. Less precedence is on top, higher precedence is on the bottom (so POW -> ^ is takes the highest precedence). Also now BOR, BAND and BXOR have higher precedence than =, <>, >=, <= etc... (relational operators, here named EQ, NE, LE, etc...)
In effect, the operators priority was not the standard one.
I think this one is the expected one. :?:
Code:
('left', 'OR'),
('left', 'AND'),
('left', 'XOR'),
('right', 'NOT'),
('left', 'LT', 'GT', 'EQ', 'LE', 'GE', 'NE'),
('left', 'BOR'),
('left', 'BAND', 'BXOR', 'SHR', 'SHL'),
('left', 'BNOT', 'PLUS', 'MINUS'),
('left', 'MOD'),
('left', 'MUL', 'DIV'),
('right', 'UMINUS'),
('right', 'POW')