Concept Flow - Predictive parsing
Start: Input string
Initialize stack with start symbol
Read next input token
Check top of stack
If terminal
Match with input token?
Error: Mismatch
If non-terminal
Use parsing table to find production
Production found?
Yes
Replace non-terminal with production RHS
Error: No rule
Stack empty and input consumed?
Yes
Accept
No
Error
Predictive parsing reads input tokens and uses a stack and parsing table to decide which grammar rules to apply, matching input step-by-step until the input is accepted or an error occurs.
