How to Write a Compiler

Back in my high school days, I found that I liked knowing the hoary details of low level computer operations: assembly language, instruction decoding, firmware and register manipulation.

One regret I’ve had, though, is not ever taking a Compilers course. That is, how to write a compiler for a language like C or C++. Unlike some of the fruitier “Learn to code in Pascal, LANGUAGE OF THE FUTURE” courses, writing a compiler is a marriage between expression of code in a high level language and implementation in nice spurts of machine code. While I have no great desire to write compilers for a living, I do wish I knew more about how they work. So I was bopping around the web today and came across Inger, an open-source compiler with an e-book. Cool. And also Open C++, an open-source C++ compiler project. The Internet rocks.