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
I'm trying to parse mathematical expressions with operator precedence, but I'm running into an odd problem where a rule of the form "A | B" fails to match, despite the fact that rule A matches the input string.
A stripped-down version of the grammar that exhibits this behavior:
In the larger original code, unit was a literal or a variable name. For the purpose of this example it should have been changed to just a literal. Regardless, the expected behavior should be to never evaluate the right side of the pipe in oplevel_mult_and_higher.
I'm trying to parse mathematical expressions with operator precedence, but I'm running into an odd problem where a rule of the form "A | B" fails to match, despite the fact that rule A matches the input string.
A stripped-down version of the grammar that exhibits this behavior:
Then I get
I don't see how it's even possible for oplevel_mult_and_higher to fail when the first arm is oplevel_mult, which passes.
The text was updated successfully, but these errors were encountered: