Skip to content

A compiler for the Decaf programming language, written in OCaml for cs126 at Brown University. Wow!

Notifications You must be signed in to change notification settings

JosiahCodeberry/deancaf

 
 

Repository files navigation

decaf

A compiler for the Decaf programming language, written in OCaml. Wow!

The language:

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.

Dependencies:

Ocaml 4.01.0 or later, including ocamlc, ocamlbuild, ocamllex, and ocamlyacc

To build:

Run make decafc

To run:

./decafc <file to be compiled> <output file> compiles a decaf file and outputs assembly in <output file.s> and a binary in <output file>

Functionality:

The tests in the simple_tests directory provide examples of what the compiler supports in its current state.

About

A compiler for the Decaf programming language, written in OCaml for cs126 at Brown University. Wow!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • OCaml 96.0%
  • C 3.7%
  • Makefile 0.3%