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

Left recursive checks #371

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Left recursive checks #371

wants to merge 3 commits into from

Conversation

zesterer
Copy link
Owner

No description provided.

@m-hugo
Copy link

m-hugo commented Mar 17, 2023

false positive? this https://github.com/m-hugo/hugoc/tree/f39632f5f9d1d1bb658d051764cf38eabd2b3018
panics on debug but runs fine on release (except for a surprising found end of input expected something else before the actual end of the file)
slapping a dozen memoized in other places doesn't remove that Recursive parser defined at src/main.rs:43:9 is left-recursive. Consider using .memoized() or restructuring this parser to be right-recursive.

@zesterer
Copy link
Owner Author

false positive?

Yep, this is why this isn't merged yet. The check assumes that parsers are functionally pure, but .memoized() messes with this assumption for implementation reasons. I've yet to come up with a reliable and efficient way around it. When I do, I'll try to get this merged.

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.

None yet

3 participants