Skip to main content
Log in

Automatic correction of syntax-errors in programming languages

  • Published:
Acta Informatica Aims and scope Submit manuscript

Summary

A formal model for automatic error-correction is presented. It considers clusters of errors, using a local context to determine the corrections. The process can be embedded in left-to-right recognizers. The recognizer is used for standard syntax checking. When an error is detected, an error correction mechanism is activated which, by a limited backward then forward move, determines the possible corrections. An important aspect of this process is that it does not slow down the parsing of correct programs.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Conway, M. E.: Design of a separable transition diagram compiler. Comm. ACM 6, 396–408 (1963)

    Google Scholar 

  2. Conway, R. W., Maxwell, W. L.: CORC, the Cornell computing language. Comm. ACM 6, 317–321 (1963)

    Google Scholar 

  3. Conway, R. W., Wilcox, T. R.: Design and implementation of a diagnostic compiler PL/1. Comm. ACM 16, 169–179 (1973)

    Google Scholar 

  4. Conway, R. W. et al.: PL/C. A high performance subset of PL/1. Cornell University, Department of Computer Science, TR 70-55, 1970

  5. DeRemer, F. L.: Simple LR(k) grammars. Comm. ACM 14, 453–460 (1971)

    Google Scholar 

  6. Earley, J.: An efficient context-free parsing algorithm. Comm. ACM 13, 94–102 (1970)

    Google Scholar 

  7. Feldman, J., Gries, D.: Translator writing systems. Comm. ACM 11, 77–113 (1968)

    Google Scholar 

  8. Ginsburg, S., Greibach, S., Hopcroft, J. E.: Studies in Abstract Families of Languages. Memoirs of the American Mathematical Society, No. 87, Providence (R.I.): American Mathematical Society 1969

    Google Scholar 

  9. Gries, D.: Compiler construction for digital computers. New York-London: J. Wíley and Sons 1971

    Google Scholar 

  10. Hamming, R. W.: Error-detecting and error-correcting codes. Bell System Technical Journal 29, 147–160 (1950)

    Google Scholar 

  11. Hopcroft, J. E., Ullman, J. D.: An approach to a unified theory of automata. Bell System Technical Journal 46, 1793–1829 (1967)

    Google Scholar 

  12. Hopcroft, J. E., Ullman, J. D.: Formal languages and their relation to automata. Reading (Mass.): Addison-Wesley 1969

    Google Scholar 

  13. Lévy, J.-P.: Automatic correction of syntax errors in programming languages. Cornell University, Department of Computer Science, Ph. D. thesis, December 1971

  14. Lyon, G.: Syntax-directed least error analysis for context-free languages: A practical approach. Comm. ACM 17, 3–14 (1974)

    Google Scholar 

  15. Morgan, H. L.: Spelling correction in system programs. Comm. ACM 13, 90–94 (1970)

    Google Scholar 

  16. Tixer, V.: Recursive functions of regular expressions in language analysis. Stanford University, Department of Computer Science, Technical Report CS 58, March 1967

  17. Wagner, R.: Order-n correction for regular languages. Comm. ACM 17, 265–268 (1974)

    Google Scholar 

  18. Walker, R. J.: An instruction manual for CUPL. Cornell University, Department of Computer Science, July 1967

  19. Wilcox, T. R.: Generating machine code for high level programming languages. Cornell University, Department of Computer Science, Ph. D. thesis, September 1971

Download references

Author information

Authors and Affiliations

Authors

Additional information

Work done mainly at Cornell University, Department of Computer Science, Ithaca NY 14850. Partially supported by the National Science Foundation under grant GJ-28176.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Lévy, J.P. Automatic correction of syntax-errors in programming languages. Acta Informatica 4, 271–292 (1975). https://doi.org/10.1007/BF00288730

Download citation

  • Received:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF00288730

Keywords

Navigation