Improve Interpreter Javadoc

This commit is contained in:
Ilkka Seppala 2015-10-03 21:32:56 +03:00
parent b4118bb866
commit 44d7be9c94

View File

@ -4,8 +4,14 @@ import java.util.Stack;
/** /**
* *
* Interpreter pattern breaks sentences into expressions ({@link Expression}) that can * The Interpreter pattern is a design pattern that specifies how to evaluate sentences
* be evaluated and as a whole form the result. * 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.
* <p>
* 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 { public class App {