Newsgroups: comp.lang.scheme
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!swrinde!gatech!bloom-beacon.mit.edu!mcrcim.mcgill.edu!M3iSystems.QC.CA!sunqbc.risq.net!clouso.crim.ca!IRO.UMontreal.CA!iros1.iro.umontreal.ca!boucherd
From: boucherd@raptor.IRO.UMontreal.CA (Dominique Boucher)
Subject: Re: Lex & Yacc like analyser generator in scheme for scheme
In-Reply-To: castro@ufr.lirmm.fr's message of 23 May 1995 10:38:33 GMT
Message-ID: <BOUCHERD.95May24161950@raptor.IRO.UMontreal.CA>
Sender: news@IRO.UMontreal.CA
Organization: Universite de Montreal
References: <3psdva$584@lirmm.lirmm.fr>
Date: Wed, 24 May 1995 20:19:50 GMT
Lines: 55

In article <3psdva$584@lirmm.lirmm.fr> castro@ufr.lirmm.fr () writes:

> I am looking for a lex like analyser and a yacc like analyser
> producing scheme code to recognize words and grammars. 
> note :
> I don't mind the input syntax for the description of the grammar
> 
> Do you know where i can find that ?
> 
> Emmanuel CASTRO
> Montpellier
> France 

You can find such a yacc like analyzer in 

 /ftp.iro.umontreal.ca:/pub/parallele/boucherd/lalr.tar.gz

It is fairly portable and has been tested under the following Scheme
systems:

	- Gambit v2.2 
	- Scm 4d3 under DEC Alpha, SUN OS, Linux
	- MIT-Scheme 7.2.0 (microcode 11.127, runtime 14.160)
	- Bigloo 1.6

and it should run on any Scheme implementation that provides macros
and bitwise operations without too much efforts.

Here is the header of the program:

;;; -------------------------------------------------------------------------
;;; An efficient Scheme LALR(1) Parser Generator  -- lalr.scm
;;; -------------------------------------------------------------------------
;;; This file contains yet another LALR(1) parser generator written in 
;;; Scheme. In contrast to other such parser generators, this one
;;; implements a more efficient algorithm for computing the lookahead sets. 
;;; The algorithm is the same as used in Bison (GNU yacc) and is described
;;; in the following article:
;;;
;;; "Efficient Computation of LALR(1) Look-Ahead Set", F. DeRemer and
;;; T. Pennello, TOPLAS, vol. 4, no. 4, october 1982.
;;; -------------------------------------------------------------------------


Dominique Boucher
Universite de Montreal
--
+--------------------------------------------------------+
| Dominique Boucher         | Projet Dylan               |
+--------------------------------------------------------+
| Laboratoire de Traitement Parallele                    |
| Departement d'Informatique et Recherche Operationnelle |
| Universite de Montreal                                 |
| e-mail : boucherd@iro.umontreal.ca                     |
+--------------------------------------------------------+
