language-icon Old Web
English
Sign In

Interpreter pattern

In computer programming, the interpreter pattern is a design pattern that specifies how to evaluate sentences in a language.The basic idea is to have a class for each symbol (terminal or nonterminal) in a specialized computer language. The syntax tree of a sentence in the language is an instance of the composite pattern and is used to evaluate (interpret) the sentence for a client.:243 See also Composite pattern. In computer programming, the interpreter pattern is a design pattern that specifies how to evaluate sentences in a language.The basic idea is to have a class for each symbol (terminal or nonterminal) in a specialized computer language. The syntax tree of a sentence in the language is an instance of the composite pattern and is used to evaluate (interpret) the sentence for a client.:243 See also Composite pattern. The Interpreterdesign pattern is one of the twenty-three well-known GoF design patterns that describe how to solve recurring design problems to design flexible and reusable object-oriented software, that is, objects that are easier to implement, change, test, and reuse. What problems can the Interpreter design pattern solve? When a problem occurs very often, it could be considered to represent it as a sentence in a simple language(Domain Specific Languages) so that an interpreter can solve the problemby interpreting the sentence.

[ "Syntax", "Programming domain", "Interpreter", "Pattern language" ]
Parent Topic
Child Topic
    No Parent Topic