Hey List,

It is with great pleasure that I announce the initial release of angstrom, a parser-combinator library that I have been developing over the past several months:

  https://github.com/inhabitedtype/angstrom
  http://opam.ocaml.org/packages/angstrom

Angstrom exposes monadic and applicative interfaces for composition, and supports incremental input through buffered and unbuffered interfaces. Both interfaces give the user total control over the blocking behavior of their application, with the unbuffered interface enabling zero-copy IO. Parsers are backtracking by default and support unbounded lookahead.

Whereas many OCaml parser combinator libraries claim heritage from the Parsec[0] Haskell library, angstrom instead follows the design and semantics of attoparsec[1], hence the name[2]. For a high-level comparison of Angstrom's features to other parser-combinator libraries, see the table included in the README:

  https://github.com/inhabitedtype/angstrom#comparison-to-other-libraries

The source distribution ships with a JSON parser, which I've benchmarked against ezjsonm and yojson. Yojson wins hands down (it benefits greatly from not having to support non-blocking incremental input), though the angstrom-based parser comes in second both in terms of latency and allocations. The results can be found here:

  https://gist.github.com/seliopou/7487875d36914efe74f736aaa3fbed16

There are several more performance improvements in the pipeline, which should further reduce allocation rates, in some cases dramatically so. More on that in the next release, along with other developments.

As always, issues and pull requests are welcomed.

-Spiros E.

[0]: https://hackage.haskell.org/package/parsec
[1]: https://github.com/bos/attoparsec
[2]: https://en.wikipedia.org/wiki/%C3%85ngstr%C3%B6m