Summary
Making use of the fact that two-level grammars (TLGs) may be thought of as finite specification of context-free grammars (CFGs) with “infinite” sets of productions, known techniques for parsing CFGs are applied to TLGs by first specifying a canonical CFG G′ — called skeleton grammar — obtained from the “cross-reference” of the TLG G. Under very natural restrictions it can be shown that for these grammar pairs (G, G′) there exists a 1 — 1 correspondence between leftmost derivations in G and leftmost derivations in G′. With these results a straightforward parsing algorithm for restricted TLGs is given.
Similar content being viewed by others
References
Aho A, Ullman J (1972) The theory of parsing, translation, and compiling, Vol.I: Parsing. Prentice Hall, Englewood Cliffs, NJ
Aho A, Ullman J (1973) The theory of parsing, translation, and compiling, Vol.II: Compiling. Prentice Hall, Englewood Cliffs, NJ
Ambler AL (1973) Nested LR(k) parsing using grammars of the van Wijngaarden type, Ph.D. Thesis, Dept. of Computer Sciences, Univ. of Wisconsin
Baker JL (1972) Grammars with structured vocabulary: a model for the Algol 68 definition. Information and Control 20:351–395
Branquart P. Cardinal JP, Delescaille JP, Lewi J (1972) A context-free syntax of Algol 68. Information Processing Lett. 1:141–148
Deussen P (1975) A decidability criterion for van Wijngaarden grammars. Acta Informat. 5:353–375
Deussen P, Mehlhorn K (1977) Van Wijngaarden grammars and space complexity class EXSPACE. Acta Informat. 8:193–199
Deussen P, Wegner L (1978) A bibliography of van Wijngaarden grammars, Bulletin of the European Ass. for Theoretical Computer Science (EATCS) 6
Greibach SA (1974) Some restrictions on W-grammars, ACM Proceedings of the 6th Symposium on the Theory of Computing, Seattle
Gries D (1971) Compiler construction for digital computers. John Wiley, New York
Hesse W (1976) Vollständige formale Beschreibung von Programmiersprachen mit zweischichtigen Grammatiken, Dissertation, Technische Universität München, Bericht Nr. 7623
Koster CHA (1972) Affix grammars. In: Algol 68 implementation. Proc. of the IFIP Work. Conf. on Algol 68 implementation, 95–109, North Holland, Amsterdam
Makanin GS (1977) The problem of solvability of equations in a free semigroup (in Russian). Matematiceskij sbornik 103 (145), No. 2(6), pp. 147–236; english summary in: (1977) Dokl Akad Nauk SSSR, Soviet Math Dokl 18 330–334
Maurer H (1969) Theoretische Grundlagen der Programmiersprachen — Theorie der Syntax. Bibliographisches Institut, Mannheim
Rounds WC (1973) Complexity of recognition in intermediate — level languages, in: Proc. of the IEEE 14th Annual Symposium on Switching and Automata Theory, 145–158
Salomaa A (1973) Formal languages. Academic Press, New York, London
Sintzoff M (1967) Existence of a van Wijngaarden syntax for every recursively enumerable set. Ann Soc Sci Bruxelles 81:115–118
Watt DA (1977) The parsing problem for affix grammars. Acta Informat 8:1–20
Wegner L (1977) Analysis of two-level grammars. Ph.D. thesis, Hochschul-Verlag, Stuttgart
Wegner L (1979) Bracketed two-level grammars — a decidable and practical approach to language definitions. ICALP 79, Graz. Springer, Berlin Heidelberg New York (Lecture Notes in Computer Sciences, Vol. 71, p. 668)
Wegner L (1979) Two-level grammar translations, GI-9. Jahrestagung, Bonn. Springer, Berlin Heidelberg New York (Informatik Fachberichte, Band 19 (1965) p. 163)
Wijngaarden A van (1965) Orthogonal design and Description of formal languages. Mathematisch Centrum Amsterdam, MR 76
Wijngaarden A van (ed.) (1969) Report on the Algorithmic language ALGOL 68. Numer 14:79–218
Wijngaarden A van, Mailloux BJ, Peck JEL, Koster CHA, Sintzoff M, Lindsey CH, Meertens LGLT, Fisker RG (eds.) (1976) Revised report on the Algorithmic language ALGOL 68. Springer, Berlin Heidelberg New York
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Wegner, L.M. On parsing two-level grammars. Acta Informatica 14, 175–193 (1980). https://doi.org/10.1007/BF00288543
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF00288543