CSCI 431 Homework 2

time due submission file
10:25 PM Friday 2 September, 2005 csci/431/HW2/Assign2.atg & csci/431/HW2/Scantest.java

Getting ready

Download the ZIP files AECocoR.zip and ArithExp.zip. If you plan to do the assignment at home, you'll also need the Java Development Kit, NetBeans, and Coco/R. These are all available through the Internet. If you want to work on the RH004 lab computers, you should find the Coco/R "compiler" in the directory /usr/local/csci/431/bin. This is all set up for you in the Makefile.

AECocoR.zip contains a Makefile and ArithExp.atg, a attribute grammar input file for Coco/R. ArithExp.zip will unZip to a NetBeans project. If you don't use NetBeans, you'll find the files of interest in the directory ArithExp/src/ArithExp.

The assignment

The purpose of the assignment is to make you do something with Coco/R because it's not so easy to master. You are asked to make two changes: First, change the attribute grammar in ArithExp.atq and rename the file to Assign2.atg. Then generate a new Scanner.java file. You'll then need to mo Second, modify Scantest.java so that it prints out all the tokens of its input, rather than the first three.

Turning in

Copy the two programs to your assignment drop-off directory.