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

Make our Lexers Infallible #649

Open
InsertCreativityHere opened this issue Aug 5, 2023 · 0 comments
Open

Make our Lexers Infallible #649

InsertCreativityHere opened this issue Aug 5, 2023 · 0 comments
Labels
enhancement New feature or request hard
Milestone

Comments

@InsertCreativityHere
Copy link
Member

LALRPOP's error recovery logic only allows it to recover from errors originating in LALRPOP.
So, if the lexer returns an error (say because a user typed '%', an unknown symbol in Slice) we would be incapable of recovering from it.

Instead, we should add an extra 'error' token to the lexers, and return Ok(error_token) to signal a lexer error, rather than Err(...). This will allow LALRPOP to gracefully recover from such lexer failures.

@InsertCreativityHere InsertCreativityHere added this to the 0.2 milestone Aug 9, 2023
@InsertCreativityHere InsertCreativityHere modified the milestones: 0.2, Future Sep 19, 2023
@InsertCreativityHere InsertCreativityHere added enhancement New feature or request hard labels Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hard
Projects
None yet
Development

No branches or pull requests

1 participant