Skip to content

This is a tiny little C++ app to demonstrate Pratt parsing.

License

Notifications You must be signed in to change notification settings

jwurzer/bantam-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bantam-cpp

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

About this C++ port

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.

Implementations & Ports

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.

License

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

About

This is a tiny little C++ app to demonstrate Pratt parsing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published