News for hackers. Stuff that matters.
Re:A Python Interpreter Written in Rust by losvedir on Saturday February 02, 2019 @02:34PM (#19065114)
Totally different use cases. nom/pest/combine are parser combinators, where you stitch the functions together yourself. LALRPOP is more in the vein of yacc where you specify the grammar and it generates the Rust parsing code for you in a build step.
Re:A Python Interpreter Written in Rust by surajrmal on Saturday February 02, 2019 @03:13PM (#19065395)
pest isn't a parser combinator. It also uses a grammar file.
Re:A Python Interpreter Written in Rust by losvedir on Saturday February 02, 2019 @03:43PM (#19065587)
Oh, wow! Thanks for the correction. I had somehow missed that. I'm working on a rust parser of Elixir myself, and using LALRPOP for it. But looks like I'll have to check out pest, too. LALRPOP has the advantage that it takes a BNF grammar, which the Elixir parser in erlang includes, so it's a somewhat straightforward translation. Not too sure how similar it is to a PEG grammar that pest takes.
Re:A Python Interpreter Written in Rust by ltratt on Sunday February 03, 2019 @04:08AM (#19068540)
LALRPOP is an LR parser, which is a very different formalism to PEG: it's easy to write a grammar in either that's difficult/impossible to express in the other.

If you'll permit the immodesty, another Rust parser is lrpar (https://crates.io/crates/lrpar) which is a more direct drop-in replacement for Yacc, but with better error recovery. [Note: I'm biased because I wrote parts of lrpar and the wider framework, grmtools, it's a part of.]