Parser Combinators Experience?

Hi there,

Anyone here first hand experience with parser combinator libraries like Parsec, Sprache, Pidgin, or similar?

I need to implement a small expression language and embed it into an existing desktop application. Given the small scope of the language I’m considering using a parser combinator library instead of a generator framework like Antlr, but I wonder if it might fall short eventually.

Thanks,
Robert

1 Like

Make sense to me, Robert.
I used pegjs, now peggy in similar contexts with good results.
Also, PEG grammars are easily composable.

Pedro J.

1 Like

Thanks Pedro,
How has the error reporting been with peggy? It looks like it is generally a bit more challenging to get good parsing errors using combinators. I’ve seen one library that tries to address this by first tokenizing the input string and have the parsers operate on the tokens rather than the character sequence (it is called Superpower). I’ll give it a try tomorrow.