plex icon indicating copy to clipboard operation
plex copied to clipboard

supporting error recovery?

Open richox opened this issue 7 years ago • 0 comments

error recovery is important for practical parser, is there any plan that plex will support it? for example, when we are failed to parse a statement, we skip remaining tokens until we met a semicolon:

program {
    => vec![],
    => program[mut z1] statement[z2] => {z1.push(z2); z1},
}
statement {
    expression[z1] Semicolon => Statement::Expression(z1),
    .* Semicolon => Statement => Statement::Error,
}

richox avatar Sep 07 '18 07:09 richox