Product-Linear POSIX Parsing
Yuya Uezato
Key points
From the paper's conclusion- We give, to our knowledge, the first algorithm that computes the POSIX parse and all capture spans in product-linear total time, $O(|E|\,|w|)$.
Abstract
POSIX regular-expression matching reports capture spans determined by the parse tree that its disambiguation rules select. Thompson's classical construction decides whether an expression $E$ matches a text $w$ in product-linear time, $O(|E|\,|w|)$. Whether the POSIX parse can also be computed in product-linear time has remained open since the rules were standardized in 1992. For instance, the algorithm of Okui and Suzuki takes $O(|E|^2|w|)$ time after precomputation. We give, to our knowledge, the first algorithm that computes the POSIX parse and all capture spans in product-linear total time, $O(|E|\,|w|)$. It uses $O(|E|+|w|)$ working space and supports full matching, longest-prefix matching, and leftmost-longest search. The algorithm scans the text backward and keeps one preferred continuation per traversal state. It implements POSIX selection with lists of end positions of the open subexpressions, which it compares and updates in constant time.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Faster Regular Expression Matching via Two-Dimensional TabulationarXiv · 2026
- On the Adaptive Covering Complexity of Strings: Unifying Relative and Self-Referential CompressionarXiv · 2026
- Move-rb: Faster Bi-Directional r-indexes and Approximate Pattern MatchingarXiv · 2026
- Filtr: Compiling Bioinformatics RecurrencesProceedings of the ACM on Programming Languages · 2026
- Polynomial-Time Minimax Prediction for Stationary Renewal ProcessesarXiv · 2026
- Faster polynomial-space algorithms for poset problemsarXiv · 2026