BEE Lisp

BEE Lisp is a lisp compiler for Windows. The compiler is able to produce stand alone executable files for Microsoft Windows platform both EXEs and DLLs. It has a programming interface to interopearate with native Win32 API and other DLLs exported functions. The programmer may construct native GUI Win32 applications.

COM interfaces

BEE Lisp can be driven programmatically via its COM interfaces which provide access to its lexical and syntaxical parser. One can therefore incorporate it into a third-party integrated development environment. By default, BEE Lisp comes integrated with the PSPad Editor.

Interaction with C++ code

Built-in BEE Lisp Functions and an ability to create DLLs

Software written in BEE Lisp may interoperate with C++ (or whatever other compiled language) via its CALLAPI and CALL functions that allow to use DLLs from BEE Lisp code. At other side, C++ programs can use DLLs, compiled by BEE Lisp (and written in BEE Lisp of course). C++ programs may even use lisp atoms and lists via LISPOBJECT interface

LISPOBJECT interface

LISPOBJECT is C++ interface (not COM) that allows for software written in other compiling languages (C++, Delphi etc.) to get access to lisp objects (lists or atoms). Also third-party software can create lisp object using CreateLispObject method.

All objects are divided into two classes:

  • atoms (identifiers, strings, numbers)
  • lists (lists of atoms and lists).

Using interface methods object type can be defined. There are several types:

  • objATOM – atom itself. Its name can be obtained using objName method. Some value can be bounded with atom – it can be obtained using objGetItem method with zero index parameter.
  • objLIST – list. It doesn’t contain name. Its elements can be obtained using objGetItem, passing element index.
  • ObjNUMBER – number. Its name is string representation of number. Doesn’t contain subelements.
  • ObjSTRING – zero-terminating string. Its name is string itself.

When working with lisp objects from other languages you should remember that lisp objects can not be deleted by lisp garbage collector, while object is managed from external program. Do not forget to count references to objects.

Examples

Hello world

(print "Hello, world!\n")

Tiny interactive interpreter

(setf $EVAL_ERROR$ 0) ;This line enables exception handling - see documentation
(defun println(str) 
; print line user function
(print str )
(print "\n")
)

(defun quit() (callapi "ExitProcess" "kernel32.dll" 0) )

(setf T 1)
(setf NIL 0)
(println "BEE LISP Interactive Programming system")
(println "To exit, type (QUIT)")
(loop T
(print ">")
(println( eval (read) ) )

)

ru:BEE Lisp