CIT 594 Code Problems and Changes
Spring 2007, David Matuszek


Here are the current versions of all the relevant files.


First off, I apparently failed to upload a keyword method. I've no idea how not.

Secondly, some people (including me) have been having trouble getting the most recent versions. I think the problem is that some browsers don't handle their caches correctly, so that if you have previously downloaded a file, downloading it again just gives you the cached version. If this is what is going on, the solution is (or at least, should be) simply to clear the cache before downloading.


Tree and TreeTest are as before. You may have a version with a package statement at the top, in which case you need to put these files in a package named Trees, or else remove the package statement. It really doesn't matter which. There is otherwise no difference. Both versions should have a child(int index) method; if not, you have files from a previous assignment. The addition of this method is the only change.

Token has a public static final Set KEYWORDS in it. If you have this version, you're OK.

SyntaxException has never been changed.

Parser should have a private boolean keyword(String expectedKeyword) method in it, and ParserTest should have a testNextToken() test. If you have these, you're OK. I've now also made these changes to Recognizer and RecognizerTest. Anywhere in your Parser (and in your Recognizer, if you want to go back and make these changes) that you were calling name(String expectedName), you should now be calling keyword(String expectedKeyword); fortunately, changes like this are easy in Eclipse.