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 error token, and building usable ASTs in spite of lexical/syntax errors.

Using STL containers

The AST uses std::vector, misc::symbol uses std::set.

Inheritance

The AST hierarchy is typical example of a proper use of inheritance, together with…

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.

virtual

Dynamic and static bindings.

misc::indent

misc::indent extends std::ostream with indentation features. Use it in the PrettyPrinter to pretty-print. Understanding how misc::indent works 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.

Writing good developer documentation (using Doxygen)

The AST must be properly documented.