Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 402 Bytes

README.md

File metadata and controls

10 lines (7 loc) · 402 Bytes

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