
Software Design – The Interpreter Pattern
In this episode, we look at a behavioral pattern that is key for solving certain types of problems. These happen to be grammar and translation applications. Thus, the interpreter pattern gives us a way to do precisely that. We use this to interpret text into a set of commands. The Interpreter Pattern Defined As always, we will start with the “Gang of Four” intent to set the stage for our discussion. “Given a language, define a representation for its grammar along with an interpreter that uses the representation to interpret sentences in the language.” This makes complete sense if you understand language grammars. For the rest of us, let’s break this down a little bit through an example. We will assume you are reading a... Read more