3 ms·
A number of people have recommended David R. Hanson's C Interfaces and Impementations, so I'll mention his A Retargetable C Compiler: Design and Implementation.
by Maro 17y ago
A number of people have recommended David R. Hanson's C Interfaces and Impementations, so I'll mention his A Retargetable C Compiler: Design and Implementation. I own this book though I haven't read it, but it's about writing a C compiler in C. You should pretty much just go out and buy these two books because they'll eventually go out of print, and then you'll be screwed. CII used to be out of print and impossible to obtain until Addison-Wesley started printing it again a year ago.
- tptacek 17y agoYou should read it! It's fantastically written, and goes from a hand-written C lexer all the way to x86 code generation. Hanson's books are written in literate code style, and it's a shame that that style went out of fashion, because it is the answer to how to write code-heavy books.