First, copy the chap5 directory of files that Appel provides into the directory you are going to work in and look at them. You can access the chap5 directory off of this web page or copy it from ~max/www-docs/courses/S1999/MC97/tiger/chap5. The simplest way to do this would be using the command
cp -pr ~max/www-docs/courses/S1999/MC97/tiger/chap5 .which will give you your very own chap5 directory tree, just like mine. Note that this time Appel hasn't provided much code on-line. You will need to type in quite a bit of code from the chapter (correcting it and fleshing it out as you go), and add some original code of your own. For those who are still having problems with the prior labs, I have included in the chap5 directory tree the compiled files Parse/Yylex.class, Parse/Grm.class, Parse/CUP$Grm$actions.class, and Parse/sym.java. If you replace these with your own versions from the prior lab, you will of course get more of the experience of building a large system up piece by piece.
Your lab report should include documentation of design and testing as well as your code.
coerceTooperation that he defines. For example, the code on page 121 would use
if(! left.ty.coerceTo(INT))and so forth, where INT is declared as at the top of page 122.
()has type VOID, but that it is not legal for a variable to have type VOID. Thus it seems that your type-checker should flag the following code as illegal
let var foo := () in 666 end
Instructor: Max Hailperin