#This file was created by <marc> Wed Oct 14 21:18:41 1998
#LyX 0.12 (C) 1995-1998 Matthias Ettrich and the LyX Team
\lyxformat 2.15
\textclass amsbook
\language default
\inputencoding default
\fontscheme default
\graphics default
\float_placement hp
\paperfontsize default
\spacing single 
\papersize Default
\paperpackage widemarginsa4
\use_geometry 0
\use_amsmath 0
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 2
\paperpagestyle default

\layout Author

Marc Mertens
\layout Title

LISP DEBUG
\layout Chapter

Introduction
\layout Standard


\emph on 
LISP DEBUG
\emph toggle 
 is a source level debugger, stepper and profiler for LISP programs.
 The current implementation works with GCL 2.2.2,CMUCL Lisp,ACL5 and CLISP
 and is tested on LINUX 2.0.
 Although 
\emph on 
LISP DEBUG
\emph toggle 
 makes use of the TCL/TK system for the GUI, no TCL/TK extensions are needed
 for 
\emph on 
LISP DEBUG
\emph toggle 
.
 LISP DEBUG has the following features :
\layout Itemize

Source level debugger (highlight in a sourcewindow the code being executed).
\layout Itemize

Lispform oriented not line oriented (function call is highlighted).
\layout Itemize

Multisource debugging is possible (the system will switch to another source
 if needed).
\layout Itemize

Controls :
\begin_deeper 
\layout Itemize

Step (execute the current form and stop at the next form)
\layout Itemize

Step over (execute the current form and stop at the next form in the current
 list)
\layout Itemize

Next (execute the current form and stop at the highlighted form)
\layout Itemize

Continue (execute the current form and don't stop anymore)
\end_deeper 
\layout Itemize

Breakpoints and conditional breakpoints are placed on lisp forms , not on
 lines.
\layout Itemize

Placement of watchpoints on variables and lispforms is possible.
\layout Itemize

Evaluation of lispexpressions during debugging.
\layout Itemize

Timetraveling (the debugger keeps track of the lisp forms executed + their
 environment , this makes it possible to step backwards and forwards through
 the code)
\layout Itemize

Profiling (count how many times a lisp form is executed)
\layout Itemize

Extensible (you can extend the lisp control structures the debugger recognizes
 by use of syntax definitions)
\layout Standard


\emph on 
LISP DEBUG
\emph toggle 
 works by instrumentation.
 When a lisp source is loaded in the debugger the following is happening
 :
\layout Enumerate

A temp file is created which contains the lisp source with debug code added
 to it (essentially code to call the debugger , to save position info and
 to save the environment of the function call).
\layout Enumerate

The temp file is loaded in the LISP system (you can ask to compile it before
 the load)
\layout Enumerate

The source code is loaded in a sourcewindow to be displayed during the debug
 process.
\layout Enumerate

You can now use the sourcewindow to set breakpoints ,watchpoints ...
 .
 When you run now code in the LISP system the execution will stop at the
 breakpoints and the lispform which should be executed next is highlighted
 in the sourcewindow.
 Form then one you can fully control the execution of the code.
\layout Enumerate

When you close a source the source will be removed from the sourcewindow
 and the original code (without instrumentation code) is loaded in the LISP
 system.
\layout Remark*

The original source code is never touched.
\layout Section

Warnings
\layout Itemize

Adding instrumentation code has some risks associated with it.
\begin_deeper 
\layout Itemize

Bugs in the debugger can cause malfunction of your code (I have done my
 best to avoid bugs but nobody is perfect :().
\layout Itemize

Bugs in the debugger can make that not every part of your program is available
 for debugging.
\end_deeper 
\layout Itemize

Macros are not easy to debug , given a macrocall the system will try to
 expand it and then try to add debugging code to the expanded code.
 System macro's which represents a special controlstructure (like cond,if
 ...) are handled in a special way.
 If you define your own controlstructures you can extend the debugger to
 handle them in the correct way.
\layout Itemize

Breakpoints can be placed on every lispform you can evaluate (with the exception
 of atomic expressions and some macros (example (defgeneric ...), (function
 ...)).
\layout Itemize

If you can't place a breakpoint on a form it is usually possible to place
 a breakpoint on certain subforms.
\layout Itemize

If you make changes to the source , you have to reload the source in the
 debugger (you can use copy/paste to load sources in the debugger if you
 use emacs or xemacs).
\layout Itemize

If there are bugs in your source code which causes a halt during loading
 , the debugger will halt when he loads the modified source code and you
 will enter the native debugger.
 If you exit the native debugger the rest of your code will be loaded.
 Always make sure that you can load code before you try to debug the code.
\layout Itemize

The debugger sits in package 
\begin_inset Quotes eld
\end_inset 

DEBUGGER
\begin_inset Quotes erd
\end_inset 

 , don't use this package.
\layout Itemize

In the 
\begin_inset Quotes eld
\end_inset 

USER
\begin_inset Quotes erd
\end_inset 

 package the function name 
\begin_inset Quotes eld
\end_inset 

debug
\begin_inset Quotes erd
\end_inset 

 (
\begin_inset Quotes eld
\end_inset 

deb
\begin_inset Quotes erd
\end_inset 

 in ACL) is exported , so you may not use this name for a function.
\layout Itemize

Allegro uses the name 
\begin_inset Quotes eld
\end_inset 

debug
\begin_inset Quotes erd
\end_inset 

 so I used 
\begin_inset Quotes eld
\end_inset 

deb
\begin_inset Quotes erd
\end_inset 

 in the case of Allegro.
\layout Chapter

Overview of the debugger.
\layout Section

Quick procedure to get you running.
\layout Enumerate

Make sure that X Windows is running,
\layout Enumerate

Start LISP (standalone or as a process in emacs (xemacs)
\layout Enumerate

Type (debug) at the lisp prompt ((deb) for Allegro).
 A separate debug window should open (see Figure: Starting Debugger) .
 You control debugging using this window.
\begin_float fig 
\layout Caption

Start
\protected_separator 
Debugger
\layout Standard
\align center 

\begin_inset Figure size 193 199
file pic1.ps
flags 9

\end_inset 


\end_float 
 
\layout Enumerate

Load a lisp source in the debugger using <File><Open> .
\begin_float fig 
\layout Caption

File
\protected_separator 
Selection
\layout Standard
\align center 

\begin_inset Figure size 284 193
file pic2.ps
flags 9

\end_inset 


\end_float 
\layout Enumerate

After loading the source, you can set a breakpoint by first selecting a
 lisp form and then clicking on <Breakpoint>.
 If a breakpoint is possible the breakpointed code will have another foreground
 color (default red).
 
\begin_deeper 
\layout Note*

Using the middle mousebutton you select a whole function , double clicking
 select a list.
\begin_float fig 
\end_deeper 
\layout Caption

Source
\protected_separator 
Window
\layout Standard
\align center 

\begin_inset Figure size 193 199
file pic3.ps
flags 9

\end_inset 


\end_float 
\layout Enumerate

Return then to the lisp prompt in the LISP system and type an expression.
 If the execution of the expression causes the breakpointed code to run
 , the currently executed code will be highlighted in the source window
 and the debugger waits for your commands.
 You can now step through the code , set watchpoints , evaluate expressions
 ...
 .
\begin_float fig 
\layout Caption

Executing
\protected_separator 
Code
\layout Standard
\align center 

\begin_inset Figure size 240 199
file pic4.ps
flags 9

\end_inset 


\end_float 
\layout Enumerate

For more detailed information of using the debugger go to the user manual.
\layout Enumerate

To stop debugging , use <File><Exit> , the original source (without) debugging
 code will be loaded back in the LISP system.
 
\layout Section

Using the debugger
\layout Subsection

Starting the debugger.
\layout Standard

To start the debugger , first make sure that X Windows is running , then
 start lisp (in a shell , in an emacs (xemacs) process or whatever editor
 you want).
 At the lisp prompt type (debug) ((deb) if you are using Allegro).
 A debug window will then start allowing you to control the debugging process.
\layout Subsection

Debugging programs.
\layout Standard

The debug window consists of the following parts :
\layout Itemize

A menu line ('File','Source','Edit','Options','Tools') to Open/Close sources
 , to switch between loaded sources , to paste code to configure the debugger
 and to do profiling.
\layout Itemize

A button panel containing the most used functions of the debugger (Stepping
 , Breakpointing , Watching , Evaluating and timetraveling).
\layout Itemize

A source pane which shows the source code , during debugging the debugpoints
 have a red foreground color , the code to be executed is highlighted in
 blue and if you do profiling , code called the specified amount of times
 is also highlighted in blue.
\layout Itemize

A watch pane , contains the watched variables and expressions in addition
 to their values.
 Displays also the value of an evaluation.
\layout Itemize

Command pane , used to type in an expression which can be used as a watchexpress
ion , which can be evaluated or which can be used in a conditional breakpoint.
\layout Standard

To debug a function you follow in general the following steps :
\layout Enumerate

Load the sourcecode of the function in the debugger , this can be done in
 two ways
\begin_deeper 
\layout Enumerate

The code is defined in a sourcefile on the harddisc , you use then <File><Open>
 to load the whole sourcefile in the debugger.
 This is the preferred way of working because you can then debug all related
 functions in the sourcefile.
\layout Enumerate

The code is defined in an editor (like emacs , xemacs ...) , select then the
 code , use the <Copy> function of the editor to put the code in the copybuffer.
 Use then <Edit><Paste> on the debugwindow to load the code in the sourcewindow.
 (You should see this happening otherwise Copy/Paste is not working with
 your editor :().
\end_deeper 
\layout Enumerate

Set a breakpoint , this can be done in two ways :
\begin_deeper 
\layout Enumerate

Select a form in the sourcepane and press then 'Breakpoint' to set a breakpoint
 , the color of the text in the form changes then to red , to indicate a
 breakpoint set on this form.
 The color will only change if you can really set a breakpoint .
 Example : in (defgeneric fac (n) (:method ((n integer)) (if (zerop n) 1
 (* n (fac (1- n))))) (:method ((n string)) (concatenate n 
\begin_inset Quotes eld
\end_inset 

!
\begin_inset Quotes erd
\end_inset 

))) you can set a breakpoint on (:method ((n integer)) (if (zerop n) 1 (*
 n (fac (1- n))))), (if (zerop n) 1 (* n (fac (1- n)))) , (zerop n) , (*
 n (fac (1- n))) , (fac (1- n)) , (1- n) , (: method ((n string)) (concatenate
 n 
\begin_inset Quotes eld
\end_inset 

!
\begin_inset Quotes erd
\end_inset 

)) , (concatenate n 
\begin_inset Quotes eld
\end_inset 

!
\begin_inset Quotes erd
\end_inset 

) but not on the (defgeneric ....) form.
 It should be clear that a breakpoint is not set on a line but on a form
 like a function call ((function arg1 ....
 argn) , ...) , a special function call ((cond (( ....) ...) ...) , (defun ...) , (let ...)
 , (do ....) ....) or a macro call.
 Breakpoints just like forms can be nested.
 The 'Breakpoint' act as toggle if you select a form which already has a
 breakpoint selected with it you remove the breakpoint.
 
\layout Enumerate

Type in an expression in the command pane , select a form in the source
 pane and press 'Break If' , this sets a conditional breakpoint , execution
 is halted only if the evaluation of the condition gives true as a result.
 An error during the evaluation is considered false (also a dialogbox explaining
 the error is displayed).
 The 'Break If' button act like the 'Breakpoint' button as a toggle.
\end_deeper 
\layout Enumerate

Set a watchpoint , this can be done in two ways :
\begin_deeper 
\layout Enumerate

Select a variable in a function and then press 'Watch' .
 In the watchpane you will see now the variable followed by an arrow to
 its value.
 If the variable is not defined the value will be 'Undefined'.
\layout Enumerate

Select a form in the source pane, type a expression in the command pane
 and press 'Watch exp'.
 This will set a watchpoint on the expression in the command pane which
 is evaluated if the selected code is executed (otherwise 'Undefined' is
 used as value).
\begin_deeper 
\layout Note*

A common mistake is to forgot to make a specific selection.
\end_deeper 
\end_deeper 
\layout Enumerate

To unset a watchpoint.
 Select the whole line of the watchpoint in the resultpane and press then
 'Unwatch'.
\layout Enumerate

You go now to the LISP system to type in some lisp expressions.
 If a breakpoint is encountered then the execution of the function will
 be paused and the code to be executed will be highlighted in the source
 pane of the debug window (if needed the corrected source will be loaded
 or a repositioning will take place so that the executing code is always
 visible).
 You can react now in the following ways :
\begin_deeper 
\layout Enumerate

Press the 'Step' button and execute the highlighted form , pausing at the
 next form to be executed (this could be a subform of the highlighted form).
 
\layout Enumerate

Press the 'Step Over' button , execute the highlighted form , pausing at
 the next form within the parent form (so we will not step through code
 called during execution of the highlighted form , unless breakpoints are
 placed of course).
\layout Enumerate

Select the code where the debugger should pause next and press then the
 'Next' button.
 The debugger will then start executing the code until a breakpoint is encounter
ed or the selected code is reached.
\layout Enumerate

Press the 'Continue' button , the debugger will then start executing the
 code until a breakpoint is encountered or nothing has to be executed.
\layout Enumerate

Press the 'Back' or 'Forward' button to do time traveling (look at the previous/
next executed code and variable context at that point).
\begin_deeper 
\layout Note*

If you have used Step or Step Over and all code is executed , then the system
 stays in a stepped state , if you execute another debugged function from
 the lisp prompted then the system pauses execution waiting on you to press
 'Step' , 'Step Over' , 'Continue' or 'Eval'.
\end_deeper 
\end_deeper 
\layout Enumerate

Select a source via <Source>.
\layout Enumerate

You stop debugging of a source by selecting the source and then <File><Close>.
 The original source code is then loaded in the LISP system.
\layout Enumerate

You stop the debugger via <File><Exit>.
 Before exiting , the debugger will load the original sources of all debugged
 code back in the LISP system.
\layout Chapter

Reference Manual
\layout Section

Menus
\layout Subsection

Overview
\layout Standard

Following menu items exist in the debugger :
\layout Itemize

<File><Open>
\layout Itemize

<File><Close>
\layout Itemize

<File><Exit>
\layout Itemize

<Source>
\layout Itemize

<Edit><Paste>
\layout Itemize

<Edit><Find>
\layout Itemize

<Options><Color Break>
\layout Itemize

<Options><Color Breakpoint>
\layout Itemize

<Options><Color Breakpoint If>
\layout Itemize

<Options><Color Profiling>
\layout Itemize

<Options><Font>
\layout Itemize

<Options>[Compile debugged code]
\layout Itemize

<Options><Save Options>
\layout Itemize

<Options>[Save on exit]
\layout Itemize

<Tools><Start profiling>
\layout Itemize

<Tools><Stop profiling>
\layout Subsection

Detailed description of menu items
\layout Subsubsection

<File><Open>
\layout Standard

Opens a window which allows you to select a LISP source.
 When pressing Ok , the selected source is processed to add debugging code
 and to save the modified code in a temp file.
 If the option <Options>[Compiled debugged code] is true then the temp file
 will be compiled and the compiled code will be loaded in the lisp system,
 in the other case the temp file will be loaded in the lisp system.
\layout Standard

\begin_float fig 
\layout Caption

<File><Open>
\layout Standard
\align center 

\begin_inset Figure size 284 193
file pic2.ps
flags 9

\end_inset 


\end_float 
\layout Subsubsection

<File><Close>
\layout Standard

The original code of the file in the sourcewindow is loaded in the lisp
 system.
 The sourcewindow is then emptied and filled with first loaded source (if
 it exist).
\layout Subsubsection

<File><Exit>
\layout Standard

Exit the debugger.
 Before this happens the original version of all debugged sources is loaded
 in the lisp system.
\layout Subsubsection

<Source>
\layout Standard

Allows you to select which of the sources loaded in the debugger is shown
 in the source window.
\layout Subsubsection

<Edit><Paste>
\layout Standard

If in emacs (xemacs) (or maybe your editor of choice) a selected area is
 copied to the copy buffer , then this selected area is used to create a
 tempory source which is loaded in the debugger.
 This allows you to debug functions which are in a editor but not yet in
 a source file.
 (Every copy/paste operation supported by tk_textPaste should work).
\layout Subsubsection

<Edit><Find>
\layout Standard

Activate the search function , to search the source currently displayed
 in the source window.
 Three types of search are possible :
\layout Itemize

Case , case sensitive search.
\layout Itemize

No Case , case insensitive search.
\layout Itemize

Regular expression , allows you to use regular expressions in the search.
\layout Standard

\begin_float fig 
\layout Caption

Find
\layout Standard
\align center 

\begin_inset Figure size 284 100
file pic5.ps
flags 9

\end_inset 


\end_float 
\layout Subsubsection

<Options><Color Break>,<Options><Color Breakpoint>,<Options><Color Breakpoint
 If>,<Options><Color Profiling> 
\layout Standard

Allows you to change the color of the current executed code , the breakpoints
 , the conditional breakpoints and the profiled code.
\layout Standard

\begin_float fig 
\layout Caption

Color
\layout Standard
\align center 

\begin_inset Figure size 284 172
file pic6.ps
flags 9

\end_inset 


\end_float 
\layout Subsubsection

<Options><Font>
\layout Standard

Use this menu to change the font used in the source,result and command pane.
\layout Standard

\begin_float fig 
\layout Caption

Font
\layout Standard
\align center 

\begin_inset Figure size 272 199
file pic7.ps
flags 9

\end_inset 


\end_float 
\layout Subsubsection

<Options>[Compile debugged code]
\layout Standard

When this switch is enabled , the source with debugcode added is first compiled
 before it is loaded in the lisp system.
 This could be usefull on lisp systems which do a precompile of a function
 before executing it for the first time (because the extra debugging code
 , this precompile could take a long time).
 
\layout Subsubsection

<Options><Save Options>
\layout Standard

Save the options in a <Options> in the file $HOME/.lispdebug.lisp.
 This file is a standard text file and contains the following settings :
\layout Itemize

(DEBUGGER::setting "COMPILE_CODE" 0)
\layout Itemize

(DEBUGGER::setting "SAVE_ON_EXIT" 0)
\layout Itemize

(DEBUGGER::setting "DEBUGPOINT_COLOR" "#ff0000")
\layout Itemize

(DEBUGGER::setting "DEBUGPOINTIF_COLOR" "#808000")
\layout Itemize

(DEBUGGER::setting "CURRENT_COLOR" "#00ffff")
\layout Itemize

(DEBUGGER::setting "PROFILE_COLOR" "#ffff00")
\layout Itemize

(DEBUGGER::setting "FONT" "-*-helvetica-medium-r-normal-*-120-*-*-*-*-*-*")
\layout Standard

If you modify or create this file manual (for example because default color
 or font is not supported on your system) be sure to not forget DEBUGGER
 (in case of Allegro it must be in uppercase to).
\layout Subsubsection

<Options>[Save on Exit]
\layout Standard

When enabled, the current options are save in $HOME/.lispdebug.lisp when the
 debuggers stops.
\layout Subsubsection

<Tools><Start Profiling>
\layout Standard

Enables the profiling part of the debugger.
 The profile counters (how many time a piece of code is executed) is reset
 to zero and an extra slider is made viable in the left part of the debugwindow.
 When code is executed the system keep track of the number of times a lispform
 is executed.
 By using the slider you highlight the code which is at least as many times
 executed as the number shown by the slider.
\layout Standard

\begin_float fig 
\layout Caption

Debugger
\protected_separator 
when
\protected_separator 
profiling
\layout Standard
\align center 

\begin_inset Figure size 207 199
file pic8.ps
flags 9

\end_inset 


\end_float 
\layout Subsubsection

<Tools><Stop Profiling>
\layout Standard

Disables the profiling part of the debugger.
\layout Section

Source Pane
\layout Subsection

Content.
\layout Standard

The source pane contains the source of the code which is debugged.
 The source which is displayed depends on the following conditions:
\layout Itemize

If you open a new source , then this is the source displayed.
\layout Itemize

You can change the source displayed via the <Source> menu.
\layout Itemize

If you close a source , the first opened source is displayed.
\layout Itemize

If the system encounters a breakpoint , the source containing the breakpoint
 is displayed , the window on the source is also repositioned so that the
 executing code is visable.
\layout Subsection

Selection
\layout Standard

Selection is the base for setting breakpoints , setting conditional breakpoints
 and setting watch expressions.
 Selection can be done in the following ways.
\layout Itemize

Dragging.
 Click with the mouse in the sourcepane (use the left button), drag the
 mouse to an other point and release the button.
\layout Itemize

Click somewhere in a function definition with the middle mouse button.
 This selects the whole function.
\layout Itemize

Double click with the left button , this selects a whole list.
\layout Subsection

Highlighting.
\layout Standard

Pieces of the sources are highlighted as follows (we use the default colors
 of the debugger).
\layout Itemize

Red foreground , this is a breakpoint.
\layout Itemize

Dark green foreground , this is a conditional breakpoint.
\layout Itemize

Light blue background , this code will be executed next.
\layout Itemize

Yellow background , this code fulfills the profile count (is at least as
 many times executed).
\layout Section

Result Pane
\layout Subsection

Content.
\layout Standard

The result pane contains the value of watch variables , the results of evaluatin
g watch expressions , the result of a evaluation or the result of previous
 executed code.
 The format used is as follows 'exp --> value' .
 Here 'exp' could be a variable , a watched expression, a evaluated expression
 or the result of previous executed code (this is indicated by enclosing
 this code with hooks).
 'value' could be 'Undefined' (the variable is not defined or the expression
 couldn't be evaluated) , (values .....) the result was caused by a (values ...)
 statement or just the value(result) of the variable (expression).
 You can remove watchpoints and watchexpressions by selecting the whole
 of 'exp-->value' and then pressing <Unwatch>.
\layout Note*

For GCL there is no support for values results , in case of the use of (values
 ...) only the first value is displayed , you can try to use 'multiple-value-list'
 to display every possible value.
\layout Section

Command Pane
\layout Subsection

Content.
\layout Standard

The command pane is the only pane which can be edited.
 You use this to type in expressions needed by the debugger.
 This will be the case in the following situations:
\layout Itemize

Conditional breakpoints (NIL or non NIL of the evaluated expression determines
 if the system stops or not).
\layout Itemize

Watch Expression (the expression to watch).
\layout Itemize

Eval (the expression to evaluate).
\layout Section

Buttons
\layout Subsection

Overview.
\layout Standard

The following buttons are available:
\layout Itemize

<Step>
\layout Itemize

<Step Over>
\layout Itemize

<Next>
\layout Itemize

<Continue>
\layout Itemize

<Breakpoint>
\layout Itemize

<Break If>
\layout Itemize

<Watch>
\layout Itemize

<Watch Exp>
\layout Itemize

<Unwatch>
\layout Itemize

<Eval>
\layout Itemize

<Back>
\layout Itemize

<Forward>
\layout Subsection

Detailed description of the buttons.
\layout Subsubsection

<Step>
\layout Standard

When the program has halted because of a breakpoint (conditional breakpoint),
 press <Step> to execute the highlighted code and advance execution.
 The debugger will halt the program at the first following debugged lispform
 (the debugger can only halt in debugged code = code loaded in the debugger).
\layout Subsubsection

<Step Over>
\layout Standard

When the program has halted because of a breakpoint (conditional breakpoint),
 press <Step Over> to execute the highlighted code and advance execution.
 The debugger will halt the program in the following cases (whichever first
 occurs).
\layout Itemize

A breakpoint is encountered.
\layout Itemize

A lispform in the same enclosing list as the highlighted form must be executed.
\layout Subsubsection

<Next>
\layout Standard

When the program has halted because of a breakpoint (conditional breakpoint),
 use <Next> to advance execution.
 To use <Next> first select another lisp form and press then <Next> the
 execution with then proceed until one of the following two cases are encountere
d (whichever first occurs).
\layout Itemize

A breakpoint is encountered.
\layout Itemize

The highlighted code must be executed.
\layout Subsubsection

<Continue>
\layout Standard

Pressing <Continue> will advance a halted program , the program will either
 fully execute or will halt at the next breakpoint.
\layout Subsubsection

<Breakpoint>
\layout Standard

Use this to set a breakpoint.
 To set a breakpoint just highlight a lispform and then press <Breakpoint>.
 If during executing of code the highlighted code must be executed then
 the debugger halts execution just before this code gets executed.
 Use <Step>,<Step Over>,<Next> or <Continue> to continue execution.
\layout Subsubsection

<Break If>
\layout Standard

Use this to set a conditional breakpoint.
 To set a conditional breakpoint, highlight a lispform, type a condition
 in the command window and press <Break If>.
 If during execution of code the highlighted code must be executed then
 the debugger evaluates the condition and if the result is non nil execution
 will halt.
 
\layout Note*

Errors during evaluating the condition counts as a NIL and a message detailing
 the error is displayed.
\layout Subsubsection

<Watch>
\layout Standard

Sets a watchpoint on a variable.
 To do this selects the variable and then press <Watch> , the variable and
 its value is then visible in the result pane.
\layout Subsubsection

<Watch Exp>
\layout Standard

Sets a watchpoint on a expression.
 First select a area where the watchpoint is valid , then type in the expression
 in the command pane and press <Watch Exp>.
 When execution happens in the selected area the exp is evaluated and the
 result is displayed in the result pane.
 If the evaluation of the expression causes an error this is displayed as
 an error message and the result is undefined.
\layout Subsubsection

<Unwatch>
\layout Standard

Stops watching a variable or expression.
 To do this selects the variable(expression) in the result pane together
 with the result and press <Unwatch>.
\layout Subsubsection

<Eval>
\layout Standard

Evaluates a expression in the debugging context.
 If during debugging (when execution has halted and you have control) you
 feel the need to evaluate a expression in the context of the highlighted
 code do the following.
 Type in an expression in the command pane and press <Eval>, the result
 will then be visable in the result pane.
 If the evaluation of the expression causes an error this is displayed as
 an error message and the result is undefined.
\layout Subsubsection

<Back>
\layout Standard

Activates time traveling , the debugger keeps track of the 100 lasts forms
 executed together with their context.
 By pressing <Back> you go to the previous executed form and change the
 context to the context at that time.
 Has the same functionality as the frame concepts in the system debuggers.
\layout Subsubsection

<Forward>
\layout Standard

Activates time traveling , the debugger keeps track of the 100 lasts forms
 executed together with their context.
 By pressing <Forward> you go to the next executed form and change the context
 to the context at that time.
 
\layout Chapter

Extentending the debugger
\layout Section

Introduction.
\layout Standard

LISP is a very extensible language in the way that you easily use macros
 to define you own control structures.
 This debugger tries to behave logical for the control structures as defined
 in CLTL2 but doesn't know of course how to handle controle structures you
 define yourself.
 To solve this you can modify the way how this debugger adds instrumentation
 code to the source, so that your extensions are covered correctly.
 The way I have made this possible is to provide you with a special language
 which allows you to express the syntax of lispforms with a little bit of
 semantics as well.
 In fact the core of this debugger is generated automatically by a source
 of syntax diagrams defining the syntax of most special lispforms in CLTL2.
\layout Standard

If you want to modify the debugger keep in mind the following points :
\layout Itemize

Function calls are handled correctly by the debugger , you don't have to
 do anything at all for this.
\layout Itemize

Macro's are the problem .
 The standard lisp macros are covered in the debugger and he tries to make
 the best of the ones you define (first he expands the macro call and then
 tries to add debugging code to the expanded code) but the result is not
 always what you expect.
 It is here that you can modify the behavior of the debugger.
\layout Itemize

Modifying the debugger can stops it working so be carefull.
 Nothing can go wrong if you make sure that you have made backup copies
 of the following files:
\begin_deeper 
\layout Itemize

lispsyntax (this is the source file defining the working of the current
 debugger)
\layout Itemize

lispcode.o,lispcode.x86f , lispcode.fas or lispcode.fasl (this is the core of
 the debugger for GCL,CMUCL,CLISP or ACL5, loaded when you start (debug)
 or (deb)).
\end_deeper 
\layout Section

Modifying the debugger
\layout Standard

The steps to modify the debugger are as follows:
\layout Enumerate

Create a source file defining how the lisp debugger should transform sources.
 You can take the file delivered with the debugger as a base and extend
 it.
 This file is '/usr/local/lib/lispdebug/lispsyntax' if you have done a default
 installation of the debugger.
 Remember this file will redefine the way how the debugger transform sources
 to debugged sources , if you make errors or forget things the debugger
 can act strangely.
 The syntax and semantics of the language to use is described in the next
 chapter.
\layout Enumerate

Use the lisp function DEBUGGER::process-definition-file to compile this
 file to lisp code containing the parse and convertion code of the debugger.
 The syntax to use is either :
\begin_deeper 
\layout Enumerate

(DEBUGGER::process-definition-file <Source-file>) , the source file is compiled
 to a lispfile (debugcode.lisp) which is then compiled by the lisp system
 and then loaded in the lisp system modifying the behavior of the debugger.
 
\layout Enumerate

(DEBUGGER::process-definition-file <Source-file> <Out>) , the source file
 is compiled to a lispfile (with filename <out>.lisp) which is then compiled
 by the lispsytem and then loaded in the lisp system modifying the debugger.
\end_deeper 
\layout Enumerate

Once 2 is finished you can test the debugger to see if he handles the new
 definitions well (to test the normal lisp constructs look at the testgcl.lisp,te
stcmucl.lisp,testclisp.lisp and testacl5.lisp files).
 If you are convinced that the debugger is working correctly you can make
 your modifications permanent by copying the object file generated in (2)
 to /usr/local/lib/lispdebug or to the value of the LISPDEBUG environment
 variable.
 (If you use 2.a.
 the object files are either debugcode.o,debugcode.x86f,debugcode.fas or debugcode.f
asl for gcl,cmucl,clisp or acl).
\layout Section

Extension Language Of the Debugger.
\layout Standard

The extension language of the debugger is strongly based on the syntax descripti
ons used in CLTL2 so that writing extensions is a simple as writing a syntax
 diagram.
 Be carefull however, although the language looks simple their are some
 know cavecats which should be dealt with.
\layout Subsection

The default file used by the debugger.
\layout Standard

To give you an idea of how the extension language looks like I give you
 here the transcript of 'lispsyntax' the source used to generate the parser/tran
sformer of the debugger delivered with this package.
 Although the language used is not yet defined it should look familiar to
 you.
\layout Standard

;; *****************************************************************************
************
\layout Standard

;; This file contains all syntax definitions used in the lisp debugger ,
\layout Standard

;; to automatical generate code to transform lisp code in debugged lisp
 code
\layout Standard

;; 
\layout Standard

;; Be very carefull to edit or modify this file , if you generate code form
 a modified 
\layout Standard

;; file via (process-definition-file "lispsyntax") and load then the generated
 
\layout Standard

;; compiled file in the lisp debugger the working of the debugger is changed.
\layout Standard

;; *****************************************************************************
***********
\layout Standard

;;
\layout Standard

;; Defintions used throughout this file 
\layout Standard

;;
\layout Standard

;; *****************************************************************************
************
\layout Standard

;; Bodies used in different definitions
\layout Standard

;; *****************************************************************************
************
\layout Standard


\protected_separator 

\layout Standard

body-1 = {{(declare {_declaration}*) {"string" @ | @} |
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 "string" {(declare {_declaration}*) @ | @} |
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 @}
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {#form}*}
\layout Standard


\protected_separator 

\layout Standard

body-2 = {{(declare {_declaration}*) | @} {#form}*}
\layout Standard


\protected_separator 

\layout Standard

body-3 = {{(declare {_declaration}*) | #form} {#form}*}
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
************
\layout Standard

;; Lambda list definitions
\layout Standard

;; *****************************************************************************
************
\layout Standard


\protected_separator 

\layout Standard

lambda-list = ({~var}*
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&optional {~var | (~var [#initform [~svar]])}*]
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&rest ~var]
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&key {~var | ({~var | (_keyword ~var)} [#initform [~svar]])}*
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&allow-other-keys]]
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&aux {~var | (~var [#initform])}*])
\layout Standard


\protected_separator 

\layout Standard

specialized-lambda-list = ({~var | (~var _parameter)}*
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&optional {~var | (~var [#initform [~svar]])}*]
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&rest ~var]
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&key {~var | ({~var | (_keyword ~var)} [#initform [~svar]])}*
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&allow-other-keys]]
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&aux {~var | (~var [#initform])}*])
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
***********
\layout Standard

;; Option used in CLOS definitions
\layout Standard

;; *****************************************************************************
***********
\layout Standard


\protected_separator 

\layout Standard

option = {(:method {_method-qualifier}* specialized-lambda-list
\protected_separator 
 body-1) |
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 _other}
\layout Standard


\protected_separator 

\layout Standard

;;******************************************************************************
***********
\layout Standard

;; slot-entry , used in CLOS definitions
\layout Standard

;; *****************************************************************************
***********
\layout Standard


\protected_separator 

\layout Standard


\protected_separator 

\layout Standard

slot-entry = {~slot-name | (~var _slotname)}
\layout Standard


\protected_separator 

\layout Standard


\protected_separator 

\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
************
\layout Standard

;;
\layout Standard

;; This file contains syntax definitions for
\layout Standard

;;
\layout Standard

;; and
\layout Standard

;; assert
\layout Standard

;; block
\layout Standard

;; case
\layout Standard

;; catch
\layout Standard

;; ccase
\layout Standard

;; compiler-let
\layout Standard

;; cond
\layout Standard

;; ctypecase
\layout Standard

;; decf
\layout Standard

;; defclass
\layout Standard

;; defgeneric
\layout Standard

;; define-method-combination (deactivated , from my humble knowledge of
 lisp this like defmacro so it shouldn't be debugged)
\layout Standard

;; defmethod
\layout Standard

;; defun
\layout Standard

;; destructuring-bind
\layout Standard

;; do
\layout Standard

;; do-symbols
\layout Standard

;; do-external-symbols
\layout Standard

;; do-all-symbols
\layout Standard

;; do*
\layout Standard

;; dolist
\layout Standard

;; dotimes
\layout Standard

;; etypecase
\layout Standard

;; eval-when
\layout Standard

;; flet
\layout Standard

;; generic-flet
\layout Standard

;; generic-function
\layout Standard

;; generic-labels
\layout Standard

;; if
\layout Standard

;; incf
\layout Standard

;; ignore-errors
\layout Standard

;; handler-case
\layout Standard

;; handler-bind
\layout Standard

;; labels
\layout Standard

;; lambda
\layout Standard

;; let
\layout Standard

;; let*
\layout Standard

;; locally
\layout Standard

;; loop
\layout Standard

;; macrolet
\layout Standard

;; mapping (defined but not yet tested because of no implementation of series)
\layout Standard

;; multiple-value-bind
\layout Standard

;; multiple-value-call
\layout Standard

;; multiple-value-list
\layout Standard

;; multiple-value-prog1
\layout Standard

;; multiple-value-setq
\layout Standard

;; nth-value
\layout Standard

;; or
\layout Standard

;; pprint-logical-block (defined but not yet tested because of no knowledge
 of how to use)
\layout Standard

;; prog
\layout Standard

;; prog*
\layout Standard

;; prog1
\layout Standard

;; prog2
\layout Standard

;; progn
\layout Standard

;; progv
\layout Standard

;; psetf
\layout Standard

;; psetq
\layout Standard

;; push
\layout Standard

;; pushnew
\layout Standard

;; return
\layout Standard

;; return-from
\layout Standard

;; setf
\layout Standard

;; setq
\layout Standard

;; symbol-macrolet
\layout Standard

;; tagbody
\layout Standard

;; the
\layout Standard

;; throw
\layout Standard

;; unless
\layout Standard

;; unwind-protect
\layout Standard

;; when
\layout Standard

;; with-accessors
\layout Standard

;; with=added-methods (defined but not tested because not implemented in
 the lisps I know)
\layout Standard

;; with-compilation-unit
\layout Standard

;; with-hash-table
\layout Standard

;; with-input-from-string
\layout Standard

;; with-open-file
\layout Standard

;; with-open-stream
\layout Standard

;; with-output-to-string
\layout Standard

;; with-package-iterator
\layout Standard

;; with-simple-restart
\layout Standard

;; with-slots
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; and (and {form}*)
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(and {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; assert ,
\protected_separator 
 assert test-form [({place}*) [string {arg}*]]
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(assert #form [_place [#string {#arg}*]])
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; block (block name {form}*)
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(block _name {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; case
\protected_separator 
 case keyform {({({key}*) | key} {form}*)}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard


\protected_separator 

\layout Standard

(case #keyform {({({_key}*) | _key} {#form}*)}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; catch
\protected_separator 
 catch tag {form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(catch _tag {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; ccase keyplace {({({key}*) | key} {form}*)}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(ccase _keyplace {({({_key}*) | _key} {#form}*)}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; compiler-let
\protected_separator 

\protected_separator 
 compiler-let ({var | (var [value])}*) {form}* 
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(compiler-let ({_var | (_var [_value])}*) {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; cond
\protected_separator 
 cond {(test {form}*)}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(cond {(#test {#form}*)}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; decf place [delta]
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(decf _place [#delta])
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; defclass
\layout Standard

;; defclass class-name ({superclass-name}*)
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 ({slot-specifier}*) [[?class-option]]
\layout Standard

;;
\layout Standard

;;
\layout Standard

;; class-name ::= symbol
\layout Standard

;; superclass-name ::= symbol
\layout Standard

;; slot-specifier ::= slot-name | (slot-name [[?slot-option]])
\layout Standard

;; slot-name ::= symbol
\layout Standard

;; slot-option ::= {:reader reader-function-name}*
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 | {:writer writer-function-name}*
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 | {:accessor reader-function-name}*
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 | {:allocation allocation-type}*
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 | {:initarg initarg-name}*
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 | {:initform form}*
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 | {:type type-specifier}*
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 | {:documentation string}*
\layout Standard

;; reader-function-name ::= symbol
\layout Standard

;; writer-function-name ::= function-name/
\layout Standard

;; function-name ::= {symbol | (setf symbol)}
\layout Standard

;; initarg-name ::= symbol
\layout Standard

;; allocation-type ::= :instance | :class
\layout Standard

;; class-option ::= (:default-initargs initarg-list)
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 | (:documentation string)
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 | (:metaclass class-name)
\layout Standard

;; initarg-list ::= {initarg-name default-initial-value-form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(defclass _class-name _superclass
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 ({slot-specifier}*)
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [class-option]*)
\layout Standard


\protected_separator 

\layout Standard

slot-specifier = {(_name {slot-option}*)|_name}
\layout Standard

slot-option = {:initform #form |
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 _other _other}
\layout Standard

class-option = {(:default-initargs {_initarg #form}*) | _other}
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; defgeneric 
\layout Standard

;;
\layout Standard

;;defgeneric function-name lambda-list 
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [[?option | {method-description}*]]
\layout Standard

;;function-name ::= {symbol | (setf symbol)}
\layout Standard

;;lambda-list ::= ({var}* 
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&optional {var | (var)}*]
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&rest var] 
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&key {keyword-parameter}* 
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&allow-other-keys]])
\layout Standard

;;keyword-parameter ::= var | ({var | (keyword var)}) 
\layout Standard

;;option ::= (:argument-precedence-order {parameter-name}+)
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 | (declare {declaration}+) 
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 | (:documentation string)
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 | (:method-combination symbol {arg}*)
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 | (:generic-function-class class-name)
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 | (:method-class class-name)
\layout Standard

;;method-description ::= (:method {method-qualifier}*
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 specialized-lambda-list
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [[ {declaration}* | documentation ]]
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {form}*)
\layout Standard

;;method-qualifier ::= non-nil-atom 
\layout Standard

;;specialized-lambda-list ::=
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 ({var | (var parameter-specializer-name)}*
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&optional {var | (var [initform [supplied-p-parameter]])}*]
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&rest var]
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&key {specialized-keyword-parameter}*
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&allow-other-keys]]
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&aux {var | (var [initform])}*])
\layout Standard

;;specialized-keyword-parameter ::=
\protected_separator 

\protected_separator 
 var | ({var | (keyword var)} [initform [supplied-p-parameter]])
\layout Standard

;; parameter-specializer-name ::= symbol | (eql eql-specializer-form)
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(defgeneric _name _lambda-list {option}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; define-method-combination
\layout Standard

;; define-method-combination name [[?short-form-option]]
\layout Standard

;; define-method-combination name lambda-list
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 ({method-group-specifier}*)
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [(:arguments .
 lambda-list)]
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [(:generic-function generic-fn-symbol)]
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [[{declaration}* | doc-string]]
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {form}*
\layout Standard

;; short-form-option ::= :documentation string
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 | :identity-with-one-argument boolean
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 | :operator operator
\layout Standard

;; method-group-specifier ::= (variable {{qualifier-pattern}+ | predicate}
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [[?long-form-option]])
\layout Standard

;; long-form-option ::= :description format-string
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 | :order order
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 | :required boolean
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; Deactivated , could not find usefull example to test this (I am not a
 specialist of CLOS
\layout Standard

;; (define-method-combination _name {:documentation _string |
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 :identify-with-one-argument _boolen |
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 :operator _operator |
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 lambda-list ({method-group-specifier}*)
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {argument-lambda-list (:generic-function _fn) body-1 |
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 (:generic-function _fn) body-1 |
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 body-1}}) 
\layout Standard

;;
\layout Standard

;;
\layout Standard

;; method-group-specifier = (~var {_rest}*)
\layout Standard

;; argument-lambda-list = (:arguments {~var}*
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&optional {~var | (~var [#initform [~svar]])}*]
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&rest ~var]
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&key {~var | ~var ({~var | (_keyword ~var)} [#initform [~svar]])}* [&allow-oth
er-keys]]
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&aux {~var | (~var [#initform])}*])
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; defmethod
\layout Standard

;; defmethod function-name {method-qualifier}*
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 specialized-lambda-list
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [[ {declaration}* | doc-string]]
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {form}*
\layout Standard

;; function-name ::= {symbol | (setf symbol)}
\layout Standard

;; method-qualifier ::= non-nil-atom 
\layout Standard

;; parameter-specializer-name ::= symbol | (eql eql-specializer-form)
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard


\protected_separator 

\layout Standard

(defmethod _function-name 
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {_method-qualifier}* 
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 specialized-lambda-list 
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 body-1)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; defun
\layout Standard

;;
\protected_separator 
 defun name lambda-list [[ {declaration}* | doc-string ]] {form}*
\layout Standard

;; ({var}*
\layout Standard

;;
\protected_separator 
 [&optional {var | (var [initform [svar]])}*]
\layout Standard

;;
\protected_separator 
 [&rest var]
\layout Standard

;;
\protected_separator 
 [&key {var | ({var | (keyword var)} [initform [svar]])}* [&allow-other-keys]]
\layout Standard

;;
\protected_separator 
 [&aux {var | (var [initform])}*])
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(defun _name lambda-list body-1)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;;
\protected_separator 
 destructuring-bind lambda-list expression {declaration}* {form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

var-list = {~var | ({var-list}*)}
\layout Standard

macro-lambda-list = ({&whole ~var
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [var-list]*
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&optional {~var | (~var [#initform [~svar]])}*]
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [{&rest ~var | &body ~var}]
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&key {~var | ({~var | (_keyword ~var)} [#initform [~svar]])}* [&allow-other-ke
ys]]
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&aux {~var | (~var [#initform])}*] 
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 |
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [var-list]*
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&optional {~var | (~var [#initform [~svar]])}*]
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [{&rest ~var | &body ~var}]
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&key {~var | ({~var | (_keyword ~var)} [#initform [~svar]])}* [&allow-other-ke
ys]]
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [&aux {~var | (~var [#initform])}*]
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 }
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 )
\layout Standard


\protected_separator 

\layout Standard

(destructuring-bind macro-lambda-list #expression body-2)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; do 
\layout Standard

;; do ({(var [init [step]])}*)
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 
 (end-test {result}*)
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 
 {declaration}* {tag | statement}*
\layout Standard

;;
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(do ({(~var [#init [#step]])}*)
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 
 (#end-test {#result}*)
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 
 body-2)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; do*
\layout Standard

;; do* ({(var [init [step]])}*)
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 (end-test {result}*)
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {declaration}* {tag | statement}* 
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard


\protected_separator 

\layout Standard

(do* ({(^var [#init [#step]])}*)
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 (#end-test {#result}*)
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 body-3)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; do-all-symbols 
\layout Standard

;; do-all-symbols (var [package [result-form]])
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {declaration}* {tag | statement}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(do-all-symbols (~var [#package [#resultform]]) body-2)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; do-external-symbols 
\layout Standard

;; do-external-symbols (var [package [result-form]])
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {declaration}* {tag | statement}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(do-external-symbols (~var [#package [#resultform]]) body-2)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; dolist
\layout Standard

;; dolist (var listform [resultform])
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {declaration}* {tag | statement}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(dolist (~var #listform [#resultform]) body-2)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; dotimes
\layout Standard

;; dotimes (var countform [resultform])
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {declaration}* {tag | statement}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(dotimes (~var #countform [#resultform]) body-2)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; do-symbols 
\layout Standard

;; do-symbols (var [package [result-form]])
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {declaration}* {tag | statement}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(do-symbols (~var [#package [#resultform]]) body-2)
\layout Standard


\protected_separator 

\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; ecase keyform {({({key}*) | key} {form}*)}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(ecase #keyform {({({_key}*) | _key} {#form}*)}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;;
\protected_separator 
 etypecase keyform {(type {form}*)}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(etypecase #keyform {(_type {#form}*)}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; ctypecase keyplace {(type {form}*)}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(ctypecase _keyplace {(_type {#form}*)}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;;
\protected_separator 
 eval-when ({situation}*) {form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(eval-when _situation {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; flet
\layout Standard

;; flet ({(name lambda-list
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [[ {declaration}* | doc-string ]] {form}*)}*)
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {form}* 
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(flet ({(_name lambda-list body-1)}*) {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; if 
\layout Standard

;;
\protected_separator 
 if test then [else] 
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(if #test #then [#else])
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; generic-flet ({(function-name lambda-list
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [[?option | {method-description}* ]])}*)
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(generic-flet ({(_name _lambda-list $ {option}*)}*) {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; generic-function lambda-list [[?option | {method-description}*]]
\layout Standard

;; option ::= (:argument-precedence-order {parameter-name}+)
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 | (declare {declaration}+)
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 | (:documentation string)
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 | (:method-combination symbol {arg}*)
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 | (:generic-function-class class-name)
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 | (:method-class class-name)
\layout Standard

;; method-description ::= (:method {method-qualifier}*
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 specialized-lambda-list
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {declaration | documentation}*
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {form}*)
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(generic-function _lambda-list $ {option}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; generic-labels ((function-name lambda-list
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [[?option | {method-description}*]])}*)
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(generic-labels ({(_name _lambda-list $ {option}*)}*) {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;;
\protected_separator 
 handler-bind ({(typespec handler)}*) {form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(handler-bind ({(_typespec #handler)}*) {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;;
\protected_separator 
 handler-case expression {(typespec ([var]) {form}*)}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(handler-case #expression {(_typespec ([~var]) @ {#form}*)}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;;
\protected_separator 
 ignore-errors {form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(ignore-errors {#forms}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; incf
\layout Standard

;;
\protected_separator 
 incf place [delta] 
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(incf _place [#delta])
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; labels
\layout Standard

;; labels ({(name lambda-list
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [[ {declaration}* | doc-string ]] {form}*)}*)
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {declaration}* {form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(labels ({(_name lambda-list body-1)}*)
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 body-2)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; lambda 
\layout Standard

;; (lambda lambda-list [[{declaration}* | doc-string]] {form}*)
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(lambda lambda-list body-1)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; let
\layout Standard

;; let ({var | (var [value])}*) {declaration}* {form}* 
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(let ({~var | (~var [#value])}*) body-2)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; let*
\layout Standard

;;
\protected_separator 
 let* ({var | (var value)}*) {declaration}* {form}* 
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(let* ({^var | (^var [#value])}*) body-3)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; locally
\layout Standard

;; locally {declaration}* {form}
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(locally body-3)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; loop
\layout Standard

;; loop {form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(loop {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; macrolet
\layout Standard

;; macrolet ({(name varlist
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [[ {declaration}* | doc-string ]] {form}*)}*)
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {form}* 
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(macrolet _macrolist
\layout Standard


\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;;
\protected_separator 
 mapping ({({var | ({var}*)} value)}*) {declaration}* {form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(mapping ({({~var | ({~var}*)} #value)}*) body-2)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; multiple-value-bind
\layout Standard

;; multiple-value-bind ({var}*) values-form
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {declaration}* {form}*
\layout Standard

;; *****************************************************************************
********************************* 
\layout Standard


\protected_separator 

\layout Standard

(multiple-value-bind ({~var}*) #values-form body-2)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; multiple-value-call
\layout Standard

;;
\protected_separator 
 multiple-value-call function {form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(multiple-value-call #function {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; multiple-value-list 
\layout Standard

;; multiple-value-list form
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(multiple-value-list #form)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; multiple-value-prog1
\layout Standard

;; multiple-value-prog1 form {form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(multiple-value-prog1 {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; multiple-value-setq 
\layout Standard

;; multiple-value-setq variables form
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(multiple-value-setq _variables #form)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; nth-value
\layout Standard

;; nth-value n form
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(nth-value #n #form)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; or
\layout Standard

;; or {form}* 
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(or {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; pprint-logical-block
\layout Standard

;; pprint-logical-block (stream-symbol list [[ { :prefix | :per-line-prefix}
 p | :suffix s ]])
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(pprint-logical-block ~list {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; prog
\layout Standard

;; prog ({var | (var [init])}*) {declaration}* {tag | statement}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(prog ({~var | (~var [#init])}*) body-2)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; prog*
\layout Standard

;; prog* ({var | (var [init])}*) {declaration}* {tag | statement}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard


\protected_separator 

\layout Standard

(prog* ({^var | (^var [#init])}*) body-3)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; prog1
\layout Standard

;;
\protected_separator 
 prog1 first {form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(prog1 {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; prog2
\layout Standard

;;
\protected_separator 
 prog2 first second {form}* 
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(prog2 {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; progn
\layout Standard

;;
\protected_separator 
 progn {form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(progn {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; progv
\layout Standard

;;
\protected_separator 
 progv symbols values {form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(progv {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; psetf
\layout Standard

;; psetf {_place form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(psetf {_place #form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; psetq 
\layout Standard

;; psetq {symbol form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(psetq {_symbol #form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; push
\layout Standard

;;
\protected_separator 
 push item place
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(push #form _place)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; pushnew
\layout Standard

;; pushnew item place &key :test :test-not :key
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(pushnew #form _place [_key]*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; return
\layout Standard

;;
\protected_separator 
 return [result]
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(return [#form])
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; return-from
\layout Standard

;;
\protected_separator 
 return-from name [result]
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(return-from _name [#result])
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; setf
\layout Standard

;;
\protected_separator 
 setf {place newvalue}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(setf {_place #value}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; setq
\layout Standard

;; setq {var form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(setq {_var #form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; symbol-macrolet
\layout Standard

;; symbol-macrolet ({(var expansion)}*)
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {declaration}* {form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(symbol-macrolet ({(~var _expansion)}*) body-2)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; tagbody
\layout Standard

;;
\protected_separator 
 tagbody {tag | statement}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(tagbody {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; the
\layout Standard

;; the value-type form
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(the _value-type #form)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; throw
\layout Standard

;; throw tag result
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(throw _tag #result)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; unless
\layout Standard

;;
\protected_separator 
 unless test {form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(unless {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; unwind-protect
\layout Standard

;; unwind-protect protected-form {cleanup-form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(unwind-protect {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; when
\layout Standard

;; when test {form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(when {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; with-accessors
\layout Standard

;; with-accessors ({slot-entry}*) instance-form
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {declaration}* {form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(with-accessors ({slot-entry}*) #instance-form body-2)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; with-added-methods (function-name lambda-list
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 [[?option | {method-description}*]])
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(with-added-methods (_name lambda-list $ {option}*) {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;;
\protected_separator 
 with-compilation-unit ({option-name option-value}*) {form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(with-compilation-unit ({_option #option-value}*) {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;;
\protected_separator 
 with-hash-table-iterator (mname hash-table) {form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(with-hash-table-iterator (_mname #hash-table) {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; with-input-from-string
\layout Standard

;; with-input-from-string (var string keyword {value}*)
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {declaration}* {#form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(with-input-from-string (~var #string {_keyword}*) body-2)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; with-open-file
\layout Standard

;; with-open-file (stream filename {options}*)
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {declaration}* {#form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(with-open-file (~stream #filename {_options}*) body-2)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; with-open-stream 
\layout Standard

;; with-open-stream (var stream) {declaration}* {form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(with-open-stream (~var #stream) body-2)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; with-output-to-string
\layout Standard

;; with-output-to-string (var [string [:element-type type]])
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {declaration}* {#form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(with-output-to-string (~var [#string [:element-type _type]]) body-2)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; with-simple-restart (name format-string {format-argument}*)
\layout Standard

;;
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(with-simple-restart (_name _string {_arg}*) {#form}*)
\layout Standard


\protected_separator 

\layout Standard

;; *****************************************************************************
*********************************
\layout Standard

;; with-slots
\layout Standard

;; with-slots ({slot-entry}*) instance-form
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 {declaration}* {form}*
\layout Standard

;; *****************************************************************************
*********************************
\layout Standard


\protected_separator 

\layout Standard

(with-slots ({slot-entry}*) #instance-form body-2)
\layout Standard


\protected_separator 

\layout Standard


\protected_separator 

\layout Standard

;; End of definitions
\layout Subsection

Syntax of the language.
 
\layout Standard

The language is composed of the following elements :
\layout Description

comments Everything on a line after a ';' is considered a comment and is
 neglected.
\layout Description

white
\protected_separator 
spaces Used as separators , the following is a white space :
\layout Itemize

blanc
\layout Itemize

newline
\layout Itemize

tab
\layout Itemize

return
\layout Description

definitions These are of the form : 
\layout Itemize


\emph on 
symbol = expression
\layout Description

expressions Thes are of the form :
\layout Itemize


\emph on 
symbol
\layout Itemize


\emph on 
_symbol
\layout Itemize


\emph on 
^symbol
\layout Itemize


\emph on 
~symbol
\layout Itemize


\emph on 
#symbol
\layout Itemize


\emph on 
@
\layout Itemize


\emph on 
$
\layout Itemize


\emph on 
[ expression ...
 expression ]
\layout Itemize


\emph on 
[ expression ...
 expression ]*
\layout Itemize


\emph on 
{expression ...
 expression}
\layout Itemize


\emph on 
{expression ...|....|...| expression...
 }*
\layout Itemize


\emph on 
( expression expresion ...)
\layout Itemize


\begin_inset Quotes eld
\end_inset 

text
\begin_inset Quotes erd
\end_inset 


\layout Description

symbols Any string of characters with the exception of white spaces , @
 , $ , _ ,^,~,#,(,),[,]
\layout Standard

A source in our language is a text file containing 
\emph on 
definitions
\emph toggle 
 and 
\emph on 
expressions
\emph toggle 
.
\layout Subsection

Semantics of the language.
\layout Standard

The syntax tells us what the welformed expressions and definitions are in
 our language but it says nothing about their meaning, for this we need
 a little bit of semantics.
 The best way to understand the semantics of the language is the consumer/produc
ent metaphor.
 When a expression in our language is applied on a lisp expression two things
 can happens :
\layout Enumerate

The expression recognizes the lisp expression consuming part of it and producing
 another lisp expression.
\layout Enumerate

The expression does not recognize the expression an it generates a throw,
 no lisp expression is produced.
\layout Standard

Lets now put these ideas in practice on the different type of expressions
 of our language.
 Lets P the list produced ,E a expression in our language and L the lisp
 expression on which we applies expressions in our language.
 The parser/generator in the debugger will apply each expression on a given
 lisp expression until it gets not a throw and the lisp expression is fully
 consumed, the produced list is then the lisp expression with debugcode
 added.
 If this sounds inefficient you are right this is just a semantic explanation
 , our language is actually compiled to become the parser/generator of the
 debugger which has the same effect as our semantic explanation, but he
 does it in a more efficient way.
\layout Subsubsection

Symbol.
\layout Standard

If we apply a 'symbol' on a lisp expression L=(e1 e2...
 en) or L=() we have a throw if e1 is not equal to our 'symbol' or if L
 is the empty list.
 If e1 is equal to our 'symbol' then we append P with the symbol and L becomes
 (e2 ...
 en).
 
\layout Example*

Let P=() , L=(defun f (n) (princ n)) and E=defun then applying E on L gives
 L=(f (n) (princ n)) and P becomes (defun).
\layout Example*

Let P=(), L=(defun f(n) (princ n)) and E=let then applying E on L gives
 a throw.
\layout Subsubsection


\begin_inset Quotes eld
\end_inset 

text
\begin_inset Quotes erd
\end_inset 


\layout Standard

If we apply 
\begin_inset Quotes eld
\end_inset 

...
\begin_inset Quotes erd
\end_inset 

 on a lisp expression L=(e1 e2 ...
 en) or L=() we have a throw if L is empty or if e1 is not a string.
 In all other cases L becomes (e2 ...
 en) and the first element e1 is added to P.
 You can think of 
\begin_inset Quotes eld
\end_inset 

text
\begin_inset Quotes erd
\end_inset 

 as standing for any string.
\layout Subsubsection

_symbol
\layout Standard

If we apply '_symbol' on a lisp expression L=(e1 e2....
 en) or L=() we have a throw if L is empty.
 In all other cases L becomes (e2 ...
 en) and the first element e1 is added to P.
 You can think of _symbol as standing for any list element which must not
 be changed.
\layout Example*

Let P=() , L=(a b c d) and E=_sym then applying E on L gives L=(b c d) ,
 P=(a).
\layout Example*

Let P=(),L=((a b) c d) and E=_sym then applying E on L gives L=(c d) , P=((a
 b))
\layout Example*

Let P=(),L=() and E=_sym then applying E on L gives a throw.
\layout Subsubsection

^symbol
\layout Standard

If we apply '^symbol' on a lisp expression L=(e1 e2 ..
 en) or L=() we have a throw if L is empty or e1 is a list.
 In all other cases L becomes (e2 ...
 en) and the first element e1 is added to P.
 Also e1 is added to the lexical environment of the debugger.
 The lexical scope is the parent parent list of L and e1 becomes active
 just after L in the parent list.
 You can use ^ to represent variables in do* and let* constructs.
 When you use ^ the debugger will try to save the value of this variable
 when it becomes active and this value becomes available in the lexical
 scope.
\layout Example*

Let P=() , L=(a b c d) and E=^sym then applying E on L gives L=(b c d) ,
 P=(a).
\layout Example*

Let P=(),L=((a b) c d) and E=^sym then applying E on L gives a throw.
\layout Example*

Let P=(),L=() and E=^sym then applying E on L gives a throw.
\layout Subsubsection

~symbol
\layout Standard

If we apply '~symbol' on a lisp expression L=(e1 e2 ..
 en) or L=() we have a throw if L is empty or e1 is a list.
 In all other cases L becomes (e2 ...
 en) and the first element e1 is added to P.
 Also e1 is added to the lexical environment of the debugger.
 The lexical scope is the parent parent list of L and e1 becomes active
 by using $ or a @.
 You can use ~ to represent variables in do and let constructs.
 When you use ~ the debugger will try to save the value of this variable
 when it becomes active and this value becomes available in the lexical
 scope.
\layout Example*

Let P=() , L=(a b c d) and E=^sym then applying E on L gives L=(b c d) ,
 P=(a).
\layout Example*

Let P=(),L=((a b) c d) and E=^sym then applying E on L gives a throw.
\layout Example*

Let P=(),L=() and E=^sym then applying E on L gives a throw.
\layout Subsubsection

#symbol
\layout Standard

If we apply '#symbol' on a lisp expression L=(e1 e2 ...
 en) or L=() we have a throw if L is empty.
 In all other cases L becomes (e2 ....
 en) and the system tries to add debugging code to e1 before it is added
 to P.
 The debugging code added makes that you can place a breakpoint on e1 ,
 see where e1 is located in the source and allows you to look at the lexical
 environment of e1.
 In some cases no debugging code is added (if e1 is not a list or if e1
 represents a macro not recognized by the debugger).
 You can use # to indicate that you should be able to set breakpoints.
\layout Example*

Let P=() , L=(a b c d) and E=^sym then applying E on L gives L=(b c d) ,
 P=((add-debug-code a)).
\layout Example*

Let P=(),L=() and E=^sym then applying E on L gives a throw.
\layout Subsubsection

@
\layout Standard

We can always apply @ to L .
 It consumes nothing and it produces nothing , its solely purpose is for
 its side effect , it will make variables defined with ~ active and it allows
 you to set a breakpoint on the whole expression where it is part of.
 Use this in (defun ...) (let ...) just before the body of these functions.
\layout Subsubsection

$
\layout Standard

We can always apply $ to L .
 It consumes nothing and it produces nothing , its solely purpose is for
 its side effect , it will make variables defined with ~ active.
 
\layout Subsubsection

[expression1 ...
 expressionn]
\layout Standard

If we apply [expression1 ...
 expressionn] on a lisp expression L .
 It will first do nothing , the expressions after [...] are first applied on
 L if this gives a throw the system will first trying to apply expression1
 then expression2 ...
 on L followed by the expressions after [...].
 Consider this as a kind of optional syntax.
\layout Example*

E=[a b] c , L=(a b c d) and P=() then applying E on L gives L=(d) , P=(a
 b c)
\layout Example*

E=[a b] c , L=(c d) and P=() then applying E on L gives L=(d) , P=(c)
\layout Example*

E=[a b] d , L= (c d) and P=() then applying E on L gives a throw
\layout Subsubsection

{e11...e1n|...| em1....emk}
\layout Standard

If we apply {e11...e1n|...| em1....emk} on a lisp expression L .
 It will first try to apply e11...e1n on L followed by all expressions after
 { ...
 } if this causes a throw, it will try e21...e2l followed by the rest ...
 .
 You can consider { ...
 } as a kind of or where you want to try different alternatives.
\layout Example

E={a b} c , L=(a c d) and P=() then applying E on L gives L=(d),P=(a c)
\layout Example

E={a b} c, L=(b c d) and P=() then applying E on L gives L=(d),P=(a b)
\layout Example

E={a b} c, L=(c d) and P=() then applying E on L gives a throw
\layout Subsubsection

[expression1 | ...
 | expressionn]* , {expression1 ...
 expressionn}
\layout Standard

If we apply {...}* or [...]* on a lisp expression.
 We first try to apply the expressions after { ...}* or [...]* , if this causes
 a throw we try first {...} or [...] followed by the rest, if this fails then
 we try {...}{...} or [...][...] and so on.
 To avoid infinite looping we stop if one {..} or [...] gives a throw.
 Use this if you have more then occurrence of the same elements.
\layout Example*

E=[a b]* c, L=(a b a b c) and P=() then applying E on L gives L=(c) , P=(a
 b a b)
\layout Subsubsection

(expression1 ...
 expressionn)
\layout Standard

If we apply (expression1 ...
 expressionn) on L=(e1 ...
 en) or L=() we get a throw if L is empty or if e1 is not a list .
 The result in the other cases is the result of applying expression1 ....
 expressionn on e1 where we start with a empty result list, this result
 list is then added to the original list.If e1 is not consumed fully we have
 also a throw.
\layout Example

E=(a b c) , L=((a b c) d) , P=() then applying E on L gives L=(d) , P=((a
 b c))
\layout Example

E=(a b c),L=((a b c d) d), P=() then applying E on L gives a throw.
\layout Subsubsection

definitions (name = expression)
\layout Standard

A definition gives a name to a expression , applying this name has the same
 effect as applying the expression.
 You can use definitions to to define a expression ones and then use it
 many times.
 Definitions can be used recursively , one can refer in a definition to
 itself.
\layout Subsection

Cavecats.
\layout Itemize

When using recursive definitions make sure that you do not introduce infinite
 looping.
\layout Itemize

Be carefull when using #,_,^ or ~and [],{}* and []* , the effect is not
 always what you want.
 Look at the following expression 
\begin_deeper 
\layout Itemize

[{
\begin_inset Quotes eld
\end_inset 

string
\begin_inset Quotes erd
\end_inset 

 | (declare [_declaration])}] {#exp}* 
\end_deeper 
\layout Itemize

This will when applied to (
\begin_inset Quotes eld
\end_inset 

Description
\begin_inset Quotes erd
\end_inset 

 (declare (string a)) (princ x)) apply with success {#exp}* to 
\begin_inset Quotes eld
\end_inset 

Description
\begin_inset Quotes erd
\end_inset 

 and (declare ..) and add debugcode to 
\begin_inset Quotes eld
\end_inset 

Description
\begin_inset Quotes erd
\end_inset 

 and (declare ...) which gives in the case of (declare ..) a syntax error in
 lisp.
 The way out of this problem is using some extra {}, our code becomes then
 something like :
\begin_deeper 
\begin_deeper 
\layout Itemize

{
\begin_inset Quotes eld
\end_inset 

string
\begin_inset Quotes erd
\end_inset 

 {#exp}* | 
\begin_inset Quotes eld
\end_inset 

string
\begin_inset Quotes erd
\end_inset 

 (declare [_declaration]) {#exp}* | 
\newline 

\protected_separator 
(declare [_declaration]) {#exp}* | (declare [_declaration]) 
\begin_inset Quotes eld
\end_inset 

string
\begin_inset Quotes erd
\end_inset 

 {#exp}* | {#exp}*}
\end_deeper 
\end_deeper 
\layout Chapter

Porting of the debugger
\layout Standard

The debugger is coded in such a way that it should be easy to port it to
 another LISP implementation or even another Unix.
 This chapter describes how such a port can be done.
\layout Subsection

Conditions.
\layout Standard

The port will be the easiest if certain conditions are fullfilled:
\layout Enumerate

The lisp adheres to CLTL2.
\layout Enumerate

TCL/TK version 8.0 (previous versions could work also but I have not tested
 them) is installed in the OS together with its libraries.
 In contrast to the previous version of the debugger , LISP must not support
 TCL/TK.
\layout Enumerate

The OS and LISP supports sockets.
\layout Standard

If (1) is not fullfilled then the best strategy to follow is to write the
 missing CLTL2 functions used in the code of the debugger.
 In case of failing of TCL/TK the whole interface must be rewritten using
 another graphical library.
 If (3) is not fullfilled you should either extend LISP with some C coding
 or choose another connection method to the interface program.
 To help porting I will explain how the lisp system talks with the interface.
\layout Subsection

Overview of the debugger.
\layout Standard

To easy porting, the debugger is splitted in two components.
\layout Itemize

The user interface , this is the GUI of the debugger and it is written in
 C using the TCL/TK system as a graphical library.
\layout Itemize

A extension of lisp containing the code to parse and change sources , generate
 a new parser/generator and code called by the debugged functions.
\layout Standard

The interaction between the the interface and the lisp extensions is done
 using sockets because this is in my opinion the most supported IPC in LISP
 and the OS.
 
\layout Subsubsection

The GUI interface.
\layout Standard

The C code is using the following C source files :
\layout Itemize

interface.c , this contain the main body of the interface.
\layout Itemize

hash.c , hash.h , this contains some extensions for hashing and list manipulation
 used in interface.c.
\layout Itemize

tclinvoke.c , code to call TCL/TK in a more efficient way.
\layout Standard

These three file must be compiled and linked together with the libraries
 of TCL/TK to produce the executable 'interface'.
 This program can be started in three ways , modifying the way how it talks
 to the lisp system.
 For socket communication, the interface is always the server and it is
 listening for connections of the lisp system to it.
 The program 'interface' is started via the lisp system, who decides how
 to start the interface.There are current three ways of dooing this.
\layout Enumerate

'interface', the communication takes place via a Unix socket with address
 '/tmp/lispdebugger' (this is the method used by CMUCL)
\layout Enumerate

'interface pid' , pid is the process-id of the parent of this progam (the
 lisp system).
 This pid is then used by 'interface' to send a signal SIGUSR1(=10) to the
 lisp system each time it has output for the lisp system and thus let the
 lisp system act on the input.
 The communication still takes place via Unix sockets with address '/tmp/lispdeb
ugger' (this is the method used for GCL).
\layout Enumerate

'interface -port' , port is the port number to use , communication takes
 place via stream oriented tcp/INET sockets on the port indicated (this
 is used ACL and CLISP).
\layout Standard

The communication from 'interface' to lisp is done by sending a lispcommand
 as a string followed by a return to the lispsystem (in case of 2 after
 the send a signal is send to wakeup the lisp , in all other cases the lisp
 system wakes up if there is input on their socket connection).
 After sending a command, the 'interface' will not wait for a return.
 The functions called from the 'interface' to the lispsystem are:
\layout Itemize

(debug-open-file <filename> <compile-t-nil>) to add debugcode to the program
 (if needed compile it) and load the changed code in the lisp system.
\layout Itemize

(step-back-in-time) causes the debugger to step back in time
\layout Itemize

(step-forward-in-time) causes the debugger to step forwards in time
\layout Itemize

(display-result-exp exp) causes the lisp system to evaluate the expression
 in the current context of the debugger.
\layout Itemize

(stop-interface) stops and cleans up the lisp system socket part of the
 interface.
\layout Standard

Communation form the lisp system to the 'interface' to the lisp system takes
 place in the following way :
\layout Itemize

First a number followed by a blanco indicating the function to call in the
 'interface' is send , this number implicit says also how to handle the
 arguments.
 The following functions must be implemented in the interface (function
 together with function-code and description).
 Positions are expressed in number of bytes from the beginning of the source.
\begin_deeper 
\layout Itemize

0=hightlight-source , arguments begin(integer),end(integer),type(string),color(s
tring) , should highlight the source text in the indicated color from position=b
egin to position=end.
 type is used to make a distinction between selection.
\layout Itemize

1=display-message, arguments message(string) , displays the message string.
\layout Itemize

2=highlight-error, arguments begin(integer) highlights the line containing
 the position begin.
\layout Itemize

3=set-possible-breakpoints , arguments source(string),begin(integer),end(integer
) gives the debugger information about the begin and endpoints of breakpoints
 in the source.
\layout Itemize

4=give-control-to-interface , arguments source(string),begin(integer),end(iteger
) called from the debugged code to allow the debugger to intervine.
 In the 'interface' give-control-interface blocks until the user steps or
 press continue ...
 .
\layout Itemize

5-display-result-in-interface, arguments nr-value-arg-pairs(integer),value(strin
g),arg(string) ....
 used to display the calculated results in the resultpane.
\layout Itemize

6=display-exp-in-interface, arguments exp(string),result(string) used to
 display the result of evaluating a expression.
\layout Itemize

7=if-breakpoint, arguments none , check for conditional breakpoints.
\layout Itemize

8=display-time-en, arguments begin(integer),end(integer),source(string)
 equivalent as give-control-to-interface but used in time traveling.
\layout Itemize

9=setting, arguments var(string),value(string) used to set the options settings
 in the debugger.
\end_deeper 
\layout Itemize

The arguments of the functions are send as follows :
\begin_deeper 
\layout Itemize

integers , in printed format followed by a blanc character so they can be
 read with scanf.
\layout Itemize

strings , first the length of the string is send , then a blanc character
 followed by the string followed by a blanc character.
\end_deeper 
\layout Subsubsection

The lisp code.
\layout Standard

The lispcode is splitted up in two parts :
\layout Itemize

The main body of the debugger (debugger.lisp)
\layout Itemize

The interface to the 'GUI interface' (cmucl.lisp,gcl.lisp,acl5.lisp,clisp.lisp)
\layout Standard

If you want to port the debugger to another lisp , you can leave debugger.lisp
 and write a new <lisp name>.lisp file to interface with the 'GUI interface'
 If you use the current 'GUI interface' the following functions should be
 implemented in this file:
\layout Itemize

(start-interface) , to start 'interface' and make a socket connection.
\layout Itemize

(stop-interface) , to clean up everything after 'interface' is stoppped.
\layout Itemize

(send-command command &arg-list) , to send the command function code followed
 by the arguments to the interface.
\layout Itemize

(process-incoming) see if there is input waiting on the socket read this
 in and evaluate it.
\layout Itemize

A way of detecting input on the socket and then call process-incoming.
\layout Standard

For examples I refere to cmucl.lisp,gcl.lisp,acl5.lisp and clisp.lisp.
\the_end
