For years the standard text for compiler classes was Principles of Compiler Design by Aho and Ullman, universally known as "the Dragon book" because of it's colorful cover cartoon of St Hacker slaying the jolly green giant dragon of Compiler Complexity. (I presently have two copies of this on my shelf.)
There is a wonderful underground cartoon showing some armor picked clean, with the caption "Sometimes the dragon wins" which really belongs somewhere in the book. I gave up my own compiler project after three years...
In 1986, the Dragon book burst its cocoon and emerged twice as big, as Compilers: Principles, Techniques and Tools, by Aho, Sethi and Ullman: Addison-Wesley ISBN 0-201-10088-6. I have a whole shelf of other compiler tomes, but none I like nearly as well. So far as I know, it remains the standard text in the field.
I can't resist mentioning one favorite related book:
Realistic Compiler Generation, by Peter Lee. MIT Press 1989, ISBN 0-262-12141-7, part of the Foundations of Computing Series.
The compiling field is clearly mired in the dark ages at present: This book provides a glimpse of the future, generating a compiler from high-level descriptions of both the syntax and the semantics of the language, not to mention of the target machine.
Go to the first, previous, next, last section, table of contents.