#Pyret OCaml Port This repository is a port of the Pyret compiler to OCaml, primarily for my own personal learning's sake. Be warned: this entire repository is a construction zone!
The gameplan for this project is as follows:
- Do a direct port from the Pyret self-hosted compiler to OCaml (in progress; mostly done)
- Refactor the port to better coincide with OCaml idioms
- Add various abstractions, hopefully culminating in the ability to have multiple compiler targets
To build the compiler, you must have OCaml (tested with v4.01.0) and OPAM installed.
If it is your first time building the compiler, you should run make deps
first.
The Makefile
has the following targets:
make
: Createsmain
, which takes a Pyret file and prints its Javascript compiled output to STDOUTmake run-tests
: Buildsrun-tests
, which runs the compiler's test suitemake show-parse
: Buildshow-parse
, a utility which takes a Pyret file and displays its parse treemake clean
: Cleans up any object files made during the build process
This repository is licensed under the GNU Public License, version 3.