Interpreter for CoreJava[1] written in OCaml
- Install required dependencies using scripts/install_dependencies.sh
- Build test.ml using scripts/build_test.sh
- Run the test. Eg: " ./test.native ./core-java-files/helloworld.java "
- After updating the _oasis config file run
oasis setup -setup-update dynamic. - Compile:
make -j 4. The executables specified in the oasis file will be in the current directory with the extension.native. - Clean:
make clean - Rinse and repeat.
- Run scripts/ocp-indent.sh from the root of the repo.
The course CS 421: Programming Languages and Compilers[2] from the University of Illinois provides good resources. You can also check the examples of parsing from realworldocaml[3].
If make fails because it can't find a .native file, try to remove the src/_build directory and any .native files inside src/ and setup.data, setup.log from root. Also make clean ;).
Ah, you did not respect the rule above 👏. Try to clean all the files indicated above.
Also note that if you delete src/_build/ first in Atom editor it will not show the broken links src/*.native and you will still get an error if you try to make.
Go and delete the .native files manually.
This is probably due to you running menhrir -v src/parser.mly and the files generated
src/parser.ml and src/parser.mli. Manually remove them or run the sanitize script produced in _build/.