ravener / bantam.py

A simple demo app for Pratt parsing in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bantam.py

This a port of Bantam to Python, which demonstrates Pratt parsing as part of this blog post

The code was written to mimic the original Java code as close as possible.

I've written everything in a single file to keep it simple, even though it ended up being over 500+ lines of code I think the concept should still be clear and you don't have to jump between files.

Usage

Simply grab the code and run it with:

$ python main.py

There are no external dependencies.

License

Released under the MIT License

About

A simple demo app for Pratt parsing in Python

License:MIT License


Languages

Language:Python 100.0%