2013-08-08

webfind: Bootstrapping a simple compiler from nothing

This document is a case study of writing and bootstrapping a compiler for a simple (but structured) language from scratch. It targets i386 Linux. It starts from a single hex-to-binary converter, and repeats this many times: write a little compiler for a little bit smarter language in the old language, compile it, then rewrite it to the new language. After about a dozen iterations a compiler for a structured language is created. See also the source code. Done in 2001.

2 comments:

zsbana said...

See also a somewhat similar compiler, though with fewer bootstrap steps and targetting DOS (on x86_16).

zsbana said...

(continuing previous comment) by VTToth at http://www.vttoth.com/CMS/projects/49-w-a-simple-programming-language