gnu.commonlisp.lang

Class Lisp2

Known Direct Subclasses:
CommonLisp, ELisp

public abstract class Lisp2
extends LispLanguage

Abstract class for Lisp-like languages with separate namespaces.

Field Summary

static LList
FALSE
static Symbol
TRUE
static Expression
nilExpr

Fields inherited from class gnu.kawa.lispexpr.LispLanguage

defaultReadTable, lookup_sym, quasiquote_sym, quote_sym, unquote_sym, unquotesplicing_sym

Fields inherited from class gnu.expr.Language

FUNCTION_NAMESPACE, NAMESPACE_PREFIX_NAMESPACE, PARSE_IMMEDIATE, PARSE_ONE_LINE, PARSE_PROLOG, VALUE_NAMESPACE, current, env_counter, environ, requirePedantic, userEnv

Method Summary

static Object
asSymbol(String name)
Get a symbol for a given (interned) Java string.
Object
booleanObject(boolean b)
ReadTable
createReadTable()
Create a fresh ReadTable appropriate for this language.
protected void
defun(String name, Object value)
protected void
defun(Symbol sym, Object value)
void
emitPushBoolean(boolean value, CodeAttr code)
protected Symbol
fromLangSymbol(Object obj)
Object
getEnvPropertyFor(java.lang.reflect.Field fld, Object value)
int
getNamespaceOf(Declaration decl)
static Object
getString(String name)
Get a string for a given Java string.
static Object
getString(Symbol symbol)
Get a string for a given symbol.
boolean
hasSeparateFunctionNamespace()
protected void
importLocation(Location loc)
boolean
isTrue(Object value)
Object
noValue()
boolean
selfEvaluatingSymbol(Object obj)

Methods inherited from class gnu.kawa.lispexpr.LispLanguage

createReadTable, declFromField, defSntxStFld, defSntxStFld, fromLangSymbol, getCompilation, getLexer, langSymbolToSymbol, makeApply, makeBody, parse, resolve, selfEvaluatingSymbol

Methods inherited from class gnu.expr.Language

asType, booleanObject, coerceFromObject, coerceToObject, coerceToObject, declFromField, defAliasStFld, defProcStFld, defProcStFld, define, defineFunction, defineFunction, detect, detect, detect, emitCoerceToBoolean, emitPushBoolean, eval, eval, eval, eval, eval, eval, eval, eval, eval, formatType, getCompilation, getDefaultLanguage, getEnvPropertyFor, getEnvPropertyFor, getEnvironment, getFormat, getInstance, getInstance, getInstanceFromFilenameExtension, getLangEnvironment, getLangTypeFor, getLanguages, getLexer, getName, getNamespaceOf, getNewEnvironment, getOutputConsumer, getPrompter, getSymbol, getTypeFor, getTypeFor, getTypeFor, getTypeFor, getTypeFor, hasNamespace, hasSeparateFunctionNamespace, isTrue, loadClass, lookup, lookupBuiltin, noValue, parse, parse, parse, parse, registerLanguage, resolve, runAsApplication, setDefaultLanguage, setDefaults, string2Type

Field Details

FALSE

public static final LList FALSE

TRUE

public static final Symbol TRUE

nilExpr

public static final Expression nilExpr

Method Details

asSymbol

public static Object asSymbol(String name)
Get a symbol for a given (interned) Java string.

booleanObject

public Object booleanObject(boolean b)
Overrides:
booleanObject in interface Language

createReadTable

public ReadTable createReadTable()
Create a fresh ReadTable appropriate for this language.
Overrides:
createReadTable in interface LispLanguage

defun

protected void defun(String name,
                     Object value)

defun

protected void defun(Symbol sym,
                     Object value)

emitPushBoolean

public void emitPushBoolean(boolean value,
                            CodeAttr code)
Overrides:
emitPushBoolean in interface Language

fromLangSymbol

protected Symbol fromLangSymbol(Object obj)
Overrides:
fromLangSymbol in interface LispLanguage

getEnvPropertyFor

public Object getEnvPropertyFor(java.lang.reflect.Field fld,
                                Object value)
Overrides:
getEnvPropertyFor in interface Language

getNamespaceOf

public int getNamespaceOf(Declaration decl)
Overrides:
getNamespaceOf in interface Language

getString

public static Object getString(String name)
Get a string for a given Java string.

getString

public static Object getString(Symbol symbol)
Get a string for a given symbol.

hasSeparateFunctionNamespace

public boolean hasSeparateFunctionNamespace()
Overrides:
hasSeparateFunctionNamespace in interface Language

importLocation

protected void importLocation(Location loc)

isTrue

public boolean isTrue(Object value)
Overrides:
isTrue in interface Language

noValue

public Object noValue()
Overrides:
noValue in interface Language

selfEvaluatingSymbol

public boolean selfEvaluatingSymbol(Object obj)
Overrides:
selfEvaluatingSymbol in interface LispLanguage