Boost logo

Boost :

From: Dave Jenkins (david_at_[hidden])
Date: 2007-11-23 23:51:08

"Dave Jenkins" <david_at_[hidden]> wrote in message
> Oh, I see. How about something like this? It allows you to selectively
> skip spaces for parts of your regex.

I was thinking about the "selective filter iterator" example that I posted
and realized that it won't handle xpressive backtracking properly. You can
see it malfunction if you change the regex to:

    regex_skip rx =
        normal >> as_xpr("a a") >>
        skip_spaces >> as_xpr("bb") >>
        *as_xpr('c') >> // This causes the regex to fail when it should
        normal >> "c c";

The "selective filter iterator" idea is right, it's just the iterator needs
to remember when to skip spaces as it backtracks. I'll post another
(hopefully correct) example when I've thought about it a bit.

Boost list run by bdawes at, gregod at, cpdaniel at, john at