|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r81705 - trunk/boost/regex/v4
From: john_at_[hidden]
Date: 2012-12-04 11:51:19
Author: johnmaddock
Date: 2012-12-04 11:51:18 EST (Tue, 04 Dec 2012)
New Revision: 81705
URL: http://svn.boost.org/trac/boost/changeset/81705
Log:
Add missing optimization for leading .* repeats.
Fixes #7758.
Text files modified:
trunk/boost/regex/v4/perl_matcher_non_recursive.hpp | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
Modified: trunk/boost/regex/v4/perl_matcher_non_recursive.hpp
==============================================================================
--- trunk/boost/regex/v4/perl_matcher_non_recursive.hpp (original)
+++ trunk/boost/regex/v4/perl_matcher_non_recursive.hpp 2012-12-04 11:51:18 EST (Tue, 04 Dec 2012)
@@ -1268,6 +1268,9 @@
}while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip));
}
+ // remember where we got to if this is a leading repeat:
+ if((rep->leading) && (count < rep->max))
+ restart = position;
if(position == last)
{
// can't repeat any more, remove the pushed state:
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