Closed adMartem closed 7 months ago
Could you provide a code snippet of what you're trying to do?
What I am trying to do is: FooBarBaz : ATTEMPT "foo" "bar" =>|| "baz" RECOVER (FAIL);
. Other similar variants are: FooBarBaz : ATTEMPT ("foo" "bar" =>|| "baz") RECOVER (FAIL);
and FooBarBaz : (ATTEMPT "foo" "bar" =>|| "baz" RECOVER (FAIL));
. I think I have a fix that works, but due to the messiness of the method, I would like for you to take a look at it, and improve it if necessary. I'll do a PR for this issue with the proposed fix shortly.
Of course the entire
ATTEMPT ... RECOVER
can be enclosed in parentheses and then up-to-here used on the complete production, but that does not allow the up-to-here to be used for a leading subset of the component expansions. Quick examination of the code leads me to believe there is no good reason to disallow up-to-here within the recovery block when it is at the top level of the production or would be at what would be consider a choice point otherwise.