September 2020
Intermediate to advanced
653 pages
10h 37m
English
This chapter covers the Interpreter pattern.
Given a language, define a representation for its grammar along with an interpreter that uses the representation to interpret sentences in the language.
This pattern plays the role of a translator, and it is often used to evaluate sentences in a language. So, you first need to define a grammar to represent the language. Then the interpreter deals with that grammar. This pattern is best when the grammar is simple.
Read now
Unlock full access