From a69678c3c6318ba8a121446ceac4d5e776501320 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sat, 24 May 2003 11:14:53 +0000 Subject: [PATCH] stripped tabs from files [SVN r18526] --- include/boost/regex/v4/match_results.hpp | 2 +- .../regex/v4/perl_matcher_non_recursive.hpp | 99 ++++++++++--------- include/boost/regex/v4/regex_compile.hpp | 2 +- 3 files changed, 52 insertions(+), 51 deletions(-) diff --git a/include/boost/regex/v4/match_results.hpp b/include/boost/regex/v4/match_results.hpp index df21590f..47178c5f 100644 --- a/include/boost/regex/v4/match_results.hpp +++ b/include/boost/regex/v4/match_results.hpp @@ -161,7 +161,7 @@ public: #ifndef BOOST_NO_STD_ALLOCATOR return m_subs.get_allocator(); #else - return allocator_type(); + return allocator_type(); #endif } void swap(match_results& that) diff --git a/include/boost/regex/v4/perl_matcher_non_recursive.hpp b/include/boost/regex/v4/perl_matcher_non_recursive.hpp index 0f5599e5..da4ef191 100644 --- a/include/boost/regex/v4/perl_matcher_non_recursive.hpp +++ b/include/boost/regex/v4/perl_matcher_non_recursive.hpp @@ -34,7 +34,7 @@ namespace boost{ namespace re_detail{ template -inline void destroy(T* p) +inline void inplace_destroy(T* p) { (void)p; // warning suppression p->~T(); @@ -485,15 +485,15 @@ bool perl_matcher::match_dot_repeat if(count - rep->min) push_single_repeat(count, rep, position, saved_state_greedy_single_repeat); // jump to next state: - pstate = rep->alt.p; - return true; + pstate = rep->alt.p; + return true; } else { // non-greedy, push state and return true if we can skip: if(count < rep->max) push_single_repeat(count, rep, position, saved_state_rep_slow_dot); - pstate = rep->alt.p; + pstate = rep->alt.p; return (position == last) ? (rep->can_be_null & mask_skip) : access::can_start(*position, rep->_map, mask_skip); } } @@ -518,15 +518,15 @@ bool perl_matcher::match_dot_repeat if(count - rep->min) push_single_repeat(count, rep, position, saved_state_greedy_single_repeat); // jump to next state: - pstate = rep->alt.p; - return true; + pstate = rep->alt.p; + return true; } else { // non-greedy, push state and return true if we can skip: if(count < rep->max) push_single_repeat(count, rep, position, saved_state_rep_fast_dot); - pstate = rep->alt.p; + pstate = rep->alt.p; return (position == last) ? (rep->can_be_null & mask_skip) : access::can_start(*position, rep->_map, mask_skip); } } @@ -577,15 +577,15 @@ bool perl_matcher::match_char_repea if(count - rep->min) push_single_repeat(count, rep, position, saved_state_greedy_single_repeat); // jump to next state: - pstate = rep->alt.p; - return true; + pstate = rep->alt.p; + return true; } else { // non-greedy, push state and return true if we can skip: if(count < rep->max) push_single_repeat(count, rep, position, saved_state_rep_char); - pstate = rep->alt.p; + pstate = rep->alt.p; return (position == last) ? (rep->can_be_null & mask_skip) : access::can_start(*position, rep->_map, mask_skip); } #ifdef BOOST_MSVC @@ -638,15 +638,15 @@ bool perl_matcher::match_set_repeat if(count - rep->min) push_single_repeat(count, rep, position, saved_state_greedy_single_repeat); // jump to next state: - pstate = rep->alt.p; - return true; + pstate = rep->alt.p; + return true; } else { // non-greedy, push state and return true if we can skip: if(count < rep->max) push_single_repeat(count, rep, position, saved_state_rep_short_set); - pstate = rep->alt.p; + pstate = rep->alt.p; return (position == last) ? (rep->can_be_null & mask_skip) : access::can_start(*position, rep->_map, mask_skip); } #ifdef BOOST_MSVC @@ -699,15 +699,15 @@ bool perl_matcher::match_long_set_r if(count - rep->min) push_single_repeat(count, rep, position, saved_state_greedy_single_repeat); // jump to next state: - pstate = rep->alt.p; - return true; + pstate = rep->alt.p; + return true; } else { // non-greedy, push state and return true if we can skip: if(count < rep->max) push_single_repeat(count, rep, position, saved_state_rep_long_set); - pstate = rep->alt.p; + pstate = rep->alt.p; return (position == last) ? (rep->can_be_null & mask_skip) : access::can_start(*position, rep->_map, mask_skip); } #ifdef BOOST_MSVC @@ -761,14 +761,14 @@ bool perl_matcher::unwind_paren(boo } // unwind stack: m_backup_state = pmp+1; - boost::re_detail::destroy(pmp); + boost::re_detail::inplace_destroy(pmp); return true; // keep looking } template bool perl_matcher::unwind_recursion_stopper(bool) { - boost::re_detail::destroy(m_backup_state++); + boost::re_detail::inplace_destroy(m_backup_state++); pstate = 0; // nothing left to search return false; // end of stack nothing more to search } @@ -781,7 +781,7 @@ bool perl_matcher::unwind_assertion position = pmp->position; bool result = (r == pmp->positive); m_recursive_result = pmp->positive ? r : !r; - boost::re_detail::destroy(pmp++); + boost::re_detail::inplace_destroy(pmp++); m_backup_state = pmp; return !result; // return false if the assertion was matched to stop search. } @@ -795,7 +795,7 @@ bool perl_matcher::unwind_alt(bool pstate = pmp->pstate; position = pmp->position; } - boost::re_detail::destroy(pmp++); + boost::re_detail::inplace_destroy(pmp++); m_backup_state = pmp; return r; } @@ -804,7 +804,7 @@ template bool perl_matcher::unwind_repeater_counter(bool) { saved_repeater* pmp = static_cast*>(m_backup_state); - boost::re_detail::destroy(pmp++); + boost::re_detail::inplace_destroy(pmp++); m_backup_state = pmp; return true; // keep looking } @@ -816,7 +816,7 @@ bool perl_matcher::unwind_extra_blo void* condemmed = m_stack_base; m_stack_base = pmp->base; m_backup_state = pmp->end; - boost::re_detail::destroy(pmp); + boost::re_detail::inplace_destroy(pmp); block_cache.put(condemmed); return true; // keep looking } @@ -825,7 +825,7 @@ template inline void perl_matcher::destroy_single_repeat() { saved_single_repeat* p = static_cast*>(m_backup_state); - boost::re_detail::destroy(p++); + boost::re_detail::inplace_destroy(p++); m_backup_state = p; } @@ -841,26 +841,26 @@ bool perl_matcher::unwind_greedy_si return true; } - const re_repeat* rep = pmp->rep; + const re_repeat* rep = pmp->rep; unsigned count = pmp->count; assert(rep->next.p); assert(rep->alt.p); - count -= rep->min; + count -= rep->min; if((m_match_flags & match_partial) && (position == last)) - m_has_partial_match = true; + m_has_partial_match = true; assert(count); position = pmp->last_position; // backtrack till we can skip out: - do - { - --position; - --count; + do + { + --position; + --count; ++state_count; - }while(count && !access::can_start(*position, rep->_map, mask_skip)); + }while(count && !access::can_start(*position, rep->_map, mask_skip)); // if we've hit base, destroy this state: if(count == 0) @@ -874,8 +874,8 @@ bool perl_matcher::unwind_greedy_si pmp->count = count + rep->min; pmp->last_position = position; } - pstate = rep->alt.p; - return false; + pstate = rep->alt.p; + return false; } template @@ -890,7 +890,7 @@ bool perl_matcher::unwind_slow_dot_ return true; } - const re_repeat* rep = pmp->rep; + const re_repeat* rep = pmp->rep; unsigned count = pmp->count; assert(rep->type == syntax_element_dot_rep); assert(rep->next.p); @@ -936,8 +936,8 @@ bool perl_matcher::unwind_slow_dot_ pmp->count = count; pmp->last_position = position; } - pstate = rep->alt.p; - return false; + pstate = rep->alt.p; + return false; } template @@ -952,7 +952,7 @@ bool perl_matcher::unwind_fast_dot_ return true; } - const re_repeat* rep = pmp->rep; + const re_repeat* rep = pmp->rep; unsigned count = pmp->count; assert(count < rep->max); @@ -988,8 +988,8 @@ bool perl_matcher::unwind_fast_dot_ pmp->count = count; pmp->last_position = position; } - pstate = rep->alt.p; - return false; + pstate = rep->alt.p; + return false; } template @@ -1004,7 +1004,7 @@ bool perl_matcher::unwind_char_repe return true; } - const re_repeat* rep = pmp->rep; + const re_repeat* rep = pmp->rep; unsigned count = pmp->count; pstate = rep->next.p; const char_type what = *reinterpret_cast(static_cast(pstate) + 1); @@ -1052,8 +1052,8 @@ bool perl_matcher::unwind_char_repe pmp->count = count; pmp->last_position = position; } - pstate = rep->alt.p; - return false; + pstate = rep->alt.p; + return false; } template @@ -1068,7 +1068,7 @@ bool perl_matcher::unwind_short_set return true; } - const re_repeat* rep = pmp->rep; + const re_repeat* rep = pmp->rep; unsigned count = pmp->count; pstate = rep->next.p; const unsigned char* map = static_cast(rep->next.p)->_map; @@ -1116,8 +1116,8 @@ bool perl_matcher::unwind_short_set pmp->count = count; pmp->last_position = position; } - pstate = rep->alt.p; - return false; + pstate = rep->alt.p; + return false; } template @@ -1132,7 +1132,7 @@ bool perl_matcher::unwind_long_set_ return true; } - const re_repeat* rep = pmp->rep; + const re_repeat* rep = pmp->rep; unsigned count = pmp->count; pstate = rep->next.p; const re_set_long* set = static_cast(pstate); @@ -1181,8 +1181,8 @@ bool perl_matcher::unwind_long_set_ pmp->count = count; pmp->last_position = position; } - pstate = rep->alt.p; - return false; + pstate = rep->alt.p; + return false; } template @@ -1195,7 +1195,7 @@ bool perl_matcher::unwind_non_greed pstate = pmp->pstate; ++(*next_count); } - boost::re_detail::destroy(pmp++); + boost::re_detail::inplace_destroy(pmp++); m_backup_state = pmp; return r; } @@ -1228,3 +1228,4 @@ perl_matcher::s_unwind_table[] = #endif #endif + diff --git a/include/boost/regex/v4/regex_compile.hpp b/include/boost/regex/v4/regex_compile.hpp index 28f81d31..36ce2fd0 100644 --- a/include/boost/regex/v4/regex_compile.hpp +++ b/include/boost/regex/v4/regex_compile.hpp @@ -2130,7 +2130,7 @@ unsigned int BOOST_REGEX_CALL reg_expression::fixup_le return len; } return len; - case re_detail::syntax_element_startmark: + case re_detail::syntax_element_startmark: if(static_cast(dat)->index == -2) return 0; // fall through: