The Interpreter pattern is a design pattern thatdetermines how sentence should be evaluated in a language. The main idea of
this pattern is to have a class for each symbol
(terminal or nonterminal) in computer language. The syntax
tree of a sentence is used to evaluate (interpret) the sentence for a
client. Some example of such pattern you may find in Wikipedia http://en.wikipedia.org/wiki/Interpreter_pattern
.The code depends of your computer language.