Browse thread
Regular expression matching against OCaml streams.
-
Dmitri Boulytchev
-
Edgar Friendly
- Chris Conway
-
Edgar Friendly
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Chris Conway <cconway@c...> |
| Subject: | Re: Regular expression matching against OCaml streams. |
Edgar Friendly <thelema314 <at> gmail.com> writes:
>
> Dmitri Boulytchev wrote:
> > Hello,
> >
> > is it possible to match OCam streams (by mean of Stream.t) against
> > regular expressions? Are there library
> > that can be used for this purpose? Str matches only against strings.
>
> I don't know of any libraries for this purpose. I will warn anyone
> making one that it's easy for simple regex matching to evaluate the
> whole stream, and then fail to match.
Or worse, never terminate. E.g.,
stream_match "a*b" (Stream.from (fun _ -> Some 'a'))
Regards,
Chris