Skip to content

Latest commit

 

History

History
24 lines (15 loc) · 890 Bytes

README.md

File metadata and controls

24 lines (15 loc) · 890 Bytes

A decaf compiler in C++

This is a Decaf Compiler which I implemented in C++. This is the project of the compiler design and principle instructed by Dr Mohammad Reza Bahrami. The course material is available here.

How the compiler works?

It uses the flex to tokenize the inputs, then the tokenized input is given to bison to be parsed. Finally bison calls our codegens available in the codegen subdirectory.

What does the run.sh do?

It first runs uses cmake to create the build files. Then make is used to build the project. Finally spim is used to simulate the mips assembly generated by us to check whether the given tests are passed or not.

What is needed for builing the project?

  • cmake
  • make
  • flex
  • bison

What is to be done?

  • Implementing recursion.
  • Fixing bugs.