atto icon indicating copy to clipboard operation
atto copied to clipboard

many and takeWhile crash in combination

Open r-toroxel opened this issue 7 years ago • 1 comments

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

r-toroxel avatar Jan 27 '18 08:01 r-toroxel

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.

tpolecat avatar Jan 29 '18 05:01 tpolecat