JavaScript is disabled on your browser.
Skip navigation links
gnu.commonlisp.lang

Class Lisp2

  • Direct Known Subclasses:
    CommonLisp, ELisp


    public abstract class Lisp2
    extends LispLanguage 
    Abstract class for Lisp-like languages with separate namespaces.
    • Field Detail

      • FALSE

        public static final LList FALSE
      • TRUE

        public static final Symbol TRUE
    • Constructor Detail

      • Lisp2

        public Lisp2()
    • Method Detail

      • isTrue

        public boolean isTrue(java.lang.Object value)
        Description copied from class: Language
        Test if a value is considered "true" in this language. Throws an exception if value can't be used in a boolean context. Use booleanValue to catch that exception.
        Overrides:
        isTrue in class Language
      • isTrueLisp

        public static boolean isTrueLisp(java.lang.Object value)
      • booleanObject

        public java.lang.Object booleanObject(boolean b)
        Overrides:
        booleanObject in class Language
      • noValue

        public java.lang.Object noValue()
        Description copied from class: Language
        The value to return for a "void" result.
        Overrides:
        noValue in class Language
      • hasSeparateFunctionNamespace

        public boolean hasSeparateFunctionNamespace()
        Determines if functions in this language have a separate namespace. Different Lisps have different organisations of the symbol namespace. "Lisp1" languages, notably Scheme, have a single namespace where functions and values are not distinguished. "Lisp2" languages, notably CL, separate the two objects into conceptually two namespaces. Kawa doesn't literally use two namespaces, such binding properties are looked up in an Environment table.
        Overrides:
        hasSeparateFunctionNamespace in class Language
        Returns:
        true if this language has a separate function namespace, false otherwise.
      • selfEvaluatingSymbol

        public boolean selfEvaluatingSymbol(java.lang.Object obj)
        Determine whether a symbol evaluates to itself.
        Overrides:
        selfEvaluatingSymbol in class LispLanguage
        Parameters:
        obj - The symbol to check
        Returns:
        true if the symbol evaluates to itself, otherwise false.
      • getEnvPropertyFor

        public java.lang.Object getEnvPropertyFor(java.lang.reflect.Field fld,
         java.lang.Object value)
        Given a field, figure out which namespace to put its binding in. Specifically, return the appropriate property key to use when importing the field's binding into an Environment: This is null for Scheme (as a Lisp1), but may be the FUNCTION property for languages like CL and Emacs Lisp, for example.
        Overrides:
        getEnvPropertyFor in class Language
        Parameters:
        fld - The field of some module we're importing.
        value - The value of the field (assuming it is constant).
        Returns:
        EnvironmentKey.FUNCTION if this is a function binding or null if this binding has the null property key.
      • getNamespaceOf

        public int getNamespaceOf(Declaration decl)
        Get the namespace of a declaration. Declaration symbols are either in the function or value namespace.
        Overrides:
        getNamespaceOf in class Language
        Parameters:
        decl - The declaration to check
        Returns:
        FUNCTION_NAMESPACE or VALUE_NAMESPACE.
      • asSymbol

        public static java.lang.Object asSymbol(java.lang.String name)
        Get a symbol for a given (interned) Java string.
      • getString

        public static java.lang.Object getString(java.lang.String name)
        Get a string for a given Java string.
      • getString

        public static java.lang.Object getString(Symbol symbol)
        Get a string for a given symbol.
      • defun

        protected void defun(java.lang.String name,
         java.lang.Object value)
      • defun

        protected void defun(Symbol sym,
         java.lang.Object value)
      • importLocation

        protected void importLocation(Location loc)
Skip navigation links

AltStyle によって変換されたページ (->オリジナル) /