Ah! I completely forgot to mention: someone has written a C compiler in Python: http://people.cs.uchicago.edu/~varmaa/mini_c/ Atul documents the tools he had used to write the compiler, including PLY (Python Lex-Yacc). Hope this helps!