public class InterpreterPattern {
public static void main(String[] args) {
Context context = new Context();
context.setInput("ABC");
AbstractExpression expression1 = new TerminalExpression();
expression1.Interpret(context);
AbstractExpression expression2 = new NonterminalExpression();
expression2.Interpret(context);
}
}