mlml is a self-hosted toy compiler for a tiny subset of OCaml.
a detailed description can be found in my blog post (in Japanese): 自作OCamlコンパイラでセルフホストした - molecular coordinates
Printfopenmlml is self-hosted. i.e. mlml can compile itself.
./dev/exec.sh ./dev/self_host.sh
To obtain build artifacts, pass a path to local directory as below. You will see compiled binaries under ./self_host.
mkdir self_host
./dev/exec.sh ./dev/self_host.sh ./self_host
external definitions are only available for functionsfunction keyword does not make an expressionIf you have docker installed in your system, simply run
./dev/start.sh
to start the development.
You can run tests manually by running the following command:
./dev/exec.sh dune runtest
The code and algorithm in parser and lexer is strongly inspired by ushitora-anqou/aqaml
Content type
Image
Digest
Size
3.5 MB
Last updated
over 7 years ago
docker pull coorde/mlml