Skip to content

Commit 44d7be9

Browse files
committed
Improve Interpreter Javadoc
1 parent b4118bb commit 44d7be9

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

  • interpreter/src/main/java/com/iluwatar/interpreter

interpreter/src/main/java/com/iluwatar/interpreter/App.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@
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
*/
1117
public class App {

0 commit comments

Comments
 (0)