public class Lisp extends Object
Modifier and Type | Field and Description |
---|---|
static ThreadLocal<Map<String,Stack<LispObject>>> |
envForThread |
private static Primitive |
LISP_ERROR_HANDLER |
private static CasaLispOperator |
SLEEP_IGNORING_INTERRUPTS
Lisp operator: (?)
Displays the list of all casa lisp operators with the first sentence of documenation. |
private static CasaLispOperator |
TOSTRING
Lisp operator: (tostring)
Displays the list of all casa lisp operators with the first sentence of documenation. |
Modifier | Constructor and Description |
---|---|
private |
Lisp() |
Modifier and Type | Method and Description |
---|---|
static Status |
abclEval(TransientAgent agent,
Environment env,
Map<String,LispObject> newEnvBindings,
String c,
AgentUI ui) |
static void |
bind(Environment env,
String name,
LispObject value) |
static Interpreter |
getInterpreter() |
static LispObject |
javaObj2LispObj(Object obj) |
static Object |
lispObj2JavaObj(LispObject o)
Given a LispObject, return the appropriate Java object:
SymbolString
ConsThe evaluation of the Cons (recursively interpreted once)
floatp() is trueFloat
integerp() is trueInteger
stringp() is trueString
javaInstance() is trueObject
|
static void |
loadClass(String className) |
static LispObject |
lookup(Environment env,
String name) |
static Object |
lookupAsJavaObject(Environment env,
String name) |
private static boolean |
needsRecovering(Environment env) |
private static String |
signalError(TransientAgent agent,
String tag,
String msg,
Throwable e) |
static void |
unbind(String name) |
private static Primitive LISP_ERROR_HANDLER
public static final ThreadLocal<Map<String,Stack<LispObject>>> envForThread
private static final CasaLispOperator SLEEP_IGNORING_INTERRUPTS
private static final CasaLispOperator TOSTRING
public static final void loadClass(String className)
public static Interpreter getInterpreter()
public static void bind(Environment env, String name, LispObject value)
public static void unbind(String name)
private static boolean needsRecovering(Environment env)
public static LispObject lookup(Environment env, String name)
public static Object lookupAsJavaObject(Environment env, String name) throws ClassCastException
ClassCastException
public static Status abclEval(TransientAgent agent, Environment env, Map<String,LispObject> newEnvBindings, String c, AgentUI ui)
private static String signalError(TransientAgent agent, String tag, String msg, Throwable e)
public static Object lispObj2JavaObj(LispObject o) throws ControlTransfer
Symbol | String |
Cons | The evaluation of the Cons (recursively interpreted once) |
floatp() is true | Float |
integerp() is true | Integer |
stringp() is true | String |
javaInstance() is true | Object |
o
- The LispObject to interpretenv
- The current environment (for interpreting a Cons)ControlTransfer
public static LispObject javaObj2LispObj(Object obj)