rust-bakery / nom

Rust parser combinator framework
MIT License
9.5k stars 805 forks source link

[Feature Request] Pratt Parsing combinators #1690

Closed stefnotch closed 11 months ago

stefnotch commented 1 year 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 11 months ago

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

stefnotch commented 11 months ago

Thanks, then I'll close this one