MODERN COMPILER IMPLEMENTATION IN JAVA - 2ND ED cambridge universit
This textbook describes all phases of a compiler; lexical analysis, parsing, abstract syntax, semantic actions, intermediate representations, instruction selection via tree matching, dataflow analysis...