A Compiler for Flair

CS 4550
Translation of Programming Languages
Fall Semester 2018

[ Source Language | Target Language | Project Modules | Project Teams ]

Source Language

Your compiler will take as input programs written in Flair, a language created for this course. Here is the language specification for Flair. Know it well!

Here is a directory of Flair programs that you can use to exercise the stages of your compiler. You can also download a compressed file containing the same directory and programs. (last update: 2018/12/11 -- fixed errors in divide-by-seven and tanton-palindromes that were found by Will Code for Food's parser!

Two notes:

I will add files to this set over time. Please send me any interesting Flair programs that you write!

Target Language

Your compiler will generate as output programs written in the assembly language of TM, the Tiny Machine created by Kenneth Louden. Here is the machine specification for TM and its assembly language.

By convention, .tm is the standard extension for TM source files.

You can download a software implementation of TM either as a tarred, gzipped file or as individual files from this directory. (last update: 2010/08/20 -- posted the initial code).

The directory contains four C programs, which ar a sequence of TM simulators:

It also contains two versions of a sample TM program from Louden's text.

Project Modules

You will build your compiler in phases. Links are added as modules are assigned.

  1. scanner -- due Friday, September 14
  2. parser, step 1 -- due Friday, September 28
  3. parser, step 2 -- due Friday, October 12
  4. semantic checker -- due Friday, October 26
  5. code generator, step 1 -- due Friday, November 9
  6. code generator, step 2 -- due Friday, November 30
  7. final submission -- due Friday, December 7

Your six deliverables for the project will consist of a single project directory that you grow over the course of the semester.

Your compiler may contain only code written by you, by one of your teammates, or by a program that you write. It should contain no code written by any other person or generated by any program that you did not write.

Project Teams

Based on the information you provided me, I have created the following teams:

The individuals marked by a * are the team captains.

Here are some management tips that you can use to organize and run your project. Note that each team is required to select a team leader, or captain, who will serve as the primary contact for the team.

Eugene Wallingford ..... wallingf@cs.uni.edu ..... September 7, 2018