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.
- 1 AHO, A.V., HOPCROFT, J.E., AND ULLMAN, J.D. The Design and Analysis of Computer Algorithms. Addison-Wesley, Reading, Mass., 1974.]] Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 4 BAYER, P.J. Personal communication, 1977.]]Google Scholar
- 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 ScholarCross Ref
- 6 COCKE, J., AND SCHWARTZ, J.I. Programming Languages and Their Compilers. Courant Institute of Mathematical Sciences, New York University, New York, 1970.]] Google ScholarDigital Library
- 7 EARLEY, J. An efficient context-free parsing algorithm. Ph.D. Dissertation, Carnegie Mellon University, Pittsburgh, Pa., 1968.]] Google ScholarDigital Library
- 8 EARLEY, J. An efficient context-free parsing algorithm. Comrnun. ACM 13, 2 (Feb. 1970), 94- 102.]] Google ScholarDigital Library
- 9 FLOYD, R.W. A machine-oriented recognition algorithm for context-free languages. Unpublished manuscript, 1969.]]Google Scholar
- 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 ScholarCross Ref
- 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 Scholar
- 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 ScholarCross Ref
- 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 ScholarDigital Library
- 14 GRIFFITHS, I., AND PETRICK, S. On the relative efficiencies of context-free grammar recognizers. Commun. ACM 8, 5 (May 1965), 289-300.]] Google ScholarDigital Library
- 15 HARRISON, M.A. Introduction to Formal Language Theory. Addison-Wesley, Reading, Mass., 1978.]] Google ScholarDigital Library
- 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 Scholar
- 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 Scholar
- 18 IRONS, E.T. Experience with an extensible language. Commun. ACM 13, 1 (Jan. 1970), 31-40.]] Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 21 KNUTH, D.E. On the translation of languages from left to right. Inf. Control 8 (1965), 607-639.]]Google ScholarCross Ref
- 22 KUNO, S. The predictive analyzer and a path elimination technique. Commun. ACM 8, 7 (July 1965), 453-462.]] Google ScholarDigital Library
- 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 Scholar
- 24 LYON, G. Syntax-directed least-errors analysis for context-free languages: A practical approach. Commun. ACM 17, 1 (Jan. 1974), 3-14.]] Google ScholarDigital Library
- 25 MANACHER, G.K. An improved version of the Cocke-Younger-Kasami algorithm. Comput. Lang. 3 (1978), 127-133.]]Google ScholarDigital Library
- 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 Scholar
- 27 PRATT, V.R., LINGOL--A progress report. Advance Papers 4th Int. Joint Conf. on Artificial Intelligence, Tbilisi, Georgia, USSR, 1975, 422-428.]]Google Scholar
- 28 PRATT, V.R. Personal communication, 1976.]]Google Scholar
- 29 PRATT, V.R. Personal communication, 1977.]]Google Scholar
- 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 ScholarDigital Library
- 31 Ruzzo, W.L. General context free language recognition. Ph.D. Dissertation, Dep. Computer Science, Univ. California, Berkeley, Calif., 1978.]] Google ScholarDigital Library
- 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 ScholarDigital Library
- 33 Ruzzo, W.L. Tree-size bounded alternation. Proc. llth Ann. ACM Symp. on Theory of Computing, Atlanta, Ga., 1979, pp. 352-359.]] Google ScholarDigital Library
- 34 Rvzzo, W.L. An improved characterization of the power of vector machines. In preparation.]]Google Scholar
- 35 TOWNLEY, J.G. The measurement of complex algorithms. Ph.D. Dissertation, Harvard Univ., Cambridge, Mass., 1973 (TR14-73).]]Google Scholar
- 36 VALIANT, L. General context free recognition in less than cubic time. J. Comput. Syst. Sci. 10 (1975), 308-315.]]Google ScholarDigital Library
- 37 WEOBR~.i?, B. Studies in extensible programming languages. Ph.D. Dissertation, Harvard Univ., Cambridge, Mass., 1972.]]Google Scholar
- 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 Scholar
- 39 YOVSCER, D.H. Recognition of context-free languages in time n3. Inf. Control 10, 2 (Feb. 1967), 189-208.]]Google Scholar
Index Terms
- An Improved Context-Free Recognizer
Recommendations
An efficient context-free parsing algorithm
A parsing algorithm which seems to be the most efficient general context-free algorithm known is described. It is similar to both Knuth's LR(k) algorithm and the familiar top-down algorithm. It has a time bound proportional to n3 (where n is the length ...
Lexicalized context-free grammars
ACL '93: Proceedings of the 31st annual meeting on Association for Computational LinguisticsLexicalized context-free grammar(LCFG) is an attractive compromise between the parsing efficiency of context-free grammar (CFG) and the elegance and lexical sensitivity of lexicalized tree adjoining grammar (LTAG). LCFG is a restricted form of LTAG that ...
LR(k)-parsing of Coupled-Context-Free Grammars
COLING '94: Proceedings of the 15th conference on Computational linguistics - Volume 1Coupled-Context-Free Grammars are a generalization of context-free grammars obtained by combining nonterminals to parentheses which can only be substituted simultaneously. Referring to the generative capacity of the grammars we obtain an infinite ...
Comments