/decaf-compiler

a compiler for decaf language

Primary LanguageAssembly

Decaf Compiler

Compiler Project Fall 1400 - Shahid Beheshti University

About Decaf Language

Decaf is a simple object oriented language similar to C/C++/Java. The features of this language has been simplified to be implemented easier. Yet, it's still powerful enough to be used to write some interesting programs.


Project Description

Description
Scanner

Phases

Scanner Scanner
Parser Scanner
Codegen Scanner

How To Run

1- Compile JFlex

First, you must install Jflex

jflex src/Scanner.flex

or you can use jar file in the project

java -jar src/jflex-1.8.2.jar src/Scanner.flex

2- Compile CUP

cd src/
java -jar java-cup-11b.jar parser.cup

3- Compile Compiler

javac -cp "java-cup-11b.jar:java-cup-11b-runtime.jar:jflex-full-1.7.0.jar Main.java"

Contributers

Ali Noorkazemi

Ehsan Jafari Moghadam