Abstract
In the last years the research of context-free languages was concentrated on the problems of syntactic analysis and recently on the problems of the integrated theory of parsing and compiling using affix (Koster [18]) or attribute grammars (Lewis [25], Bochmann [2], Knuth [16]).
In this paper the requirements on parsing methods in compilers are discussed. The advantages of top-down parsing method are summarized and a modification of the top-down method able to parse LR(k) grammars without left recursive symbols is given.
The problem of the syntactic analysis is then reduced to the problem how to insert “action symbols” (controlling the compiling) into the input string. It is shown that in such a treatment the differencies between the bottom-up and top-down methods are in some sense less important. Some bottom-up methods, especially the LR(k) ones, have hidden top-down features which can be easily used up. Some modifications of bottom up methods allowing to produce top-down like parsing information are discussed.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Aho, A.V. and Ullman, J.D., The Theory of Parsing, Translation and Compiling Vol I, II, Prentice Hall (1972, 1974).
Bochman,G.V., Semantics Evaluated from Left to Right, Dept. d' Informatique, Univ. de Montreal,1973.
Demner, J., One Method of Compiler Oriented Syntactic Analysis with the Semi-Top-Down Strategy. Report ÚVT ČVUT, ÚVT 9/74/M, Oct. 1974.
DeRemer, F.L., Simple LR(k) Grammars, Comm. ACM, 14 (1971), 453–460.
Dömölki, B., Algorithms for the Recognition of Properties of Sequences of Symbols (in Russian), U.S.S.R. Comp. Math. and Math. Physics, 5 (1967), Pergamon Press 1967, 101–103.
Duplínský, J., Šturc J., Translator Writing System User Manual (in Slovak), UNO Research Comping Centre, Bratislava 1973.
Floyd, R.W., Syntactic Analysis and Operator Precedence, J. ACM, 10 (1963), 316–333.
Floyd, R.W., Bounded Context Syntactic Analysis. Comm. ACM, 7 (1964), 62–67.
Ginsburg, S., The Mathematical Theory of Context-free Languages, Mc Graw-Hill, 1966.
Gray, J.N., Precedence Parsers for Programming Languages, Ph.D. Thesis, Univ. of California Berkeley, 1969.
Gries, D., Compiler Construction for Digital Compilers, John Wiley, New York, 1971.
Harrison, M.A. and Havel, I.M., Strict Deterministic Grammars, J. Comp. System Sci, 7 (1973), 237–277.
Havel, I.M., Strict Deterministic Languages, PhD Thesis, Univ. of California, Berkeley, Dec. 1971.
Hopcroft, J.E. and Ullman J.D., Formal Languages and Their Relation to Automata, Addison-Wesley, Reading, Mass., 1969.
Knuth, D.E., On the Translation of Languages from Left to Right, Information and Control, 8 (1965), 607–639.
Knuth, D.E., Semantics of Context-Free Languages, Math. Syst. Theory 2, (1968), 127–145.
Kopřiva, J., A Contribution to the Top Down Parsing Rehabilitation, Kybernetika (Prague), (1968).
Koster, C.H.A., Affix Grammars, In Algol 68 Implementation, (J.E.L. Peck, Ed.), 95–109, North Holland, Amsterdam, 1971.
Král, J. and Demner, J., Semi-Top-Down Syntactic Analysis, Report ÚVT ČVUT, ÚVT 6/73/M, 1973.
Král, J., A Concise Graphic Form Expressing the Algol 68 Syntax, to appear in Information Processing Machines 19.
Král, J., Demner, J., A Note on the Number of the States of DeRemer's Recognizer, Information Processing Letters, 2 (1973), 22–23.
Král, J., Semi-Top-Down Transition Diagrams Driven Syntax Analysis. Report of the Institute of Computation Technique of Prague Technical Univ., ÚVT 11/74, Dec. 1974.
Král, J., Bottom-Up Versus Top-Down Syntax Analysis Revised, Report of the Institute of Computation Techniques of the Prague Technical University, ÚVT 10/74, December 1974, presented at the MFCS 74 Conference, Jadwisin, June 1974. (Cf. Lecture Notes in Computer Science 28, Springer-Verlag, Berlin, 1975, pp. 256–273).
Křetínský, J., Private communication. (1974).
Lewis, P.M., Rosenkrantz, D.J. and Stearns, R.E., Attributed Translations, J. Comp. System Sci., 9 (1974), 279–307.
Rozenkrantz, D.J. and Stearns, R.E., Properties of Deterministic Top-Down Grammars, Inf. and Control, 17 (1970), 226–256.
Ružička, P. and Šturc, J., Two Classes of LR-Parsable Ambiguous Grammars, (in Slovak), Conference Integrated Information Systems, Bratislava (1974).
Ružička, P., LR Methods of Syntactic Analysis (in Slovak), Proceedings of SOFSEM 74 Symposium, UNO Computing and Research Centre, 1974.
Šturc, J., Translator Writing Systems and Error Treatment in the Syntax Directed Translation (in Slovak), Seminar SOFSEM 74, High Tatras (1974), 1–27.
Salomaa, A., Formal Languages, Academic Press, New York, 1973.
Voda, P., Duplinský, J., Kubíšová, M., Ružička, P. and Šturc, J., Languages of Programming Systems, Metasystem Means of Language Systems III, (in Slovak), Report UNO Research Computing Centre, Bratislava, (March 1975).
van Wijngaarden et al, Revised Report on the Algorithmic Language ALGOL 68, Technical Report TR 74-3, Dept. of Comp. Sci, The University of Alberta, Edmonton, Alberta (1974).
Wirth, N., The Programming Language PASCAL, Berichte der Fachgruppe Computer-Wissenschaften, Eidgnöstische TH Zürich (Nov 1972).
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1975 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Král, J., Demner, J. (1975). Parsing as a subtask of compiling. In: Bečvář, J. (eds) Mathematical Foundations of Computer Science 1975 4th Symposium, Mariánské Lázně, September 1–5, 1975. MFCS 1975. Lecture Notes in Computer Science, vol 32. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-07389-2_182
Download citation
DOI: https://doi.org/10.1007/3-540-07389-2_182
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-07389-5
Online ISBN: 978-3-540-37585-2
eBook Packages: Springer Book Archive