We present a method for recovering for syntax errors encountered durin
g parsing. The method provides a form of minimum distance repair, has
linear time complexity, and is completely automatic. A formal method i
s presented for evaluating the performance of error recovery methods,
based on global minimum-distance error correction. The minimum-distanc
e error recovery method achieves a theoretically best performance on 8
0% of Pascal programs in the weighted Ripley-Druseikis collection. Com
parisons of performance with other error recovery methods are given.