A simple compiler for MiniJava written in Javascript for a compilers course at Rose-Hulman (CSSE 404).
HKCD takes an input file, parses it (using Jison), builds an Abstract Syntax Tree, type checks the program, and then generates byte code for the Jasmine (a Java VM).
HKCD is executing using the following command:
js lib/main.js [INPUT_FILE]
You can also pass the -d flag to print out debug information.
HKCD is made up of three basic modules: Parser, TypeChecker, CodeGenerator. Each of the modules can be executed individually using the same syntax as specified above (replacing main.js with the module name). There is also a Compiler module which simply drives the execution of the three individual modules (main.js is just a wrapper around Compiler.js).
TODO