TC-2 GoalsΒΆ
Things to learn during this stage that you should remember:
- Strict Coding Style
Following a strict coding style is an essential part of collaborative work. Understanding the rationales behind rules is even better. See Coding Style.
- Memory Leak Trackers
Using tools such as Valgrind (see Valgrind, The Ultimate Memory Debugger) to track memory leaks.
- Understanding the use of a GLR Parser
The parser should now use all the possibilities of a GLR parser.
- Error recovery with Bison
Using the
errortoken, and building usable ASTs in spite of lexical/syntax errors.- Using STL containers
The AST uses
std::vector,misc::symbolusesstd::set.- Inheritance
The AST hierarchy is typical example of a proper use of inheritance.
- Inclusion polymorphism
An intense use of inclusion polymorphism for
accept.- Use of constructors and destructors
In particular using the destructors to reclaim memory bound to components.
- Use of virtual specifier
Dynamic and static bindings.
- misc::indent
misc::indentextendsstd::ostreamwith indentation features. Use it in thePrettyPrinterto pretty-print. Understanding howmisc::indentworks will be checked later, see TC-3 Goals.- The Composite design pattern
The AST hierarchy is an implementation of the Composite pattern.
- The Visitor design pattern
The PrettyPrinter is an implementation of the Visitor pattern.