Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the binge Reference Manual, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 10:48:57 2018 GMT+0.
• Introduction: | What binge is all about | |
• Systems: | The systems documentation | |
• Modules: | The modules documentation | |
• Files: | The files documentation | |
• Packages: | The packages documentation | |
• Definitions: | The symbols documentation | |
• Indexes: | Concepts, functions, variables and data types |
* INSTALLATION. To compile and load BINGE an ASDF file is provided. Just install it in your system directory and do (asdf:oos 'asdf:load-op :binge) BINGE depends on NPG (the Naive Parser Generator) and SCLF. NPG can be found in the same place you found BINGE. * USAGE. The compilation of a FFI goes through three steps: the parsing (or extraction), the creation of the C namespace, and the generation of the FFI itself. For example, to generate a FFI for all the functions, types, and global variables of the a header file foo.h (and its included headers), you can do: (binge:make-ffi #P"foo-ffi.lisp" (binge:make-namespace (binge:extract-from-headers '("foo.h")))) This won't extract any symbolic constant unless you explicitly specify them with the :constants argument of extract-from-headers. BINGE should be able to parse C source files as well, but this is currently untested. Both make-ffi and extract-from-headers have keyword arguments you may want to look at, they let you specify what to extract and what type of backend to use (in case you want to cross-generate). In particular the :defines and :preamble keywords of extract-from-headers come handy to cope with weird extensions of certain compilers; for instance on gcc-based systems you may want to use something like: :defines '(("__attribute__(x)" "") ("__extension__(x)" "0") ("__inline" "") ("__asm(x)" "")) There is a global variable binge:*gcc-null-defines* just for this purpose, so on FreeBSD and Linux you just need to write (binge:extract-from-headers '("ncurses.h") :defines binge:*gcc-null-defines*) Actually gcc has many more nasty extensions and some cannot be tamed with just few defines; the __builtin_va_list, for example. This needs to be manually added to the namespace as a separate declaration. The special variable *compress-types* is an experimental feature made to reduce the number of type declarations in the generated FFI. It can be set to three values: - NIL, don't compress, keep all the necessary declarations - :TYPEDEFS, remove the superfluous typedefs - :ALL, remove all the non strictly necessary types, converting the pointers to them into void pointers A real life version of the example above would be something like: (setf constants-list '(...)) (setf namespace (binge:make-namespace (binge:extract-from-headers '("ncurses.h") :defines binge:*gcc-null-defines* :constants constants-list))) (binge-compiler:add-declaration (make-instance 'binge-decl:c-typedef-declaration :name "__builtin_va_list" :type :vararg) namespace) (binge:make-ffi #P"ncurses-ffi.lisp" namespace :functions t ; all functions :constants t ; all constants :backend (make-instance 'binge-backend:sbcl-backend :package "NCURSES" :prefix "%")) Where you specify a list of symbolic constants to extract (:constants some-var), tell BINGE to get all the functions, and prepend all the exported symbols with an percentage sign (:prefix "%"). So if everything works as expected, you should be able to simply (sb-alien:load-1-foreign "/usr/lib/libncurses.so") ; if running SBCL (load "ncurses-ffi.lisp") and use the new curses library. In reality, this won't be enough; things must be adjusted and many macros need to be written from scratch (the C macros). For instance, in this particular case, ncurses.h declares several functions which aren't actually in the library (libncurses.so), so either you specify a limited set of functions you want to extract, with the :functions keyword argument of make-ffi, or you manually remove from the output file those missing in the library. As the former solution may be a daunting task, given the size of the ncurses library, you'll probably settle for the latter. More examples can be found in the example directory. They are normally compiled and loaded together with the rest of BINGE and they'll be available in the binge-examples package (see example/package.lisp). For instance, to generate the FFI for the Berkeley DB library simply type (binge-examples:create-db-ffi) If you want to try a different backend than your default one, try for instance (let ((binge:*backend* (make-instance 'binge-backend:uffi-backend))) (binge-examples:create-db-ffi)) The UFFI backend is unconditionally loaded first, so, if your platform has its own specific backend, UFFI's won't be the default one. If, for whatever reason, you need to cross-generate a FFI for another Lisp system you have to load the appropriate backend manually: (load "binge:backends;your-backend.lisp") * HACKING. You might want to temper with binge:*c-preprocessor* if, to invoke the C preprocessor, you don't use "cc -E". If the general mechanism provided by extract-from-headers doesn't suit your needs, you could try using binge:extract, which is a generic function specialised on pathnames and streams. You have to provide your own preprocessed file or stream as the sole argument. If you want to spare a couple of hours to write your own backend, have a look in src/backend/sbcl.lisp for an example. That's at the moment the backend which is likely to be most up to date. Although BINGE is known to compile on LispWorks 4.2 you may want to check out this page if you run into stack limit problems: http://www1.xanalys.com/support/lisp/kbase.nsf/51fe6e1cdfe748a180256639005a2ba9/f35acd8100dfd9ba8525670b0074a8d6!OpenDocument The parsing of constant expression is still somehow limited and may result in parser errors in some particularly complex cases; please let me know. Some regression tests are provided in the directory test. You can run them with (asdf:oos 'asdf:load-op :binge-tests) (rtest:do-tests) or simply (asdf:oos 'asdf:test-op :binge) * LEGAL BINGE is copyright Walter C. Pelissero (walter@pelissero.de) and under GPL, though the files it produces are not. See the file COPYING for further details.
Next: Modules, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The binge system: |
Walter C. Pelissero <walter@pelissero.de>
Walter C. Pelissero <walter@pelissero.de>
GPL
Bovine INterface GEnerator
Bovine INterface GEnerator is a Common Lisp program that extracts types, variable/function declarations and symbolic constants from C header files and dumps a foreign function interface for them.
binge.asd (file)
Modules are listed depth-first from the system components tree.
• The binge/src module: | ||
• The binge/src/backends module: | ||
• The binge/example module: |
Next: The binge/src/backends module, Previous: Modules, Up: Modules [Contents][Index]
binge (system)
src/
Next: The binge/example module, Previous: The binge/src module, Up: Modules [Contents][Index]
src (module)
src/backends/
Previous: The binge/src/backends module, Up: Modules [Contents][Index]
src (module)
binge (system)
example/
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files: | ||
• Doc files: | ||
• Other files: |
Next: The binge/src/backends/uffi<dot>lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
binge.asd
binge (system)
Next: The binge/src/backends/sbcl<dot>lisp file, Previous: The binge<dot>asd file, Up: Lisp files [Contents][Index]
backends (module)
src/backends/uffi.lisp
Next: The binge/src/package<dot>lisp file, Previous: The binge/src/backends/uffi<dot>lisp file, Up: Lisp files [Contents][Index]
uffi.lisp (file)
backends (module)
src/backends/sbcl.lisp
Next: The binge/src/ss<dot>lisp file, Previous: The binge/src/backends/sbcl<dot>lisp file, Up: Lisp files [Contents][Index]
src (module)
src/package.lisp
Next: The binge/src/lexer<dot>lisp file, Previous: The binge/src/package<dot>lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
src (module)
src/ss.lisp
Next: The binge/src/grammar<dot>lisp file, Previous: The binge/src/ss<dot>lisp file, Up: Lisp files [Contents][Index]
src (module)
src/lexer.lisp
Next: The binge/src/decl<dot>lisp file, Previous: The binge/src/lexer<dot>lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
src (module)
src/grammar.lisp
define-grammar (special variable)
Next: The binge/src/binge<dot>lisp file, Previous: The binge/src/grammar<dot>lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
src (module)
src/decl.lisp
Next: The binge/src/parser<dot>lisp file, Previous: The binge/src/decl<dot>lisp file, Up: Lisp files [Contents][Index]
src (module)
src/binge.lisp
gather-all-requested-declarations (function)
Next: The binge/src/backend<dot>lisp file, Previous: The binge/src/binge<dot>lisp file, Up: Lisp files [Contents][Index]
src (module)
src/parser.lisp
Next: The binge/src/namespace<dot>lisp file, Previous: The binge/src/parser<dot>lisp file, Up: Lisp files [Contents][Index]
src (module)
src/backend.lisp
Next: The binge/src/compiler<dot>lisp file, Previous: The binge/src/backend<dot>lisp file, Up: Lisp files [Contents][Index]
src (module)
src/namespace.lisp
Next: The binge/example/package<dot>lisp file, Previous: The binge/src/namespace<dot>lisp file, Up: Lisp files [Contents][Index]
src (module)
src/compiler.lisp
Next: The binge/example/zlib<dot>lisp file, Previous: The binge/src/compiler<dot>lisp file, Up: Lisp files [Contents][Index]
example (module)
example/package.lisp
Next: The binge/example/ncurses<dot>lisp file, Previous: The binge/example/package<dot>lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
example (module)
example/zlib.lisp
create-zlib-ffi (function)
*zlib-ffi-c-constants* (special variable)
Next: The binge/example/db<dot>lisp file, Previous: The binge/example/zlib<dot>lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
example (module)
example/ncurses.lisp
create-ncurses-ffi (function)
*ncurses-ffi-c-constants* (special variable)
Next: The binge/example/gtk<dot>lisp file, Previous: The binge/example/ncurses<dot>lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
example (module)
example/db.lisp
create-db-ffi (function)
*db-ffi-c-constants* (special variable)
Next: The binge/example/xlib<dot>lisp file, Previous: The binge/example/db<dot>lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
example (module)
example/gtk.lisp
create-gtk-ffi (function)
*gtk-ffi-c-constants* (special variable)
Previous: The binge/example/gtk<dot>lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
example (module)
example/xlib.lisp
create-xlib-ffi (function)
*xlib-ffi-c-constants* (special variable)
Next: Other files, Previous: Lisp files, Up: Files [Contents][Index]
• The binge/copying file: | ||
• The binge/readme file: | ||
• The binge/announce file: |
Next: The binge/readme file, Previous: Doc files, Up: Doc files [Contents][Index]
binge (system)
COPYING
Next: The binge/announce file, Previous: The binge/copying file, Up: Doc files [Contents][Index]
binge (system)
README
Previous: The binge/readme file, Up: Doc files [Contents][Index]
binge (system)
ANNOUNCE
• The binge/.project file: | ||
• The binge/src/backends/cmucl file: | ||
• The binge/src/backends/lispworks file: | ||
• The binge/src/backends/clisp file: |
Next: The binge/src/backends/cmucl file, Previous: Other files, Up: Other files [Contents][Index]
binge (system)
.project
Next: The binge/src/backends/lispworks file, Previous: The binge/<dot>project file, Up: Other files [Contents][Index]
Next: The binge/src/backends/clisp file, Previous: The binge/src/backends/cmucl file, Up: Other files [Contents][Index]
Previous: The binge/src/backends/lispworks file, Up: Other files [Contents][Index]
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
Next: The binge package, Previous: Packages, Up: Packages [Contents][Index]
binge.asd
Next: The binge-compiler package, Previous: The binge-system package, Up: Packages [Contents][Index]
package.lisp (file)
gather-all-requested-declarations (function)
Next: The binge-backend package, Previous: The binge package, Up: Packages [Contents][Index]
package.lisp (file)
Next: The binge-parser package, Previous: The binge-compiler package, Up: Packages [Contents][Index]
package.lisp (file)
Next: The binge-lexer package, Previous: The binge-backend package, Up: Packages [Contents][Index]
package.lisp (file)
Next: The binge-grammar package, Previous: The binge-parser package, Up: Packages [Contents][Index]
package.lisp (file)
Next: The binge-decl package, Previous: The binge-lexer package, Up: Packages [Contents][Index]
package.lisp (file)
define-grammar (special variable)
Next: The binge-ss package, Previous: The binge-grammar package, Up: Packages [Contents][Index]
package.lisp (file)
common-lisp
Next: The binge-examples package, Previous: The binge-decl package, Up: Packages [Contents][Index]
package.lisp (file)
Previous: The binge-ss package, Up: Packages [Contents][Index]
package.lisp (file)
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions: | ||
• Internal definitions: |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported special variables: | ||
• Exported macros: | ||
• Exported functions: | ||
• Exported generic functions: | ||
• Exported conditions: | ||
• Exported structures: | ||
• Exported classes: |
Next: Exported macros, Previous: Exported definitions, Up: Exported definitions [Contents][Index]
Should hold the current backend to be used by the compiler.
compiler.lisp (file)
Pathname or just the name of the C compiler program.
parser.lisp (file)
Pathname or just the name of the C preprocessor program.
parser.lisp (file)
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.
compiler.lisp (file)
If you parse gcc header files you might need this declaration added to your namespace.
binge.lisp (file)
List of preprocessor defines necessary to remove some special GCC features that would interfere with the parser.
parser.lisp (file)
grammar.lisp (file)
Next: Exported functions, Previous: Exported special variables, Up: Exported definitions [Contents][Index]
lexer.lisp (file)
Next: Exported generic functions, Previous: Exported macros, Up: Exported definitions [Contents][Index]
decl.lisp (file)
compiler.lisp (file)
db.lisp (file)
gtk.lisp (file)
ncurses.lisp (file)
xlib.lisp (file)
zlib.lisp (file)
parser.lisp (file)
Extract all the definitions from INCLUDES files.
parser.lisp (file)
namespace.lisp (file)
namespace.lisp (file)
namespace.lisp (file)
namespace.lisp (file)
namespace.lisp (file)
lexer.lisp (file)
Populate NAMESPACE it with declarations from DECLARATIONS-LIST.
namespace.lisp (file)
decl.lisp (file)
lexer.lisp (file)
This function is called upon seeing an open curly bracket, to skip everything up to the matching close bracket.
lexer.lisp (file)
Write a list of declarations to OUTPUT-STREAM.
compiler.lisp (file)
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.
compiler.lisp (file)
Next: Exported conditions, Previous: Exported functions, Up: Exported definitions [Contents][Index]
Add DECLARATION in NAMESPACE, replacing original declaration if already present.
namespace.lisp (file)
If true define it’s own package.
backend.lisp (file)
Name of the package to write the FFI in.
backend.lisp (file)
automatically generated reader method
namespace.lisp (file)
automatically generated reader method
decl.lisp (file)
automatically generated writer method
decl.lisp (file)
Convert a C object into a string according to the syntax of the specific FFI.
backend.lisp (file)
sbcl.lisp (file)
sbcl.lisp (file)
sbcl.lisp (file)
sbcl.lisp (file)
sbcl.lisp (file)
sbcl.lisp (file)
sbcl.lisp (file)
sbcl.lisp (file)
sbcl.lisp (file)
sbcl.lisp (file)
sbcl.lisp (file)
sbcl.lisp (file)
sbcl.lisp (file)
sbcl.lisp (file)
sbcl.lisp (file)
sbcl.lisp (file)
uffi.lisp (file)
uffi.lisp (file)
uffi.lisp (file)
uffi.lisp (file)
uffi.lisp (file)
uffi.lisp (file)
uffi.lisp (file)
uffi.lisp (file)
uffi.lisp (file)
uffi.lisp (file)
uffi.lisp (file)
uffi.lisp (file)
uffi.lisp (file)
compiler.lisp (file)
Return the string of the Lisp name used for the DECLARATION. This may be different from the C name and is affected by BACKEND.
backend.lisp (file)
Extract a list of all the definitions from INPUT. Return a tagged list.
parser.lisp (file)
Find constant declaration named NAME in NAMESPACE.
namespace.lisp (file)
(setf find-c-constant) (generic function)
Insert constant DECLARATION named NAME in NAMESPACE.
namespace.lisp (file)
find-c-constant (generic function)
Find enum declaration named NAME in NAMESPACE.
namespace.lisp (file)
(setf find-c-enum) (generic function)
Insert enum DECLARATION named NAME in NAMESPACE.
namespace.lisp (file)
find-c-enum (generic function)
Find function declaration named NAME in NAMESPACE.
namespace.lisp (file)
(setf find-c-function) (generic function)
Insert function DECLARATION named NAME in NAMESPACE.
namespace.lisp (file)
find-c-function (generic function)
Find struct declaration named NAME in NAMESPACE.
namespace.lisp (file)
(setf find-c-struct) (generic function)
Insert struct DECLARATION named NAME in NAMESPACE.
namespace.lisp (file)
find-c-struct (generic function)
Find typedef declaration named NAME in NAMESPACE.
namespace.lisp (file)
(setf find-c-typedef) (generic function)
Insert typedef DECLARATION with NAME in NAMESPACE.
namespace.lisp (file)
find-c-typedef (generic function)
Find union declaration named NAME in NAMESPACE.
namespace.lisp (file)
(setf find-c-union) (generic function)
Insert union DECLARATION named NAME in NAMESPACE.
namespace.lisp (file)
find-c-union (generic function)
Find variable declaration named NAME in NAMESPACE.
namespace.lisp (file)
(setf find-c-variable) (generic function)
Insert variable DECLARATION named NAME in NAMESPACE.
namespace.lisp (file)
find-c-variable (generic function)
Return position of stream. The position may be an object of the class FILE-OFFSET.
ss.lisp (file)
lexer.lisp (file)
Make a reference to TYPE if TYPE is among those referenciables (struct, union, enum), otherwise return NIL.
decl.lisp (file)
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.
binge.lisp (file)
Return the list of packages to use in making the package declaration for the FFI. Specialised by every backend.
backend.lisp (file)
sbcl.lisp (file)
uffi.lisp (file)
Write an epilogue to OUTPUT-STREAM. Specialised by every backend.
backend.lisp (file)
Write a prologue to OUTPUT-STREAM. Specialised by every backend.
backend.lisp (file)
Next: Exported structures, Previous: Exported generic functions, Up: Exported definitions [Contents][Index]
compiler.lisp (file)
compilation-error (condition)
comp-error-item (method)
:item
comp-error-item (generic function)
Next: Exported classes, Previous: Exported conditions, Up: Exported definitions [Contents][Index]
ss.lisp (file)
structure-object (structure)
lexer-position (structure)
fpos-line (function)
(setf fpos-line) (function)
fpos-column (function)
(setf fpos-column) (function)
Previous: Exported structures, Up: Exported definitions [Contents][Index]
Base class for backend objects. Backend modules must derive another class from it: the C-OBJECT->FFI-NOTATION dispatching mechanism relies on it.
backend.lisp (file)
standard-object (class)
Name of the package to write the FFI in.
:package
backend-package (generic function)
(setf backend-package) (generic function)
If true define it’s own package.
boolean
:define-package
backend-define-package (generic function)
(setf backend-define-package) (generic function)
Prefix to add to declared functions/variables/types of the FFI.
:prefix
backend-prefix (generic function)
(setf backend-prefix) (generic function)
Default library name where to find the C object of the FFI.
:library
backend-library (generic function)
(setf backend-library) (generic function)
Class modelling C function arguments.
decl.lisp (file)
c-typed-name (class)
Class modelling C arrays.
decl.lisp (file)
list
:dimensions
c-dimensions (generic function)
(setf c-dimensions) (generic function)
Class modelling C bitfields.
decl.lisp (file)
integer
:bits
c-bits (generic function)
(setf c-bits) (generic function)
Class modelling C constant declarations.
decl.lisp (file)
c-declaration (class)
:value
c-value (generic function)
(setf c-value) (generic function)
Base class modelling C structured types; those containing a list of other objects.
decl.lisp (file)
c-type (class)
list
:slots
c-slots (generic function)
(setf c-slots) (generic function)
Base class modelling the C declarations.
decl.lisp (file)
c-named-object (class)
(or string null)
:documentation
c-documentation (generic function)
(setf c-documentation) (generic function)
(or string symbol null)
:alternate-name
c-alternate-name (generic function)
(setf c-alternate-name) (generic function)
(or symbol null)
:required
c-required (generic function)
(setf c-required) (generic function)
(or string null)
:library
c-library (generic function)
(setf c-library) (generic function)
Class modelling C enumerated declarations.
decl.lisp (file)
list
:constants
c-constants (generic function)
(setf c-constants) (generic function)
Class modelling references to C enums
decl.lisp (file)
c-type-ref (class)
Class modelling the C function types.
decl.lisp (file)
c-function-declaration (class)
list
:arguments
c-arguments (generic function)
(setf c-arguments) (generic function)
Class modelling the C function declarations.
decl.lisp (file)
Mixin class for C objects (declarations/types/variable/slots/ whatever) bearing a name.
decl.lisp (file)
c-object (class)
(or string symbol)
:name
(gensym)
c-name (generic function)
(setf c-name) (generic function)
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.
namespace.lisp (file)
standard-object (class)
hash-table
(make-hash-table :test (quote equalp))
c-constants (generic function)
hash-table
(make-hash-table :test (quote equalp))
c-typedefs (generic function)
hash-table
(make-hash-table :test (quote equalp))
c-structs (generic function)
hash-table
(make-hash-table :test (quote equalp))
c-functions (generic function)
hash-table
(make-hash-table :test (quote equalp))
c-variables (generic function)
Root class for all C language related objects: declarations, types and so on.
decl.lisp (file)
standard-object (class)
c-object->ffi-notation (method)
Class modelling C pointers.
decl.lisp (file)
Class modelling C struct/union slots.
decl.lisp (file)
c-typed-name (class)
Class modelling C struct declarations.
decl.lisp (file)
Class modeliing references to C struct.
decl.lisp (file)
c-type-ref (class)
Base class modelling the C types. Those which are not declarations.
decl.lisp (file)
c-object (class)
Base class modelling references to C types. Whether they are typedef, struct, union or enum.
decl.lisp (file)
c-type (class)
(or string symbol)
:ref-name
c-ref-name (generic function)
(setf c-ref-name) (generic function)
Base class for objects having a name and a type.
decl.lisp (file)
convert-to-c-syntax (method)
Mixin class for C objects having a type.
decl.lisp (file)
c-object (class)
(or binge-decl:c-type keyword)
:type
c-type (generic function)
(setf c-type) (generic function)
Class modelling C user type definition (aka typedef) .
decl.lisp (file)
Class modelling C union declarations.
decl.lisp (file)
Class modeliing references to C unions.
decl.lisp (file)
c-type-ref (class)
Class modelling references to user defined C types (those created with typedefs) .
decl.lisp (file)
c-type-ref (class)
Class modelling C variable declarations.
decl.lisp (file)
sbcl.lisp (file)
backend (class)
ss.lisp (file)
fundamental-character-input-stream (class)
parsable-stream (class)
integer
0
ss-column (generic function)
integer
0
ss-line (generic function)
:stream
boolean
t
ss-bol (generic function)
uffi.lisp (file)
backend (class)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal special variables: | ||
• Internal functions: | ||
• Internal generic functions: | ||
• Internal conditions: | ||
• Internal structures: | ||
• Internal classes: |
Next: Internal functions, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
binge.asd
db.lisp (file)
Whether or not use the C compiler to extract symbolic constants. If this is NIL then the internal parser is used instead.
parser.lisp (file)
gtk.lisp (file)
ncurses.lisp (file)
xlib.lisp (file)
zlib.lisp (file)
lexer.lisp (file)
lexer.lisp (file)
Next: Internal generic functions, Previous: Internal special variables, Up: Internal definitions [Contents][Index]
Add DECL declaration in NAMESPACE namespace only if it’s not already in.
namespace.lisp (file)
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.
compiler.lisp (file)
backend.lisp (file)
compiler.lisp (file)
backend.lisp (file)
lexer.lisp (file)
Return the integer value of CHAR if it’s a digit otherwise NIL. CHAR can be a letter to accomodate exadecimal numbers. Actually the base can be up to 36.
lexer.lisp (file)
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.
parser.lisp (file)
lexer.lisp (file)
lexer.lisp (file)
binge.lisp (file)
lexer.lisp (file)
namespace.lisp (file)
lexer.lisp (file)
lexer.lisp (file)
lexer.lisp (file)
lexer.lisp (file)
compiler.lisp (file)
grammar.lisp (file)
compiler.lisp (file)
lexer.lisp (file)
lexer.lisp (file)
lexer.lisp (file)
Try to interprete STR as an integer. Return its value.
lexer.lisp (file)
Try to read an integer number from STREAM according to BASE. Return its integer value.
lexer.lisp (file)
Read any kind of syntactically correct C number. Return a token according to type and value.
lexer.lisp (file)
Read a preprocessor line (those starting with # on column 0) and adjust the stream file name and line number accordingly.
lexer.lisp (file)
lexer.lisp (file)
lexer.lisp (file)
sbcl.lisp (file)
lexer.lisp (file)
lexer.lisp (file)
Create objects of type CONTAINER-CLASS typifying names of variables/slots. The typification is done calling function in NAME-COMPLETION-FUNCTIONS passing the BASE-TYPE, which is the missing bit to fully qualify a C name.
grammar.lisp (file)
uffi.lisp (file)
lexer.lisp (file)
lexer.lisp (file)
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.
parser.lisp (file)
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.
parser.lisp (file)
Next: Internal conditions, Previous: Internal functions, Up: Internal definitions [Contents][Index]
Default library name where to find the C object of the FFI.
backend.lisp (file)
Prefix to add to declared functions/variables/types of the FFI.
backend.lisp (file)
Convert C-OBJECT type to C syntax and attach name.
compiler.lisp (file)
automatically generated reader method
namespace.lisp (file)
automatically generated reader method
namespace.lisp (file)
automatically generated reader method
namespace.lisp (file)
automatically generated reader method
namespace.lisp (file)
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.
namespace.lisp (file)
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.
compiler.lisp (file)
compiler.lisp (file)
compiler.lisp (file)
Convert C-OBJECT to C syntax. More or less the opposite of what the BINGE parser does.
compiler.lisp (file)
Explain in plain English what the C object OBJ stands for.
parser.lisp (file)
Generic function that returns the string for the syntax required to get the size of a C type.
backend.lisp (file)
sbcl.lisp (file)
uffi.lisp (file)
Find DECL declaration in NAMESPACE and return it, otherwise return nil.
namespace.lisp (file)
(setf find-declaration) (generic function)
Insert DECL declaration in NAMESPACE.
namespace.lisp (file)
find-declaration (generic function)
automatically generated reader method
compiler.lisp (file)
Make sure all the types referenced by C object OBJ exist. If necessary populate namespace with dummies of the missing types.
namespace.lisp (file)
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.
namespace.lisp (file)
If possible transform C OBJECT into a reference and populate NAMESPACE with its declaration.
namespace.lisp (file)
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.
compiler.lisp (file)
Next: Internal structures, Previous: Internal generic functions, Up: Internal definitions [Contents][Index]
compiler.lisp (file)
error (condition)
compilation-unsupported-error (condition)
:declaration
comp-error-declaration (generic function)
(setf comp-error-declaration) (generic function)
Next: Internal classes, Previous: Internal conditions, Up: Internal definitions [Contents][Index]
lexer.lisp (file)
file-offset (structure)
fpos-file-name (function)
(setf fpos-file-name) (function)
fpos-token (function)
(setf fpos-token) (function)
Previous: Internal structures, Up: Internal definitions [Contents][Index]
compiler.lisp (file)
standard-object (class)
(make-hash-table)
(quote nil)
get-list (generic function)
binge.asd
static-file (class)
source-file-type (method)
lexer.lisp (file)
stateful-stream (class)
naive-parser-generator:grammar
:grammar
:file-name
integer
0
Previous: Definitions, Up: Top [Contents][Index]
• Concept index: | ||
• Function index: | ||
• Variable index: | ||
• Data type index: |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | B D F L M O |
---|
Jump to: | B D F L M O |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | (
A B C D E F G H L M O P R S T U W |
---|
Jump to: | (
A B C D E F G H L M O P R S T U W |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | *
+
A B C D F G I L N P R S T V |
---|
Jump to: | *
+
A B C D F G I L N P R S T V |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | B C F I L P S U |
---|
Jump to: | B C F I L P S U |
---|