add Interpreter pattern

This commit is contained in:
Jakub Vojvoda
2016-09-23 00:04:37 +02:00
parent 8b0792bc60
commit affe740885
2 changed files with 125 additions and 0 deletions

10
interpreter/README.md Normal file
View File

@@ -0,0 +1,10 @@
## Interpreter
Given a language, the pattern defines a represention for its grammar along with an
interpreter that uses the representation to interpret sentences in the language.
The Interpreter pattern has behavioral purpose and applies to the classes.
### When to use
* when the grammar is simple (in case of complex grammars, there are better alternatives)
* efficiency is not a critical concern