$> git checkout interpreter
Intent
Given a language, define a representation for its grammar along with an interpreter that uses the representation to interpret sentences in the language.1
Applications
There are some patterns you might never use: flyweight, singleton, and this one. I am going to cover it anyway. Just in case. I have been wrong before. This chapter is a tad bit more theoretical than others. To understand the interpreter pattern, I need to talk first about language and grammar. Understanding how to work with grammar will make you sound more intelligent to others. This also happens ...