ACM Home Page
Please provide us with feedback. Feedback
Practical LR error recovery
Full text PdfPdf (805 KB)
Source Symposium on Compiler Construction archive
Proceedings of the 1979 SIGPLAN symposium on Compiler construction table of contents
Denver, Colorado, United States
Pages: 168 - 175  
Year of Publication: 1979
ISBN:0-89791-002-8
Also published in ...
Authors
Susan L. Graham  Computer Science Division, University of California, Berkeley, Berkeley, Ca
Charles B. Haley  Bell Laboratories, Murray Hill, NJ
William N. Joy  Computer Science Division, University of California, Berkeley, Berkeley, Ca
Sponsor
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 9,   Downloads (12 Months): 32,   Citation Count: 16
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/800229.806967
What is a DOI?

ABSTRACT

We present a practical, language independent mechanism for error recovery in LR parsers. The method is easy to implement in existing parser generators. It uses only the normal parse tables and a small amount of symbol cost information. It is possible to use compressed parse tables with the method, as well as other LR augmentations such as precedence and associativity declarations. The method is efficient enough to be used in environments where space and time are at a premium. Our method utilizes a number of previous error recovery ideas: forward moves in the input after detection of errors to incorporate right context, recovery choice based on weighted costs, and the use of special productions to indicate major productions in the grammar for error recovery. The method also makes use of semantic information in choosing between possible recovery actions. We have implemented the method in a production Pascal translator which has been in use for instruction at a number of universities for two years. We report here on measurements of our system on a standard data base of Pascal programs with errors.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
2
3
 
4
James, L. R. A Syntax Directed Error Recovery Method. M. S. Thesis, Tech. Report CSRG-13. Computer Systems Research Group, University of Toronto, May 1972.
 
5
 
6
Johnson, S.C. YACC — Yet Another Compiler Compiler. Bell Laboratories, Murray Hill, 1977.
 
7
Joy, W.N., Graham, S.L., and Haley, C.B. Berkeley Pascal User's Manual Version 1.1. Computer Science Division, University of California at Berkeley, April 1979.
8
 
9
Modry, J.A. Syntactic Error Recovery for LR Parsers. M.S. Thesis, Univ. Illinois, 1976.
10
11
 
12
Rhodes, S. P. Practical Syntactic Error Recovery for Programming Languages. Ph. D. Dissertation. Tech. Report #15. Computer Science Division, University of California, Berkeley. June, 1973.
 
13
Ripley, G. David and Druseikis, Frederick C. A Statistical Analysis of Syntax Errors. Journal of Computer Languages, 3, 1978.
 
14

CITED BY  16

Collaborative Colleagues:
Susan L. Graham: colleagues
Charles B. Haley: colleagues
William N. Joy: colleagues