Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
MiniJava compiler for RHIT compilers course (CSSE 404)
Java JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
MilestonePointers
Test
lib
src
.gitignore
.ojautotest
README.md
narwhal.conf
package.json
svn

README.md

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).

Usage

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.

Modules

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).

Implementation Details

TODO

Something went wrong with that request. Please try again.