Skip to content

This repository contains code for a Python to x86 compiler written in Python

Notifications You must be signed in to change notification settings

aniketalps/Compiler-Construction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

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.

About

This repository contains code for a Python to x86 compiler written in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published