forked from boostorg/regex
Final tweaks prior to release...
[SVN r18399]
This commit is contained in:
@ -439,7 +439,7 @@ void raise_error(const traits& t, unsigned code)
|
||||
****************************************************************************/
|
||||
|
||||
#if !defined(BOOST_REGEX_RECURSIVE) && !defined(BOOST_REGEX_NON_RECURSIVE)
|
||||
# ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
|
||||
# if defined(BOOST_REGEX_HAS_MS_STACK_GUARD) && !defined(_STLP_DEBUG) && !defined(__STL_DEBUG)
|
||||
# define BOOST_REGEX_RECURSIVE
|
||||
# else
|
||||
# define BOOST_REGEX_NON_RECURSIVE
|
||||
|
@ -134,6 +134,9 @@ BOOST_LIB_DEBUG_OPT: nothing for release builds,
|
||||
//
|
||||
// select linkage opt:
|
||||
//
|
||||
#if defined(BOOST_REGEX_STATIC_LINK) && defined(BOOST_REGEX_DYN_LINK)
|
||||
# undef BOOST_REGEX_STATIC_LINK
|
||||
#endif
|
||||
#if (defined(_DLL) || defined(_RTLDLL)) && !defined(BOOST_REGEX_STATIC_LINK)
|
||||
# define BOOST_LIB_LINK_OPT "i"
|
||||
#else
|
||||
|
@ -28,9 +28,9 @@
|
||||
// locale:
|
||||
// #define BOOST_REGEX_USE_CPP_LOCALE
|
||||
|
||||
// define this if you want to statically link to regex,
|
||||
// even when the runtime is a dll (Probably Win32 specific):
|
||||
// #define BOOST_REGEX_STATIC_LINK
|
||||
// define this if you want to dynamically link to regex,
|
||||
// if the runtime library is also a dll (Probably Win32 specific):
|
||||
// #define BOOST_REGEX_DYN_LINK
|
||||
|
||||
// define this if you don't want the lib to automatically
|
||||
// select its link libraries:
|
||||
|
@ -158,7 +158,11 @@ public:
|
||||
|
||||
allocator_type get_allocator() const
|
||||
{
|
||||
#ifndef BOOST_NO_STD_ALLOCATOR
|
||||
return m_subs.get_allocator();
|
||||
#else
|
||||
return allocator_type();
|
||||
#endif
|
||||
}
|
||||
void swap(match_results& that)
|
||||
{
|
||||
|
@ -859,6 +859,7 @@ bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_greedy_si
|
||||
{
|
||||
--position;
|
||||
--count;
|
||||
++state_count;
|
||||
}while(count && !access::can_start(*position, rep->_map, mask_skip));
|
||||
|
||||
// if we've hit base, destroy this state:
|
||||
@ -912,6 +913,7 @@ bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_slow_dot_
|
||||
return true;
|
||||
}
|
||||
++count;
|
||||
++state_count;
|
||||
pstate = rep->next.p;
|
||||
}while((count < rep->max) && (position != last) && !access::can_start(*position, rep->_map, mask_skip));
|
||||
}
|
||||
@ -963,6 +965,7 @@ bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_fast_dot_
|
||||
{
|
||||
++position;
|
||||
++count;
|
||||
++state_count;
|
||||
}while((count < rep->max) && (position != last) && !access::can_start(*position, rep->_map, mask_skip));
|
||||
}
|
||||
|
||||
@ -1026,6 +1029,7 @@ bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_char_repe
|
||||
}
|
||||
++count;
|
||||
++ position;
|
||||
++state_count;
|
||||
pstate = rep->next.p;
|
||||
}while((count < rep->max) && (position != last) && !access::can_start(*position, rep->_map, mask_skip));
|
||||
}
|
||||
@ -1089,6 +1093,7 @@ bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_short_set
|
||||
}
|
||||
++count;
|
||||
++ position;
|
||||
++state_count;
|
||||
pstate = rep->next.p;
|
||||
}while((count < rep->max) && (position != last) && !access::can_start(*position, rep->_map, mask_skip));
|
||||
}
|
||||
@ -1153,6 +1158,7 @@ bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_long_set_
|
||||
}
|
||||
++position;
|
||||
++count;
|
||||
++state_count;
|
||||
pstate = rep->next.p;
|
||||
}while((count < rep->max) && (position != last) && !access::can_start(*position, rep->_map, mask_skip));
|
||||
}
|
||||
|
@ -309,6 +309,7 @@ bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_dot_repeat
|
||||
restart = position;
|
||||
pstate = rep->alt.p;
|
||||
save_pos = position;
|
||||
++state_count;
|
||||
if(match_all_states())
|
||||
return true;
|
||||
if(count >= rep->max)
|
||||
@ -360,6 +361,7 @@ bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_dot_repeat
|
||||
restart = position;
|
||||
pstate = rep->alt.p;
|
||||
save_pos = position;
|
||||
++state_count;
|
||||
if(match_all_states())
|
||||
return true;
|
||||
if(count >= rep->max)
|
||||
@ -434,6 +436,7 @@ bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_char_repea
|
||||
restart = position;
|
||||
pstate = rep->alt.p;
|
||||
save_pos = position;
|
||||
++state_count;
|
||||
if(match_all_states())
|
||||
return true;
|
||||
if(count >= rep->max)
|
||||
@ -507,6 +510,7 @@ bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_set_repeat
|
||||
restart = position;
|
||||
pstate = rep->alt.p;
|
||||
save_pos = position;
|
||||
++state_count;
|
||||
if(match_all_states())
|
||||
return true;
|
||||
if(count >= rep->max)
|
||||
@ -580,6 +584,7 @@ bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_long_set_r
|
||||
restart = position;
|
||||
pstate = rep->alt.p;
|
||||
save_pos = position;
|
||||
++state_count;
|
||||
if(match_all_states())
|
||||
return true;
|
||||
if(count >= rep->max)
|
||||
@ -628,6 +633,7 @@ bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::backtrack_till_m
|
||||
{
|
||||
--position;
|
||||
--count;
|
||||
++state_count;
|
||||
}
|
||||
pstate = rep->alt.p;
|
||||
backtrack = position;
|
||||
@ -636,6 +642,7 @@ bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::backtrack_till_m
|
||||
if(count == 0)
|
||||
return false;
|
||||
position = --backtrack;
|
||||
++state_count;
|
||||
--count;
|
||||
}while(true);
|
||||
#ifdef BOOST_MSVC
|
||||
|
@ -24,6 +24,7 @@
|
||||
#define BOOST_REGEX_V4_REGEX_TOKEN_ITERATOR_HPP
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
namespace boost{
|
||||
|
||||
@ -49,6 +50,7 @@ public:
|
||||
: end(last), pre(p), flags(f){ subs.push_back(sub); }
|
||||
regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const std::vector<int>& v, match_flag_type f)
|
||||
: end(last), pre(p), subs(v), flags(f){}
|
||||
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
template <std::size_t N>
|
||||
regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const int (&submatches)[N], match_flag_type f)
|
||||
: end(last), pre(p), flags(f)
|
||||
@ -56,6 +58,7 @@ public:
|
||||
for(std::size_t i = 0; i < N; ++i)
|
||||
subs.push_back(submatches[i]);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool init(BidirectionalIterator first)
|
||||
{
|
||||
@ -146,6 +149,7 @@ public:
|
||||
if(!pdata->init(a))
|
||||
pdata.reset();
|
||||
}
|
||||
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
template <std::size_t N>
|
||||
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
|
||||
const int (&submatches)[N], match_flag_type m = match_default)
|
||||
@ -154,7 +158,7 @@ public:
|
||||
if(!pdata->init(a))
|
||||
pdata.reset();
|
||||
}
|
||||
|
||||
#endif
|
||||
regex_token_iterator(const regex_token_iterator& that)
|
||||
: pdata(that.pdata) {}
|
||||
regex_token_iterator& operator=(const regex_token_iterator& that)
|
||||
@ -206,4 +210,6 @@ private:
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_REGEX_V4_REGEX_TOKEN_ITERATOR_HPP
|
||||
#endif // BOOST_REGEX_V4_REGEX_TOKEN_ITERATOR_HPP
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user