FAQs for Assignment 6
CSc 451, Spring 2003
Last Update: March 24, 2003, 6:20pm
Corrections
Problem 2, 3, 4:
Under "RESTRICTIONS", it should refer to problem 1 rather than problem 3.
Questions:
Q: When I run expand it behaves like the cat command, simply echoing the input. Why?
A: There's a utility named expand in /usr/local/bin and /usr/bin. If either directory appears in your path before ".", then running "expand" will run the utility. Use "./expand" to explicitly name the program in the current directory.
Q: I'm having trouble matching the behavior of calc when a ^D is entered. Should I be worried about that?
A: Don't worry about that.
Q: What should calc do if the input is invalid, like a$b or x==1? Also, how about an empty line? (i.e., *read() = 0)
A: Assume that the input is well-formed. No error cases will be tested. Use that assumption to simplify the code. Empty lines are considered to be not well-formed.
Q: It looks like the reference version of xmlparse sorts the attributes by name, but the problem specification doesn't mention that. Does it matter?
A: That's a bug in the specification—attributes should be sorted by name, just as the reference version does.