Fix for non-greedy repeats and partial matches not working correctly in all cases.

[SVN r34027]
This commit is contained in:
John Maddock
2006-05-19 13:06:19 +00:00
parent 9e7e1ba009
commit c4d13296e6

View File

@ -1066,6 +1066,8 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_slow_dot_repeat(bool
{
// can't repeat any more, remove the pushed state:
destroy_single_repeat();
if((m_match_flags & match_partial) && (position == last) && (position != search_base))
m_has_partial_match = true;
if(0 == (rep->can_be_null & mask_skip))
return true;
}
@ -1118,6 +1120,8 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_fast_dot_repeat(bool
{
// can't repeat any more, remove the pushed state:
destroy_single_repeat();
if((m_match_flags & match_partial) && (position == last) && (position != search_base))
m_has_partial_match = true;
if(0 == (rep->can_be_null & mask_skip))
return true;
}
@ -1182,6 +1186,8 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_char_repeat(bool r)
{
// can't repeat any more, remove the pushed state:
destroy_single_repeat();
if((m_match_flags & match_partial) && (position == last) && (position != search_base))
m_has_partial_match = true;
if(0 == (rep->can_be_null & mask_skip))
return true;
}
@ -1246,6 +1252,8 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_short_set_repeat(bool
{
// can't repeat any more, remove the pushed state:
destroy_single_repeat();
if((m_match_flags & match_partial) && (position == last) && (position != search_base))
m_has_partial_match = true;
if(0 == (rep->can_be_null & mask_skip))
return true;
}
@ -1311,6 +1319,8 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_long_set_repeat(bool
{
// can't repeat any more, remove the pushed state:
destroy_single_repeat();
if((m_match_flags & match_partial) && (position == last) && (position != search_base))
m_has_partial_match = true;
if(0 == (rep->can_be_null & mask_skip))
return true;
}