Merged from main truck

[SVN r17910]
This commit is contained in:
John Maddock
2003-03-14 12:18:04 +00:00
parent 686a939498
commit 6d4dd63cba
3 changed files with 39 additions and 4 deletions

View File

@ -1990,6 +1990,8 @@ unsigned int BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::probe_re
{
case re_detail::syntax_element_startmark:
case re_detail::syntax_element_endmark:
if(static_cast<const re_detail::re_brace*>(dat)->index == -2)
return regbase::restart_any;
return probe_restart(dat->next.p);
case re_detail::syntax_element_start_line:
return regbase::restart_line;
@ -2018,7 +2020,7 @@ unsigned int BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::fixup_le
if((leading_lit) && (static_cast<re_detail::re_literal*>(dat)->length > 2))
{
// we can do a literal search for the leading literal string
// using Knuth-Morris-Pratt (or whatever), and only then check for
// using Knuth-Morris-Pratt (or whatever), and only then check for
// matches. We need a decent length string though to make it
// worth while.
_leading_string = reinterpret_cast<charT*>(reinterpret_cast<char*>(dat) + sizeof(re_detail::re_literal));
@ -2070,6 +2072,10 @@ unsigned int BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::fixup_le
return len;
}
return len;
case re_detail::syntax_element_startmark:
if(static_cast<const re_detail::re_brace*>(dat)->index == -2)
return 0;
// fall through:
default:
break;
}