ix.util.lisp
Class SafeLispInterpreter

java.lang.Object
  extended by ix.util.lisp.Interpreter
      extended by ix.util.lisp.LispInterpreter
          extended by ix.util.lisp.SafeLispInterpreter

public class SafeLispInterpreter
extends LispInterpreter

A safe interpreter for a simple dialect of Lisp. "Safe" here means that the interpreter doesn't allow user code to do such things as call arbitrary Java methods, read or write files, or get other information about the host machine. Interpreters are unsafe by default. Safety is implemented by leaving out built-in functions that perform unsafe operations. It is up to the implementor of an Interpreter.JFunction to indicate that it is unsafe by defining it's isSafe() method to return false.

See Also:
Interpreter.isSafe(), Interpreter.acceptOnlySafeBuiltins, LispInterpreter.LispInterpreter(boolean beSafe)

Nested Class Summary
 
Nested classes/interfaces inherited from class ix.util.lisp.LispInterpreter
LispInterpreter.JavaNull, LispInterpreter.Parser, LispInterpreter.Syntax, LispInterpreter.SyntaxError
 
Nested classes/interfaces inherited from class ix.util.lisp.Interpreter
Interpreter.AbstractEnv, Interpreter.AbstractFunction, Interpreter.And, Interpreter.Assignment, Interpreter.Call, Interpreter.Closure, Interpreter.Env, Interpreter.Error, Interpreter.Expr, Interpreter.Function, Interpreter.GlobalEnv, Interpreter.If, Interpreter.JFunction, Interpreter.Lambda, Interpreter.Let, Interpreter.LexicalEnv, Interpreter.Literal, Interpreter.Or, Interpreter.Sequence, Interpreter.VarRef, Interpreter.While
 
Field Summary
 
Fields inherited from class ix.util.lisp.LispInterpreter
COND, ELLIPSIS, JAVA_NULL, LAMBDA, parserTable, PROGN, QUOTE, reader
 
Fields inherited from class ix.util.lisp.Interpreter
acceptOnlySafeBuiltins, DEFAULT, FALSE, globalEnv, iscript, TRUE
 
Constructor Summary
SafeLispInterpreter()
           
 
Method Summary
static void main(java.lang.String[] argv)
           
 
Methods inherited from class ix.util.lisp.LispInterpreter
define, define, define, defineBuiltins, defineInitialValues, defineSyntax, installDefinitions, isTrue, loadLisp, loadLisp, parseForm, parseList, readEvalPrintLoop, topLevelEval
 
Methods inherited from class ix.util.lisp.Interpreter
isSafe, nameForClass, topLevelApply, topLevelEval
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SafeLispInterpreter

public SafeLispInterpreter()
Method Detail

main

public static void main(java.lang.String[] argv)