kawa.standard

Class Scheme

public class Scheme extends LispLanguage

Field Summary
static ApplyToArgsapplyToArgs
static LangPrimTypebooleanType
static AbstractFormatdisplayFormat
static mapforEach
static DeclarationgetNamedPartDecl
static Schemeinstance
static InstanceOfinstanceOf
static IsEqisEq
static IsEqualisEqual
static IsEqvisEqv
protected static SimpleEnvironmentkawaEnvironment
static Lambdalambda
static mapmap
static notnot
static EnvironmentnullEnvironment
static NumberComparenumEqu
static NumberComparenumGEq
static NumberComparenumGrt
static NumberComparenumLEq
static NumberComparenumLss
static Environmentr4Environment
static Environmentr5Environment
static replrepl
static AbstractFormatwriteFormat
Constructor Summary
Scheme()
protected Scheme(Environment env)
Method Summary
static Environmentbuiltin()
ReadTablecreateReadTable()
static Objecteval(String string, Environment env)
Evalutate Scheme expressions from string.
static Objecteval(InPort port, Environment env)
Evalutate Scheme expressions from stream.
static Objecteval(Object sexpr, Environment env)
Evalutate Scheme expressions from an "S expression."
static Typeexp2Type(Expression exp)
Convert expression to a Type.
AbstractFormatgetFormat(boolean readable)
static SchemegetInstance()
StringgetName()
static TypegetNamedType(String name)
intgetNamespaceOf(Declaration decl)
TypegetTypeFor(Class clas)
TypegetTypeFor(String name)
static TypegetTypeValue(Expression exp)
If exp is a "constant" Type, return that type, otherwise return null.
NamedLocationlookupBuiltin(Symbol name, Object property, int hash)
ExpressionmakeApply(Expression func, Expression[] args)
static voidregisterEnvironment()
The compiler insert calls to this method for applications and applets.
static Typestring2Type(String name)

Field Detail

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 Detail

Scheme

public Scheme()

Scheme

protected Scheme(Environment env)

Method Detail

builtin

public static Environment builtin()

createReadTable

public ReadTable createReadTable()

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.

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.

exp2Type

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

getFormat

public AbstractFormat getFormat(boolean readable)

getInstance

public static Scheme getInstance()

getName

public String getName()

getNamedType

public static Type getNamedType(String name)

getNamespaceOf

public int getNamespaceOf(Declaration decl)

getTypeFor

public Type getTypeFor(Class clas)

getTypeFor

public Type getTypeFor(String name)

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)

makeApply

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

registerEnvironment

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

string2Type

public static Type string2Type(String name)