Common Lisp Package: BINGE-PARSER

README:

FUNCTION

Public

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

Extract all the definitions from INCLUDES files.

Undocumented

EXPLAIN (STRING)

Private

EXTRACT-CONSTANTS (CONSTANTS INCLUDES INCLUDE-PATHS)

Extract C symbolic constants writing and compiling a special C source files that produces an alist of constants and values. Read its output and return the alist.

WRITE-C-SOURCE-FOR-COMPILATION (OUT PREAMBLE DEFINES INCLUDES CONSTANTS)

Write a C source file on OUT stream suitable for compilation and execution. This means inserting the necessary inclusion statements and the DEFINES to clear out all the fancy cc extensions that can be found. A main function is written including printf()s of all the CONSTANTS values.

WRITE-C-SOURCE-FOR-PARSER (OUT PREAMBLE DEFINES INCLUDES CONSTANTS)

Write a C source file on OUT stream suitable for preprocessing and, later on, parsing by BINGE. This means inserting the necessary inclusion statements and the DEFINES to clear out all the fancy cc extensions that can be found. CONSTANTS are written in a special syntax only BINGE can parse.

GENERIC-FUNCTION

Public

EXTRACT (INPUT)

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

Private

EXPLAIN-C-OBJECT (OBJ)

Explain in plain English what the C object OBJ stands for.

VARIABLE

Public

*C-COMPILER*

Pathname or just the name of the C compiler program.

*C-PREPROCESSOR*

Pathname or just the name of the C preprocessor program.

*GCC-NULL-DEFINES*

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

Private

*EXTRACT-CONSTANTS-WITH-CC*

Whether or not use the C compiler to extract symbolic constants. If this is NIL then the internal parser is used instead.