Skip to content
This program compiles a modified version of Pascal into MIPS assembly
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
documentation
product
src
.gitignore
README.md
contributors.txt

README.md

#DESCRIPTION This project is a Mini-Pascal to MIPS assembly compiler. It is written in Java. The program parses an input pascal file utilizing its own custom scanner, which was generated using JFlex. The parser generates a symbol table and syntax tree for the pascal program. The syntax tree generated has code folding performed on it and is then traversed to generate the assembly code. The MIPS assembly can be run using the QtSpim simulator.

The program can be run from the command line using the compiled .jar file located in the product folder. Sample mini-pascal files can be found in src/pascalfiles. Use the following command while in the same directory as the .jar:

java -jar compiler.jar money.pas

Note: make sure your .pas file is in the same directory as well or include the path to it.

A .asm file with the same name as your mini-pascal file will then be generated in the same folder. Load that file into QtSpim and run.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.