Let’s Build a Compiler (1995)
This series of articles is a tutorial on the theory and practice of developing language parsers and compilers. I also take a page from the work of Ron Cain, the author of the original Small C. Whereas almost all other compiler authors have historically used an intermediate language like P-code and divided the compiler into two parts (a front end that produces P-code, and a back end that processes P-code to produce executable object code), Ron showed us that it is a straightforward matter to make a compiler directly produce executable object code, in the form of assembler language statements. One final caveat: One of the principles we’ll be sticking to here is that we don’t fool around with P-code or imaginary CPUs, but that we will start out on day one producing working, executable object code, at least in the form of assembler language source.
Source: xmonader.github.io