Skip to content

chandlerkent/HKCD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

MiniJava compiler for RHIT compilers course (CSSE 404)

Resources

Stars

Watchers

Forks

Packages

No packages published