Common Lisp Package: BINGE

README:

FUNCTION

Public

EXTRACT-FROM-HEADERS (INCLUDES &KEY (PREAMBLE ) DEFINES CONSTANTS INCLUDE-PATHS)

Extract all the definitions from INCLUDES files.

POPULATE-NAMESPACE (NAMESPACE DECLARATIONS-LIST)

Populate NAMESPACE it with declarations from DECLARATIONS-LIST.

Private

Undocumented

GATHER-ALL-REQUESTED-DECLARATIONS (NAMESPACE CONSTANTS TYPES FUNCTIONS VARIABLES)

GENERIC-FUNCTION

Public

EXTRACT (INPUT)

Extract a list of all the definitions from INPUT. Return a tagged list.

MAKE-FFI (OUTPUT NAMESPACE &KEY CONSTANTS TYPES FUNCTIONS VARIABLES BACKEND (BACKEND *BACKEND*))

Write a FFI to OUTPUT from C declarations found in NAMESPACE. Select those you need sepcifying CONSTANTS, TYPES (struct, union, enum or typedef), FUNCTIONS and VARIABLES. If any of them is given the value T, all the declarations in that category are written.

VARIABLE

Public

*BACKEND*

Should hold the current backend to be used by the compiler.

*C-PREPROCESSOR*

Pathname or just the name of the C preprocessor program.

*COMPRESS-TYPES*

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.

*GCC-BUILTIN-VA_LIST*

If you parse gcc header files you might need this declaration added to your namespace.

*GCC-NULL-DEFINES*

List of preprocessor defines necessary to remove some special GCC features that would interfere with the parser.

CLASS

Public

C-NAMESPACE

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.