Hello. I recently wrote a paper about error recovery in PEGs based on the use of labeled failures: https://arxiv.org/pdf/1806.11150.pdf https://dl.acm.org/citation.cfm?doid=3167132.3167261
The main idea is to attach a recovery rule to a label. When a label is thrown (which indicates an error) we check whether it has a recovery rule. In case it does not, the matching ends and we report an error based on the label thrown. In case a label has a recovery rule, we use it to reach a synchronization point in the input and then resume parsing The current implementation of LPegLabel (version 1.5) is based on the semantics described in such paper. -- Sérgio
_______________________________________________ PEG mailing list PEG@lists.csail.mit.edu https://lists.csail.mit.edu/mailman/listinfo/peg