Commit 48134e16 authored by Pascal J. Bourguignon's avatar Pascal J. Bourguignon

Moved in dependency zebu-3.5.5-pjb; Created ASD files for zebu and lse.

parent 25df4c64
This diff is collapsed.
1999-01-13 Joachim Laubsch <laubsch@hpwat03.cup.hp.com>
* In zebu-generator.lisp replace the def of type->predicate by new
def which considers the builtin types NUMBER IDENTIFIER STRING
Thu Oct 2 12:43:10 1997 Joachim Laubsch <laubsch@hpwat03.cup.hp.com>
* changes for CMUCL suggested by Raymond Toy <toy@rtp.ericsson.se>
Fri Mar 15 09:41:11 1996 Joachim Laubsch <laubsch@hpwat03.cup.hp.com>
* lexical categories are sorted in the way they are declared.
Fix supplied by (Marc Dzaebel), marc@rose.de
Fri Mar 8 15:12:09 1996 Joachim Laubsch <laubsch@hpwat03.cup.hp.com>
* test/exercise.lisp ((compile-module "ex2")): Release 3.4.8
print each rule if :verbose is T
eliminate EMPTY action
updated doc on number, identifier and string as subtypes of the
root domain
Tue Mar 5 09:58:21 1996 Joachim Laubsch <laubsch@hpwat03.cup.hp.com>
* Release 3.4.7
* COPYRIGHT: added GNU Copyleft
* COMPILE-ZEBU.lisp corrections for Allegro
Thu Dec 21 17:01:24 1995 Joachim Laubsch <laubsch@hpwat03.cup.hp.com>
* 3.4.5 first release of a version that will run in ACL 3.0
Windows 3.1. The script winzebu translates to short filenames,
creating the subdirectory 'win'
Tue Aug 2 14:17:18 1994 Joachim H. Laubsch (laubsch@hpljhl.hpl.hp.com)
* COMPILE-ZEBU.lisp: *load-binary-pathname-types* for
(and :SUN :LUCID)
* zebu-driver.lisp (read-parser): if a lex cat is scanned and
iff an IDENTIFIER is also expected prefer the IDENTIFIER in case
it is longer.
Thu Jul 28 09:50:16 1994 Joachim H. Laubsch (laubsch@hpljhl.hpl.hp.com)
* zebu-loadgram.lisp: Fixed Bug with "." as separator
(ambiguous constituent names were made)
Version 3.3.2
* zebu-generator.lisp (insert-clause): warn if syntax is not
unparsable, because some non-terminal is unbound in semantics
Fri May 13 11:00:43 1994 Joachim H. Laubsch (laubsch@hpljl)
* zebu-generator.lisp (insert-clause): fixed error that led to
wrong printers
(gen-printers): warning message for use of undefined domain type,
assume possibility of undefined type in is-subtype-of.
Thu May 12 10:39:12 1994 Joachim H. Laubsch (laubsch@hpljl)
* zebu-tree-attributes.lisp: konrad@dfki.uni-sb.de fixed
bug in prepare-tree-attributes
Thu Apr 28 15:55:22 1994 Joachim H. Laubsch (laubsch@hpljl)
* added debug-parser (&key (grammar t) (lexer nil))
(debug-parser) will load a version of read-parser
that traces the parsing engine's shift and reduce
moves.
(debug-parser :lexer t) will provide more information
on the lexer's progress.
(debug-parser :grammar nil :lexer nil) will reload the
silent and fast version of read-parser.
Mon Apr 25 10:00:59 1994 Joachim H. Laubsch (laubsch@hpljl)
* zebu-driver.lisp: implemented state-sensitive token look-
ahead
Tue Aug 31 17:13:47 1993 Joachim H. Laubsch (laubsch@hpljl)
* introduce the keyword CASE-SENSITIVE -- which can
be given as part of the grammar spec. If its value is
true the case of grammar keywords is significant.
Tue Aug 17 20:14:52 1993 Joachim Laubsch (laubsch at hpljl)
* fix number token lexer bug. Now integer, ratio and float
should be recognized.
Tue Jul 20 20:14:52 1993 Joachim Laubsch (laubsch at hpljl)
* introduce macro
def-tree-attributes (class &rest slots)
def-tree-attributes can be compiled and at load-time
no compiler is necessary.
Mon May 17 21:05:39 1993 Joachim Laubsch (laubsch at hpljl)
* KB-equal compares now also sequences which are "dotted
lists".
Wed May 5 10:57:05 1993 Joachim Laubsch (laubsch at hpljl)
* Printers for slots of type kb-sequence are now
generated properly if the Kleene +/* notation is
used.
Example:
;; Domain definition
Program := [(-stmts kb-sequence)];
..
;; Rules
Program --> "begin" Stmt+ ";" "end"
{ Program: [(-stmts Stmt+)] } ;
..
Tue Apr 27 16:03:50 1993 Joachim Laubsch (laubsch at hpljl)
* kb-subtypep is now a function analogous to CL's subtypep
KB-type-name-p is a function that returns true iff its
argument is a symbol naming a subtype of KB-DOMAIN.
Improved printer generation.
Checked for MCL compatibility and rewrote part of
regular expression compiler.
Wed Apr 7 10:00:18 1993 Joachim Laubsch (laubsch at hpljl)
* To Do
; Muessen die Kleene-Operatoren eigentlich die leere KB-sequence ans
; Ende jeder Sequenz schreiben? Ein normales nil sollte mit Hilfe
; eines modifizierten Printers dasselbe leisten, oder?
************************************************************
* Installation
************************************************************
The Zebu runtime system is all you need if you want to use the
parser/generator that was produced by the compiler (in form of a .tab
file).
The Zebu-compiler is necessary in order to convert the external
grammar description (in form of a .zb file) into a LALR(1) parsing
table (in form of a .tab file), and associated printers and semantic
functions (in form of a <grammar-name>-dom.lisp file).
Installation
------------
1. copy the subdirectory `win' into some directory on your drive,
e.g. c:\work\zebu
2. In ACL
2.1 (load "zinit.lsp")
2.2 (if you have a LISP compiler)
load zcompile.lsp
This compiles all of ZEBU.
To use the compiled ZEBU evaluate
(zb:zebu) ; to load the runtime system
(zb:zebu-compiler) ; to load the grammar compiler
2.3 (if you don't have a LISP compiler)
(zb:zebu :compiled nil) ; to load the runtime system
(zb:zebu-compiler :compiled nil) ; to load the grammar compiler
Bug reports to
--------------
laubsch@cup.hp.com
************************************************************
* Installation
************************************************************
The Zebu runtime system is all you need if you want to use the
parser/generator that was produced by the compiler (in form of a .tab
file).
The Zebu-compiler is necessary in order to convert the external
grammar description (in form of a .zb file) into a LALR(1) parsing
table (in form of a .tab file), and associated printers and semantic
functions (in form of a <grammar-name>-domain.lisp file).
Installation
------------
1. Check whether the pathname for the Zebu directory is correct in your
installation.
2. In MCL evaluate
(load "COMPILE-ZEBU.lisp")
This compiles all of ZEBU.
3. To use ZEBU evaluate
(load "ZEBU-init.lisp")
(zb:zebu) ; to load the runtime system
(zb:zebu-compiler) ; to load the grammar compiler
(zb:zebu-rr) ; to load the rewrite-rule module
Alternative Installation (using DEFSYSTEM)
------------------------------------------
DEFSYSTEM makes it easier to load and compile grammars, since one does
not need to remember the location of a module in a directory
structure. The bad news is that this DEFSYSTEM is incompatible with
the one maintained at CMU. At some point we will clean this up.
(Anyone who would write the definition using the DEFSYSTEM distributed
by Mark Kantrovitz CMU should send me the file and I will include it in
the next version)
To install, follow the directions in ZEBU-sys.lisp. You will need the
portable DEFSYS which is available at:
http://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/code/tools/defsys/laubsch/
The most recent version defsys-5.7 can can be found on ftp.digitool.com
in /pub/mcl/contrib as defsys-5.7.tar.gz.
The file ZEBU-sys.lisp defines three systems
Zebu the runtime system
Zebu-compiler the compiler
Zebu-RR the rewrite rule system
************************************************************
* Installation for NT or W95
************************************************************
The Zebu runtime system is all you need if you want to use the
parser/generator that was produced by the compiler (in form of a .tab
file).
The Zebu-compiler is necessary in order to convert the external
grammar description (in form of a .zb file) into a LALR(1) parsing
table (in form of a .tab file), and associated printers and semantic
functions (in form of a <grammar-name>-domain.lisp file).
Installation
------------
1. Check whether the pathname for the Zebu directory is correct in your
installation.
2. If you have a Common Lisp compiler
(load "COMPILE-ZEBU.lisp")
This compiles all of ZEBU.
3. To use ZEBU evaluate
(load "ZEBU-init.lisp")
3.1 if you have a Common Lisp compiler
(zb:zebu) ; to load the runtime system
(zb:zebu-compiler) ; to load the grammar compiler
(zb:zebu-rr) ; to load the rewrite-rule module
3.2 If you don't have a Common Lisp compiler
(zb:zebu :compiled nil) ; to load the runtime system
(zb:zebu-compiler :compiled nil) ; to load the grammar compiler
The Zebu runtime system is all you need if you want to use the
parser/generator that was produced by the compiler (in form of a .tab
file).
The Zebu-compiler is necessary in order to convert the external
grammar description (in form of a .zb file) into a LALR(1) parsing
table (in form of a .tab file), and associated printers and semantic
functions (in form of a <grammar-name>-domain.lisp file).
Installation under Unix
-----------------------
set the environment variables for LISP to the directory, where your
lisp development environment resides. (In case of Lucid, the name of
the executable is 'base-lisp-de', in case your Lisp uses a different
name you could create a link, or edit the Makefile)
cd <directory where the Zebu sources reside>
make
Alternative Installation (using DEFSYSTEM)
------------------------------------------
DEFSYSTEM makes it easier to load and compile grammars, since one does not
need to remember the location of a module in a directory structure.
The bad news is that this DEFSYSTEM is incompatible with the one
maintained at CMU. At some point we will clean this up. (Anyone who
would write the definition using the DEFSYSTEM distributed by CMU
should send me the file and I will include it in the next version)
To install, follow the directions in ZEBU-sys.lisp. You will need the
portable DEFSYS which is available at:
http://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/code/tools/defsys/laubsch/
The most recent version defsys-5.7 can can be found on ftp.digitool.com
in /pub/mcl/contrib as defsys-5.7.tar.gz.
The file ZEBU-sys.lisp defines three systems
Zebu the runtime system
Zebu-compiler the compiler
Zebu-RR the rewrite rule system
To use ZEBU evaluate
--------------------
(load "ZEBU-init.lisp")
(zb:zebu) ; to load the runtime system
(zb:zebu-compiler) ; to load the grammar compiler
(zb:zebu-rr) ; to load the rewrite-rule module
# Makefile for Zebu
SHELL = /bin/sh
LISP = /please_add_LISP=/usr/bin/your-lisp-implementation
# You may have to customize the variables LISP CLPATH CLDE Lisp-compiler Lisp-ae LATEX bin
CLPATH = $(LISP)
# Common Lisp development environment
CLDE = lucid-de
# Compiler
Lisp-compiler = $(CLPATH)/$(CLDE)
# Common Lisp application environment
Lisp-ae = $(CLPATH)/lucid-ae
LATEX = latex
cl-compile = $(CLPATH)/$(CLDE) -n \
-l compile-zebu.lisp -quit -f
# this works in GNU make, and not in HPUX
# in HPUX use: bin = `./machine`bin
bin = `./machine`bin
# with gnu make use bin := `./machine`bin
B = binary/
lisp-obj = $(B)zebu-package.$(bin) $(B)zebu-aux.$(bin) $(B)zmg-dom.$(bin) $(B)zebu-regex.$(bin) $(B)zebu-loader.$(bin) $(B)zebu-driver.$(bin) $(B)zebu-actions.$(bin) $(B)zebu-oset.$(bin) $(B)zebu-g-symbol.$(bin) $(B)zebu-loadgram.$(bin) $(B)zebu-generator.$(bin) $(B)zebu-lr0-sets.$(bin) $(B)zebu-empty-st.$(bin) $(B)zebu-first.$(bin) $(B)zebu-follow.$(bin) $(B)zebu-tables.$(bin) $(B)zebu-slr.$(bin) $(B)zebu-closure.$(bin) $(B)zebu-lalr1.$(bin) $(B)zebu-dump.$(bin) $(B)zebu-compile.$(bin) $(B)zebu-printers.$(bin)
all: zebu-init.lisp $(lisp-obj) zebu-compiler zebu-parser Zebu_intro TAGS
$(B)zebu-package.$(bin): zebu-package.lisp
$(cl-compile)
$(B)zebu-aux.$(bin): zebu-aux.lisp
$(cl-compile)
$(B)zmg-dom.$(bin): zmg-dom.lisp
$(cl-compile)
$(B)zebu-regex.$(bin): zebu-regex.lisp
$(cl-compile)
$(B)zebu-loader.$(bin): zebu-loader.lisp
$(cl-compile)
$(B)zebu-driver.$(bin): zebu-driver.lisp
$(cl-compile)
$(B)zebu-actions.$(bin): zebu-actions.lisp
$(cl-compile)
$(B)zebu-oset.$(bin): zebu-oset.lisp
$(cl-compile)
$(B)zebu-g-symbol.$(bin): zebu-g-symbol.lisp
$(cl-compile)
$(B)zebu-loadgram.$(bin): zebu-loadgram.lisp
$(cl-compile)
$(B)zebu-generator.$(bin): zebu-generator.lisp
$(cl-compile)
$(B)zebu-lr0-sets.$(bin): zebu-lr0-sets.lisp
$(cl-compile)
$(B)zebu-empty-st.$(bin): zebu-empty-st.lisp
$(cl-compile)
$(B)zebu-first.$(bin): zebu-first.lisp
$(cl-compile)
$(B)zebu-follow.$(bin): zebu-follow.lisp
$(cl-compile)
$(B)zebu-tables.$(bin): zebu-tables.lisp
$(cl-compile)
$(B)zebu-slr.$(bin): zebu-slr.lisp
$(cl-compile)
$(B)zebu-closure.$(bin): zebu-closure.lisp
$(cl-compile)
$(B)zebu-lalr1.$(bin): zebu-lalr1.lisp
$(cl-compile)
$(B)zebu-dump.$(bin): zebu-dump.lisp
$(cl-compile)
$(B)zebu-compile.$(bin): zebu-compile.lisp
$(cl-compile)
$(B)zebu-printers.$(bin): zebu-printers.lisp
$(cl-compile)
zebu-compiler: $(lisp-obj) zebu-init.lisp
@echo "Making the Zebu Compiler"
$(Lisp-compiler) -n \
-l "zebu-init.lisp" \
-e '(progn (zb::zebu-compiler)(setq *enter-top-level-hook* (function zb::compile-from-command-line)) (discard-source-file-info) (disksave "./zebu-compiler" :FULL-GC T :WRITABLE T :VERBOSE T) (quit))'
zebu-parser: $(lisp-obj) zebu-init.lisp
@echo "Making the Zebu Parser"
$(Lisp-ae) -n \
-l "zebu-init.lisp" \
-e '(progn (in-package "CL-USER") (zb::zebu) (discard-source-file-info))' \
-e '(progn (disksave "./zebu-parser" :FULL-GC T :WRITABLE T :VERBOSE T :restart-function (function zb::load-from-command-line)) (quit))'
Zebu_intro: doc/Zebu_intro.tex
cd doc; $(LATEX) Zebu_intro; makeindex Zebu_intro.idx;\
$(LATEX) Zebu_intro;\
dvips Zebu_intro.dvi -o Zebu_intro.ps
TRANSLATE = /usr/local/bin/latex2html
tohtml = $(TRANSLATE) -no_reuse -address laubsch@cup.hp.com -auto_navigation -contents_in_navigation -index_in_navigation
html: doc/Zebu_intro.html
doc/Zebu_intro.html: doc/Zebu_intro.tex
$(tohtml) doc/Zebu_intro.tex
.PHONY: distclean
distclean:
make clean
@echo Deleting tab files in directory test and test/binary
chmod 777 ./test
rm -rf ./test/*.tab
@echo Deleting binary files in directory test/binary
rm -f ./test/binary/*.$(bin)
@echo Deleting binary files in directory test/binary
rm -f ./binary/*
.PHONY: clean
clean:
@echo Deleting domain files
find . \( -name '[0-9]*-dom*' -o -name '*~' \) -type f -print -exec rm {} \;
find ./test \( -name '[0-9]*.lisp' -o -name '*-dom*.lisp' -o -name '*~' \) -type f -print -exec rm {} \;
TAGS: $(lisp-obj)
make clean; etags -o TAGS *.lisp
tar:
./Tar-zebu
dos:
./winzebu
; -*- mode: Text ------------------------------------------------ ;
; File: README
; Author: Joachim H. Laubsch, laubsch@cup.hp.com
***********************************************************
;;; Copyright (c) 1989, Hewlett-Packard Company
;;; All rights reserved.
;;;
;;; Use and copying of this software and preparation of derivative works
;;; based upon this software are permitted. Any distribution of this
;;; software or derivative works must comply with all applicable United
;;; States export control laws.
;;;
;;; This software is made available AS IS, and Hewlett-Packard Company
;;; makes no warranty about the software, its performance or its conformity
;;; to any specification.
;;;
;;; Suggestions, comments and requests for improvements are welcome
;;; and should be mailed to laubsch@hplabs.hpl.hp.com
;;; ***********************************************************
Zebu is a kind of YACC, and was originally implemented in Scheme by
William M. Wells III. It generates an LALR(1) parsing table. To parse
a string with a grammar, only this table and a driver need to be
loaded.
The present version of Zebu is an extension, rewritten in Common Lisp.
It contains the ability to define several grammars and parsers
simultaneously, a declarative framework for specifying the semantics,
capabilities to define and use meta-grammars (grammars to express a
grammar in), generation of unparsers (generators) using a 'reversible
grammar' notation, as well as efficiency related improvements.
Zebu also contains a lexical analyzer which is based on the regular
expression compiler written by Lawrence E. Freil <lef@nscf.org>.
Zebu compiles a grammar with 300 productions (including
dumping of the tables to disk) in approx 2 minutes and 30 seconds on a
HP 9000/370.
This implementation has been tested in Lucid CL, Allegro CL, and
MCL 2.0b.
For documentation look into the doc/ directory:
Zebu_intro.tex contains an introduction to the Common Lisp
version and the enhancements. This is a LaTeX file. The PostScript
version is Zebu_intro.ps.
The test/ directory contains a few examples. The file exercise.lisp runs
many of them. Most example files also have a commented section at the end
that suggest some tests.
Other features, like grammar-names, string- or symbol-delimiters,
parameterization of lexical analysis, and modes of interpretation of
the grammar actions are also documented in zebu-loader.lisp.
If you need help or have suggestions, send email to:
laubsch@cup.hp.com
Joachim H. Laubsch
Hewlett-Packard
19477 Pruneridge Avenue (MS 47UI)
Cupertino, CA 95014
Tel 408-447-5211
Fax 408-447-5229
************************************************************
This diff is collapsed.
;;;; -*- mode:lisp;coding:utf-8 -*-
;;;;**************************************************************************
;;;;FILE: com.hp.zebu.asd
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
;;;;USER-INTERFACE: NONE
;;;;DESCRIPTION
;;;;
;;;; ASD file to load the Zebu library.
;;;;
;;;;AUTHORS
;;;; <PJB> Pascal J. Bourguignon <pjb@informatimago.com>
;;;;MODIFICATIONS
;;;; 2012-02-01 <PJB> Created this .asd file.
;;;;BUGS
;;;;LEGAL
;;;; GPL
;;;;
;;;; Copyright Pascal J. Bourguignon 2012 - 2012
;;;;
;;;; This program is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU General Public License
;;;; as published by the Free Software Foundation; either version
;;;; 2 of the License, or (at your option) any later version.
;;;;
;;;; This program is distributed in the hope that it will be
;;;; useful, but WITHOUT ANY WARRANTY; without even the implied
;;;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
;;;; PURPOSE. See the GNU General Public License for more details.
;;;;
;;;; You should have received a copy of the GNU General Public
;;;; License along with this program; if not, write to the Free
;;;; Software Foundation, Inc., 59 Temple Place, Suite 330,
;;;; Boston, MA 02111-1307 USA
;;;;**************************************************************************
;; Note: cf. zebu-sys.lisp for dependencies.
(asdf:defsystem :com.hp.zebu
:description "Zebu LALR parser generator."
:author "Hewlett-Packard Company"
:version "1.0.0"
:licence "GPL"
:properties ((#:date . "Winter 2012")
((#:albert #:output-dir) . "/tmp/documentation/com.hp.zebu/")
((#:albert #:formats) . ("docbook"))
((#:albert #:docbook #:template) . "book")
((#:albert #:docbook #:bgcolor) . "white")
((#:albert #:docbook #:textcolor) . "black"))
:serial t
:components ((:file "zebu-package")
(:file "zebu-init")
(:file "zebu-aux")
(:file "zebu-kb-domain")
(:file "zebu-mg-hierarchy")
(:file "zebu-regex")
(:file "zebu-loader")
(:file "zebu-driver")
(:file "zebu-actions")
(:file "zebu-oset")
(:file "zebu-g-symbol")
(:file "zebu-loadgram")
(:file "zebu-generator")
(:file "zebu-lr0-sets")
(:file "zebu-empty-st")
(:file "zebu-first")
(:file "zebu-follow")
;; (:file "zebu-tables")
(:file "zebu-slr")
(:file "zebu-closure")
(:file "zebu-lalr1")
(:file "zebu-dump")
(:file "zebu-compile")
(:file "zebu-tables")
(:file "zebu-printers") ; only for debugging
(:file "zebu-mg")
(:file "zmg-dom")
;; (:file "zebu-kb-domain")
(:file "zebu-tree-attributes")
(:file "zebra-debug")
(:file "zebu")))
;;;; THE END ;;;;