-
Notifications
You must be signed in to change notification settings - Fork 37
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
Cannot recover from gap while searching for lookahead #1231
Labels
Bug
Something isn't working
Comments
bbannier
added a commit
that referenced
this issue
Jul 6, 2022
During trial mode we might call `advance` to find a synchronization point. If any of the bits touched by that fall into a gap, this can trigger a `MissingData` exception. In this patch we emit an additional `try`/`catch` block around the `advance` if we search for a lookahead in `Try` mode. We can then recover from `MissingData` by jumping to the next non-gap block in the input. Closes #1231.
bbannier
added a commit
that referenced
this issue
Jul 7, 2022
During trial mode we might call `advance` to find a synchronization point. If any of the bits touched by that fall into a gap, this can trigger a `MissingData` exception. In this patch we emit an additional `try`/`catch` block around the `advance` if we search for a lookahead in `Try` mode. We can then recover from `MissingData` by jumping to the next non-gap block in the input. Closes #1231.
bbannier
added a commit
that referenced
this issue
Jul 7, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
At least in some situations when a parser encounters a gap while searching for a lookahead token one cannot recovery with
&synchronize
/confirm
, e.g.,Looking at the backtrace, this error originates in stage 1 parsing which has no recovery code,
The text was updated successfully, but these errors were encountered: