Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2004-12-01 07:45:52

Vladimir Prus wrote:

> I think the problem is that
> 1. We can't mark a specific group in regexp as "unimportant". In Perl/Python,
> regexp can have "non-capturing paranthesis",
> >>> r = re.compile("(?:foo|bar)(.*)")
> >>> m = r.match("foo10")
> >>>
> '10'
> >>>
> but I don't think bjam's regexps support that
> 2. Bjam passes only the first matched parenthesised group to the scanner.
> Looks like your hack is the simplest solution.

I'm not sure it will work, though :(. Are you?

The most proper solution would be to provide an additional (outer)
virtual function in the scanner class that can be used to get more
control over exactly what gets examined when scanning. It might be
neccessary to change the bjam core to do that, though. And maintaining
scanning speed is important there.

Dave Abrahams
Boost Consulting

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at