The Interpreter design pattern solves problems like:
How can a grammar for a simple language be defined
so that sentences in the language can be interpreted?
See Applicability section for all problems Interpreter can solve.
See Solution section for how Interpreter solves the problems.
Context)
is inflexible because it commits (couples)
the class to a particular expression
and makes it impossible to
change or reuse the expression later
independently from (without having to change)
the class.