public abstract class Lisp2 extends LispLanguage
Modifier and Type | Field and Description |
---|---|
static LList |
FALSE |
static Expression |
nilExpr |
static Symbol |
TRUE |
bracket_apply_sym, bracket_list_sym, constructNamespace, defaultReadTable, dots3_sym, entityNamespace, getNamedPartLocation, lookup_sym, quasiquote_str, quasiquote_sym, quote_str, splice_colon_str, splice_colon_sym, splice_str, splice_sym, unitNamespace, unquote_str, unquotesplicing_str
current, environ, FUNCTION_NAMESPACE, global, NAMESPACE_PREFIX_NAMESPACE, PARSE_CURRENT_NAMES, PARSE_EMIT_MAIN, PARSE_EXPLICIT, PARSE_FOR_APPLET, PARSE_FOR_EVAL, PARSE_FOR_LINT, PARSE_FOR_SERVLET, PARSE_IMMEDIATE, PARSE_INTERACTIVE_MODULE, PARSE_ONE_LINE, PARSE_PROLOG, requirePedantic, userEnv, VALUE_NAMESPACE
Constructor and Description |
---|
Lisp2() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
asSymbol(java.lang.String name)
Get a symbol for a given (interned) Java string.
|
java.lang.Object |
booleanObject(boolean b) |
ReadTable |
createReadTable()
Create a fresh
ReadTable appropriate for this language. |
protected void |
defun(java.lang.String name,
java.lang.Object value) |
protected void |
defun(Symbol sym,
java.lang.Object value) |
protected Symbol |
fromLangSymbol(java.lang.Object obj) |
java.lang.String |
getCompilationClass() |
java.lang.Object |
getEnvPropertyFor(java.lang.reflect.Field fld,
java.lang.Object value)
Given a field, figure out which namespace to put its binding in.
|
int |
getNamespaceOf(Declaration decl)
Get the namespace of a declaration.
|
static java.lang.Object |
getString(java.lang.String name)
Get a string for a given Java string.
|
static java.lang.Object |
getString(Symbol symbol)
Get a string for a given symbol.
|
boolean |
hasSeparateFunctionNamespace()
Determines if functions in this language have a separate namespace.
|
protected void |
importLocation(Location loc) |
boolean |
isTrue(java.lang.Object value)
Test if a value is considered "true" in this language.
|
static boolean |
isTrueLisp(java.lang.Object value) |
java.lang.Object |
noValue()
The value to return for a "void" result.
|
boolean |
selfEvaluatingSymbol(java.lang.Object obj)
Determine whether a symbol evaluates to itself.
|
declFromField, decodeArrayType, defSntxStFld, defSntxStFld, getLexer, getNamedType, getPackageStyleType, getPrimaryPrompt, getSecondaryPrompt, getTypeFor, getTypeFor, getTypeMap, keywordsAreSelfEvaluating, langSymbolToSymbol, parse, resolve
asType, booleanValue, coerceFromObject, coerceToObject, decodeType, defAliasStFld, define, defineFunction, defineFunction, defProcStFld, defProcStFld, defProcStFld, defProcStFldAs, detect, detect, detect, encodeType, eval, eval, eval, eval, eval, eval, eval, eval, eval, formatType, getCompilation, getCompilation, getDefaultLanguage, getEnvironment, getEnvPropertyFor, getExtensions, getFormat, getInstance, getInstance, getInstanceFromFilenameExtension, getLangEnvironment, getLangTypeFor, getLanguages, getName, getNewEnvironment, getOutputConsumer, getSymbol, getTypeFor, getTypeFor, getTypeFor, hasNamespace, isValidJavaName, loadClass, lookup, lookupBuiltin, mangleName, parse, parse, parse, parse, registerLanguage, restoreCurrent, runAsApplication, setCurrentLanguage, setDefaults, setSaveCurrent, unionType
public static final LList FALSE
public static final Symbol TRUE
public static final Expression nilExpr
public boolean isTrue(java.lang.Object value)
Language
public static boolean isTrueLisp(java.lang.Object value)
public java.lang.Object booleanObject(boolean b)
booleanObject
in class Language
public java.lang.Object noValue()
Language
public boolean hasSeparateFunctionNamespace()
Environment
table.hasSeparateFunctionNamespace
in class Language
public boolean selfEvaluatingSymbol(java.lang.Object obj)
selfEvaluatingSymbol
in class LispLanguage
obj
- The symbol to checkpublic java.lang.Object getEnvPropertyFor(java.lang.reflect.Field fld, java.lang.Object value)
Environment
:
This is null for Scheme (as a Lisp1), but may be the FUNCTION property
for languages like CL and Emacs Lisp, for example.getEnvPropertyFor
in class Language
fld
- The field of some module we're importing.value
- The value of the field (assuming it is constant).EnvironmentKey.FUNCTION
if this is a function binding or
null
if this binding has the null property key.public int getNamespaceOf(Declaration decl)
getNamespaceOf
in class Language
decl
- The declaration to checkFUNCTION_NAMESPACE
or VALUE_NAMESPACE
.public static java.lang.Object asSymbol(java.lang.String name)
protected Symbol fromLangSymbol(java.lang.Object obj)
fromLangSymbol
in class LispLanguage
public static java.lang.Object getString(java.lang.String name)
public static java.lang.Object getString(Symbol symbol)
protected void defun(java.lang.String name, java.lang.Object value)
protected void defun(Symbol sym, java.lang.Object value)
protected void importLocation(Location loc)
public ReadTable createReadTable()
LispLanguage
ReadTable
appropriate for this language.createReadTable
in class LispLanguage
public java.lang.String getCompilationClass()
getCompilationClass
in class LispLanguage