gallais / idris-tparsec

TParsec - Total Parser Combinators in Idris
https://gallais.github.io/idris-tparsec/
GNU General Public License v3.0
93 stars 10 forks source link

add except and notChar #20

Closed andrevidela closed 5 years ago

andrevidela commented 5 years ago

Hi, I needed those two functions in a project. @clayrat suggested they could fit here.

gallais commented 5 years ago

Thanks for the PR. I like the combinators, I'm not sure about the names.

Rather than except I would rather have anyTokenBut. And notChar could be anyCharBut to keep the same naming scheme.

I think it would also be nice to have noneOf : List (Tok p) -> All (Parser mn p (Tok p)) as the converse of anyOf and the n-ary version of anyTokenBut.

andrevidela commented 5 years ago

@gallais I've implemented the changes you asked, could you take a look?