An Approach to Automating Syntax Error Detection Recovery, and Correction for LR (k) Grammars.

Abstract

An automatic, language-independent syntax error detection, recovery, and correction system for LR(k) grammars is proposed. The requirement is made that the reverse of the grammar involved is also LT(k). The implications and justification for this requirement are discussed. Given that the grammar is both LR(k) and RL(k), forward and reverse papers localize errors and define left and right error contex providing a strong base from which error analysis may proceed. Possible deterministic and heuristic corrective actions to follow analysis are presented. The definition and selection of keys from the set of terminal symbols for the grammar which enable the reverse parser to be engaged upon error detection are discussed. A model of the proposed system, implemented in an XPL compiler for a large ALGOL-like grammar, is described and the results of test program examples are discussed. Possible extensions to the system are presented and areas requiring further analysis are defined. (Author)

Document Details

Document Type
Technical Report
Publication Date
Jun 01, 1972
Accession Number
AD0747076

Entities

People

  • Gordon T. Mcgruther

Organizations

  • Naval Postgraduate School

Tags

DTIC Thesaurus Topics

  • Automatic
  • Compilers
  • Detection
  • Error Analysis
  • Errors
  • Grammars
  • Language
  • Linguistics
  • Recovery
  • Social Sciences
  • Terminals

Readers

  • Computer Programming and Software Development.
  • Software Engineering.
  • Speech Processing/Speech Recognition.