Package kawa.standard

Class Scheme

    • Constructor Detail

      • Scheme

        public Scheme()
    • Method Detail

      • getStandardToFollow

        public int getStandardToFollow()
      • getInstance

        public static Scheme getInstance()
      • getR5rsEnvironment

        public static Environment getR5rsEnvironment()
      • getStdEnvironment

        public static Environment getStdEnvironment()
      • getR5rsInstance

        public static Scheme getR5rsInstance()
      • getR6rsInstance

        public static Scheme getR6rsInstance()
      • getR7rsInstance

        public static Scheme getR7rsInstance()
      • eval

        public static Object eval​(String string,
                                  Environment env)
        Evaluate Scheme expressions from string.
        Parameters:
        string - the string containing 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​(gnu.kawa.io.InPort port,
                                  Environment env)
        Evaluate 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)
        Evaluate 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.
      • getFormat

        public gnu.kawa.format.AbstractFormat getFormat​(boolean readable)
        Overrides:
        getFormat in class Language
      • getNamespaceOf

        public int getNamespaceOf​(Declaration decl)
        Description copied from class: Language
        Return 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:
        getNamespaceOf in class Language
      • getTypeValue

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

        public static Type exp2Type​(Expression exp)
        Convert expression to a Type. Allow "TYPE" or 'TYPE or <TYPE>.
      • 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: LispLanguage
        Are 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:
        keywordsAreSelfEvaluating in class LispLanguage
        Returns:
        true if we should treat keywords as self-evaluating.
      • registerEnvironment

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