Abstract
An efficient algorithm for error-recovery in LR-parsers is presented. The algorithm is capable of repairing all syntax errors without backtracking, in time proportional to the stack depth. It needs only a small table, a mapping from the states of the parser into the terminal symbols. The algorithm is very similiar to the parser itself. Thus, it has the same interface, and its correctness can be derived from that of the parser. It requires only trivial changes in the construction of the parse-tree and in the attribute handling during semantical analysis.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Aho A. V., Ullman J. D., The Theory of Parsing, Translation and Compiling, Volume I, Parsing, Englewood Cliffs, N.J. 1972
Gries D., Compiler Construction for Digital Computers, New York, N.Y,. 1971
Peterson T. G., Syntax Error Detection, Correction and Recovery in Parsers, Ph.D. Thesis 1972, Stevens Inst. of Tech., Hoboken, N.J. 1972
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1976 Springer-Verlag Berlin · Heidelberg
About this paper
Cite this paper
Roehrich, J. (1976). Syntax-Error Recovery in LR-parsers. In: Schneider, HJ., Nagl, M. (eds) Programmiersprachen. Informatik-Fachberichte, vol 1. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-66319-2_17
Download citation
DOI: https://doi.org/10.1007/978-3-642-66319-2_17
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-07619-3
Online ISBN: 978-3-642-66319-2
eBook Packages: Springer Book Archive