DeepRead
Cover of Writing a C Compiler

Writing a C Compiler

Nora Sandler · 2023

Programming and computer science › Compilers and interpreters

#5,128 most recommended

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

02.552024202520262026 peak · 5
This bookAverage book in Compilers and interpreters

In the commenters’ own words

What Open Library readers say

No Open Library reader has rated it yet.

  • 8 want to read
  • 0 reading
  • 0 have read

Open Library’s page for the book

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

Explore in the mosaic

Read next: its neighbours on the mosaic