[comp.sources.wanted] Wanted: parser-generator/lexical-analyser-generator outputting Scheme

smd@lsuc.on.ca (Sean Doran) (03/15/91)

Does anyone have a utility, written in scheme, C or something else that
is reasonably portable, which can be used to design lexical analysers or
parser-generators in scheme (R4RS, MIT C-Scheme or even xscheme)?

Thanks for any information.

-- 
Sean Doran <smd@lsuc.ON.CA>  The Law Society of Upper Canada

adrianho@barkley.berkeley.edu (Adrian J Ho) (03/15/91)

In article <m0jH0OJ-00023uC@lsuc.lsuc.on.ca> smd@lsuc.on.ca (Sean Doran) writes:

>Does anyone have a utility, written in scheme, C or something else that
>is reasonably portable, which can be used to design lexical analysers or
>parser-generators in scheme (R4RS, MIT C-Scheme or even xscheme)?

Not exactly what you were asking for, and it is a little old, but you
might want take a look at ZEBU, an LALR(1) parser system in Scheme.
The Introduction section from the manual follows:

----------
     INTRODUCTION

     ZEBU is a lalr(1) parser generator package.  It facilitates the
     automatic construction of syntax driven processors within the
     SCHEME [2] programming environment.  Zebu bears resemblance to
     the UNIX program YACC [1].

     Zebu reads grammar files that contain the description of a
     language as well as the actions to be taken as the language is
     parsed.  The language is described by production rules, while the
     actions are described by associated lambda expressions.

     Zebu generates parse table files which describe an lr parsing
     machine that processes the specified language.

     Zebu has a parser driver component which processes the specified
     language using the parse table file.

     A good discussion of lalr(1) parser generators and syntax direct-
     ed translation appears in PRINCIPLES OF COMPILER DESIGN [3].
----------

FTP: trix.ai.mit.edu (128.52.32.6), pub/systems/zebu.tar.Z

Disclaimer:  I haven't used it yet, so I can't really say if it's
useful to you.  Also, it's version .9 and written in 1989, and the
author has only certified it on PC-Scheme 3.0 and C-Scheme 6.2, but he
implied that just about any R^3-compilant Scheme should accept it,
with the following proviso:

----------
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 .
----------

Good luck!

-----------------------------------------------------------------------------
Adrian Ho, EECS (pronounced "eeks!") Dept.		Phone: (415) 642-5563
UC Berkeley					adrianho@barkley.berkeley.edu
Domain: sesame-street (telly,bigbird,snuffy,oscar,kermit,bert,grover,barkley)
Favorite expression: "There's no business like monkey business."