rust-bakery / nom

Rust parser combinator framework
MIT License
9.18k stars 792 forks source link

[Feature Request] Pratt Parsing combinators #1690

Closed stefnotch closed 6 months ago

stefnotch commented 10 months ago

Implementing pratt parsing (or precedence climbing, which is supposedly the same algorithm) could be useful. I quite like it for parsing mathematical expressions with lots of different operators, since I no longer has to bend my parsing rules to fit, and can instead specify the binding power and associativity.

There are other libraries that have implemented this, for example

cenodis commented 6 months ago

Duplicate of https://github.com/rust-bakery/nom/issues/1625

stefnotch commented 6 months ago

Thanks, then I'll close this one