A practical method for LR and LL syntactic error diagnosis and recovery

This paper presents a powerful, practical, and essentially language-independent syntactic error diagnosis and recovery method that is applicable within the frameworks of LR and LL parsing. The method generally issues accurate diagnoses even where multiple errors occur within close proximity, yet seldom issues spurious error messages. It employs a new technique, parse action deferral, that allows the most appropriate recovery in cases where this would ordinarily be precluded by late detection of the error. The method is practical in that it does not impose substantial space or time overhead on the parsing of correct programs, and in that its time efficiency in processing an error allows for its incorporation in a production compiler. The method is language independent, but it does allow for tuning with respect to particular languages and implementations through the setting of language-specific parameters.

[1]  Charles B. Haley,et al.  Practical LR error recovery , 1979, SIGPLAN '79.

[2]  Frank DeRemer,et al.  A forward move algorithm for LR error recovery , 1978, POPL '78.

[3]  Matthias Felleisen,et al.  The theory and practice of first-class prompts , 1988, POPL '88.

[4]  Stefan Feyock,et al.  Syntax‐directed correction of syntax errors , 1976, Softw. Pract. Exp..

[5]  Juris Hartmanis,et al.  The Programming Language Ada Reference Manual American National Standards Institute, Inc. ANSI/MIL-STD-1815A-1983 , 1983, Lecture Notes in Computer Science.

[6]  Frank DeRemer,et al.  Practical Error Recovery for LR Parsers , 1977 .

[7]  G. David Ripley,et al.  A Statistical Analysis of Syntax Errors , 1978, Comput. Lang..

[8]  G BurkeMichael,et al.  A practical method for LR and LL syntactic error diagnosis and recovery , 1987 .

[9]  Charles N. Fischer,et al.  A forward move algorithm for LL and LR parsers , 1982, SIGPLAN '82.

[10]  Murray Hill,et al.  Yacc: Yet Another Compiler-Compiler , 1978 .

[11]  M. Dennis Mickunas,et al.  Automatic error recovery for LR parsers , 1978, CACM.

[12]  Michael G. Burke,et al.  A practical method for syntactic error diagnosis and recovery , 1982, SIGPLAN '82.

[13]  Alfred V. Aho,et al.  A Minimum Distance Error-Correcting Parser for Context-Free Languages , 1972, SIAM J. Comput..

[14]  George Poonen Error Recovery for LR(k) Parsers , 1977, IFIP Congress.

[15]  Susan L. Graham,et al.  Practical syntactic error recovery , 1975, CACM.