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
Promiseand aInputtype 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
lwtand/orasync. A lwt parse - for example - can now be used seamlessly with your other lwt code. The integration is seamless. -
Provide
Make_bufferedfunctor 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-lwtwhich provides parsing fromchar Lwt_stream.tinput type andreparse-lwt-unixwhich provides parsing fromLwt_unix.file_descrandLwt_unix.input_channelrespectively. -
Provide
Make_unbufferedfunctor to produce parsers where the input type natively supports random read, for example strings, bigstrings, bytes. -
Introduce function
unsafe_any_charto 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.