Class EJayInterpreterNoFuncsTest

java.lang.Object
  extended byEJayInterpreterNoFuncsTest

public class EJayInterpreterNoFuncsTest
extends java.lang.Object

Simplified test program for CSC 330 Assignment 4. This does what the full EjayInterpreterTest class does, but instead of constructing a parse tree for a call to the main method, it calls EJayInterpreter.eval on the statements part of the body of main method. In doing things this way, this simplified test program can test a version of the interpreter that does not have function calls implemented, but does do statements and expressions. This test program also dumps the parse tree and symbol table, prior to dumping the interpreter's execution memory. If there is not main method in the program, then it just dumps the tree and symtab, but performs no execution.


Constructor Summary
EJayInterpreterNoFuncsTest()
           
 
Method Summary
protected static TreeNode grabMainBody(SymbolTable symtab)
          Extract the executable statements list from the body of 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

EJayInterpreterNoFuncsTest

public EJayInterpreterNoFuncsTest()
Method Detail

main

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


grabMainBody

protected static TreeNode grabMainBody(SymbolTable symtab)
Extract the executable statements list from the body of the main method.