POPULATE-NAMESPACE (NAMESPACE DECLARATIONS-LIST)
Populate NAMESPACE it with declarations from DECLARATIONS-LIST.
WRITE-DECLARATIONS (OUTPUT-STREAM DECLARATIONS-LIST)
Write a list of declarations to OUTPUT-STREAM.
WRITE-PACKAGE (OUTPUT-STREAM DECLARATIONS)
Write the package declaration to OUTPUT-STREAM. The package declaration is taken from DECLARATIONS. The package name is taken from BACKEND. If that slot is not set the whole declaration is skipped.
COMPLETE-DECLARATIONS (DECLARATION-LIST NAMESPACE)
ADD-NEW-DECLARATION (DECL NAMESPACE)
Add DECL declaration in NAMESPACE namespace only if it's not already in.
ADD-PRESENCE-INTO-FSLIST (OBJ HASH)
This will add only a placeholder in the hashtable of a FAST-SEARCHABLE-LIST, but not in its list. This is handy to pretend the object is already in the list when actualy it isn't.
CONVERT-COMPOUND-TO-C-SYNTAX (TYPE DECLARATION)
MEMBER-OF-FSLIST (OBJ HASH)
PUSH-INTO-FSLIST (OBJ HASH)
ADD-DECLARATION (DECLARATION NAMESPACE)
Add DECLARATION in NAMESPACE, replacing original declaration if already present.
FIND-C-CONSTANT (NAMESPACE NAME)
Find constant declaration named NAME in NAMESPACE.
SETFFIND-C-CONSTANT (DECLARATION NAMESPACE NAME)
Insert constant DECLARATION named NAME in NAMESPACE.
FIND-C-ENUM (NAMESPACE NAME)
Find enum declaration named NAME in NAMESPACE.
SETFFIND-C-ENUM (DECLARATION NAMESPACE NAME)
Insert enum DECLARATION named NAME in NAMESPACE.
FIND-C-FUNCTION (NAMESPACE NAME)
Find function declaration named NAME in NAMESPACE.
SETFFIND-C-FUNCTION (DECLARATION NAMESPACE NAME)
Insert function DECLARATION named NAME in NAMESPACE.
FIND-C-STRUCT (NAMESPACE NAME)
Find struct declaration named NAME in NAMESPACE.
SETFFIND-C-STRUCT (DECLARATION NAMESPACE NAME)
Insert struct DECLARATION named NAME in NAMESPACE.
FIND-C-TYPEDEF (NAMESPACE NAME)
Find typedef declaration named NAME in NAMESPACE.
SETFFIND-C-TYPEDEF (DECLARATION NAMESPACE NAME)
Insert typedef DECLARATION with NAME in NAMESPACE.
FIND-C-UNION (NAMESPACE NAME)
Find union declaration named NAME in NAMESPACE.
SETFFIND-C-UNION (DECLARATION NAMESPACE NAME)
Insert union DECLARATION named NAME in NAMESPACE.
FIND-C-VARIABLE (NAMESPACE NAME)
Find variable declaration named NAME in NAMESPACE.
SETFFIND-C-VARIABLE (DECLARATION NAMESPACE NAME)
Insert variable DECLARATION named NAME in NAMESPACE.
C-EXPRESSION (C-OBJECT NAME)
Convert C-OBJECT type to C syntax and attach name.
CHECK-REFERENCE (DECL NAMESPACE)
Make sure that the type referred by DECL exists. This is a nop if DECL is not a reference to a type. If the referenced type doesn't exist it's created and added to namespace.
COLLECT-DECLARATIONS (DECLARATION DECLARATIONS-LIST NAMESPACE)
Add to DECLARATIONS-LIST any missing declarations to fully define DECLARATION itself. All the additional declarations are taken from NAMESPACE. DECLARATIONS-LIST is sorted with most basic declarations last and independed delcarations first in the list.
Convert C-OBJECT to C syntax. More or less the opposite of what the BINGE parser does.
FIND-DECLARATION (DECL NAMESPACE)
Find DECL declaration in NAMESPACE and return it, otherwise return nil.
SETFFIND-DECLARATION (VALUE DECL NAMESPACE)
Insert DECL declaration in NAMESPACE.
MAKE-SURE-REFERRED-TYPES-EXIST (OBJ NAMESPACE)
Make sure all the types referenced by C object OBJ exist. If necessary populate namespace with dummies of the missing types.
SUBSTITUTE-DECLARATIONS-WITH-REFERENCES (OBJECT NAMESPACE)
Extract type definitions, if any, from C OBJECT, populating NAMESPACE with new declarations, and susbstitute when necessary with references to types. Return the possibly modified object.
TRANSFORM-TO-REFERENCE (OBJECT NAMESPACE)
If possible transform C OBJECT into a reference and populate NAMESPACE with its declaration.
UNALIAS-REFERENCE (OBJECT NAMESPACE)
Return the primitive type or a reference to the first user-required typedef or compound object at the basis of object. Look it up in NAMESPACE.
SETFCOMP-ERROR-DECLARATION (NEW-VALUE CONDITION)
Should hold the current backend to be used by the compiler.
Whether or not the compiler should try to compress the type hierarchy to avoid writing unnecessary type declarations in the generated FFI. This variable can have one of the following values: - NIL, don't compress - :TYPEDEFS, remove all the typedefs not required by user - :ALL, remove all the types that are not strictly required or requested by user.
Objects of this class represent all the declarations taken from parsing a C source/header file. Structs, unions and enums share the same hashtable as in C they share the same namespace.