Boost logo

Boost Users :

From: John Maddock (john_maddock_at_[hidden])
Date: 2003-03-22 06:50:28


> >> (as an aside maybe we could catch bad ones better by replacing regex
> >strings
> >> with
> >> overloaded operators the way streams have superceded printf)
> >>
> Apologies for being slightly off topic for the users group.
> Has there been any work in this direction? We want to compile the
> expression for efficiency reasons. Building them up using operator<<
> might sacrifice this without an additional "reduction" phase to compile
> down to the most efficient automata. I guess this would be the regexp
> equivalent to endl.
> Still I like the idea as a debugging tool and I don't think the efficiency
> lost would be prohibitive.
> Regular expressions being more like trees rather than streams the <<
syntax
> might get a bit ugly with all the brackets required.
> E.g.

I think that's not all that easy - as you say dealing with nested
sub-expressions and the like is pretty nasty.

> How about the equivalent using some hidden template metaprogramming
> (for use when the expression is fixed at compile time)
> I have a feeling that the complexity added relative to the minor
> inconvenience of setting up the expression on start-up outweigh the
> benefits.

Have you looked at spirirt? OK it's a parser not a regex engine but there is
some overlap.

John


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net