1,153 views
0 votes
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))!! 

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 votes
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. 

Related questions

1 votes
1 votes
2 answers
1
gari asked Nov 19, 2017
2,912 views
Are recursive descent parsers with backtracking or without?
1 votes
1 votes
4 answers
2
Rahul_Rathod_ asked Jan 21, 2019
3,508 views
grammar is CLR(1) or not?if yes then how?
2 votes
2 votes
0 answers
3
Na462 asked Jan 19, 2019
879 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...
1 votes
1 votes
1 answer
4
baghel263 asked Jan 17, 2019
984 views
does augmented production causes conflicts