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