Abstract
The problem of outputting all parse trees of a string accepted by a context-free grammar is considered. A systolic algorithms is presented that operates inO(m·n) time, wherem is the number of distinct parse trees andn is the length of the input. The systolic array usesn 2 processors, each of which requires at mostO(logn) bits of storage. This is much more space-efficient that a previously reported systolic algorithm for the same problem, which requiredO(n logn) space per processor. The algorithm also extends previous algorithms that only output a single parse tree of the input.
Similar content being viewed by others
References
D. H. Younger, Recognition and parsin Parsing of Context-free Languages in Timen 3,Information and Control,10(2):189–208 (1967).
J. Earley, An Efficient Context-free Parsing Algorithm,Communications of the ACM,13(2):94–102 (1970).
L. Valiant, General Context-free Recognition in Less thanCubic Time,J. of Computer and Systems Sciences,10(2):308–315 (1975).
L. J. Guibas, H.-T. Kung, and C. D. Thompson, Direct VLSI Implempentation of Combinatorial Algorithms,Proc. Caltechn. Conf. on VLSI, pp. 509–525 (1979).
W. Rytter, The Complexity of Two-way Pushdown Automata and Recursive Programs, inCombinatorial Algorithms on Words, A. Apostolico and Z. Galil (eds.)NATO ASl Series F:12, Springer-Verlag: New York/Berlin.
Y. T. Chiang and K. S. Fu, Parallel Parsing Algorithms and VLSI Implementations for Syntactic Pattern Recognition,IEEE Transactions on Pattern Analysis and Machine Intelligence,6(3):302–314 (1984).
J. H. Chang, O. H. Ibarra, and M. A. Palis, Parallel Parsing on a One-way Array of Finite-state Machines,IEEE Transactions on Computers,36(1):64–75 (1987). Also appeared inProc. Intl. Conf. on Parallel Processing (August 1986).
L. Langlois, Parallel Parsing on an Array of Processors, Technical Report CSR-200-86, Department of Computer Science, University of Edinburgh (July 1986).
O. H. Ibarra and M. A. Palis, An Efficient All-Parses Systolic Algorithm for General Context-Free Parsing: Extended Abstract,Proc. Workshop on Algorithms and Data Structures, Ottawa, Canada (August 1989).
L. Langlois, Systolic Parsing of Context-Free Languages,International Journal of Parallel Programming,19(4):333–335 (1990).
A. V. Aho and J. D. Ullman,The Theory of Parsing, Translation and Compiling, Vol. 1, Parsing, Prentice-Hall, Englewood Cliffs, New Jersey (1972).
Author information
Authors and Affiliations
Additional information
Research squpported in part by NSF Grant DCR-8420935 and DCR-8604603.
Rights and permissions
About this article
Cite this article
Ibarra, O.H., Palis, M.A. An efficient all-parses systolic algorithm for general context-free parsing. Int J Parallel Prog 19, 295–331 (1990). https://doi.org/10.1007/BF01379361
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF01379361