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
If one alternative succeeds and performs an ascend and later another alternative from the same recursion depth finds a loop then the combination of that ascend and loop is missed.
For example the expr2 test case:
expr2 = 'expr2::= number 10<|>(+)<$> expr2 <* char '+'<*> expr2
There are probably several ways to solve this. One way could be to remember the final results of ascends such that they can be used if a loop is found in the future.
Or perhaps we could process all alternatives until either a loop is found or input is consumed. And collect all the loops that way before continuing to parse the non-loopy alternatives. That would require some special treatment of empty parsers.
The text was updated successfully, but these errors were encountered:
If one alternative succeeds and performs an ascend and later another alternative from the same recursion depth finds a loop then the combination of that ascend and loop is missed.
For example the
expr2
test case:There are probably several ways to solve this. One way could be to remember the final results of ascends such that they can be used if a loop is found in the future.
Or perhaps we could process all alternatives until either a loop is found or input is consumed. And collect all the loops that way before continuing to parse the non-loopy alternatives. That would require some special treatment of empty parsers.
The text was updated successfully, but these errors were encountered: