Parser generators / combinators comparison?

I know about nearly 10 parser generator / combinators on Rust.
Does exist any comparisons of performance of them?
Does anyone support additive/delta parsing?

1 Like

Out of curiosity, what's additive/delta parsing ?

1 Like

I assume it means incremental parsing i.e. When you parse a string, modify it locally and then parse that modified string with the same parser, that parser would only have to do the marginal amount of work to get the new parse tree rather than fully parsing the altered string.

2 Likes

Ah ok, like rust_analyzer does then. Thanks.

That's right.

If you have a list handy, I'd like to see it. Just so I have a list to get started with.

I think the big three libraries for writing parsers are (in alphabetical order)

More are listed at Parser tooling — list of Rust libraries/crates // Lib.rs.

Of those three, I suspect LALRPOP would be the easiest for a beginner. Combine (which I tend to use) uses more complicated type parametrization, which can make rustc's error messages difficult to understand. Nom was known for being based on macros, which can make rustc's error messages difficult to understand, but I understand that it switched away from macros (I guess it became more like Combine?).