"Have you written C code and <i>really</i> wondered how this turns into code that runs on a processor? Nora's book will not only help you see how that works but will help you to understand how to do these sorts of translations for your own assets, in language and code accessible to people without a PhD in compilers."<br /><b>—Lars Bergstrom, Director of Engineering at Google</b><br /><br />"This book is a great introduction to the topic of compilers for programming languages. It is extremely thorough, with many suggestions for further reading, while being quite enjoyable to read <b>— </b>a 'soup-to-nuts' treatment of compiler writing for C-like languages."<br /><b>—John Reppy, Professor of Computer Science, University of Chicago</b><br /><br />"It is refreshing to read a book on compiler design with a focus on implementing a practical real-world language, rather than working through dry academic exercises . . . practical, fun, and exciting to read if you are sick of reading textbooks on the subject." <br /><b>—Rick Battagline, author of <i>The Art of WebAssembly</i></b>
Introduction
Part I: The Basics
Chapter 1: A Minimal Compiler
Chapter 2: Unary Operators
Chapter 3: Binary Operators
Chapter 4: Logical and Relational Operators
Chapter 5: Local Variables
Chapter 6: If Statements and Conditional Expressions
Chapter 7: Compound Statements
Chapter 8: Loops
Chapter 9: Functions
Chapter 10: File-scope Variables and Storage-class
Specifiers
Part II: Types Beyond Int
Chapter 11: Long Integers
Chapter 12: Unsigned Integers
Chapter 13: Floating-Point Numbers
Chapter 14: Pointers
Chapter 15: Arrays and Pointer Arithmetic
Chapter 16: Characters and Strings
Chapter 17: Supporting Dynamic Memory Allocation
Chapter 18: Structures
Part III: Optimizations
Chapter 19: Optimizing Tacky Programs
Chapter 20: Register Allocation
Next Steps
Appendix A: Debugging Assembly Code with GDB or LLDB
Appendix B: Assembly Generation and Code Emission Tables
References