You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update rules to forbid ambiguous boolean operator precedence
And Or precedence is well defined in general. And is a higher precedence than or and
should be evaluated first, but it causes enough mistakes that I have decided to raise
a parsing error when things like A | B & C happen. Now the user must include some grouping
with [] to specify the precedence
Also with the grammer change, it was easiest to make or and and chain
together, like PipeChain instead of nesting.
This should ideally also be more efficient.
f"Possible ambiguous use of '&' or '|' without surrounding brackets `[ ]`. Check that you don't have a situation like `A | B & C` or `A & B | C`. These are generally not allowed because they can be ambiguous. These should be written as `[A | B] & C` or `[A & B] | C`: {expr_str}."
361
+
) frome
362
+
raiseRuleError(
363
+
f"Error parsing rule expression for unknown reason. Possible hints could be found in the above exceptions from the parsing library Lark: {expr_str}"
0 commit comments