← All projects
Project record1 mention
Originally shared on Hacker News

C compiler in Python (Writing a C Compiler project)

A C compiler implemented in Python, built by working through Nora Sandler's Writing a C Compiler book. It handles operations on differently sized types and uses pseudoregisters to defer register allocation, with optimization chapters (framed as interesting algorithm problems) as the next focus.

Last shared
01 / Source history

Shared over time

Each entry reflects what was shared on that date. Details may have changed since then.

  1. C compiler in Python (Writing a C Compiler project)

    A C compiler implemented in Python, built by working through Nora Sandler's Writing a C Compiler book. It handles operations on differently sized types and uses pseudoregisters to defer register allocation, with optimization chapters (framed as interesting algorithm problems) as the next focus.

    Posted by @piinbinary · Original source ↗

    Source text · @piinbinary · · Source ↗

    I've been going through Nora Sandler's Writing a C Compiler book and writing a compiler in Python. I'm excited to start the chapters on optimization - those seem like the most fun algorithm problems.