Re: power of SLR

Ben Pfaff <>
25 Sep 2001 00:19:33 -0400

          From comp.compilers

Related articles
power of SLR (Thant Tessman) (2001-09-16)
Re: power of SLR (J.H.Jongejan) (2001-09-20)
Re: power of SLR (Thant Tessman) (2001-09-20)
Re: power of SLR (Ben Pfaff) (2001-09-25)
| List of all articles for this month |

From: Ben Pfaff <>
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 <> 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:>

Post a followup to this message

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