Summary
A syntactic error recovery technique is presented that is simple and at the same time very powerful. It has the main property that it is phrase marker oriented, where phrase markers are considered symbols delimiting language constructions, e.g., begin and end for blocks, (and) for expressions, and [and] for indices. The basic idea of this error recovery technique originates from P. Branquart and has been worked out in the Algol 68 compiler project, see [8] and [9]. Here, we are especially concerned with the generation aspects of error recovery. In particular, it is investigated how error recovery can be mechanised in an ELL(1) and LALR(1) syntax directed translation scheme and which conditions the syntax must satisfy. Both the ELL(1) and LALR(1) generators are implemented and are part of the system LILA: a Language Implementation LAboratory [28, 29, 30]. Only the ELL(1) generator is described here.
Similar content being viewed by others
References
Aho, A.V., Ullman, J.D.: The theory of parsing, translation and compiling. Englewood Cliffs, N.J.: Prentice-Hall 1972
Altman, V.E.: A language implementation system. Massachusetts Institute of Technology, MAC TR-126, 1974
Blaizot, L.: DELTA, système de description de langages et de traducteurs par attributs. Rapport de Recherche n∘ 20, IRIA, Roquencourt, 1973
Bochmann, G.V., Lecarme, O.: Un système d'écriture de compilateurs. Documents de Travail 27, 30, 40, 44, Université de Montreal, 1972
Bochmann, G.V.: Semantic evaluation from left to right. Comm. ACM 19, 55–62 (1973)
Bouckaert, M., Pirotte, M., Snelling, M., Wodon, P., Wybaux, D.: Utilisation des attributs dans un système d'écriture de software. MBLE Research Laboratory Brussels, Report R 230, 1973
Bouckaert, M., Pirotte, M., Snelling, M.: SOFT: a tool for writing software. MBLE Research Laboratory Brussels, Report R212, 1973
Branquart, P., Lewi, J.: A scheme of storage allocation and garbage collection for ALGOL 68. Proceedings of Working Conference on ALGOL 68 Implementation. Amsterdam: North-Holland 1970
Branquart, P., Cardinael, J.P., Lewi, J., Delescaille, J.P., Vanbegin, M.: An optimized translation process and its application to Algol 68. Lecture Notes in Computer Science, Vol. 38. Berlin-Heidelberg-New York: Springer 1976
Cheatham, T.E., Sattley, K.: Syntax directed compiling. Proc. AFIPS Spring Joint Computer Conference, Vol. 25, pp. 31–57. New York: Spartan 1964
Ciesinger, J.: Generating error recovery in a compiler generating system. Bericht, Institut für Informatik der TU München, 1976
Fang, I.: FOLDS, a declarative formal language definition system. Stanford University CS-72-329, 1972
Ganzinger, H.: MUG1 Manual. Bericht Nr. 7608, Institut für Informatik, TU München, 1976
Graham, S.L., Rhodes, S.P.: Practical syntactical error recovery. Comm. ACM 18, 539–550 (1975)
Griffiths, M.: LL(1) grammars and analysers. In: Compiler construction, an advanced course. Lecture Notes in Computer Science, Vol. 21. Berlin-Heidelberg-New York: Springer 1974
Haeger, H.: Benutzeranleitung für die Programmiersprache CDL2. Bericht, Technische Universität Berlin, 1976
Irons, E.T.: An error correcting parse algorithm. Comm. ACM 6, 669–673 (1963)
Irons, E.T.: The structure and use of the syntax directed compiler. In: Annual review in automatic programming, Vol. 3, pp. 207–227. Elmsford, N.Y.: Pergamon 1963
Johnson, S.G.: YACC, yet another compiler-compiler. Bell Telephone Labs., Report, Murray Hill, New Jersey,
Kastens, U.: Ein Übersetzer-Erzeugendes System auf der Basis attributierter Grammatiken. Interner Bericht, Nr. 10, Universität Karlsruhe, 1976
Knuth, D.E.: Top-down syntax analysis. Acta Informat. 1, 79–110 (1971)
Knuth, D.E.: Semantics of context-free languages. Math. Systems Theory 2, 127–146 (1968)
Koster, C.H.A.: Affix-grammars. In: Algol 68 Implementation (J.E.L. Peck, ed.). Amsterdam: North-Holland 1971
Koster, C.H.A.: Using the CDL compiler-compiler. In: Compiler construction, an advanced course. Lecture Notes in Computer Science, Vol. 21. Berlin-Heidelberg-New York: Springer 1974
Kurki-Suonio, R.: On top-to-bottom recognition and left recursion. Comm. ACM 9, 527–529 (1966)
Lecarme, O., Bochmann, G.V.: A (truly) usable and portable compiler writing system. In: Information Processing, Vol. 4. Proceedings of the IFIP Congress, 1974
Lévy, J.P.: Automatic correction of syntax errors in programming languages. Acta Informat. 4, 271–292 (1975)
Lewi, J., De Vlaminck, K., Huens, J., Huybrechts, M.: Project LILA, the ELL(1) generator, primer. Report CW 6, Applied Math. and Progr. Div., K.U. Leuven, 1976
Lewi, J., De Vlaminck, K., Huens, J., Huybrechts, M.: Project LILA, user's manual. Report CW7, Applied Math, and Progr. Div., K.U. Leuven, 1976
Lewi, J., De Vlaminck, K., Huens, J., Huybrechts, M.: Project LILA, Methodology in Compiler Construction, Part 1: Theory. Report CW 13, Part 2: Practice. Report CW 16, Applied Math. and Progr. Div., K.U., Leuven, 1978
Lewis, P.M., Rosenkrantz, D.J., Stearns, R.E.: Attributed translations. Proceedings of Theory of Computing, 1973
Lewis, P.M., Stearns, R.E.: Syntax directed transduction. J. Assoc. Comput. Mach. 15, 464–488 (1968)
McKeeman, W.M., Horning, J.J., Wortman, D.B.: A compiler generator. Englewood Cliffs, N.J.: Prentice-Hall 1970
Räihä, K.-J.: On attribute grammars and their use in a compiler writing system. Department of Computer Science, University of Helsinki, Finland, Report A-1977-4, 1977
Ripken, K.: Formale Beschreibung von Maschinen, Implementierungen und optimierender Maschinecode-Erzeugung aus attributierten Programmgraphen. TUM-INFO-7731, Technische Universität, München, 1977
Warshall, S.: A theorem of Boolean matrices. J. Assoc. Comput. Mach. 9, 11–12, (1962)
Wood, D.: A note on top-down deterministic languages. Nordisk Tidskr. Informationsbehandling (BIT) 9, 387–399 (1969)
Wilhelm, R.: Syntax und Semantikspezifikation in der Eingabesprache für einen Compiler-Compiler. Abteilung Mathematik an der Technischen Universität München, Bericht Nr.7301, 1976
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Lewi, J., De Vlaminck, K., Huens, J. et al. The ELL(1) parser generator and the error recovery mechanism. Acta Informatica 10, 209–228 (1978). https://doi.org/10.1007/BF00264317
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF00264317