Liking cljdoc? Tell your friends :D

parsesso

Parser combinators for Clojure(Script).

cljdoc badge Clojars Project

Motivation

  • Idiomatic and convenient API for parser combinators in Clojure and ClojureScript.

Inspiration

Cheat sheet

ParsessoParsec1,2,3Kern4Parsatron5
p/resultreturnreturnalways
p/failfailfailnever
p/fail-unexpectedunexpectedunexpected
p/expecting<?>, label<?>, expect
p/bind>>=>>=bind
p/fordobindlet->>
p/after>>>>>>, nxt
p/valuefmap<$>
p/maybetry<:>attempt
p/look-aheadlookAheadlook-aheadlookahead
p/not-followed-bynotFollowedBynot-followed-by
p/*manymanymanymany
p/+manymany1many1many1
p/*skipskipManyskip-many
p/+skipskipMany1skip-many1
p/tokentoken, satisfysatisfytoken
p/token-not
p/wordtokens, stringtoken*string
p/any-tokenanyToken,anyCharany-charany-char
p/eofeofeofeof
p/group<*><*>
p/alt<|>, choice<|>choice
p/optionoption, optionaloption, optional
p/betweenbetweenbetweenbetween
p/timescounttimestimes
p/*many-tillmanyTillmany-till
p/*sep-bysepBysep-by
p/+sep-bysepBy1sep-by1
p/*sep-end-byendByend-by
p/+sep-end-byendBy1end-by1
p/*sep-opt-bysepEndBysep-end-by
p/+sep-opt-bysepEndBy1sep-end-by1
p/get-stategetParserState...input, pos, user state
p/set-statesetParserState...input, pos, user state
p/update-stateupdateParserState...user state
p/traceparserTrace, parserTraced
expr/*chain-leftchainlchainl
expr/+chain-leftchainl1chainl1
expr/*chain-rightchainrchainr
expr/+chain-rightchainr1chainr1
char/ischar, oneOfsym*, one-of*char
char/is-notnoneOfnone-of*
char/regex
char/upper?upperupper (unicode)
char/lower?lowerlower (unicode)
char/letter?letterletter (unicode)letter (unicode)
char/number?digitdigit (unicode)digit (unicode)
char/letter-or-number?alphaNumalpha-num (unicode)
char/white?spacewhite-space (unicode)
char/newlineendOfLinenew-line*
char/str* <+>

Examples

Performance

See some benchmarks here.

Can you improve this documentation? These fine people already did:
serioga & Sergey Trofimov
Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close