edited by
6,336 views

3 Answers

Best answer
6 votes
6 votes

 A recursive descent parser is a kind of top-down parser built from a set of mutually recursive procedures (or a non-recursive equivalent) where each such procedure usually implements one of the productions of the grammar.

It is said so because it's clear that recursive descent parser will go into infinite loop if the non-terminal keeps on expanding into itself.

Similarly, talking about a recursive descent parser,even with backtracking---When we try to expand a non-terminal, we may eventually find ourselves again trying to expand the same non-terminal without having consumed any input.

A-> Ab

Here,while expanding the non-terminal A can be kept on expanding into

A-> AAb -> AAAb -> ... -> infinite loop of A.

Hence, we prevent left-recursive productions while working with recursive-descent parsers.

selected by
2 votes
2 votes
Ansswer will be a And Left Recursive is a problem for Top down and not for Bottom up parser . So it can be used for parsing :)

Related questions

1 votes
1 votes
1 answer
1
2 votes
2 votes
3 answers
3
2 votes
2 votes
2 answers
4
Subhrangsu asked Apr 16, 2022
9,479 views
Is the following grammar LL(1) ?S→ aABbCD | ϵA→ ASd | ϵB→ Sac| hC | ϵC→ Sf |CgD→ aBD | ϵDraw the LL(1) parsing table for the given grammar.