public class Scheme extends LispLanguage
Modifier and Type | Field and Description |
---|---|
static Apply |
apply |
static ApplyToArgs |
applyToArgs |
static LangPrimType |
booleanType |
static java.lang.String |
emptyStringLeft |
static java.lang.String |
emptyStringRight |
static int |
FOLLOW_R5RS |
static int |
FOLLOW_R6RS |
static int |
FOLLOW_R7RS |
static Map |
forEach |
static Scheme |
instance |
static InstanceOf |
instanceOf |
static IsEq |
isEq |
static IsEqual |
isEqual |
static IsEqv |
isEqv |
static NumberPredicate |
isEven |
static NumberPredicate |
isOdd |
protected static SimpleEnvironment |
kawaEnvironment |
static Map |
map |
static Not |
not |
static NumberCompare |
numEqu |
static NumberCompare |
numGEq |
static NumberCompare |
numGrt |
static NumberCompare |
numLEq |
static NumberCompare |
numLss |
bracket_apply_sym, bracket_list_sym, constructNamespace, defaultReadTable, dots3_sym, entityNamespace, getNamedPartLocation, lookup_sym, quasiquote_str, quasiquote_sym, quote_str, splice_colon_str, splice_colon_sym, splice_str, splice_sym, unitNamespace, unquote_str, unquotesplicing_str
current, environ, FUNCTION_NAMESPACE, global, NAMESPACE_PREFIX_NAMESPACE, PARSE_CURRENT_NAMES, PARSE_EMIT_MAIN, PARSE_EXPLICIT, PARSE_FOR_APPLET, PARSE_FOR_EVAL, PARSE_FOR_LINT, PARSE_FOR_SERVLET, PARSE_IMMEDIATE, PARSE_INTERACTIVE_MODULE, PARSE_ONE_LINE, PARSE_PROLOG, requirePedantic, userEnv, VALUE_NAMESPACE
Modifier | Constructor and Description |
---|---|
|
Scheme() |
protected |
Scheme(Environment env) |
Modifier and Type | Method and Description |
---|---|
boolean |
appendBodyValues()
Should the values of body/block be appended as multiple values?
Otherwise, just return the result of the final expression.
|
Symbol |
asSymbol(java.lang.String ident) |
static Environment |
builtin() |
ReadTable |
createReadTable()
Create a fresh
ReadTable appropriate for this language. |
static java.lang.Object |
eval(gnu.kawa.io.InPort port,
Environment env)
Evaluate Scheme expressions from stream.
|
static java.lang.Object |
eval(java.lang.Object sexpr,
Environment env)
Evaluate Scheme expressions from an "S expression."
|
static java.lang.Object |
eval(java.lang.String string,
Environment env)
Evaluate Scheme expressions from string.
|
static Type |
exp2Type(Expression exp)
Convert expression to a Type.
|
java.lang.String |
formatType(Type type) |
java.lang.String |
getCompilationClass() |
gnu.kawa.format.AbstractFormat |
getFormat(boolean readable) |
static Scheme |
getInstance() |
LispReader |
getLexer(gnu.kawa.io.InPort inp,
SourceMessages messages) |
java.lang.String |
getName() |
int |
getNamespaceOf(Declaration decl)
Return the namespace (e.g value or function) of a Declaration.
|
static Environment |
getR5rsEnvironment() |
static Scheme |
getR5rsInstance() |
static Scheme |
getR6rsInstance() |
static Scheme |
getR7rsInstance() |
int |
getStandardToFollow() |
static Environment |
getStdEnvironment() |
protected java.util.HashMap<java.lang.String,Type> |
getTypeMap() |
static Type |
getTypeValue(Expression exp)
If exp is a "constant" Type, return that type, otherwise return null.
|
boolean |
keywordsAreSelfEvaluating()
Are keywords self-evaluating?
True in CommonLisp.
|
static java.lang.Exception |
loadClass(java.lang.String path,
Environment env) |
static void |
registerEnvironment()
The compiler insert calls to this method for applications and applets.
|
declFromField, decodeArrayType, defSntxStFld, defSntxStFld, fromLangSymbol, getNamedType, getPackageStyleType, getPrimaryPrompt, getSecondaryPrompt, getTypeFor, getTypeFor, langSymbolToSymbol, parse, resolve, selfEvaluatingSymbol
asType, booleanObject, booleanValue, coerceFromObject, coerceToObject, decodeType, defAliasStFld, define, defineFunction, defineFunction, defProcStFld, defProcStFld, defProcStFld, defProcStFldAs, detect, detect, detect, encodeType, eval, eval, eval, eval, eval, eval, eval, eval, eval, getCompilation, getCompilation, getDefaultLanguage, getEnvironment, getEnvPropertyFor, getEnvPropertyFor, getExtensions, getInstance, getInstance, getInstanceFromFilenameExtension, getLangEnvironment, getLangTypeFor, getLanguages, getNewEnvironment, getOutputConsumer, getSymbol, getTypeFor, getTypeFor, getTypeFor, hasNamespace, hasSeparateFunctionNamespace, isTrue, isValidJavaName, loadClass, lookup, lookupBuiltin, mangleName, noValue, parse, parse, parse, parse, registerLanguage, restoreCurrent, runAsApplication, setCurrentLanguage, setDefaults, setSaveCurrent, unionType
public static final int FOLLOW_R5RS
public static final int FOLLOW_R6RS
public static final int FOLLOW_R7RS
protected static final SimpleEnvironment kawaEnvironment
public static final Scheme instance
public static final LangPrimType booleanType
public static final ApplyToArgs applyToArgs
public static final Apply apply
public static final InstanceOf instanceOf
public static final Not not
public static final IsEq isEq
public static final IsEqv isEqv
public static final IsEqual isEqual
public static final Map map
public static final Map forEach
public static final NumberCompare numEqu
public static final NumberCompare numGrt
public static final NumberCompare numGEq
public static final NumberCompare numLss
public static final NumberCompare numLEq
public static final NumberPredicate isOdd
public static final NumberPredicate isEven
public static final java.lang.String emptyStringLeft
public static final java.lang.String emptyStringRight
public Scheme()
protected Scheme(Environment env)
public int getStandardToFollow()
public static Scheme getInstance()
public static java.lang.Exception loadClass(java.lang.String path, Environment env)
public static Environment getR5rsEnvironment()
public static Environment getStdEnvironment()
public static Scheme getR5rsInstance()
public static Scheme getR6rsInstance()
public static Scheme getR7rsInstance()
public static Environment builtin()
public java.lang.String getCompilationClass()
getCompilationClass
in class LispLanguage
public static java.lang.Object eval(java.lang.String string, Environment env)
string
- the string containing Scheme expressionsenv
- the Environment to evaluate the string inpublic static java.lang.Object eval(gnu.kawa.io.InPort port, Environment env)
port
- the port to read Scheme expressions fromenv
- the Environment to evaluate the string inpublic static java.lang.Object eval(java.lang.Object sexpr, Environment env)
sexpr
- the S expression to evaluateenv
- the Environment to evaluate the string inpublic gnu.kawa.format.AbstractFormat getFormat(boolean readable)
public LispReader getLexer(gnu.kawa.io.InPort inp, SourceMessages messages)
getLexer
in class LispLanguage
public int getNamespaceOf(Declaration decl)
Language
getNamespaceOf
in class Language
public static Type getTypeValue(Expression exp)
protected java.util.HashMap<java.lang.String,Type> getTypeMap()
getTypeMap
in class LispLanguage
public java.lang.String formatType(Type type)
formatType
in class Language
public static Type exp2Type(Expression exp)
"TYPE"
or 'TYPE
or <TYPE>
.public Symbol asSymbol(java.lang.String ident)
public boolean appendBodyValues()
public boolean keywordsAreSelfEvaluating()
LispLanguage
keywordsAreSelfEvaluating
in class LispLanguage
public ReadTable createReadTable()
LispLanguage
ReadTable
appropriate for this language.createReadTable
in class LispLanguage
public static void registerEnvironment()