Sorry about the mixture of English and Portuguese in my previous message. My cell phone thinks it knows what I want to say. The message should be: I am writing a new paper about the recovery mechanism. I hope the first version of the paper will be ready in a few weeks.
On Sun, May 21, 2017 at 11:26 AM, Sérgio Medeiros <sqmedei...@gmail.com> wrote: > LPegLabel provides a recovery mechanism based on labels plus a recovery > operator: > https://github.com/sqmedeiros/lpeglabel > > The use of labels was discussed in a paper about error reporting . Isso > amanhã writing a new paper about the recovery mechanism. I hope the first > version oferece the paper will be ready in a few weeks. > > Em 21/05/2017 06:51, "Juancarlo Añez" <apal...@gmail.com> escreveu: > >> Hello Daniel, >> >> > What has been done about parser recovery over quasi-valid input in PEG? >>> >>> That probably depends on the language you are defining. >> >> >> Interesting thought. I agree. >> >> >>> The core idea is to have a grammar rule R which defines the content of a >>> section, while a rule T defines the terminator for that section. We than >>> have a rule template 'recoverable<R,T>' which tries to parse a sequence of >>> R and T. If that fails, it skips over the input until it can parse T, >>> calling an action for the skipped part of the input to allow error >>> reporting/recording, then continues after T. You can use recoverable<R,T> >>> multiple times in your grammar to allow as-local-as-possible recovery. We >>> haven't used it in practice, though. >> >> >> I've inserted that kind of rule manually into some parsers, not for >> recovery, but to skip over uninteresting parts of the input (which is kind >> of what recovery needs to do). >> >> Perhaps hand-crafted recovery (a recipe) using recovery rules is the way >> to go? >> >> >> -- >> Juancarlo *Añez* >> >> _______________________________________________ >> PEG mailing list >> PEG@lists.csail.mit.edu >> https://lists.csail.mit.edu/mailman/listinfo/peg >> >> -- Sérgio
_______________________________________________ PEG mailing list PEG@lists.csail.mit.edu https://lists.csail.mit.edu/mailman/listinfo/peg