Combinaml.0.1 released - a customizable parser combinator library

This is my first public ocaml package. Please let me know if you have any feedback or advice on how I can improve it.

Its meant to be similar to angstrom except more easily customizable and with a few api differences here and there which i found useful.

I was using angstrom to parse peg grammars and ran into issues i could only solve by adding a tokenization step. This seemed messy so I decided to write this library and found a solution which solves the problem using an until parser like this:

let definition =
  lift2 pair (ident_str <* leftarrow)
    (until (ident_str <* leftarrow) expression)

let grammar =
  spacing *> many1 definition <* is_end_of_input >>| fun defs -> Grammar defs

It was just merged into ocaml/opam-repository a couple of hours ago and doesn’t seem to show up in opam search yet. I’m sure its a caching issue and will be there soon.

3 Likes

Its up on opam now: opam - combinaml