gnu.commonlisp.lang
Class Lisp2

java.lang.Object
  extended by gnu.expr.Language
      extended by gnu.kawa.lispexpr.LispLanguage
          extended by gnu.commonlisp.lang.Lisp2
Direct Known Subclasses:
CommonLisp, ELisp

public abstract class Lisp2
extends LispLanguage

Abstract class for Lisp-like languages with separate namespaces.


Field Summary
static LList FALSE
           
static Expression nilExpr
           
static Symbol TRUE
           
 
Fields inherited from class gnu.kawa.lispexpr.LispLanguage
defaultReadTable, quasiquote_sym, quote_sym, unquote_sym, unquotesplicing_sym
 
Fields inherited from class gnu.expr.Language
current, env_counter, environ, FUNCTION_NAMESPACE, NAMESPACE_PREFIX, NAMESPACE_PREFIX_NAMESPACE, PARSE_IMMEDIATE, PARSE_ONE_LINE, userEnv, VALUE_NAMESPACE
 
Constructor Summary
Lisp2()
           
 
Method Summary
static java.lang.Object asSymbol(java.lang.String name)
          Get a symbol for a given (interned) Java string.
 java.lang.Object booleanObject(boolean b)
           
protected  void defun(java.lang.String name, java.lang.Object value)
           
protected  void defun(Symbol sym, java.lang.Object value)
           
 void emitPushBoolean(boolean value, CodeAttr code)
           
protected  Symbol fromLangSymbol(java.lang.Object obj)
           
 java.lang.Object getEnvPropertyFor(java.lang.reflect.Field fld, java.lang.Object value)
           
 int getNamespaceOf(Declaration decl)
          Return the namespace (e.g value or function) 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()
          True if functions are in a separate anme space from variable.
protected  void importLocation(Location loc)
           
 boolean isTrue(java.lang.Object value)
          Test if a value is considered "true" in this language.
 java.lang.Object noValue()
          The value to return for a "void" result.
 boolean selfEvaluatingSymbol(java.lang.Object obj)
           
 
Methods inherited from class gnu.kawa.lispexpr.LispLanguage
createReadTable, declFromField, defSntxStFld, defSntxStFld, langSymbolToSymbol, makeApply, makeBody, parse
 
Methods inherited from class gnu.expr.Language
asType, coerceFromObject, coerceToObject, coerceToObject, defAliasStFld, define, defineFunction, defineFunction, defProcStFld, defProcStFld, emitCoerceToBoolean, eval, eval, eval, eval, eval, eval, eval, eval, eval, getDefaultLanguage, getEnvironment, getEnvPropertyFor, getFormat, getInstance, getInstance, getInstanceFromFilenameExtension, getLangEnvironment, getLanguages, getLexer, getName, getNewEnvironment, getOutputConsumer, getPrompter, getSymbol, getTypeFor, getTypeFor, getTypeFor, loadClass, lookup, lookupBuiltin, parse, print, print, registerLanguage, runAsApplication, setDefaultLanguage, setDefaults, string2Type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FALSE

public static final LList FALSE

TRUE

public static final Symbol TRUE

nilExpr

public static final Expression nilExpr
Constructor Detail

Lisp2

public Lisp2()
Method Detail

isTrue

public boolean isTrue(java.lang.Object value)
Description copied from class: Language
Test if a value is considered "true" in this language.

Overrides:
isTrue in class Language

booleanObject

public java.lang.Object booleanObject(boolean b)
Overrides:
booleanObject in class Language

emitPushBoolean

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

noValue

public java.lang.Object noValue()
Description copied from class: Language
The value to return for a "void" result.

Overrides:
noValue in class Language

hasSeparateFunctionNamespace

public boolean hasSeparateFunctionNamespace()
Description copied from class: Language
True if functions are in a separate anme space from variable. Is true for e.g. Common Lisp, Emacs Lisp; false for Scheme.

Overrides:
hasSeparateFunctionNamespace in class Language

selfEvaluatingSymbol

public boolean selfEvaluatingSymbol(java.lang.Object obj)
Overrides:
selfEvaluatingSymbol in class LispLanguage

getEnvPropertyFor

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

getNamespaceOf

public int getNamespaceOf(Declaration decl)
Description copied from class: Language
Return the namespace (e.g value or function) of a Declaration. Return a bitmask of all the namespces "covered" by the Declaration.

Overrides:
getNamespaceOf in class Language

asSymbol

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


fromLangSymbol

protected Symbol fromLangSymbol(java.lang.Object obj)
Overrides:
fromLangSymbol in class LispLanguage

getString

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


getString

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


defun

protected void defun(java.lang.String name,
                     java.lang.Object value)

defun

protected void defun(Symbol sym,
                     java.lang.Object value)

importLocation

protected void importLocation(Location loc)