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

Do not explore beyond rule stop states when computing possible next tokens during error recovery #85

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

br0nstein
Copy link

Fixes #84

@br0nstein
Copy link
Author

Note this aligns with the implementation of https://github.com/antlr/antlr4/blob/v4.11.1/runtime/Java/src/org/antlr/v4/runtime/atn/LL1Analyzer.java#L186

Running performance tests against java.lang classes directory shows no impact to the execution time.

@br0nstein
Copy link
Author

@sharwell can you review when you have a chance? If this optimized fork is still maintained. After merging I will port to the Typescript and C# optimized fork targets as well.

@KvanTTT
Copy link
Contributor

KvanTTT commented Nov 6, 2023

If this optimized fork is still maintained.

I'm afraid it's not.

@daniellansun
Copy link
Contributor

@br0nstein LGTM, so I merged your PR into my fork[1] and released 4.13.1.1, which will be used by Apache Groovy[2].

[1] daniellansun@0e8c76e
[2] apache/groovy@b48a51b

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

Successfully merging this pull request may close these issues.

Error recovery does not work correctly for grammars that contain fully-optional rule bodies.
3 participants