|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r66590 - in sandbox/regex-allocator: boost/regex boost/regex/v4 libs/regex/build libs/regex/example libs/regex/test libs/regex/test/concepts
From: john_at_[hidden]
Date: 2010-11-15 11:04:54
Author: johnmaddock
Date: 2010-11-15 11:04:34 EST (Mon, 15 Nov 2010)
New Revision: 66590
URL: http://svn.boost.org/trac/boost/changeset/66590
Log:
Commit basic version of regex in which basic_regex has an allocator.
Changes effect interface only, not the implementation (yet).
Text files modified:
sandbox/regex-allocator/boost/regex/concepts.hpp | 49 ++++++
sandbox/regex-allocator/boost/regex/mfc.hpp | 24 +-
sandbox/regex-allocator/boost/regex/v4/basic_regex.hpp | 73 +++++-----
sandbox/regex-allocator/boost/regex/v4/basic_regex_creator.hpp | 82 ++++++------
sandbox/regex-allocator/boost/regex/v4/basic_regex_parser.hpp | 118 ++++++++--------
sandbox/regex-allocator/boost/regex/v4/instances.hpp | 4
sandbox/regex-allocator/boost/regex/v4/perl_matcher.hpp | 14 +-
sandbox/regex-allocator/boost/regex/v4/perl_matcher_common.hpp | 158 +++++++++++-----------
sandbox/regex-allocator/boost/regex/v4/perl_matcher_non_recursive.hpp | 270 ++++++++++++++++++++--------------------
sandbox/regex-allocator/boost/regex/v4/perl_matcher_recursive.hpp | 114 ++++++++--------
sandbox/regex-allocator/boost/regex/v4/regex_fwd.hpp | 2
sandbox/regex-allocator/boost/regex/v4/regex_grep.hpp | 14 +-
sandbox/regex-allocator/boost/regex/v4/regex_iterator.hpp | 24 +-
sandbox/regex-allocator/boost/regex/v4/regex_match.hpp | 26 +-
sandbox/regex-allocator/boost/regex/v4/regex_replace.hpp | 12
sandbox/regex-allocator/boost/regex/v4/regex_search.hpp | 32 ++--
sandbox/regex-allocator/boost/regex/v4/regex_split.hpp | 8
sandbox/regex-allocator/boost/regex/v4/regex_token_iterator.hpp | 36 ++--
sandbox/regex-allocator/boost/regex/v4/states.hpp | 6
sandbox/regex-allocator/libs/regex/build/Jamfile.v2 | 5
sandbox/regex-allocator/libs/regex/example/Jamfile.v2 | 14 +
sandbox/regex-allocator/libs/regex/test/Jamfile.v2 | 12 +
sandbox/regex-allocator/libs/regex/test/concepts/concept_check.cpp | 4
23 files changed, 583 insertions(+), 518 deletions(-)
Modified: sandbox/regex-allocator/boost/regex/concepts.hpp
==============================================================================
--- sandbox/regex-allocator/boost/regex/concepts.hpp (original)
+++ sandbox/regex-allocator/boost/regex/concepts.hpp 2010-11-15 11:04:34 EST (Mon, 15 Nov 2010)
@@ -119,6 +119,46 @@
template <class T>
bool operator != (const allocator_architype<T>&, const allocator_architype<T>&);
+template <class T>
+class allocator_architype_2
+{
+public:
+ typedef T* pointer;
+ typedef const T* const_pointer;
+ typedef T& reference;
+ typedef const T& const_reference;
+ typedef T value_type;
+ typedef unsigned size_type;
+ typedef int difference_type;
+
+ template <class U>
+ struct rebind
+ {
+ typedef allocator_architype_2<U> other;
+ };
+
+ pointer address(reference r);
+ const_pointer address(const_reference r);
+ pointer allocate(size_type);
+ pointer allocate(size_type, pointer);
+ void deallocate(pointer, size_type);
+ size_type max_size()const;
+
+ allocator_architype_2();
+ allocator_architype_2(const allocator_architype_2&);
+
+ template <class Other>
+ allocator_architype_2(const allocator_architype_2<Other>&);
+
+ void construct(pointer, const_reference);
+ void destroy(pointer);
+};
+
+template <class T>
+bool operator == (const allocator_architype_2<T>&, const allocator_architype_2<T>&);
+template <class T>
+bool operator != (const allocator_architype_2<T>&, const allocator_architype_2<T>&);
+
namespace boost{
//
// regex_traits_architype:
@@ -264,8 +304,8 @@
template <class Regex>
struct regex_traits_computer;
-template <class charT, class traits>
-struct regex_traits_computer< global_regex_namespace::basic_regex<charT, traits> >
+template <class charT, class traits, class Allocator>
+struct regex_traits_computer< global_regex_namespace::basic_regex<charT, traits, Allocator> >
{
typedef traits type;
};
@@ -291,8 +331,9 @@
typedef global_regex_namespace::match_results<BidiIterator> match_results_default_type;
typedef output_iterator_archetype<value_type> OutIterator;
typedef typename regex_traits_computer<Regex>::type traits_type;
- typedef global_regex_namespace::regex_iterator<BidiIterator, value_type, traits_type> regex_iterator_type;
- typedef global_regex_namespace::regex_token_iterator<BidiIterator, value_type, traits_type> regex_token_iterator_type;
+ typedef typename Regex::allocator_type regex_allocator_type;
+ typedef global_regex_namespace::regex_iterator<BidiIterator, value_type, traits_type, regex_allocator_type> regex_iterator_type;
+ typedef global_regex_namespace::regex_token_iterator<BidiIterator, value_type, traits_type, regex_allocator_type> regex_token_iterator_type;
void global_constraints()
{
Modified: sandbox/regex-allocator/boost/regex/mfc.hpp
==============================================================================
--- sandbox/regex-allocator/boost/regex/mfc.hpp (original)
+++ sandbox/regex-allocator/boost/regex/mfc.hpp 2010-11-15 11:04:34 EST (Mon, 15 Nov 2010)
@@ -52,10 +52,10 @@
//
// regex_match overloads:
//
-template <SIMPLE_STRING_PARAM, class A, class T>
+template <SIMPLE_STRING_PARAM, class A, class T, class A2>
inline bool regex_match(const ATL::CSimpleStringT<SIMPLE_STRING_ARG_LIST>& s,
match_results<const B*, A>& what,
- const basic_regex<B, T>& e,
+ const basic_regex<B, T, A2>& e,
boost::regex_constants::match_flag_type f = boost::regex_constants::match_default)
{
return ::boost::regex_match(s.GetString(),
@@ -65,9 +65,9 @@
f);
}
-template <SIMPLE_STRING_PARAM, class T>
+template <SIMPLE_STRING_PARAM, class T, class A2>
inline bool regex_match(const ATL::CSimpleStringT<SIMPLE_STRING_ARG_LIST>& s,
- const basic_regex<B, T>& e,
+ const basic_regex<B, T, A2>& e,
boost::regex_constants::match_flag_type f = boost::regex_constants::match_default)
{
return ::boost::regex_match(s.GetString(),
@@ -78,10 +78,10 @@
//
// regex_search overloads:
//
-template <SIMPLE_STRING_PARAM, class A, class T>
+template <SIMPLE_STRING_PARAM, class A, class T, class A2>
inline bool regex_search(const ATL::CSimpleStringT<SIMPLE_STRING_ARG_LIST>& s,
match_results<const B*, A>& what,
- const basic_regex<B, T>& e,
+ const basic_regex<B, T, A2>& e,
boost::regex_constants::match_flag_type f = boost::regex_constants::match_default)
{
return ::boost::regex_search(s.GetString(),
@@ -91,9 +91,9 @@
f);
}
-template <SIMPLE_STRING_PARAM, class T>
+template <SIMPLE_STRING_PARAM, class T, class A2>
inline bool regex_search(const ATL::CSimpleStringT<SIMPLE_STRING_ARG_LIST>& s,
- const basic_regex<B, T>& e,
+ const basic_regex<B, T, A2>& e,
boost::regex_constants::match_flag_type f = boost::regex_constants::match_default)
{
return ::boost::regex_search(s.GetString(),
@@ -137,11 +137,11 @@
}
template <class OutputIterator, class BidirectionalIterator, class traits,
- SIMPLE_STRING_PARAM>
+ SIMPLE_STRING_PARAM, class A>
OutputIterator regex_replace(OutputIterator out,
BidirectionalIterator first,
BidirectionalIterator last,
- const basic_regex<B, traits>& e,
+ const basic_regex<B, traits, A>& e,
const ATL::CSimpleStringT<SIMPLE_STRING_ARG_LIST>& fmt,
match_flag_type flags = match_default)
{
@@ -173,9 +173,9 @@
}
-template <class traits, SIMPLE_STRING_PARAM>
+template <class traits, SIMPLE_STRING_PARAM, class A>
ATL::CSimpleStringT<SIMPLE_STRING_ARG_LIST> regex_replace(const ATL::CSimpleStringT<SIMPLE_STRING_ARG_LIST>& s,
- const basic_regex<B, traits>& e,
+ const basic_regex<B, traits, A>& e,
const ATL::CSimpleStringT<SIMPLE_STRING_ARG_LIST>& fmt,
match_flag_type flags = match_default)
{
Modified: sandbox/regex-allocator/boost/regex/v4/basic_regex.hpp
==============================================================================
--- sandbox/regex-allocator/boost/regex/v4/basic_regex.hpp (original)
+++ sandbox/regex-allocator/boost/regex/v4/basic_regex.hpp 2010-11-15 11:04:34 EST (Mon, 15 Nov 2010)
@@ -44,7 +44,7 @@
//
// forward declaration, we will need this one later:
//
-template <class charT, class traits>
+template <class charT, class traits, class Allocator>
class basic_regex_parser;
template <class I>
@@ -153,7 +153,7 @@
// class regex_data:
// represents the data we wish to expose to the matching algorithms.
//
-template <class charT, class traits>
+template <class charT, class traits, class Allocator>
struct regex_data : public named_subexpressions
{
typedef regex_constants::syntax_option_type flag_type;
@@ -188,9 +188,9 @@
// class basic_regex_implementation
// pimpl implementation class for basic_regex.
//
-template <class charT, class traits>
+template <class charT, class traits, class Allocator>
class basic_regex_implementation
- : public regex_data<charT, traits>
+ : public regex_data<charT, traits, Allocator>
{
public:
typedef regex_constants::syntax_option_type flag_type;
@@ -202,13 +202,13 @@
basic_regex_implementation(){}
basic_regex_implementation(const ::boost::shared_ptr<
::boost::regex_traits_wrapper<traits> >& t)
- : regex_data<charT, traits>(t) {}
+ : regex_data<charT, traits, Allocator>(t) {}
void assign(const charT* arg_first,
const charT* arg_last,
flag_type f)
{
- regex_data<charT, traits>* pdat = this;
- basic_regex_parser<charT, traits> parser(pdat);
+ regex_data<charT, traits, Allocator>* pdat = this;
+ basic_regex_parser<charT, traits, Allocator> parser(pdat);
parser.parse(arg_first, arg_last, f);
}
@@ -285,10 +285,10 @@
{
return this->m_can_be_null;
}
- const regex_data<charT, traits>& get_data()const
+ const regex_data<charT, traits, Allocator>& get_data()const
{
- basic_regex_implementation<charT, traits> const* p = this;
- return *static_cast<const regex_data<charT, traits>*>(p);
+ basic_regex_implementation<charT, traits, Allocator> const* p = this;
+ return *static_cast<const regex_data<charT, traits, Allocator>*>(p);
}
};
@@ -300,9 +300,9 @@
//
#ifdef BOOST_REGEX_NO_FWD
-template <class charT, class traits = regex_traits<charT> >
+template <class charT, class traits = regex_traits<charT>, class Allocator = std::allocator<charT> >
#else
-template <class charT, class traits >
+template <class charT, class traits, class Allocator >
#endif
class basic_regex : public regbase
{
@@ -325,6 +325,7 @@
// placeholder for actual locale type used by the
// traits class to localise *this.
typedef typename traits::locale_type locale_type;
+ typedef Allocator allocator_type;
public:
explicit basic_regex(){}
@@ -621,7 +622,7 @@
BOOST_ASSERT(0 != m_pimpl.get());
return m_pimpl->can_be_null();
}
- const re_detail::regex_data<charT, traits>& get_data()const
+ const re_detail::regex_data<charT, traits, Allocator>& get_data()const
{
BOOST_ASSERT(0 != m_pimpl.get());
return m_pimpl->get_data();
@@ -632,7 +633,7 @@
}
private:
- shared_ptr<re_detail::basic_regex_implementation<charT, traits> > m_pimpl;
+ shared_ptr<re_detail::basic_regex_implementation<charT, traits, Allocator> > m_pimpl;
};
//
@@ -641,29 +642,29 @@
// and are designed to provide the strong exception guarentee
// (in the event of a throw, the state of the object remains unchanged).
//
-template <class charT, class traits>
-basic_regex<charT, traits>& basic_regex<charT, traits>::do_assign(const charT* p1,
+template <class charT, class traits, class Allocator>
+basic_regex<charT, traits, Allocator>& basic_regex<charT, traits, Allocator>::do_assign(const charT* p1,
const charT* p2,
flag_type f)
{
- shared_ptr<re_detail::basic_regex_implementation<charT, traits> > temp;
+ shared_ptr<re_detail::basic_regex_implementation<charT, traits, Allocator> > temp;
if(!m_pimpl.get())
{
- temp = shared_ptr<re_detail::basic_regex_implementation<charT, traits> >(new re_detail::basic_regex_implementation<charT, traits>());
+ temp = shared_ptr<re_detail::basic_regex_implementation<charT, traits, Allocator> >(new re_detail::basic_regex_implementation<charT, traits, Allocator>());
}
else
{
- temp = shared_ptr<re_detail::basic_regex_implementation<charT, traits> >(new re_detail::basic_regex_implementation<charT, traits>(m_pimpl->m_ptraits));
+ temp = shared_ptr<re_detail::basic_regex_implementation<charT, traits, Allocator> >(new re_detail::basic_regex_implementation<charT, traits, Allocator>(m_pimpl->m_ptraits));
}
temp->assign(p1, p2, f);
temp.swap(m_pimpl);
return *this;
}
-template <class charT, class traits>
-typename basic_regex<charT, traits>::locale_type BOOST_REGEX_CALL basic_regex<charT, traits>::imbue(locale_type l)
+template <class charT, class traits, class Allocator>
+typename basic_regex<charT, traits, Allocator>::locale_type BOOST_REGEX_CALL basic_regex<charT, traits, Allocator>::imbue(locale_type l)
{
- shared_ptr<re_detail::basic_regex_implementation<charT, traits> > temp(new re_detail::basic_regex_implementation<charT, traits>());
+ shared_ptr<re_detail::basic_regex_implementation<charT, traits, Allocator> > temp(new re_detail::basic_regex_implementation<charT, traits, Allocator>());
locale_type result = temp->imbue(l);
temp.swap(m_pimpl);
return result;
@@ -672,23 +673,23 @@
//
// non-members:
//
-template <class charT, class traits>
-void swap(basic_regex<charT, traits>& e1, basic_regex<charT, traits>& e2)
+template <class charT, class traits, class Allocator>
+void swap(basic_regex<charT, traits, Allocator>& e1, basic_regex<charT, traits, Allocator>& e2)
{
e1.swap(e2);
}
#ifndef BOOST_NO_STD_LOCALE
-template <class charT, class traits, class traits2>
+template <class charT, class traits, class traits2, class Allocator>
std::basic_ostream<charT, traits>&
operator << (std::basic_ostream<charT, traits>& os,
- const basic_regex<charT, traits2>& e)
+ const basic_regex<charT, traits2, Allocator>& e)
{
return (os << e.str());
}
#else
-template <class traits>
-std::ostream& operator << (std::ostream& os, const basic_regex<char, traits>& e)
+template <class traits, class Allocator>
+std::ostream& operator << (std::ostream& os, const basic_regex<char, traits, Allocator>& e)
{
return (os << e.str());
}
@@ -700,15 +701,15 @@
// it is deprecated, no not use!
//
#ifdef BOOST_REGEX_NO_FWD
-template <class charT, class traits = regex_traits<charT> >
+template <class charT, class traits = regex_traits<charT>, class Allocator = std::allocator<char> >
#else
-template <class charT, class traits >
+template <class charT, class traits, class Allocator >
#endif
-class reg_expression : public basic_regex<charT, traits>
+class reg_expression : public basic_regex<charT, traits, Allocator>
{
public:
- typedef typename basic_regex<charT, traits>::flag_type flag_type;
- typedef typename basic_regex<charT, traits>::size_type size_type;
+ typedef typename basic_regex<charT, traits, Allocator>::flag_type flag_type;
+ typedef typename basic_regex<charT, traits, Allocator>::size_type size_type;
explicit reg_expression(){}
explicit reg_expression(const charT* p, flag_type f = regex_constants::normal)
: basic_regex<charT, traits>(p, f){}
@@ -727,13 +728,13 @@
#if !defined(BOOST_NO_MEMBER_TEMPLATES)
template <class ST, class SA>
explicit reg_expression(const std::basic_string<charT, ST, SA>& p, flag_type f = regex_constants::normal)
- : basic_regex<charT, traits>(p, f)
+ : basic_regex<charT, traits, Allocator>(p, f)
{
}
template <class InputIterator>
reg_expression(InputIterator arg_first, InputIterator arg_last, flag_type f = regex_constants::normal)
- : basic_regex<charT, traits>(arg_first, arg_last, f)
+ : basic_regex<charT, traits, Allocator>(arg_first, arg_last, f)
{
}
@@ -745,7 +746,7 @@
}
#else
explicit reg_expression(const std::basic_string<charT>& p, flag_type f = regex_constants::normal)
- : basic_regex<charT, traits>(p, f)
+ : basic_regex<charT, traits, Allocator>(p, f)
{
}
Modified: sandbox/regex-allocator/boost/regex/v4/basic_regex_creator.hpp
==============================================================================
--- sandbox/regex-allocator/boost/regex/v4/basic_regex_creator.hpp (original)
+++ sandbox/regex-allocator/boost/regex/v4/basic_regex_creator.hpp 2010-11-15 11:04:34 EST (Mon, 15 Nov 2010)
@@ -185,11 +185,11 @@
std::vector<digraph_type> m_equivalents; // a list of equivalence classes
};
-template <class charT, class traits>
+template <class charT, class traits, class Allocator>
class basic_regex_creator
{
public:
- basic_regex_creator(regex_data<charT, traits>* data);
+ basic_regex_creator(regex_data<charT, traits, Allocator>* data);
std::ptrdiff_t getoffset(void* addr)
{
return getoffset(addr, m_pdata->m_data.data());
@@ -231,7 +231,7 @@
re_syntax_base* append_set(const basic_char_set<charT, traits>& char_set, mpl::true_*);
void finalize(const charT* p1, const charT* p2);
protected:
- regex_data<charT, traits>* m_pdata; // pointer to the basic_regex_data struct we are filling in
+ regex_data<charT, traits, Allocator>* m_pdata; // pointer to the basic_regex_data struct we are filling in
const ::boost::regex_traits_wrapper<traits>&
m_traits; // convenience reference to traits class
re_syntax_base* m_last_state; // the last state we added
@@ -263,8 +263,8 @@
void probe_leading_repeat(re_syntax_base* state);
};
-template <class charT, class traits>
-basic_regex_creator<charT, traits>::basic_regex_creator(regex_data<charT, traits>* data)
+template <class charT, class traits, class Allocator>
+basic_regex_creator<charT, traits, Allocator>::basic_regex_creator(regex_data<charT, traits, Allocator>* data)
: m_pdata(data), m_traits(*(data->m_ptraits)), m_last_state(0), m_repeater_id(0), m_has_backrefs(false), m_backrefs(0), m_has_recursions(false)
{
m_pdata->m_data.clear();
@@ -287,8 +287,8 @@
BOOST_ASSERT(m_alpha_mask != 0);
}
-template <class charT, class traits>
-re_syntax_base* basic_regex_creator<charT, traits>::append_state(syntax_element_type t, std::size_t s)
+template <class charT, class traits, class Allocator>
+re_syntax_base* basic_regex_creator<charT, traits, Allocator>::append_state(syntax_element_type t, std::size_t s)
{
// if the state is a backref then make a note of it:
if(t == syntax_element_backref)
@@ -306,8 +306,8 @@
return m_last_state;
}
-template <class charT, class traits>
-re_syntax_base* basic_regex_creator<charT, traits>::insert_state(std::ptrdiff_t pos, syntax_element_type t, std::size_t s)
+template <class charT, class traits, class Allocator>
+re_syntax_base* basic_regex_creator<charT, traits, Allocator>::insert_state(std::ptrdiff_t pos, syntax_element_type t, std::size_t s)
{
// append a new state, start by aligning our last one:
m_pdata->m_data.align();
@@ -325,8 +325,8 @@
return new_state;
}
-template <class charT, class traits>
-re_literal* basic_regex_creator<charT, traits>::append_literal(charT c)
+template <class charT, class traits, class Allocator>
+re_literal* basic_regex_creator<charT, traits, Allocator>::append_literal(charT c)
{
re_literal* result;
// start by seeing if we have an existing re_literal we can extend:
@@ -350,8 +350,8 @@
return result;
}
-template <class charT, class traits>
-inline re_syntax_base* basic_regex_creator<charT, traits>::append_set(
+template <class charT, class traits, class Allocator>
+inline re_syntax_base* basic_regex_creator<charT, traits, Allocator>::append_set(
const basic_char_set<charT, traits>& char_set)
{
typedef mpl::bool_< (sizeof(charT) == 1) > truth_type;
@@ -360,8 +360,8 @@
: append_set(char_set, static_cast<truth_type*>(0));
}
-template <class charT, class traits>
-re_syntax_base* basic_regex_creator<charT, traits>::append_set(
+template <class charT, class traits, class Allocator>
+re_syntax_base* basic_regex_creator<charT, traits, Allocator>::append_set(
const basic_char_set<charT, traits>& char_set, mpl::false_*)
{
typedef typename traits::string_type string_type;
@@ -535,8 +535,8 @@
}
}
-template <class charT, class traits>
-re_syntax_base* basic_regex_creator<charT, traits>::append_set(
+template <class charT, class traits, class Allocator>
+re_syntax_base* basic_regex_creator<charT, traits, Allocator>::append_set(
const basic_char_set<charT, traits>& char_set, mpl::true_*)
{
typedef typename traits::string_type string_type;
@@ -674,8 +674,8 @@
return result;
}
-template <class charT, class traits>
-void basic_regex_creator<charT, traits>::finalize(const charT* p1, const charT* p2)
+template <class charT, class traits, class Allocator>
+void basic_regex_creator<charT, traits, Allocator>::finalize(const charT* p1, const charT* p2)
{
if(this->m_pdata->m_status)
return;
@@ -719,8 +719,8 @@
probe_leading_repeat(m_pdata->m_first_state);
}
-template <class charT, class traits>
-void basic_regex_creator<charT, traits>::fixup_pointers(re_syntax_base* state)
+template <class charT, class traits, class Allocator>
+void basic_regex_creator<charT, traits, Allocator>::fixup_pointers(re_syntax_base* state)
{
while(state)
{
@@ -758,8 +758,8 @@
}
}
-template <class charT, class traits>
-void basic_regex_creator<charT, traits>::fixup_recursions(re_syntax_base* state)
+template <class charT, class traits, class Allocator>
+void basic_regex_creator<charT, traits, Allocator>::fixup_recursions(re_syntax_base* state)
{
re_syntax_base* base = state;
while(state)
@@ -886,8 +886,8 @@
}
}
-template <class charT, class traits>
-void basic_regex_creator<charT, traits>::create_startmaps(re_syntax_base* state)
+template <class charT, class traits, class Allocator>
+void basic_regex_creator<charT, traits, Allocator>::create_startmaps(re_syntax_base* state)
{
// non-recursive implementation:
// create the last map in the machine first, so that earlier maps
@@ -968,8 +968,8 @@
m_icase = l_icase;
}
-template <class charT, class traits>
-int basic_regex_creator<charT, traits>::calculate_backstep(re_syntax_base* state)
+template <class charT, class traits, class Allocator>
+int basic_regex_creator<charT, traits, Allocator>::calculate_backstep(re_syntax_base* state)
{
typedef typename traits::char_class_type mask_type;
int result = 0;
@@ -1061,8 +1061,8 @@
return -1;
}
-template <class charT, class traits>
-void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state, unsigned char* l_map, unsigned int* pnull, unsigned char mask)
+template <class charT, class traits, class Allocator>
+void basic_regex_creator<charT, traits, Allocator>::create_startmap(re_syntax_base* state, unsigned char* l_map, unsigned int* pnull, unsigned char mask)
{
int not_last_jump = 1;
re_syntax_base* recursion_start = 0;
@@ -1359,8 +1359,8 @@
}
}
-template <class charT, class traits>
-unsigned basic_regex_creator<charT, traits>::get_restart_type(re_syntax_base* state)
+template <class charT, class traits, class Allocator>
+unsigned basic_regex_creator<charT, traits, Allocator>::get_restart_type(re_syntax_base* state)
{
//
// find out how the machine starts, so we can optimise the search:
@@ -1389,8 +1389,8 @@
return regbase::restart_any;
}
-template <class charT, class traits>
-void basic_regex_creator<charT, traits>::set_all_masks(unsigned char* bits, unsigned char mask)
+template <class charT, class traits, class Allocator>
+void basic_regex_creator<charT, traits, Allocator>::set_all_masks(unsigned char* bits, unsigned char mask)
{
//
// set mask in all of bits elements,
@@ -1410,8 +1410,8 @@
}
}
-template <class charT, class traits>
-bool basic_regex_creator<charT, traits>::is_bad_repeat(re_syntax_base* pt)
+template <class charT, class traits, class Allocator>
+bool basic_regex_creator<charT, traits, Allocator>::is_bad_repeat(re_syntax_base* pt)
{
switch(pt->type)
{
@@ -1432,8 +1432,8 @@
}
}
-template <class charT, class traits>
-void basic_regex_creator<charT, traits>::set_bad_repeat(re_syntax_base* pt)
+template <class charT, class traits, class Allocator>
+void basic_regex_creator<charT, traits, Allocator>::set_bad_repeat(re_syntax_base* pt)
{
switch(pt->type)
{
@@ -1453,8 +1453,8 @@
}
}
-template <class charT, class traits>
-syntax_element_type basic_regex_creator<charT, traits>::get_repeat_type(re_syntax_base* state)
+template <class charT, class traits, class Allocator>
+syntax_element_type basic_regex_creator<charT, traits, Allocator>::get_repeat_type(re_syntax_base* state)
{
typedef typename traits::char_class_type mask_type;
if(state->type == syntax_element_rep)
@@ -1482,8 +1482,8 @@
return state->type;
}
-template <class charT, class traits>
-void basic_regex_creator<charT, traits>::probe_leading_repeat(re_syntax_base* state)
+template <class charT, class traits, class Allocator>
+void basic_regex_creator<charT, traits, Allocator>::probe_leading_repeat(re_syntax_base* state)
{
// enumerate our states, and see if we have a leading repeat
// for which failed search restarts can be optimised;
Modified: sandbox/regex-allocator/boost/regex/v4/basic_regex_parser.hpp
==============================================================================
--- sandbox/regex-allocator/boost/regex/v4/basic_regex_parser.hpp (original)
+++ sandbox/regex-allocator/boost/regex/v4/basic_regex_parser.hpp 2010-11-15 11:04:34 EST (Mon, 15 Nov 2010)
@@ -38,11 +38,11 @@
#pragma warning(disable:4244 4800)
#endif
-template <class charT, class traits>
-class basic_regex_parser : public basic_regex_creator<charT, traits>
+template <class charT, class traits, class Allocator>
+class basic_regex_parser : public basic_regex_creator<charT, traits, Allocator>
{
public:
- basic_regex_parser(regex_data<charT, traits>* data);
+ basic_regex_parser(regex_data<charT, traits, Allocator>* data);
void parse(const charT* p1, const charT* p2, unsigned flags);
void fail(regex_constants::error_type error_code, std::ptrdiff_t position);
void fail(regex_constants::error_type error_code, std::ptrdiff_t position, std::string message, std::ptrdiff_t start_pos);
@@ -101,14 +101,14 @@
basic_regex_parser(const basic_regex_parser&);
};
-template <class charT, class traits>
-basic_regex_parser<charT, traits>::basic_regex_parser(regex_data<charT, traits>* data)
- : basic_regex_creator<charT, traits>(data), m_mark_count(0), m_mark_reset(-1), m_max_mark(0), m_paren_start(0), m_alt_insert_point(0), m_has_case_change(false)
+template <class charT, class traits, class Allocator>
+basic_regex_parser<charT, traits, Allocator>::basic_regex_parser(regex_data<charT, traits, Allocator>* data)
+ : basic_regex_creator<charT, traits, Allocator>(data), m_mark_count(0), m_mark_reset(-1), m_max_mark(0), m_paren_start(0), m_alt_insert_point(0), m_has_case_change(false)
{
}
-template <class charT, class traits>
-void basic_regex_parser<charT, traits>::parse(const charT* p1, const charT* p2, unsigned l_flags)
+template <class charT, class traits, class Allocator>
+void basic_regex_parser<charT, traits, Allocator>::parse(const charT* p1, const charT* p2, unsigned l_flags)
{
// pass l_flags on to base class:
this->init(l_flags);
@@ -131,7 +131,7 @@
{
case regbase::perl_syntax_group:
{
- m_parser_proc = &basic_regex_parser<charT, traits>::parse_extended;
+ m_parser_proc = &basic_regex_parser<charT, traits, Allocator>::parse_extended;
//
// Add a leading paren with index zero to give recursions a target:
//
@@ -141,10 +141,10 @@
break;
}
case regbase::basic_syntax_group:
- m_parser_proc = &basic_regex_parser<charT, traits>::parse_basic;
+ m_parser_proc = &basic_regex_parser<charT, traits, Allocator>::parse_basic;
break;
case regbase::literal:
- m_parser_proc = &basic_regex_parser<charT, traits>::parse_literal;
+ m_parser_proc = &basic_regex_parser<charT, traits, Allocator>::parse_literal;
break;
default:
// Ooops, someone has managed to set more than one of the main option flags,
@@ -176,16 +176,16 @@
this->finalize(p1, p2);
}
-template <class charT, class traits>
-void basic_regex_parser<charT, traits>::fail(regex_constants::error_type error_code, std::ptrdiff_t position)
+template <class charT, class traits, class Allocator>
+void basic_regex_parser<charT, traits, Allocator>::fail(regex_constants::error_type error_code, std::ptrdiff_t position)
{
// get the error message:
std::string message = this->m_pdata->m_ptraits->error_string(error_code);
fail(error_code, position, message);
}
-template <class charT, class traits>
-void basic_regex_parser<charT, traits>::fail(regex_constants::error_type error_code, std::ptrdiff_t position, std::string message, std::ptrdiff_t start_pos)
+template <class charT, class traits, class Allocator>
+void basic_regex_parser<charT, traits, Allocator>::fail(regex_constants::error_type error_code, std::ptrdiff_t position, std::string message, std::ptrdiff_t start_pos)
{
if(0 == this->m_pdata->m_status) // update the error code if not already set
this->m_pdata->m_status = error_code;
@@ -223,8 +223,8 @@
#endif
}
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_all()
+template <class charT, class traits, class Allocator>
+bool basic_regex_parser<charT, traits, Allocator>::parse_all()
{
bool result = true;
while(result && (m_position != m_end))
@@ -238,8 +238,8 @@
#pragma warning(push)
#pragma warning(disable:4702)
#endif
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_basic()
+template <class charT, class traits, class Allocator>
+bool basic_regex_parser<charT, traits, Allocator>::parse_basic()
{
switch(this->m_traits.syntax_type(*m_position))
{
@@ -292,8 +292,8 @@
return true;
}
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_extended()
+template <class charT, class traits, class Allocator>
+bool basic_regex_parser<charT, traits, Allocator>::parse_extended()
{
bool result = true;
switch(this->m_traits.syntax_type(*m_position))
@@ -378,8 +378,8 @@
#pragma warning(pop)
#endif
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_literal()
+template <class charT, class traits, class Allocator>
+bool basic_regex_parser<charT, traits, Allocator>::parse_literal()
{
// append this as a literal provided it's not a space character
// or the perl option regbase::mod_x is not set:
@@ -393,8 +393,8 @@
return true;
}
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_open_paren()
+template <class charT, class traits, class Allocator>
+bool basic_regex_parser<charT, traits, Allocator>::parse_open_paren()
{
//
// skip the '(' and error check:
@@ -514,8 +514,8 @@
return true;
}
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_basic_escape()
+template <class charT, class traits, class Allocator>
+bool basic_regex_parser<charT, traits, Allocator>::parse_basic_escape()
{
++m_position;
bool result = true;
@@ -656,8 +656,8 @@
return result;
}
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_extended_escape()
+template <class charT, class traits, class Allocator>
+bool basic_regex_parser<charT, traits, Allocator>::parse_extended_escape()
{
++m_position;
bool negate = false; // in case this is a character class escape: \w \d etc
@@ -902,8 +902,8 @@
return true;
}
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_match_any()
+template <class charT, class traits, class Allocator>
+bool basic_regex_parser<charT, traits, Allocator>::parse_match_any()
{
//
// we have a '.' that can match any character:
@@ -918,8 +918,8 @@
return true;
}
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_t high)
+template <class charT, class traits, class Allocator>
+bool basic_regex_parser<charT, traits, Allocator>::parse_repeat(std::size_t low, std::size_t high)
{
bool greedy = true;
bool pocessive = false;
@@ -1049,8 +1049,8 @@
return true;
}
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)
+template <class charT, class traits, class Allocator>
+bool basic_regex_parser<charT, traits, Allocator>::parse_repeat_range(bool isbasic)
{
static const char* incomplete_message = "Missing } in quantified repetition.";
//
@@ -1153,8 +1153,8 @@
return parse_repeat(min, max);
}
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_alt()
+template <class charT, class traits, class Allocator>
+bool basic_regex_parser<charT, traits, Allocator>::parse_alt()
{
//
// error check: if there have been no previous states,
@@ -1219,8 +1219,8 @@
return true;
}
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_set()
+template <class charT, class traits, class Allocator>
+bool basic_regex_parser<charT, traits, Allocator>::parse_set()
{
static const char* incomplete_message = "Character set declaration starting with [ terminated prematurely - either no ] was found or the set had no content.";
++m_position;
@@ -1311,8 +1311,8 @@
return m_position != m_end;
}
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_inner_set(basic_char_set<charT, traits>& char_set)
+template <class charT, class traits, class Allocator>
+bool basic_regex_parser<charT, traits, Allocator>::parse_inner_set(basic_char_set<charT, traits>& char_set)
{
static const char* incomplete_message = "Character class declaration starting with [ terminated prematurely - either no ] was found or the set had no content.";
//
@@ -1473,8 +1473,8 @@
return true;
}
-template <class charT, class traits>
-void basic_regex_parser<charT, traits>::parse_set_literal(basic_char_set<charT, traits>& char_set)
+template <class charT, class traits, class Allocator>
+void basic_regex_parser<charT, traits, Allocator>::parse_set_literal(basic_char_set<charT, traits>& char_set)
{
digraph<charT> start_range(get_next_set_literal(char_set));
if(m_end == m_position)
@@ -1517,8 +1517,8 @@
char_set.add_single(start_range);
}
-template <class charT, class traits>
-digraph<charT> basic_regex_parser<charT, traits>::get_next_set_literal(basic_char_set<charT, traits>& char_set)
+template <class charT, class traits, class Allocator>
+digraph<charT> basic_regex_parser<charT, traits, Allocator>::get_next_set_literal(basic_char_set<charT, traits>& char_set)
{
digraph<charT> result;
switch(this->m_traits.syntax_type(*m_position))
@@ -1626,8 +1626,8 @@
return valid_value(c, v, mpl::bool_<(sizeof(charT) < sizeof(int))>());
}
-template <class charT, class traits>
-charT basic_regex_parser<charT, traits>::unescape_character()
+template <class charT, class traits, class Allocator>
+charT basic_regex_parser<charT, traits, Allocator>::unescape_character()
{
#ifdef BOOST_MSVC
#pragma warning(push)
@@ -1815,8 +1815,8 @@
#endif
}
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_backref()
+template <class charT, class traits, class Allocator>
+bool basic_regex_parser<charT, traits, Allocator>::parse_backref()
{
BOOST_ASSERT(m_position != m_end);
const charT* pc = m_position;
@@ -1845,8 +1845,8 @@
return true;
}
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_QE()
+template <class charT, class traits, class Allocator>
+bool basic_regex_parser<charT, traits, Allocator>::parse_QE()
{
#ifdef BOOST_MSVC
#pragma warning(push)
@@ -1897,8 +1897,8 @@
#endif
}
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_perl_extension()
+template <class charT, class traits, class Allocator>
+bool basic_regex_parser<charT, traits, Allocator>::parse_perl_extension()
{
if(++m_position == m_end)
{
@@ -2592,8 +2592,8 @@
return true;
}
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::add_emacs_code(bool negate)
+template <class charT, class traits, class Allocator>
+bool basic_regex_parser<charT, traits, Allocator>::add_emacs_code(bool negate)
{
//
// parses an emacs style \sx or \Sx construct.
@@ -2674,8 +2674,8 @@
return true;
}
-template <class charT, class traits>
-regex_constants::syntax_option_type basic_regex_parser<charT, traits>::parse_options()
+template <class charT, class traits, class Allocator>
+regex_constants::syntax_option_type basic_regex_parser<charT, traits, Allocator>::parse_options()
{
// we have a (?imsx-imsx) group, convert it into a set of flags:
regex_constants::syntax_option_type f = this->flags();
@@ -2757,8 +2757,8 @@
return f;
}
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::unwind_alts(std::ptrdiff_t last_paren_start)
+template <class charT, class traits, class Allocator>
+bool basic_regex_parser<charT, traits, Allocator>::unwind_alts(std::ptrdiff_t last_paren_start)
{
//
// If we didn't actually add any states after the last
Modified: sandbox/regex-allocator/boost/regex/v4/instances.hpp
==============================================================================
--- sandbox/regex-allocator/boost/regex/v4/instances.hpp (original)
+++ sandbox/regex-allocator/boost/regex/v4/instances.hpp 2010-11-15 11:04:34 EST (Mon, 15 Nov 2010)
@@ -93,7 +93,7 @@
template class BOOST_REGEX_TEMPLATE_DECL match_results< const BOOST_REGEX_CHAR_T* >;
#endif
#ifndef BOOST_NO_STD_ALLOCATOR
-template class BOOST_REGEX_TEMPLATE_DECL ::boost::re_detail::perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >;
+template class BOOST_REGEX_TEMPLATE_DECL ::boost::re_detail::perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T, std::allocator<BOOST_REGEX_CHAR_T> >;
#endif
#if !(defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB <= 1))\
&& !(defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION <= 800))\
@@ -103,7 +103,7 @@
template class BOOST_REGEX_TEMPLATE_DECL match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >;
#endif
#ifndef BOOST_NO_STD_ALLOCATOR
-template class BOOST_REGEX_TEMPLATE_DECL ::boost::re_detail::perl_matcher< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >;
+template class BOOST_REGEX_TEMPLATE_DECL ::boost::re_detail::perl_matcher< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T >, std::allocator<BOOST_REGEX_CHAR_T> >;
#endif
#endif
Modified: sandbox/regex-allocator/boost/regex/v4/perl_matcher.hpp
==============================================================================
--- sandbox/regex-allocator/boost/regex/v4/perl_matcher.hpp (original)
+++ sandbox/regex-allocator/boost/regex/v4/perl_matcher.hpp 2010-11-15 11:04:34 EST (Mon, 15 Nov 2010)
@@ -137,11 +137,11 @@
return ++p;
}
-template <class iterator, class charT, class traits_type, class char_classT>
+template <class iterator, class charT, class traits_type, class char_classT, class Allocator>
iterator BOOST_REGEX_CALL re_is_set_member(iterator next,
iterator last,
const re_set_long<char_classT>* set_,
- const regex_data<charT, traits_type>& e, bool icase)
+ const regex_data<charT, traits_type, Allocator>& e, bool icase)
{
const charT* p = reinterpret_cast<const charT*>(set_+1);
iterator ptr;
@@ -347,12 +347,12 @@
#pragma warning(disable : 4251 4231 4660)
#endif
-template <class BidiIterator, class Allocator, class traits>
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
class perl_matcher
{
public:
typedef typename traits::char_type char_type;
- typedef perl_matcher<BidiIterator, Allocator, traits> self_type;
+ typedef perl_matcher<BidiIterator, Allocator, traits, Allocator2> self_type;
typedef bool (self_type::*matcher_proc_type)(void);
typedef std::size_t traits_size_type;
typedef typename is_byte<char_type>::width_type width_type;
@@ -361,7 +361,7 @@
perl_matcher(BidiIterator first, BidiIterator end,
match_results<BidiIterator, Allocator>& what,
- const basic_regex<char_type, traits>& e,
+ const basic_regex<char_type, traits, Allocator2>& e,
match_flag_type f,
BidiIterator l_base)
: m_result(what), base(first), last(end),
@@ -380,7 +380,7 @@
{ m_match_flags &= ~f; }
private:
- void construct_init(const basic_regex<char_type, traits>& e, match_flag_type f);
+ void construct_init(const basic_regex<char_type, traits, Allocator2>& e, match_flag_type f);
bool find_imp();
bool match_imp();
@@ -460,7 +460,7 @@
// how far we can go back when matching lookbehind:
BidiIterator backstop;
// the expression being examined:
- const basic_regex<char_type, traits>& re;
+ const basic_regex<char_type, traits, Allocator2>& re;
// the expression's traits class:
const ::boost::regex_traits_wrapper<traits>& traits_inst;
// the next state in the machine being matched:
Modified: sandbox/regex-allocator/boost/regex/v4/perl_matcher_common.hpp
==============================================================================
--- sandbox/regex-allocator/boost/regex/v4/perl_matcher_common.hpp (original)
+++ sandbox/regex-allocator/boost/regex/v4/perl_matcher_common.hpp 2010-11-15 11:04:34 EST (Mon, 15 Nov 2010)
@@ -42,11 +42,11 @@
namespace boost{
namespace re_detail{
-template <class BidiIterator, class Allocator, class traits>
-void perl_matcher<BidiIterator, Allocator, traits>::construct_init(const basic_regex<char_type, traits>& e, match_flag_type f)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+void perl_matcher<BidiIterator, Allocator, traits, Allocator2>::construct_init(const basic_regex<char_type, traits, Allocator2>& e, match_flag_type f)
{
typedef typename regex_iterator_traits<BidiIterator>::iterator_category category;
- typedef typename basic_regex<char_type, traits>::flag_type expression_flag_type;
+ typedef typename basic_regex<char_type, traits, Allocator2>::flag_type expression_flag_type;
if(e.empty())
{
@@ -85,8 +85,8 @@
match_any_mask = static_cast<unsigned char>((f & match_not_dot_newline) ? re_detail::test_not_newline : re_detail::test_newline);
}
-template <class BidiIterator, class Allocator, class traits>
-void perl_matcher<BidiIterator, Allocator, traits>::estimate_max_state_count(std::random_access_iterator_tag*)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+void perl_matcher<BidiIterator, Allocator, traits, Allocator2>::estimate_max_state_count(std::random_access_iterator_tag*)
{
//
// How many states should we allow our machine to visit before giving up?
@@ -151,38 +151,38 @@
max_state_count = states;
}
-template <class BidiIterator, class Allocator, class traits>
-inline void perl_matcher<BidiIterator, Allocator, traits>::estimate_max_state_count(void*)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+inline void perl_matcher<BidiIterator, Allocator, traits, Allocator2>::estimate_max_state_count(void*)
{
// we don't know how long the sequence is:
max_state_count = BOOST_REGEX_MAX_STATE_COUNT;
}
#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
-template <class BidiIterator, class Allocator, class traits>
-inline bool perl_matcher<BidiIterator, Allocator, traits>::protected_call(
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+inline bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::protected_call(
protected_proc_type proc)
{
::boost::re_detail::concrete_protected_call
- <perl_matcher<BidiIterator, Allocator, traits> >
+ <perl_matcher<BidiIterator, Allocator, traits, Allocator2> >
obj(this, proc);
return obj.execute();
}
#endif
-template <class BidiIterator, class Allocator, class traits>
-inline bool perl_matcher<BidiIterator, Allocator, traits>::match()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+inline bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match()
{
#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
- return protected_call(&perl_matcher<BidiIterator, Allocator, traits>::match_imp);
+ return protected_call(&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_imp);
#else
return match_imp();
#endif
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_imp()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_imp()
{
// initialise our stack if we are non-recursive:
#ifdef BOOST_REGEX_NON_RECURSIVE
@@ -221,28 +221,28 @@
#endif
}
-template <class BidiIterator, class Allocator, class traits>
-inline bool perl_matcher<BidiIterator, Allocator, traits>::find()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+inline bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find()
{
#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
- return protected_call(&perl_matcher<BidiIterator, Allocator, traits>::find_imp);
+ return protected_call(&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_imp);
#else
return find_imp();
#endif
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::find_imp()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_imp()
{
static matcher_proc_type const s_find_vtable[7] =
{
- &perl_matcher<BidiIterator, Allocator, traits>::find_restart_any,
- &perl_matcher<BidiIterator, Allocator, traits>::find_restart_word,
- &perl_matcher<BidiIterator, Allocator, traits>::find_restart_line,
- &perl_matcher<BidiIterator, Allocator, traits>::find_restart_buf,
- &perl_matcher<BidiIterator, Allocator, traits>::match_prefix,
- &perl_matcher<BidiIterator, Allocator, traits>::find_restart_lit,
- &perl_matcher<BidiIterator, Allocator, traits>::find_restart_lit,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_restart_any,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_restart_word,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_restart_line,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_restart_buf,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_prefix,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_restart_lit,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_restart_lit,
};
// initialise our stack if we are non-recursive:
@@ -312,8 +312,8 @@
#endif
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_prefix()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_prefix()
{
m_has_partial_match = false;
m_has_found_match = false;
@@ -345,8 +345,8 @@
return m_has_found_match;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_literal()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_literal()
{
unsigned int len = static_cast<const re_literal*>(pstate)->length;
const char_type* what = reinterpret_cast<const char_type*>(static_cast<const re_literal*>(pstate) + 1);
@@ -362,8 +362,8 @@
return true;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_start_line()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_start_line()
{
if(position == backstop)
{
@@ -399,8 +399,8 @@
return false;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_end_line()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_end_line()
{
if(position != last)
{
@@ -431,8 +431,8 @@
return false;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_wild()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_wild()
{
if(position == last)
return false;
@@ -445,8 +445,8 @@
return true;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_word_boundary()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_word_boundary()
{
bool b; // indcates whether next character is a word character
if(position != last)
@@ -483,8 +483,8 @@
return false; // no match if we get to here...
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_within_word()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_within_word()
{
if(position == last)
return false;
@@ -509,8 +509,8 @@
return false;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_word_start()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_word_start()
{
if(position == last)
return false; // can't be starting a word if we're already at the end of input
@@ -534,8 +534,8 @@
return true;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_word_end()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_word_end()
{
if((position == backstop) && ((m_match_flags & match_prev_avail) == 0))
return false; // start of buffer can't be end of word
@@ -559,8 +559,8 @@
return true; // if we fall through to here then we've succeeded
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_buffer_start()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_buffer_start()
{
if((position != backstop) || (m_match_flags & match_not_bob))
return false;
@@ -569,8 +569,8 @@
return true;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_buffer_end()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_buffer_end()
{
if((position != last) || (m_match_flags & match_not_eob))
return false;
@@ -579,8 +579,8 @@
return true;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_backref()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_backref()
{
//
// Compare with what we previously matched.
@@ -616,8 +616,8 @@
return true;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_long_set()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_long_set()
{
typedef typename traits::char_class_type char_class_type;
// let the traits class do the work:
@@ -633,8 +633,8 @@
return false;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_set()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_set()
{
if(position == last)
return false;
@@ -647,15 +647,15 @@
return false;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_jump()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_jump()
{
pstate = static_cast<const re_jump*>(pstate)->alt.p;
return true;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_combining()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_combining()
{
if(position == last)
return false;
@@ -668,8 +668,8 @@
return true;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_soft_buffer_end()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_soft_buffer_end()
{
if(m_match_flags & match_not_eob)
return false;
@@ -681,8 +681,8 @@
return true;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_restart_continue()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_restart_continue()
{
if(position == search_base)
{
@@ -692,8 +692,8 @@
return false;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_backstep()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_backstep()
{
#ifdef BOOST_MSVC
#pragma warning(push)
@@ -723,8 +723,8 @@
#endif
}
-template <class BidiIterator, class Allocator, class traits>
-inline bool perl_matcher<BidiIterator, Allocator, traits>::match_assert_backref()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+inline bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_assert_backref()
{
// return true if marked sub-expression N has been matched:
int index = static_cast<const re_brace*>(pstate)->index;
@@ -782,8 +782,8 @@
return result;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_toggle_case()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_toggle_case()
{
// change our case sensitivity:
this->icase = static_cast<const re_case*>(pstate)->icase;
@@ -792,8 +792,8 @@
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::find_restart_any()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_restart_any()
{
#ifdef BOOST_MSVC
#pragma warning(push)
@@ -825,8 +825,8 @@
#endif
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::find_restart_word()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_restart_word()
{
#ifdef BOOST_MSVC
#pragma warning(push)
@@ -861,8 +861,8 @@
#endif
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::find_restart_line()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_restart_line()
{
// do search optimised for line starts:
const unsigned char* _map = re.get_map();
@@ -894,16 +894,16 @@
return false;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::find_restart_buf()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_restart_buf()
{
if((position == base) && ((m_match_flags & match_not_bob) == 0))
return match_prefix();
return false;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::find_restart_lit()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_restart_lit()
{
#if 0
if(position == last)
Modified: sandbox/regex-allocator/boost/regex/v4/perl_matcher_non_recursive.hpp
==============================================================================
--- sandbox/regex-allocator/boost/regex/v4/perl_matcher_non_recursive.hpp (original)
+++ sandbox/regex-allocator/boost/regex/v4/perl_matcher_non_recursive.hpp 2010-11-15 11:04:34 EST (Mon, 15 Nov 2010)
@@ -138,45 +138,45 @@
Results results;
};
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_all_states()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_all_states()
{
static matcher_proc_type const s_match_vtable[30] =
{
- (&perl_matcher<BidiIterator, Allocator, traits>::match_startmark),
- &perl_matcher<BidiIterator, Allocator, traits>::match_endmark,
- &perl_matcher<BidiIterator, Allocator, traits>::match_literal,
- &perl_matcher<BidiIterator, Allocator, traits>::match_start_line,
- &perl_matcher<BidiIterator, Allocator, traits>::match_end_line,
- &perl_matcher<BidiIterator, Allocator, traits>::match_wild,
- &perl_matcher<BidiIterator, Allocator, traits>::match_match,
- &perl_matcher<BidiIterator, Allocator, traits>::match_word_boundary,
- &perl_matcher<BidiIterator, Allocator, traits>::match_within_word,
- &perl_matcher<BidiIterator, Allocator, traits>::match_word_start,
- &perl_matcher<BidiIterator, Allocator, traits>::match_word_end,
- &perl_matcher<BidiIterator, Allocator, traits>::match_buffer_start,
- &perl_matcher<BidiIterator, Allocator, traits>::match_buffer_end,
- &perl_matcher<BidiIterator, Allocator, traits>::match_backref,
- &perl_matcher<BidiIterator, Allocator, traits>::match_long_set,
- &perl_matcher<BidiIterator, Allocator, traits>::match_set,
- &perl_matcher<BidiIterator, Allocator, traits>::match_jump,
- &perl_matcher<BidiIterator, Allocator, traits>::match_alt,
- &perl_matcher<BidiIterator, Allocator, traits>::match_rep,
- &perl_matcher<BidiIterator, Allocator, traits>::match_combining,
- &perl_matcher<BidiIterator, Allocator, traits>::match_soft_buffer_end,
- &perl_matcher<BidiIterator, Allocator, traits>::match_restart_continue,
+ (&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_startmark),
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_endmark,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_literal,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_start_line,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_end_line,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_wild,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_match,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_word_boundary,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_within_word,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_word_start,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_word_end,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_buffer_start,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_buffer_end,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_backref,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_long_set,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_set,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_jump,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_alt,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_rep,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_combining,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_soft_buffer_end,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_restart_continue,
// Although this next line *should* be evaluated at compile time, in practice
// some compilers (VC++) emit run-time initialisation which breaks thread
// safety, so use a dispatch function instead:
- //(::boost::is_random_access_iterator<BidiIterator>::value ? &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_fast : &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_slow),
- &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_dispatch,
- &perl_matcher<BidiIterator, Allocator, traits>::match_char_repeat,
- &perl_matcher<BidiIterator, Allocator, traits>::match_set_repeat,
- &perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat,
- &perl_matcher<BidiIterator, Allocator, traits>::match_backstep,
- &perl_matcher<BidiIterator, Allocator, traits>::match_assert_backref,
- &perl_matcher<BidiIterator, Allocator, traits>::match_toggle_case,
- &perl_matcher<BidiIterator, Allocator, traits>::match_recursion,
+ //(::boost::is_random_access_iterator<BidiIterator>::value ? &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_dot_repeat_fast : &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_dot_repeat_slow),
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_dot_repeat_dispatch,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_char_repeat,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_set_repeat,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_long_set_repeat,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_backstep,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_assert_backref,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_toggle_case,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_recursion,
};
push_recursion_stopper();
@@ -202,8 +202,8 @@
return m_recursive_result;
}
-template <class BidiIterator, class Allocator, class traits>
-void perl_matcher<BidiIterator, Allocator, traits>::extend_stack()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+void perl_matcher<BidiIterator, Allocator, traits, Allocator2>::extend_stack()
{
if(used_block_count)
{
@@ -222,8 +222,8 @@
raise_error(traits_inst, regex_constants::error_stack);
}
-template <class BidiIterator, class Allocator, class traits>
-inline void perl_matcher<BidiIterator, Allocator, traits>::push_matched_paren(int index, const sub_match<BidiIterator>& sub)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+inline void perl_matcher<BidiIterator, Allocator, traits, Allocator2>::push_matched_paren(int index, const sub_match<BidiIterator>& sub)
{
//BOOST_ASSERT(index);
saved_matched_paren<BidiIterator>* pmp = static_cast<saved_matched_paren<BidiIterator>*>(m_backup_state);
@@ -238,8 +238,8 @@
m_backup_state = pmp;
}
-template <class BidiIterator, class Allocator, class traits>
-inline void perl_matcher<BidiIterator, Allocator, traits>::push_recursion_stopper()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+inline void perl_matcher<BidiIterator, Allocator, traits, Allocator2>::push_recursion_stopper()
{
saved_state* pmp = m_backup_state;
--pmp;
@@ -253,8 +253,8 @@
m_backup_state = pmp;
}
-template <class BidiIterator, class Allocator, class traits>
-inline void perl_matcher<BidiIterator, Allocator, traits>::push_assertion(const re_syntax_base* ps, bool positive)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+inline void perl_matcher<BidiIterator, Allocator, traits, Allocator2>::push_assertion(const re_syntax_base* ps, bool positive)
{
saved_assertion<BidiIterator>* pmp = static_cast<saved_assertion<BidiIterator>*>(m_backup_state);
--pmp;
@@ -268,8 +268,8 @@
m_backup_state = pmp;
}
-template <class BidiIterator, class Allocator, class traits>
-inline void perl_matcher<BidiIterator, Allocator, traits>::push_alt(const re_syntax_base* ps)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+inline void perl_matcher<BidiIterator, Allocator, traits, Allocator2>::push_alt(const re_syntax_base* ps)
{
saved_position<BidiIterator>* pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
--pmp;
@@ -283,8 +283,8 @@
m_backup_state = pmp;
}
-template <class BidiIterator, class Allocator, class traits>
-inline void perl_matcher<BidiIterator, Allocator, traits>::push_non_greedy_repeat(const re_syntax_base* ps)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+inline void perl_matcher<BidiIterator, Allocator, traits, Allocator2>::push_non_greedy_repeat(const re_syntax_base* ps)
{
saved_position<BidiIterator>* pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
--pmp;
@@ -298,8 +298,8 @@
m_backup_state = pmp;
}
-template <class BidiIterator, class Allocator, class traits>
-inline void perl_matcher<BidiIterator, Allocator, traits>::push_repeater_count(int i, repeater_count<BidiIterator>** s)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+inline void perl_matcher<BidiIterator, Allocator, traits, Allocator2>::push_repeater_count(int i, repeater_count<BidiIterator>** s)
{
saved_repeater<BidiIterator>* pmp = static_cast<saved_repeater<BidiIterator>*>(m_backup_state);
--pmp;
@@ -313,8 +313,8 @@
m_backup_state = pmp;
}
-template <class BidiIterator, class Allocator, class traits>
-inline void perl_matcher<BidiIterator, Allocator, traits>::push_single_repeat(std::size_t c, const re_repeat* r, BidiIterator last_position, int state_id)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+inline void perl_matcher<BidiIterator, Allocator, traits, Allocator2>::push_single_repeat(std::size_t c, const re_repeat* r, BidiIterator last_position, int state_id)
{
saved_single_repeat<BidiIterator>* pmp = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
--pmp;
@@ -328,8 +328,8 @@
m_backup_state = pmp;
}
-template <class BidiIterator, class Allocator, class traits>
-inline void perl_matcher<BidiIterator, Allocator, traits>::push_recursion(int idx, const re_syntax_base* p, results_type* presults)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+inline void perl_matcher<BidiIterator, Allocator, traits, Allocator2>::push_recursion(int idx, const re_syntax_base* p, results_type* presults)
{
saved_recursion<results_type>* pmp = static_cast<saved_recursion<results_type>*>(m_backup_state);
--pmp;
@@ -343,8 +343,8 @@
m_backup_state = pmp;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_startmark()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_startmark()
{
int index = static_cast<const re_brace*>(pstate)->index;
icase = static_cast<const re_brace*>(pstate)->icase;
@@ -454,8 +454,8 @@
return true;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_alt()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_alt()
{
bool take_first, take_second;
const re_alt* jmp = static_cast<const re_alt*>(pstate);
@@ -491,8 +491,8 @@
return false; // neither option is possible
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_rep()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_rep()
{
#ifdef BOOST_MSVC
#pragma warning(push)
@@ -597,8 +597,8 @@
#endif
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_slow()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_dot_repeat_slow()
{
unsigned count = 0;
const re_repeat* rep = static_cast<const re_repeat*>(pstate);
@@ -642,8 +642,8 @@
}
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_fast()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_dot_repeat_fast()
{
if(m_match_flags & match_not_dot_null)
return match_dot_repeat_slow();
@@ -681,8 +681,8 @@
}
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_char_repeat()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_char_repeat()
{
#ifdef BOOST_MSVC
#pragma warning(push)
@@ -750,8 +750,8 @@
#endif
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_set_repeat()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_set_repeat()
{
#ifdef BOOST_MSVC
#pragma warning(push)
@@ -818,8 +818,8 @@
#endif
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_long_set_repeat()
{
#ifdef BOOST_MSVC
#pragma warning(push)
@@ -887,8 +887,8 @@
#endif
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_recursion()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_recursion()
{
BOOST_ASSERT(pstate->type == syntax_element_recurse);
//
@@ -915,8 +915,8 @@
return true;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_endmark()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_endmark()
{
int index = static_cast<const re_brace*>(pstate)->index;
icase = static_cast<const re_brace*>(pstate)->icase;
@@ -947,8 +947,8 @@
return true;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_match()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_match()
{
if(!recursion_stack.empty())
{
@@ -992,27 +992,27 @@
****************************************************************************/
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind(bool have_match)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind(bool have_match)
{
static unwind_proc_type const s_unwind_table[18] =
{
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_end,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_paren,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion_stopper,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_assertion,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_alt,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_repeater_counter,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_extra_block,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_greedy_single_repeat,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_slow_dot_repeat,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_fast_dot_repeat,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_char_repeat,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_short_set_repeat,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_long_set_repeat,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_non_greedy_repeat,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion_pop,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_end,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_paren,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_recursion_stopper,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_assertion,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_alt,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_repeater_counter,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_extra_block,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_greedy_single_repeat,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_slow_dot_repeat,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_fast_dot_repeat,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_char_repeat,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_short_set_repeat,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_long_set_repeat,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_non_greedy_repeat,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_recursion,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_recursion_pop,
};
m_recursive_result = have_match;
@@ -1032,15 +1032,15 @@
return pstate ? true : false;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_end(bool)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_end(bool)
{
pstate = 0; // nothing left to search
return false; // end of stack nothing more to search
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_paren(bool have_match)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_paren(bool have_match)
{
saved_matched_paren<BidiIterator>* pmp = static_cast<saved_matched_paren<BidiIterator>*>(m_backup_state);
// restore previous values if no match was found:
@@ -1062,16 +1062,16 @@
return true; // keep looking
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion_stopper(bool)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_recursion_stopper(bool)
{
boost::re_detail::inplace_destroy(m_backup_state++);
pstate = 0; // nothing left to search
return false; // end of stack nothing more to search
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_assertion(bool r)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_assertion(bool r)
{
saved_assertion<BidiIterator>* pmp = static_cast<saved_assertion<BidiIterator>*>(m_backup_state);
pstate = pmp->pstate;
@@ -1083,8 +1083,8 @@
return !result; // return false if the assertion was matched to stop search.
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_alt(bool r)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_alt(bool r)
{
saved_position<BidiIterator>* pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
if(!r)
@@ -1097,8 +1097,8 @@
return r;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_repeater_counter(bool)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_repeater_counter(bool)
{
saved_repeater<BidiIterator>* pmp = static_cast<saved_repeater<BidiIterator>*>(m_backup_state);
boost::re_detail::inplace_destroy(pmp++);
@@ -1106,8 +1106,8 @@
return true; // keep looking
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_extra_block(bool)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_extra_block(bool)
{
saved_extra_block* pmp = static_cast<saved_extra_block*>(m_backup_state);
void* condemmed = m_stack_base;
@@ -1118,16 +1118,16 @@
return true; // keep looking
}
-template <class BidiIterator, class Allocator, class traits>
-inline void perl_matcher<BidiIterator, Allocator, traits>::destroy_single_repeat()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+inline void perl_matcher<BidiIterator, Allocator, traits, Allocator2>::destroy_single_repeat()
{
saved_single_repeat<BidiIterator>* p = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
boost::re_detail::inplace_destroy(p++);
m_backup_state = p;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_greedy_single_repeat(bool r)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_greedy_single_repeat(bool r)
{
saved_single_repeat<BidiIterator>* pmp = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
@@ -1175,8 +1175,8 @@
return false;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_slow_dot_repeat(bool r)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_slow_dot_repeat(bool r)
{
saved_single_repeat<BidiIterator>* pmp = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
@@ -1239,8 +1239,8 @@
return false;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_fast_dot_repeat(bool r)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_fast_dot_repeat(bool r)
{
saved_single_repeat<BidiIterator>* pmp = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
@@ -1293,8 +1293,8 @@
return false;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_char_repeat(bool r)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_char_repeat(bool r)
{
saved_single_repeat<BidiIterator>* pmp = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
@@ -1362,8 +1362,8 @@
return false;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_short_set_repeat(bool r)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_short_set_repeat(bool r)
{
saved_single_repeat<BidiIterator>* pmp = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
@@ -1431,8 +1431,8 @@
return false;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_long_set_repeat(bool r)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_long_set_repeat(bool r)
{
typedef typename traits::char_class_type mask_type;
saved_single_repeat<BidiIterator>* pmp = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
@@ -1501,8 +1501,8 @@
return false;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_non_greedy_repeat(bool r)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_non_greedy_repeat(bool r)
{
saved_position<BidiIterator>* pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
if(!r)
@@ -1516,8 +1516,8 @@
return r;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion(bool r)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_recursion(bool r)
{
saved_recursion<results_type>* pmp = static_cast<saved_recursion<results_type>*>(m_backup_state);
if(!r)
@@ -1532,8 +1532,8 @@
return true;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion_pop(bool r)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_recursion_pop(bool r)
{
saved_state* pmp = static_cast<saved_state*>(m_backup_state);
if(!r)
@@ -1545,8 +1545,8 @@
return true;
}
-template <class BidiIterator, class Allocator, class traits>
-void perl_matcher<BidiIterator, Allocator, traits>::push_recursion_pop()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+void perl_matcher<BidiIterator, Allocator, traits, Allocator2>::push_recursion_pop()
{
saved_state* pmp = static_cast<saved_state*>(m_backup_state);
--pmp;
@@ -1560,8 +1560,8 @@
m_backup_state = pmp;
}
/*
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_parenthesis_pop(bool r)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_parenthesis_pop(bool r)
{
saved_state* pmp = static_cast<saved_state*>(m_backup_state);
if(!r)
@@ -1573,8 +1573,8 @@
return true;
}
-template <class BidiIterator, class Allocator, class traits>
-void perl_matcher<BidiIterator, Allocator, traits>::push_parenthesis_pop()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+void perl_matcher<BidiIterator, Allocator, traits, Allocator2>::push_parenthesis_pop()
{
saved_state* pmp = static_cast<saved_state*>(m_backup_state);
--pmp;
@@ -1588,8 +1588,8 @@
m_backup_state = pmp;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_parenthesis_push(bool r)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_parenthesis_push(bool r)
{
saved_position<BidiIterator>* pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
if(!r)
@@ -1601,8 +1601,8 @@
return true;
}
-template <class BidiIterator, class Allocator, class traits>
-inline void perl_matcher<BidiIterator, Allocator, traits>::push_parenthesis_push(BidiIterator p)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+inline void perl_matcher<BidiIterator, Allocator, traits, Allocator2>::push_parenthesis_push(BidiIterator p)
{
saved_position<BidiIterator>* pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
--pmp;
Modified: sandbox/regex-allocator/boost/regex/v4/perl_matcher_recursive.hpp
==============================================================================
--- sandbox/regex-allocator/boost/regex/v4/perl_matcher_recursive.hpp (original)
+++ sandbox/regex-allocator/boost/regex/v4/perl_matcher_recursive.hpp 2010-11-15 11:04:34 EST (Mon, 15 Nov 2010)
@@ -57,45 +57,45 @@
const sub_match<BidiIterator>& get() { return sub; }
};
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_all_states()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_all_states()
{
static matcher_proc_type const s_match_vtable[30] =
{
- (&perl_matcher<BidiIterator, Allocator, traits>::match_startmark),
- &perl_matcher<BidiIterator, Allocator, traits>::match_endmark,
- &perl_matcher<BidiIterator, Allocator, traits>::match_literal,
- &perl_matcher<BidiIterator, Allocator, traits>::match_start_line,
- &perl_matcher<BidiIterator, Allocator, traits>::match_end_line,
- &perl_matcher<BidiIterator, Allocator, traits>::match_wild,
- &perl_matcher<BidiIterator, Allocator, traits>::match_match,
- &perl_matcher<BidiIterator, Allocator, traits>::match_word_boundary,
- &perl_matcher<BidiIterator, Allocator, traits>::match_within_word,
- &perl_matcher<BidiIterator, Allocator, traits>::match_word_start,
- &perl_matcher<BidiIterator, Allocator, traits>::match_word_end,
- &perl_matcher<BidiIterator, Allocator, traits>::match_buffer_start,
- &perl_matcher<BidiIterator, Allocator, traits>::match_buffer_end,
- &perl_matcher<BidiIterator, Allocator, traits>::match_backref,
- &perl_matcher<BidiIterator, Allocator, traits>::match_long_set,
- &perl_matcher<BidiIterator, Allocator, traits>::match_set,
- &perl_matcher<BidiIterator, Allocator, traits>::match_jump,
- &perl_matcher<BidiIterator, Allocator, traits>::match_alt,
- &perl_matcher<BidiIterator, Allocator, traits>::match_rep,
- &perl_matcher<BidiIterator, Allocator, traits>::match_combining,
- &perl_matcher<BidiIterator, Allocator, traits>::match_soft_buffer_end,
- &perl_matcher<BidiIterator, Allocator, traits>::match_restart_continue,
+ (&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_startmark),
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_endmark,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_literal,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_start_line,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_end_line,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_wild,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_match,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_word_boundary,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_within_word,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_word_start,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_word_end,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_buffer_start,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_buffer_end,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_backref,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_long_set,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_set,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_jump,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_alt,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_rep,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_combining,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_soft_buffer_end,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_restart_continue,
// Although this next line *should* be evaluated at compile time, in practice
// some compilers (VC++) emit run-time initialisation which breaks thread
// safety, so use a dispatch function instead:
- //(::boost::is_random_access_iterator<BidiIterator>::value ? &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_fast : &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_slow),
- &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_dispatch,
- &perl_matcher<BidiIterator, Allocator, traits>::match_char_repeat,
- &perl_matcher<BidiIterator, Allocator, traits>::match_set_repeat,
- &perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat,
- &perl_matcher<BidiIterator, Allocator, traits>::match_backstep,
- &perl_matcher<BidiIterator, Allocator, traits>::match_assert_backref,
- &perl_matcher<BidiIterator, Allocator, traits>::match_toggle_case,
- &perl_matcher<BidiIterator, Allocator, traits>::match_recursion,
+ //(::boost::is_random_access_iterator<BidiIterator>::value ? &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_dot_repeat_fast : &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_dot_repeat_slow),
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_dot_repeat_dispatch,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_char_repeat,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_set_repeat,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_long_set_repeat,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_backstep,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_assert_backref,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_toggle_case,
+ &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_recursion,
};
if(state_count > max_state_count)
@@ -114,8 +114,8 @@
return true;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_startmark()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_startmark()
{
int index = static_cast<const re_brace*>(pstate)->index;
icase = static_cast<const re_brace*>(pstate)->icase;
@@ -251,8 +251,8 @@
return r;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_alt()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_alt()
{
bool take_first, take_second;
const re_alt* jmp = static_cast<const re_alt*>(pstate);
@@ -296,8 +296,8 @@
return false; // neither option is possible
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_rep()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_rep()
{
#ifdef BOOST_MSVC
#pragma warning(push)
@@ -391,8 +391,8 @@
#endif
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_slow()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_dot_repeat_slow()
{
#ifdef BOOST_MSVC
#pragma warning(push)
@@ -452,8 +452,8 @@
#endif
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_fast()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_dot_repeat_fast()
{
#ifdef BOOST_MSVC
#pragma warning(push)
@@ -515,8 +515,8 @@
#endif
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_char_repeat()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_char_repeat()
{
#ifdef BOOST_MSVC
#pragma warning(push)
@@ -620,8 +620,8 @@
#endif
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_set_repeat()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_set_repeat()
{
#ifdef BOOST_MSVC
#pragma warning(push)
@@ -709,8 +709,8 @@
#endif
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_long_set_repeat()
{
#ifdef BOOST_MSVC
#pragma warning(push)
@@ -799,8 +799,8 @@
#endif
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::backtrack_till_match(std::size_t count)
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::backtrack_till_match(std::size_t count)
{
#ifdef BOOST_MSVC
#pragma warning(push)
@@ -850,8 +850,8 @@
#endif
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_recursion()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_recursion()
{
BOOST_ASSERT(pstate->type == syntax_element_recurse);
//
@@ -884,8 +884,8 @@
return true;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_endmark()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_endmark()
{
int index = static_cast<const re_brace*>(pstate)->index;
icase = static_cast<const re_brace*>(pstate)->icase;
@@ -924,8 +924,8 @@
return true;
}
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_match()
+template <class BidiIterator, class Allocator, class traits, class Allocator2>
+bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_match()
{
if(!recursion_stack.empty())
{
Modified: sandbox/regex-allocator/boost/regex/v4/regex_fwd.hpp
==============================================================================
--- sandbox/regex-allocator/boost/regex/v4/regex_fwd.hpp (original)
+++ sandbox/regex-allocator/boost/regex/v4/regex_fwd.hpp 2010-11-15 11:04:34 EST (Mon, 15 Nov 2010)
@@ -54,7 +54,7 @@
struct regex_traits;
#endif
-template <class charT, class traits = regex_traits<charT> >
+template <class charT, class traits = regex_traits<charT>, class Allocator = std::allocator<charT> >
class basic_regex;
typedef basic_regex<char, regex_traits<char> > regex;
Modified: sandbox/regex-allocator/boost/regex/v4/regex_grep.hpp
==============================================================================
--- sandbox/regex-allocator/boost/regex/v4/regex_grep.hpp (original)
+++ sandbox/regex-allocator/boost/regex/v4/regex_grep.hpp 2010-11-15 11:04:34 EST (Mon, 15 Nov 2010)
@@ -37,11 +37,11 @@
// regex_grep:
// find all non-overlapping matches within the sequence first last:
//
-template <class Predicate, class BidiIterator, class charT, class traits>
+template <class Predicate, class BidiIterator, class charT, class traits, class Allocator>
inline unsigned int regex_grep(Predicate foo,
BidiIterator first,
BidiIterator last,
- const basic_regex<charT, traits>& e,
+ const basic_regex<charT, traits, Allocator>& e,
match_flag_type flags = match_default)
{
if(e.flags() & regex_constants::failbit)
@@ -50,7 +50,7 @@
typedef typename match_results<BidiIterator>::allocator_type match_allocator_type;
match_results<BidiIterator> m;
- re_detail::perl_matcher<BidiIterator, match_allocator_type, traits> matcher(first, last, m, e, flags, first);
+ re_detail::perl_matcher<BidiIterator, match_allocator_type, traits, Allocator> matcher(first, last, m, e, flags, first);
unsigned int count = 0;
while(matcher.find())
{
@@ -91,17 +91,17 @@
// this isn't really a partial specialisation, but template function
// overloading - if the compiler doesn't support partial specialisation
// then it really won't support this either:
-template <class Predicate, class charT, class traits>
+template <class Predicate, class charT, class traits, class Allocator>
inline unsigned int regex_grep(Predicate foo, const charT* str,
- const basic_regex<charT, traits>& e,
+ const basic_regex<charT, traits, Allocator>& e,
match_flag_type flags = match_default)
{
return regex_grep(foo, str, str + traits::length(str), e, flags);
}
-template <class Predicate, class ST, class SA, class charT, class traits>
+template <class Predicate, class ST, class SA, class charT, class traits, class Allocator>
inline unsigned int regex_grep(Predicate foo, const std::basic_string<charT, ST, SA>& s,
- const basic_regex<charT, traits>& e,
+ const basic_regex<charT, traits, Allocator>& e,
match_flag_type flags = match_default)
{
return regex_grep(foo, s.begin(), s.end(), e, flags);
Modified: sandbox/regex-allocator/boost/regex/v4/regex_iterator.hpp
==============================================================================
--- sandbox/regex-allocator/boost/regex/v4/regex_iterator.hpp (original)
+++ sandbox/regex-allocator/boost/regex/v4/regex_iterator.hpp 2010-11-15 11:04:34 EST (Mon, 15 Nov 2010)
@@ -36,10 +36,11 @@
template <class BidirectionalIterator,
class charT,
- class traits>
+ class traits,
+ class Allocator>
class regex_iterator_implementation
{
- typedef basic_regex<charT, traits> regex_type;
+ typedef basic_regex<charT, traits, Allocator> regex_type;
match_results<BidirectionalIterator> what; // current match
BidirectionalIterator base; // start of sequence
@@ -83,7 +84,8 @@
template <class BidirectionalIterator,
class charT = BOOST_DEDUCED_TYPENAME re_detail::regex_iterator_traits<BidirectionalIterator>::value_type,
- class traits = regex_traits<charT> >
+ class traits = regex_traits<charT>,
+ class Allocator = std::allocator<charT> >
class regex_iterator
#ifndef BOOST_NO_STD_ITERATOR
: public std::iterator<
@@ -95,10 +97,10 @@
#endif
{
private:
- typedef regex_iterator_implementation<BidirectionalIterator, charT, traits> impl;
+ typedef regex_iterator_implementation<BidirectionalIterator, charT, traits, Allocator> impl;
typedef shared_ptr<impl> pimpl;
public:
- typedef basic_regex<charT, traits> regex_type;
+ typedef basic_regex<charT, traits, Allocator> regex_type;
typedef match_results<BidirectionalIterator> value_type;
typedef typename re_detail::regex_iterator_traits<BidirectionalIterator>::difference_type
difference_type;
@@ -173,15 +175,15 @@
#endif
// make_regex_iterator:
-template <class charT, class traits>
-inline regex_iterator<const charT*, charT, traits> make_regex_iterator(const charT* p, const basic_regex<charT, traits>& e, regex_constants::match_flag_type m = regex_constants::match_default)
+template <class charT, class traits, class Allocator>
+inline regex_iterator<const charT*, charT, traits> make_regex_iterator(const charT* p, const basic_regex<charT, traits, Allocator>& e, regex_constants::match_flag_type m = regex_constants::match_default)
{
- return regex_iterator<const charT*, charT, traits>(p, p+traits::length(p), e, m);
+ return regex_iterator<const charT*, charT, traits, Allocator>(p, p+traits::length(p), e, m);
}
-template <class charT, class traits, class ST, class SA>
-inline regex_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits> make_regex_iterator(const std::basic_string<charT, ST, SA>& p, const basic_regex<charT, traits>& e, regex_constants::match_flag_type m = regex_constants::match_default)
+template <class charT, class traits, class ST, class SA, class Allocator>
+inline regex_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits, Allocator> make_regex_iterator(const std::basic_string<charT, ST, SA>& p, const basic_regex<charT, traits, Allocator>& e, regex_constants::match_flag_type m = regex_constants::match_default)
{
- return regex_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits>(p.begin(), p.end(), e, m);
+ return regex_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits, Allocator>(p.begin(), p.end(), e, m);
}
#ifdef BOOST_MSVC
Modified: sandbox/regex-allocator/boost/regex/v4/regex_match.hpp
==============================================================================
--- sandbox/regex-allocator/boost/regex/v4/regex_match.hpp (original)
+++ sandbox/regex-allocator/boost/regex/v4/regex_match.hpp 2010-11-15 11:04:34 EST (Mon, 15 Nov 2010)
@@ -40,18 +40,18 @@
// returns true if the specified regular expression matches
// the whole of the input. Fills in what matched in m.
//
-template <class BidiIterator, class Allocator, class charT, class traits>
+template <class BidiIterator, class Allocator, class charT, class traits, class Allocator2>
bool regex_match(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
- const basic_regex<charT, traits>& e,
+ const basic_regex<charT, traits, Allocator2>& e,
match_flag_type flags = match_default)
{
- re_detail::perl_matcher<BidiIterator, Allocator, traits> matcher(first, last, m, e, flags, first);
+ re_detail::perl_matcher<BidiIterator, Allocator, traits, Allocator2> matcher(first, last, m, e, flags, first);
return matcher.match();
}
-template <class iterator, class charT, class traits>
+template <class iterator, class charT, class traits, class Allocator>
bool regex_match(iterator first, iterator last,
- const basic_regex<charT, traits>& e,
+ const basic_regex<charT, traits, Allocator>& e,
match_flag_type flags = match_default)
{
match_results<iterator> m;
@@ -64,35 +64,35 @@
// this isn't really a partial specialisation, but template function
// overloading - if the compiler doesn't support partial specialisation
// then it really won't support this either:
-template <class charT, class Allocator, class traits>
+template <class charT, class Allocator, class traits, class Allocator2>
inline bool regex_match(const charT* str,
match_results<const charT*, Allocator>& m,
- const basic_regex<charT, traits>& e,
+ const basic_regex<charT, traits, Allocator2>& e,
match_flag_type flags = match_default)
{
return regex_match(str, str + traits::length(str), m, e, flags);
}
-template <class ST, class SA, class Allocator, class charT, class traits>
+template <class ST, class SA, class Allocator, class charT, class traits, class Allocator2>
inline bool regex_match(const std::basic_string<charT, ST, SA>& s,
match_results<typename std::basic_string<charT, ST, SA>::const_iterator, Allocator>& m,
- const basic_regex<charT, traits>& e,
+ const basic_regex<charT, traits, Allocator2>& e,
match_flag_type flags = match_default)
{
return regex_match(s.begin(), s.end(), m, e, flags);
}
-template <class charT, class traits>
+template <class charT, class traits, class Allocator>
inline bool regex_match(const charT* str,
- const basic_regex<charT, traits>& e,
+ const basic_regex<charT, traits, Allocator>& e,
match_flag_type flags = match_default)
{
match_results<const charT*> m;
return regex_match(str, str + traits::length(str), m, e, flags | regex_constants::match_any);
}
-template <class ST, class SA, class charT, class traits>
+template <class ST, class SA, class charT, class traits, class Allocator>
inline bool regex_match(const std::basic_string<charT, ST, SA>& s,
- const basic_regex<charT, traits>& e,
+ const basic_regex<charT, traits, Allocator>& e,
match_flag_type flags = match_default)
{
typedef typename std::basic_string<charT, ST, SA>::const_iterator iterator;
Modified: sandbox/regex-allocator/boost/regex/v4/regex_replace.hpp
==============================================================================
--- sandbox/regex-allocator/boost/regex/v4/regex_replace.hpp (original)
+++ sandbox/regex-allocator/boost/regex/v4/regex_replace.hpp 2010-11-15 11:04:34 EST (Mon, 15 Nov 2010)
@@ -35,16 +35,16 @@
#pragma warning(pop)
#endif
-template <class OutputIterator, class BidirectionalIterator, class traits, class charT, class Formatter>
+template <class OutputIterator, class BidirectionalIterator, class traits, class charT, class Formatter, class Allocator>
OutputIterator regex_replace(OutputIterator out,
BidirectionalIterator first,
BidirectionalIterator last,
- const basic_regex<charT, traits>& e,
+ const basic_regex<charT, traits, Allocator>& e,
Formatter fmt,
match_flag_type flags = match_default)
{
- regex_iterator<BidirectionalIterator, charT, traits> i(first, last, e, flags);
- regex_iterator<BidirectionalIterator, charT, traits> j;
+ regex_iterator<BidirectionalIterator, charT, traits, Allocator> i(first, last, e, flags);
+ regex_iterator<BidirectionalIterator, charT, traits, Allocator> j;
if(i == j)
{
if(!(flags & regex_constants::format_no_copy))
@@ -69,9 +69,9 @@
return out;
}
-template <class traits, class charT, class Formatter>
+template <class traits, class charT, class Formatter, class Allocator>
std::basic_string<charT> regex_replace(const std::basic_string<charT>& s,
- const basic_regex<charT, traits>& e,
+ const basic_regex<charT, traits, Allocator>& e,
Formatter fmt,
match_flag_type flags = match_default)
{
Modified: sandbox/regex-allocator/boost/regex/v4/regex_search.hpp
==============================================================================
--- sandbox/regex-allocator/boost/regex/v4/regex_search.hpp (original)
+++ sandbox/regex-allocator/boost/regex/v4/regex_search.hpp 2010-11-15 11:04:34 EST (Mon, 15 Nov 2010)
@@ -33,26 +33,26 @@
#pragma warning(pop)
#endif
-template <class BidiIterator, class Allocator, class charT, class traits>
+template <class BidiIterator, class Allocator, class charT, class traits, class Allocator2>
bool regex_search(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
- const basic_regex<charT, traits>& e,
+ const basic_regex<charT, traits, Allocator2>& e,
match_flag_type flags = match_default)
{
return regex_search(first, last, m, e, flags, first);
}
-template <class BidiIterator, class Allocator, class charT, class traits>
+template <class BidiIterator, class Allocator, class charT, class traits, class Allocator2>
bool regex_search(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
- const basic_regex<charT, traits>& e,
+ const basic_regex<charT, traits, Allocator2>& e,
match_flag_type flags,
BidiIterator base)
{
if(e.flags() & regex_constants::failbit)
return false;
- re_detail::perl_matcher<BidiIterator, Allocator, traits> matcher(first, last, m, e, flags, base);
+ re_detail::perl_matcher<BidiIterator, Allocator, traits, Allocator2> matcher(first, last, m, e, flags, base);
return matcher.find();
}
@@ -63,19 +63,19 @@
// this isn't really a partial specialisation, but template function
// overloading - if the compiler doesn't support partial specialisation
// then it really won't support this either:
-template <class charT, class Allocator, class traits>
+template <class charT, class Allocator, class traits, class Allocator2>
inline bool regex_search(const charT* str,
match_results<const charT*, Allocator>& m,
- const basic_regex<charT, traits>& e,
+ const basic_regex<charT, traits, Allocator2>& e,
match_flag_type flags = match_default)
{
return regex_search(str, str + traits::length(str), m, e, flags);
}
-template <class ST, class SA, class Allocator, class charT, class traits>
+template <class ST, class SA, class Allocator, class charT, class traits, class Allocator2>
inline bool regex_search(const std::basic_string<charT, ST, SA>& s,
match_results<typename std::basic_string<charT, ST, SA>::const_iterator, Allocator>& m,
- const basic_regex<charT, traits>& e,
+ const basic_regex<charT, traits, Allocator2>& e,
match_flag_type flags = match_default)
{
return regex_search(s.begin(), s.end(), m, e, flags);
@@ -131,9 +131,9 @@
#endif
-template <class BidiIterator, class charT, class traits>
+template <class BidiIterator, class charT, class traits, class Allocator>
bool regex_search(BidiIterator first, BidiIterator last,
- const basic_regex<charT, traits>& e,
+ const basic_regex<charT, traits, Allocator>& e,
match_flag_type flags = match_default)
{
if(e.flags() & regex_constants::failbit)
@@ -141,23 +141,23 @@
match_results<BidiIterator> m;
typedef typename match_results<BidiIterator>::allocator_type match_alloc_type;
- re_detail::perl_matcher<BidiIterator, match_alloc_type, traits> matcher(first, last, m, e, flags | regex_constants::match_any, first);
+ re_detail::perl_matcher<BidiIterator, match_alloc_type, traits, Allocator> matcher(first, last, m, e, flags | regex_constants::match_any, first);
return matcher.find();
}
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-template <class charT, class traits>
+template <class charT, class traits, class Allocator>
inline bool regex_search(const charT* str,
- const basic_regex<charT, traits>& e,
+ const basic_regex<charT, traits, Allocator>& e,
match_flag_type flags = match_default)
{
return regex_search(str, str + traits::length(str), e, flags);
}
-template <class ST, class SA, class charT, class traits>
+template <class ST, class SA, class charT, class traits, class Allocator>
inline bool regex_search(const std::basic_string<charT, ST, SA>& s,
- const basic_regex<charT, traits>& e,
+ const basic_regex<charT, traits, Allocator>& e,
match_flag_type flags = match_default)
{
return regex_search(s.begin(), s.end(), e, flags);
Modified: sandbox/regex-allocator/boost/regex/v4/regex_split.hpp
==============================================================================
--- sandbox/regex-allocator/boost/regex/v4/regex_split.hpp (original)
+++ sandbox/regex-allocator/boost/regex/v4/regex_split.hpp 2010-11-15 11:04:34 EST (Mon, 15 Nov 2010)
@@ -99,10 +99,10 @@
} // namespace re_detail
-template <class OutputIterator, class charT, class Traits1, class Alloc1, class Traits2>
+template <class OutputIterator, class charT, class Traits1, class Alloc1, class Traits2, class Allocator>
std::size_t regex_split(OutputIterator out,
std::basic_string<charT, Traits1, Alloc1>& s,
- const basic_regex<charT, Traits2>& e,
+ const basic_regex<charT, Traits2, Allocator>& e,
match_flag_type flags,
std::size_t max_split)
{
@@ -134,10 +134,10 @@
return init_size - max_split;
}
-template <class OutputIterator, class charT, class Traits1, class Alloc1, class Traits2>
+template <class OutputIterator, class charT, class Traits1, class Alloc1, class Traits2, class Allocator>
inline std::size_t regex_split(OutputIterator out,
std::basic_string<charT, Traits1, Alloc1>& s,
- const basic_regex<charT, Traits2>& e,
+ const basic_regex<charT, Traits2, Allocator>& e,
match_flag_type flags = match_default)
{
return regex_split(out, s, e, flags, UINT_MAX);
Modified: sandbox/regex-allocator/boost/regex/v4/regex_token_iterator.hpp
==============================================================================
--- sandbox/regex-allocator/boost/regex/v4/regex_token_iterator.hpp (original)
+++ sandbox/regex-allocator/boost/regex/v4/regex_token_iterator.hpp 2010-11-15 11:04:34 EST (Mon, 15 Nov 2010)
@@ -53,10 +53,11 @@
template <class BidirectionalIterator,
class charT,
- class traits>
+ class traits,
+ class Allocator>
class regex_token_iterator_implementation
{
- typedef basic_regex<charT, traits> regex_type;
+ typedef basic_regex<charT, traits, Allocator> regex_type;
typedef sub_match<BidirectionalIterator> value_type;
match_results<BidirectionalIterator> what; // current match
@@ -169,7 +170,8 @@
template <class BidirectionalIterator,
class charT = BOOST_DEDUCED_TYPENAME re_detail::regex_iterator_traits<BidirectionalIterator>::value_type,
- class traits = regex_traits<charT> >
+ class traits = regex_traits<charT>,
+ class Allocator =std::allocator<charT> >
class regex_token_iterator
#ifndef BOOST_NO_STD_ITERATOR
: public std::iterator<
@@ -181,10 +183,10 @@
#endif
{
private:
- typedef regex_token_iterator_implementation<BidirectionalIterator, charT, traits> impl;
+ typedef regex_token_iterator_implementation<BidirectionalIterator, charT, traits, Allocator> impl;
typedef shared_ptr<impl> pimpl;
public:
- typedef basic_regex<charT, traits> regex_type;
+ typedef basic_regex<charT, traits, Allocator> regex_type;
typedef sub_match<BidirectionalIterator> value_type;
typedef typename re_detail::regex_iterator_traits<BidirectionalIterator>::difference_type
difference_type;
@@ -286,35 +288,35 @@
typedef regex_token_iterator<std::wstring::const_iterator> wsregex_token_iterator;
#endif
-template <class charT, class traits>
-inline regex_token_iterator<const charT*, charT, traits> make_regex_token_iterator(const charT* p, const basic_regex<charT, traits>& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
+template <class charT, class traits, class Allocator>
+inline regex_token_iterator<const charT*, charT, traits, Allocator> make_regex_token_iterator(const charT* p, const basic_regex<charT, traits, Allocator>& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
{
return regex_token_iterator<const charT*, charT, traits>(p, p+traits::length(p), e, submatch, m);
}
-template <class charT, class traits, class ST, class SA>
-inline regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits> make_regex_token_iterator(const std::basic_string<charT, ST, SA>& p, const basic_regex<charT, traits>& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
+template <class charT, class traits, class ST, class SA, class Allocator>
+inline regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits, Allocator> make_regex_token_iterator(const std::basic_string<charT, ST, SA>& p, const basic_regex<charT, traits, Allocator>& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
{
return regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m);
}
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-template <class charT, class traits, std::size_t N>
-inline regex_token_iterator<const charT*, charT, traits> make_regex_token_iterator(const charT* p, const basic_regex<charT, traits>& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default)
+template <class charT, class traits, std::size_t N, class Allocator>
+inline regex_token_iterator<const charT*, charT, traits, Allocator> make_regex_token_iterator(const charT* p, const basic_regex<charT, traits, Allocator>& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default)
{
return regex_token_iterator<const charT*, charT, traits>(p, p+traits::length(p), e, submatch, m);
}
-template <class charT, class traits, class ST, class SA, std::size_t N>
-inline regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits> make_regex_token_iterator(const std::basic_string<charT, ST, SA>& p, const basic_regex<charT, traits>& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default)
+template <class charT, class traits, class ST, class SA, std::size_t N, class Allocator>
+inline regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits, Allocator> make_regex_token_iterator(const std::basic_string<charT, ST, SA>& p, const basic_regex<charT, traits, Allocator>& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default)
{
return regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m);
}
#endif
-template <class charT, class traits>
-inline regex_token_iterator<const charT*, charT, traits> make_regex_token_iterator(const charT* p, const basic_regex<charT, traits>& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default)
+template <class charT, class traits, class Allocator>
+inline regex_token_iterator<const charT*, charT, traits, Allocator> make_regex_token_iterator(const charT* p, const basic_regex<charT, traits, Allocator>& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default)
{
return regex_token_iterator<const charT*, charT, traits>(p, p+traits::length(p), e, submatch, m);
}
-template <class charT, class traits, class ST, class SA>
-inline regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits> make_regex_token_iterator(const std::basic_string<charT, ST, SA>& p, const basic_regex<charT, traits>& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default)
+template <class charT, class traits, class ST, class SA, class Allocator>
+inline regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits, Allocator> make_regex_token_iterator(const std::basic_string<charT, ST, SA>& p, const basic_regex<charT, traits, Allocator>& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default)
{
return regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m);
}
Modified: sandbox/regex-allocator/boost/regex/v4/states.hpp
==============================================================================
--- sandbox/regex-allocator/boost/regex/v4/states.hpp (original)
+++ sandbox/regex-allocator/boost/regex/v4/states.hpp 2010-11-15 11:04:34 EST (Mon, 15 Nov 2010)
@@ -272,14 +272,14 @@
Forward declaration: we'll need this one later...
***********************************************************************/
-template<class charT, class traits>
+template<class charT, class traits, class Allocator>
struct regex_data;
-template <class iterator, class charT, class traits_type, class char_classT>
+template <class iterator, class charT, class traits_type, class char_classT, class Allocator>
iterator BOOST_REGEX_CALL re_is_set_member(iterator next,
iterator last,
const re_set_long<char_classT>* set_,
- const regex_data<charT, traits_type>& e, bool icase);
+ const regex_data<charT, traits_type, Allocator>& e, bool icase);
} // namespace re_detail
Modified: sandbox/regex-allocator/libs/regex/build/Jamfile.v2
==============================================================================
--- sandbox/regex-allocator/libs/regex/build/Jamfile.v2 (original)
+++ sandbox/regex-allocator/libs/regex/build/Jamfile.v2 2010-11-15 11:04:34 EST (Mon, 15 Nov 2010)
@@ -8,6 +8,7 @@
project : requirements
# default to all warnings on:
<warnings>all
+ <include>../../..
;
local disable-icu = [ MATCH (--disable-icu) : [ modules.peek : ARGV ] ] ;
@@ -107,7 +108,9 @@
<toolset>gcc-cygwin:<link>static
;
-boost-install boost_regex ;
+#boost-install boost_regex ;
+
+
Modified: sandbox/regex-allocator/libs/regex/example/Jamfile.v2
==============================================================================
--- sandbox/regex-allocator/libs/regex/example/Jamfile.v2 (original)
+++ sandbox/regex-allocator/libs/regex/example/Jamfile.v2 2010-11-15 11:04:34 EST (Mon, 15 Nov 2010)
@@ -3,6 +3,12 @@
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt.
+import modules ;
+
+local boost = [ modules.peek : BOOST ] ;
+
+path-constant inc : ../../../ ;
+
project
: requirements
<threading>multi
@@ -15,8 +21,10 @@
<toolset>gcc:<cxxflags>-Wextra
<define>U_USING_ICU_NAMESPACE=0
#<toolset>gcc-mw:<link>static
- #<toolset>gcc-mingw:<link>static
- <toolset>gcc-cygwin:<link>static
+ #<toolset>gcc-mingw:<link>static
+ <toolset>gcc-cygwin:<link>static
+ <include>$(inc)
+ <define>BOOST_ALL_NO_LIB
;
rule regex-test-run ( sources + : input * : name * )
@@ -40,7 +48,7 @@
test-suite regex-examples :
[ regex-test-run timer/regex_timer.cpp : $(BOOST_ROOT)/libs/regex/example/timer/input_script.txt ]
-[ regex-test-run grep/grep.cpp ../../program_options/build//boost_program_options/<link>static : -n -b $(BOOST_ROOT)/boost/regex.hpp $(BOOST_ROOT)/boost/type_traits.hpp : test_grep ]
+[ regex-test-run grep/grep.cpp $(boost)/libs/program_options/build//boost_program_options/<link>static : -n -b $(BOOST_ROOT)/boost/regex.hpp $(BOOST_ROOT)/boost/type_traits.hpp : test_grep ]
[ regex-test-run snippets/credit_card_example.cpp ]
[ regex-test-run snippets/mfc_example.cpp ]
[ regex-test-run snippets/icu_example.cpp ]
Modified: sandbox/regex-allocator/libs/regex/test/Jamfile.v2
==============================================================================
--- sandbox/regex-allocator/libs/regex/test/Jamfile.v2 (original)
+++ sandbox/regex-allocator/libs/regex/test/Jamfile.v2 2010-11-15 11:04:34 EST (Mon, 15 Nov 2010)
@@ -3,6 +3,12 @@
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt.
+import modules ;
+
+local boost = [ modules.peek : BOOST ] ;
+
+path-constant inc : ../../../ ;
+
project
: requirements
<threading>multi
@@ -20,6 +26,8 @@
#<toolset>gcc-mw:<link>static
#<toolset>gcc-mingw:<link>static
<toolset>gcc-cygwin:<link>static
+ <include>$(inc)
+ <define>BOOST_ALL_NO_LIB
;
#
@@ -95,7 +103,7 @@
: regex_regress ]
[ run regress/$(R_SOURCE) ../build//boost_regex
- ../../thread/build//boost_thread ../build//icu_options
+ $(boost)/libs/thread/build//boost_thread ../build//icu_options
: # command line
: # input files
: # requirements
@@ -126,7 +134,7 @@
[ run unicode/unicode_iterator_test.cpp ../build//boost_regex ]
[ run static_mutex/static_mutex_test.cpp
- ../../thread/build//boost_thread ../build//boost_regex
+ $(boost)/libs/thread/build//boost_thread ../build//boost_regex
]
[ run object_cache/object_cache_test.cpp ../build//boost_regex
]
Modified: sandbox/regex-allocator/libs/regex/test/concepts/concept_check.cpp
==============================================================================
--- sandbox/regex-allocator/libs/regex/test/concepts/concept_check.cpp (original)
+++ sandbox/regex-allocator/libs/regex/test/concepts/concept_check.cpp 2010-11-15 11:04:34 EST (Mon, 15 Nov 2010)
@@ -84,14 +84,14 @@
//
// now test the regex_traits concepts:
//
- typedef boost::basic_regex<char, boost::regex_traits_architype<char> > regex_traits_tester_type1;
+ typedef boost::basic_regex<char, boost::regex_traits_architype<char>, allocator_architype_2<char> > regex_traits_tester_type1;
boost::function_requires<
boost::BoostRegexConcept<
regex_traits_tester_type1
>
>();
#if !defined(__MWERKS__) && !defined(__SUNPRO_CC) // MWCW tries to instantiate std::basic_string<boost::char_architype>, not sure whose bug this is....
- typedef boost::basic_regex<boost::char_architype, boost::regex_traits_architype<boost::char_architype> > regex_traits_tester_type2;
+ typedef boost::basic_regex<boost::char_architype, boost::regex_traits_architype<boost::char_architype>, allocator_architype_2<char> > regex_traits_tester_type2;
boost::function_requires<
boost::BaseRegexConcept<
regex_traits_tester_type2
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk