Given a language, define a representation for its grammar along with an interpreter that uses the representation to interpret sentences in the language
Use when you need to create a scripting language to allow end user to customize their solution due to the complexity and advanced configuration requirements of the app
however, it is easier & faster to use an existing command interpreter or expression evaluator tool of the box
Use when a problem can be encoded and implemented by a simple grammar
when a problem is characterized by a language, it describes the problem domain which should be well-understood and well-defined
the language needs to be mapped to a grammar
grammars are usually hierarchical tree-like structures that step through multiple levels
but end up with terminal nodes (also called literals)