~dannypsnl/minic

minimal compiler tutorial
1fb43248 — Lîm Tsú-thuàn 26 days ago
add flake.nix
ed7a2eab — Lîm Tsú-thuàn a month ago
[draft] add explicate_loop to explicate control flow of loop
194c90f3 — Lîm Tsú-thuàn a month ago
format

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~dannypsnl/minic
read/write
git@git.sr.ht:~dannypsnl/minic

You can also use your local clone with git send-email.

#minic

This is a minimalist compiler course, based on Essential of Compilation, compiles a limited scheme variant to aarch64 assembly.

#Installation

Before start developing, you will need to run below code to install dependencies

opam install --deps-only --with-test .

#Learning

To use this project to learn how to make a compiler, read the followings by order

  1. Arithmetic compilation
  2. Boolean and Control flow

#Usage

Nows, you can run build, test

dune build
dune runtest

, and of course, check the example by the command below

dune exec minic -- ./example/hello.mml

main branch is not stable, there might have some example cannot work, if you're a learner then goes to Release and pick a branch first. Each release is a stable version, written examples should be runnable