
Writing a C Compiler
Nora Sandler · 2023
Programming and computer science › Compilers and interpreters
#5,128 most recommended
Hacker News
10
mentions by 7 people · top 29% of 15,732 books
Open Library
—
No ratings yet
8 want to read
Wikipedia
—
No article yet
About the book
Writing a C Compiler is a hands-on guide to building a compiler for a significant subset of C that emits x64 assembly code. It covers lexing and recursive descent parsing into an abstract syntax tree, program analysis for detecting errors, and code generation for arithmetic, function calls, and control flow. The book's central claim is that compilers are not mysterious and can be learned by building one, starting from a compiler for the simplest possible C program and adding features chapter by chapter. It assumes no prior experience with compiler construction or assembly language. Its algorithms are given in pseudocode so readers can implement them in any language, and later chapters introduce optimizations such as constant folding, dead store elimination, and register allocation.
Written by Claude from what it knows of this book.
What Hacker News says 100% recommend · 0% critical
In the commenters’ own words
This might interest you: Writing a C Compiler by Nora Sandler (No Starch Press). You create a working C compiler that outputs x64 assembly language in the…
Very cool. I think Wasm is a nice instruction set, but I agree that its structured control flow is a bit weird and also the lack of instructions to handle the…
What Open Library readers say
No Open Library reader has rated it yet.
- 8 want to read
- 0 reading
- 0 have read
What critics say, via Wikipedia
No Wikipedia article about this book yet, so no critics to quote.
Reddit communities — coming later
Details
- First published
- 2023
- ISBN
- 9781718500426
- Editions known
- 2 at Open Library
- Open Library
- OL28062343W
Read next: its neighbours on the mosaic
Crafting InterpretersRobert Nystrom · 2021 · recommended by 295 people · 3 people recommended both
Practical C ProgrammingSteve Oualline · 1991 · recommended by 7 people · similar by subject and what people say about it
Essentials of CompilationJeremy G. Siek · 2023 · recommended by 17 people · similar by subject and what people say about it
Compiler design in CAllen I. Holub · 1990 · recommended by 11 people · similar by subject and what people say about it
Modern compiler implementation in CAndrew W. Appel · 2004 · recommended by 8 people · similar by subject and what people say about it
Engineering a compilerKeith D. Cooper · 2004 · recommended by 39 people · similar by subject and what people say about it
Writing compilers and interpretersRonald Mak · 1991 · recommended by 4 people · similar by subject and what people say about it
Compiler constructionNiklaus Wirth · 1996 · recommended by 30 people · similar by subject and what people say about it
Advanced compiler design and implementationSteven S. Muchnick · 1997 · recommended by 13 people · similar by subject and what people say about it
Compilers, principles, techniques, and toolsAlfred V. Aho · 1986 · recommended by 195 people · similar by subject and what people say about it
Build Your Own Programming LanguageClinton L. Jeffery · 2021 · recommended by 1 person · similar by subject and what people say about it
A retargetable C compilerChristopher W. Fraser · 1995 · recommended by 9 people · similar by subject and what people say about it
Introduction to Compilers and Language DesignDouglas Thain · 2019 · recommended by 4 people · similar by subject and what people say about it
Basics of compiler designTorben ©. Mogensen · 2010 · recommended by 4 people · similar by subject and what people say about it
Building GitJames Coglan · 2021 · recommended by 19 people · similar by subject and what people say about it
SSA-Based Compiler DesignFabrice Rastello · 2021 · recommended by 3 people · similar by subject and what people say about it
Modern compiler designDick Grune · 2000 · recommended by 12 people · similar by subject and what people say about it
Building a DebuggerSy Brand · 2025 · recommended by 8 people · loosely similar by subject
Understanding and Writing CompilersRichard Bornat · 1979 · recommended by 4 people · similar by subject and what people say about it
Writing A Compiler In GoThorsten Ball · 2018 · recommended by 33 people · similar by subject and what people say about it
The Elements of Computing SystemsNoam Nisan · 2005 · recommended by 204 people · 2 people recommended both
Introduction to Compiler DesignTorben Ægidius Mogensen · 2017 · recommended by 1 person · similar by subject and what people say about it
Literate programmingDonald Knuth · 1992 · recommended by 18 people · similar by subject and what people say about it
Language Implementation PatternsTerence Parr · 2009 · recommended by 18 people · similar by subject and what people say about it