Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

supporting error recovery? #32

Open
richox opened this issue Sep 7, 2018 · 0 comments
Open

supporting error recovery? #32

richox opened this issue Sep 7, 2018 · 0 comments

Comments

@richox
Copy link

richox commented Sep 7, 2018

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,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant