Skip to content

sabhayasaumil/Compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compiler

A compiler based on book: Compiler Construction Using Java, JavaCC and Yacc by Anthony J. Dos Reis. This project is done as a part my academic project but the special thing about this compiler is that it generates highly optimized machine language code.

Optimization Stats

-------------------- Expected output Code's output Optimization %
Machine code size 812 686 15.52%
machine instruction 382 283 25.92%
Execution time 8158 6073 34.33%

How to run

  • Compile the code by following command: javac Compiler.java
  • Input: input is a file with extension .s and is made up of statements mentioned in supported statements
  • Run the code against input by command: java compiler <fileName>.
    • NOTE: command does not take input file's extention
  • Output will be generated as .a in the same folder. eg. Input: input.s and Output: input.a

Supported statements

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published