This is a python implementation of JamieBuild's "Super Tiny Compiler"
JamieBuilds developed a wonderfully educative compiler example a few years ago in Javascript, and this is a 250 line python implementation. It's the code for this live Battle Royale game show hosted by Siraj Raval on Youtube. It takes an input expression in LISP and converts it into C.
- copy
- re
Type 'python compiler.py' into a command line to run this code. You can switch out the input expression in the main function with your own to test out different outputs.