The parse-declarations-1.0 Reference Manual

This is the parse-declarations-1.0 Reference Manual, version 1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:15:03 2024 GMT+0.

Table of Contents


1 Systems

The main system appears first, followed by any subsystem dependency.


1.1 parse-declarations-1.0

Library to parse and rebuild declarations.

Author

Tobias C. Rittweiler <>

License

MIT

Version

1.0

Source

parse-declarations-1.0.asd.

Child Components

2 Files

Files are sorted by type and then listed depth-first from the systems components trees.


2.1 Lisp


2.1.1 parse-declarations-1.0/parse-declarations-1.0.asd

Source

parse-declarations-1.0.asd.

Parent Component

parse-declarations-1.0 (system).

ASDF Systems

parse-declarations-1.0.


2.1.2 parse-declarations-1.0/parse-declarations.lisp

Source

parse-declarations-1.0.asd.

Parent Component

parse-declarations-1.0 (system).

Packages

tcr.parse-declarations-1.0.

Public Interface
Internals

2.2 Static


2.2.1 parse-declarations-1.0/tests.lisp

Source

parse-declarations-1.0.asd.

Parent Component

parse-declarations-1.0 (system).


3 Packages

Packages are listed by definition order.


3.1 tcr.parse-declarations-1.0

Source

parse-declarations.lisp.

Use List

common-lisp.

Public Interface
Internals

4 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


4.1 Public Interface


4.1.1 Macros

Macro: check-declaration-env (place &key unknown-allowed warn-only)

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.

Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.


4.1.2 Ordinary functions

Function: 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.

Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Function: declaration-env-p (object)
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Function: 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.

Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Function: declaration-env.policy (env)

Return the optimization settings stored in ENV.

Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Function: filter-declaration-env (env &key affecting not-affecting include 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.

Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Function: 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.

Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Function: merge-declaration-envs (env1 env2)

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

Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Function: 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.

Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.


4.1.3 Generic functions

Generic Function: 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.

Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Methods
Method: analyze-declaration-specifier (identifier args ignore+10)
Method: analyze-declaration-specifier ((identifier (eql type)) args ignore+9)
Method: analyze-declaration-specifier ((identifier (eql special)) args ignore+8)
Method: analyze-declaration-specifier ((identifier (eql optimize)) args ignore+7)
Method: analyze-declaration-specifier ((identifier (eql notinline)) args ignore+6)
Method: analyze-declaration-specifier ((identifier (eql inline)) args ignore+5)
Method: analyze-declaration-specifier ((identifier (eql ignorable)) args ignore+4)
Method: analyze-declaration-specifier ((identifier (eql ignore)) args ignore+3)
Method: analyze-declaration-specifier ((identifier (eql ftype)) args ignore+2)
Method: analyze-declaration-specifier ((identifier (eql dynamic-extent)) args ignore+1)
Method: analyze-declaration-specifier ((identifier (eql declaration)) args ignore+0)
Method: analyze-declaration-specifier ((identifier symbol) args lexenv)
Method: analyze-declaration-specifier ((typespec class) args lexenv)
Method: analyze-declaration-specifier ((typespec cons) args lexenv)
Generic Function: build-declaration-specifier (declaration-identifier variables context)

Reconstruct a declaration specifier.

Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Methods
Method: build-declaration-specifier (id ignore+11 ctx)
Method: build-declaration-specifier ((id (eql declaration)) vars ignore+10)
Method: build-declaration-specifier ((id (eql dynamic-extent)) vars ignore+9)
Method: build-declaration-specifier ((id (eql ignore)) vars ignore+8)
Method: build-declaration-specifier ((id (eql ignorable)) vars ignore+7)
Method: build-declaration-specifier ((id (eql special)) vars ignore+6)
Method: build-declaration-specifier ((ignore+5 (eql type)) vars type)
Method: build-declaration-specifier ((ignore+4 (eql ftype)) vars ftype)
Method: build-declaration-specifier ((id (eql notinline)) vars ignore+3)
Method: build-declaration-specifier ((id (eql inline)) vars ignore+2)
Method: build-declaration-specifier ((ignore+0 (eql optimize)) ignore+1 settings)

4.1.4 Structures

Structure: declaration-env
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: %table
Type

hash-table

Initform

(make-hash-table :test (quote eq))

Readers

declaration-env.%table.

Writers

(setf declaration-env.%table).


4.2 Internals


4.2.1 Special variables

Special Variable: *standard-typespec-identifiers*
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Special Variable: +standard-declaration-identifiers+
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.


4.2.2 Macros

Macro: 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.

Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Macro: do-declspec ((var env &optional result) &body body)
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.


4.2.3 Ordinary functions

Function: %check-declaration-env (env &optional warn unknown-allowed)
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Function: atomic-type-specifier-p (symbol &optional env)
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Function: build-declspec (declspec)
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Function: collect-declspec-into (env spec)
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Function: copy-declaration-env (instance)
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Function: copy-declspec (instance)
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Reader: declaration-env.%table (instance)
Writer: (setf declaration-env.%table) (instance)
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Target Slot

%table.

Function: declspec-p (object)
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Reader: declspec.affected-variables (instance)
Writer: (setf declspec.affected-variables) (instance)
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Target Slot

affected-variables.

Reader: declspec.context (instance)
Writer: (setf declspec.context) (instance)
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Target Slot

context.

Reader: declspec.identifier (instance)
Writer: (setf declspec.identifier) (instance)
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Target Slot

identifier.

Reader: declspec.unknownp (instance)
Writer: (setf declspec.unknownp) (instance)
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Target Slot

unknownp.

Function: denormalize-function-names (function-expressions)
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Function: equal-binding-name (name1 name2)
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Function: for-each-declspec (env fn)
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Function: make-declaration-env ()
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Function: make-declspec (&key identifier affected-variables context unknownp)
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Function: normalize-function-names (fn-names)
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Function: parse-body (body &key documentation whole)
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.


4.2.4 Generic functions

Generic Function: compute-affected-variables (declaration-identifier decl-args)
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Methods
Method: compute-affected-variables ((ignore+10 (eql declaration)) ignore+11)
Method: compute-affected-variables ((ignore+8 (eql optimize)) ignore+9)
Method: compute-affected-variables ((ignore+7 (eql ftype)) args)
Method: compute-affected-variables ((ignore+6 (eql type)) args)
Method: compute-affected-variables ((ignore+5 (eql notinline)) args)
Method: compute-affected-variables ((ignore+4 (eql inline)) args)
Method: compute-affected-variables ((ignore+3 (eql dynamic-extent)) args)
Method: compute-affected-variables ((ignore+2 (eql ignorable)) args)
Method: compute-affected-variables ((ignore+1 (eql ignore)) args)
Method: compute-affected-variables ((ignore+0 (eql special)) args)
Generic Function: compute-declaration-context (declaration-identifier decl-args)
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Methods
Method: compute-declaration-context ((ignore+15 (eql declaration)) ignore+16)
Method: compute-declaration-context ((ignore+13 (eql dynamic-extent)) ignore+14)
Method: compute-declaration-context ((ignore+11 (eql ignore)) ignore+12)
Method: compute-declaration-context ((ignore+9 (eql ignorable)) ignore+10)
Method: compute-declaration-context ((ignore+7 (eql inline)) ignore+8)
Method: compute-declaration-context ((ignore+5 (eql notinline)) ignore+6)
Method: compute-declaration-context ((ignore+3 (eql special)) ignore+4)
Method: compute-declaration-context ((ignore+2 (eql type)) args)
Method: compute-declaration-context ((ignore+1 (eql ftype)) args)
Method: compute-declaration-context ((ignore+0 (eql optimize)) settings)

4.2.5 Structures

Structure: declspec
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: identifier
Readers

declspec.identifier.

Writers

(setf declspec.identifier).

Slot: affected-variables
Readers

declspec.affected-variables.

Writers

(setf declspec.affected-variables).

Slot: context
Readers

declspec.context.

Writers

(setf declspec.context).

Slot: unknownp
Readers

declspec.unknownp.

Writers

(setf declspec.unknownp).


4.2.6 Types

Type: declaration-identifier ()
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.

Type: declaration-specifier ()
Package

tcr.parse-declarations-1.0.

Source

parse-declarations.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (  
A   B   C   D   E   F   G   M   N   P  
Index Entry  Section

%
%check-declaration-env: Private ordinary functions

(
(setf declaration-env.%table): Private ordinary functions
(setf declspec.affected-variables): Private ordinary functions
(setf declspec.context): Private ordinary functions
(setf declspec.identifier): Private ordinary functions
(setf declspec.unknownp): Private ordinary functions

A
analyze-declaration-specifier: Public generic functions
analyze-declaration-specifier: Public generic functions
analyze-declaration-specifier: Public generic functions
analyze-declaration-specifier: Public generic functions
analyze-declaration-specifier: Public generic functions
analyze-declaration-specifier: Public generic functions
analyze-declaration-specifier: Public generic functions
analyze-declaration-specifier: Public generic functions
analyze-declaration-specifier: Public generic functions
analyze-declaration-specifier: Public generic functions
analyze-declaration-specifier: Public generic functions
analyze-declaration-specifier: Public generic functions
analyze-declaration-specifier: Public generic functions
analyze-declaration-specifier: Public generic functions
analyze-declaration-specifier: Public generic functions
atomic-type-specifier-p: Private ordinary functions

B
build-declaration-specifier: Public generic functions
build-declaration-specifier: Public generic functions
build-declaration-specifier: Public generic functions
build-declaration-specifier: Public generic functions
build-declaration-specifier: Public generic functions
build-declaration-specifier: Public generic functions
build-declaration-specifier: Public generic functions
build-declaration-specifier: Public generic functions
build-declaration-specifier: Public generic functions
build-declaration-specifier: Public generic functions
build-declaration-specifier: Public generic functions
build-declaration-specifier: Public generic functions
build-declarations: Public ordinary functions
build-declspec: Private ordinary functions

C
check-declaration-env: Public macros
collect-declspec-into: Private ordinary functions
compute-affected-variables: Private generic functions
compute-affected-variables: Private generic functions
compute-affected-variables: Private generic functions
compute-affected-variables: Private generic functions
compute-affected-variables: Private generic functions
compute-affected-variables: Private generic functions
compute-affected-variables: Private generic functions
compute-affected-variables: Private generic functions
compute-affected-variables: Private generic functions
compute-affected-variables: Private generic functions
compute-affected-variables: Private generic functions
compute-declaration-context: Private generic functions
compute-declaration-context: Private generic functions
compute-declaration-context: Private generic functions
compute-declaration-context: Private generic functions
compute-declaration-context: Private generic functions
compute-declaration-context: Private generic functions
compute-declaration-context: Private generic functions
compute-declaration-context: Private generic functions
compute-declaration-context: Private generic functions
compute-declaration-context: Private generic functions
compute-declaration-context: Private generic functions
copy-declaration-env: Private ordinary functions
copy-declspec: Private ordinary functions

D
declaration-env-p: Public ordinary functions
declaration-env.%table: Private ordinary functions
declaration-env.affected-variables: Public ordinary functions
declaration-env.policy: Public ordinary functions
declspec-p: Private ordinary functions
declspec.affected-variables: Private ordinary functions
declspec.context: Private ordinary functions
declspec.identifier: Private ordinary functions
declspec.unknownp: Private ordinary functions
define-declaration-methods: Private macros
denormalize-function-names: Private ordinary functions
do-declspec: Private macros

E
equal-binding-name: Private ordinary functions

F
filter-declaration-env: Public ordinary functions
for-each-declspec: Private ordinary functions
Function, %check-declaration-env: Private ordinary functions
Function, (setf declaration-env.%table): Private ordinary functions
Function, (setf declspec.affected-variables): Private ordinary functions
Function, (setf declspec.context): Private ordinary functions
Function, (setf declspec.identifier): Private ordinary functions
Function, (setf declspec.unknownp): Private ordinary functions
Function, atomic-type-specifier-p: Private ordinary functions
Function, build-declarations: Public ordinary functions
Function, build-declspec: Private ordinary functions
Function, collect-declspec-into: Private ordinary functions
Function, copy-declaration-env: Private ordinary functions
Function, copy-declspec: Private ordinary functions
Function, declaration-env-p: Public ordinary functions
Function, declaration-env.%table: Private ordinary functions
Function, declaration-env.affected-variables: Public ordinary functions
Function, declaration-env.policy: Public ordinary functions
Function, declspec-p: Private ordinary functions
Function, declspec.affected-variables: Private ordinary functions
Function, declspec.context: Private ordinary functions
Function, declspec.identifier: Private ordinary functions
Function, declspec.unknownp: Private ordinary functions
Function, denormalize-function-names: Private ordinary functions
Function, equal-binding-name: Private ordinary functions
Function, filter-declaration-env: Public ordinary functions
Function, for-each-declspec: Private ordinary functions
Function, make-declaration-env: Private ordinary functions
Function, make-declspec: Private ordinary functions
Function, map-declaration-env: Public ordinary functions
Function, merge-declaration-envs: Public ordinary functions
Function, normalize-function-names: Private ordinary functions
Function, parse-body: Private ordinary functions
Function, parse-declarations: Public ordinary functions

G
Generic Function, analyze-declaration-specifier: Public generic functions
Generic Function, build-declaration-specifier: Public generic functions
Generic Function, compute-affected-variables: Private generic functions
Generic Function, compute-declaration-context: Private generic functions

M
Macro, check-declaration-env: Public macros
Macro, define-declaration-methods: Private macros
Macro, do-declspec: Private macros
make-declaration-env: Private ordinary functions
make-declspec: Private ordinary functions
map-declaration-env: Public ordinary functions
merge-declaration-envs: Public ordinary functions
Method, analyze-declaration-specifier: Public generic functions
Method, analyze-declaration-specifier: Public generic functions
Method, analyze-declaration-specifier: Public generic functions
Method, analyze-declaration-specifier: Public generic functions
Method, analyze-declaration-specifier: Public generic functions
Method, analyze-declaration-specifier: Public generic functions
Method, analyze-declaration-specifier: Public generic functions
Method, analyze-declaration-specifier: Public generic functions
Method, analyze-declaration-specifier: Public generic functions
Method, analyze-declaration-specifier: Public generic functions
Method, analyze-declaration-specifier: Public generic functions
Method, analyze-declaration-specifier: Public generic functions
Method, analyze-declaration-specifier: Public generic functions
Method, analyze-declaration-specifier: Public generic functions
Method, build-declaration-specifier: Public generic functions
Method, build-declaration-specifier: Public generic functions
Method, build-declaration-specifier: Public generic functions
Method, build-declaration-specifier: Public generic functions
Method, build-declaration-specifier: Public generic functions
Method, build-declaration-specifier: Public generic functions
Method, build-declaration-specifier: Public generic functions
Method, build-declaration-specifier: Public generic functions
Method, build-declaration-specifier: Public generic functions
Method, build-declaration-specifier: Public generic functions
Method, build-declaration-specifier: Public generic functions
Method, compute-affected-variables: Private generic functions
Method, compute-affected-variables: Private generic functions
Method, compute-affected-variables: Private generic functions
Method, compute-affected-variables: Private generic functions
Method, compute-affected-variables: Private generic functions
Method, compute-affected-variables: Private generic functions
Method, compute-affected-variables: Private generic functions
Method, compute-affected-variables: Private generic functions
Method, compute-affected-variables: Private generic functions
Method, compute-affected-variables: Private generic functions
Method, compute-declaration-context: Private generic functions
Method, compute-declaration-context: Private generic functions
Method, compute-declaration-context: Private generic functions
Method, compute-declaration-context: Private generic functions
Method, compute-declaration-context: Private generic functions
Method, compute-declaration-context: Private generic functions
Method, compute-declaration-context: Private generic functions
Method, compute-declaration-context: Private generic functions
Method, compute-declaration-context: Private generic functions
Method, compute-declaration-context: Private generic functions

N
normalize-function-names: Private ordinary functions

P
parse-body: Private ordinary functions
parse-declarations: Public ordinary functions