tpolecat / atto

friendly little parsers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

many and takeWhile crash in combination

r-toroxel opened this issue · comments

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

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.