Error-Recovery Strategies

The simplest approach is for the parser to quit with an informative error message when it detects the first error. Additional errors are often uncovered if the parser can restore itself to a state where processing of the input can continue with reasonable hopes that the further processing will provide meaningful diagnostic information. If errors increase, it is better for the compiler to give up after exceeding some error limit.

0 comments