GoF Statement of Intent:![]() |
Define a representation of the grammar for a language along with an interpreter
that uses the representation to interpret sentences in the language. |
Brief Overview:![]() |
Specifies how to evaluate sentences in a language. The basic idea is to have
a class for each symbol (terminal or nonterminal) in a computer language which
knows how to interpret its symbol. The syntax tree of a sentence in the language
is an instance of the Composite Design Pattern and is used to evaluate (interpret)
the sentence. |
UML Diagram: |
![]() |