arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2206.01398cs.FLcs.DS
收藏

对TDFA的深入探讨

A closer look at TDFA

Angelo Borsotti, Ulya Trafimovich

AI总结:

本文提出基于标记确定有限自动机的正则表达式解析与子匹配提取算法,探讨了不同歧义化解策略,并通过实例展示了优化过程。

摘要:

我们提出了一种基于标记确定有限自动机的正则表达式解析和子匹配提取算法。该算法适用于不同的歧义化解策略,提供了详细的伪代码,涵盖了重要的实际优化方法。所有从正则表达式到优化自动机的转换都通过逐步示例进行说明。我们考虑了提前确定和即时确定两种确定化方法,并描述了适用于每种设置的算法变种。我们提供了基准测试,显示该算法在实践中非常高效。我们的研究基于两个独立的实现:开源的词法分析器生成器RE2C和一个实验性Java库。

英文摘要:

We present an algorithm for regular expression parsing and submatch extraction based on tagged deterministic finite automata. The algorithm works with different disambiguation policies. We give detailed pseudocode for the algorithm, covering important practical optimizations. All transformations from a regular expression to an optimized automaton are explained on a step-by-step example. We consider both ahead-of-time and just-in-time determinization and describe variants of the algorithm suited to each setting. We provide benchmarks showing that the algorithm is very fast in practice. Our research is based on two independent implementations: an open-source lexer generator RE2C and an experimental Java library.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑