A portable syntactic error recovery scheme for LR(1) parsers

  • Authors:
  • Pyda Srisuresh;Michael J. Eager

  • Affiliations:
  • Advanced Micro Devices, 901 Thompson Place, P.O. Box 3453, M/S 6, Sunnyvale, Ca;Advanced Micro Devices, 901 Thompson Place, P.O. Box 3453, M/S 6, Sunnyvale, Ca

  • Venue:
  • CSC '85 Proceedings of the 1985 ACM thirteenth annual conference on Computer Science
  • Year:
  • 1985

Quantified Score

Hi-index 0.00

Visualization

Abstract

A 4-level language independent error recovery scheme for table driven LR(1) parsers is presented. The first two levels are intended for recovery with appropriate corrections and the next two for simple recovery without corrections. The objective is to do the recovery without affecting the semantics or data structure of the compiler while at the same time producing necessary diagnostics and terminating gracefully. The scheme is a significant improvement and a step forward in the direction of language independent error recovery and is made portable when combined with any of the existing LR(1) parser generators. It is currently implemented as an integral part of the YACC parser generator in an ongoing project at Advanced Micro Devices.