Package kawa.standard
Class Scheme
java.lang.Object
gnu.expr.Language
gnu.kawa.lispexpr.LispLanguage
kawa.standard.Scheme
- Direct Known Subclasses:
BRL
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Applystatic final ApplyToArgsstatic final LangPrimTypestatic final Stringstatic final Stringstatic final intstatic final intstatic final intstatic final Mapstatic final Schemestatic final InstanceOfstatic final IsEqstatic final IsEqualstatic final IsEqvstatic final NumberPredicatestatic final NumberPredicateprotected static final SimpleEnvironmentstatic final Mapstatic final Notstatic final NumberComparestatic final NumberComparestatic final NumberComparestatic final NumberComparestatic final NumberCompareFields inherited from class gnu.kawa.lispexpr.LispLanguage
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_strFields inherited from class gnu.expr.Language
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanShould the values of body/block be appended as multiple values? Otherwise, just return the result of the final expression.static Environmentbuiltin()Create a freshReadTableappropriate for this language.static Objecteval(gnu.kawa.io.InPort port, Environment env) Evaluate Scheme expressions from stream.static Objecteval(Object sexpr, Environment env) Evaluate Scheme expressions from an "S expression."static Objecteval(String string, Environment env) Evaluate Scheme expressions from string.static Typeexp2Type(Expression exp) Convert expression to a Type.formatType(Type type) gnu.kawa.format.AbstractFormatgetFormat(boolean readable) static SchemegetLexer(gnu.kawa.io.InPort inp, SourceMessages messages) getName()intgetNamespaceOf(Declaration decl) Return the namespace (e.g value or function) of a Declaration.static Environmentstatic Schemestatic Schemestatic Schemeintstatic Environmentstatic TypegetTypeValue(Expression exp) If exp is a "constant" Type, return that type, otherwise return null.booleanAre keywords self-evaluating? True in CommonLisp.static ExceptionloadClass(String path, Environment env) static voidThe compiler insert calls to this method for applications and applets.Methods inherited from class gnu.kawa.lispexpr.LispLanguage
declFromField, decodeArrayType, defSntxStFld, defSntxStFld, fromLangSymbol, getNamedType, getPackageStyleType, getPrimaryPrompt, getSecondaryPrompt, getTypeFor, getTypeFor, langSymbolToSymbol, parse, resolve, selfEvaluatingSymbolMethods inherited from class gnu.expr.Language
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
-
Field Details
-
FOLLOW_R5RS
public static final int FOLLOW_R5RS- See Also:
-
FOLLOW_R6RS
public static final int FOLLOW_R6RS- See Also:
-
FOLLOW_R7RS
public static final int FOLLOW_R7RS- See Also:
-
kawaEnvironment
-
instance
-
booleanType
-
applyToArgs
-
apply
-
instanceOf
-
not
-
isEq
-
isEqv
-
isEqual
-
map
-
forEach
-
numEqu
-
numGrt
-
numGEq
-
numLss
-
numLEq
-
isOdd
-
isEven
-
emptyStringLeft
-
emptyStringRight
-
-
Constructor Details
-
Scheme
public Scheme() -
Scheme
-
-
Method Details
-
getStandardToFollow
public int getStandardToFollow() -
getInstance
-
loadClass
-
getR5rsEnvironment
-
getStdEnvironment
-
getR5rsInstance
-
getR6rsInstance
-
getR7rsInstance
-
builtin
-
getName
-
getCompilationClass
- Overrides:
getCompilationClassin classLispLanguage
-
eval
Evaluate Scheme expressions from string.- Parameters:
string- the string containing Scheme expressionsenv- the Environment to evaluate the string in- Returns:
- result of last expression, or Language.voidObject if none.
-
eval
Evaluate Scheme expressions from stream.- Parameters:
port- the port to read Scheme expressions fromenv- the Environment to evaluate the string in- Returns:
- result of last expression, or Language.voidObject if none.
-
eval
Evaluate Scheme expressions from an "S expression."- Parameters:
sexpr- the S expression to evaluateenv- the Environment to evaluate the string in- Returns:
- result of the expression.
-
getFormat
public gnu.kawa.format.AbstractFormat getFormat(boolean readable) -
getLexer
- Overrides:
getLexerin classLispLanguage
-
getNamespaceOf
Description copied from class:LanguageReturn the namespace (e.g value or function) of a Declaration. Return a bitmask of all the namespaces "covered" by the Declaration. Note this isn't a namespace in the XML sense; if a Declaration has a specific namespace URI, then that is part of its symbol. This namespace bitmap is a separate dimension, for the use of languages that have separate namespaces for different kinds of declarations, such as variables and functions.- Overrides:
getNamespaceOfin classLanguage
-
getTypeValue
If exp is a "constant" Type, return that type, otherwise return null. -
getTypeMap
- Overrides:
getTypeMapin classLispLanguage
-
formatType
- Overrides:
formatTypein classLanguage
-
exp2Type
Convert expression to a Type. Allow"TYPE"or'TYPEor<TYPE>. -
asSymbol
-
appendBodyValues
public boolean appendBodyValues()Should the values of body/block be appended as multiple values? Otherwise, just return the result of the final expression. -
keywordsAreSelfEvaluating
public boolean keywordsAreSelfEvaluating()Description copied from class:LispLanguageAre keywords self-evaluating? True in CommonLisp. Used to be true for Scheme also, but now in Scheme literal keywords should only be used for keyword arguments; if you want a Keyword value if should be quoted.- Overrides:
keywordsAreSelfEvaluatingin classLispLanguage- Returns:
- true if we should treat keywords as self-evaluating.
-
createReadTable
Description copied from class:LispLanguageCreate a freshReadTableappropriate for this language.- Specified by:
createReadTablein classLispLanguage
-
registerEnvironment
public static void registerEnvironment()The compiler insert calls to this method for applications and applets.
-