|
Boost-Build : |
From: David Abrahams (dave_at_[hidden])
Date: 2004-11-30 17:11:21
Hi. I'm trying to build a new docutils tool for processing
RestructuredText. I'm trying to write a scanner:
class rst-scanner : common-scanner
{
rule pattern ( )
{
return "^\\w*\\.\\.\\w+(include|image|figure)::\w+(.*)" ;
}
}
The problem is that the 2nd parenthesized group identifies the filename;
the first one should be ignored, and there's no way to express that
nicely. I'm guessing that this hack might work:
class rst-scanner : common-scanner
{
rule pattern ( )
{
return "^\\w*\\.\\.\\w+include::\w+(.*)"
"^\\w*\\.\\.\\w+image::\w+(.*)"
"^\\w*\\.\\.\\w+figure::\w+(.*)"
;
}
}
But really, there ought to be a more general mechanism, shouldn't there?
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk