Skip to main content

Parsing as a subtask of compiling

  • Invited Lectures
  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 32))

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.

This is a preview of subscription content, log in via an institution.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Aho, A.V. and Ullman, J.D., The Theory of Parsing, Translation and Compiling Vol I, II, Prentice Hall (1972, 1974).

    Google Scholar 

  2. Bochman,G.V., Semantics Evaluated from Left to Right, Dept. d' Informatique, Univ. de Montreal,1973.

    Google Scholar 

  3. Demner, J., One Method of Compiler Oriented Syntactic Analysis with the Semi-Top-Down Strategy. Report ÚVT ČVUT, ÚVT 9/74/M, Oct. 1974.

    Google Scholar 

  4. DeRemer, F.L., Simple LR(k) Grammars, Comm. ACM, 14 (1971), 453–460.

    Article  Google Scholar 

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

    Article  Google Scholar 

  6. Duplínský, J., Šturc J., Translator Writing System User Manual (in Slovak), UNO Research Comping Centre, Bratislava 1973.

    Google Scholar 

  7. Floyd, R.W., Syntactic Analysis and Operator Precedence, J. ACM, 10 (1963), 316–333.

    Article  Google Scholar 

  8. Floyd, R.W., Bounded Context Syntactic Analysis. Comm. ACM, 7 (1964), 62–67.

    Article  Google Scholar 

  9. Ginsburg, S., The Mathematical Theory of Context-free Languages, Mc Graw-Hill, 1966.

    Google Scholar 

  10. Gray, J.N., Precedence Parsers for Programming Languages, Ph.D. Thesis, Univ. of California Berkeley, 1969.

    Google Scholar 

  11. Gries, D., Compiler Construction for Digital Compilers, John Wiley, New York, 1971.

    Google Scholar 

  12. Harrison, M.A. and Havel, I.M., Strict Deterministic Grammars, J. Comp. System Sci, 7 (1973), 237–277.

    Google Scholar 

  13. Havel, I.M., Strict Deterministic Languages, PhD Thesis, Univ. of California, Berkeley, Dec. 1971.

    Google Scholar 

  14. Hopcroft, J.E. and Ullman J.D., Formal Languages and Their Relation to Automata, Addison-Wesley, Reading, Mass., 1969.

    Google Scholar 

  15. Knuth, D.E., On the Translation of Languages from Left to Right, Information and Control, 8 (1965), 607–639.

    Article  Google Scholar 

  16. Knuth, D.E., Semantics of Context-Free Languages, Math. Syst. Theory 2, (1968), 127–145.

    Article  Google Scholar 

  17. Kopřiva, J., A Contribution to the Top Down Parsing Rehabilitation, Kybernetika (Prague), (1968).

    Google Scholar 

  18. Koster, C.H.A., Affix Grammars, In Algol 68 Implementation, (J.E.L. Peck, Ed.), 95–109, North Holland, Amsterdam, 1971.

    Google Scholar 

  19. Král, J. and Demner, J., Semi-Top-Down Syntactic Analysis, Report ÚVT ČVUT, ÚVT 6/73/M, 1973.

    Google Scholar 

  20. Král, J., A Concise Graphic Form Expressing the Algol 68 Syntax, to appear in Information Processing Machines 19.

    Google Scholar 

  21. Král, J., Demner, J., A Note on the Number of the States of DeRemer's Recognizer, Information Processing Letters, 2 (1973), 22–23.

    Article  Google Scholar 

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

    Google Scholar 

  23. 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).

    Google Scholar 

  24. Křetínský, J., Private communication. (1974).

    Google Scholar 

  25. Lewis, P.M., Rosenkrantz, D.J. and Stearns, R.E., Attributed Translations, J. Comp. System Sci., 9 (1974), 279–307.

    Google Scholar 

  26. Rozenkrantz, D.J. and Stearns, R.E., Properties of Deterministic Top-Down Grammars, Inf. and Control, 17 (1970), 226–256.

    Google Scholar 

  27. Ružička, P. and Šturc, J., Two Classes of LR-Parsable Ambiguous Grammars, (in Slovak), Conference Integrated Information Systems, Bratislava (1974).

    Google Scholar 

  28. Ružička, P., LR Methods of Syntactic Analysis (in Slovak), Proceedings of SOFSEM 74 Symposium, UNO Computing and Research Centre, 1974.

    Google Scholar 

  29. Šturc, J., Translator Writing Systems and Error Treatment in the Syntax Directed Translation (in Slovak), Seminar SOFSEM 74, High Tatras (1974), 1–27.

    Google Scholar 

  30. Salomaa, A., Formal Languages, Academic Press, New York, 1973.

    Google Scholar 

  31. 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).

    Google Scholar 

  32. 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).

    Google Scholar 

  33. Wirth, N., The Programming Language PASCAL, Berichte der Fachgruppe Computer-Wissenschaften, Eidgnöstische TH Zürich (Nov 1972).

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Jíří Bečvář

Rights and permissions

Reprints 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

Publish with us

Policies and ethics