#x86 #compiler #scheme

nightly bin+lib inc

Incremental approach to compiler construction

5 releases

0.1.3 Dec 13, 2019
0.1.2 Sep 14, 2019
0.1.1 Jun 24, 2019
0.1.0 Jun 24, 2019
0.0.1 Jun 24, 2019

#684 in Programming languages

37 downloads per month

MIT license

105KB
2K SLoC

An Incremental scheme compiler

A tiny scheme to x86 asm compiler as described in the paper An Incremental Approach to Compiler Construction by Abdulaziz Ghuloum.

Where do I get started? 🕵️‍♀️

Read the first few sections of the paper to understand the premise.

There is a mix of Scheme, C, Rust and x86 assembly here and these are some good places to start learning them.

Compile the project and run a few sample programs (see README.md or tests) before diving deep into the code.

The core module contains the main data types used by the compiler and is a good place to start reading the code. parser implements a scheme parser using nom can be understood independently from the rest of the project. immediate documents the runtime representation of the scheme objects. rt and ffi describe the runtime nuances like memory management while lang implements language level semantics like functions and variables.

See docs for some additional notes and comments.

Dependencies

~1–9.5MB
~66K SLoC