This chapter covers the interpreter pattern.
GoF Definition
Given a language, define a representation for its grammar along with an interpreter that uses the representation to interpret sentences in the language.
Concept
To understand this pattern, you need to be familiar with some key terms, like sentences, grammar, languages, and so forth. So, you may need to visit the topics of formal languages in Automata, if you are not familiar with them.
Normally, this pattern deals with how to evaluate sentences in a language. So, you first need to define a grammar to represent the language. ...