ECE 468/573 Project Home Page

Announcements

Introduction

This project consists of implementing a simple compiler for the so called LITTLE programming language. The LITTLE language is a toy programming language designed solely for this course and it's based (however different!) on the MICRO language described in the course text book. Pay careful attention: ECE 573 students have a slightly different grammar than ECE 468 students

Project TA

Aurangzeb will be grading the projects and answering questions. You can get in touch with him at orangzeb 'at' purdue 'dot' edu. He will also be in EE 207 from 6pm–7pm on Tuesdays, and 12:30pm–1:30pm on Wednesdays (right after 573 and right before 468).

Project Steps

Grading policy: All the points from the first 7 steps add up to 700 points (plus 10 bonus points from step0) and are worth total 30% of the project's total grade. The final step is worth 70% of the project's grade. Any submission will be tested against a set of published and hidden datasets. All hidden datasets will be published after the submission deadlines.

Running your compiler

We will compiler your compiler by running:

make clean; make compiler

Submit all source files and libraries necessary to build your compiler. Do not submit generated ANTLR-generated .java or Flex/Bison-generated .c/.cpp files. Submit the original source files and ensure that the Makefile calls ANTLR, Flex, Bison, etc. as part of its build process.

This is how we will test your compiler in Java:

java Micro -cp lib/antlr.jar:classes/ fibonacci.micro > fibonacci.scanner

This is how we will test your compiler in C/C++:

./Micro fibonacci.micro > fibonacci.scanner

Note that the input is being read in from a file passed as a command line argument, not redirected from STDIN, while the output is being redirected from STDOUT. If you are using a different language that C/C++ or Java, include a shell script in your submission called "Micro" that provides the same usage interface as in the C/C++ case above

We will be testing your project on the ecegrid-lnx machines, so please make sure that your projects compile and run on those systems!

Testing your generated code

For project steps 4–7, we will be testing your compiler by running your generated code through the Tiny simulator, a program that simulates a machine that supports the Tiny instruction set. A Linux version of the Tiny simulator is available here. You can also compile the Tiny simulator source yourself (you can change the number of registers by changing the NUMREGS #define).

Submission Instructions

See this page for the necessary directory structure for your project.

Submit each step using the turnin command. Instructions for using turnin are available here.

Tutorials