Skip to content

msroque/cmpe152

Repository files navigation

CMPE 152 - Complier Design

This is the final Project for the Complier Design class made in 2020. The project is a language called Michelle similar to C/C++.

This language includes:

  • Arithmetic Operations
  • Assignment Statements
  • Conditional and Looping Control Statements
  • Print Statements / Variables
  • Function Calls (pass by value)
  • Function Declarations
  • Function Returns

Getting Started

Prerequisites

Instructions

  1. Create a new C++ project in Eclipse
  2. Set up configurations to generate jasmin files (.j)
  3. Set C++ dialect to C++ 11, the library should include antlr4-runtime in the C++ linker
  4. Create the grammar file using antlr 4.8

  1. Compile the program in Eclipse
    1. In run configurations, provide a name
    2. Add your sample code filename in the arguments under program arguments
  2. Build and run the project in order to generate the jasmin code

Running Tests

  1. Go to the terminal, and change the directory to the jasmin folder
  2. Build the class file
java -jar jasmin.jar[YourJasminFileName + .j]
  1. Execute the class file
java -cp .:PascalRTL.jar [YourJasminFileName]

Here is an example using this project's sample.j file

Credits

Project was created for the Compiler Design course at San José State University.

Course is headed by Ronald Mak.

Project created by Michelle Roque, Jason Chong, Joshua Gadia, and Jonathan Naraja.

About

Final Project for Complier Design class

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published