Related articles |
---|
power of SLR thant@acm.org (Thant Tessman) (2001-09-16) |
Re: power of SLR jjan@cs.rug.nl (J.H.Jongejan) (2001-09-20) |
Re: power of SLR thant@acm.org (Thant Tessman) (2001-09-20) |
Re: power of SLR blp@stanford.edu (Ben Pfaff) (2001-09-25) |
From: | Ben Pfaff <blp@stanford.edu> |
Newsgroups: | comp.compilers |
Date: | 25 Sep 2001 00:19:33 -0400 |
Organization: | Michigan State University |
References: | 01-09-059 01-09-082 |
Keywords: | parse |
Posted-Date: | 25 Sep 2001 00:19:33 EDT |
Thant Tessman <thant@acm.org> writes:
> > Is SLR really that weak? or do I have a bug in my implementation?
>
> I was kindly informed that the grammar was indeed SLR. Upon further
> investigation, it seems that there was a bug in the 'follow'
> function--or rather, there is something I don't understand about what it
> is supposed to do. The '*' token was included in my version of
> 'follow(E)' when according to the example 4.38 of Aho,Sethi,Ullman, it
> should only include ')', '+', and '$' (end of input).
If you want to look at another SLR implementation, one that's a
literal implementation of the Red Dragon book's algorithm, grab
slr.c from libavl:
ftp://cscw.msu.edu/blp/avl-2001.08.15.tar.gz
Perhaps this will help you to see the bug in your version.
--
"It takes a certain amount of shamelessness
to be a monomaniac billionaire dwarf."
--Jon Katz <URL:http://slashdot.org/articles/99/03/17/1634238.shtml>
Return to the
comp.compilers page.
Search the
comp.compilers archives again.