Re: parser table implementation and compression

Gene <gene.ressler@gmail.com>
Sat, 16 Jun 2007 09:52:47 -0700

          From comp.compilers

Related articles
parser table implementation and compression mips@cyberspace.org (Damien Couderc) (2007-06-16)
Re: parser table implementation and compression gene.ressler@gmail.com (Gene) (2007-06-16)
Re: parser table implementation and compression lsonderling@earthlink.net (Larry Sonderling) (2007-06-22)
Re: parser table implementation and compression gene.ressler@gmail.com (Gene) (2007-06-22)
| List of all articles for this month |

From: Gene <gene.ressler@gmail.com>
Newsgroups: comp.compilers
Date: Sat, 16 Jun 2007 09:52:47 -0700
Organization: Compilers Central
References: 07-06-022
Keywords: parse, LL(1)
Posted-Date: 16 Jun 2007 13:50:04 EDT

On Jun 16, 5:58 am, Damien Couderc <m...@cyberspace.org> wrote:
> Hello everybody,
>
> Thanks to your replies on my previous post i have been able to
> bootstrap my lexer generator using lex and yacc.
>
> Now i'm working on the LL parser generator and am being a bit stuck
> with the structure of the parser table. I'd be glad if someone had
> pointers on how to represent the production in the parse table. Of
> course, i don't speak about the representation in memory which can be
> handled by a linked list but more by how i can represent it in the
> generated parser.
>
> I've also read some people that talked about different ways of
> compressing the parse table. The 2D model used in the dragon book is
> simple but not usable for real world grammars. Any hints on this
> subject too ?


The old book by Gene Holub _Compiler Design in C_ had complete sources
for a LL parser generator.


The most commonly used method of table compression is probably the
family known as "row displacement." There are many schemes for
optimizing row-displaced tables. For most applications, they're
irrelevant. Any greedy choice is likely to be fine.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.