Expose the limit to 'fix' input.
Hi,
I wonder if it is possible to raise the limit that the parser has to correct input in multiple ways. I'm writing a parser for Turtle for a language server, and for the following document it suggest one edit, but I actually want to discover both.
<a> <b>
<c> <d> <e>.
This document might be corrected to (insert a ';' which the parser found)
<a> <b> <c>;
<d> <e>.
Or to (insert a
<a> <b> <undefined>.
<c> <d> <e>.
My .y file currently supports to transform <a> <b> into <a> <b> <undefined> ., thus I was trying to make the parser return multiple suggestions, even though the others are way less viable.
Is this possible with grmtools?
Parsers / Yacc is not my cup of thee sadly :/
It's difficult to say if this is the expected behaviour or not (it's very grammar dependent). If you search for RECOVERY_TIME_BUDGET you can increase the timeout, but notice that memory does increase in proportion, and setting a sensible upper limit for all situations isn't easy. Note also that error recovery will often appear to perform better in --release mode because of the timeout, so that's worth trying too (in case you're only trying debug mode).