|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r83820 - trunk/tools/build/v2/build
From: steven_at_[hidden]
Date: 2013-04-09 11:06:07
Author: steven_watanabe
Date: 2013-04-09 11:06:06 EDT (Tue, 09 Apr 2013)
New Revision: 83820
URL: http://svn.boost.org/trac/boost/changeset/83820
Log:
Anchor regular expressions.
Text files modified:
trunk/tools/build/v2/build/property.jam | 18 +++++++-----------
1 files changed, 7 insertions(+), 11 deletions(-)
Modified: trunk/tools/build/v2/build/property.jam
==============================================================================
--- trunk/tools/build/v2/build/property.jam (original)
+++ trunk/tools/build/v2/build/property.jam 2013-04-09 11:06:06 EDT (Tue, 09 Apr 2013)
@@ -110,11 +110,11 @@
for local p in $(conditionals)
{
# Separate condition and property.
- local s = [ MATCH (.*):(<.*) : $(p) ] ;
+ local s = [ MATCH ^(.*):(<.*) : $(p) ] ;
# Split condition into individual properties.
local condition = [ regex.split $(s[1]) "," ] ;
# Evaluate condition.
- if ! [ MATCH (!).* : $(condition:G=) ]
+ if ! [ MATCH ^(!).* : $(condition:G=) ]
{
# Only positive checks
if $(condition) in $(context)
@@ -129,7 +129,7 @@
while $(condition)
{
local c = $(condition[1]) ;
- local m = [ MATCH !(.*) : $(c) ] ;
+ local m = [ MATCH ^!(.*) : $(c) ] ;
if $(m)
{
local p = $(m:G=$(c:G)) ;
@@ -164,7 +164,7 @@
local result ;
for local p in $(properties)
{
- local s = [ MATCH (.*):(<.*) : $(p) ] ;
+ local s = [ MATCH ^(.*):(<.*) : $(p) ] ;
if ! $(s)
{
result += $(p) ;
@@ -459,11 +459,7 @@
#
rule split-conditional ( property )
{
- local m = [ MATCH "(.+):<(.+)" : $(property) ] ;
- if $(m)
- {
- return $(m[1]) <$(m[2]) ;
- }
+ return [ MATCH "^(.+):(<.+)" : $(property) ] ;
}
@@ -526,7 +522,7 @@
}
else
{
- if ! [ MATCH ".*([.]).*" : $(m) ]
+ if ! [ MATCH "([.])" : $(m) ]
{
# This is an unqualified rule name. The user might want to
# set flags on this rule name and toolset.flag
@@ -570,7 +566,7 @@
}
if dependency in [ feature.attributes $(p:G) ]
{
- local split-target = [ regex.match (.*)//(.*) : $(p:G=) ] ;
+ local split-target = [ regex.match ^(.*)//(.*) : $(p:G=) ] ;
if $(split-target)
{
local rooted = [ path.root [ path.make $(split-target[1]) ]
Boost-Commit 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