Skip to content

ketanch/Group_9_CS335_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compiler

This repository contains a C compiler made as part of compiler course (CS335). The compiler properties are:
Source Language : C
Implementation Language : python 3
Target Architecture : MIPS

Group Members

  1. Ketan Chaturvedi (190428)
  2. Sanjay Pander (190758)
  3. Priyanshu Yadav (190652)
  4. Hardik Sharma (190353)

How to Run

To run the parser, cd into the compiler directory and use the following command:

python3 src/parser.py

The above command will generate an assembly file out.s, which can be loaded into spim simulator and then executed. The output of parser is in output.s

Milestones

  1. Milestone 1 : Added compiler source language specifications
  2. Milestone 2 : Built lexer in python to tokenize C code
  3. Milestone 3 : Developed parser for the source language that outputs the Parser Automaton in a graphical form
    • Wrote grammer rules for the C language
    • Removed several reduce/reduce and shift/reduce conflicts
    • Used action table and goto table to generate .dot file which when processed by Graphviz, gave a Parser Automaton image file
  4. Milestone 4 : Added error handling to the parser
  5. Milestone 5 : Generated TAC code for the input code
  6. Milestone 6 : Bootstrapped the complete compiler. Added functionalities for code generation.

About

C compiler made as part of compiler course (CS335)

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages