[comp.lang.misc] LR

opsjoe@sunybcs (Joe Gallagher) (07/14/88)

Hello!!
	I was wondering if someone could tell me if a LR(1) parser/generator
exists, and if so, could they put me on to where I might obtain one??  The
source language it is written in makes no difference, as I would assume C
is the right choice.  (Sorry A.T.& T. !?!?)
	Thanks ever so much to anyone who replies; either by e-mail or this
newsgroup.

							Joe Gallagher

pcm@iwarpj.intel.com (Phil C. Miller) (07/20/88)

In article <12582@sunybcs.UUCP> opsjoe@sunybcs.UUCP (Joe Gallagher) writes:
>
>Hello!!
>	I was wondering if someone could tell me if a LR(1) parser/generator
>exists, and if so, could they put me on to where I might obtain one??  The
>source language it is written in makes no difference, as I would assume C
>is the right choice.  (Sorry A.T.& T. !?!?)
>	Thanks ever so much to anyone who replies; either by e-mail or this
>newsgroup.
>
>							Joe Gallagher

An LR(1) parser generator was developed at Lawrence Livermore Labs under 
contract from the Dept. of Energy in the late 70's.  An article discussing 
the parser generator appeared in:

    IEEE Transactions of Software Engineering
    Vol. SE-7, No. 3
    May, 1981

The article is called:

    "LR--Automatic Parser Generator and LR(1) Parser"
    by Charles Wetherell and Alfred Shannon

The parser generator is written in Fortran-66 and produces Fortran-66 
tables (in the form of DATA statements).  It is fairly straightforward 
to convert the output of the LR program to C from Fortran.

The program was, at one time, available from the following organization:

    National Energy Software Center    \ 
    Argonne National Laboratory        |  Note: this information is from
    9700 South Cass Avenue             |  the above article and is over
    Argonne, IL 60439                  |  seven years old...
    (312)972-7250                      /

A related article is:

    "A practical general method for constructing LR(k) parsers", David Pager
    Acta Informatica, vol. 7, pp. 249-268, 1977.

Hope this is of some use to you.

Phil Miller