Related articles |
---|
FOLLOW amd FIRST functions in LLTop-down Parsing samuel@avenir.net (2003-08-23) |
Re: FOLLOW amd FIRST functions in LL Top-down Parsing kamalp@acm.org (2003-09-04) |
From: | samuel@avenir.net (Samuel Thomas) |
Newsgroups: | comp.compilers |
Date: | 23 Aug 2003 23:06:32 -0400 |
Organization: | http://groups.google.com/ |
Keywords: | parse, LL(1) |
Posted-Date: | 23 Aug 2003 23:06:32 EDT |
Hello,
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,
Warm Regards
Samuel.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.