First And Follow

"Mr.E" <mr.waverlye@verizon.net>
Mon, 23 Jun 2008 12:39:31 -0700 (PDT)

          From comp.compilers

Related articles
First And Follow mr.waverlye@verizon.net (Mr.E) (2008-06-23)
Re: First And Follow cppljevans@suddenlink.net (Larry Evans) (2008-06-23)
Re: First And Follow max@gustavus.edu (Max Hailperin) (2008-06-24)
Re: First And Follow max@gustavus.edu (Max Hailperin) (2008-06-24)
Re: First And Follow paul@paulbmann.com (Paul B Mann) (2008-06-25)
Re: First And Follow mr.waverlye@verizon.net (Mr.E) (2008-06-27)
| List of all articles for this month |
From: "Mr.E" <mr.waverlye@verizon.net>
Newsgroups: comp.compilers
Date: Mon, 23 Jun 2008 12:39:31 -0700 (PDT)
Organization: Compilers Central
Keywords: parse, question
Posted-Date: 23 Jun 2008 21:58:30 EDT

Can a first and follow set be derived from a tree?


As many texts as I've read on the subject I've been unable to create
first and follow sets. I unfortunately don't understand the math
(though I got an A in discrete mathematics) or maybe I just cant
understand all the symbols or think abstractly enough. In either case
I've met with repeated failure attempting to obtain a first and follow
from a grammar. I had an idea the other day which I thought may
work. I wondered is it possible to derive the first and follow sets
of a grammar by building a tree (or graphs) of the grammar. I was
thinking that maybe if I did a first depth search through a tree that
I could pull this off. After further contemplation I wasn't sure if I
could identify the follow set or possible recursions (I think they are
referred to as cycles?).


I realize I could enter grammar into some programs and they would
output what I desired but I'm still intent on being able to do this,
even if it isn't by a conventional or efficient method, so long as I
can understand it.




Thank you for any guidance you can provide,


W.


Post a followup to this message

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