Zebu README.  Installation notes, etc. .

                                Version .9

                Copyright (C) 1989, by William M. Wells III
                            All Rights Reserved
        Permission is granted for unrestricted non-commercial use.


The zebu system is described in the file zebu.nr .  This file contains
source code for the unix program NROFF.  A vanilla version suitable
for printing appears in the file zebu.lpr .

ZEBU is an lalr(1) parser system in scheme.

Zebu currently runs in two versions of scheme, PC-SCHEME from Texas
Instruments, which runs on IBM PC's, and C-SCHEME from MIT which 
runs on several machines including some unix machines.

It runs in pc-scheme version 3.0. Earlier releases won't work
because R^3 Scheme compatiblity is required.

It runs in release 6.2 of c-scheme.  It should work in release 6.1,
but I haven't tested that.  Earlier releases won't work because the
define-structure feature is needed.

The two major departures of the code from the R^3 report standard
are in the use of structures as data structures, and the use of 
a few macros.  Keeping the code compatible with both scheme
versions was painful with respect to these features.  See
the files c-scheme.scm, pc-schem.scm and macros.scm .

Some may find the use of global macros un-friendly.  In zebu
they are arranged to be present only at the time that the zebu
system is compiled.


INSTALLING ZEBU

Several lines at the top of zebu.scm need to be hacked to define which
scheme is running, and the pathname where the zebu code lives. 
Then loading zebu.scm and running (compile-zebu) should finish the
installation. 

A batch file (faslize.bat) is provided for fast load conversion of
the compiled code for msdos.  It should be run after the code is
compiled on those machines.

THE CODE

Zebu constists of two parts, the parser generator system, and
the parser driver.

Most of the code is the parser generator system.  The parser driver, 
which may be used stand alone, resides in driver.scm . It requires
macros from either c-scheme.scm or pc-schem.scm, and macros.scm
to be loaded at compile time.


EXAMPLE GRAMMARS

The files *.grm contain example grammar files for the zebu system.  The
ones with number names come from the old edition of the dragon book
???? .  



STYLE

Not the best functional style, I'm afraid.  


PROBLEMS:

CONTROL-Z's:

PC Scheme seems to require control-z characters at the end of source
files.  The scheme system  becomes corrupted if they are missing.

C-Scheme doesn't like to read them in the source file, it thinks they
are unbound variables.  The solution is to keep them embedded in
comment lines.  

Keep this problem in mind when transporting the source codes from
one system to another.
