1,555 views
0 0 votes

Does RDP require back tracking ?

I am asking this because I have read that if RDP doesn't require back tracking then it is a predictive parser(LL(1))!! 

A predictive parser is a recursive descent parser that does not require backtracking. Predictive parsing is possible only for the class of LL(k) grammars 

(  https://en.wikipedia.org/wiki/Recursive_descent_parser  )

Does it mean that the RDP requires BT

1 Answer

2 2 votes

Recursive Descent Parser can have backtracking. It is the most primitive level top down approach of parsing. It usually does backtracking and applies brute force to evaluate the grammar. Moreover, we have something called Predictive Parser, which is a more sophisticated way of using top down parsing approach, which doesn't need backtracking. LL(1) is one of the kind of predictive parser.

Image Source :- The Dragon Book. 

Position:
Show:

Related questions

0 0 votes
1 1 answer
521
521 views
gopal_gate asked May 24, 2025
521 views
Consider the following grammar. Note that the grammar is not left recursive, and so it is suitable for the recursive descent parsing. Also, you should know that the gramm...
1 1 vote
2 2 answers
4.0k
4.0k views
gari asked Nov 19, 2017
4,038 views
Are recursive descent parsers with backtracking or without?
1 1 vote
4 answers 4 answers
4.8k
4.8k views
Rahul_Rathod_ asked Jan 21, 2019
4,836 views
grammar is CLR(1) or not?if yes then how?
2 2 votes
0 0 answers
1.7k
1.7k views
Na462 asked Jan 19, 2019
1,730 views
Which one of the following is true about LALR(1) Parser ?It can resolve SR Conflict in favor of reducedIt can resolve SR Conflict in favor of ShiftIt can resolve RR Confl...