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
lookup_sym
Used for Kawa infix ':' operator.
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, PARSE_IMMEDIATE, PARSE_ONE_LINE, PARSE_PROLOG, VALUE_NAMESPACE, current, env_counter, environ, requirePedantic, 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)
Compilation
getCompilation(Lexer lexer, SourceMessages messages)
Lexer
getLexer(InPort inp, SourceMessages messages)
static Symbol
langSymbolToSymbol(Object sym)
Convert the Language's idea of a symbol to a gnu.mapping.Symbol.
Expression
makeApply(Expression func, Expression[] args)
Expression
makeBody(Expression[] exps)
Combine a
boolean
parse(Compilation comp, int options)
void
resolve(Compilation comp)
Resolve names and other post-parsing processing.
boolean
selfEvaluatingSymbol(Object obj)

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

defaultReadTable

public ReadTable defaultReadTable
The default ReadTable for this language.

lookup_sym

public static final String lookup_sym
Used for Kawa infix ':' operator.

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)

getCompilation

public Compilation getCompilation(Lexer lexer,
                                  SourceMessages messages)
Overrides:
getCompilation in interface Language

getLexer

public Lexer getLexer(InPort inp,
                      SourceMessages messages)
Overrides:
getLexer in interface Language

langSymbolToSymbol

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

makeApply

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

makeBody

public Expression makeBody(Expression[] exps)
Combine a

parse

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

resolve

public void resolve(Compilation comp)
Resolve names and other post-parsing processing.
Overrides:
resolve in interface Language

selfEvaluatingSymbol

public boolean selfEvaluatingSymbol(Object obj)