Error repair with validation in LR-based parsing

  • Authors:
  • Ik-Soon Kim;Kwang-Moo Choe

  • Affiliations:
  • Korea Advanced Institute of Science and Technology, Korea;Korea Advanced Institute of Science and Technology, Korea

  • Venue:
  • ACM Transactions on Programming Languages and Systems (TOPLAS)
  • Year:
  • 2001

Quantified Score

Hi-index 0.00

Visualization

Abstract

When the compiler encounters an error symbol in an erroneous input, the local error-repair method repairs the input by either inserting a repair string before the error symbol or deleting the error symbol. Although the extended FMQ of Fischer et al. and the method of McKenzie et al. report the improved quality of diagnostic messages, they suffer from redundant parse stack configurations.This article proposes an efficient LR error-recovery method, with validation-removing repairs that give the same validation result as a previously considered, lower-cost repair. Moreover, its execution speed is proportional to the length of the stack configuration. The algorithm is implemented on a Bison, GNU LALR(1), parser generating system. Experimental results are presented.