Optimally streaming greedy regular expression parsing

Niels Bjørn Bugge Grathwohl, Fritz Henglein, Ulrik Terp Rasmussen

6 Citationer (Scopus)

Abstract

We study the problem of streaming regular expression parsing: Given a regular expression and an input stream of symbols, how to output a serialized syntax tree representation as an output stream during input stream processing. We show that optimally streaming regular expression parsing, outputting bits of the output as early as is semantically possible for any regular expression of size m and any input string of length n, can be performed in time O(2mlogm + mn) on a unit-cost random-access machine. This is for the wide-spread greedy disambiguation strategy for choosing parse trees of grammatically ambiguous regular expressions. In particular, for a fixed regular expression, the algorithm’s run-time scales linearly with the input string length. The exponential is due to the need for preprocessing the regular expression to analyze state coverage of its associated NFA, a PSPACE-hard problem, and tabulating all reachable ordered sets of NFA-states. Previous regular expression parsing algorithms operate in multiple phases, always requiring processing or storing the whole input string before outputting the first bit of output, not only for those regular expressions and input prefixes where reading to the end of the input is strictly necessary.

OriginalsprogEngelsk
TitelTheoretical Aspects of Computing – ICTAC 2014 : 11th International Colloquium, Bucharest, Romania, September 17-19, 2014. Proceedings
RedaktørerGabriel Ciobanu, Dominique Méry
Antal sider17
ForlagSpringer
Publikationsdato2014
Sider224-240
Kapitel14
ISBN (Trykt)978-3-319-10881-0
ISBN (Elektronisk)978-3-319-10882-7
DOI
StatusUdgivet - 2014
Begivenhed11th International Colloquium on Theoretical Aspects of Computing - Bucharest, Rumænien
Varighed: 17 sep. 201419 sep. 2014
Konferencens nummer: 11

Konference

Konference11th International Colloquium on Theoretical Aspects of Computing
Nummer11
Land/OmrådeRumænien
ByBucharest
Periode17/09/201419/09/2014
NavnLecture notes in computer science
Vol/bind8687
ISSN0302-9743

Fingeraftryk

Dyk ned i forskningsemnerne om 'Optimally streaming greedy regular expression parsing'. Sammen danner de et unikt fingeraftryk.

Citationsformater