// the find
J-F-Liu/pom
PEG parser combinators using operator overloading without macros.
pom is a PEG parser combinator library for Rust that uses operator overloading (+, -, *, |, !, -p) to build parsers without proc macros or code generation. It targets developers who want to write a parser in pure Rust code without a separate grammar file or macro DSL. The JSON example in the README gives a clear picture of what using it actually feels like.
The operator overloading API is genuinely clever — `p - q` returns left, `p * q` returns right, `p + q` returns a pair, and the precedence rules actually match common parsing intent. No proc macros means compile times stay sane and you can step through parser logic in a debugger like normal code. The `call()` combinator handles mutual recursion cleanly, which trips up a lot of combinator libraries. Documentation is honest: the README shows real benchmark numbers and doesn't hide that pest is 46x faster.
That benchmark is the elephant in the room — 620µs vs 13µs for JSON parsing is not a rounding error, and the repo offers no explanation or path to improvement. Error messages are weak; the `name()` combinator helps but you're still getting positional offsets, not the kind of structured diagnostics that nom or chumsky produce. The library operates on byte slices (`u8`) primarily, and UTF-8 support is bolted on as a separate module rather than being a first-class concern. Travis CI badge is broken (travis-ci.org is dead), and the last meaningful activity is sparse — 526 stars but only 34 forks and slow maintenance suggests it's more of a teaching artifact than a production tool.