Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 951 Bytes

File metadata and controls

17 lines (12 loc) · 951 Bytes

Please contact me at [email protected] for access to code.

WLP4 compiler and MIPS assembler

A compiler for a subset of C++ and assembler for a subset of MIPS

Usage:

Let's say the file needed to compile is called hello_world.wlp4.

Run the following command: wlp4scan <hello_world.wlp4 | wlp4parse | wlp4gen >out.mips where out.mips is the output file containing the MIPS assembly language.
The file out.mips can be assembled by asm <out.mips >binary where binary is the binary executable.

Breakdown:

wlp4scan scans the wlp4 file and tokenizes this file.
wlp4parse reads the tokenized version and outputs a parse tree, checking for compiler errors.
wlp4gen reads the parse tree and prints out the assembly language file.
asm assembles a MIPS file into a binary executable.