kawa.standard

Class Scheme

Known Direct Subclasses:
BRL, Q2

public class Scheme
extends LispLanguage

Field Summary

static LangPrimType
booleanType
static AbstractFormat
displayFormat
static map
forEach
static InstanceOf
instanceOf
static IsEq
isEq
static IsEqual
isEqual
static IsEqv
isEqv
protected static SimpleEnvironment
kawaEnvironment
static Lambda
lambda
static map
map
static not
not
static Environment
nullEnvironment
static NumberCompare
numEqu
static NumberCompare
numGEq
static NumberCompare
numGrt
static NumberCompare
numLEq
static NumberCompare
numLss
static Environment
r4Environment
static Environment
r5Environment
static repl
repl
static AbstractFormat
writeFormat

Fields inherited from class gnu.kawa.lispexpr.LispLanguage

defaultReadTable, quasiquote_sym, quote_sym, unquote_sym, 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

Constructor Summary

Scheme()
Scheme(Environment env)

Method Summary

static Environment
builtin()
ReadTable
createReadTable()
protected void
define_proc(String name, String className)
Define a procedure to be autoloaded.
protected void
define_proc(String name, Named proc)
protected void
define_proc(Named proc)
static Object
eval(Object sexpr, Environment env)
Evalutate Scheme expressions from an "S expression."
static Object
eval(String string, Environment env)
Evalutate Scheme expressions from string.
static Object
eval(InPort port, Environment env)
Evalutate Scheme expressions from stream.
static Type
exp2Type(Expression exp)
Convert expression to a Type.
AbstractFormat
getFormat(boolean readable)
static Scheme
getInstance()
Lexer
getLexer(InPort inp, SourceMessages messages)
String
getName()
static Type
getNamedType(String name)
int
getNamespaceOf(Declaration decl)
Type
getTypeFor(Class clas)
Type
getTypeFor(String name)
static Type
getTypeValue(Expression exp)
If exp is a "constant" Type, return that type, otherwise return null.
NamedLocation
lookupBuiltin(Symbol name, Object property, int hash)
Object
read(InPort in)
static void
registerEnvironment()
The compiler insert calls to this method for applications and applets.
static Type
string2Type(String name)

Methods inherited from class gnu.kawa.lispexpr.LispLanguage

createReadTable, declFromField, defSntxStFld, defSntxStFld, fromLangSymbol, langSymbolToSymbol, makeApply, makeBody, parse, selfEvaluatingSymbol

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

booleanType

public static LangPrimType booleanType

displayFormat

public static final AbstractFormat displayFormat

forEach

public static final map forEach

instanceOf

public static final InstanceOf instanceOf

isEq

public static final IsEq isEq

isEqual

public static final IsEqual isEqual

isEqv

public static final IsEqv isEqv

kawaEnvironment

protected static final SimpleEnvironment kawaEnvironment

lambda

public static final Lambda lambda

map

public static final map map

not

public static final not not

nullEnvironment

public static final Environment nullEnvironment

numEqu

public static final NumberCompare numEqu

numGEq

public static final NumberCompare numGEq

numGrt

public static final NumberCompare numGrt

numLEq

public static final NumberCompare numLEq

numLss

public static final NumberCompare numLss

r4Environment

public static final Environment r4Environment

r5Environment

public static final Environment r5Environment

repl

public static final repl repl

writeFormat

public static final AbstractFormat writeFormat

Constructor Details

Scheme

public Scheme()

Scheme

protected Scheme(Environment env)

Method Details

builtin

public static Environment builtin()

createReadTable

public ReadTable createReadTable()
Overrides:
createReadTable in interface LispLanguage

define_proc

protected void define_proc(String name,
                           String className)
Define a procedure to be autoloaded.

define_proc

protected void define_proc(String name,
                           Named proc)

define_proc

protected void define_proc(Named proc)

eval

public static Object eval(Object sexpr,
                          Environment env)
Evalutate Scheme expressions from an "S expression."
Parameters:
sexpr - the S expression to evaluate
env - the Environment to evaluate the string in
Returns:
result of the expression.

eval

public static Object eval(String string,
                          Environment env)
Evalutate Scheme expressions from string.
Parameters:
string - the string constaining Scheme expressions
env - the Environment to evaluate the string in
Returns:
result of last expression, or Language.voidObject if none.

eval

public static Object eval(InPort port,
                          Environment env)
Evalutate Scheme expressions from stream.
Parameters:
port - the port to read Scheme expressions from
env - the Environment to evaluate the string in
Returns:
result of last expression, or Language.voidObject if none.

exp2Type

public static Type exp2Type(Expression exp)
Convert expression to a Type. Allow "TYPE" or 'TYPE or .

getFormat

public AbstractFormat getFormat(boolean readable)
Overrides:
getFormat in interface Language

getInstance

public static Scheme getInstance()

getLexer

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

getName

public String getName()
Overrides:
getName in interface Language

getNamedType

public static Type getNamedType(String name)

getNamespaceOf

public int getNamespaceOf(Declaration decl)
Overrides:
getNamespaceOf in interface Language

getTypeFor

public Type getTypeFor(Class clas)
Overrides:
getTypeFor in interface Language

getTypeFor

public Type getTypeFor(String name)
Overrides:
getTypeFor in interface Language

getTypeValue

public static Type getTypeValue(Expression exp)
If exp is a "constant" Type, return that type, otherwise return null.

lookupBuiltin

public NamedLocation lookupBuiltin(Symbol name,
                                   Object property,
                                   int hash)
Overrides:
lookupBuiltin in interface Language

read

public Object read(InPort in)
            throws java.io.IOException,
                   SyntaxException

registerEnvironment

public static void registerEnvironment()
The compiler insert calls to this method for applications and applets.

string2Type

public static Type string2Type(String name)
Overrides:
string2Type in interface Language