File tree Expand file tree Collapse file tree
interpreter/src/main/java/com/iluwatar/interpreter Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55/**
66 *
7- * Interpreter pattern breaks sentences into expressions ({@link Expression}) that can
8- * be evaluated and as a whole form the result.
7+ * The Interpreter pattern is a design pattern that specifies how to evaluate sentences
8+ * in a language. The basic idea is to have a class for each symbol (terminal or nonterminal)
9+ * in a specialized computer language. The syntax tree of a sentence in the language is an
10+ * instance of the composite pattern and is used to evaluate (interpret) the sentence for a
11+ * client.
12+ * <p>
13+ * In this example we use the Interpreter pattern to break sentences into expressions
14+ * ({@link Expression}) that can be evaluated and as a whole form the result.
915 *
1016 */
1117public class App {
You can’t perform that action at this time.
0 commit comments