kawa.standard

Class Scheme

Known Direct Subclasses:
BRL, Q2

public class Scheme
extends LispLanguage

Field Summary

static ApplyToArgs
applyToArgs
static LangPrimType
booleanType
static AbstractFormat
displayFormat
static map
forEach
static Declaration
getNamedPartDecl
static Scheme
instance
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, lookup_sym, quasiquote_sym, quote_sym, unquote_sym, 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

Constructor Summary

Scheme()
Scheme(Environment env)

Method Summary

static Environment
builtin()
ReadTable
createReadTable()
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()
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)
Expression
makeApply(Expression func, Expression[] args)
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, getCompilation, getLexer, langSymbolToSymbol, makeApply, makeBody, parse, resolve, selfEvaluatingSymbol

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

applyToArgs

public static final ApplyToArgs applyToArgs

booleanType

public static LangPrimType booleanType

displayFormat

public static final AbstractFormat displayFormat

forEach

public static final map forEach

getNamedPartDecl

public static final Declaration getNamedPartDecl

instance

public static final Scheme instance

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

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()

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

makeApply

public Expression makeApply(Expression func,
                            Expression[] args)
Overrides:
makeApply in interface LispLanguage

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