Skip to content

Instantly share code, notes, and snippets.

View cjsmeele's full-sized avatar
🐪
​🦋🐧

Chris Smeele cjsmeele

🐪
​🦋🐧
View GitHub Profile
@cjsmeele
cjsmeele / parser-combinators.py
Last active September 7, 2020 21:41
Parser combinators in Python3 (bad)
# Parser combinators in Python3 - Chris Smeele, 2020.
#
# This code works. Just not very good, due to it mapping very badly to
# Python's execution model (it blows up with recursion depth).
# It's also incredibly ugly, since Python very much does not want you to write
# code in this style.
# Creating it was a nice exercise however.
#
# I hereby release this awful code into the public domain.
# Please leave it there and don't try to actually use it :-)