Repairing syntax errors in LR-based parsers

  • Authors:
  • Carl Cerecke

  • Affiliations:
  • University of Canterbury, Christchurch, New Zealand

  • Venue:
  • ACSC '02 Proceedings of the twenty-fifth Australasian conference on Computer science - Volume 4
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

When a compiler encounters a syntax error, it usually attempts to restart parsing to check the remainder of the input for any further errors. One common method of recovering from syntax errors is to repair the incorrect input string, allowing parsing to continue. This research presents a language independent method for repairing the input string to an LALR(1) parser. The method results in much faster repairs in general than an existing method, enabling some errors to be repaired that were previously too costly. Results are based on repairing syntax errors in Java programs from first year computer science students.