skip to main content
article
Open Access

An Improved Context-Free Recognizer

Authors Info & Claims
Published:01 July 1980Publication History
Skip Abstract Section

Abstract

A new algorithm for recognizing and parsing arbitrary context-free languages is presented, and several new results are given on the computational complexity of these problems. The new algorithm is of both practical and theoretical interest. It is conceptually simple and allows a variety of efficient implementations, which are worked out in detail. Two versions are given which run in faster than cubic time. Surprisingly close connections between the Cocke-Kasami-Younger and Earley algorithms are established which reveal that the two algorithms are “almost” identical.

References

  1. 1 AHO, A.V., HOPCROFT, J.E., AND ULLMAN, J.D. The Design and Analysis of Computer Algorithms. Addison-Wesley, Reading, Mass., 1974.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2 AHO, A.V., AND ULLMAN, J.D. The Theory of Parsing, Translation, and Compiling, Vol. 1: Parsing. Prentice-HaU, Englewood Cliffs, N.J., 1972.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3 ARLAZAROV, V.L., DINIC, E.A., KRONROD M.A., AND FARADZEV, I.A. On economical construction of the transitive closure of a directed graph. Dokl. Akad. Nauk SSSR 194 (1970), 487-488 (in Russian). {English translation Soviet Math. Dokl. 11, 5 (1970), 1209-1210.}]]Google ScholarGoogle Scholar
  4. 4 BAYER, P.J. Personal communication, 1977.]]Google ScholarGoogle Scholar
  5. 5 BOUCKAERT, M., PIROTrE, A., AHD SNELLING, M. Efficient parsing algorithms for general context free grammars. Inf. Sci. 8, 1 (Jan. 1975), 1-26.]]Google ScholarGoogle ScholarCross RefCross Ref
  6. 6 COCKE, J., AND SCHWARTZ, J.I. Programming Languages and Their Compilers. Courant Institute of Mathematical Sciences, New York University, New York, 1970.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7 EARLEY, J. An efficient context-free parsing algorithm. Ph.D. Dissertation, Carnegie Mellon University, Pittsburgh, Pa., 1968.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8 EARLEY, J. An efficient context-free parsing algorithm. Comrnun. ACM 13, 2 (Feb. 1970), 94- 102.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9 FLOYD, R.W. A machine-oriented recognition algorithm for context-free languages. Unpublished manuscript, 1969.]]Google ScholarGoogle Scholar
  10. 10 GALIL, Z. Two fast simulations which imply some fast string matching and palindrome-recognition algorithms. Inf. Process. Lett. 4, 4 (Jan. 1976), 85-87.]]Google ScholarGoogle ScholarCross RefCross Ref
  11. 11 GELLER, M.M., A~O HARRISON, M.A. Characteristic parsing: A framework for producing compact deterministic parsers, I. J. Comput. Syst. Sci. 14, 3 (June 1977), 265-317.]]Google ScholarGoogle Scholar
  12. 12 GRAHAM, S.L., AND HARRISON, M.A. Parsing of general context-free languages. In Advances in Computers, I7ol. 14. Academic Press, New York, 1976, pp. 77-185.]]Google ScholarGoogle ScholarCross RefCross Ref
  13. 13 GRAHAM, S.L., HARRISON, M.A., AND Ruzzo, W.L. Online context free language recognition in less than cubic time. Proc. 8th Ann. ACM Syrup. on Theory of Computing, Hershey, Pa., 1976, pp. 112-120.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 14 GRIFFITHS, I., AND PETRICK, S. On the relative efficiencies of context-free grammar recognizers. Commun. ACM 8, 5 (May 1965), 289-300.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 15 HARRISON, M.A. Introduction to Formal Language Theory. Addison-Wesley, Reading, Mass., 1978.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 16 HAYS, D.G. Automatic language-data processing. In Computer Applications in the Behavioral Sciences, H. Borko, Ed., Prentice-Hall, Englewood Cliffs, N.J., 1962, pp. 394-423.]]Google ScholarGoogle Scholar
  17. 17 HoPcRO~r, J.E., PAUL, W., ANO VALIANT, L. On time versus space and related problems. Conf. Record IEEE 16th Ann. Syrup. on Foundations of Computer Science, Berkeley, Calif., 1975, pp. 57-64.]]Google ScholarGoogle Scholar
  18. 18 IRONS, E.T. Experience with an extensible language. Commun. ACM 13, 1 (Jan. 1970), 31-40.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 19 JoNEs, C.B. Formal development of correct algorithms: An example based on Earley's recognizer. ACM SIGPLAN Notices 7, I (Jan. 1972), 150-169.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 20 KASAMI, T. An efficient recognition and syntax analysis algorithm for context free languages. Sci. Rep. AF CRL-65-758, Air Force Cambridge Research Laboratory, Bedford, Mass., 1965.]]Google ScholarGoogle Scholar
  21. 21 KNUTH, D.E. On the translation of languages from left to right. Inf. Control 8 (1965), 607-639.]]Google ScholarGoogle ScholarCross RefCross Ref
  22. 22 KUNO, S. The predictive analyzer and a path elimination technique. Commun. ACM 8, 7 (July 1965), 453-462.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. 23 LIPTON, R.J., A~O SNYDER, L. On the optimal parsing of speech. Res. Rep. No. 37, Dep. Computer Science, Yale Univ., New Haven, Conn., 1974.]]Google ScholarGoogle Scholar
  24. 24 LYON, G. Syntax-directed least-errors analysis for context-free languages: A practical approach. Commun. ACM 17, 1 (Jan. 1974), 3-14.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. 25 MANACHER, G.K. An improved version of the Cocke-Younger-Kasami algorithm. Comput. Lang. 3 (1978), 127-133.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. 26 MARQUE-PuCm~N, G. Analyses des langages alg~briques. Th/~se de 3~ Cycle, Institute de Programmation, IP75-23, Universit~ Paris VI, 1975 (in French).]]Google ScholarGoogle Scholar
  27. 27 PRATT, V.R., LINGOL--A progress report. Advance Papers 4th Int. Joint Conf. on Artificial Intelligence, Tbilisi, Georgia, USSR, 1975, 422-428.]]Google ScholarGoogle Scholar
  28. 28 PRATT, V.R. Personal communication, 1976.]]Google ScholarGoogle Scholar
  29. 29 PRATT, V.R. Personal communication, 1977.]]Google ScholarGoogle Scholar
  30. 30 PRATT, V.R., AND STOCKMEYER, L.J. A characterization of the power of vector machines. J. Cornput. Syst. Sci. 12 (1976), 198-221.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. 31 Ruzzo, W.L. General context free language recognition. Ph.D. Dissertation, Dep. Computer Science, Univ. California, Berkeley, Calif., 1978.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. 32 Ruzzo, W.L. On the complexity of general context-free language parsing and recognition. In Automata, Languages, and Programming, Sixth Colloquium, Graz, July 1979, H. Maurer, Ed., Vol. 71, Lecture Notes in Computer Science, Springer Verlag, Berlin, 1979, pp. 489-497.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. 33 Ruzzo, W.L. Tree-size bounded alternation. Proc. llth Ann. ACM Symp. on Theory of Computing, Atlanta, Ga., 1979, pp. 352-359.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. 34 Rvzzo, W.L. An improved characterization of the power of vector machines. In preparation.]]Google ScholarGoogle Scholar
  35. 35 TOWNLEY, J.G. The measurement of complex algorithms. Ph.D. Dissertation, Harvard Univ., Cambridge, Mass., 1973 (TR14-73).]]Google ScholarGoogle Scholar
  36. 36 VALIANT, L. General context free recognition in less than cubic time. J. Comput. Syst. Sci. 10 (1975), 308-315.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. 37 WEOBR~.i?, B. Studies in extensible programming languages. Ph.D. Dissertation, Harvard Univ., Cambridge, Mass., 1972.]]Google ScholarGoogle Scholar
  38. 38 WEICK~.R, R. Context free language recognition by a RAM with uniform cost criterion in time n21og n. In Symposium on New Directions and Recent Results in Algorithms and Complexity, J.F. Traub, Ed., Academic Press, New York, 1976.]]Google ScholarGoogle Scholar
  39. 39 YOVSCER, D.H. Recognition of context-free languages in time n3. Inf. Control 10, 2 (Feb. 1967), 189-208.]]Google ScholarGoogle Scholar

Index Terms

  1. An Improved Context-Free Recognizer

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        • Published in

          cover image ACM Transactions on Programming Languages and Systems
          ACM Transactions on Programming Languages and Systems  Volume 2, Issue 3
          July 1980
          195 pages
          ISSN:0164-0925
          EISSN:1558-4593
          DOI:10.1145/357103
          Issue’s Table of Contents

          Copyright © 1980 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 1 July 1980
          Published in toplas Volume 2, Issue 3

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader