Skip to main content
Log in

The parsing problem for affix grammars

  • Published:
Acta Informatica Aims and scope Submit manuscript

Summary

Affix grammars are an extension of context-free grammars which retain most of their advantages and eliminate most of their limitations with respect to the definition of programming languages and the specification of their translators. The extension allows definition of context-sensitive syntax features, and also allows semantics to be linked to syntax. In this paper, the parsing problem for affix grammars is explored and shown to be closely related to the parsing problem for context-free grammars. This enables a standard context-free parser constructor to be generalised to a constructor for affix grammars, essentially by addition of a preprocessor. The resulting constructors are compared with previously implemented or proposed constructors.

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. Bochmann, G.V.: Semantic evaluation from left to right. Comm. ACM 19, 55–62 (1976)

    Google Scholar 

  2. Branquart, P., Cardinael, J.-P., Lewi, J., Delescaille, J.-P., Vanbegin, M.: An optimised translation process and its application to ALGOL 68. Lecture Notes in Computer Science, Vol. 38. Berlin-Heidelberg-New York: Springer 1976

    Google Scholar 

  3. Crowe, D.: Generating parsers for affix grammars. Comm. ACM 15, 728–734 (1972)

    Google Scholar 

  4. DeRemer, F. L.: Practical translators for LR(k) languages M.I.T., Cambridge (Mass.), Ph.D. thesis (September 1969). Also:Simple LR(k) grammars. Comm. ACM 14, 453–460 (1971)

    Google Scholar 

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

    Google Scholar 

  6. Foster, J.M.: A syntax improving program. Computer J. 11, 31–34 (1968)

    Google Scholar 

  7. Knuth, D.E.: On the translation of languages from left to right. Information and Control 8, 607–639 (1965)

    Google Scholar 

  8. Knuth, D.E.: Semantics of context-free languages. Mathematical Systems Theory 2, 127–145 (1968)

    Google Scholar 

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

    Google Scholar 

  10. Koster, C.H.A.: On the construction of procedures for generating, analyzing, and translating sentences in natural languages. Mathematisch Centrum, Amsterdam, Report MR 72 (February 1965)

    Google Scholar 

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

    Google Scholar 

  12. Koster, C.H.A.: A compiler compile. Mathematisch Centrum, Amsterdam, Report MR 127 (November 1971). Also: Using the CDL compiler compiler. In: Compiler construction, an advanced course (F.L. Bauer, J. Eickel, eds.). Lecture Notes in Computer Science, Vol.21. Berlin-Heidelberg-New York: Springer 1974

    Google Scholar 

  13. Lecarme, O., Bochmann, G. V.: A truly usable and portable compiler writing system. In: Proc. IFIP 74 Congress. Amsterdam: North-Holland 1974

    Google Scholar 

  14. Lewis, P.M., Rosenkrantz, D.J., Stearns, R.E.: Attributed translations. J. Computer and System Sciences 9, 279–307 (1974)

    Google Scholar 

  15. Madsen, O. L. : On the use of attribute grammars in a practical translator writing system. University of Aarhus, M.Sc. thesis (July 1975)

  16. Watt, D. A.: Analysis-oriented two-level grammars. University of Glasgow, Ph.D. thesis (January 1974)

  17. Watt, D.A.: LR parsing of affix grammars. Computing Science Department, University of Glasgow, Report no. 7 (August 1974)

  18. van Wijngaarden, A.: Orthogonal design and description of a formal language. Mathematisch Centrum, Amsterdam, Report MR 76 (October 1965). Also: van Wijngaarden, A.,et al.: Revised report on the algorithmic language ALGOL 68. Acta Informatica 5, 1–236 (1975)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Watt, D.A. The parsing problem for affix grammars. Acta Informatica 8, 1–20 (1977). https://doi.org/10.1007/BF00276181

Download citation

  • Received:

  • Issue Date:

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

Keywords

Navigation