gallais / idris-tparsec

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

Add various `parse` functions #3

Open gallais opened 6 years ago

gallais commented 6 years ago

The one function in TParsec.Running is only ever useful to write down examples but not to actually use it. It'd be nice to have specialised runners for input String vs. Text and output Maybe a or List a.

clayrat commented 6 years ago

I made a parseMaybe function for internal use which is very similar to parse, only returning Just/Nothing instead of Singleton/Void. Not sure about returning List though. Also what do you mean by Text?

clayrat commented 4 years ago

We currently have parseMaybe, parseType, parseResults and parseResult - do you have any other useful variations in mind, or should we close this?