Hasty Briefsbeta

Bilingual

Working through 'Writing A C Compiler'

10 months ago
  • #Book Review
  • #C Compiler
  • #Programming
  • The author decided to create a C compiler for the Hack processor from the nand2tetris book.
  • Found the book 'Writing a C Compiler' by No Starch Press and decided to work through it chapter by chapter.
  • The book is praised for its step-by-step approach, starting with a simple compiler in Chapter 1 that can handle basic return statements.
  • Each subsequent chapter adds more features, like unary operators in Chapter 2.
  • The book provides a large test suite for each chapter, allowing testing of various stages like lexer, parser, semantic analysis, etc.
  • The author has forked the original test suite and made some changes for Windows support.
  • The author is implementing the compiler in Rust and plans to blog about each chapter.
  • The book is highly recommended despite some minor criticisms that may be mentioned in future posts.