Re: power of SLR

Thant Tessman <>
20 Sep 2001 00:27:51 -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: Thant Tessman <>
Newsgroups: comp.compilers
Date: 20 Sep 2001 00:27:51 -0400
Organization: XMission
References: 01-09-059
Keywords: parse
Posted-Date: 20 Sep 2001 00:27:51 EDT

I asked:

[...typical pedagogical grammar example...]

> 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).

I deliberately modified my follow algorithm to get it to include the '*'
token (which I really thought was supposed to be there). Removing the
modification seems to have fixed my parser generator. Still a little
fuzzy on the issue.


Post a followup to this message

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