It needs:
- ocaml >= 4
- menhir (opam install menhir)
- batteries (opam install batteries)
Usage:
- make
- Lexer (lexer.mll)
- Parser (parse.mly)
- Check types (semant.ml)
- Translate to intermediate code (semant.ml, translate.ml)
- Split code into basic blocks (bblock.ml)
- Liveness analysis (TODO)
- Register allocator (TODO)
- Translate to assembler (z80machine.ml)
Modern Compiler in ML [https://github.com/rohankshir/compiler-sml]
- ir phi
- strings
- assign stmt
- && ||
- structs