This is a tiny little C++ app to demonstrate Pratt parsing. For a full explanation, see Bob Nystrom's blog post Pratt Parsers: Expression Parsing Made Easy.
This is a C++ port of Bob Nystrom's bantam. The original bantam is implemented in Java (see: https://github.com/munificent/bantam).
This C++ port can be found on github at https://github.com/jwurzer/bantam-cpp.
This C++ version corresponds as best as possible to the original Java version. It uses C++11. This C++ port is implemented as a header-only library. All necessary files are located in the include directory. The member functions are implemented directly in the according class in the header file instead of in a separate C++ file. This also has the advantage that it looks even more like the Java version. Only the test program for testing the implementation is located in the C++ file src/main.cpp.
Original bantam in Java by Bob Nystrom.
This C++11 port by Jürgen Wurzer.
C++20 port by Stefan Boca.
Rust port by Jürgen Wurzer.
C# port by John Cardinal.
bantam-cpp is licensed like the original bantam under the very permissive MIT license.