Once the parser makes the list of legitimate tokens available to the error recovery routine then this routine can decide whether a remaining input’s prefix matches one of these tokens closely enough to be treated as that token. This helps the lexical analyzer.