An error-correcting parse algorithm

  • Authors:
  • E. T. Irons

  • Affiliations:
  • Institute for Defense Analysis, Princeton, NJ

  • Venue:
  • Communications of the ACM
  • Year:
  • 1963

Quantified Score

Hi-index 48.40

Visualization

Abstract

During the past few years, research into so-called “Syntax Directed Compiler” and “Compiler Compiler” techniques [1, 2, 3, 4, 5, 6] has given hope that constructing computer programs for translating formal languages may not be as formidable a task as it once was. However, the glow of the researchers' glee has obscured to a certain extent some very perplexing problems in constructing practical translators for common programming languages. The automatic parsing algorithms indeed simplify compiler construction but contribute little to the production of “optimized” machine code, for example. An equally perplexing problem for many of these parsing algorithms has been what to do about syntactically incorrect object strings. It is common knowledge that most of the ALGOL or FORTRAN “programs” which a compiler sees are syntactically incorrect. All of the parsing algorithms detect the existence of such errors. Many have considerable difficulty pinpointing the location of the error, printing out diagnostic information, and recovering enough to move on to other correct parts of the object string. It is the author's opinion that those algorithms which do the best job of error recovery are those which are restricted to simpler forms of formal languages.