mirror of
https://github.com/JakubVojvoda/design-patterns-cpp.git
synced 2025-12-18 05:14:36 +03:00
add Interpreter pattern
This commit is contained in:
10
interpreter/README.md
Normal file
10
interpreter/README.md
Normal 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
|
||||
Reference in New Issue
Block a user