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.
Similar content being viewed by others
References
Bochmann, G.V.: Semantic evaluation from left to right. Comm. ACM 19, 55–62 (1976)
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
Crowe, D.: Generating parsers for affix grammars. Comm. ACM 15, 728–734 (1972)
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)
Feldman, J., Gries, D.: Translator writing systems. Comm. ACM 11, 77–113 (1968)
Foster, J.M.: A syntax improving program. Computer J. 11, 31–34 (1968)
Knuth, D.E.: On the translation of languages from left to right. Information and Control 8, 607–639 (1965)
Knuth, D.E.: Semantics of context-free languages. Mathematical Systems Theory 2, 127–145 (1968)
Knuth, D.E.: Top-down syntax analysis. Acta Informatica 1, 79–110 (1971)
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)
Koster, C.H.A.: Affix grammars. In: ALGOL 68 Implementation (J.E. Peck, ed.). Amsterdam: North-Holland 1971
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
Lecarme, O., Bochmann, G. V.: A truly usable and portable compiler writing system. In: Proc. IFIP 74 Congress. Amsterdam: North-Holland 1974
Lewis, P.M., Rosenkrantz, D.J., Stearns, R.E.: Attributed translations. J. Computer and System Sciences 9, 279–307 (1974)
Madsen, O. L. : On the use of attribute grammars in a practical translator writing system. University of Aarhus, M.Sc. thesis (July 1975)
Watt, D. A.: Analysis-oriented two-level grammars. University of Glasgow, Ph.D. thesis (January 1974)
Watt, D.A.: LR parsing of affix grammars. Computing Science Department, University of Glasgow, Report no. 7 (August 1974)
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)
Author information
Authors and Affiliations
Rights 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
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF00276181