Recursive Descent Parsing is the top-down parsing technique.
Top-down parsers start from the root node (For example, with a start symbol S) and match the input string with the production rules to replace them. To understand it in an easy way, Suppose we have a CFG.
S → mXn | mZn
X → pq | sq
Z → qr
Suppose we want to read a string of “msqn” from the give CFG. Figure shows how Recursive Descent Parsing works with Backtracking if the machine does not read the correct alphabet.
In predictive parsing, the compiler does not require any back-tracking.
- How Students Can Pick a Good Custom-Paper Writing Service? - March 5, 2021
- List of Public service commissions - August 31, 2020
- Comparison of fee structure of Pakistani Universities - June 1, 2020