Readers of this thread may be interested in the asp (algebraic staged parsing) library (also described in the Transept post linked above), which is built on an approach along the lines @gasche describes:
- combinators that describe a grammar (using context-free expressions)
- an analysis (formulated as a type system) that ensures deterministic parsing
- staging to eliminate performance overhead
The interface is pretty standard, with combinators for alternation, sequencing, etc., and performance is quite good (better than ocamlyacc on our benchmarks).
There’s a paper, A typed algebraic approach to parsing, that describes the design in more detail.
Grammars built using asp are essentially LL(1). (The weasel word “essentially” isn’t hiding much here, but the paper has the details.)