Reparse – A comprehensive parser combinator for OCaml
github.com
github.com
I also find them much more controllable and manageable in practice. I think that’s a common experience with imperative parsing in general, as it’s the approach used in I’d say the majority of industrial compilers.
> It's hard to beat a nice BNF grammar; In fact they felt the need to put the BNF grammar
The BNF grammar there is incomplete compared to their actual code, it’s just a sketch it doesn’t completely describe the accepted language, so hard to argue it’s better as you wouldn’t be able to do anything with it!
I much prefer parser combinators over anything else I've tried that generates code.