CS 4300
Fall 2009
Lab1
Due Friday, September 18, 2009 (upload by midnight)

A Calculator Program in Flex and Bison


Assignment:

The purpose of this assignment is to familiarize you with using flex and bison and getting them to work together on our systems.

1. Implement the code provided in chapter 1 of flex and bison for a calculator (start on page 5).
2. Compile and run Examples 1-3, 1-4, 1-5, and 1-6.
3. Once you have completed #2, add a few more rule as described on page 15.

Hint: there is a typo in the bison code in the book. Check the errata.

What To Turn In:

Each individual will turn in their source files (.l and .y) and a script, showing that they ran through the steps above and tested the calculator.
Upload the files electronically through the CS Homework Submission System.