On Mon, May 26, 2014 at 11:00 AM, Terence Parr <pa...@cs.usfca.edu> wrote:

> Hi. Just curious. Has anyone figured out how to get good error reporting
> and recovery in PEGs? I.e., competitive with deterministic parsers?
>

Grako uses exceptions to backtrack, and the position of a parse error is
stored in the exception. To get precise error locations, the "cut"
expression must be used throughout.

The parser generator informally computes lookaheads so meaningful
expectations can be reported when all branches of a choice fail.

Grako does not attempt error recovery.

-- 
Juancarlo *Añez*
_______________________________________________
PEG mailing list
PEG@lists.csail.mit.edu
https://lists.csail.mit.edu/mailman/listinfo/peg

Reply via email to