I am working on Context Free Grammars and I am stuck into the first step: understanding how Top-Down parsing algorithms are structured.
My problem revolves around top-down parsers. And I have three algorithms that were introduced to me:
- Recursive Descent
- Predictive
- Predictive Recursive Descent
Questions
But do not understand how to relate them. So please answer the following questions:
- Is it true that Recursive Descent is based on backtracking and inefficient?
- Is it true that Predictive parsing is a completely different algorithm from the other two?
- Is it true that Predictive Recursive Descent is a particular kind of recursive descent algorithm but without backtracking?
- Is it true that Predictive algorithms use parse-tables and Recursive Descent do not? Is it true that Predictive Recursive Descent algorithms use a predictive parse table (sort of enhanced parse table)?
Also please answer this question:
- Which algorithm LL parsers use? Predictive, Predictive Recursive Descent or Recursive Descent?
Thank you