Fixes needed in tiger/chap3
- The same fix should be done to ErrorMsg/ErrorMsg.java as in chap2
- Contrary to the book, Appel doesn't provide Parse/Yylex.class, so
I added my own.
- Appel's makefile has -expect 3; I deleted this, since initially it
is inappropriate. Students can add in whatever -expect makes sense
for their parser.
- Parse/Grm.cup needs to have the declaration of parseResult
deleted.
- Parse/Grm.cup needs to have the action code declaring sym
deleted.
Fixes needed in tiger/chap4
- Appel doesn't provide a makefile (contrary to the book). Use the
(fixed) one from chap3, or an improved version.
used.
- Parse/Token.java is broken. Delete it, use the chap3
Parse/Lexer.java in place of the chap4 one, and modify Parse/Grm.cup to use
the syntax_error and report_error from chap3's ParseGrm.cup.
- Parse/Grm.cup doesn't label ID for use in the action; put a name
on it with a colon.
- Parse/Parse.java gets absyn the wrong way; it should be the return
value from the parse.
- Appel's Parse/Yylex.class is broken; use your own or mine from
chap3.
- Parse/Main.java doesn't print the absyn. This should be added.
- Absyn/Print.java has Absyn.Exp where it needs to be Exp.