Howdy y’all ,
Containers 3.6 has just been merged on opam. Containers is a stdlib extension (not replacement) that aims at being lightweight, fast, and modular. This release comes with a renaming of CCOpt
to CCOption
(and associated deprecation, although it will not happen before 4.0), along with bugfixes and a revamp of the CCParse
module.
The new CCParse
is a small library of parser combinators that ships directly with containers
, and is intended for small parsers (where scanf
would be used otherwise, typically). In particular, I’ve tried to make it possible to mix “regular” forward parsers, and ad-hoc parsers based on splitting input on tokens (e.g. splitting into lines, splitting on a separator like ,
, etc.). The API is here and there are some examples:
- a tiny S-expression parser
- an IRC log parser (for weechat logs) that also illustrates the use of let-operators.
This module is still pretty experimental, so feedback is very welcome. Special thanks to @Fardale for his review.
Changelog and release are here.