AI 中文总结
针对传统正则表达式回溯实现速度慢的问题,研究带前瞻功能的正则表达式REwLA,提出将其转换为对应有限状态自动机的方法,还扩展到加权REwLA的转换。
AI 中文摘要
大多数传统正则表达式实现基于回溯,这类实现在最坏情况下速度较慢,因此我们希望开发更优的匹配算法。然而,提供能处理子匹配寻址等实际扩展的高效匹配算法并非易事。本文研究带前瞻和负前瞻功能的正则表达式,缩写为REwLA。首先,我们提出将规模为m的REwLA转换为状态数为O(2^(2^m))的确定性有限自动机的方法。接着,我们考虑加权正则表达式,其可用于计算子匹配寻址,我们提出将规模为m的加权REwLA转换为状态数为O(2^(2^m))的加权非确定性有限自动机的方法。
英文摘要
Most of the conventional implementations of regular expressions are based on backtracking. Such implementations are slow in the worst case, and thus, we would like to develop a better matching algorithm. However, it is nontrivial to provide an efficient matching algorithm that can deal with practical extensions including submatch addressing. This paper studies regular expression with lookaheads and negative lookaheads, abbreviated to REwLA. First, we propose a transformation from a REwLA of size $m$ to a deterministic finite automaton of $\mr{O}(2^{2^m})$ states. Next, we consider weighted regular expressions, which enable us to calculate submatch addressing. We propose a transformation from a weighted REwLA of size $m$ to a weighted nondeterministic finite automaton of $\mr{O}(2^{2^m})$ states.
CommentsThis article is author's unofficial English translation of: A. Morihata, "Sakiyomi tsuki seikihyougen no yuugenjoutai ohtomaton heno henkan'', (Computer Software, Vol. 29, No. 1, pp. 147--158, 2012, in Japanese. ). See "Note Added in Translation" for detail
Journal refA. Morihata, Sakiyomi tsuki seikihyougen no yuugenjoutai ohtomaton heno henkan, Computer Software, Vol. 29, No. 1, pp. 147--158, 2012, in Japanese