An OCaml to JS transpiler, complete with an LR(1) parser generator.
This project was built with OCaml version 4.06.1 and OUnit 2.0.8.
You must be running on a UNIX OS and have executables named node
and ocaml
located in your PATH to run the E2E tests.
Running make
will generate an executable named camljs
.
This might take a while on your first time as the grammar needs to be converted
to autogenerated source files.
To compile a file, run:
./camljs [input source file] [output js file path]
Running make test
will run the unit test suite.
Running make e2e-test
will run the end to end test suite.
Running make docs
will generate the documentation in the
folders doc.private
and doc.public
.
For converting your own grammars to parse trees, update grammar.json
and
run make grammar
. This will run the converter script and generate the
necessary source files in parser/
.