Skip to content

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

License

Notifications You must be signed in to change notification settings

jwurzer/bantam-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages