Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 1.22 KB

ashdown_fgrep.md

File metadata and controls

32 lines (25 loc) · 1.22 KB

Ian Ashdown's fgrep

Author: Ian Ashdown (1984-1985)

An implementation of Unix fgrep using FSAs and the Aho–Corasick algorithm.

As described by typist notes of Dominic Shields' copy:

A full implementation of the UNIX 'fgrep' utility. The algorithm used in this program constructs a deterministic finite state automaton (FSA) for pattern matching from the substrings, then uses the FSA to process the text string in one pass. The time taken to construct the FSA is proportional to the sum of the lengths of the the substrings. The number of state transitions made by the FSA in processing the text string is independent of the number of substrings.

It cites:

"Efficient String Matching: An Aid to Bibliographic Search" Alfred V. Aho & Margaret J. Corasick Communications of the ACM pp. 333 - 340, Vol. 18 No. 6 (June '75)

Versions: