next up previous contents
Next: B.2 Byte Code Compiler Up: B Vienna LISP Interpreter Previous: B Vienna LISP Interpreter

B.1 The Interpreter

The XLISP interpreter[Bet89] has only the basic LISP functionality, most of it compatible to COMMON LISP and a rudimentary object system. To fulfill the requirements as an extension language in the VISTA project the VLisp interpreter was designed to implement more LISP functionality than the XLISP interpreter. In addition, compatibility to COMMON LISP was waived.

The functionality of the VBS library is part of the interpreter. Some of these parts are hand coded due to bootstrapping problems and requirements of VMake. These are mainly the access functions to the underlying operation system like file, printer, and process access. The regular expression functionality and the unit part of the VBS have been added too. Many LISP node types are unique to the VLisp interpreter. The basic generic functions have been enhanced to handle these types. All LISP types used by the VLisp interpreter are shown in Table B.1. Additional node types may be registered and generated dynamically during initialization of the interpreter through TAC binding code. A maximum of 96 user defined types by TAC are currently supported by the VLisp interpreter.

  table5162
Tabelle B.1: VLisp node types: standard, extended and internal nodes

The concept of callbacks already used in the VBS library was adopted to the VLisp interpreter and allows asynchronous event activation when the interpreter is idle. The structure of a LISP callback is shown in Figure B.1 and is identical to the corresponding definition in C in Section A.1.

  figure5210
Abbildung B.1: Structure of a LISP callback

In VMake this facility is used to recognize the termination of a compilation process and to start the next job from the queuing sub-agent. In this case the parameter obj is the LISP process node which identifies the terminated process, the second parameter client is the data, which has been registered with the callback, and the last parameter call is the return code of the process. This allows easy identification and checking of a terminated process. For redirected output of executing processes an asynchronous output callback may be called. In this case the first parameter is the process associated with the output and the third an unnamed stream containing the output which can be directly manipulated by VLisp functions. Callbacks can be registered with timeouts to create an event at a specific time. All callbacks are only executed, if the interpreter is idle or a special function to check for callbacks is called, either to check for input/output or process termination.


next up previous contents
Next: B.2 Byte Code Compiler Up: B Vienna LISP Interpreter Previous: B Vienna LISP Interpreter

IUE WWW server
Fri Jan 3 17:00:13 MET 1997