Skip to content

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

Notifications You must be signed in to change notification settings

huyndo/WLP4-compiler-and-MIPS-assembler-public

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published