|A Non-LALR(1) Parser Generator dan%npt1@uunet.UU.NET (1992-08-03)|
|Re: A Non-LALR(1) Parser Generator Peter.Breuer@prg.oxford.ac.uk (1992-08-05)|
|Re: A Non-LALR(1) Parser Generator email@example.com (1992-08-17)|
|Re: A Non-LALR(1) Parser Generator firstname.lastname@example.org (1992-08-18)|
|Re: A Non-LALR(1) Parser Generator email@example.com (1992-08-17)|
|Re: A Non-LALR(1) Parser Generator firstname.lastname@example.org.OZ.AU (1992-08-20)|
|Re: A Non-LALR(1) Parser Generator email@example.com (1992-08-22)|
|Re: A Non-LALR(1) Parser Generator firstname.lastname@example.org (1992-08-25)|
|From:||email@example.com (Eugene Yurek)|
|Date:||Tue, 18 Aug 1992 17:50:36 GMT|
firstname.lastname@example.org (Andrew Bromage):
>[are there non-LALR parser generators?]
> D Pager has produced a few algorithms which may be of some use.
> The first (ie simpler) algorithm was used in a parser compiler called
> "LR", the availability of which I know nothing about.
> It was reviewed in:
> Wetherell and Shannon, "LR - automatic parser generator and LR(1) parser",
> IEEE Transactions on Software Engineering, SE-7, pp 274-278, 1981.
I, at one time (I may still have the source laying around somewhere)
played with a copy of the LR parser generator. It is all written in
Fortran (as I remember). It accepts a somewhat preprocessed BNF
Charlie Wetherell originally wrote LR along with Shannon for some
government entity they were either employed for or were working on a
contract for, so, consequently, the entire source is in the public domain.
The source tape is available from the government (some program repository,
though I can't remember which one). It comes with a sample parser for the
tables it generates.
This generator is not easy to use compared to YACC. You cannot provide
semantic actions within the grammar. They must be handled in a separate
source file, and manually tied back to the productions in the BNF (yuk!!).
Basically, I'm saying that LR works well, however, its not that easy to
use (though this is a subjective observation on my part). And as I said
above, you're going to need a Fortran compiler, and some patience to use
it. It is, however, the only LR(1) parser generator that I've ever come
across (please, no flames!!!).
email@example.com AT&T Bell Laboratories, Middletown, NJ
[One of the reasons that yacc became so popular is that it let you put the
action code next to the grammar rule to which it applies. Until then all the
parser generators I knew of required that you match up the rules and the code
Return to the
Search the comp.compilers archives again.