I'm really just describing how a compiler works. Are you looking for references on the compilation process? There's a classic series called "Let's Build a Compiler" (http://news.ycombinator.com/item?id=1727004) available online that walks through building a simple compiler. Then there's also actual textbooks, but I was not impressed with either of the two textbooks I've had on the topic. Many people recommend "Compilers: Principles, Techniques, and Tools" (http://dragonbook.stanford.edu/) also referred to as just the dragon book. If you're not averse to textbooks, you may also want to check out Michael Scott's "Programming Language Pragmatics" (http://www.cs.rochester.edu/~scott/pragmatics/).