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
Based on the timing, I suspect this was encountered during Advent of Code 2020 day 19. At least that's how I found it, although I'm running a few weeks late.
I'm getting the same behavior. Inspecting the current code in the repo here doesn't look like it would produce the error, although the binary on nuget certainly does.
If I get sufficiently motivated, I may try to repro using source. Depending how that turns out, I might even attempt a PR.
Anyway, for whatever it's worth, I reduced the test case a bit further.
var R4 = Parse.Char('a');
var F4 = Parse.Ref(() => R4);
var top = F4.Or(F4);
Console.WriteLine(top.TryParse("b").WasSuccessful);
Expected result: prints "true"
Actual result: Exception
Parsing failure: unexpected 'b'; expected a (Line 1, Column 1); recently consumed:
This only occurs if Ref and Or are used - if you substitute either of the commented out lines for the ones above them, the error does not occur.
I presume #129 was not fixed properly.
I tested with Sprache 2.3.1 and 2.3.2-develop-00043
The text was updated successfully, but these errors were encountered: