Class EJayInterpreterTest

java.lang.Object
  extended byEJayInterpreterTest

public class EJayInterpreterTest
extends java.lang.Object

Test program for CSC 330 Assignment 4. The main method constructs an EJayLexer with a FileReader. It then constructs an EJayParser, sending it the lexer. Then it calls EJayParser.parse to obtain a parse tree and symbol table for the input program. Then it constructs an EJayInterprerter, sending it the memory size for the symbol table and a stack size of 10000. Next, the test program constructs a parse tree for a parameterless invocation of the program's main function, and sends that tree to the interpreter's eval method. Finally, the test program dumps out the interpreter's memory after program execution.


Constructor Summary
EJayInterpreterTest()
           
 
Method Summary
protected static TreeNode buildMainCall()
          Construct the parse tree to invoke the main method.
static void main(java.lang.String[] args)
          See the class comment for documentation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EJayInterpreterTest

public EJayInterpreterTest()
Method Detail

main

public static void main(java.lang.String[] args)
See the class comment for documentation.


buildMainCall

protected static TreeNode buildMainCall()
Construct the parse tree to invoke the main method.