|parser table implementation and compression firstname.lastname@example.org (Damien Couderc) (2007-06-16)|
|Re: parser table implementation and compression email@example.com (Gene) (2007-06-16)|
|Re: parser table implementation and compression firstname.lastname@example.org (Larry Sonderling) (2007-06-22)|
|Re: parser table implementation and compression email@example.com (Gene) (2007-06-22)|
|Date:||Sat, 16 Jun 2007 09:52:47 -0700|
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.
Return to the
Search the comp.compilers archives again.