net.sf.saffron.walden
Class Interpreter

java.lang.Object
  |
  +--net.sf.saffron.walden.Interpreter

public class Interpreter
extends Object

Interpreter evaluates a sequence of Saffron/Java statements. If a statement is a declaration, it adds to the environment available to future statements.

It writes its results to a Handler.

Since:
26 May, 2002
Version:
$Id: //open/saffron/src/net/sf/saffron/walden/Interpreter.java#5 $
Author:
jhyde
See Also:
WaldenServlet

Field Summary
(package private)  ArrayList argumentList
           
private  SaffronConnection connection
           
 
Constructor Summary
Interpreter()
           
 
Method Summary
 void run(Reader in, Handler handler)
          Reads and runs commands from a reader until it is empty.
 boolean runOne(Parser parser, Handler handler)
          Reads one statement from the parser, executes it, and prints the result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

argumentList

ArrayList argumentList

connection

private final SaffronConnection connection
Constructor Detail

Interpreter

public Interpreter()
Method Detail

run

public void run(Reader in,
                Handler handler)
Reads and runs commands from a reader until it is empty.


runOne

public boolean runOne(Parser parser,
                      Handler handler)
Reads one statement from the parser, executes it, and prints the result. Returns false if there was nothing else to run.


SourceForge.net_Logo