Loonie PerksDeals for Canada
Search
Product guide

Writing 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.
Price
$72.12Save 22%

Reference price: $91.99

Price checked: Nov 13, 2026

View offerAhead of Black FridayExplore the selection

Often 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
Publication details
PublisherNo Starch Press
Publication dateAug. 20 2024
LanguageEnglish
Print length792 pages
ISBN-13978-1718500426
Dimensions and installation
Weight listed369 g
Dimensions17.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.
Writing a C Compiler: Build a Real Programming Language from Scratch · photo 2
Additional product photo 2

Customer reviews on Amazon

4.4 / 5 · 73 ratings
  • 5 stars68%68%
  • 4 stars15%15%
  • 3 stars12%12%
  • 2 stars5%5%
  • 1 star0%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.

Writing a C Compiler: Build a Real Programming Language from Scratch · photo 3
Additional product photo 3

Alternative options

Products with discounts that might interest you

4.9
Magic Tree House Books 13–16 Boxed Set
Magic Tree House Books 13–16 Boxed Set

C$38

C$26.45

-30%
-30%
Product details in Markdown