Core concepts of Angstrom parsers
masterAngstrom is a high-performance parser-combinator library designed for network protocols and serialization formats.
Key characteristics include:
- Monadic and Applicative interfaces: Allows for expressive and reusable parser composition.
- Backtracking by default: Unlike many other OCaml parser libraries (like Parsec derivatives), you do not need an explicit
trycombinator to backtrack; it is the default behavior. - Unbounded lookahead: Supports looking ahead in the input stream without limits.
- Incremental Input: Supports both buffered and unbuffered interfaces. The unbuffered interface enables zero-copy IO.
- Concurrency Support: Unlike libraries that rely on lazy character streams, Angstrom provides non-blocking incremental interfaces that are compatible with monadic concurrency libraries like
AsyncandLwt.