Skip to content

jpinedaa/MiniJava-Compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MiniJava-Compiler

About

I use the javacc framework to implement the parser, using this framework I implemented the grammar. I used the java tree builder which integrates with javacc, the input is the grammar file and it outputs a javacc grammar file with the necessary code to build an AST. I use the necessary visitor classes to pass through the AST and build the symbol table and do the type and declaration checking and simultaneously generate the intermediate representation. I output the generated representation to output.txt

How to run

Compile parser by using the command: javac *.java

To run the program use the command: java Main < InputFile In this case the input file is Factorial.java so the command would be: Java Main < Factorial.java

The program will run and output the file output.txt which shows the Intermediate representation generated by the translator.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages