Re: predictive parsing and non-recursive predictive parsing

kamal <kamalpr@hp.com>
Tue, 24 Jun 2008 00:49:04 -0700 (PDT)

          From comp.compilers

Related articles
predictive parsing and non-recursive predictive parsing unix.sh@gmail.com (2008-06-23)
Re: predictive parsing and non-recursive predictive parsing kamalpr@hp.com (kamal) (2008-06-24)
Re: predictive parsing and non-recursive predictive parsing torbenm@pc-003.diku.dk (2008-06-24)
Re: predictive parsing and non-recursive predictive parsing max@gustavus.edu (Max Hailperin) (2008-06-24)
Re: predictive parsing and non-recursive predictive parsing james.harris.1@googlemail.com (James Harris) (2008-06-24)
Re: predictive parsing and non-recursive predictive parsing max@gustavus.edu (2008-06-24)
Re: predictive parsing and non-recursive predictive parsing gene.ressler@gmail.com (Gene) (2008-06-25)
Re: predictive parsing and non-recursive predictive parsing unix.sh@gmail.com (2008-06-25)
[9 later articles]
| List of all articles for this month |

From: kamal <kamalpr@hp.com>
Newsgroups: comp.compilers
Date: Tue, 24 Jun 2008 00:49:04 -0700 (PDT)
Organization: Compilers Central
References: 08-06-053
Keywords: parse, LL(1)
Posted-Date: 24 Jun 2008 21:25:28 EDT

On Jun 24, 6:56 am, unix...@gmail.com wrote:
> Hi,
>
> I have one question regarding the difference between those two:
>
> I can use recursive predictive parsing, which is very straightforward.
> So what's the advantage of non-recursive predictive parsing. To


more parsing power.


> perform non-recursive parsing, I need to construct FIRST, FOLLOW sets
> and use explicit stack. On the other hand, recursive predictive
> parsing is very easy to understand. I understand non-recursive calls


Parsing algorithms are not constructed with ease of use in mind.


> have a better performance than recursive one. Is this the only reason?
>


Recursive (descent) parsing is leftmost. You have the follow set in
non-recursive parsing to figure out what *can* follow, and so opt to
reduce by a different rule than the leftmost reduction. It helps in
overcoming ambiguities that RDP have.


regards
-kamal


Post a followup to this message

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