On Tue, 21 Oct 2003 13:47:51 +0100 Graham Klyne <[EMAIL PROTECTED]> wrote:
> At 04:17 21/10/03 -0400, [EMAIL PROTECTED] wrote: > >I think I might have mentioned this previously, but here's an > >interesting implementation of Knuth-Morris-Pratt substring searching > >(which is indeed a "little language") which illustrates something or > >other: > > > > http://haskell.org/hawiki/RunTimeCompilation > > Nice. Do you know if anyone has done anything like this for regular > expressions? I'm thinking in particular that a function that turned a > regular expression into a Parsec parser function could be useful, as > in: > > regexp.compile :: String -> GenParser Char st [String] > > where GenParser is defined by the Parsec library [1], and the parsed > result is a list of substrings corresponding to the (...) parts of the > regexp (if matched, of course). (The parser result type might warrant > some refinement.) This page is full of strange and wonderful things, http://www.haskell.org/libraries/ How 'bout the Haskell Dynamic Lexer Engine http://www.nondot.org/sabre/Projects/HaskellLexer/ It doesn't create a Parsec parser, but it would be very easy to make a function with it that did. _______________________________________________ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe