|FOLLOW amd FIRST functions in LLTop-down Parsing email@example.com (2003-08-23)|
|Re: FOLLOW amd FIRST functions in LL Top-down Parsing firstname.lastname@example.org (2003-09-04)|
|From:||email@example.com (Samuel Thomas)|
|Date:||23 Aug 2003 23:06:32 -0400|
|Posted-Date:||23 Aug 2003 23:06:32 EDT|
I am trying to understand the various top down parsing schemes. The LL
parsing method creates the parsing table for a grammar using 2
functions - FOLLOW and FIRST. I only have a superficial understand of
the subject and would be very grateful if somebody could help me.
1. Why do we need the FOLLOW function? If I fully left factorize and
remove left recursion wouldn't the FIRST fucntion help me decide which
production to use? What does the FOLLOW function try to get?
2. One of the rules of FOLLOW says, "If there is a production
A-->alpha B beta where beta = episilon or episilon member of
FIRST(beta), then everything on FOLLOW(A) is in FOLLOW(B)". Can some
one tell me why this is needed or why this works etc? I am totally
confused of what this does.
Thanks for all the help,
Return to the
Search the comp.compilers archives again.