Lecture 8
Lecture 8
Lecture 8: Predictive
BITS Pilaniparsers
Hyderabad Campus
Predictive parsing table
T’ T’ → T’ →*FT’ T’ → T’ →
F F->id ε F →(E) ε ε
• Errors
• Terminal at top of stack ≠ terminal on input
• Variable A is top of stack and M[A, a] = no production
• The parser has to “recover” or synchronize itself
• If we just continue: many further senseless errors
• The generated error messages should possibly be
• Exact in meaning
• Exact in place (e.g. line, column)
• Find as many errors as possible in one run
• Avoid propagated errors