An Approach to Automating Syntax Error Detection Recovery, and Correction for LR (k) Grammars.
NAVAL POSTGRADUATE SCHOOL MONTEREY CALIF
Pagination or Media Count:
An automatic, language-independent syntax error detection, recovery, and correction system for LRk grammars is proposed. The requirement is made that the reverse of the grammar involved is also LTk. The implications and justification for this requirement are discussed. Given that the grammar is both LRk and RLk, 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
- Computer Programming and Software