Related articles |
---|
LR(1) Parser Generator tej@melbpc.org.au (Tim Josling) (2001-07-17) |
Re: LR(1) Parser Generator marcov@toad.stack.nl (2001-07-18) |
Re: LR(1) Parser Generator vmakarov@redhat.com (Vladimir Makarov) (2001-07-18) |
Re: LR(1) Parser Generator mike@dimmick.demon.co.uk (Mike Dimmick) (2001-07-18) |
Re: LR(1) Parser Generator tej@melbpc.org.au (Tim Josling) (2001-07-23) |
Re: LR(1) Parser Generator haberg@matematik.su.se (2001-07-23) |
Re: LR(1) Parser Generator david@tribble.com (David R Tribble) (2001-07-23) |
Re: LR(1) Parser Generator cotemark@globetrotter.net (Mark) (2001-07-23) |
Re: LR(1) Parser Generator thp@cs.ucr.edu (2001-07-30) |
Re: LR(1) Parser Generator soenke.kannapinn@wincor-nixdorf.com (Sönke Kannapinn) (2001-08-02) |
Re: LR(1) Parser Generator tej@melbpc.org.au (Tim Josling) (2001-08-06) |
LR(1) Parser Generator pjain@iitk.ac.in (2003-04-05) |
From: | David R Tribble <david@tribble.com> |
Newsgroups: | comp.compilers |
Date: | 23 Jul 2001 02:32:52 -0400 |
Organization: | Prodigy Internet http://www.prodigy.com |
References: | 01-07-060 |
Keywords: | LR(1), parse |
Posted-Date: | 23 Jul 2001 02:32:51 EDT |
Tim Josling wrote:
> I am looking for the source for an LR(1) compiler, preferably
> written in C, and with open source licencing. Google cannot help.
> Is anyone aware of anything. I do have a pascal implementation
> but I do not like pascal (for no good reason I'm sure) and P2C
> core dumps on the program.
>
> LALR implementations are available but it has to be LR(1).
I am currently working on an LR(1) parser generator for Java (which is
also written in Java), which generates parsers from YACC input grammars.
I have the generator "engine" already working, but as of yet I have not
completed the parser or code generator portions.
I plan to release it as open source. Would this be of interest to you?
> Everyone says LR(1) implementations are too slow or too big but
> those books were written when mainframes has 1mb of 'core'.
I agree. I actually use a modified LR(1) parser generator, which
attempts to merge as many item sets as it can, a la LALR(1) parsers,
so the resulting state tables are not that much bigger than LALR(1)
tables (and will, in fact, be exactly the same size if the input
grammar is LALR(1) or SLR(1)). I call this method "Merged LR(k)", or
"MLR(k)" for short.
-- David R. Tribble, mailto:david@tribble.com --
Return to the
comp.compilers page.
Search the
comp.compilers archives again.