ACM Home Page
Please provide us with feedback. Feedback
A practical method for syntactic error diagnosis and recovery
Full text PdfPdf (889 KB)
Source Symposium on Compiler Construction archive
Proceedings of the 1982 SIGPLAN symposium on Compiler construction table of contents
Boston, Massachusetts, United States
Pages: 67 - 78  
Year of Publication: 1982
ISBN:0-89791-074-5
Also published in ...
Authors
Michael Burke  Courant Institute, New York University, 251 Mercer Street, New York, New York
Gerald A. Fisher, Jr.  Courant Institute, New York University, 251 Mercer Street, New York, New York
Sponsor
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 1,   Downloads (12 Months): 21,   Citation Count: 5
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/800230.806981
What is a DOI?

ABSTRACT

Our goal is to develop a practical syntactic error recovery method applicable within the general framework of viable prefix parsing. Our method represents an attempt to accurately diagnose and report all syntax errors without reporting errors that are not actually present. Successful recovery depends upon accurate diagnosis of errors together with sensible “correction” or alteration of the text to put the parse back on track. The issuing of accurate and helpful diagnostics is achieved by indicating the nature of the recovery made for each error encountered. The error recovery is prior to and independent of any semantic analysis of the program. However, the method does not exclude the invocation of semantic actions while parsing or preclude the use of semantic information for error recovery. The method assumes a framework in which an LR or LL parser, driven by the tables produced by a parser generator, maintains an input symbol buffer, state or prediction stack, and parse stack. The input symbol buffer contains part or all of the sequence of remaining input tokens, including the current token. The LR state stack is analogous to the LL prediction stack; except when restricting our attention to the LL case, prediction stack shall serve as a generic term indicating the LR state or LL prediction stack. The parse stack contains the symbols of the right hand sides that have not yet been reduced.


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
Feyock, S., Lazurus, P., "Syntax-directed Correction of Syntax Errors", Software Practice and Experience, Vol. 6, 1976.
2
3
 
4
Johnson, S.C., YACC - Yet Another Compiler Compiler. Bell Laboratories, Murray Hill, 1977.
 
5
Poonen, G., "Error Recovery For LR(k) Parsers", Information Processing, August 1977.
6
 
7
Ripley, G.D., Druseikis, F.C., "A Statistical Analysis of Syntax Errors", Journal of Computer Languages, Vol. 3, 1978.


Collaborative Colleagues:
Michael Burke: colleagues
Gerald A. Fisher, Jr.: colleagues