Interpreter Pattern for User-Defined Scenario
Summary:
An Interpreter Pattern can be used to parse the user-defined language. This pattern is used mainly to strengthen code reusability, maintainability and flexibility. Pattern describes how to define a grammar for simple language, how to represent sentences in the language and how to interpret these sentences. The Interpreter pattern makes grammar easy to implement and extend. Adding new interpreters to a grammar is simple. On the other hand Interpreter Pattern should not be used when the grammar is complex and when efficiency is a concern