Back Next

Factory Methods

The parser has a pointer to an abstract translator. It doesn't actually know what the translator does, and doesn't need to know.

The translator is specialized for whatever it is that you need to tool to do.

The specialized translators are vehicles for factory methods for manufacturing appropriately specialized expression objects, statement objects, etc.