First and Follow sets

"Jan Schulze" <csuhu@csv.warwick.ac.uk>
20 May 2000 13:21:09 -0400

          From comp.compilers

Related articles
First and Follow sets csuhu@csv.warwick.ac.uk (Jan Schulze) (2000-05-20)
Re: First and Follow sets rsherry@home.com (Robert Sherry) (2000-05-21)
Re: First and Follow sets johnston.p@worldnet.att.net (Paul Johnston) (2000-05-21)
Re: First and Follow sets hybrid@dol.ru (Hybrid) (2000-05-21)
Re: First and Follow sets tmoog@polhode.com (Tom Moog) (2000-05-22)
Re: First and Follow sets pfaffben@msu.edu (Ben Pfaff) (2000-05-24)
Re: First and Follow sets p.terry@ru.ac.za (Pat Terry) (2000-05-28)
| List of all articles for this month |
From: "Jan Schulze" <csuhu@csv.warwick.ac.uk>
Newsgroups: comp.compilers
Date: 20 May 2000 13:21:09 -0400
Organization: University of Warwick, UK
Keywords: parse

Hi.


I am studying an introductory compiler design course at university. I
understand most of the concepts pretty well but seem to make many mistakes
when solving easy problems (the harder ones are usually solved correctly
.... that's me :-) ). Anyway, I was wondering if anyone could explain the
construction of First and Follow sets to me, for example for the following
grammar:


E ::= TE'
E' ::= +TE' | e
T ::= FT'
T' ::= *FT' | e
F ::= (E) | id


where E, E', T, T', F are nonterminals
(, ), *, +, id are terminals
and 'e' is the empty (epsilon) transition


I have acces to the guidelines in "Compilers - Principles, Techniques, and
Tools" (by Aho, Sethi and Ullman), but I semm to struggle with their
explanation.


Any help would be greatly appreciated.


Thanks in advance,


Jan


Post a followup to this message

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