Google Summer of Code
Jonathan Wakely
cow@compsoc.man.ac.uk
Wed Jun 1 11:05:00 GMT 2005
On Wed, Jun 01, 2005 at 03:53:58AM -0700, Jeyasankar Kottalam wrote:
> >I don't know if anyone is already working on them, or how hard they
> >would be to write, or if they are going to be borrowed from somewhere
> >else, but if google would pay someone to produce a nice finished version
> >of either regular expressions or random number generators (the two big
> >bits of TR1 we still seem to be missing), and a whole bunch of tests to
> >go with them, that seems like it would only be a good thing :)
>
> Hm... interesting. Would the regex library involve hand-rolling a parser and
> state machine? Or interfacing with an existing regex library? I haven't
> looked
> at the actual specification in TR1.
It needs to work with arbitrary character types, in the same way as
basic_iostream and basic_string do. It also should support almost every
RE syntax (perl, ecmascript, extended, basic, posix etc.)
That requires a regex_traits type to describe whether a character is a
metacharacter in the current syntax and a parser that will build a state
machine based on those traits. I see it as a framework for defining RE
grammars, along with a handful of predefined grammars such as basic and
extended REs.
It's quite a big task, which I'd love to have time to tackle, but don't.
It might be possible to borrow the Boost regex code that inspired the TR1
interface.
jon
--
Always forgive your enemies; nothing annoys them so much.
- Oscar Wilde
More information about the Libstdc++
mailing list