Skip to content

Latest commit

 

History

History
25 lines (15 loc) · 1.37 KB

README.md

File metadata and controls

25 lines (15 loc) · 1.37 KB

Python Compiler

This repository consists of two versions of a Python to x86 Compiler written in Python for a Compiler Construction class in Spring 2015.

Pythontox86Compiler

This version consists of source code upto the homework assignment 6 of Compiler Construction class. That is it consists of the subsets P0, P1, P2 and P3 of the Python language subsets agreed upon in the class.

Please visit the [course website] (https://www.cs.colorado.edu/~bec/courses/csci4555-s15/) for more information.

Refer the [class notes] (https://www.cs.colorado.edu/~bec/courses/csci4555-s15/reading/notes.pdf) to understand the assignments and compiler functionality.

Optimized Compiler

This version includes compiler optimizations for constant folding, constant propagation, algebraic transformations and conditional simplifications on top of the Pythontox86Compiler designed for the class.

Instructions to use the Compiler:

  • Clone the repository and change directory to any one of the versions of the compiler.
  • Refer Test-cases directory in each version and the class notes to understand the subsets of the language supported.
  • Run an example through the compiler by executing the run script (run.sh) with test file as an argument

./run.sh $test_file

Credits

The compiler is a combined effort of Aniket Lata and Brandon Ruffin.