This is a tiny little Rust app to demonstrate Pratt parsing. For a full explanation, see Bob Nystrom's blog post Pratt Parsers: Expression Parsing Made Easy.
This is a Rust port of Bob Nystrom's bantam. The original bantam is implemented in Java (see: https://github.com/munificent/bantam).
This Rust port can be found on github at https://github.com/jwurzer/bantam-rust.
This Rust version is similar in structure and design to the original Java version.
The error handling is done with the panic!
macro. If a parsing error happened then
an error message is printed and the program is stopped. For recoverable error
handing checkout the branch with-error-handling
(https://github.com/jwurzer/bantam-rust/tree/with-error-handling) instead of
this master
branch.
Original bantam in Java by Bob Nystrom.
This Rust port by Jürgen Wurzer.
C# port by John Cardinal.
C++11 port by Jürgen Wurzer
C++20 port by Stefan Boca
bantam-rust is licensed like the original bantam under the very permissive MIT license.