jwurzer / bantam-rust

This is a tiny little Rust app to demonstrate Pratt parsing.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bantam-rust

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).

About this Rust port

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.

Implementations & Ports

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

License

bantam-rust is licensed like the original bantam under the very permissive MIT license.

About

This is a tiny little Rust app to demonstrate Pratt parsing.

License:Other


Languages

Language:Rust 100.0%