Docsity

Programming Assignment 2 for CSCI 531 Spring 2007, Assignments of Computer Science

Toggle sidebar
bg1
CSCI 531 Spring 2007
Programming Assignment 2
Assigned Friday, 2007-03-09. Due Wednesday, 2007-03-21
The purposes of this exercise are to insure that you can find the source code
for the Triangle compiler.
The Triangle compiler source code can be found at the textbook web site,
which is linked to the course web page. The Triangle compiler source code is
also available by anonymous ftp. You may either ftp to ftp.cse.sc.edu, login in
as anonymous, change directory to pub and then to valtorta, or you may point
your browser to http://ftp.cse.sc.edu/valtorta.
1. Find the class Token in the Triangle compiler source code.
2. List the member variables of Token. There is an extra variable in addition
to the two in Example 4.2 (“Tokens of Mini-Triangle”). What is this
variable?
3. Copy the Token class into a file. Edit the file by adding a suitable comment
identifying the additional member variable that you found by answering
the previous question.
4. Submit the modified class using dropbox. To do this, point your browser
to https://www.cse.sc.edu and select “academics.”
1

Partial preview of the text

Download Programming Assignment 2 for CSCI 531 Spring 2007 and more Assignments Computer Science in PDF only on Docsity!

CSCI 531 Spring 2007

Programming Assignment 2

Assigned Friday, 2007-03-09. Due Wednesday, 2007-03-

The purposes of this exercise are to insure that you can find the source code for the Triangle compiler. The Triangle compiler source code can be found at the textbook web site, which is linked to the course web page. The Triangle compiler source code is also available by anonymous ftp. You may either ftp to ftp.cse.sc.edu, login in as anonymous, change directory to pub and then to valtorta, or you may point your browser to http://ftp.cse.sc.edu/valtorta.

  1. Find the class Token in the Triangle compiler source code.
  2. List the member variables of Token. There is an extra variable in addition to the two in Example 4.2 (“Tokens of Mini-Triangle”). What is this variable?
  3. Copy the Token class into a file. Edit the file by adding a suitable comment identifying the additional member variable that you found by answering the previous question.
  4. Submit the modified class using dropbox. To do this, point your browser to https://www.cse.sc.edu and select “academics.”