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.
Similar content being viewed by others
References
Conway, M. E.: Design of a separable transition diagram compiler. Comm. ACM 6, 396–408 (1963)
Conway, R. W., Maxwell, W. L.: CORC, the Cornell computing language. Comm. ACM 6, 317–321 (1963)
Conway, R. W., Wilcox, T. R.: Design and implementation of a diagnostic compiler PL/1. Comm. ACM 16, 169–179 (1973)
Conway, R. W. et al.: PL/C. A high performance subset of PL/1. Cornell University, Department of Computer Science, TR 70-55, 1970
DeRemer, F. L.: Simple LR(k) grammars. Comm. ACM 14, 453–460 (1971)
Earley, J.: An efficient context-free parsing algorithm. Comm. ACM 13, 94–102 (1970)
Feldman, J., Gries, D.: Translator writing systems. Comm. ACM 11, 77–113 (1968)
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
Gries, D.: Compiler construction for digital computers. New York-London: J. Wíley and Sons 1971
Hamming, R. W.: Error-detecting and error-correcting codes. Bell System Technical Journal 29, 147–160 (1950)
Hopcroft, J. E., Ullman, J. D.: An approach to a unified theory of automata. Bell System Technical Journal 46, 1793–1829 (1967)
Hopcroft, J. E., Ullman, J. D.: Formal languages and their relation to automata. Reading (Mass.): Addison-Wesley 1969
Lévy, J.-P.: Automatic correction of syntax errors in programming languages. Cornell University, Department of Computer Science, Ph. D. thesis, December 1971
Lyon, G.: Syntax-directed least error analysis for context-free languages: A practical approach. Comm. ACM 17, 3–14 (1974)
Morgan, H. L.: Spelling correction in system programs. Comm. ACM 13, 90–94 (1970)
Tixer, V.: Recursive functions of regular expressions in language analysis. Stanford University, Department of Computer Science, Technical Report CS 58, March 1967
Wagner, R.: Order-n correction for regular languages. Comm. ACM 17, 265–268 (1974)
Walker, R. J.: An instruction manual for CUPL. Cornell University, Department of Computer Science, July 1967
Wilcox, T. R.: Generating machine code for high level programming languages. Cornell University, Department of Computer Science, Ph. D. thesis, September 1971
Author information
Authors and Affiliations
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
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
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF00288730