gnu.kawa.lispexpr

Class LispLanguage

Known Direct Subclasses:
Lisp2, Scheme

public abstract class LispLanguage
extends Language

Language sub-class for Lisp-like languages (including Scheme).

Field Summary

ReadTable
defaultReadTable
The default ReadTable for this language.
static String
quasiquote_sym
static String
quote_sym
static String
unquote_sym
static String
unquotesplicing_sym

Fields inherited from class gnu.expr.Language

FUNCTION_NAMESPACE, NAMESPACE_PREFIX, NAMESPACE_PREFIX_NAMESPACE, PARSE_IMMEDIATE, PARSE_ONE_LINE, VALUE_NAMESPACE, current, env_counter, environ, userEnv

Method Summary

abstract ReadTable
createReadTable()
Create a fresh ReadTable appropriate for this language.
Declaration
declFromField(ModuleExp mod, Object fvalue, Field fld)
protected void
defSntxStFld(String name, String cname)
protected void
defSntxStFld(String name, String cname, String fname)
Declare in the current Environment a Syntax bound to a static field.
protected Symbol
fromLangSymbol(Object sym)
static Symbol
langSymbolToSymbol(Object sym)
Convert the Language's idea of a symbol to a gnu.mapping.Symbol.
ApplyExp
makeApply(Expression func, Expression[] args)
Expression
makeBody(Expression[] exps)
Combine a
Compilation
parse(Lexer lexer, int options)
boolean
selfEvaluatingSymbol(Object obj)

Methods inherited from class gnu.expr.Language

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

Field Details

defaultReadTable

public ReadTable defaultReadTable
The default ReadTable for this language.

quasiquote_sym

public static final String quasiquote_sym

quote_sym

public static final String quote_sym

unquote_sym

public static final String unquote_sym

unquotesplicing_sym

public static final String unquotesplicing_sym

Method Details

createReadTable

public abstract ReadTable createReadTable()
Create a fresh ReadTable appropriate for this language.

declFromField

public Declaration declFromField(ModuleExp mod,
                                 Object fvalue,
                                 Field fld)
Overrides:
declFromField in interface Language

defSntxStFld

protected void defSntxStFld(String name,
                            String cname)

defSntxStFld

protected void defSntxStFld(String name,
                            String cname,
                            String fname)
Declare in the current Environment a Syntax bound to a static field.
Parameters:
name - the procedure's source-level name.
cname - the name of the class containing the field.
fname - the name of the field, which should be a static final field whose type extends kawa.lang.Syntax.

fromLangSymbol

protected Symbol fromLangSymbol(Object sym)

langSymbolToSymbol

public static Symbol langSymbolToSymbol(Object sym)
Convert the Language's idea of a symbol to a gnu.mapping.Symbol.

makeApply

public ApplyExp makeApply(Expression func,
                          Expression[] args)

makeBody

public Expression makeBody(Expression[] exps)
Combine a

parse

public Compilation parse(Lexer lexer,
                         int options)
            throws java.io.IOException,
                   SyntaxException
Overrides:
parse in interface Language

selfEvaluatingSymbol

public boolean selfEvaluatingSymbol(Object obj)