Practical syntactic error recovery in compilers

  • Authors:
  • Susan L. Graham;Steven P. Rhodes

  • Affiliations:
  • University of California, Berkeley;University of California, Berkeley and Bell Laboratories, Greensboro, North Carolina

  • Venue:
  • POPL '73 Proceedings of the 1st annual ACM SIGACT-SIGPLAN symposium on Principles of programming languages
  • Year:
  • 1973

Quantified Score

Hi-index 0.03

Visualization

Abstract

A substantial portion of any programmer's time is spent in debugging. One of the major services of any compiler ought to be to provide as much information as possible about compile-time errors in order to minimize the time required for debugging. A good error detection and recovery scheme should maximize the number of errors detected but minimize the number of times it reports an error when there is none. These spurious error detections and their associated error messages are usually engendered by an inappropriate recovery action.In this paper we describe a recovery scheme for syntax errors which provides high quality recovery with good diagnostic information at relatively low cost. In addition, implementation of the recovery scheme can be automated - that is, the recovery routine can be created by a parser-generator. Therefore, the compiler designer need not be burdened with the difficulties of error recovery and the programming effort necessary to design and debug a myriad of ad hoc recovery routines.