From 44d7be9c94d23fbab3c09a6b0849909868869c2a Mon Sep 17 00:00:00 2001 From: Ilkka Seppala Date: Sat, 3 Oct 2015 21:32:56 +0300 Subject: [PATCH] Improve Interpreter Javadoc --- .../src/main/java/com/iluwatar/interpreter/App.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/interpreter/src/main/java/com/iluwatar/interpreter/App.java b/interpreter/src/main/java/com/iluwatar/interpreter/App.java index 2273b386b..955563915 100644 --- a/interpreter/src/main/java/com/iluwatar/interpreter/App.java +++ b/interpreter/src/main/java/com/iluwatar/interpreter/App.java @@ -4,8 +4,14 @@ import java.util.Stack; /** * - * Interpreter pattern breaks sentences into expressions ({@link Expression}) that can - * be evaluated and as a whole form the result. + * 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. + *

+ * In this example we use the Interpreter pattern to break sentences into expressions + * ({@link Expression}) that can be evaluated and as a whole form the result. * */ public class App {