 Repair of syntax errors is easiest to do consistently in parsers (like LR) that have parse tables and an explicit data stack.The LR parser generator decides what should happen for each combination of parser state and lookahead symbol.These decisions are usually turned into read-only data tables that drive a generic parser loop that is grammar- and state-independent.