Common Lisp Package: TCR.PARSE-DECLARATIONS-1.0

README:

FUNCTION

Public

BUILD-DECLARATIONS (TAG ENV &REST MORE-ENVS)

Builds the declaration specifiers described by ENV. If TAG is given, not declaration specifiers are returned, but declaration expression where the value of TAG is used as CAR of those expressions.

DECLARATION-ENV.AFFECTED-VARIABLES (ENV &OPTIONAL ALLOWED-DECL-IDS)

Return a list of all binding names that are affected by the declaration specifiers described by ENV. ALLOWED-DECL-IDS is the list of declaration identifiers to be considered.

DECLARATION-ENV.POLICY (ENV)

Return the optimization settings stored in ENV.

FILTER-DECLARATION-ENV (ENV &KEY AFFECTING NOT-AFFECTING (INCLUDE EVERYTHING) EXCLUDE FILTER-FUNCTION)

Return a fresh declaration-env that is the result of filtering ENV according to the given parameters: :AFFECTING may be a list of binding names, :INCLUDE may be :EVERYTHING, :BOUND, :FREE, :UNKNOWN, or a list of declaration identifiers, likewise for :EXCLUDE. :FILTER-FUNCTION may be a function which is called with the identifier, the affected variables, and the context of each declaration specifier of ENV; the FUNCTION should return a boolean.

MAP-DECLARATION-ENV (FUNCTION ENV)

Map over ENV, calling FUNCTION with the identifier, the affected variables, and the context of the declaration specifiers of ENV. FUNCTION should return the new values of these as multiple-values. The result is fresh declaration-env.

MERGE-DECLARATION-ENVS (ENV1 ENV2)

Merge ENV1 and ENV2. The result is a fresh declaration-env.

PARSE-DECLARATIONS (DECLARATIONS &OPTIONAL COMPILATION-ENV &KEY NOSTRIP)

Parse DECLARATIONS and return a declaration-env. If NOSTRIP is true, DECLARATIONS should be declaration specifiers rather than declaration expressions.

Undocumented

DECLARATION-ENV-P (OBJECT)

Private

DECLARATION-ENV.%TABLE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DECLSPEC.AFFECTED-VARIABLES (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DECLSPEC.CONTEXT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DECLSPEC.IDENTIFIER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DECLSPEC.UNKNOWNP (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

Undocumented

%CHECK-DECLARATION-ENV (ENV &OPTIONAL WARN UNKNOWN-ALLOWED)

ATOMIC-TYPE-SPECIFIER-P (SYMBOL &OPTIONAL ENV)

BUILD-DECLSPEC (DECLSPEC)

COLLECT-DECLSPEC-INTO (ENV SPEC)

COPY-DECLARATION-ENV (INSTANCE)

COPY-DECLSPEC (INSTANCE)

SETFDECLARATION-ENV.%TABLE (NEW-VALUE INSTANCE)

DECLSPEC-P (OBJECT)

SETFDECLSPEC.AFFECTED-VARIABLES (NEW-VALUE INSTANCE)

SETFDECLSPEC.CONTEXT (NEW-VALUE INSTANCE)

SETFDECLSPEC.IDENTIFIER (NEW-VALUE INSTANCE)

SETFDECLSPEC.UNKNOWNP (NEW-VALUE INSTANCE)

DENORMALIZE-FUNCTION-NAMES (FUNCTION-EXPRESSIONS)

EQUAL-BINDING-NAME (NAME1 NAME2)

FOR-EACH-DECLSPEC (ENV FN)

MAKE-DECLARATION-ENV

MAKE-DECLSPEC (&KEY ((IDENTIFIER DUM0) NIL) ((AFFECTED-VARIABLES DUM1) NIL) ((CONTEXT DUM2) NIL) ((UNKNOWNP DUM3) NIL))

NORMALIZE-FUNCTION-NAMES (FN-NAMES)

PARSE-BODY (BODY &KEY DOCUMENTATION WHOLE)

MACRO

Public

CHECK-DECLARATION-ENV (PLACE &KEY UNKNOWN-ALLOWED WARN-ONLY &ENVIRONMENT ENV)

Check that PLACE is a declaration-env. If UNKNOWN-ALLOWED is NIL, further check that the declaration-env does not contain any unknown declaration specifiers.

Private

DEFINE-DECLARATION-METHODS (GENERIC-FN-NAME &BODY CLAUSES)

Used to conveniently define methods pattern matching on the standard declaration identifiers. GENERIC-FN-NAME must be the name of a generic function which takes a declaration identifier as first argument. CLAUSES ::= ((&rest DECL-IDS) SIMPLE-LAMBDA-LIST &body BODY)* | (:remaining SIMPLE-LAMBDA-LIST &body BODY) | (:default SIMPLE-LAMBDA-LIST &body BODY) | (:method SPECIALIZED-LAMBDA-LIST &body BODY)* The first clause defines methods that EQL specialize on the given declaration identifiers. The :remaining clause defines methods specializing on all remaining standard declaration identifiers that haven't yet been defined via first clauses. The :default clause defines the default method (i.e. specializing on nothing.) The :method clause is like the :method clause in DEFGENERIC. The lambda lists must be congruent to the lambda list of the generic function. A SIMPLE-LAMBDA-LIST is a lambda-list with required arguments only, where each parameter named "_" is substituted by a gensym.

Undocumented

DO-DECLSPEC ((VAR ENV &OPTIONAL RESULT) &BODY BODY)

GENERIC-FUNCTION

Public

ANALYZE-DECLARATION-SPECIFIER (DECLARATION-IDENTIFIER DECLARATION-ARGS COMPILATION-ENV)

Split a declaration specifier into parts. Should return exactly three values: The declaration identifier, a list of binding names affected by the declaration specifier, and an arbitrary context that can be used to reconstruct the specifier from these parts.

BUILD-DECLARATION-SPECIFIER (DECLARATION-IDENTIFIER VARIABLES CONTEXT)

Reconstruct a declaration specifier.

Private

Undocumented

COMPUTE-AFFECTED-VARIABLES (DECLARATION-IDENTIFIER DECL-ARGS)

COMPUTE-DECLARATION-CONTEXT (DECLARATION-IDENTIFIER DECL-ARGS)

VARIABLE

Private

Undocumented

*STANDARD-TYPESPEC-IDENTIFIERS*

+STANDARD-DECLARATION-IDENTIFIERS+

CLASS

Public

Undocumented

DECLARATION-ENV

Private

Undocumented

DECLSPEC