Interpreter
The Interpreter design pattern is usually described in terms of interpreting grammars. The Interpreter pattern is very useful for adding functionality to Composite pattern structures. Composites represent multi-part systems that are being accessed as single abstract entities (e.g. as AComponent below). The Intepreter pattern requires an abstract method at the top level of the composite structure that is used by the component's client to process the entire structure. Concrete methods are thus implemented in the terminal and non-terminal components to do the actual processing.
The abstract AComponent defines an abstract operation() to process the entire composite structure. The concrete components define concrete operation()'s to process themselves. The Composite class defines a concrete operation() as well, which in addition to any particular processing that it needs, must also recursively call operation() on all of its composees.
