1 / 7Writing a C Compiler: Build a Real Programming Language from Scratch
Real Programming Scratch: Writing a C Compiler is a hands-on book that guides readers through building a compiler for a significant subset of C. It covers parsing, program analysis and x64 assembly code generation, with algorithms in pseudocode so you can implement the compiler in a language of your choice.
At a glance
- Build a working compiler for a significant subset of C, adding features chapter by chapter.
- Learn lexer and recursive-descent parser concepts, including conversion of C code into an abstract syntax tree.
- Explore program analysis and generation of x64 assembly for operations, function calls and control flow.
- Algorithms are presented in pseudocode, allowing implementation in a programming language of your choice.
- Optimization topics include constant folding, dead store elimination and register allocation.
Reference price: $91.99
Price checked: Nov 13, 2026
View offerAhead of Black FridayExplore the selectionOften bought together
Pros and cons
Pros
- The project-based progression starts with a compiler for a simple C program and expands it incrementally.
- Pseudocode avoids tying the compiler implementation to one programming language.
- Combines compiler construction concepts with concrete x64 assembly code generation.
Technical specifications
7 specifications| Publisher | No Starch Press |
|---|---|
| Publication date | Aug. 20 2024 |
| Language | English |
| Print length | 792 pages |
| ISBN-13 | 978-1718500426 |
| Weight listed | 369 g |
|---|---|
| Dimensions | 17.93 x 3.33 x 23.65 cm |
What to know before buying
- The description says no prior compiler-construction or assembly experience is needed, but it does not specify prerequisite programming knowledge or provide a syllabus beyond the listed topics.
Who is it for?
A good fit for
- Programmers seeking a practical introduction to compiler construction through a substantial project.
- Readers interested in C language parsing, program analysis, x64 code generation and optimization.
- Developers who want pseudocode guidance that can be implemented in their preferred language.
Less suited to
- Readers seeking a reference limited to C syntax or application programming rather than compiler construction.
- Buyers who need a guide to a compiler target other than the described x64 assembly.

Customer reviews on Amazon
- 5 stars
68% 68% - 4 stars
15% 15% - 3 stars
12% 12% - 2 stars
5% 5% - 1 star
0% 0%
Aggregate ratings lean positive, with most ratings in the five-star category, but a smaller share falls in the middle and lower categories. Without review comments, those figures cannot explain what readers liked or disliked, so use the detailed topic coverage and project approach to judge fit.
Frequently asked questions
What does the book teach?
It guides readers through building a compiler for a significant subset of C, covering lexing, parsing, program analysis, x64 assembly code generation and selected optimizations.
Do I need to know assembly or compiler construction first?
The listing says no prior experience with compiler construction or assembly code is needed. It does not specify broader programming prerequisites.
Can I implement the compiler in a language other than C?
The algorithms are described in pseudocode, and the listing says you can implement the compiler in whatever language you like.
How long is the book?
The listed print length is 792 pages.

Alternative options

Hands-On Network Programming with C: Learn socket programming in C and write secure and optimized network code
$61.99

CPython Internals: Your Guide to the Python 3 Interpreter
$39.74

Quantum Readiness: Are You Ready?
$39.14

The Machine in the Back of the Book: Write an Emulator for a Lost 1984 Computer in Any Language, Then Run the Games and Story Printed Inside
$56.46

PLCs for Beginners: An introductory guide to building robust PLC programs with Structured Text
$53.92

TLS Cryptography In-Depth: Explore the intricacies of modern cryptography and the inner workings of TLS
$65.99

The Computer Science Principles: A Dynamic and Practical Approach
$28.00

Mastering PTX and SASS: Low-Level GPU Programming for NVIDIA Architectures
$52.51

Cahier d’écriture 3 ans: Lignes, Formes, Chiffres & Coloriage (French Edition)
$10.68

























