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

many and takeWhile crash in combination #82

Open
r-toroxel opened this issue Jan 27, 2018 · 1 comment
Open

many and takeWhile crash in combination #82

r-toroxel opened this issue Jan 27, 2018 · 1 comment

Comments

@r-toroxel
Copy link

There is no termination, once the compiler starts on
val la = many(takeWhile(c => c != 'r')).parseOnly("awe").

@tpolecat
Copy link
Owner

Yeah many doesn't work with parsers that can successfully consume zero characters; you can parse an infinite number of empty strings. I'm not sure how to fix this without distinguishing between empty and non-empty parsers at the type level.

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

No branches or pull requests

2 participants