A compiler for the Decaf programming language, written in OCaml. Wow!
Information about Decaf can be found here. This compiler outputs a 32-bit x86 Linux executable.
There's a little help from a runtime library written in C, and gcc to link and assemble the binary.
Ocaml 4.01.0 or later, including ocamlc, ocamlbuild, ocamllex, and ocamlyacc
Run make decafc
./decafc <file to be compiled> <output file>
compiles a decaf file and outputs
assembly in <output file.s>
and a binary in <output file>
The tests in the simple_tests
directory provide examples of what the compiler
supports in its current state.