Predictive Parsers
A Predictive parser is a recursive descent parser with no backtracking or backup. It is a top-down parser that does not require backtracking.
The choice of the rule to be expanded is made upon the next terminal symbol.
Predictive Parser Algorithm
- For every grammar rule, make a transition Diagram(NFA/DFA)
- Reduce the no of states and optimize the transition diagram.
- To parse a string, stimulate the string on the transition diagram.
- It is parsed if the transition diagram reaches an accept state.
Reference Link