Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article
Free access

Automatic error recovery for LR parsers

Published: 01 June 1978 Publication History

Abstract

In this paper we present a scheme for detecting and recovering from syntax errors in programs. The scheme, which is based on LR parsing, is driven by information which is directly and automatically obtainable from the information that is already present in an LR parser. The approach, which is patterned after that of Levy and Graham and Rhodes, appears to provide error recovery which is both simple and powerful.

References

[1]
Aho, A.V., and Johnson, S.C. LR parsing. Computing Surveys 6, 2 (June 1974), 99-124.
[2]
Aho, A.V., and Ullman, .I.D. The Theory of Parsing Translation and Compiling, Vol. 1: Parsing. Prentice-Hall, Englewood Cliffs, N.J., 1972.
[3]
DeRemer, F.L. Simple LR(k) Grammars. Comm. ACM 14, 7 (July 1971), 453--460.
[4]
Graham, S.L., and Rhodes, S.P. Practical syntactic error recovery in compilers. Conf Rec. ACM Symp. on the Principles of Programming Languages, Boston, Mass., Oct. 1973, pp. 53-58.
[5]
Graham, S.L., and Rhodes, S.P. Practical syntactic error recovery. Comm. ACM 18, (Nov. 1975), 639-650.
[6]
Irons, E.T. An error-correcting parse algorithm. Comm. A CM 6, 11 (Nov. 1963), 660-673.
[7]
James, L.R. A syntax directed error recovery method. Master's Th., Tech. Rep. CSRG-13, Comptr. Syst. Res. Group, U. of Toronto, Toronto, Ont., Canada, May 1972.
[8]
Joliat, M.L. On the reduced matrix representation of LR(k) parser tables. Ph.D. Th. Tech. Rep. CSRG-28, Comptr. Syst. Res. Group, U. of Toronto, Toronto, Ont., Canada, Oct. 1973.
[9]
Knuth, D.E. On the translation of languages from left to right. Inform. and Control 8 (1965), 607-639.
[10]
LaFrance, J.E. Syntax-directed error recovery for compilers. Ph.D. Th. ILLIAC IV Doc. No. 249, Dept. Comptr. Sci., U. of Illinois, Urbana, Ill., 1971.
[11]
Leinius, R. Error detection and recovery for syntax directed compiler systems. Ph.D. Th., Comptr. Sci. Dept., U. of Wisconsin, Madison, Wis., 1970.
[12]
Levy, J.P. Automatic correction of syntax errors in programming languages. Ph.D. Th., Tech. Rep. TR71-116, Comptr. Sci. Dept., Cornell U., Ithaca, N.Y., 1971.
[13]
Modry,I.A. Syntactic error recovery for LR parsers. Master's Th. UIUCDCS-R-76-388, Dept. Comptr. Sci., U. of Illinois, Urbana, I11., 1976.
[14]
Partridge, D. Heuristic methods in the analysis of program statements. Ph.D. Th., Dept. of Comptng. and Control, U. of London, London, England, Aug. 1972.
[15]
Rhodes S.P. Practical syntactic error recovery for programming languages. Ph.D. Th., Tech. Rep. No. 15, Comptr. Sci. Dept., U. of California, Berkeley, Calif., June 1973.
[16]
Szymanski, T.G., and Williams, J.H. Non-canonical parsing. Proc. 14th Annual Symp. on Switching and Automata Theory, Oct. 1973, pp. 122-129.
[17]
Tindall, M.H. An Interactive Compile-Time Diagnostic System, Ph.D. Thesis, UIUCDCS-R-75-748, Dept. Comptr. Sci., U. of Illinois, Urbana, IU., Oct. 1975.
[18]
Wirth, N., and Weber, H. EULER, A generalization of ALGOL, and its formal definition, Pt I., Comm. ACM 9, 1 (Jan. 1966), 13-23; Pt II, 9, 2 (Feb. 1966), 89-99.

Cited By

View all
  • (2002)Repairing syntax errors in LR parsersACM Transactions on Programming Languages and Systems10.1145/586088.58609224:6(698-710)Online publication date: 1-Nov-2002
  • (2002)Improvement of the LR parsing table and its application to grammatical error correctionInformation Sciences: an International Journal10.1016/S0020-0255(02)00272-4148:1-4(11-26)Online publication date: 1-Dec-2002
  • (1998)Automatic error recovery in the natural language interfaceSMC'98 Conference Proceedings. 1998 IEEE International Conference on Systems, Man, and Cybernetics (Cat. No.98CH36218)10.1109/ICSMC.1998.728071(1353-1358)Online publication date: 1998
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Communications of the ACM
Communications of the ACM  Volume 21, Issue 6
June 1978
75 pages
ISSN:0001-0782
EISSN:1557-7317
DOI:10.1145/359511
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 June 1978
Published in CACM Volume 21, Issue 6

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. LR
  2. automatic correction
  3. compilers
  4. error correction
  5. parsing
  6. programming languages
  7. syntax errors

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)86
  • Downloads (Last 6 weeks)15
Reflects downloads up to 04 Oct 2024

Other Metrics

Citations

Cited By

View all

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Full Access

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media