[Openmcl-devel] lap-functions

Taoufik Dachraoui dachraoui.taoufik at gmail.com
Sat Feb 23 05:43:24 PST 2013


sorry i sent the in-completed message by mistake


On Sat, Feb 23, 2013 at 2:32 PM, Taoufik Dachraoui <
dachraoui.taoufik at gmail.com> wrote:

> Hi
>
> is there any documents or tutorials about lap-functions
>
> I would like to write a part of a program using lap-functions
>
> The structure of the program is as follows:
>
> (defun gen-code (e)
>   (cond e
>      ((null e) nil)
>      ((atom e) e)
>
        ((eq x y) expr)
       ...))

gen-code generates a code like a tagbody with tags, gotos, and simple
conditionals using (if (eq symbol symbol) then else)

expr may contain a combination of (pop stack), (push x stack), (go label),
(goto (pop stack)) ...

goto is a computed go; (goto (pop stack)) will do (go <result of (pop
stack)>)

How can I mix lap-functions within lisp expressions; In gen-code I define
labels and I need to jump to those labels
when needed; labels are pushed/popped from a stack

Is there any tutorial for lap-functions or some simple examples with the
structure above

I tried to understand how tagbody works in nx1.lisp, and be inspired to
write my own gen-code mixing lisp and lap-functions, but without any
knowledge about lap-functions I found it difficult to understand

Kind regards
Taoufik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20130223/ed19795b/attachment.htm>


More information about the Openmcl-devel mailing list