gnu.kawa.lispexpr
Class LispLanguage

java.lang.Object
  extended by gnu.expr.Language
      extended by gnu.kawa.lispexpr.LispLanguage
Direct Known 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 java.lang.String lookup_sym
          Used for Kawa infix ':' operator.
static java.lang.String quasiquote_sym
           
static java.lang.String quote_sym
           
static java.lang.String unquote_sym
           
static java.lang.String unquotesplicing_sym
           
 
Fields inherited from class gnu.expr.Language
current, env_counter, environ, FUNCTION_NAMESPACE, NAMESPACE_PREFIX_NAMESPACE, PARSE_IMMEDIATE, PARSE_ONE_LINE, PARSE_PROLOG, requirePedantic, userEnv, VALUE_NAMESPACE
 
Constructor Summary
LispLanguage()
           
 
Method Summary
abstract  ReadTable createReadTable()
          Create a fresh ReadTable appropriate for this language.
 Declaration declFromField(ModuleExp mod, java.lang.Object fvalue, Field fld)
           
protected  void defSntxStFld(java.lang.String name, java.lang.String cname)
           
protected  void defSntxStFld(java.lang.String name, java.lang.String cname, java.lang.String fname)
          Declare in the current Environment a Syntax bound to a static field.
protected  Symbol fromLangSymbol(java.lang.Object sym)
           
 Compilation getCompilation(Lexer lexer, SourceMessages messages)
           
 Lexer getLexer(InPort inp, SourceMessages messages)
           
static Symbol langSymbolToSymbol(java.lang.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 consisting of a list of expression.
 boolean parse(Compilation comp, int options)
           
 void resolve(Compilation comp)
          Resolve names and other post-parsing processing.
 boolean selfEvaluatingSymbol(java.lang.Object obj)
           
 
Methods inherited from class gnu.expr.Language
asType, booleanObject, coerceFromObject, coerceToObject, coerceToObject, defAliasStFld, define, defineFunction, defineFunction, defProcStFld, defProcStFld, detect, detect, detect, emitCoerceToBoolean, emitPushBoolean, eval, eval, eval, eval, eval, eval, eval, eval, eval, getDefaultLanguage, getEnvironment, getEnvPropertyFor, getEnvPropertyFor, getFormat, getInstance, getInstance, getInstanceFromFilenameExtension, getLangEnvironment, getLangTypeFor, getLanguages, getName, getNamespaceOf, getNewEnvironment, getOutputConsumer, getPrompter, getSymbol, getTypeFor, getTypeFor, getTypeFor, getTypeFor, getTypeFor, hasNamespace, hasSeparateFunctionNamespace, isTrue, loadClass, lookup, lookupBuiltin, noValue, parse, parse, parse, 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

quote_sym

public static final java.lang.String quote_sym
See Also:
Constant Field Values

unquote_sym

public static final java.lang.String unquote_sym
See Also:
Constant Field Values

unquotesplicing_sym

public static final java.lang.String unquotesplicing_sym
See Also:
Constant Field Values

quasiquote_sym

public static final java.lang.String quasiquote_sym
See Also:
Constant Field Values

lookup_sym

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

See Also:
Constant Field Values

defaultReadTable

public ReadTable defaultReadTable
The default ReadTable for this language.

Constructor Detail

LispLanguage

public LispLanguage()
Method Detail

createReadTable

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


getLexer

public Lexer getLexer(InPort inp,
                      SourceMessages messages)
Specified by:
getLexer in class Language

getCompilation

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

parse

public boolean parse(Compilation comp,
                     int options)
              throws java.io.IOException,
                     SyntaxException
Specified by:
parse in class Language
Throws:
java.io.IOException
SyntaxException

resolve

public void resolve(Compilation comp)
Resolve names and other post-parsing processing.

Overrides:
resolve in class Language

declFromField

public Declaration declFromField(ModuleExp mod,
                                 java.lang.Object fvalue,
                                 Field fld)
Overrides:
declFromField in class Language

defSntxStFld

protected void defSntxStFld(java.lang.String name,
                            java.lang.String cname,
                            java.lang.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.

defSntxStFld

protected void defSntxStFld(java.lang.String name,
                            java.lang.String cname)

makeBody

public Expression makeBody(Expression[] exps)
Combine a consisting of a list of expression.


makeApply

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

selfEvaluatingSymbol

public boolean selfEvaluatingSymbol(java.lang.Object obj)

langSymbolToSymbol

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


fromLangSymbol

protected Symbol fromLangSymbol(java.lang.Object sym)