A practical method for implementing string pattern matching machines
A practical method for implementing string pattern matching machines
复制标题
一种实现字符串模式匹配机的实用方法
DOI:
10.1016/0020-0255(92)90113-m
复制
发表时间:
1992
期刊:
影响因子:
--
通讯作者:
J. Aoe
中科院分区:
文献类型:
--
作者:
J. Aoe
A compact and fast data structure is presented to implement the static transition table of a string pattern matching machine that locates all occurrences of a finite number of keywords in a text string. The approach is related to a triple-array structure for implementing the transition table of a finite state machine, and the structure has been utilized by many users as compiler-compilers LEX and YACC in UNIX systems. By restricting the transition table of the finite state machine to that of the string pattern matching machine, the triple-array structure can be reduced to a structure of two arrays. The matching algorithm can be speeded up by a finite straight program without loops. It is shown by theoretical and empirical observations that the pattern matching machine by the presented structure is about 33% smaller and about 1.3 times faster than that by the triple array.