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

Parser doesn't seem to support left recursion #60

Open
clache547 opened this issue Jun 18, 2024 · 1 comment
Open

Parser doesn't seem to support left recursion #60

clache547 opened this issue Jun 18, 2024 · 1 comment

Comments

@clache547
Copy link

I was trying to run some basic grammar that had some left recursion and realized that the parser doesn't seem to support that. Is there a reason for that/would it be possible for the parser to support that?

@Saibo-creator
Copy link
Collaborator

Hello @clache547 , you are right. Our parser is a recursive descent parser which doesn't support left-recursion by construction. There are two solutions:

  1. transform the grammar to avoid left-recursion, this is always possible. See this related issue
  2. update the parser to a version that supports left-recursion such as Earley Parser. But we don't foresee such a major update in the short future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants