Computing Follow set

pavan <pavan.mail@gmail.com>
Thu, 6 Mar 2008 16:30:56 -0800 (PST)

          From comp.compilers

Related articles
Computing Follow set pavan.mail@gmail.com (pavan) (2008-03-06)
Re: Computing Follow set rsc@swtch.com (Russ Cox) (2008-03-06)
Re: Computing Follow set torbenm@app-2.diku.dk (2008-03-07)
Re: Computing Follow set max@gustavus.edu (Max Hailperin) (2008-03-07)
Re: Computing Follow set haberg_20080207@math.su.se (Hans Aberg) (2008-03-08)
| List of all articles for this month |
From: pavan <pavan.mail@gmail.com>
Newsgroups: comp.compilers
Date: Thu, 6 Mar 2008 16:30:56 -0800 (PST)
Organization: Compilers Central
Keywords: LR(1), question
Posted-Date: 06 Mar 2008 20:45:49 EST

I have a question regarding the computation of FOLLOW sets.
Consider the following grammar:


A -> aB | a
B -> bA | b


From the production A -> aB, we have FOLLOW(B) contains FOLLOW(A).
From the production B -> bA, we have FOLLOW(A) contains FOLLOW(B).


This ends up being an infinite loop when I code it. I would appreciate
your suggestions on this.


Thank you.



Post a followup to this message

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