-
Notifications
You must be signed in to change notification settings - Fork 14
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
Joop Leo's optimization? #24
Comments
Thank you for your feedback. Yes, in brief, I consider implementation of Joop Leo's optimization In fact, I believe Joop Leo's work is more important that one I tried to implement an Earley Parser which could be useful for But still it would be nice to parse LR(k > 1)-language by Earley Although I wanted to implement my Earley parser as a swiss knife for By the way, I have also yacc-like parser MSTA But even more I prefer to write manual parsers with backtracking if |
It is stated that YAEP doesn't use Joop Leo's optimization, and that right recursion is fast anyways. And because of the lookahead I do believe this to be true for some grammars, but not all LR(k) grammars. For example, the following LR(2) grammar:
Generates increasingly large set cores when parsing
"aaa...aaab"
, leading to (at least) quadratic behavior.Perhaps an optimization similar to Joop Leo's could be made, making YAEP linear time for all LR(k) grammars?
The text was updated successfully, but these errors were encountered: