Skip to main content
Log in

The ELL(1) parser generator and the error recovery mechanism

  • Published:
Acta Informatica Aims and scope Submit manuscript

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.

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. Aho, A.V., Ullman, J.D.: The theory of parsing, translation and compiling. Englewood Cliffs, N.J.: Prentice-Hall 1972

    Google Scholar 

  2. Altman, V.E.: A language implementation system. Massachusetts Institute of Technology, MAC TR-126, 1974

  3. Blaizot, L.: DELTA, système de description de langages et de traducteurs par attributs. Rapport de Recherche n∘ 20, IRIA, Roquencourt, 1973

    Google Scholar 

  4. Bochmann, G.V., Lecarme, O.: Un système d'écriture de compilateurs. Documents de Travail 27, 30, 40, 44, Université de Montreal, 1972

  5. Bochmann, G.V.: Semantic evaluation from left to right. Comm. ACM 19, 55–62 (1973)

    Google Scholar 

  6. 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

  7. Bouckaert, M., Pirotte, M., Snelling, M.: SOFT: a tool for writing software. MBLE Research Laboratory Brussels, Report R212, 1973

  8. 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

    Google Scholar 

  9. 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

    Google Scholar 

  10. Cheatham, T.E., Sattley, K.: Syntax directed compiling. Proc. AFIPS Spring Joint Computer Conference, Vol. 25, pp. 31–57. New York: Spartan 1964

    Google Scholar 

  11. Ciesinger, J.: Generating error recovery in a compiler generating system. Bericht, Institut für Informatik der TU München, 1976

    Google Scholar 

  12. Fang, I.: FOLDS, a declarative formal language definition system. Stanford University CS-72-329, 1972

  13. Ganzinger, H.: MUG1 Manual. Bericht Nr. 7608, Institut für Informatik, TU München, 1976

    Google Scholar 

  14. Graham, S.L., Rhodes, S.P.: Practical syntactical error recovery. Comm. ACM 18, 539–550 (1975)

    Google Scholar 

  15. 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

    Google Scholar 

  16. Haeger, H.: Benutzeranleitung für die Programmiersprache CDL2. Bericht, Technische Universität Berlin, 1976

    Google Scholar 

  17. Irons, E.T.: An error correcting parse algorithm. Comm. ACM 6, 669–673 (1963)

    Google Scholar 

  18. 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

    Google Scholar 

  19. Johnson, S.G.: YACC, yet another compiler-compiler. Bell Telephone Labs., Report, Murray Hill, New Jersey,

  20. Kastens, U.: Ein Übersetzer-Erzeugendes System auf der Basis attributierter Grammatiken. Interner Bericht, Nr. 10, Universität Karlsruhe, 1976

  21. Knuth, D.E.: Top-down syntax analysis. Acta Informat. 1, 79–110 (1971)

    Google Scholar 

  22. Knuth, D.E.: Semantics of context-free languages. Math. Systems Theory 2, 127–146 (1968)

    Google Scholar 

  23. Koster, C.H.A.: Affix-grammars. In: Algol 68 Implementation (J.E.L. Peck, ed.). Amsterdam: North-Holland 1971

    Google Scholar 

  24. 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

    Google Scholar 

  25. Kurki-Suonio, R.: On top-to-bottom recognition and left recursion. Comm. ACM 9, 527–529 (1966)

    Google Scholar 

  26. Lecarme, O., Bochmann, G.V.: A (truly) usable and portable compiler writing system. In: Information Processing, Vol. 4. Proceedings of the IFIP Congress, 1974

  27. Lévy, J.P.: Automatic correction of syntax errors in programming languages. Acta Informat. 4, 271–292 (1975)

    Google Scholar 

  28. 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

    Google Scholar 

  29. 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

    Google Scholar 

  30. 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

    Google Scholar 

  31. Lewis, P.M., Rosenkrantz, D.J., Stearns, R.E.: Attributed translations. Proceedings of Theory of Computing, 1973

  32. Lewis, P.M., Stearns, R.E.: Syntax directed transduction. J. Assoc. Comput. Mach. 15, 464–488 (1968)

    Google Scholar 

  33. McKeeman, W.M., Horning, J.J., Wortman, D.B.: A compiler generator. Englewood Cliffs, N.J.: Prentice-Hall 1970

    Google Scholar 

  34. 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

    Google Scholar 

  35. Ripken, K.: Formale Beschreibung von Maschinen, Implementierungen und optimierender Maschinecode-Erzeugung aus attributierten Programmgraphen. TUM-INFO-7731, Technische Universität, München, 1977

    Google Scholar 

  36. Warshall, S.: A theorem of Boolean matrices. J. Assoc. Comput. Mach. 9, 11–12, (1962)

    Google Scholar 

  37. Wood, D.: A note on top-down deterministic languages. Nordisk Tidskr. Informationsbehandling (BIT) 9, 387–399 (1969)

    Google Scholar 

  38. 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

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints 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

Download citation

  • Received:

  • Issue Date:

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

Keywords

Navigation