Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Interpreter Pattern Interpreter Pattern What Is an Interpreter Pattern? The Interpreter pattern interprets language elements into code solutions. Interpreters can be used for various pur- poses including handling regular expressions or reading flat files to interpret metadata into code. Generally, if you have some language or textual data that you need to deal with as a code process, you might use an interpreter to convert the data into a code-recognizable form. The Interpreter pattern has two main components associ- ated with it: the Context and the Expression. The context acts as a current data context, defining the language data as