home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / lisp / 2381 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  5.0 KB

  1. Xref: sparky comp.lang.lisp:2381 comp.lang.clos:787 comp.lang.misc:2962 comp.object:3468 comp.std.misc:119 comp.lang.scheme:2165 comp.ai:3368
  2. Path: sparky!uunet!mcsun!uknet!mucs!dnd
  3. From: dnd@ee.man.ac.uk (Darryl Davis (RA))
  4. Newsgroups: comp.lang.lisp,comp.lang.clos,comp.lang.misc,comp.object,comp.std.misc,comp.lang.scheme,comp.ai
  5. Subject: Followup to Lisp producing Yacc/Bison
  6. Summary: Thare are answers to my question.
  7. Keywords: Yacc, Bison, Lisp, scheme, LR(1), LL(1)
  8. Message-ID: <6031@m1.cs.man.ac.uk>
  9. Date: 7 Sep 92 14:37:09 GMT
  10. Sender: news@cs.man.ac.uk
  11. Reply-To: dnd@spec0.ee.man.ac.uk (Darryl Davis (RA))
  12. Followup-To: comp.lang.lisp
  13. Organization: Dept Electrical and Electronic Eng, Manchester University, UK
  14. Lines: 115
  15.  
  16. Well, here is the followup to my request for a YACC/BISON type thingy that
  17. produced lisp, rather than C.
  18. Many thanks to the peoples who responded.
  19. The suggestions can be summarised as follows:
  20.  
  21. 1. Some student at UC Berkeley has already done it. (Any clues out there?)
  22.  
  23. 2. Use Lisp to parse the output from Bison/Yacc.
  24.     The general feeling was that tho this is possible, without too much
  25. heartache, the language syntax may need to be artificially simplified. This
  26. may still require some hand-coding.
  27.  
  28. 3. >From the comp.lang.lisp FAQ-file:
  29.  
  30.    The Lisp Utilities collection is accessible by anonymous ftp
  31.    to any CMU CS machine (e.g., ftp.cs.cmu.edu [128.2.206.173])
  32.    or through AFS in the directory
  33.            /afs/cs.cmu.edu/user/mkant/Public/Lisp-Utilities/
  34.    If accessing this directory through anonymous ftp, it is
  35.    important to "cd" to the directory using one atomic operation, as
  36.    some of the superior directories on the path are protected from
  37.    access by an anonymous ftp.
  38.    [...]
  39.       johnson-yacc.lisp       Mark Johnson's lisp YACC.
  40.  
  41. 4.  Contact Dan LaLiberte (liberte@cs.uiuc.edu)
  42.  
  43. I've got a couple thing you might be interested in.  Both are free and
  44. written for GNU Emacs Lisp, though it should port to CL with few
  45. problems.  The first is a bison parser in Lisp that reads tables
  46. generated by bison.  The second lets the bison generated parser do the
  47. parsing, but reads a sequence of rule numbers in Lisp corresponding to
  48. the order of reductions, and calls the corresponding action code
  49. written in Lisp.  This is much faster than parsing in Lisp.
  50.  
  51. 5. fateman@peoplesparc.Berkeley.EDU (Richard Fateman) reply sent many details:
  52.  
  53. Wanda Pratt <ai.wpratt@mcc.com> has a program called STACC
  54.  
  55. Mark Johnson <mj@cs.brown.edu has an LALR parser generator
  56.  
  57. Jacob Butcher <jacob@taitastigon.tcs.com> has one, undocumented.
  58.  
  59. Jim kipps  kipps@etoile.ics.uci.edu
  60. (this would need a
  61. license from RAND corp, I think). It is in C producing CL parsers.
  62.  
  63. Dave Wile <wile@isi.edu> say "I have a rather well-developed system,
  64. called Popart -- for Producer of Parsers and Related Tools --
  65.  that may be what you are looking for."
  66.  
  67.  David Gadbois <gadbois@mcc.com> says
  68. I made a first pass at turning Sandra Loosemore's SLR parser generator
  69. into an LR(1) one.  Several folks have used versions of it for compiler
  70. class projects.  It's on cs.utexas.edu in /pub/ops5/gadbois/lr.tar.Z.
  71.  
  72. Arun Welch...
  73. Lisp Systems Programmer, Lab for AI Research, Ohio State University
  74. welch@cis.ohio-state.edu say...
  75. Not CL, but we've got one written in LOOPS/Interlisp-D that we could
  76. release if you want it.
  77. .........
  78. I used Mark Johnson's parser generator for my class. It worked fine,
  79. but it is not exactly YACC input, nor does it have much for error
  80. recovery.
  81.  
  82. 6. Zebu
  83. Zebu is a kind of YACC, and was originally implemented in Scheme by
  84. William M. Wells III.  It generates an LALR(1) parsing table. To parse
  85. a string with a grammar, only this table and a driver need to be
  86. loaded.
  87. It comes with documentation.
  88.  
  89. The lisp based one can be got as follows:
  90.  
  91.  ftp cambridge.apple.com
  92.  
  93. login as anonymous.
  94.  
  95.  cd pub/mcl2/contrib
  96.  
  97. Then get (in binary mode) the compressed tar file:
  98.  
  99.     Zebu-2.1.tar.Z
  100.  
  101. Also need the DEFSYS-5.0.tar.Z system  from the same place!
  102.  
  103. Once copied to your machine from cambridge.apple.com, you must use
  104. uncompress and tar to recreate the directory.
  105.  
  106. There is a LaTeX file in the ../doc subdirectory that gives a good
  107. introduction.  I am interested in any suggestions you have.
  108.  
  109. ; -*- Joachim (email: laubsch@hplabs.hpl.hp.com  tel: 415-857-7695).
  110.  
  111.  
  112. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  113.  
  114. Well I am going to sytart with Zebu and if it does it ok, if not richard fateman's
  115. list supplies a number of alternatives.
  116.  
  117. Again, many thanks for all the replies:
  118.  
  119. dnd
  120. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  121.                                         >
  122.    Dr. Darryl Davis                    >
  123.                                         >
  124.    Multi-Media Laboratory        >
  125.    Department of Electrical Engineering >   E-mail        : dnd@spec0.man.ac.uk
  126.    The University of Manchester         >             
  127.    Brunswick St                          >   Phone         : (+44)-61-275-4561
  128.    Manchester M13 9PL                   >   FAX     : (+44)-61-275-4512
  129.                                         >   
  130. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  131.