Skip to content

Compiler (parsing, code gen, type cast/checking) for MeggyJava (including variable/function/class)

Notifications You must be signed in to change notification settings

jiahao42/MeggyJava-Compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MeggyJava Compiler

This is the course work for UVa CS6620, Compiler.

MeggyJava is a programming language based on MiniJava. It can be used to program Meggy Jr RGB, which is a handheld platform for developing your own pixel-scale video games.

This complier will translate MeggyJava code into AVR Assembly, which can be run on the simulator and Meggy Jr RGB device. Also, it will generate a dot file to visualize its AST and Symbol Table.

Usage

// using only lexer
java -jar MJPA2.jar example.java
// using compiler
java -jar MJ.jar example.java
// using simulator
java -jar MJSIM.jar -b -f example.java.s
// visualize AST
dot example.ast.dot -Tpng -o example.ast.png
// visualize Symbol Table
dot example.ST.dot -Tpng -o example.ST.png

For example, Test.java has the following AST and Symbol Table:

AST Symbol Table

About

Compiler (parsing, code gen, type cast/checking) for MeggyJava (including variable/function/class)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published