Is there a book that explains the algorithm used by the regular expression functions, and optionally shows an implementation in some high level language?
views:
122answers:
4
A:
Pattern Matching is a staple of Functional Programming Languages like Haskell, Scala and ML. There is a nice book by Simon Peyton Jones, original author and current maintainer of the Glorious Glasgow Haskell Compiler (GHC), called The Implementation of Functional Programming Languages which contains three entire chapters just on Pattern Matching.
Jörg W Mittag
2010-06-23 20:52:08
+6
A:
Not a book, but Russ Cox's work here gives an overview.
You might also want to reference Ken Thompson's original work (found in the link I listed above):
Ken Thompson, ‘‘Regular Expression Search Algorithm’’, CACM11(6), June 1968, pp. 419-422.
labratmatt
2010-06-23 20:52:11
A:
I'm relatively certain there're some examples in CLRS' Introduction to Algorithms.
mipadi
2010-06-23 20:56:29
No. There aren't. (At least in the second edition.)
Moron
2010-06-24 03:26:05