org.hprog.code
Class SchemeInterpreter

java.lang.Object
  |
  +--org.hprog.code.SchemeInterpreter
All Implemented Interfaces:
InteractiveInterpreter

public class SchemeInterpreter
extends java.lang.Object
implements InteractiveInterpreter

Wrapper for SISC Scheme


Constructor Summary
SchemeInterpreter(java.net.URL base)
           
 
Method Summary
 java.lang.String errorText(sisc.data.Value v)
           
 void eval(java.lang.String exp, ResultListener l)
          Evaluate an expression/command
 java.lang.String fromString(sisc.data.Value v)
           
 java.lang.String fromSymbol(sisc.data.Value v)
           
 java.lang.String getLanguage()
          The language this interpreter interprets
 java.lang.String getName()
          The name of the implementation
 boolean interrupt()
          Request that evaluation be ended early
 void load(java.util.Iterator f, ResultListener l)
          Load source files into the interpreter
static void printEnv(sisc.env.SymbolicEnvironment env)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemeInterpreter

public SchemeInterpreter(java.net.URL base)
Method Detail

printEnv

public static void printEnv(sisc.env.SymbolicEnvironment env)

getLanguage

public java.lang.String getLanguage()
Description copied from interface: InteractiveInterpreter
The language this interpreter interprets

Specified by:
getLanguage in interface InteractiveInterpreter

getName

public java.lang.String getName()
Description copied from interface: InteractiveInterpreter
The name of the implementation

Specified by:
getName in interface InteractiveInterpreter

fromString

public java.lang.String fromString(sisc.data.Value v)

fromSymbol

public java.lang.String fromSymbol(sisc.data.Value v)

errorText

public java.lang.String errorText(sisc.data.Value v)

eval

public void eval(java.lang.String exp,
                 ResultListener l)
Description copied from interface: InteractiveInterpreter
Evaluate an expression/command

Specified by:
eval in interface InteractiveInterpreter
Parameters:
exp - expression text
l - listener to notify when evaluation completes (or fails)

load

public void load(java.util.Iterator f,
                 ResultListener l)
Description copied from interface: InteractiveInterpreter
Load source files into the interpreter

Specified by:
load in interface InteractiveInterpreter
Parameters:
f - iteration of InputFiles
l - listener to notify when loading is complete (or fails)

interrupt

public boolean interrupt()
Description copied from interface: InteractiveInterpreter
Request that evaluation be ended early

Specified by:
interrupt in interface InteractiveInterpreter
Returns:
whether evaluation was really interrupted