Hostname: page-component-89b8bd64d-rbxfs Total loading time: 0 Render date: 2026-05-06T12:23:08.291Z Has data issue: false hasContentIssue false

Efficient parallel and incremental parsing of practical context-free languages

Published online by Cambridge University Press:  23 July 2015

JEAN-PHILIPPE BERNARDY
Affiliation:
Chalmers University of Technology & University of Gothenburg, Sweden (e-mail: bernardy@chalmers.se, koen@chalmers.se)
KOEN CLAESSEN
Affiliation:
Chalmers University of Technology & University of Gothenburg, Sweden (e-mail: bernardy@chalmers.se, koen@chalmers.se)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

We present a divide-and-conquer algorithm for parsing context-free languages efficiently. Our algorithm is an instance of Valiant's (1975; General context-free recognition in less than cubic time. J. Comput. Syst. Sci.10(2), 308–314), who reduced the problem of parsing to matrix multiplications. We show that, while the conquer step of Valiant's is O(n3), it improves to O(log2n) under certain conditions satisfied by many useful inputs that occur in practice, and if one uses a sparse representation of matrices. The improvement happens because the multiplications involve an overwhelming majority of empty matrices. This result is relevant to modern computing: divide-and-conquer algorithms with a polylogarithmic conquer step can be parallelized relatively easily.

Information

Type
Articles
Copyright
Copyright © Cambridge University Press 2015 
Submit a response

Discussions

No Discussions have been published for this article.