Summary
A parser model is presented whose structure is a generalization of the well known LR(k) parsers. Various classes of this parser that would be both practical and efficient to use in a compiler are examined. Associated with these classes of parsers is a hierarchy of type-0 grammars, each grammatical class being defined in terms of the form and structure of derivations. In particular, parsers based on a class called deterministic regular parsable (DRP) grammars will detect any errors as soon as possible during a left to right scan of the input. LR(k) grammars are also DRP. Much research related to LR(k) grammars and parsing is also applicable to DRP grammars and their associated parsers.
Similar content being viewed by others
References
Aho, A.V.: Indexed Grammars. An Extension of Context-free Grammars, J. Assoc. Comput. Mach. 15, 647–671 (1968)
Aho, A.V., Ullman, J.D.: The Theory of Parsing, Translation, and Compiling, Englewood Cliffs, N.J.: Prentice Hall 1972
Anderson, T., Eve, J., Horing, J.J.: Efficient LR(1) Parsers, Acta Informat. 2, 12–39 (1973)
DeRemer, F.L.: Practical Translators for LR(k) Languages, Project MAC Report TR-65, MIT, Cambridge, Mass., 1969
DeRemer, F.L.: Transformational Grammars for Languages and Compilers, Proceedings of Computer Science and Statistics: Seventh Annual Symposium on the Interface, Iowa State University, October, 1973
DeRemer, F.L.: On Compiler Structure and Translator Writing Systems, Proceedings of the Eighth Hawaii International Conference on System Sciences, University of Hawaii, 1975
Floyd, R. W.: On the Nonexistence of the Phrase Structure Grammar for ALGOL 60, Comm. ACM, 5, 483–484 (1962)
Floyd, R. W.: Syntactic Analysis and Operator Precedence, J. ACM, 10, 316–333 (1963)
Griebach, S., Hopcroft, J.: Scattered Context Grammars, J. Comput. System Sci. 3, 233–247 (1969)
Hopcroft, J.E., Ullman, J.D.: Formal Languages and Their Relation to Automata, Don Mills: Addison-Wesley, 1969
James, L.R.: A Syntax Directed Error Recovery Method, CSRG-13, University of Toronto: Computer Systems Research Group, 1972
Joliat, M.L.: On the Reduced Matrix Representation of LR(k) Parsing Tables, CSRG-28, University of Toronto: Computer Systems Research Group, 1973
Knuth, D.E.: On the Translation of Languages from Left to Right, Information and Control, 8, 607–639 (1965)
Kohavi, Z.: Switching and Finite Automata Theory, McGraw Hill, 1970
Korenjak, A.J.: A Practical Method for Constructing LR(k) Processors, Comm. ACM, 12, 613–623 (1969)
Rosenkrantz, D.J.: Programmed Grammars and Classes of Formal Languages, J. ACM, 16, 107–131 (1969)
Turnbull, C.J.M.: Deterministic Left to Right Parsing, CSRG-48, University of Toronto: Computer Systems Research Group, 1975
Van Wijngaarden, A. (ed.): Report on the Algorithmic Language ALGOL 68, Numer. Math. 14, 79–218 (1969)
Wynn, P.: Error Recovery in SLR Parsers, M.Sc. Thesis, University of Newcastle-upon-Tyne, Computing Laboratory, 1973
Revesz, G.: Unilateral Context Sensitive Grammars and Left-to-Right Parsing, J. Comput. System Sci. 5, 337–352 (1971)
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Turnbull, C.J.M., Lee, E.S. Generalized deterministic left to right parsing. Acta Informatica 12, 187–207 (1979). https://doi.org/10.1007/BF00264578
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF00264578