From 8a98696ca4892b669df248db7a7094b393d78143 Mon Sep 17 00:00:00 2001 From: Oleg Smirnov Date: Mon, 7 Oct 2024 13:55:04 +0200 Subject: [PATCH] fixes #339 --- scabha/evaluator.py | 2 +- tests/scabha_tests/test_parsing.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scabha/evaluator.py b/scabha/evaluator.py index 3cefc07a..06f873c2 100644 --- a/scabha/evaluator.py +++ b/scabha/evaluator.py @@ -319,7 +319,7 @@ def construct_parser(): (Literal("&"), 2, opAssoc.LEFT, BinaryHandler.pa), (Literal("^"), 2, opAssoc.LEFT, BinaryHandler.pa), (Literal("|"), 2, opAssoc.LEFT, BinaryHandler.pa), - (reduce(operator.or_, map(Literal, ("==", "!=", ">", "<", ">=", "<="))), 2, opAssoc.LEFT, BinaryHandler.pa), + (reduce(operator.or_, map(Literal, ("==", "!=", ">=", "<=", ">", "<"))), 2, opAssoc.LEFT, BinaryHandler.pa), (CaselessKeyword("in")|CaselessKeyword("not in"), 2, opAssoc.LEFT, BinaryHandler.pa), (CaselessKeyword("not"), 1, opAssoc.RIGHT, UnaryHandler.pa), (CaselessKeyword("and")|CaselessKeyword("or"), 2, opAssoc.LEFT, BinaryHandler.pa), diff --git a/tests/scabha_tests/test_parsing.py b/tests/scabha_tests/test_parsing.py index 697eeed6..aa329049 100644 --- a/tests/scabha_tests/test_parsing.py +++ b/tests/scabha_tests/test_parsing.py @@ -12,6 +12,7 @@ def test_parser(): "a.b + b.c - c.d", "a.b + b.c * c.d", "a.b + -b.c", + "a.b <= 0", "a.b", "IFSET(a.b)", ]: