Dear OCamlers,
I am happy to announce v3.0.0 of reparse
- an OCaml library for constructing various types of parsers in OCaml.
The release follows a complete overhaul of the internal working of the library to achieve the following goals:
-
Allow construction of efficient, zero-copy parsers. See String parser for example. The library provides a Make functor parametrised over a
Promise
and aInput
type allowing you control over both parser memory allocation and copying. -
Support usage of async libraries - lwt and async. Following the first point the library can now be used together with
lwt
and/orasync
. A lwt parse - for example - can now be used seamlessly with your other lwt code. The integration is seamless. -
Provide
Make_buffered
functor to produce parsers where the input type natively doesn’t allow random read, for example sockets, lwt streams and channels. There is now two new supporting packagesreparse-lwt
which provides parsing fromchar Lwt_stream.t
input type andreparse-lwt-unix
which provides parsing fromLwt_unix.file_descr
andLwt_unix.input_channel
respectively. -
Provide
Make_unbuffered
functor to produce parsers where the input type natively supports random read, for example strings, bigstrings, bytes. -
Introduce function
unsafe_any_char
to allow efficient (zero-copy?) parsing. -
Prune dependencies by removing
base
.
P.S. The documentation is bit behind in this release so please bear with me while work through the issues in the coming days.
Enjoy!
B.