Skip to main content

Syntax-Error Recovery in LR-parsers

  • Conference paper
Programmiersprachen

Part of the book series: Informatik-Fachberichte ((INFORMATIK,volume 1))

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Aho A. V., Ullman J. D., The Theory of Parsing, Translation and Compiling, Volume I, Parsing, Englewood Cliffs, N.J. 1972

    Google Scholar 

  2. Gries D., Compiler Construction for Digital Computers, New York, N.Y,. 1971

    Google Scholar 

  3. Peterson T. G., Syntax Error Detection, Correction and Recovery in Parsers, Ph.D. Thesis 1972, Stevens Inst. of Tech., Hoboken, N.J. 1972

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics