Noeud « Next »: , Noeud « Previous »: T2 Given Code, Noeud « Up »: T2



4.4.4 T2 Code to Write

What is to be done:

src/parse/parsetiger.yy
Implement error recovery.
There should be at least three uses of the token error. Read the Bison documentation about it.
Chuncks
In order to implement easily the type checking of declarations and to simplify following modules, adjust your grammar to parse declarations by chunks. The implementations of these chunks are in ast::FunctionDecs, ast::VarDecs, and ast::TypeDecs; they are implemented thanks to ast::AnyDecs).

src/ast
The abstract syntax tree module must be completed. There should remain no FIXME: anywhere in the code we gave. Several files are missing in full. See src/ast/README for additional information on the missing classes.
src/ast/default-visitor.hh
Complete the DefaultVisitor class, the neutral traversals of ASTs. The DefaultVisitor must be a sound basis for your further work on the Tiger compiler.
src/ast/print-visitor.hh
The PrintVisitor class must be written entirely.