|power of SLR firstname.lastname@example.org (Thant Tessman) (2001-09-16)|
|Re: power of SLR email@example.com (J.H.Jongejan) (2001-09-20)|
|Re: power of SLR firstname.lastname@example.org (Thant Tessman) (2001-09-20)|
|Re: power of SLR email@example.com (Ben Pfaff) (2001-09-25)|
|From:||Ben Pfaff <firstname.lastname@example.org>|
|Date:||25 Sep 2001 00:19:33 -0400|
|Organization:||Michigan State University|
|Posted-Date:||25 Sep 2001 00:19:33 EDT|
Thant Tessman <email@example.com> 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:
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
Search the comp.compilers archives again.