From: dnd@ee.man.ac.uk (Darryl Davis (RA))
Newsgroups: comp.lang.lisp,comp.lang.clos,comp.lang.misc,comp.object,comp.std.misc,comp.lang.scheme,comp.ai
Subject: Followup to Lisp producing Yacc/Bison
Summary: Thare are answers to my question.
Keywords: Yacc, Bison, Lisp, scheme, LR(1), LL(1)
Date: 7 Sep 92 14:37:09 GMT
Reply-To: dnd@spec0.ee.man.ac.uk (Darryl Davis (RA))
Followup-To: comp.lang.lisp
Organization: Dept Electrical and Electronic Eng, Manchester University, UK

Well, here is the followup to my request for a YACC/BISON type thingy that
produced lisp, rather than C.
Many thanks to the peoples who responded.
The suggestions can be summarised as follows:

1. Some student at UC Berkeley has already done it. (Any clues out there?)

2. Use Lisp to parse the output from Bison/Yacc.
	The general feeling was that tho this is possible, without too much
heartache, the language syntax may need to be artificially simplified. This
may still require some hand-coding.

3. >From the comp.lang.lisp FAQ-file:

   The Lisp Utilities collection is accessible by anonymous ftp
   to any CMU CS machine (e.g., ftp.cs.cmu.edu [128.2.206.173])
   or through AFS in the directory
           /afs/cs.cmu.edu/user/mkant/Public/Lisp-Utilities/
   If accessing this directory through anonymous ftp, it is
   important to "cd" to the directory using one atomic operation, as
   some of the superior directories on the path are protected from
   access by an anonymous ftp.
   [...]
      johnson-yacc.lisp       Mark Johnson's lisp YACC.

4.  Contact Dan LaLiberte (liberte@cs.uiuc.edu)

I've got a couple thing you might be interested in.  Both are free and
written for GNU Emacs Lisp, though it should port to CL with few
problems.  The first is a bison parser in Lisp that reads tables
generated by bison.  The second lets the bison generated parser do the
parsing, but reads a sequence of rule numbers in Lisp corresponding to
the order of reductions, and calls the corresponding action code
written in Lisp.  This is much faster than parsing in Lisp.

5. fateman@peoplesparc.Berkeley.EDU (Richard Fateman) reply sent many details:

Wanda Pratt <ai.wpratt@mcc.com> has a program called STACC

Mark Johnson <mj@cs.brown.edu has an LALR parser generator

Jacob Butcher <jacob@taitastigon.tcs.com> has one, undocumented.

Jim kipps  kipps@etoile.ics.uci.edu
(this would need a
license from RAND corp, I think). It is in C producing CL parsers.

Dave Wile <wile@isi.edu> say "I have a rather well-developed system,
called Popart -- for Producer of Parsers and Related Tools --
 that may be what you are looking for."

 David Gadbois <gadbois@mcc.com> says
I made a first pass at turning Sandra Loosemore's SLR parser generator
into an LR(1) one.  Several folks have used versions of it for compiler
class projects.  It's on cs.utexas.edu in /pub/ops5/gadbois/lr.tar.Z.

Arun Welch...
Lisp Systems Programmer, Lab for AI Research, Ohio State University
welch@cis.ohio-state.edu say...
Not CL, but we've got one written in LOOPS/Interlisp-D that we could
release if you want it.
.........
I used Mark Johnson's parser generator for my class. It worked fine,
but it is not exactly YACC input, nor does it have much for error
recovery.

6. Zebu
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.
It comes with documentation.

The lisp based one can be got as follows:

 ftp cambridge.apple.com

login as anonymous.

 cd pub/mcl2/contrib

Then get (in binary mode) the compressed tar file:

	Zebu-2.1.tar.Z

Also need the DEFSYS-5.0.tar.Z system  from the same place!

Once copied to your machine from cambridge.apple.com, you must use
uncompress and tar to recreate the directory.

There is a LaTeX file in the ../doc subdirectory that gives a good
introduction.  I am interested in any suggestions you have.

; -*- Joachim (email: laubsch@hplabs.hpl.hp.com  tel: 415-857-7695).


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Well I am going to sytart with Zebu and if it does it ok, if not richard fateman's
list supplies a number of alternatives.

Again, many thanks for all the replies:

dnd
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
                                    	>
   Dr. Darryl Davis                	>
                                    	>
   Multi-Media Laboratory		>
   Department of Electrical Engineering >   E-mail    	: dnd@spec0.man.ac.uk
   The University of Manchester     	>             
   Brunswick St                      	>   Phone     	: (+44)-61-275-4561
   Manchester M13 9PL               	>   FAX 	: (+44)-61-275-4512
                                    	>   
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>