A compiler for a tiny (but growing!) subset of C, written in OCaml.
OCaml
303
85 commits
updated Jul 14, 2022
This repo is no longer active. I'm working on a new version of NQCC - I'll link to it here once it's released!
A compiler for a tiny (but growing!) subset of C, written in OCaml.
opam init
opam install oasis
opam install batteries
opam install ounit # only needed for tests
make
nqcc script in the project root./nqcc /path/to/source.c
The compiled executable will be in the same directory as the source file, and have the same name (e.g. source in the example above).
ocaml setup.ml -configure --enable-tests # you only need to run this once
make test # run unit tests
./test_examples.sh # compile sample programs
You can also test against this test suite.
OCaml
97.7%
Shell
1.4%
A compiler for a tiny (but growing!) subset of C, written in OCaml.
OCaml
303
85 commits
updated Jul 14, 2022
This repo is no longer active. I'm working on a new version of NQCC - I'll link to it here once it's released!
A compiler for a tiny (but growing!) subset of C, written in OCaml.
opam init
opam install oasis
opam install batteries
opam install ounit # only needed for tests
make
nqcc script in the project root./nqcc /path/to/source.c
The compiled executable will be in the same directory as the source file, and have the same name (e.g. source in the example above).
ocaml setup.ml -configure --enable-tests # you only need to run this once
make test # run unit tests
./test_examples.sh # compile sample programs
You can also test against this test suite.
OCaml
97.7%
Shell
1.4%