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
While working on parser, I've run into a scenario where <|> results in an error when I run a <|> b, but gives a result when running b <|> a, if b recognizes the string given.
The end_of_input error you get in the arith <|> app case isn't caused by the expr_parser not succeeding, but by succeeding without consuming the whole input with ~consume:All. (This is the case, because the arith parser succeeds by consuming only the first xin the input, resulting in <|> succeeding. I.e. the order matters, because both parser succeed.)
Hello,
While working on parser, I've run into a scenario where
<|>
results in an error when I runa <|> b
, but gives a result when runningb <|> a
, ifb
recognizes the string given.Below is a small example to reproduce this:
With the above,
parse "x x"
fails, but when flippingarith <|> app
toapp <|> arith
,parse "x x"
succeeds, rather than both working as expected.The text was updated successfully, but these errors were encountered: