3 ms·
There are many implementations the standard operations on finite state automata (determinization, minimization, intersection, concatenation, etc.) and nearly as
by danieldk 13y ago
There are many implementations the standard operations on finite state automata (determinization, minimization, intersection, concatenation, etc.) and nearly as many implementations of regular expressions[1]. Anyone who is in the trade (of text processing), including Bram Molenaar, will be aware that regular languages can be represented as finite state automata.
However, the problem is that not all regular expressions 'dialects' (most notably Perl regexes) are not regular languages and cannot be represented as a finite state automata. For instance, the introduction of back-references makes regular expressions non-regular.
So, it's not so much being enlightened by Russ Cox, but a trade-off between the convenience of some of the Perl extensions and the ability to apply matching in linear time. Also, for complex expressions, constructing the automaton can be slow.
[1]
A small selection:
http://www.brics.dk/automaton/ http://www.brics.dk/automaton/
http://www.let.rug.nl/~vannoord/Fsa/ http://www.let.rug.nl/~vannoord/Fsa/
http://www.complang.org/ragel/ http://www.complang.org/ragel/
http://open.xerox.com/Services/fst-nlp-tools http://open.xerox.com/Services/fst-nlp-tools
Some of the packages can also be used to construct transducers, weighted automata, etc.