int main()
{
    Context* con1 = new Context("Hello world.");
    AbstractExpression* tinter = new TerminalExpression();
    AbstractExpression* nont = new NonTerminalExpression();

    tinter->Interpreter(con1);
    nont->Interpreter(con1);

    return 0;
}
Example #2
0
void test_interpreter()
{
	ContextInterpreter* pContext = new ContextInterpreter();
	AbstractExpression* pTe = new TerminalExpression("hello world");
	AbstractExpression* pNte = new NonterminalExpression(pTe, 3);

	pNte->Interpreter(*pContext);
}