aboutsummaryrefslogtreecommitdiff
path: root/cutl/details/boost/regex/v4/perl_matcher_non_recursive.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'cutl/details/boost/regex/v4/perl_matcher_non_recursive.hpp')
-rw-r--r--cutl/details/boost/regex/v4/perl_matcher_non_recursive.hpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/cutl/details/boost/regex/v4/perl_matcher_non_recursive.hpp b/cutl/details/boost/regex/v4/perl_matcher_non_recursive.hpp
index e4b1e1e..9e3d74d 100644
--- a/cutl/details/boost/regex/v4/perl_matcher_non_recursive.hpp
+++ b/cutl/details/boost/regex/v4/perl_matcher_non_recursive.hpp
@@ -828,9 +828,9 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat()
#ifdef __BORLANDC__
#pragma option push -w-8008 -w-8066 -w-8004
#endif
- typedef typename traits::char_class_type mask_type;
+ typedef typename traits::char_class_type m_type;
const re_repeat* rep = static_cast<const re_repeat*>(pstate);
- const re_set_long<mask_type>* set = static_cast<const re_set_long<mask_type>*>(pstate->next.p);
+ const re_set_long<m_type>* set = static_cast<const re_set_long<m_type>*>(pstate->next.p);
std::size_t count = 0;
//
// start by working out how much we can skip:
@@ -1268,6 +1268,9 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_fast_dot_repeat(bool
}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:
@@ -1434,7 +1437,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_short_set_repeat(bool
template <class BidiIterator, class Allocator, class traits>
bool perl_matcher<BidiIterator, Allocator, traits>::unwind_long_set_repeat(bool r)
{
- typedef typename traits::char_class_type mask_type;
+ typedef typename traits::char_class_type m_type;
saved_single_repeat<BidiIterator>* pmp = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
// if we have a match, just discard this state:
@@ -1447,7 +1450,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_long_set_repeat(bool
const re_repeat* rep = pmp->rep;
std::size_t count = pmp->count;
pstate = rep->next.p;
- const re_set_long<mask_type>* set = static_cast<const re_set_long<mask_type>*>(pstate);
+ const re_set_long<m_type>* set = static_cast<const re_set_long<m_type>*>(pstate);
position = pmp->last_position;
BOOST_ASSERT(rep->type == syntax_element_long_set_rep);