forked from boostorg/regex
commit of split-config, including any changes required to existing libraries (mainly regex).
[SVN r11138]
This commit is contained in:
@ -24,7 +24,7 @@
|
||||
#ifndef BOOST_RE_CREGEX_HPP
|
||||
#define BOOST_RE_CREGEX_HPP
|
||||
|
||||
#include <boost/regex/detail/regex_config.hpp>
|
||||
#include <boost/regex/config.hpp>
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -a4 -b -Ve -pc
|
||||
@ -47,7 +47,7 @@ typedef struct
|
||||
unsigned int eflags; /* none of your business :-) */
|
||||
} regex_tA;
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
typedef struct
|
||||
{
|
||||
unsigned int re_magic;
|
||||
@ -96,16 +96,16 @@ typedef enum{
|
||||
REG_STARTEND = 00004
|
||||
} reg_exec_flags;
|
||||
|
||||
BOOST_RE_IX_DECL int BOOST_RE_CCALL regcompA(regex_tA*, const char*, int);
|
||||
BOOST_RE_IX_DECL unsigned int BOOST_RE_CCALL regerrorA(int, const regex_tA*, char*, unsigned int);
|
||||
BOOST_RE_IX_DECL int BOOST_RE_CCALL regexecA(const regex_tA*, const char*, unsigned int, regmatch_t*, int);
|
||||
BOOST_RE_IX_DECL void BOOST_RE_CCALL regfreeA(regex_tA*);
|
||||
BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompA(regex_tA*, const char*, int);
|
||||
BOOST_REGEX_DECL unsigned int BOOST_REGEX_CCALL regerrorA(int, const regex_tA*, char*, unsigned int);
|
||||
BOOST_REGEX_DECL int BOOST_REGEX_CCALL regexecA(const regex_tA*, const char*, unsigned int, regmatch_t*, int);
|
||||
BOOST_REGEX_DECL void BOOST_REGEX_CCALL regfreeA(regex_tA*);
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
BOOST_RE_IX_DECL int BOOST_RE_CCALL regcompW(regex_tW*, const wchar_t*, int);
|
||||
BOOST_RE_IX_DECL unsigned int BOOST_RE_CCALL regerrorW(int, const regex_tW*, wchar_t*, unsigned int);
|
||||
BOOST_RE_IX_DECL int BOOST_RE_CCALL regexecW(const regex_tW*, const wchar_t*, unsigned int, regmatch_t*, int);
|
||||
BOOST_RE_IX_DECL void BOOST_RE_CCALL regfreeW(regex_tW*);
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompW(regex_tW*, const wchar_t*, int);
|
||||
BOOST_REGEX_DECL unsigned int BOOST_REGEX_CCALL regerrorW(int, const regex_tW*, wchar_t*, unsigned int);
|
||||
BOOST_REGEX_DECL int BOOST_REGEX_CCALL regexecW(const regex_tW*, const wchar_t*, unsigned int, regmatch_t*, int);
|
||||
BOOST_REGEX_DECL void BOOST_REGEX_CCALL regfreeW(regex_tW*);
|
||||
#endif
|
||||
|
||||
#ifdef UNICODE
|
||||
@ -191,7 +191,7 @@ enum match_flags
|
||||
//
|
||||
// C++ high level wrapper goes here:
|
||||
//
|
||||
#if defined(__cplusplus) && !defined(BOOST_RE_NO_STRING_H)
|
||||
#if defined(__cplusplus)
|
||||
#include <string>
|
||||
#include <vector>
|
||||
namespace boost{
|
||||
@ -226,7 +226,7 @@ typedef bool (*GrepFileCallback)(const char* file, const RegEx& expression);
|
||||
typedef bool (*FindFilesCallback)(const char* file);
|
||||
#endif
|
||||
|
||||
class BOOST_RE_IX_DECL RegEx
|
||||
class BOOST_REGEX_DECL RegEx
|
||||
{
|
||||
private:
|
||||
re_detail::RegExData* pdata;
|
||||
|
@ -65,7 +65,7 @@ using boost::regerrorA;
|
||||
using boost::regexecA;
|
||||
using boost::regfreeA;
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
using boost::regcompW;
|
||||
using boost::regerrorW;
|
||||
using boost::regexecW;
|
||||
|
@ -34,15 +34,12 @@
|
||||
|
||||
// what follows is all C++ don't include in C builds!!
|
||||
|
||||
#ifdef BOOST_RE_DEBUG
|
||||
#ifdef BOOST_REGEX_DEBUG
|
||||
# include <iosfwd>
|
||||
#endif
|
||||
|
||||
#include <new>
|
||||
#include <boost/regex/detail/regex_config.hpp>
|
||||
#if !defined(BOOST_RE_NO_TYPEINFO)
|
||||
#include <typeinfo>
|
||||
#endif
|
||||
#include <boost/regex/config.hpp>
|
||||
#include <cstring>
|
||||
#include <boost/regex/detail/regex_stack.hpp>
|
||||
#include <boost/regex/detail/regex_raw_buffer.hpp>
|
||||
@ -81,13 +78,13 @@ public:
|
||||
typedef unsigned int size_type;
|
||||
typedef regex_traits<char> base_type;
|
||||
|
||||
char BOOST_RE_CALL translate(char c, bool)const
|
||||
char BOOST_REGEX_CALL translate(char c, bool)const
|
||||
{
|
||||
return static_cast<const regex_traits<char>*>(this)->translate(c, true);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
template<>
|
||||
class char_regex_traits_i<wchar_t> : public regex_traits<wchar_t>
|
||||
{
|
||||
@ -97,11 +94,11 @@ public:
|
||||
typedef unsigned int size_type;
|
||||
typedef regex_traits<wchar_t> base_type;
|
||||
|
||||
wchar_t BOOST_RE_CALL translate(wchar_t c, bool)const
|
||||
wchar_t BOOST_REGEX_CALL translate(wchar_t c, bool)const
|
||||
{
|
||||
return static_cast<const regex_traits<wchar_t>*>(this)->translate(c, true);
|
||||
}
|
||||
boost::uint_fast32_t BOOST_RE_CALL lookup_classname(const wchar_t* first, const wchar_t* last)const
|
||||
boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const wchar_t* first, const wchar_t* last)const
|
||||
{
|
||||
boost::uint_fast32_t result = static_cast<const regex_traits<wchar_t>*>(this)->lookup_classname(first, last);
|
||||
if((result & base_type::char_class_upper) == base_type::char_class_upper)
|
||||
@ -193,7 +190,7 @@ enum syntax_element_type
|
||||
syntax_element_restart_continue = syntax_element_soft_buffer_end + 1
|
||||
};
|
||||
|
||||
#ifdef BOOST_RE_DEBUG
|
||||
#ifdef BOOST_REGEX_DEBUG
|
||||
// dwa 09/26/00 - This is needed to suppress warnings about an ambiguous conversion
|
||||
std::ostream& operator<<(std::ostream&, syntax_element_type);
|
||||
#endif
|
||||
@ -290,7 +287,7 @@ enum re_jump_size_type
|
||||
// class basic_regex
|
||||
// handles error codes and flags
|
||||
|
||||
class BOOST_RE_IX_DECL regbase
|
||||
class BOOST_REGEX_DECL regbase
|
||||
{
|
||||
public:
|
||||
enum flag_type_
|
||||
@ -335,7 +332,7 @@ public:
|
||||
restart_fixed_lit = 6
|
||||
};
|
||||
|
||||
flag_type BOOST_RE_CALL flags()const
|
||||
flag_type BOOST_REGEX_CALL flags()const
|
||||
{
|
||||
return _flags;
|
||||
}
|
||||
@ -359,7 +356,7 @@ struct regex_iterator_traits
|
||||
{
|
||||
typedef typename T::iterator_category iterator_category;
|
||||
typedef typename T::value_type value_type;
|
||||
#ifndef BOOST_MSVC
|
||||
#if !defined(BOOST_NO_STD_ITERATOR)
|
||||
typedef typename T::difference_type difference_type;
|
||||
typedef typename T::pointer pointer;
|
||||
typedef typename T::reference reference;
|
||||
@ -403,7 +400,7 @@ template<>
|
||||
struct regex_iterator_traits<std::string::iterator> : pointer_iterator_traits<char>{};
|
||||
template<>
|
||||
struct regex_iterator_traits<std::string::const_iterator> : const_pointer_iterator_traits<char>{};
|
||||
#ifndef BOOST_NO_WSTRING
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
template<>
|
||||
struct regex_iterator_traits<std::wstring::iterator> : pointer_iterator_traits<wchar_t>{};
|
||||
template<>
|
||||
@ -437,7 +434,7 @@ struct def_alloc_param_traits<const wchar_t*>
|
||||
|
||||
}
|
||||
|
||||
template <class iterator, class Allocator BOOST_RE_DEF_ALLOC_PARAM(typename re_detail::def_alloc_param_traits<iterator>::type) >
|
||||
template <class iterator, class Allocator = BOOST_DEFAULT_ALLOCATOR(re_detail::def_alloc_param_traits<iterator>::type) >
|
||||
class match_results;
|
||||
|
||||
//
|
||||
@ -446,7 +443,7 @@ class match_results;
|
||||
// regular expression:
|
||||
//
|
||||
|
||||
#if defined(BOOST_RE_NO_TEMPLATE_SWITCH_MERGE) && !defined(BOOST_RE_NO_NAMESPACES)
|
||||
#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
|
||||
//
|
||||
// Ugly ugly hack,
|
||||
// template don't merge if they contain switch statements so declare these
|
||||
@ -455,7 +452,7 @@ class match_results;
|
||||
namespace{
|
||||
#endif
|
||||
|
||||
template <class charT, class traits BOOST_RE_TRICKY_DEFAULT_PARAM(regex_traits<charT>), class Allocator BOOST_RE_DEF_ALLOC_PARAM(charT) >
|
||||
template <class charT, class traits = regex_traits<charT>, class Allocator = BOOST_DEFAULT_ALLOCATOR(charT) >
|
||||
class reg_expression : public regbase
|
||||
{
|
||||
typedef typename traits::size_type traits_size_type;
|
||||
@ -495,8 +492,8 @@ public:
|
||||
reg_expression(const charT* p, size_type len, flag_type f, const Allocator& a = Allocator());
|
||||
reg_expression(const reg_expression&);
|
||||
~reg_expression();
|
||||
reg_expression& BOOST_RE_CALL operator=(const reg_expression&);
|
||||
reg_expression& BOOST_RE_CALL operator=(const charT* ptr)
|
||||
reg_expression& BOOST_REGEX_CALL operator=(const reg_expression&);
|
||||
reg_expression& BOOST_REGEX_CALL operator=(const charT* ptr)
|
||||
{
|
||||
set_expression(ptr, regbase::normal | regbase::use_except);
|
||||
return *this;
|
||||
@ -522,7 +519,7 @@ public:
|
||||
#ifndef BOOST_NO_MEMBER_TEMPLATES
|
||||
|
||||
template <class ST, class SA>
|
||||
unsigned int BOOST_RE_CALL set_expression(const std::basic_string<charT, ST, SA>& p, flag_type f = regbase::normal)
|
||||
unsigned int BOOST_REGEX_CALL set_expression(const std::basic_string<charT, ST, SA>& p, flag_type f = regbase::normal)
|
||||
{ return set_expression(p.data(), p.data() + p.size(), f); }
|
||||
|
||||
template <class ST, class SA>
|
||||
@ -540,14 +537,14 @@ public:
|
||||
}
|
||||
|
||||
template <class ST, class SA>
|
||||
reg_expression& BOOST_RE_CALL operator=(const std::basic_string<charT, ST, SA>& p)
|
||||
reg_expression& BOOST_REGEX_CALL operator=(const std::basic_string<charT, ST, SA>& p)
|
||||
{
|
||||
set_expression(p.c_str(), p.c_str() + p.size(), regbase::normal | regbase::use_except);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class string_traits, class A>
|
||||
reg_expression& BOOST_RE_CALL assign(
|
||||
reg_expression& BOOST_REGEX_CALL assign(
|
||||
const std::basic_string<charT, string_traits, A>& s,
|
||||
flag_type f = regbase::normal)
|
||||
{
|
||||
@ -556,7 +553,7 @@ public:
|
||||
}
|
||||
|
||||
template <class fwd_iterator>
|
||||
reg_expression& BOOST_RE_CALL assign(fwd_iterator first,
|
||||
reg_expression& BOOST_REGEX_CALL assign(fwd_iterator first,
|
||||
fwd_iterator last,
|
||||
flag_type f = regbase::normal)
|
||||
{
|
||||
@ -566,20 +563,20 @@ public:
|
||||
set_expression(a.get(), a.get() + len, f | regbase::use_except);
|
||||
return *this;
|
||||
}
|
||||
#elif !defined(BOOST_RE_NO_STRING_DEF_ARGS)
|
||||
unsigned int BOOST_RE_CALL set_expression(const std::basic_string<charT>& p, flag_type f = regbase::normal)
|
||||
#else
|
||||
unsigned int BOOST_REGEX_CALL set_expression(const std::basic_string<charT>& p, flag_type f = regbase::normal)
|
||||
{ return set_expression(p.data(), p.data() + p.size(), f | regbase::use_except); }
|
||||
|
||||
reg_expression(const std::basic_string<charT>& p, flag_type f = regbase::normal, const Allocator& a = Allocator())
|
||||
: data(a), pkmp(0) { set_expression(p, f | regbase::use_except); }
|
||||
|
||||
reg_expression& BOOST_RE_CALL operator=(const std::basic_string<charT>& p)
|
||||
reg_expression& BOOST_REGEX_CALL operator=(const std::basic_string<charT>& p)
|
||||
{
|
||||
set_expression(p.c_str(), p.c_str() + p.size(), regbase::normal | regbase::use_except);
|
||||
return *this;
|
||||
}
|
||||
|
||||
reg_expression& BOOST_RE_CALL assign(
|
||||
reg_expression& BOOST_REGEX_CALL assign(
|
||||
const std::basic_string<charT>& s,
|
||||
flag_type f = regbase::normal)
|
||||
{
|
||||
@ -592,18 +589,18 @@ public:
|
||||
|
||||
//
|
||||
// allocator access:
|
||||
Allocator BOOST_RE_CALL get_allocator()const;
|
||||
Allocator BOOST_REGEX_CALL get_allocator()const;
|
||||
//
|
||||
// locale:
|
||||
locale_type BOOST_RE_CALL imbue(locale_type l){ return traits_inst.imbue(l); }
|
||||
locale_type BOOST_RE_CALL getloc()const{ return traits_inst.getloc(); }
|
||||
locale_type BOOST_REGEX_CALL imbue(locale_type l){ return traits_inst.imbue(l); }
|
||||
locale_type BOOST_REGEX_CALL getloc()const{ return traits_inst.getloc(); }
|
||||
//
|
||||
// flags:
|
||||
flag_type BOOST_RE_CALL getflags()const
|
||||
flag_type BOOST_REGEX_CALL getflags()const
|
||||
{ return flags(); }
|
||||
//
|
||||
// str:
|
||||
std::basic_string<charT> BOOST_RE_CALL str()const
|
||||
std::basic_string<charT> BOOST_REGEX_CALL str()const
|
||||
{
|
||||
std::basic_string<charT> result;
|
||||
if(this->error_code() == 0)
|
||||
@ -612,45 +609,46 @@ public:
|
||||
}
|
||||
//
|
||||
// begin, end:
|
||||
const_iterator BOOST_RE_CALL begin()const
|
||||
const_iterator BOOST_REGEX_CALL begin()const
|
||||
{ return (this->error_code() ? 0 : _expression); }
|
||||
const_iterator BOOST_RE_CALL end()const
|
||||
const_iterator BOOST_REGEX_CALL end()const
|
||||
{ return (this->error_code() ? 0 : _expression + _expression_len); }
|
||||
//
|
||||
// swap:
|
||||
void BOOST_RE_CALL swap(reg_expression&)throw();
|
||||
void BOOST_REGEX_CALL swap(reg_expression&)throw();
|
||||
//
|
||||
// size:
|
||||
size_type BOOST_RE_CALL size()const
|
||||
size_type BOOST_REGEX_CALL size()const
|
||||
{ return (this->error_code() ? 0 : _expression_len); }
|
||||
//
|
||||
// max_size:
|
||||
size_type BOOST_RE_CALL max_size()const
|
||||
size_type BOOST_REGEX_CALL max_size()const
|
||||
{ return UINT_MAX; }
|
||||
//
|
||||
// empty:
|
||||
bool BOOST_RE_CALL empty()const
|
||||
{ return this->error_code(); }
|
||||
bool BOOST_REGEX_CALL empty()const
|
||||
{ return 0 != this->error_code(); }
|
||||
|
||||
unsigned BOOST_RE_CALL mark_count()const { return (this->error_code() ? 0 : marks); }
|
||||
bool BOOST_RE_CALL operator==(const reg_expression&)const;
|
||||
bool BOOST_RE_CALL operator<(const reg_expression&)const;
|
||||
unsigned BOOST_REGEX_CALL mark_count()const { return (this->error_code() ? 0 : marks); }
|
||||
bool BOOST_REGEX_CALL operator==(const reg_expression&)const;
|
||||
bool BOOST_REGEX_CALL operator<(const reg_expression&)const;
|
||||
//
|
||||
// The following are deprecated as public interfaces
|
||||
// but are available for compatibility with earlier versions.
|
||||
allocator_type BOOST_RE_CALL allocator()const;
|
||||
const charT* BOOST_RE_CALL expression()const { return (this->error_code() ? 0 : _expression); }
|
||||
unsigned int BOOST_RE_CALL set_expression(const charT* p, const charT* end, flag_type f = regbase::normal);
|
||||
unsigned int BOOST_RE_CALL set_expression(const charT* p, flag_type f = regbase::normal) { return set_expression(p, p + traits_type::length(p), f); }
|
||||
allocator_type BOOST_REGEX_CALL allocator()const;
|
||||
const charT* BOOST_REGEX_CALL expression()const { return (this->error_code() ? 0 : _expression); }
|
||||
unsigned int BOOST_REGEX_CALL set_expression(const charT* p, const charT* end, flag_type f = regbase::normal);
|
||||
unsigned int BOOST_REGEX_CALL set_expression(const charT* p, flag_type f = regbase::normal) { return set_expression(p, p + traits_type::length(p), f); }
|
||||
//
|
||||
// this should be private but template friends don't work:
|
||||
const traits_type& get_traits()const { return traits_inst; }
|
||||
unsigned int BOOST_RE_CALL error_code()const
|
||||
unsigned int BOOST_REGEX_CALL error_code()const
|
||||
{
|
||||
return error_code_;
|
||||
}
|
||||
|
||||
private:
|
||||
traits_type traits_inst;
|
||||
re_detail::raw_storage<Allocator> data;
|
||||
unsigned _restart_type;
|
||||
unsigned marks;
|
||||
@ -663,48 +661,47 @@ private:
|
||||
re_detail::kmp_info<charT>* pkmp;
|
||||
unsigned error_code_;
|
||||
charT* _expression;
|
||||
traits_type traits_inst;
|
||||
|
||||
void BOOST_RE_CALL compile_maps();
|
||||
void BOOST_RE_CALL compile_map(re_detail::re_syntax_base* node, unsigned char* _map, unsigned int* pnull, unsigned char mask, re_detail::re_syntax_base* terminal = 0)const;
|
||||
bool BOOST_RE_CALL probe_start(re_detail::re_syntax_base* node, charT c, re_detail::re_syntax_base* terminal)const;
|
||||
bool BOOST_RE_CALL probe_start_null(re_detail::re_syntax_base* node, re_detail::re_syntax_base* terminal)const;
|
||||
void BOOST_RE_CALL fixup_apply(re_detail::re_syntax_base* b, unsigned cbraces);
|
||||
void BOOST_RE_CALL move_offsets(re_detail::re_syntax_base* j, unsigned size);
|
||||
re_detail::re_syntax_base* BOOST_RE_CALL compile_set(const charT*& first, const charT* last);
|
||||
re_detail::re_syntax_base* BOOST_RE_CALL compile_set_aux(re_detail::jstack<traits_string_type, Allocator>& singles, re_detail::jstack<traits_string_type, Allocator>& ranges, re_detail::jstack<boost::uint_fast32_t, Allocator>& classes, re_detail::jstack<traits_string_type, Allocator>& equivalents, bool isnot, const re_detail::_narrow_type&);
|
||||
re_detail::re_syntax_base* BOOST_RE_CALL compile_set_aux(re_detail::jstack<traits_string_type, Allocator>& singles, re_detail::jstack<traits_string_type, Allocator>& ranges, re_detail::jstack<boost::uint_fast32_t, Allocator>& classes, re_detail::jstack<traits_string_type, Allocator>& equivalents, bool isnot, const re_detail::_wide_type&);
|
||||
re_detail::re_syntax_base* BOOST_RE_CALL compile_set_simple(re_detail::re_syntax_base* dat, unsigned long cls, bool isnot = false);
|
||||
unsigned int BOOST_RE_CALL parse_inner_set(const charT*& first, const charT* last);
|
||||
void BOOST_REGEX_CALL compile_maps();
|
||||
void BOOST_REGEX_CALL compile_map(re_detail::re_syntax_base* node, unsigned char* _map, unsigned int* pnull, unsigned char mask, re_detail::re_syntax_base* terminal = 0)const;
|
||||
bool BOOST_REGEX_CALL probe_start(re_detail::re_syntax_base* node, charT c, re_detail::re_syntax_base* terminal)const;
|
||||
bool BOOST_REGEX_CALL probe_start_null(re_detail::re_syntax_base* node, re_detail::re_syntax_base* terminal)const;
|
||||
void BOOST_REGEX_CALL fixup_apply(re_detail::re_syntax_base* b, unsigned cbraces);
|
||||
void BOOST_REGEX_CALL move_offsets(re_detail::re_syntax_base* j, unsigned size);
|
||||
re_detail::re_syntax_base* BOOST_REGEX_CALL compile_set(const charT*& first, const charT* last);
|
||||
re_detail::re_syntax_base* BOOST_REGEX_CALL compile_set_aux(re_detail::jstack<traits_string_type, Allocator>& singles, re_detail::jstack<traits_string_type, Allocator>& ranges, re_detail::jstack<boost::uint_fast32_t, Allocator>& classes, re_detail::jstack<traits_string_type, Allocator>& equivalents, bool isnot, const re_detail::_narrow_type&);
|
||||
re_detail::re_syntax_base* BOOST_REGEX_CALL compile_set_aux(re_detail::jstack<traits_string_type, Allocator>& singles, re_detail::jstack<traits_string_type, Allocator>& ranges, re_detail::jstack<boost::uint_fast32_t, Allocator>& classes, re_detail::jstack<traits_string_type, Allocator>& equivalents, bool isnot, const re_detail::_wide_type&);
|
||||
re_detail::re_syntax_base* BOOST_REGEX_CALL compile_set_simple(re_detail::re_syntax_base* dat, unsigned long cls, bool isnot = false);
|
||||
unsigned int BOOST_REGEX_CALL parse_inner_set(const charT*& first, const charT* last);
|
||||
|
||||
re_detail::re_syntax_base* BOOST_RE_CALL add_simple(re_detail::re_syntax_base* dat, re_detail::syntax_element_type type, unsigned int size = sizeof(re_detail::re_syntax_base));
|
||||
re_detail::re_syntax_base* BOOST_RE_CALL add_literal(re_detail::re_syntax_base* dat, charT c);
|
||||
charT BOOST_RE_CALL parse_escape(const charT*& first, const charT* last);
|
||||
void BOOST_RE_CALL parse_range(const charT*& first, const charT* last, unsigned& min, unsigned& max);
|
||||
bool BOOST_RE_CALL skip_space(const charT*& first, const charT* last);
|
||||
unsigned int BOOST_RE_CALL probe_restart(re_detail::re_syntax_base* dat);
|
||||
unsigned int BOOST_RE_CALL fixup_leading_rep(re_detail::re_syntax_base* dat, re_detail::re_syntax_base* end);
|
||||
void BOOST_RE_CALL fail(unsigned int err);
|
||||
re_detail::re_syntax_base* BOOST_REGEX_CALL add_simple(re_detail::re_syntax_base* dat, re_detail::syntax_element_type type, unsigned int size = sizeof(re_detail::re_syntax_base));
|
||||
re_detail::re_syntax_base* BOOST_REGEX_CALL add_literal(re_detail::re_syntax_base* dat, charT c);
|
||||
charT BOOST_REGEX_CALL parse_escape(const charT*& first, const charT* last);
|
||||
void BOOST_REGEX_CALL parse_range(const charT*& first, const charT* last, unsigned& min, unsigned& max);
|
||||
bool BOOST_REGEX_CALL skip_space(const charT*& first, const charT* last);
|
||||
unsigned int BOOST_REGEX_CALL probe_restart(re_detail::re_syntax_base* dat);
|
||||
unsigned int BOOST_REGEX_CALL fixup_leading_rep(re_detail::re_syntax_base* dat, re_detail::re_syntax_base* end);
|
||||
void BOOST_REGEX_CALL fail(unsigned int err);
|
||||
|
||||
protected:
|
||||
static int BOOST_RE_CALL repeat_count(const reg_expression& e)
|
||||
static int BOOST_REGEX_CALL repeat_count(const reg_expression& e)
|
||||
{ return e.repeats; }
|
||||
static unsigned int BOOST_RE_CALL restart_type(const reg_expression& e)
|
||||
static unsigned int BOOST_REGEX_CALL restart_type(const reg_expression& e)
|
||||
{ return e._restart_type; }
|
||||
static const re_detail::re_syntax_base* BOOST_RE_CALL first(const reg_expression& e)
|
||||
static const re_detail::re_syntax_base* BOOST_REGEX_CALL first(const reg_expression& e)
|
||||
{ return (const re_detail::re_syntax_base*)e.data.data(); }
|
||||
static const unsigned char* BOOST_RE_CALL get_map(const reg_expression& e)
|
||||
static const unsigned char* BOOST_REGEX_CALL get_map(const reg_expression& e)
|
||||
{ return e.startmap; }
|
||||
static unsigned int BOOST_RE_CALL leading_length(const reg_expression& e)
|
||||
static unsigned int BOOST_REGEX_CALL leading_length(const reg_expression& e)
|
||||
{ return e._leading_len; }
|
||||
static const re_detail::kmp_info<charT>* get_kmp(const reg_expression& e)
|
||||
{ return e.pkmp; }
|
||||
static bool BOOST_RE_CALL can_start(charT c, const unsigned char* _map, unsigned char mask, const re_detail::_wide_type&);
|
||||
static bool BOOST_RE_CALL can_start(charT c, const unsigned char* _map, unsigned char mask, const re_detail::_narrow_type&);
|
||||
static bool BOOST_REGEX_CALL can_start(charT c, const unsigned char* _map, unsigned char mask, const re_detail::_wide_type&);
|
||||
static bool BOOST_REGEX_CALL can_start(charT c, const unsigned char* _map, unsigned char mask, const re_detail::_narrow_type&);
|
||||
};
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
void BOOST_RE_CALL reg_expression<charT, traits, Allocator>::swap(reg_expression& that)throw()
|
||||
void BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::swap(reg_expression& that)throw()
|
||||
{
|
||||
// this is not as efficient as it should be,
|
||||
// however swapping traits classes is problematic
|
||||
@ -715,7 +712,7 @@ void BOOST_RE_CALL reg_expression<charT, traits, Allocator>::swap(reg_expression
|
||||
}
|
||||
|
||||
|
||||
#if defined(BOOST_RE_NO_TEMPLATE_SWITCH_MERGE) && !defined(BOOST_RE_NO_NAMESPACES)
|
||||
#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
|
||||
} // namespace
|
||||
#endif
|
||||
|
||||
@ -773,10 +770,10 @@ struct sub_match
|
||||
{
|
||||
return (first == that.first) && (second == that.second) && (matched == that.matched);
|
||||
}
|
||||
bool BOOST_RE_CALL operator !=(const sub_match& that)const
|
||||
bool BOOST_REGEX_CALL operator !=(const sub_match& that)const
|
||||
{ return !(*this == that); }
|
||||
|
||||
difference_type BOOST_RE_CALL length()const
|
||||
difference_type BOOST_REGEX_CALL length()const
|
||||
{
|
||||
difference_type n = boost::re_detail::distance((iterator)first, (iterator)second);
|
||||
return n;
|
||||
@ -840,12 +837,12 @@ sub_match<iterator>::operator unsigned int()const
|
||||
|
||||
namespace re_detail{
|
||||
|
||||
template <class iterator, class Allocator BOOST_RE_DEF_ALLOC_PARAM(typename def_alloc_param_traits<iterator>::type) >
|
||||
template <class iterator, class Allocator = BOOST_DEFAULT_ALLOCATOR(typename def_alloc_param_traits<iterator>::type) >
|
||||
class match_results_base
|
||||
{
|
||||
public:
|
||||
typedef Allocator alloc_type;
|
||||
typedef typename boost::re_detail::rebind_allocator<iterator, Allocator>::type iterator_alloc;
|
||||
typedef typename boost::detail::rebind_allocator<iterator, Allocator>::type iterator_alloc;
|
||||
typedef typename iterator_alloc::size_type size_type;
|
||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
|
||||
typedef typename std::iterator_traits<iterator>::difference_type difference_type;
|
||||
@ -858,7 +855,7 @@ public:
|
||||
typedef iterator iterator_type;
|
||||
|
||||
protected:
|
||||
typedef typename boost::re_detail::rebind_allocator<char, Allocator>::type c_alloc;
|
||||
typedef typename boost::detail::rebind_allocator<char, Allocator>::type c_alloc;
|
||||
|
||||
struct c_reference : public c_alloc
|
||||
{
|
||||
@ -884,11 +881,11 @@ protected:
|
||||
|
||||
c_reference* ref;
|
||||
|
||||
void BOOST_RE_CALL cow();
|
||||
void BOOST_REGEX_CALL cow();
|
||||
|
||||
// protected contructor for derived class...
|
||||
match_results_base(bool){}
|
||||
void BOOST_RE_CALL free();
|
||||
void BOOST_REGEX_CALL free();
|
||||
|
||||
public:
|
||||
|
||||
@ -900,29 +897,29 @@ public:
|
||||
++(ref->count);
|
||||
}
|
||||
|
||||
match_results_base& BOOST_RE_CALL operator=(const match_results_base& m);
|
||||
match_results_base& BOOST_REGEX_CALL operator=(const match_results_base& m);
|
||||
|
||||
~match_results_base()
|
||||
{
|
||||
free();
|
||||
}
|
||||
|
||||
size_type BOOST_RE_CALL size()const
|
||||
size_type BOOST_REGEX_CALL size()const
|
||||
{
|
||||
//return (*this)[0].matched ? ref->cmatches : 0;
|
||||
return ref->cmatches;
|
||||
}
|
||||
|
||||
const sub_match<iterator>& BOOST_RE_CALL operator[](int n) const
|
||||
const sub_match<iterator>& BOOST_REGEX_CALL operator[](int n) const
|
||||
{
|
||||
if((n >= 0) && ((unsigned int)n < ref->cmatches))
|
||||
return *(sub_match<iterator>*)((char*)ref + sizeof(c_reference) + sizeof(sub_match<iterator>)*n);
|
||||
return (n == -1) ? ref->head : (n == -2) ? ref->tail : ref->null;
|
||||
}
|
||||
|
||||
Allocator BOOST_RE_CALL allocator()const;
|
||||
Allocator BOOST_REGEX_CALL allocator()const;
|
||||
|
||||
difference_type BOOST_RE_CALL length(unsigned int sub = 0)const
|
||||
difference_type BOOST_REGEX_CALL length(unsigned int sub = 0)const
|
||||
{
|
||||
jm_assert(ref->cmatches);
|
||||
const sub_match<iterator>& m = (*this)[sub];
|
||||
@ -937,12 +934,12 @@ public:
|
||||
return static_cast<std::basic_string<char_type> >((*this)[i]);
|
||||
}
|
||||
|
||||
unsigned int BOOST_RE_CALL line()const
|
||||
unsigned int BOOST_REGEX_CALL line()const
|
||||
{
|
||||
return ref->lines;
|
||||
}
|
||||
|
||||
difference_type BOOST_RE_CALL position(unsigned int sub = 0)const
|
||||
difference_type BOOST_REGEX_CALL position(unsigned int sub = 0)const
|
||||
{
|
||||
jm_assert(ref->cmatches);
|
||||
const sub_match<iterator>& s = (*this)[sub];
|
||||
@ -952,7 +949,7 @@ public:
|
||||
return n;
|
||||
}
|
||||
|
||||
iterator BOOST_RE_CALL line_start()const
|
||||
iterator BOOST_REGEX_CALL line_start()const
|
||||
{
|
||||
return ref->line_pos;
|
||||
}
|
||||
@ -970,15 +967,15 @@ public:
|
||||
|
||||
friend class match_results<iterator, Allocator>;
|
||||
|
||||
void BOOST_RE_CALL set_size(size_type n);
|
||||
void BOOST_RE_CALL set_size(size_type n, iterator i, iterator j);
|
||||
void BOOST_RE_CALL maybe_assign(const match_results_base& m);
|
||||
void BOOST_RE_CALL init_fail(iterator i, iterator j);
|
||||
void BOOST_REGEX_CALL set_size(size_type n);
|
||||
void BOOST_REGEX_CALL set_size(size_type n, iterator i, iterator j);
|
||||
void BOOST_REGEX_CALL maybe_assign(const match_results_base& m);
|
||||
void BOOST_REGEX_CALL init_fail(iterator i, iterator j);
|
||||
|
||||
void BOOST_RE_CALL set_first(iterator i);
|
||||
void BOOST_RE_CALL set_first(iterator i, std::size_t pos);
|
||||
void BOOST_REGEX_CALL set_first(iterator i);
|
||||
void BOOST_REGEX_CALL set_first(iterator i, std::size_t pos);
|
||||
|
||||
void BOOST_RE_CALL set_second(iterator i)
|
||||
void BOOST_REGEX_CALL set_second(iterator i)
|
||||
{
|
||||
cow();
|
||||
((sub_match<iterator>*)(ref+1))->second = i;
|
||||
@ -987,7 +984,7 @@ public:
|
||||
ref->tail.matched = (ref->tail.first == ref->tail.second) ? false : true;
|
||||
}
|
||||
|
||||
void BOOST_RE_CALL set_second(iterator i, std::size_t pos, bool m = true)
|
||||
void BOOST_REGEX_CALL set_second(iterator i, std::size_t pos, bool m = true)
|
||||
{
|
||||
cow();
|
||||
((sub_match<iterator>*)((char*)ref + sizeof(c_reference) + sizeof(sub_match<iterator>) * pos))->second = i;
|
||||
@ -999,20 +996,20 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void BOOST_RE_CALL set_line(unsigned int i, iterator pos)
|
||||
void BOOST_REGEX_CALL set_line(unsigned int i, iterator pos)
|
||||
{
|
||||
ref->lines = i;
|
||||
ref->line_pos = pos;
|
||||
}
|
||||
|
||||
void BOOST_RE_CALL set_base(iterator pos)
|
||||
void BOOST_REGEX_CALL set_base(iterator pos)
|
||||
{
|
||||
ref->base = pos;
|
||||
}
|
||||
};
|
||||
|
||||
template <class iterator, class Allocator>
|
||||
void BOOST_RE_CALL match_results_base<iterator, Allocator>::set_first(iterator i)
|
||||
void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_first(iterator i)
|
||||
{
|
||||
cow();
|
||||
ref->head.second = i;
|
||||
@ -1032,7 +1029,7 @@ void BOOST_RE_CALL match_results_base<iterator, Allocator>::set_first(iterator i
|
||||
}
|
||||
|
||||
template <class iterator, class Allocator>
|
||||
void BOOST_RE_CALL match_results_base<iterator, Allocator>::set_first(iterator i, std::size_t pos)
|
||||
void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_first(iterator i, std::size_t pos)
|
||||
{
|
||||
cow();
|
||||
((sub_match<iterator>*)((char*)ref + sizeof(c_reference) + sizeof(sub_match<iterator>) * pos))->first = i;
|
||||
@ -1072,7 +1069,7 @@ match_results_base<iterator, Allocator>::match_results_base(const Allocator& a)
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
jm_destroy(ref);
|
||||
::boost::re_detail::destroy(ref);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1084,13 +1081,13 @@ match_results_base<iterator, Allocator>::match_results_base(const Allocator& a)
|
||||
}
|
||||
|
||||
template <class iterator, class Allocator>
|
||||
Allocator BOOST_RE_CALL match_results_base<iterator, Allocator>::allocator()const
|
||||
Allocator BOOST_REGEX_CALL match_results_base<iterator, Allocator>::allocator()const
|
||||
{
|
||||
return *((c_alloc*)ref);
|
||||
}
|
||||
|
||||
template <class iterator, class Allocator>
|
||||
inline match_results_base<iterator, Allocator>& BOOST_RE_CALL match_results_base<iterator, Allocator>::operator=(const match_results_base<iterator, Allocator>& m)
|
||||
inline match_results_base<iterator, Allocator>& BOOST_REGEX_CALL match_results_base<iterator, Allocator>::operator=(const match_results_base<iterator, Allocator>& m)
|
||||
{
|
||||
if(ref != m.ref)
|
||||
{
|
||||
@ -1103,7 +1100,7 @@ inline match_results_base<iterator, Allocator>& BOOST_RE_CALL match_results_base
|
||||
|
||||
|
||||
template <class iterator, class Allocator>
|
||||
void BOOST_RE_CALL match_results_base<iterator, Allocator>::free()
|
||||
void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::free()
|
||||
{
|
||||
if(--(ref->count) == 0)
|
||||
{
|
||||
@ -1113,10 +1110,10 @@ void BOOST_RE_CALL match_results_base<iterator, Allocator>::free()
|
||||
p2 = p1 + ref->cmatches;
|
||||
while(p1 != p2)
|
||||
{
|
||||
jm_destroy(p1);
|
||||
::boost::re_detail::destroy(p1);
|
||||
++p1;
|
||||
}
|
||||
jm_destroy(ref);
|
||||
::boost::re_detail::destroy(ref);
|
||||
a.deallocate((char*)(void*)ref, sizeof(sub_match<iterator>) * ref->cmatches + sizeof(c_reference));
|
||||
}
|
||||
}
|
||||
@ -1140,7 +1137,7 @@ bool match_results_base<iterator, Allocator>::operator==(const match_results_bas
|
||||
}
|
||||
|
||||
template <class iterator, class Allocator>
|
||||
void BOOST_RE_CALL match_results_base<iterator, Allocator>::set_size(size_type n)
|
||||
void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_size(size_type n)
|
||||
{
|
||||
if(ref->cmatches != n)
|
||||
{
|
||||
@ -1167,10 +1164,10 @@ void BOOST_RE_CALL match_results_base<iterator, Allocator>::set_size(size_type n
|
||||
p2 = (sub_match<iterator>*)(newref+1);
|
||||
while(p2 != p1)
|
||||
{
|
||||
jm_destroy(p2);
|
||||
::boost::re_detail::destroy(p2);
|
||||
++p2;
|
||||
}
|
||||
jm_destroy(ref);
|
||||
::boost::re_detail::destroy(ref);
|
||||
throw;
|
||||
}
|
||||
ref = newref;
|
||||
@ -1184,7 +1181,7 @@ void BOOST_RE_CALL match_results_base<iterator, Allocator>::set_size(size_type n
|
||||
}
|
||||
|
||||
template <class iterator, class Allocator>
|
||||
void BOOST_RE_CALL match_results_base<iterator, Allocator>::set_size(size_type n, iterator i, iterator j)
|
||||
void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_size(size_type n, iterator i, iterator j)
|
||||
{
|
||||
if(ref->cmatches != n)
|
||||
{
|
||||
@ -1209,10 +1206,10 @@ void BOOST_RE_CALL match_results_base<iterator, Allocator>::set_size(size_type n
|
||||
p2 = (sub_match<iterator>*)(newref+1);
|
||||
while(p2 != p1)
|
||||
{
|
||||
jm_destroy(p2);
|
||||
::boost::re_detail::destroy(p2);
|
||||
++p2;
|
||||
}
|
||||
jm_destroy(ref);
|
||||
::boost::re_detail::destroy(ref);
|
||||
throw;
|
||||
}
|
||||
ref = newref;
|
||||
@ -1246,13 +1243,13 @@ void BOOST_RE_CALL match_results_base<iterator, Allocator>::set_size(size_type n
|
||||
}
|
||||
|
||||
template <class iterator, class Allocator>
|
||||
inline void BOOST_RE_CALL match_results_base<iterator, Allocator>::init_fail(iterator i, iterator j)
|
||||
inline void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::init_fail(iterator i, iterator j)
|
||||
{
|
||||
set_size(ref->cmatches, i, j);
|
||||
}
|
||||
|
||||
template <class iterator, class Allocator>
|
||||
void BOOST_RE_CALL match_results_base<iterator, Allocator>::maybe_assign(const match_results_base<iterator, Allocator>& m)
|
||||
void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::maybe_assign(const match_results_base<iterator, Allocator>& m)
|
||||
{
|
||||
sub_match<iterator>* p1, *p2;
|
||||
p1 = (sub_match<iterator>*)(ref+1);
|
||||
@ -1290,7 +1287,7 @@ void BOOST_RE_CALL match_results_base<iterator, Allocator>::maybe_assign(const m
|
||||
}
|
||||
|
||||
template <class iterator, class Allocator>
|
||||
void BOOST_RE_CALL match_results_base<iterator, Allocator>::cow()
|
||||
void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::cow()
|
||||
{
|
||||
if(ref->count > 1)
|
||||
{
|
||||
@ -1314,10 +1311,10 @@ void BOOST_RE_CALL match_results_base<iterator, Allocator>::cow()
|
||||
p2 = (sub_match<iterator>*)(newref+1);
|
||||
while(p2 != p1)
|
||||
{
|
||||
jm_destroy(p2);
|
||||
::boost::re_detail::destroy(p2);
|
||||
++p2;
|
||||
}
|
||||
jm_destroy(ref);
|
||||
::boost::re_detail::destroy(ref);
|
||||
throw;
|
||||
}
|
||||
--(ref->count);
|
||||
@ -1434,10 +1431,10 @@ match_results<iterator, Allocator>::match_results(const match_results<iterator,
|
||||
p2 = (sub_match<iterator>*)(this->ref+1);
|
||||
while(p2 != p1)
|
||||
{
|
||||
re_detail::jm_destroy(p2);
|
||||
re_detail::destroy(p2);
|
||||
++p2;
|
||||
}
|
||||
re_detail::jm_destroy(this->ref);
|
||||
re_detail::destroy(this->ref);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1458,7 +1455,7 @@ match_results<iterator, Allocator>& match_results<iterator, Allocator>::operator
|
||||
|
||||
namespace re_detail{
|
||||
template <class iterator, class charT, class traits_type, class Allocator>
|
||||
iterator BOOST_RE_CALL re_is_set_member(iterator next,
|
||||
iterator BOOST_REGEX_CALL re_is_set_member(iterator next,
|
||||
iterator last,
|
||||
re_set_long* set_,
|
||||
const reg_expression<charT, traits_type, Allocator>& e);
|
||||
@ -1474,14 +1471,16 @@ iterator BOOST_RE_CALL re_is_set_member(iterator next,
|
||||
|
||||
namespace boost{
|
||||
|
||||
typedef reg_expression<char, regex_traits<char>, BOOST_RE_DEF_ALLOC(char)> regex;
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
typedef reg_expression<wchar_t, regex_traits<wchar_t>, BOOST_RE_DEF_ALLOC(wchar_t)> wregex;
|
||||
typedef reg_expression<char, regex_traits<char>, BOOST_DEFAULT_ALLOCATOR(char)> regex;
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
typedef reg_expression<wchar_t, regex_traits<wchar_t>, BOOST_DEFAULT_ALLOCATOR(wchar_t)> wregex;
|
||||
#endif
|
||||
|
||||
typedef match_results<const char*> cmatch;
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
typedef match_results<std::string::const_iterator> smatch;
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
typedef match_results<const wchar_t*> wcmatch;
|
||||
typedef match_results<std::wstring::const_iterator> wsmatch;
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
505
include/boost/regex/config.hpp
Normal file
505
include/boost/regex/config.hpp
Normal file
@ -0,0 +1,505 @@
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#define BOOST_REGEX_CONFIG_HPP
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Include all the headers we need here:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
# ifndef BOOST_REGEX_USER_CONFIG
|
||||
# define BOOST_REGEX_USER_CONFIG <boost/regex/user.hpp>
|
||||
# endif
|
||||
|
||||
# include BOOST_REGEX_USER_CONFIG
|
||||
|
||||
# include <cstdlib>
|
||||
# include <cstddef>
|
||||
# include <cstring>
|
||||
# include <cctype>
|
||||
# include <cstdio>
|
||||
# include <clocale>
|
||||
# include <cassert>
|
||||
# include <string>
|
||||
# include <stdexcept>
|
||||
# include <iterator>
|
||||
# include <boost/config.hpp>
|
||||
# include <boost/smart_ptr.hpp>
|
||||
# include <boost/cstdint.hpp>
|
||||
# include <boost/detail/allocator.hpp>
|
||||
#else
|
||||
//
|
||||
// C build,
|
||||
// don't include <boost/config.hpp> because that may
|
||||
// do C++ specific things in future...
|
||||
//
|
||||
# include <stdlib.h>
|
||||
# ifdef _MSC_VER
|
||||
# define BOOST_MSVC _MSC_VER
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Boilerplate regex config options:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* Obsolete macro, use BOOST_VERSION instead: */
|
||||
#define BOOST_RE_VERSION 320
|
||||
|
||||
// fix:
|
||||
#if defined(_UNICODE) && !defined(UNICODE)
|
||||
#define UNICODE
|
||||
#endif
|
||||
|
||||
//
|
||||
// If there isn't good enough wide character support then there will
|
||||
// be no wide character regular expressions:
|
||||
//
|
||||
#if defined(BOOST_NO_CWCHAR) || defined(BOOST_NO_CWCTYPE) || defined(BOOST_NO_STD_WSTRING)
|
||||
# define BOOST_NO_WREGEX
|
||||
#else
|
||||
# if defined(__sgi) && defined(__SGI_STL_PORT)
|
||||
// STLPort on IRIX is misconfigured: <cwctype> does not compile
|
||||
// as a temporary fix include <wctype.h> instead and prevent inclusion
|
||||
// of STLPort version of <cwctype>
|
||||
# include <wctype.h>
|
||||
# define __STLPORT_CWCTYPE
|
||||
# define _STLP_CWCTYPE
|
||||
# endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
# include <cwchar>
|
||||
# include <cwctype>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// some versions of gcc can't merge template instances:
|
||||
#if defined(__CYGWIN__)
|
||||
# define BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE
|
||||
#endif
|
||||
|
||||
// fix problems with bool as a macro,
|
||||
// this probably doesn't affect any current compilers:
|
||||
#if defined(bool) || defined(true) || defined(false)
|
||||
# define BOOST_REGEX_NO_BOOL
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifndef MB_CUR_MAX
|
||||
// yuk!
|
||||
// better make a conservative guess!
|
||||
#define MB_CUR_MAX 10
|
||||
#endif
|
||||
|
||||
namespace boost{ namespace re_detail{
|
||||
#ifdef BOOST_NO_STD_DISTANCE
|
||||
template <class T>
|
||||
std::ptrdiff_t distance(const T& x, const T& y)
|
||||
{ return y - x; }
|
||||
#else
|
||||
using std::distance;
|
||||
#endif
|
||||
}}
|
||||
|
||||
|
||||
#ifdef BOOST_REGEX_NO_BOOL
|
||||
# define BOOST_REGEX_MAKE_BOOL(x) static_cast<bool>((x) ? true : false)
|
||||
#else
|
||||
# ifdef BOOST_MSVC
|
||||
// warning suppression with VC6:
|
||||
# pragma warning(disable: 4800)
|
||||
# endif
|
||||
# define BOOST_REGEX_MAKE_BOOL(x) static_cast<bool>(x)
|
||||
#endif
|
||||
#endif // __cplusplus
|
||||
|
||||
// backwards compatibitity:
|
||||
#if defined(BOOST_RE_NO_LIB)
|
||||
# define BOOST_REGEX_NO_LIB
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && (defined(_WIN32) || defined(__CYGWIN__))
|
||||
// gcc on win32 has problems merging switch statements in templates:
|
||||
# define BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE
|
||||
// gcc on win32 has problems if you include <windows.h>
|
||||
// (sporadically generates bad code).
|
||||
# define BOOST_REGEX_USE_C_LOCALE
|
||||
# define BOOST_REGEX_NO_W32
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Set up dll import/export options:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
// backwards compatibility:
|
||||
#ifdef BOOST_RE_STATIC_LIB
|
||||
# define BOOST_REGEX_STATIC_LINK
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_MSVC) && defined(_DLL)
|
||||
# define BOOST_REGEX_HAS_DLL_RUNTIME
|
||||
#endif
|
||||
|
||||
#if defined(__BORLANDC__) && defined(_RTLDLL)
|
||||
# define BOOST_REGEX_HAS_DLL_RUNTIME
|
||||
#endif
|
||||
|
||||
#if defined(__ICL) && defined(_DLL)
|
||||
# define BOOST_REGEX_HAS_DLL_RUNTIME
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_REGEX_HAS_DLL_RUNTIME) && !defined(BOOST_REGEX_STATIC_LINK)
|
||||
# if defined(BOOST_REGEX_SOURCE)
|
||||
# define BOOST_REGEX_DECL __declspec(dllexport)
|
||||
# define BOOST_REGEX_BUILD_DLL
|
||||
# else
|
||||
# define BOOST_REGEX_DECL __declspec(dllimport)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_REGEX_DECL
|
||||
# define BOOST_REGEX_DECL
|
||||
#endif
|
||||
|
||||
#if (defined(BOOST_MSVC) || defined(__BORLANDC__)) && !defined(BOOST_REGEX_NO_LIB) && !defined(BOOST_REGEX_SOURCE)
|
||||
# include <boost/regex/detail/regex_library_include.hpp>
|
||||
#endif
|
||||
|
||||
// Borland C++ Fix/error check:
|
||||
#if defined(__BORLANDC__)
|
||||
# if (__BORLANDC__ == 0x550) || (__BORLANDC__ == 0x551)
|
||||
// problems with std::basic_string and dll RTL:
|
||||
# if defined(_RTLDLL) && defined(_RWSTD_COMPILE_INSTANTIATE)
|
||||
# ifdef BOOST_REGEX_BUILD_DLL
|
||||
# error _RWSTD_COMPILE_INSTANTIATE must not be defined when building regex++ as a DLL
|
||||
# else
|
||||
# pragma warn defining _RWSTD_COMPILE_INSTANTIATE when linking to the DLL version of the RTL may produce memory corruption problems in std::basic_string, as a result of separate versions of basic_string's static data in the RTL and you're exe/dll: be warned!!
|
||||
# endif
|
||||
# endif
|
||||
# ifndef _RTLDLL
|
||||
// this is harmless for a staic link:
|
||||
# define _RWSTD_COMPILE_INSTANTIATE
|
||||
# endif
|
||||
# endif
|
||||
//
|
||||
// VCL support:
|
||||
// if we're building a console app then there can't be any VCL (can there?)
|
||||
# if !defined(__CONSOLE__) && !defined(_NO_VCL)
|
||||
# define BOOST_REGEX_USE_VCL
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Set up function call type:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(BOOST_MSVC) || defined(__ICL)
|
||||
# if defined(_DEBUG)
|
||||
# define BOOST_REGEX_CALL __cdecl
|
||||
# else
|
||||
# define BOOST_REGEX_CALL __fastcall
|
||||
# endif
|
||||
# define BOOST_REGEX_CCALL __stdcall
|
||||
#endif
|
||||
|
||||
#if defined(__BORLANDC__)
|
||||
# define BOOST_REGEX_CALL __fastcall
|
||||
# define BOOST_REGEX_CCALL __stdcall
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_REGEX_CALL
|
||||
# define BOOST_REGEX_CALL
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_CCALL
|
||||
#define BOOST_REGEX_CCALL
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Set up localisation model:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
// backwards compatibility:
|
||||
#ifdef BOOST_RE_LOCALE_C
|
||||
# define BOOST_REGEX_USE_C_LOCALE
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_RE_LOCALE_CPP
|
||||
# define BOOST_REGEX_USE_CPP_LOCALE
|
||||
#endif
|
||||
|
||||
// Win32 defaults to native Win32 locale:
|
||||
#if defined(_WIN32) && !defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(BOOST_REGEX_USE_C_LOCALE) && !defined(BOOST_REGEX_USE_CPP_LOCALE) && !defined(BOOST_REGEX_NO_W32)
|
||||
# define BOOST_REGEX_USE_WIN32_LOCALE
|
||||
#endif
|
||||
// otherwise use C locale:
|
||||
#if !defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(BOOST_REGEX_USE_C_LOCALE) && !defined(BOOST_REGEX_USE_CPP_LOCALE)
|
||||
# define BOOST_REGEX_USE_C_LOCALE
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_REGEX_USE_WIN32_LOCALE
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Debugging / tracing support:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(BOOST_REGEX_DEBUG) && defined(__cplusplus)
|
||||
|
||||
# include <iostream>
|
||||
using std::cout;
|
||||
using std::cin;
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
using std::hex;
|
||||
using std::dec;
|
||||
|
||||
# ifndef jm_assert
|
||||
# define jm_assert(x) assert(x)
|
||||
# endif
|
||||
# ifndef jm_trace
|
||||
# define jm_trace(x) cerr << x << endl;
|
||||
# endif
|
||||
# ifndef jm_instrument
|
||||
# define jm_instrument jm_trace(__FILE__<<"#"<<__LINE__)
|
||||
# endif
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
class debug_guard
|
||||
{
|
||||
public:
|
||||
char g1[32];
|
||||
const char* pc;
|
||||
char* pnc;
|
||||
const char* file;
|
||||
int line;
|
||||
char g2[32];
|
||||
debug_guard(const char* f, int l, const char* p1 = 0, char* p2 = 0);
|
||||
~debug_guard();
|
||||
};
|
||||
|
||||
# define BOOST_RE_GUARD_STACK boost::re_detail::debug_guard sg(__FILE__, __LINE__);
|
||||
# define BOOST_RE_GUARD_GLOBAL(x) const char g1##x[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, }; char g2##x[32]; boost::debug_guard g3##x(__FILE__, __LINE__, g1##x, g2##x);
|
||||
|
||||
} // namespace re_detail
|
||||
} // namespace boost
|
||||
|
||||
#else
|
||||
|
||||
# define jm_assert(x)
|
||||
# define jm_trace(x)
|
||||
# define BOOST_RE_GUARD_STACK
|
||||
# define BOOST_RE_GUARD_GLOBAL(x)
|
||||
# ifndef jm_instrument
|
||||
# define jm_instrument
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Fix broken compilers that wrongly #define some symbols:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
// the following may be defined as macros; this is
|
||||
// incompatable with std::something syntax, we have
|
||||
// no choice but to undef them?
|
||||
|
||||
#ifdef memcpy
|
||||
#undef memcpy
|
||||
#endif
|
||||
#ifdef memmove
|
||||
#undef memmove
|
||||
#endif
|
||||
#ifdef memset
|
||||
#undef memset
|
||||
#endif
|
||||
#ifdef sprintf
|
||||
#undef sprintf
|
||||
#endif
|
||||
#ifdef strcat
|
||||
#undef strcat
|
||||
#endif
|
||||
#ifdef strcmp
|
||||
#undef strcmp
|
||||
#endif
|
||||
#ifdef strcpy
|
||||
#undef strcpy
|
||||
#endif
|
||||
#ifdef strlen
|
||||
#undef strlen
|
||||
#endif
|
||||
#ifdef swprintf
|
||||
#undef swprintf
|
||||
#endif
|
||||
#ifdef wcslen
|
||||
#undef wcslen
|
||||
#endif
|
||||
#ifdef wcscpy
|
||||
#undef wcscpy
|
||||
#endif
|
||||
#ifdef wcscmp
|
||||
#undef wcscmp
|
||||
#endif
|
||||
#ifdef isalpha
|
||||
#undef isalpha
|
||||
#endif
|
||||
#ifdef iscntrl
|
||||
#undef iscntrl
|
||||
#endif
|
||||
#ifdef isdigit
|
||||
#undef isdigit
|
||||
#endif
|
||||
#ifdef islower
|
||||
#undef islower
|
||||
#endif
|
||||
#ifdef isupper
|
||||
#undef isupper
|
||||
#endif
|
||||
#ifdef ispunct
|
||||
#undef ispunct
|
||||
#endif
|
||||
#ifdef isspace
|
||||
#undef isspace
|
||||
#endif
|
||||
#ifdef isxdigit
|
||||
#undef isxdigit
|
||||
#endif
|
||||
|
||||
#ifdef tolower
|
||||
#undef tolower
|
||||
#endif
|
||||
#ifdef iswalpha
|
||||
#undef iswalpha
|
||||
#endif
|
||||
#ifdef iswcntrl
|
||||
#undef iswcntrl
|
||||
#endif
|
||||
#ifdef iswdigit
|
||||
#undef iswdigit
|
||||
#endif
|
||||
#ifdef iswlower
|
||||
#undef iswlower
|
||||
#endif
|
||||
#ifdef iswpunct
|
||||
#undef iswpunct
|
||||
#endif
|
||||
#ifdef iswspace
|
||||
#undef iswspace
|
||||
#endif
|
||||
#ifdef iswupper
|
||||
#undef iswupper
|
||||
#endif
|
||||
#ifdef iswxdigit
|
||||
#undef iswxdigit
|
||||
#endif
|
||||
#ifdef towlower
|
||||
#undef towlower
|
||||
#endif
|
||||
#ifdef wcsxfrm
|
||||
#undef wcsxfrm
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Fix broken broken namespace support:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE) && defined(__cplusplus)
|
||||
|
||||
namespace std{
|
||||
using ::ptrdiff_t;
|
||||
using ::size_t;
|
||||
using ::memcpy;
|
||||
using ::memmove;
|
||||
using ::memset;
|
||||
using ::memcmp;
|
||||
using ::sprintf;
|
||||
using ::strcat;
|
||||
using ::strcmp;
|
||||
using ::strcpy;
|
||||
using ::strlen;
|
||||
using ::strxfrm;
|
||||
using ::isalpha;
|
||||
using ::iscntrl;
|
||||
using ::isdigit;
|
||||
using ::islower;
|
||||
using ::isupper;
|
||||
using ::ispunct;
|
||||
using ::isspace;
|
||||
using ::isxdigit;
|
||||
using ::tolower;
|
||||
using ::abs;
|
||||
using ::setlocale;
|
||||
# ifndef BOOST_NO_WREGEX
|
||||
# ifndef BOOST_RE_NO_SWPRINTF
|
||||
using ::swprintf;
|
||||
# endif
|
||||
using ::wcslen;
|
||||
using ::wcscpy;
|
||||
using ::wcscmp;
|
||||
using ::iswalpha;
|
||||
using ::iswcntrl;
|
||||
using ::iswdigit;
|
||||
using ::iswlower;
|
||||
using ::iswpunct;
|
||||
using ::iswspace;
|
||||
using ::iswupper;
|
||||
using ::iswxdigit;
|
||||
using ::towlower;
|
||||
using ::wcsxfrm;
|
||||
using ::wcstombs;
|
||||
using ::mbstowcs;
|
||||
# if !defined(BOOST_NO_STD_LOCALE) && !defined (__STL_NO_NATIVE_MBSTATE_T) && !defined(_STLP_NO_NATIVE_MBSTATE_T)
|
||||
using ::mbstate_t;
|
||||
# endif
|
||||
# endif // BOOST_NO_WREGEX
|
||||
using ::fseek;
|
||||
using ::fread;
|
||||
using ::ftell;
|
||||
using ::fopen;
|
||||
using ::fclose;
|
||||
using ::FILE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* helper functions construct/destroy:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
namespace boost{ namespace re_detail{
|
||||
|
||||
template <class T>
|
||||
inline void destroy(T* p)
|
||||
{ p->~T(); }
|
||||
|
||||
template <class T>
|
||||
inline void construct(T* p, const T& t)
|
||||
{ new (p) T(t); }
|
||||
|
||||
}} // namespaces
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -25,25 +25,25 @@
|
||||
#ifndef BOOST_RE_FILEITER_HPP
|
||||
#define BOOST_RE_FILEITER_HPP
|
||||
|
||||
#include <boost/regex/detail/regex_config.hpp>
|
||||
#include <boost/regex/config.hpp>
|
||||
|
||||
#if (defined(__CYGWIN__) || defined(__CYGWIN32__)) && !defined(BOOST_RE_NO_W32)
|
||||
#if (defined(__CYGWIN__) || defined(__CYGWIN32__)) && !defined(BOOST_REGEX_NO_W32)
|
||||
#error "Sorry, can't mix <windows.h> with STL code and gcc compiler: if you ran configure, try again with configure --disable-ms-windows"
|
||||
#define FI_WIN32_MAP
|
||||
#define FI_POSIX_DIR
|
||||
#elif (defined(__WIN32__) || defined(_WIN32) || defined(WIN32)) && !defined(BOOST_RE_NO_W32)
|
||||
#define FI_WIN32_MAP
|
||||
#define FI_WIN32_DIR
|
||||
#define BOOST_REGEX_FI_WIN32_MAP
|
||||
#define BOOST_REGEX_FI_POSIX_DIR
|
||||
#elif (defined(__WIN32__) || defined(_WIN32) || defined(WIN32)) && !defined(BOOST_REGEX_NO_W32)
|
||||
#define BOOST_REGEX_FI_WIN32_MAP
|
||||
#define BOOST_REGEX_FI_WIN32_DIR
|
||||
#else
|
||||
#define FI_POSIX_MAP
|
||||
#define FI_POSIX_DIR
|
||||
#define BOOST_REGEX_FI_POSIX_MAP
|
||||
#define BOOST_REGEX_FI_POSIX_DIR
|
||||
#endif
|
||||
|
||||
#if defined(FI_WIN32_MAP)||defined(FI_WIN32_DIR)
|
||||
#if defined(BOOST_REGEX_FI_WIN32_MAP)||defined(BOOST_REGEX_FI_WIN32_DIR)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#if defined(FI_WIN32_DIR)
|
||||
#if defined(BOOST_REGEX_FI_WIN32_DIR)
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
@ -58,7 +58,7 @@ typedef HANDLE _fi_find_handle;
|
||||
#define _fi_invalid_handle INVALID_HANDLE_VALUE
|
||||
#define _fi_dir FILE_ATTRIBUTE_DIRECTORY
|
||||
|
||||
#elif defined(FI_POSIX_DIR)
|
||||
#elif defined(BOOST_REGEX_FI_POSIX_DIR)
|
||||
|
||||
#include <cstdio>
|
||||
#include <cctype>
|
||||
@ -134,9 +134,9 @@ namespace boost{
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef FI_WIN32_MAP // win32 mapfile
|
||||
#ifdef BOOST_REGEX_FI_WIN32_MAP // win32 mapfile
|
||||
|
||||
class BOOST_RE_IX_DECL mapfile
|
||||
class BOOST_REGEX_DECL mapfile
|
||||
{
|
||||
HANDLE hfile;
|
||||
HANDLE hmap;
|
||||
@ -158,11 +158,11 @@ public:
|
||||
};
|
||||
|
||||
|
||||
#elif !defined(BOOST_RE_NO_STL) // use C API to emulate the memory map:
|
||||
#else
|
||||
|
||||
class BOOST_RE_IX_DECL mapfile_iterator;
|
||||
class BOOST_REGEX_DECL mapfile_iterator;
|
||||
|
||||
class BOOST_RE_IX_DECL mapfile
|
||||
class BOOST_REGEX_DECL mapfile
|
||||
{
|
||||
typedef char* pointer;
|
||||
std::FILE* hfile;
|
||||
@ -192,7 +192,7 @@ public:
|
||||
friend class mapfile_iterator;
|
||||
};
|
||||
|
||||
class BOOST_RE_IX_DECL mapfile_iterator
|
||||
class BOOST_REGEX_DECL mapfile_iterator
|
||||
{
|
||||
typedef mapfile::pointer internal_pointer;
|
||||
internal_pointer* node;
|
||||
@ -272,12 +272,12 @@ public:
|
||||
{
|
||||
return (i.file == j.file) && (i.node == j.node) && (i.offset == j.offset);
|
||||
}
|
||||
#ifndef BOOST_RE_NO_NOT_EQUAL
|
||||
|
||||
friend inline bool operator!=(const mapfile_iterator& i, const mapfile_iterator& j)
|
||||
{
|
||||
return !(i == j);
|
||||
}
|
||||
#endif
|
||||
|
||||
friend inline bool operator<(const mapfile_iterator& i, const mapfile_iterator& j)
|
||||
{
|
||||
return i.position() < j.position();
|
||||
@ -311,7 +311,7 @@ public:
|
||||
#endif
|
||||
|
||||
// _fi_sep determines the directory separator, either '\\' or '/'
|
||||
BOOST_RE_IX_DECL extern const char* _fi_sep;
|
||||
BOOST_REGEX_DECL extern const char* _fi_sep;
|
||||
|
||||
struct file_iterator_ref
|
||||
{
|
||||
@ -321,7 +321,7 @@ struct file_iterator_ref
|
||||
};
|
||||
|
||||
|
||||
class BOOST_RE_IX_DECL file_iterator
|
||||
class BOOST_REGEX_DECL file_iterator
|
||||
{
|
||||
char* _root;
|
||||
char* _path;
|
||||
@ -353,12 +353,12 @@ public:
|
||||
{
|
||||
return ((f1.ref->hf == _fi_invalid_handle) && (f2.ref->hf == _fi_invalid_handle));
|
||||
}
|
||||
#ifndef BOOST_RE_NO_NOT_EQUAL
|
||||
|
||||
friend inline bool operator != (const file_iterator& f1, const file_iterator& f2)
|
||||
{
|
||||
return !(f1 == f2);
|
||||
}
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
// dwa 9/13/00 - suppress unused parameter warning
|
||||
@ -368,7 +368,7 @@ inline bool operator < (const file_iterator&, const file_iterator&)
|
||||
}
|
||||
|
||||
|
||||
class BOOST_RE_IX_DECL directory_iterator
|
||||
class BOOST_REGEX_DECL directory_iterator
|
||||
{
|
||||
char* _root;
|
||||
char* _path;
|
||||
@ -404,13 +404,13 @@ public:
|
||||
return ((f1.ref->hf == _fi_invalid_handle) && (f2.ref->hf == _fi_invalid_handle));
|
||||
}
|
||||
|
||||
#ifndef BOOST_RE_NO_NOT_EQUAL
|
||||
|
||||
friend inline bool operator != (const directory_iterator& f1, const directory_iterator& f2)
|
||||
{
|
||||
return !(f1 == f2);
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
inline bool operator < (const directory_iterator&, const directory_iterator&)
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ struct kmp_translator
|
||||
|
||||
|
||||
template <class charT, class traits_type, class Allocator>
|
||||
bool BOOST_RE_CALL re_maybe_set_member(charT c,
|
||||
bool BOOST_REGEX_CALL re_maybe_set_member(charT c,
|
||||
re_set_long* set_,
|
||||
const reg_expression<charT, traits_type, Allocator>& e)
|
||||
{
|
||||
@ -66,7 +66,7 @@ bool BOOST_RE_CALL re_maybe_set_member(charT c,
|
||||
|
||||
} // namespace re_detail
|
||||
|
||||
#if defined(BOOST_RE_NO_TEMPLATE_SWITCH_MERGE) && !defined(BOOST_RE_NO_NAMESPACES)
|
||||
#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
|
||||
//
|
||||
// Ugly ugly hack,
|
||||
// templates don't merge if they contain switch statements so declare these
|
||||
@ -76,41 +76,41 @@ namespace{
|
||||
#endif
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
inline bool BOOST_RE_CALL reg_expression<charT, traits, Allocator>::can_start(charT c, const unsigned char* _map, unsigned char mask, const re_detail::_wide_type&)
|
||||
inline bool BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::can_start(charT c, const unsigned char* _map, unsigned char mask, const re_detail::_wide_type&)
|
||||
{
|
||||
if((traits_size_type)(traits_uchar_type)c >= 256)
|
||||
return true;
|
||||
return BOOST_RE_MAKE_BOOL(_map[(traits_uchar_type)c] & mask);
|
||||
return BOOST_REGEX_MAKE_BOOL(_map[(traits_uchar_type)c] & mask);
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
inline bool BOOST_RE_CALL reg_expression<charT, traits, Allocator>::can_start(charT c, const unsigned char* _map, unsigned char mask, const re_detail::_narrow_type&)
|
||||
inline bool BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::can_start(charT c, const unsigned char* _map, unsigned char mask, const re_detail::_narrow_type&)
|
||||
{
|
||||
return BOOST_RE_MAKE_BOOL(_map[(traits_uchar_type)c] & mask);
|
||||
return BOOST_REGEX_MAKE_BOOL(_map[(traits_uchar_type)c] & mask);
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
CONSTRUCTOR_INLINE reg_expression<charT, traits, Allocator>::reg_expression(const Allocator& a)
|
||||
reg_expression<charT, traits, Allocator>::reg_expression(const Allocator& a)
|
||||
: regbase(), data(a), pkmp(0), error_code_(REG_EMPTY), _expression(0)
|
||||
{
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
CONSTRUCTOR_INLINE reg_expression<charT, traits, Allocator>::reg_expression(const charT* p, flag_type f, const Allocator& a)
|
||||
reg_expression<charT, traits, Allocator>::reg_expression(const charT* p, flag_type f, const Allocator& a)
|
||||
: data(a), pkmp(0), error_code_(REG_EMPTY), _expression(0)
|
||||
{
|
||||
set_expression(p, f | regbase::use_except);
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
CONSTRUCTOR_INLINE reg_expression<charT, traits, Allocator>::reg_expression(const charT* p1, const charT* p2, flag_type f, const Allocator& a)
|
||||
reg_expression<charT, traits, Allocator>::reg_expression(const charT* p1, const charT* p2, flag_type f, const Allocator& a)
|
||||
: data(a), pkmp(0), error_code_(REG_EMPTY), _expression(0)
|
||||
{
|
||||
set_expression(p1, p2, f | regbase::use_except);
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
CONSTRUCTOR_INLINE reg_expression<charT, traits, Allocator>::reg_expression(const charT* p, size_type len, flag_type f, const Allocator& a)
|
||||
reg_expression<charT, traits, Allocator>::reg_expression(const charT* p, size_type len, flag_type f, const Allocator& a)
|
||||
: data(a), pkmp(0), error_code_(REG_EMPTY), _expression(0)
|
||||
{
|
||||
set_expression(p, p + len, f | regbase::use_except);
|
||||
@ -143,7 +143,7 @@ reg_expression<charT, traits, Allocator>::~reg_expression()
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
reg_expression<charT, traits, Allocator>& BOOST_RE_CALL reg_expression<charT, traits, Allocator>::operator=(const reg_expression<charT, traits, Allocator>& e)
|
||||
reg_expression<charT, traits, Allocator>& BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::operator=(const reg_expression<charT, traits, Allocator>& e)
|
||||
{
|
||||
//
|
||||
// we do a deep copy only if e is a valid expression, otherwise fail.
|
||||
@ -157,7 +157,7 @@ reg_expression<charT, traits, Allocator>& BOOST_RE_CALL reg_expression<charT, tr
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
inline bool BOOST_RE_CALL reg_expression<charT, traits, Allocator>::operator==(const reg_expression<charT, traits, Allocator>& e)const
|
||||
inline bool BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::operator==(const reg_expression<charT, traits, Allocator>& e)const
|
||||
{
|
||||
return (_flags == e.flags())
|
||||
&& (_expression_len == e._expression_len)
|
||||
@ -165,7 +165,7 @@ inline bool BOOST_RE_CALL reg_expression<charT, traits, Allocator>::operator==(c
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
bool BOOST_RE_CALL reg_expression<charT, traits, Allocator>::operator<(const reg_expression<charT, traits, Allocator>& e)const
|
||||
bool BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::operator<(const reg_expression<charT, traits, Allocator>& e)const
|
||||
{
|
||||
//
|
||||
// we can't offer a diffinitive ordering, but we can be consistant:
|
||||
@ -175,19 +175,19 @@ bool BOOST_RE_CALL reg_expression<charT, traits, Allocator>::operator<(const reg
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
Allocator BOOST_RE_CALL reg_expression<charT, traits, Allocator>::allocator()const
|
||||
Allocator BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::allocator()const
|
||||
{
|
||||
return data.allocator();
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
Allocator BOOST_RE_CALL reg_expression<charT, traits, Allocator>::get_allocator()const
|
||||
Allocator BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::get_allocator()const
|
||||
{
|
||||
return data.allocator();
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
unsigned int BOOST_RE_CALL reg_expression<charT, traits, Allocator>::parse_inner_set(const charT*& first, const charT* last)
|
||||
unsigned int BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::parse_inner_set(const charT*& first, const charT* last)
|
||||
{
|
||||
//
|
||||
// we have an inner [...] construct
|
||||
@ -214,7 +214,7 @@ unsigned int BOOST_RE_CALL reg_expression<charT, traits, Allocator>::parse_inner
|
||||
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
bool BOOST_RE_CALL reg_expression<charT, traits, Allocator>::skip_space(const charT*& first, const charT* last)
|
||||
bool BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::skip_space(const charT*& first, const charT* last)
|
||||
{
|
||||
//
|
||||
// returns true if we get to last:
|
||||
@ -227,7 +227,7 @@ bool BOOST_RE_CALL reg_expression<charT, traits, Allocator>::skip_space(const ch
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
void BOOST_RE_CALL reg_expression<charT, traits, Allocator>::parse_range(const charT*& ptr, const charT* end, unsigned& min, unsigned& max)
|
||||
void BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::parse_range(const charT*& ptr, const charT* end, unsigned& min, unsigned& max)
|
||||
{
|
||||
//
|
||||
// we have {x} or {x,} or {x,y} NB no spaces inside braces
|
||||
@ -305,7 +305,7 @@ void BOOST_RE_CALL reg_expression<charT, traits, Allocator>::parse_range(const c
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
charT BOOST_RE_CALL reg_expression<charT, traits, Allocator>::parse_escape(const charT*& first, const charT* last)
|
||||
charT BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::parse_escape(const charT*& first, const charT* last)
|
||||
{
|
||||
charT c(*first);
|
||||
traits_size_type c_unsigned = (traits_size_type)(traits_uchar_type)*first;
|
||||
@ -408,7 +408,7 @@ charT BOOST_RE_CALL reg_expression<charT, traits, Allocator>::parse_escape(const
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
void BOOST_RE_CALL reg_expression<charT, traits, Allocator>::compile_maps()
|
||||
void BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::compile_maps()
|
||||
{
|
||||
re_detail::re_syntax_base* record = (re_detail::re_syntax_base*)data.data();
|
||||
// always compile the first _map:
|
||||
@ -436,7 +436,7 @@ void BOOST_RE_CALL reg_expression<charT, traits, Allocator>::compile_maps()
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
bool BOOST_RE_CALL reg_expression<charT, traits, Allocator>::probe_start(
|
||||
bool BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::probe_start(
|
||||
re_detail::re_syntax_base* node, charT cc, re_detail::re_syntax_base* terminal) const
|
||||
{
|
||||
unsigned int c;
|
||||
@ -541,7 +541,7 @@ bool BOOST_RE_CALL reg_expression<charT, traits, Allocator>::probe_start(
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
bool BOOST_RE_CALL reg_expression<charT, traits, Allocator>::probe_start_null(re_detail::re_syntax_base* node, re_detail::re_syntax_base* terminal)const
|
||||
bool BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::probe_start_null(re_detail::re_syntax_base* node, re_detail::re_syntax_base* terminal)const
|
||||
{
|
||||
switch(node->type)
|
||||
{
|
||||
@ -590,7 +590,7 @@ bool BOOST_RE_CALL reg_expression<charT, traits, Allocator>::probe_start_null(re
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
void BOOST_RE_CALL reg_expression<charT, traits, Allocator>::compile_map(
|
||||
void BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::compile_map(
|
||||
re_detail::re_syntax_base* node, unsigned char* _map,
|
||||
unsigned int* pnull, unsigned char mask, re_detail::re_syntax_base* terminal)const
|
||||
{
|
||||
@ -607,7 +607,7 @@ void BOOST_RE_CALL reg_expression<charT, traits, Allocator>::compile_map(
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
void BOOST_RE_CALL reg_expression<charT, traits, Allocator>::move_offsets(re_detail::re_syntax_base* j, unsigned size)
|
||||
void BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::move_offsets(re_detail::re_syntax_base* j, unsigned size)
|
||||
{
|
||||
// move all offsets starting with j->link forward by size
|
||||
// called after an insert:
|
||||
@ -636,7 +636,7 @@ void BOOST_RE_CALL reg_expression<charT, traits, Allocator>::move_offsets(re_det
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
re_detail::re_syntax_base* BOOST_RE_CALL reg_expression<charT, traits, Allocator>::compile_set_simple(re_detail::re_syntax_base* dat, unsigned long cls, bool isnot)
|
||||
re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::compile_set_simple(re_detail::re_syntax_base* dat, unsigned long cls, bool isnot)
|
||||
{
|
||||
re_detail::jstack<traits_string_type, Allocator> singles(64, data.allocator());
|
||||
re_detail::jstack<traits_string_type, Allocator> ranges(64, data.allocator());
|
||||
@ -652,7 +652,7 @@ re_detail::re_syntax_base* BOOST_RE_CALL reg_expression<charT, traits, Allocator
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
re_detail::re_syntax_base* BOOST_RE_CALL reg_expression<charT, traits, Allocator>::compile_set(const charT*& first, const charT* last)
|
||||
re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::compile_set(const charT*& first, const charT* last)
|
||||
{
|
||||
re_detail::jstack<traits_string_type, Allocator> singles(64, data.allocator());
|
||||
re_detail::jstack<traits_string_type, Allocator> ranges(64, data.allocator());
|
||||
@ -969,7 +969,7 @@ re_detail::re_syntax_base* BOOST_RE_CALL reg_expression<charT, traits, Allocator
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
re_detail::re_syntax_base* BOOST_RE_CALL reg_expression<charT, traits, Allocator>::compile_set_aux(re_detail::jstack<traits_string_type, Allocator>& singles, re_detail::jstack<traits_string_type, Allocator>& ranges, re_detail::jstack<boost::uint_fast32_t, Allocator>& classes, re_detail::jstack<traits_string_type, Allocator>& equivalents, bool isnot, const re_detail::_wide_type&)
|
||||
re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::compile_set_aux(re_detail::jstack<traits_string_type, Allocator>& singles, re_detail::jstack<traits_string_type, Allocator>& ranges, re_detail::jstack<boost::uint_fast32_t, Allocator>& classes, re_detail::jstack<traits_string_type, Allocator>& equivalents, bool isnot, const re_detail::_wide_type&)
|
||||
{
|
||||
size_type base = data.size();
|
||||
data.extend(sizeof(re_detail::re_set_long));
|
||||
@ -1048,7 +1048,7 @@ re_detail::re_syntax_base* BOOST_RE_CALL reg_expression<charT, traits, Allocator
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
re_detail::re_syntax_base* BOOST_RE_CALL reg_expression<charT, traits, Allocator>::compile_set_aux(re_detail::jstack<traits_string_type, Allocator>& singles, re_detail::jstack<traits_string_type, Allocator>& ranges, re_detail::jstack<boost::uint_fast32_t, Allocator>& classes, re_detail::jstack<traits_string_type, Allocator>& equivalents, bool isnot, const re_detail::_narrow_type&)
|
||||
re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::compile_set_aux(re_detail::jstack<traits_string_type, Allocator>& singles, re_detail::jstack<traits_string_type, Allocator>& ranges, re_detail::jstack<boost::uint_fast32_t, Allocator>& classes, re_detail::jstack<traits_string_type, Allocator>& equivalents, bool isnot, const re_detail::_narrow_type&)
|
||||
{
|
||||
re_detail::re_set* dat = (re_detail::re_set*)data.extend(sizeof(re_detail::re_set));
|
||||
std::memset(dat, 0, sizeof(re_detail::re_set));
|
||||
@ -1153,9 +1153,9 @@ inline
|
||||
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
void BOOST_RE_CALL reg_expression<charT, traits, Allocator>::fixup_apply(re_detail::re_syntax_base* b, unsigned cbraces)
|
||||
void BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::fixup_apply(re_detail::re_syntax_base* b, unsigned cbraces)
|
||||
{
|
||||
typedef typename boost::re_detail::rebind_allocator<bool, Allocator>::type b_alloc;
|
||||
typedef typename boost::detail::rebind_allocator<bool, Allocator>::type b_alloc;
|
||||
|
||||
register unsigned char* base = (unsigned char*)b;
|
||||
register re_detail::re_syntax_base* ptr = b;
|
||||
@ -1175,7 +1175,7 @@ void BOOST_RE_CALL reg_expression<charT, traits, Allocator>::fixup_apply(re_deta
|
||||
{
|
||||
case re_detail::syntax_element_rep:
|
||||
((re_detail::re_jump*)ptr)->alt.p = add_offset(base, ((re_detail::re_jump*)ptr)->alt.i);
|
||||
#ifdef BOOST_RE_DEBUG
|
||||
#ifdef BOOST_REGEX_DEBUG
|
||||
if((re_detail::padding_mask & (int)((re_detail::re_jump*)ptr)->alt.p) && (((re_detail::re_jump*)ptr)->alt.p != b))
|
||||
{
|
||||
jm_trace("padding mis-aligment in repeat jump to object type: " << ((re_detail::re_jump*)ptr)->alt.p->type)
|
||||
@ -1188,7 +1188,7 @@ void BOOST_RE_CALL reg_expression<charT, traits, Allocator>::fixup_apply(re_deta
|
||||
case re_detail::syntax_element_jump:
|
||||
case re_detail::syntax_element_alt:
|
||||
((re_detail::re_jump*)ptr)->alt.p = add_offset(base, ((re_detail::re_jump*)ptr)->alt.i);
|
||||
#ifdef BOOST_RE_DEBUG
|
||||
#ifdef BOOST_REGEX_DEBUG
|
||||
if((re_detail::padding_mask & (int)((re_detail::re_jump*)ptr)->alt.p) && (((re_detail::re_jump*)ptr)->alt.p != b))
|
||||
{
|
||||
jm_trace("padding mis-aligment in alternation jump to object type: " << ((re_detail::re_jump*)ptr)->alt.p->type)
|
||||
@ -1210,7 +1210,7 @@ void BOOST_RE_CALL reg_expression<charT, traits, Allocator>::fixup_apply(re_deta
|
||||
default:
|
||||
rebase:
|
||||
ptr->next.p = add_offset(base, ptr->next.i);
|
||||
#ifdef BOOST_RE_DEBUG
|
||||
#ifdef BOOST_REGEX_DEBUG
|
||||
if((re_detail::padding_mask & (int)(ptr->next.p)) && (((re_detail::re_jump*)ptr)->alt.p != b))
|
||||
{
|
||||
jm_trace("padding mis-alignment in next record of type " << ptr->next.p->type)
|
||||
@ -1233,7 +1233,7 @@ void BOOST_RE_CALL reg_expression<charT, traits, Allocator>::fixup_apply(re_deta
|
||||
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
unsigned int BOOST_RE_CALL reg_expression<charT, traits, Allocator>::set_expression(const charT* p, const charT* end, flag_type f)
|
||||
unsigned int BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::set_expression(const charT* p, const charT* end, flag_type f)
|
||||
{
|
||||
if(p == expression())
|
||||
{
|
||||
@ -1883,7 +1883,7 @@ unsigned int BOOST_RE_CALL reg_expression<charT, traits, Allocator>::set_express
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
re_detail::re_syntax_base* BOOST_RE_CALL reg_expression<charT, traits, Allocator>::add_simple(re_detail::re_syntax_base* dat, re_detail::syntax_element_type type, unsigned int size)
|
||||
re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::add_simple(re_detail::re_syntax_base* dat, re_detail::syntax_element_type type, unsigned int size)
|
||||
{
|
||||
if(dat)
|
||||
{
|
||||
@ -1899,7 +1899,7 @@ re_detail::re_syntax_base* BOOST_RE_CALL reg_expression<charT, traits, Allocator
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
re_detail::re_syntax_base* BOOST_RE_CALL reg_expression<charT, traits, Allocator>::add_literal(re_detail::re_syntax_base* dat, charT c)
|
||||
re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::add_literal(re_detail::re_syntax_base* dat, charT c)
|
||||
{
|
||||
if(dat && (dat->type == re_detail::syntax_element_literal))
|
||||
{
|
||||
@ -1920,7 +1920,7 @@ re_detail::re_syntax_base* BOOST_RE_CALL reg_expression<charT, traits, Allocator
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
unsigned int BOOST_RE_CALL reg_expression<charT, traits, Allocator>::probe_restart(re_detail::re_syntax_base* dat)
|
||||
unsigned int BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::probe_restart(re_detail::re_syntax_base* dat)
|
||||
{
|
||||
switch(dat->type)
|
||||
{
|
||||
@ -1941,7 +1941,7 @@ unsigned int BOOST_RE_CALL reg_expression<charT, traits, Allocator>::probe_resta
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
unsigned int BOOST_RE_CALL reg_expression<charT, traits, Allocator>::fixup_leading_rep(re_detail::re_syntax_base* dat, re_detail::re_syntax_base* end)
|
||||
unsigned int BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::fixup_leading_rep(re_detail::re_syntax_base* dat, re_detail::re_syntax_base* end)
|
||||
{
|
||||
unsigned int len = 0;
|
||||
bool leading_lit = end ? false : true;
|
||||
@ -2015,7 +2015,7 @@ unsigned int BOOST_RE_CALL reg_expression<charT, traits, Allocator>::fixup_leadi
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
void BOOST_RE_CALL reg_expression<charT, traits, Allocator>::fail(unsigned int err)
|
||||
void BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::fail(unsigned int err)
|
||||
{
|
||||
error_code_ = err;
|
||||
if(err)
|
||||
@ -2031,7 +2031,7 @@ void BOOST_RE_CALL reg_expression<charT, traits, Allocator>::fail(unsigned int e
|
||||
}
|
||||
|
||||
|
||||
#if defined(BOOST_RE_NO_TEMPLATE_SWITCH_MERGE) && !defined(BOOST_RE_NO_NAMESPACES)
|
||||
#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
|
||||
} // namespace
|
||||
#endif
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -26,7 +26,7 @@
|
||||
#define BOOST_REGEX_CSTRING_HPP
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/detail/regex_config.hpp>
|
||||
#include <boost/regex/config.hpp>
|
||||
#endif
|
||||
|
||||
#include <cstring>
|
||||
@ -43,7 +43,7 @@ namespace boost{
|
||||
//
|
||||
|
||||
template <class charT>
|
||||
std::size_t BOOST_RE_CALL re_strlen(const charT *s)
|
||||
std::size_t BOOST_REGEX_CALL re_strlen(const charT *s)
|
||||
{
|
||||
std::size_t len = 0;
|
||||
while(*s)
|
||||
@ -54,27 +54,27 @@ std::size_t BOOST_RE_CALL re_strlen(const charT *s)
|
||||
return len;
|
||||
}
|
||||
|
||||
inline std::size_t BOOST_RE_CALL re_strlen(const char *s)
|
||||
inline std::size_t BOOST_REGEX_CALL re_strlen(const char *s)
|
||||
{
|
||||
return std::strlen(s);
|
||||
}
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
|
||||
inline std::size_t BOOST_RE_CALL re_strlen(const wchar_t *s)
|
||||
inline std::size_t BOOST_REGEX_CALL re_strlen(const wchar_t *s)
|
||||
{
|
||||
return std::wcslen(s);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
BOOST_RE_IX_DECL void BOOST_RE_CALL re_transform(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
BOOST_REGEX_DECL void BOOST_REGEX_CALL re_transform(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
|
||||
#endif
|
||||
BOOST_RE_IX_DECL void BOOST_RE_CALL re_transform(std::string& out, const std::string& in);
|
||||
BOOST_REGEX_DECL void BOOST_REGEX_CALL re_transform(std::string& out, const std::string& in);
|
||||
|
||||
template <class charT>
|
||||
void BOOST_RE_CALL re_trunc_primary(std::basic_string<charT>& s)
|
||||
void BOOST_REGEX_CALL re_trunc_primary(std::basic_string<charT>& s)
|
||||
{
|
||||
for(unsigned int i = 0; i < s.size(); ++i)
|
||||
{
|
||||
@ -86,7 +86,7 @@ void BOOST_RE_CALL re_trunc_primary(std::basic_string<charT>& s)
|
||||
}
|
||||
}
|
||||
|
||||
inline char* BOOST_RE_CALL re_strcpy(char *s1, const char *s2)
|
||||
inline char* BOOST_REGEX_CALL re_strcpy(char *s1, const char *s2)
|
||||
{
|
||||
#if defined(__BORLANDC__) && defined(strcpy)
|
||||
return ::strcpy(s1, s2);
|
||||
@ -95,9 +95,9 @@ inline char* BOOST_RE_CALL re_strcpy(char *s1, const char *s2)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
|
||||
inline wchar_t* BOOST_RE_CALL re_strcpy(wchar_t *s1, const wchar_t *s2)
|
||||
inline wchar_t* BOOST_REGEX_CALL re_strcpy(wchar_t *s1, const wchar_t *s2)
|
||||
{
|
||||
return std::wcscpy(s1, s2);
|
||||
}
|
||||
@ -106,7 +106,7 @@ inline wchar_t* BOOST_RE_CALL re_strcpy(wchar_t *s1, const wchar_t *s2)
|
||||
|
||||
|
||||
template <class charT>
|
||||
charT* BOOST_RE_CALL re_strdup(const charT* p)
|
||||
charT* BOOST_REGEX_CALL re_strdup(const charT* p)
|
||||
{
|
||||
charT* buf = new charT[re_strlen(p) + 1];
|
||||
re_strcpy(buf, p);
|
||||
@ -114,7 +114,7 @@ charT* BOOST_RE_CALL re_strdup(const charT* p)
|
||||
}
|
||||
|
||||
template <class charT>
|
||||
inline void BOOST_RE_CALL re_strfree(charT* p)
|
||||
inline void BOOST_REGEX_CALL re_strfree(charT* p)
|
||||
{
|
||||
delete[] p;
|
||||
}
|
||||
|
@ -40,11 +40,11 @@ enum format_flags_t{
|
||||
namespace re_detail{
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -a4 -b -Ve -pc
|
||||
#pragma option push -a4 -b -Ve -pc -w-8037
|
||||
#endif
|
||||
|
||||
template <class O, class I>
|
||||
O BOOST_RE_CALL re_copy_out(O out, I first, I last)
|
||||
O BOOST_REGEX_CALL re_copy_out(O out, I first, I last)
|
||||
{
|
||||
while(first != last)
|
||||
{
|
||||
@ -56,7 +56,7 @@ O BOOST_RE_CALL re_copy_out(O out, I first, I last)
|
||||
}
|
||||
|
||||
template <class charT, class traits_type>
|
||||
void BOOST_RE_CALL re_skip_format(const charT*& fmt, const traits_type& traits_inst)
|
||||
void BOOST_REGEX_CALL re_skip_format(const charT*& fmt, const traits_type& traits_inst)
|
||||
{
|
||||
// dwa 9/13/00 - suppress incorrect unused parameter warning for MSVC
|
||||
(void)traits_inst;
|
||||
@ -96,7 +96,7 @@ void BOOST_RE_CALL re_skip_format(const charT*& fmt, const traits_type& traits_i
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef BOOST_RE_NO_OI_ASSIGN
|
||||
#ifdef BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN
|
||||
|
||||
//
|
||||
// ugly hack for buggy output iterators
|
||||
@ -104,8 +104,8 @@ void BOOST_RE_CALL re_skip_format(const charT*& fmt, const traits_type& traits_i
|
||||
template <class T>
|
||||
inline void oi_assign(T* p, T v)
|
||||
{
|
||||
jm_destroy(p);
|
||||
jm_construct(p, v);
|
||||
::boost::re_detail::destroy(p);
|
||||
construct(p, v);
|
||||
}
|
||||
|
||||
#else
|
||||
@ -116,15 +116,15 @@ inline void oi_assign(T* p, T v)
|
||||
//
|
||||
// if you get a compile time error in here then you either
|
||||
// need to rewrite your output iterator to make it assignable
|
||||
// (as is required by the standard), or define BOOST_RE_NO_OI_ASSIGN
|
||||
// to use the ugly hack above
|
||||
// (as is required by the standard), or define
|
||||
// BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN to use the ugly hack above
|
||||
*p = v;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(BOOST_RE_NO_TEMPLATE_SWITCH_MERGE) && !defined(BOOST_RE_NO_NAMESPACES)
|
||||
#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
|
||||
//
|
||||
// Ugly ugly hack,
|
||||
// template don't merge if they contain switch statements so declare these
|
||||
@ -141,7 +141,7 @@ namespace{
|
||||
// _reg_format_aux does the actual work:
|
||||
//
|
||||
template <class OutputIterator, class iterator, class Allocator, class charT, class traits_type>
|
||||
OutputIterator BOOST_RE_CALL _reg_format_aux(OutputIterator out,
|
||||
OutputIterator BOOST_REGEX_CALL _reg_format_aux(OutputIterator out,
|
||||
const match_results<iterator, Allocator>& m,
|
||||
const charT*& fmt,
|
||||
unsigned flags, const traits_type& traits_inst)
|
||||
@ -428,7 +428,7 @@ default_opt:
|
||||
return out;
|
||||
}
|
||||
|
||||
#if defined(BOOST_RE_NO_TEMPLATE_SWITCH_MERGE) && !defined(BOOST_RE_NO_NAMESPACES)
|
||||
#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
|
||||
} // namespace
|
||||
#endif
|
||||
|
||||
@ -462,7 +462,7 @@ public:
|
||||
: out(&o), last(&pi), fmt(f), flags(format_flags), pt(&p){}
|
||||
|
||||
~merge_out_predicate() {}
|
||||
bool BOOST_RE_CALL operator()(const boost::match_results<iterator, Allocator>& m)
|
||||
bool BOOST_REGEX_CALL operator()(const boost::match_results<iterator, Allocator>& m)
|
||||
{
|
||||
const charT* f = fmt;
|
||||
if(0 == (flags & format_no_copy))
|
||||
|
@ -26,7 +26,7 @@
|
||||
#define BOOST_REGEX_KMP_HPP
|
||||
|
||||
#ifdef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/detail/regex_config.hpp>
|
||||
#include <boost/regex/config.hpp>
|
||||
#endif
|
||||
|
||||
|
||||
@ -49,14 +49,14 @@ struct kmp_info
|
||||
template <class charT, class Allocator>
|
||||
void kmp_free(kmp_info<charT>* pinfo, const Allocator& a)
|
||||
{
|
||||
typedef typename boost::re_detail::rebind_allocator<char, Allocator>::type atype;
|
||||
typedef typename boost::detail::rebind_allocator<char, Allocator>::type atype;
|
||||
atype(a).deallocate((char*)pinfo, pinfo->size);
|
||||
}
|
||||
|
||||
template <class iterator, class charT, class Trans, class Allocator>
|
||||
kmp_info<charT>* kmp_compile(iterator first, iterator last, charT, Trans translate, const Allocator& a)
|
||||
{
|
||||
typedef typename boost::re_detail::rebind_allocator<char, Allocator>::type atype;
|
||||
typedef typename boost::detail::rebind_allocator<char, Allocator>::type atype;
|
||||
int i, j, m;
|
||||
i = 0;
|
||||
m = boost::re_detail::distance(first, last);
|
||||
|
@ -25,9 +25,9 @@
|
||||
|
||||
#ifndef BOOST_REGEX_LIBRARY_INCLUDE_HPP
|
||||
#define BOOST_REGEX_LIBRARY_INCLUDE_HPP
|
||||
#ifndef BOOST_RE_NO_LIB
|
||||
#ifndef BOOST_REGEX_NO_LIB
|
||||
|
||||
#if defined(BOOST_MSVC) && !defined(BOOST_RE_BUILD_DLL)
|
||||
#if defined(BOOST_MSVC) && !defined(BOOST_REGEX_BUILD_DLL)
|
||||
#ifdef __SGI_STL_PORT
|
||||
#ifdef _DLL
|
||||
// All these are multithreaded:
|
||||
@ -35,7 +35,7 @@
|
||||
#pragma comment(lib, "vc6-stlport-re300ddl.lib")
|
||||
#elif defined(_DEBUG)
|
||||
#pragma comment(lib, "vc6-stlport-re300dl.lib")
|
||||
#elif defined(BOOST_RE_STATIC_LIB)
|
||||
#elif defined(BOOST_REGEX_STATIC_LINK)
|
||||
// static regex lib, dll runtime
|
||||
#pragma comment(lib, "vc6-stlport-re300ls.lib")
|
||||
#else // DEBUG
|
||||
@ -55,12 +55,12 @@
|
||||
#error STLPort does not support single threaded builds
|
||||
#endif //_MT
|
||||
#endif //_DLL
|
||||
#else
|
||||
#elif _MSC_VER < 1300
|
||||
#ifdef _DLL
|
||||
// All these are multithreaded:
|
||||
#ifdef _DEBUG
|
||||
#pragma comment(lib, "vc6-re300dl.lib")
|
||||
#elif defined(BOOST_RE_STATIC_LIB)
|
||||
#elif defined(BOOST_REGEX_STATIC_LINK)
|
||||
// static regex lib, dll runtime
|
||||
#pragma comment(lib, "vc6-re300ls.lib")
|
||||
#else // DEBUG
|
||||
@ -81,15 +81,41 @@
|
||||
#endif //_DEBUG
|
||||
#endif //_MT
|
||||
#endif //_DLL
|
||||
#else
|
||||
#ifdef _DLL
|
||||
// All these are multithreaded:
|
||||
#ifdef _DEBUG
|
||||
#pragma comment(lib, "vc7-re300dl.lib")
|
||||
#elif defined(BOOST_REGEX_STATIC_LINK)
|
||||
// static regex lib, dll runtime
|
||||
#pragma comment(lib, "vc7-re300ls.lib")
|
||||
#else // DEBUG
|
||||
#pragma comment(lib, "vc7-re300l.lib")
|
||||
#endif // _DEBUG
|
||||
#else // _DLL
|
||||
#ifdef _MT
|
||||
#ifdef _DEBUG
|
||||
#pragma comment(lib, "vc7-re300dm.lib")
|
||||
#else //_DEBUG
|
||||
#pragma comment(lib, "vc7-re300m.lib")
|
||||
#endif //_DEBUG
|
||||
#else //_MT
|
||||
#ifdef _DEBUG
|
||||
#pragma comment(lib, "vc7-re300d.lib")
|
||||
#else //_DEBUG
|
||||
#pragma comment(lib, "vc7-re300.lib")
|
||||
#endif //_DEBUG
|
||||
#endif //_MT
|
||||
#endif //_DLL
|
||||
#endif // __SGI_STL_PORT
|
||||
#endif //BOOST_MSVC
|
||||
|
||||
|
||||
#if defined(__BORLANDC__) && !defined(BOOST_RE_BUILD_DLL)
|
||||
#if defined(__BORLANDC__) && !defined(BOOST_REGEX_BUILD_DLL)
|
||||
|
||||
#if __BORLANDC__ < 0x550
|
||||
|
||||
#ifdef BOOST_RE_USE_VCL
|
||||
#ifdef BOOST_REGEX_USE_VCL
|
||||
|
||||
#ifdef _RTLDLL
|
||||
#pragma comment(lib, "bcb4re300lv.lib")
|
||||
@ -117,7 +143,7 @@
|
||||
|
||||
#else // C++ Builder 5:
|
||||
|
||||
#ifdef BOOST_RE_USE_VCL
|
||||
#ifdef BOOST_REGEX_USE_VCL
|
||||
|
||||
#ifdef _RTLDLL
|
||||
#pragma comment(lib, "bcb5re300lv.lib")
|
||||
@ -147,7 +173,7 @@
|
||||
|
||||
#endif //__BORLANDC__
|
||||
|
||||
#endif //BOOST_RE_NO_LIB
|
||||
#endif //BOOST_REGEX_NO_LIB
|
||||
|
||||
#endif // BOOST_REGEX_LIBRARY_INCLUDE_HPP
|
||||
|
||||
|
@ -31,15 +31,19 @@ namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -a4 -b -Ve -pc
|
||||
#pragma option push -a4 -b -Ve -pc -w-8026
|
||||
#endif
|
||||
|
||||
template <class iterator, class charT, class traits_type, class Allocator>
|
||||
iterator BOOST_RE_CALL re_is_set_member(iterator next,
|
||||
iterator BOOST_REGEX_CALL re_is_set_member(iterator next,
|
||||
iterator last,
|
||||
re_set_long* set_,
|
||||
const reg_expression<charT, traits_type, Allocator>& e)
|
||||
{
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4800)
|
||||
#endif
|
||||
const charT* p = (const charT*)(set_+1);
|
||||
iterator ptr;
|
||||
unsigned int i;
|
||||
@ -140,14 +144,17 @@ iterator BOOST_RE_CALL re_is_set_member(iterator next,
|
||||
if(traits_inst.is_class(col, set_->cclasses) == true)
|
||||
return set_->isnot ? next : ++next;
|
||||
return set_->isnot ? ++next : next;
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class iterator, class Allocator>
|
||||
class _priv_match_data
|
||||
{
|
||||
public:
|
||||
typedef typename boost::re_detail::rebind_allocator<int, Allocator>::type i_alloc;
|
||||
typedef typename boost::re_detail::rebind_allocator<iterator, Allocator>::type it_alloc;
|
||||
typedef typename boost::detail::rebind_allocator<int, Allocator>::type i_alloc;
|
||||
typedef typename boost::detail::rebind_allocator<iterator, Allocator>::type it_alloc;
|
||||
|
||||
match_results_base<iterator, Allocator> temp_match;
|
||||
// failure stacks:
|
||||
@ -208,7 +215,7 @@ void _priv_match_data<iterator, Allocator>::free()
|
||||
i_alloc temp1(temp_match.allocator());
|
||||
temp1.deallocate(accumulators, caccumulators);
|
||||
for(unsigned i = 0; i < caccumulators; ++i)
|
||||
jm_destroy(loop_starts + i);
|
||||
::boost::re_detail::destroy(loop_starts + i);
|
||||
it_alloc temp2(temp_match.allocator());
|
||||
temp2.deallocate(loop_starts, caccumulators);
|
||||
}
|
||||
@ -242,7 +249,7 @@ struct access_t : public reg_expression<charT, traits, Allocator>
|
||||
};
|
||||
|
||||
|
||||
#if defined(BOOST_RE_NO_TEMPLATE_SWITCH_MERGE) && !defined(BOOST_RE_NO_NAMESPACES)
|
||||
#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
|
||||
//
|
||||
// Ugly ugly hack,
|
||||
// template don't merge if they contain switch statements so declare these
|
||||
@ -260,6 +267,10 @@ bool query_match_aux(iterator first,
|
||||
_priv_match_data<iterator, Allocator>& pd,
|
||||
iterator* restart)
|
||||
{
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4800)
|
||||
#endif
|
||||
typedef access_t<charT, traits, Allocator2> access;
|
||||
|
||||
if(e.flags() & regbase::failbit)
|
||||
@ -944,8 +955,11 @@ bool query_match_aux(iterator first,
|
||||
// if we get to here then everything has failed
|
||||
// and no match was found:
|
||||
return false;
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
#if defined(BOOST_RE_NO_TEMPLATE_SWITCH_MERGE) && !defined(BOOST_RE_NO_NAMESPACES)
|
||||
#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
|
||||
} // namespace
|
||||
#endif
|
||||
|
||||
@ -1019,7 +1033,7 @@ struct grep_search_predicate
|
||||
}
|
||||
};
|
||||
|
||||
#if !defined(BOOST_RE_NO_TEMPLATE_RETURNS) && !defined(BOOST_RE_NO_PARTIAL_FUNC_SPEC)
|
||||
#if !defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) && !defined(BOOST_WEAK_FUNCTION_TEMPLATE_ORDERING)
|
||||
|
||||
template <class iterator, class Allocator>
|
||||
inline const match_results_base<iterator, Allocator>& grep_out_type(const grep_search_predicate<iterator, Allocator>& o, const Allocator&)
|
||||
@ -1035,7 +1049,7 @@ inline const Allocator& grep_out_type(const T&, const Allocator& a)
|
||||
return a;
|
||||
}
|
||||
|
||||
#if defined(BOOST_RE_NO_TEMPLATE_SWITCH_MERGE) && !defined(BOOST_RE_NO_NAMESPACES)
|
||||
#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
|
||||
//
|
||||
// Ugly ugly hack,
|
||||
// template don't merge if they contain switch statements so declare these
|
||||
@ -1051,6 +1065,10 @@ namespace{
|
||||
template <class Predicate, class I, class charT, class traits, class A, class A2>
|
||||
unsigned int reg_grep2(Predicate foo, I first, I last, const reg_expression<charT, traits, A>& e, unsigned flags, A2 a)
|
||||
{
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4800)
|
||||
#endif
|
||||
typedef access_t<charT, traits, A> access;
|
||||
|
||||
if(e.flags() & regbase::failbit)
|
||||
@ -1527,8 +1545,11 @@ unsigned int reg_grep2(Predicate foo, I first, I last, const reg_expression<char
|
||||
}
|
||||
|
||||
return cmatches;
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
#if defined(BOOST_RE_NO_TEMPLATE_SWITCH_MERGE) && !defined(BOOST_RE_NO_NAMESPACES)
|
||||
#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
|
||||
} // namespace {anon}
|
||||
#endif
|
||||
|
||||
@ -1565,7 +1586,7 @@ bool regex_match(iterator first, iterator last, const reg_expression<charT, trai
|
||||
}
|
||||
//
|
||||
// query_match convenience interfaces:
|
||||
#ifndef BOOST_RE_NO_PARTIAL_FUNC_SPEC
|
||||
#ifndef BOOST_WEAK_FUNCTION_TEMPLATE_ORDERING
|
||||
//
|
||||
// this isn't really a partial specialisation, but template function
|
||||
// overloading - if the compiler doesn't support partial specialisation
|
||||
@ -1620,7 +1641,7 @@ inline bool regex_match(const char* str,
|
||||
match_results<const char*> m;
|
||||
return regex_match(str, str + regex::traits_type::length(str), m, e, flags);
|
||||
}
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
inline bool regex_match(const wchar_t* str,
|
||||
wcmatch& m,
|
||||
const wregex& e,
|
||||
@ -1650,7 +1671,7 @@ inline bool regex_match(const std::string& s,
|
||||
match_results<std::string::const_iterator, regex::allocator_type> m;
|
||||
return regex_match(s.begin(), s.end(), m, e, flags);
|
||||
}
|
||||
#if !defined(BOOST_RE_NO_WCSTRING)
|
||||
#if !defined(BOOST_NO_WREGEX)
|
||||
inline bool regex_match(const std::basic_string<wchar_t>& s,
|
||||
match_results<std::basic_string<wchar_t>::const_iterator, wregex::allocator_type>& m,
|
||||
const wregex& e,
|
||||
@ -1672,6 +1693,10 @@ inline bool regex_match(const std::basic_string<wchar_t>& s,
|
||||
template <class iterator, class Allocator, class charT, class traits, class Allocator2>
|
||||
bool regex_search(iterator first, iterator last, match_results<iterator, Allocator>& m, const reg_expression<charT, traits, Allocator2>& e, unsigned flags = match_default)
|
||||
{
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4800)
|
||||
#endif
|
||||
if(e.flags() & regbase::failbit)
|
||||
return false;
|
||||
|
||||
@ -1679,11 +1704,14 @@ bool regex_search(iterator first, iterator last, match_results<iterator, Allocat
|
||||
typedef typename traits::uchar_type traits_uchar_type;
|
||||
|
||||
return re_detail::reg_grep2(re_detail::grep_search_predicate<iterator, Allocator>(&m), first, last, e, flags, m.allocator());
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
//
|
||||
// regex_search convenience interfaces:
|
||||
#ifndef BOOST_RE_NO_PARTIAL_FUNC_SPEC
|
||||
#ifndef BOOST_WEAK_FUNCTION_TEMPLATE_ORDERING
|
||||
//
|
||||
// this isn't really a partial specialisation, but template function
|
||||
// overloading - if the compiler doesn't support partial specialisation
|
||||
@ -1713,7 +1741,7 @@ inline bool regex_search(const char* str,
|
||||
{
|
||||
return regex_search(str, str + regex::traits_type::length(str), m, e, flags);
|
||||
}
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
inline bool regex_search(const wchar_t* str,
|
||||
wcmatch& m,
|
||||
const wregex& e,
|
||||
@ -1729,7 +1757,7 @@ inline bool regex_search(const std::string& s,
|
||||
{
|
||||
return regex_search(s.begin(), s.end(), m, e, flags);
|
||||
}
|
||||
#if !defined(BOOST_RE_NO_WCSTRING)
|
||||
#if !defined(BOOST_NO_WREGEX)
|
||||
inline bool regex_search(const std::basic_string<wchar_t>& s,
|
||||
match_results<std::basic_string<wchar_t>::const_iterator, wregex::allocator_type>& m,
|
||||
const wregex& e,
|
||||
@ -1754,7 +1782,7 @@ inline unsigned int regex_grep(Predicate foo, iterator first, iterator last, con
|
||||
|
||||
//
|
||||
// regex_grep convenience interfaces:
|
||||
#ifndef BOOST_RE_NO_PARTIAL_FUNC_SPEC
|
||||
#ifndef BOOST_WEAK_FUNCTION_TEMPLATE_ORDERING
|
||||
//
|
||||
// this isn't really a partial specialisation, but template function
|
||||
// overloading - if the compiler doesn't support partial specialisation
|
||||
@ -1781,7 +1809,7 @@ inline unsigned int regex_grep(bool (*foo)(const cmatch&), const char* str,
|
||||
{
|
||||
return regex_grep(foo, str, str + regex::traits_type::length(str), e, flags);
|
||||
}
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
inline unsigned int regex_grep(bool (*foo)(const wcmatch&), const wchar_t* str,
|
||||
const wregex& e,
|
||||
unsigned flags = match_default)
|
||||
@ -1795,7 +1823,7 @@ inline unsigned int regex_grep(bool (*foo)(const match_results<std::string::cons
|
||||
{
|
||||
return regex_grep(foo, s.begin(), s.end(), e, flags);
|
||||
}
|
||||
#if !defined(BOOST_RE_NO_WCSTRING)
|
||||
#if !defined(BOOST_NO_WREGEX)
|
||||
inline unsigned int regex_grep(bool (*foo)(const match_results<std::basic_string<wchar_t>::const_iterator, wregex::allocator_type>&),
|
||||
const std::basic_string<wchar_t>& s,
|
||||
const wregex& e,
|
||||
|
@ -1,146 +0,0 @@
|
||||
|
||||
#ifndef BOOST_RE_OPT_H
|
||||
#define BOOST_RE_OPT_H
|
||||
|
||||
/* #define BOOST_RE_AUTO_CONFIGURE */
|
||||
#ifdef BOOST_RE_AUTO_CONFIGURE
|
||||
|
||||
/* Compiler options: */
|
||||
|
||||
/* BOOST_NO_STDC_NAMESPACE C library not in namespace std */
|
||||
/* #define BOOST_NO_STDC_NAMESPACE */
|
||||
|
||||
/* BOOST_RE_PLATFORM_W32 Platform is MS Win32 */
|
||||
/* #define BOOST_RE_PLATFORM_W32 */
|
||||
|
||||
/* BOOST_RE_NO_W32 Disable Win32 support even when present */
|
||||
/* #define BOOST_RE_NO_W32 */
|
||||
|
||||
/* BOOST_RE_NO_BOOL If bool is not a distict type. */
|
||||
/* #define BOOST_RE_NO_BOOL */
|
||||
|
||||
/* BOOST_RE_NO_WCHAR_H If there is no <wchar.h> */
|
||||
/* #define BOOST_RE_NO_WCHAR_H */
|
||||
|
||||
/* BOOST_RE_NO_WCTYPE_H If there is no <wctype.h> */
|
||||
/* #define BOOST_RE_NO_WCTYPE_H */
|
||||
|
||||
/* BOOST_RE_NO_WCSTRING If there are no wcslen and wcsncmp functions available. */
|
||||
/* #define BOOST_RE_NO_WCSTRING */
|
||||
|
||||
/* BOOST_RE_NO_SWPRINTF If there is no swprintf available. */
|
||||
/* #define BOOST_RE_NO_SWPRINTF */
|
||||
|
||||
/* BOOST_RE_NO_WSPRINTF If there is no wsprintf available. */
|
||||
/* #define BOOST_RE_NO_WSPRINTF */
|
||||
|
||||
/* BOOST_NO_MEMBER_TEMPLATES If member function templates or nested template classes are not allowed. */
|
||||
/* #define BOOST_NO_MEMBER_TEMPLATES */
|
||||
|
||||
/* BOOST_RE_NO_TEMPLATE_RETURNS If template functions based on return type are not supported. */
|
||||
/* #define BOOST_RE_NO_TEMPLATE_RETURNS */
|
||||
|
||||
/* BOOST_RE_NO_PARTIAL_FUNC_SPEC If partial template function specialisation is not supported */
|
||||
/* #define BOOST_RE_NO_PARTIAL_FUNC_SPEC */
|
||||
|
||||
/* BOOST_RE_NO_CAT Define if the compiler does not support POSIX style
|
||||
message categories (catopen catgets catclose). */
|
||||
/* #define BOOST_RE_NO_CAT */
|
||||
|
||||
/* BOOST_RE_THREADS Define if the compiler supports multiple threads in
|
||||
the current translation mode. */
|
||||
/* #define BOOST_RE_THREADS */
|
||||
|
||||
/* BOOST_RE_NO_TEMPLATE_MERGE If template in separate translation units don't merge at link time */
|
||||
/* #define BOOST_RE_NO_TEMPLATE_MERGE */
|
||||
|
||||
/* BOOST_RE_NO_TEMPLATE_MERGE_A If template merging from library archives is not supported */
|
||||
/* #define BOOST_RE_NO_TEMPLATE_MERGE_A */
|
||||
|
||||
/* BOOST_RE_NO_TEMPLATE_SWITCH_MERGE If merging of templates containing switch statements is not supported */
|
||||
/* #define BOOST_RE_NO_TEMPLATE_SWITCH_MERGE */
|
||||
|
||||
/* BOOST_RE_CALL Optionally define a calling convention for C++ functions */
|
||||
/* #define BOOST_RE_CALL */
|
||||
|
||||
/* BOOST_RE_CCALL Optionally define a calling convention for C functions */
|
||||
/* #define BOOST_RE_CCALL */
|
||||
|
||||
/* BOOST_RE_SIZEOF_SHORT sizeof(short) */
|
||||
/* #define BOOST_RE_SIZEOF_SHORT */
|
||||
|
||||
/* BOOST_RE_SIZEOF_INT sizeof(int) */
|
||||
/* #define BOOST_RE_SIZEOF_INT */
|
||||
|
||||
/* BOOST_RE_SIZEOF_LONG sizeof(long) */
|
||||
/* #define BOOST_RE_SIZEOF_LONG */
|
||||
|
||||
/* BOOST_RE_SIZEOF_WCHAR_T sizeof(wchar_t) */
|
||||
/* #define BOOST_RE_SIZEOF_WCHAR_T */
|
||||
|
||||
|
||||
/* STL options: */
|
||||
|
||||
/* BOOST_RE_NO_ITERATOR_H Define if you do not have a version of <iterator>. */
|
||||
/* #define BOOST_RE_NO_ITERATOR_H */
|
||||
|
||||
/* BOOST_NO_STD_ALLOCATOR Define if <memory> does not fully comply with the
|
||||
latest standard, and is not auto-recognised,
|
||||
that means nested template classes
|
||||
which hardly any compilers support at present. */
|
||||
/* #define BOOST_NO_STD_ALLOCATOR */
|
||||
|
||||
/* BOOST_RE_NO_LOCALE_H Define if there is no verion of the standard
|
||||
<locale> header available. */
|
||||
/* #define BOOST_RE_NO_LOCALE_H */
|
||||
|
||||
/* BOOST_RE_NO_STL Disables the use of any supporting STL code. */
|
||||
/* #define BOOST_RE_NO_STL */
|
||||
|
||||
/* BOOST_RE_NO_NOT_EQUAL Disables the generation of operator!= if this
|
||||
clashes with the STL version. */
|
||||
|
||||
/* BOOST_RE_NO_STRING_DEF_ARGS Define if std::basic_string<charT> not allowed - in
|
||||
other words if the template is missing its required
|
||||
default arguments. */
|
||||
/* #define BOOST_RE_NO_STRING_DEF_ARGS */
|
||||
|
||||
/* BOOST_RE_USE_ALGO If <algo.h> not <algorithm> is present */
|
||||
/* #define BOOST_RE_USE_ALGO */
|
||||
|
||||
/* BOOST_RE_OLD_IOSTREAM If the new iostreamm classes are not available */
|
||||
/* #define BOOST_RE_OLD_IOSTREAM */
|
||||
|
||||
/* BOOST_NO_STD_DISTANCE If there is no std::distance. */
|
||||
/* #define BOOST_NO_STD_DISTANCE */
|
||||
|
||||
/* BOOST_RE_NO_OI_ASSIGN If output iterators ostream_iterator<>, back_insert_iterator<> and
|
||||
front_insert_iterator<> do not have assignment operators */
|
||||
/* #define BOOST_RE_NO_OI_ASSIGN */
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
#ifndef BOOST_RE_NO_ITERATOR_H
|
||||
#include <iterator>
|
||||
#ifdef BOOST_RE_USE_ALGO
|
||||
#include <algo.h>
|
||||
#else
|
||||
#include <algorithm>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // BOOST_RE_AUTO_CONFIGURE
|
||||
|
||||
|
||||
#endif /* BOOST_RE_OPT_H */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
#define BOOST_REGEX_RAW_BUFFER_HPP
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/detail/regex_config.hpp>
|
||||
#include <boost/regex/config.hpp>
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
@ -105,7 +105,7 @@ class raw_storage
|
||||
{
|
||||
public:
|
||||
typedef Allocator allocator_type;
|
||||
typedef typename boost::re_detail::rebind_allocator<unsigned char, allocator_type>::type alloc_inst_type;
|
||||
typedef typename boost::detail::rebind_allocator<unsigned char, allocator_type>::type alloc_inst_type;
|
||||
typedef typename alloc_inst_type::size_type size_type;
|
||||
typedef typename alloc_inst_type::pointer pointer;
|
||||
private:
|
||||
@ -127,9 +127,9 @@ public:
|
||||
alloc_inst.deallocate(start, (alloc_inst.last - start));
|
||||
}
|
||||
|
||||
void BOOST_RE_CALL resize(size_type n);
|
||||
void BOOST_REGEX_CALL resize(size_type n);
|
||||
|
||||
void* BOOST_RE_CALL extend(size_type n)
|
||||
void* BOOST_REGEX_CALL extend(size_type n)
|
||||
{
|
||||
if(size_type(alloc_inst.last - end) < n)
|
||||
resize(n + (end - start));
|
||||
@ -138,44 +138,44 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
void* BOOST_RE_CALL insert(size_type pos, size_type n);
|
||||
void* BOOST_REGEX_CALL insert(size_type pos, size_type n);
|
||||
|
||||
size_type BOOST_RE_CALL size()
|
||||
size_type BOOST_REGEX_CALL size()
|
||||
{
|
||||
return end - start;
|
||||
}
|
||||
|
||||
size_type BOOST_RE_CALL capacity()
|
||||
size_type BOOST_REGEX_CALL capacity()
|
||||
{
|
||||
return alloc_inst.last - start;
|
||||
}
|
||||
|
||||
void* BOOST_RE_CALL data()const
|
||||
void* BOOST_REGEX_CALL data()const
|
||||
{
|
||||
return start;
|
||||
}
|
||||
|
||||
size_type BOOST_RE_CALL index(void* ptr)
|
||||
size_type BOOST_REGEX_CALL index(void* ptr)
|
||||
{
|
||||
return (unsigned char*)ptr - (unsigned char*)data();
|
||||
}
|
||||
|
||||
void BOOST_RE_CALL clear()
|
||||
void BOOST_REGEX_CALL clear()
|
||||
{
|
||||
end = start;
|
||||
}
|
||||
|
||||
void BOOST_RE_CALL align()
|
||||
void BOOST_REGEX_CALL align()
|
||||
{
|
||||
// move end up to a boundary:
|
||||
end = (unsigned char*)start + ((((unsigned char*)end - (unsigned char*)start) + padding_mask) & ~padding_mask);
|
||||
}
|
||||
|
||||
Allocator BOOST_RE_CALL allocator()const;
|
||||
Allocator BOOST_REGEX_CALL allocator()const;
|
||||
};
|
||||
|
||||
template <class Allocator>
|
||||
CONSTRUCTOR_INLINE raw_storage<Allocator>::raw_storage(const Allocator& a)
|
||||
raw_storage<Allocator>::raw_storage(const Allocator& a)
|
||||
: alloc_inst(a)
|
||||
{
|
||||
start = end = alloc_inst.allocate(1024);
|
||||
@ -183,7 +183,7 @@ CONSTRUCTOR_INLINE raw_storage<Allocator>::raw_storage(const Allocator& a)
|
||||
}
|
||||
|
||||
template <class Allocator>
|
||||
CONSTRUCTOR_INLINE raw_storage<Allocator>::raw_storage(size_type n, const Allocator& a)
|
||||
raw_storage<Allocator>::raw_storage(size_type n, const Allocator& a)
|
||||
: alloc_inst(a)
|
||||
{
|
||||
start = end = alloc_inst.allocate(n);
|
||||
@ -191,13 +191,13 @@ CONSTRUCTOR_INLINE raw_storage<Allocator>::raw_storage(size_type n, const Alloca
|
||||
}
|
||||
|
||||
template <class Allocator>
|
||||
Allocator BOOST_RE_CALL raw_storage<Allocator>::allocator()const
|
||||
Allocator BOOST_REGEX_CALL raw_storage<Allocator>::allocator()const
|
||||
{
|
||||
return alloc_inst;
|
||||
}
|
||||
|
||||
template <class Allocator>
|
||||
void BOOST_RE_CALL raw_storage<Allocator>::resize(size_type n)
|
||||
void BOOST_REGEX_CALL raw_storage<Allocator>::resize(size_type n)
|
||||
{
|
||||
register size_type newsize = (alloc_inst.last - start) * 2;
|
||||
register size_type datasize = end - start;
|
||||
@ -220,7 +220,7 @@ void BOOST_RE_CALL raw_storage<Allocator>::resize(size_type n)
|
||||
}
|
||||
|
||||
template <class Allocator>
|
||||
void* BOOST_RE_CALL raw_storage<Allocator>::insert(size_type pos, size_type n)
|
||||
void* BOOST_REGEX_CALL raw_storage<Allocator>::insert(size_type pos, size_type n)
|
||||
{
|
||||
jm_assert(pos <= size_type(end - start));
|
||||
if(size_type(alloc_inst.last - end) < n)
|
||||
|
@ -61,6 +61,10 @@ template <class OutputIterator, class charT, class Traits1, class Alloc1, class
|
||||
bool split_pred<OutputIterator, charT, Traits1, Alloc1, Alloc2>::operator()
|
||||
(const match_results<iterator_type, Alloc2>& what)
|
||||
{
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4800)
|
||||
#endif
|
||||
*p_last = what[0].second;
|
||||
if(what.size() > 1)
|
||||
{
|
||||
@ -86,6 +90,9 @@ bool split_pred<OutputIterator, charT, Traits1, Alloc1, Alloc2>::operator()
|
||||
//
|
||||
// initial null, do nothing:
|
||||
return true;
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace re_detail
|
||||
|
@ -26,7 +26,7 @@
|
||||
#define BOOST_REGEX_STACK_HPP
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/detail/regex_config.hpp>
|
||||
#include <boost/regex/config.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_RAW_BUFFER_HPP
|
||||
#include <boost/regex/detail/regex_raw_buffer.hpp>
|
||||
@ -44,12 +44,12 @@ namespace boost{
|
||||
// simplified stack optimised for push/peek/pop
|
||||
// operations, we could use std::stack<std::vector<T>> instead...
|
||||
//
|
||||
template <class T, class Allocator BOOST_RE_DEF_ALLOC_PARAM(T) >
|
||||
template <class T, class Allocator = BOOST_DEFAULT_ALLOCATOR(T) >
|
||||
class jstack
|
||||
{
|
||||
private:
|
||||
typedef typename boost::re_detail::rebind_allocator<unsigned char, Allocator>::type allocator_type;
|
||||
typedef typename boost::re_detail::rebind_allocator<T, Allocator>::type T_alloc_type;
|
||||
typedef typename boost::detail::rebind_allocator<unsigned char, Allocator>::type allocator_type;
|
||||
typedef typename boost::detail::rebind_allocator<T, Allocator>::type T_alloc_type;
|
||||
typedef typename T_alloc_type::size_type size_type;
|
||||
typedef T value_type;
|
||||
struct node
|
||||
@ -74,15 +74,15 @@ private:
|
||||
node base;
|
||||
size_type block_size;
|
||||
|
||||
void BOOST_RE_CALL pop_aux()const;
|
||||
void BOOST_RE_CALL push_aux();
|
||||
void BOOST_REGEX_CALL pop_aux()const;
|
||||
void BOOST_REGEX_CALL push_aux();
|
||||
|
||||
public:
|
||||
jstack(size_type n = 64, const Allocator& a = Allocator());
|
||||
|
||||
~jstack();
|
||||
|
||||
node* BOOST_RE_CALL get_node()
|
||||
node* BOOST_REGEX_CALL get_node()
|
||||
{
|
||||
node* new_stack = (node*)alloc_inst.allocate(sizeof(node) + sizeof(T) * block_size);
|
||||
new_stack->last = (T*)(new_stack+1);
|
||||
@ -91,53 +91,53 @@ public:
|
||||
return new_stack;
|
||||
}
|
||||
|
||||
bool BOOST_RE_CALL empty()
|
||||
bool BOOST_REGEX_CALL empty()
|
||||
{
|
||||
return (m_stack->start == m_stack->end) && (m_stack->next == 0);
|
||||
}
|
||||
|
||||
bool BOOST_RE_CALL good()
|
||||
bool BOOST_REGEX_CALL good()
|
||||
{
|
||||
return (m_stack->start != m_stack->end) || (m_stack->next != 0);
|
||||
}
|
||||
|
||||
T& BOOST_RE_CALL peek()
|
||||
T& BOOST_REGEX_CALL peek()
|
||||
{
|
||||
if(m_stack->start == m_stack->end)
|
||||
pop_aux();
|
||||
return *m_stack->end;
|
||||
}
|
||||
|
||||
const T& BOOST_RE_CALL peek()const
|
||||
const T& BOOST_REGEX_CALL peek()const
|
||||
{
|
||||
if(m_stack->start == m_stack->end)
|
||||
pop_aux();
|
||||
return *m_stack->end;
|
||||
}
|
||||
|
||||
void BOOST_RE_CALL pop()
|
||||
void BOOST_REGEX_CALL pop()
|
||||
{
|
||||
if(m_stack->start == m_stack->end)
|
||||
pop_aux();
|
||||
jm_destroy(m_stack->end);
|
||||
::boost::re_detail::destroy(m_stack->end);
|
||||
++(m_stack->end);
|
||||
}
|
||||
|
||||
void BOOST_RE_CALL pop(T& t)
|
||||
void BOOST_REGEX_CALL pop(T& t)
|
||||
{
|
||||
if(m_stack->start == m_stack->end)
|
||||
pop_aux();
|
||||
t = *m_stack->end;
|
||||
jm_destroy(m_stack->end);
|
||||
::boost::re_detail::destroy(m_stack->end);
|
||||
++(m_stack->end);
|
||||
}
|
||||
|
||||
void BOOST_RE_CALL push(const T& t)
|
||||
void BOOST_REGEX_CALL push(const T& t)
|
||||
{
|
||||
if(m_stack->end == m_stack->last)
|
||||
push_aux();
|
||||
--(m_stack->end);
|
||||
jm_construct(m_stack->end, t);
|
||||
construct(m_stack->end, t);
|
||||
}
|
||||
|
||||
};
|
||||
@ -155,7 +155,7 @@ jstack<T, Allocator>::jstack(size_type n, const Allocator& a)
|
||||
}
|
||||
|
||||
template <class T, class Allocator>
|
||||
void BOOST_RE_CALL jstack<T, Allocator>::push_aux()
|
||||
void BOOST_REGEX_CALL jstack<T, Allocator>::push_aux()
|
||||
{
|
||||
// make sure we have spare space on TOS:
|
||||
register node* new_node;
|
||||
@ -175,7 +175,7 @@ void BOOST_RE_CALL jstack<T, Allocator>::push_aux()
|
||||
}
|
||||
|
||||
template <class T, class Allocator>
|
||||
void BOOST_RE_CALL jstack<T, Allocator>::pop_aux()const
|
||||
void BOOST_REGEX_CALL jstack<T, Allocator>::pop_aux()const
|
||||
{
|
||||
// make sure that we have a valid item
|
||||
// on TOS:
|
||||
|
@ -26,20 +26,20 @@
|
||||
#define BOOST_REGEX_SYNCH_HPP
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/detail/regex_config.hpp>
|
||||
#include <boost/regex/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_RE_PLATFORM_W32) && defined(BOOST_RE_THREADS)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_RE_PLATFORM_W32) && defined(BOOST_RE_THREADS)
|
||||
#if defined(__BEOS__)
|
||||
#include <OS.h>
|
||||
#include <cassert>
|
||||
#else
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
#if defined(BOOST_HAS_THREADS)
|
||||
# if defined(BOOST_HAS_WINTHREADS)
|
||||
# include <windows.h>
|
||||
# elif defined(BOOST_HAS_BETHREADS)
|
||||
# include <OS.h>
|
||||
# include <cassert>
|
||||
# elif defined(BOOST_HAS_PTHREADS)
|
||||
# include <pthread.h>
|
||||
# else
|
||||
# error "Unknown threading API"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
@ -50,65 +50,66 @@ namespace boost{
|
||||
#pragma option push -a4 -b -Ve -pc
|
||||
#endif
|
||||
|
||||
void BOOST_RE_CALL re_init_threads();
|
||||
void BOOST_RE_CALL re_free_threads();
|
||||
void BOOST_REGEX_CALL re_init_threads();
|
||||
void BOOST_REGEX_CALL re_free_threads();
|
||||
|
||||
#ifdef BOOST_RE_THREADS
|
||||
#ifdef BOOST_HAS_THREADS
|
||||
|
||||
#ifndef BOOST_RE_PLATFORM_W32
|
||||
#ifdef __BEOS__
|
||||
# ifdef BOOST_HAS_BETHREADS
|
||||
|
||||
typedef sem_id CRITICAL_SECTION;
|
||||
|
||||
inline void BOOST_RE_CALL InitializeCriticalSection(CRITICAL_SECTION* ps)
|
||||
inline void BOOST_REGEX_CALL InitializeCriticalSection(CRITICAL_SECTION* ps)
|
||||
{
|
||||
*ps = create_sem(1, "regex++");
|
||||
assert(*ps > 0);
|
||||
}
|
||||
|
||||
inline void BOOST_RE_CALL DeleteCriticalSection(CRITICAL_SECTION* ps)
|
||||
inline void BOOST_REGEX_CALL DeleteCriticalSection(CRITICAL_SECTION* ps)
|
||||
{
|
||||
int t = delete_sem(*ps);
|
||||
assert(t == B_NO_ERROR);
|
||||
}
|
||||
|
||||
inline void BOOST_RE_CALL EnterCriticalSection(CRITICAL_SECTION* ps)
|
||||
inline void BOOST_REGEX_CALL EnterCriticalSection(CRITICAL_SECTION* ps)
|
||||
{
|
||||
status_t t = acquire_sem(*ps);
|
||||
assert(t == B_NO_ERROR);
|
||||
}
|
||||
|
||||
inline void BOOST_RE_CALL LeaveCriticalSection(CRITICAL_SECTION* ps)
|
||||
inline void BOOST_REGEX_CALL LeaveCriticalSection(CRITICAL_SECTION* ps)
|
||||
{
|
||||
status_t t = release_sem(*ps);
|
||||
assert(t == B_NO_ERROR);
|
||||
}
|
||||
|
||||
#else // __BEOS__
|
||||
# elif defined(BOOST_HAS_PTHREADS)
|
||||
|
||||
typedef pthread_mutex_t CRITICAL_SECTION;
|
||||
|
||||
inline void BOOST_RE_CALL InitializeCriticalSection(CRITICAL_SECTION* ps)
|
||||
inline void BOOST_REGEX_CALL InitializeCriticalSection(CRITICAL_SECTION* ps)
|
||||
{
|
||||
pthread_mutex_init(ps, 0);
|
||||
}
|
||||
|
||||
inline void BOOST_RE_CALL DeleteCriticalSection(CRITICAL_SECTION* ps)
|
||||
inline void BOOST_REGEX_CALL DeleteCriticalSection(CRITICAL_SECTION* ps)
|
||||
{
|
||||
pthread_mutex_destroy(ps);
|
||||
}
|
||||
|
||||
inline void BOOST_RE_CALL EnterCriticalSection(CRITICAL_SECTION* ps)
|
||||
inline void BOOST_REGEX_CALL EnterCriticalSection(CRITICAL_SECTION* ps)
|
||||
{
|
||||
pthread_mutex_lock(ps);
|
||||
}
|
||||
|
||||
inline void BOOST_RE_CALL LeaveCriticalSection(CRITICAL_SECTION* ps)
|
||||
inline void BOOST_REGEX_CALL LeaveCriticalSection(CRITICAL_SECTION* ps)
|
||||
{
|
||||
pthread_mutex_unlock(ps);
|
||||
}
|
||||
#endif // __BEOS__
|
||||
#endif
|
||||
|
||||
# elif !defined(BOOST_HAS_WINTHREADS)
|
||||
# error "Unknown threading API"
|
||||
# endif
|
||||
|
||||
template <class Lock>
|
||||
class lock_guard
|
||||
@ -121,7 +122,7 @@ public:
|
||||
~lock_guard()
|
||||
{ acquire(false); }
|
||||
|
||||
void BOOST_RE_CALL acquire(bool aq = true)
|
||||
void BOOST_REGEX_CALL acquire(bool aq = true)
|
||||
{
|
||||
if(aq && !owned)
|
||||
{
|
||||
@ -151,7 +152,7 @@ public:
|
||||
critical_section(const critical_section&)
|
||||
{ InitializeCriticalSection(&hmutex);}
|
||||
|
||||
const critical_section& BOOST_RE_CALL operator=(const critical_section&)
|
||||
const critical_section& BOOST_REGEX_CALL operator=(const critical_section&)
|
||||
{return *this;}
|
||||
|
||||
~critical_section()
|
||||
@ -159,7 +160,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
void BOOST_RE_CALL acquire(bool aq)
|
||||
void BOOST_REGEX_CALL acquire(bool aq)
|
||||
{ if(aq) EnterCriticalSection(&hmutex);
|
||||
else LeaveCriticalSection(&hmutex);
|
||||
}
|
||||
@ -173,20 +174,20 @@ public:
|
||||
friend class lock_guard<critical_section>;
|
||||
};
|
||||
|
||||
inline bool BOOST_RE_CALL operator==(const critical_section&, const critical_section&)
|
||||
inline bool BOOST_REGEX_CALL operator==(const critical_section&, const critical_section&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool BOOST_RE_CALL operator<(const critical_section&, const critical_section&)
|
||||
inline bool BOOST_REGEX_CALL operator<(const critical_section&, const critical_section&)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
typedef lock_guard<critical_section> cs_guard;
|
||||
|
||||
BOOST_RE_IX_DECL extern critical_section* p_re_lock;
|
||||
BOOST_RE_IX_DECL extern unsigned int re_lock_count;
|
||||
BOOST_REGEX_DECL extern critical_section* p_re_lock;
|
||||
BOOST_REGEX_DECL extern unsigned int re_lock_count;
|
||||
|
||||
#define BOOST_RE_GUARD(inst) boost::re_detail::critical_section::rw_guard g(inst);
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
#ifndef BOOST_RE_PAT_EXCEPT_HPP
|
||||
#define BOOST_RE_PAT_EXCEPT_HPP
|
||||
|
||||
#include <boost/regex/detail/regex_config.hpp>
|
||||
#include <boost/regex/config.hpp>
|
||||
|
||||
namespace boost{
|
||||
|
||||
@ -31,14 +31,14 @@ namespace boost{
|
||||
#pragma option push -a4 -b -Ve -pc
|
||||
#endif
|
||||
|
||||
class BOOST_RE_IX_DECL bad_pattern : public std::runtime_error
|
||||
class BOOST_REGEX_DECL bad_pattern : public std::runtime_error
|
||||
{
|
||||
public:
|
||||
explicit bad_pattern(const std::string& s) : std::runtime_error(s){};
|
||||
~bad_pattern() throw();
|
||||
};
|
||||
|
||||
class BOOST_RE_IX_DECL bad_expression : public bad_pattern
|
||||
class BOOST_REGEX_DECL bad_expression : public bad_pattern
|
||||
{
|
||||
public:
|
||||
explicit bad_expression(const std::string& s) : bad_pattern(s) {}
|
||||
|
@ -43,20 +43,20 @@ struct mss
|
||||
const char* what;
|
||||
};
|
||||
|
||||
BOOST_RE_IX_DECL bool BOOST_RE_CALL re_lookup_def_collate_name(std::string& buf, const char* name);
|
||||
BOOST_RE_IX_DECL unsigned int BOOST_RE_CALL re_get_default_message(char* buf, unsigned int len, unsigned int id);
|
||||
extern BOOST_RE_IX_DECL const char *re_default_error_messages[];
|
||||
BOOST_RE_IX_DECL bool BOOST_RE_CALL re_lookup_def_collate_name(std::string& buf, const char* name);
|
||||
BOOST_RE_IX_DECL bool BOOST_RE_CALL is_combining(wchar_t c);
|
||||
//extern BOOST_RE_IX_DECL const wchar_t combining_ranges[];
|
||||
BOOST_REGEX_DECL bool BOOST_REGEX_CALL re_lookup_def_collate_name(std::string& buf, const char* name);
|
||||
BOOST_REGEX_DECL unsigned int BOOST_REGEX_CALL re_get_default_message(char* buf, unsigned int len, unsigned int id);
|
||||
extern BOOST_REGEX_DECL const char *re_default_error_messages[];
|
||||
BOOST_REGEX_DECL bool BOOST_REGEX_CALL re_lookup_def_collate_name(std::string& buf, const char* name);
|
||||
BOOST_REGEX_DECL bool BOOST_REGEX_CALL is_combining(wchar_t c);
|
||||
//extern BOOST_REGEX_DECL const wchar_t combining_ranges[];
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
extern BOOST_RE_IX_DECL wchar_t wide_lower_case_map[];
|
||||
extern BOOST_RE_IX_DECL unsigned short wide_unicode_classes[];
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
extern BOOST_REGEX_DECL wchar_t wide_lower_case_map[];
|
||||
extern BOOST_REGEX_DECL unsigned short wide_unicode_classes[];
|
||||
#endif
|
||||
|
||||
|
||||
struct BOOST_RE_IX_DECL regex_traits_base
|
||||
struct BOOST_REGEX_DECL regex_traits_base
|
||||
{
|
||||
enum char_syntax_type
|
||||
{
|
||||
@ -121,7 +121,7 @@ struct BOOST_RE_IX_DECL regex_traits_base
|
||||
};
|
||||
};
|
||||
|
||||
struct BOOST_RE_IX_DECL c_traits_base : public regex_traits_base
|
||||
struct BOOST_REGEX_DECL c_traits_base : public regex_traits_base
|
||||
{
|
||||
public:
|
||||
enum{
|
||||
@ -143,7 +143,7 @@ public:
|
||||
char_class_print = char_class_alpha | char_class_digit | char_class_punct | char_class_underscore | char_class_blank,
|
||||
char_class_word = char_class_alpha | char_class_digit | char_class_underscore
|
||||
};
|
||||
static std::string BOOST_RE_CALL set_message_catalogue(const std::string& s);
|
||||
static std::string BOOST_REGEX_CALL set_message_catalogue(const std::string& s);
|
||||
protected:
|
||||
#if defined(__MWERKS__) && __MWERKS__ <= 0x6000
|
||||
friend class c_regex_traits<char>;
|
||||
@ -160,20 +160,20 @@ protected:
|
||||
static unsigned short class_map[map_size];
|
||||
static char lower_case_map[map_size];
|
||||
|
||||
static boost::uint_fast32_t BOOST_RE_CALL do_lookup_class(const char* p);
|
||||
static bool BOOST_RE_CALL do_lookup_collate(std::string& buf, const char* p);
|
||||
static void BOOST_RE_CALL do_update_ctype();
|
||||
static void BOOST_RE_CALL do_update_collate();
|
||||
static boost::uint_fast32_t BOOST_REGEX_CALL do_lookup_class(const char* p);
|
||||
static bool BOOST_REGEX_CALL do_lookup_collate(std::string& buf, const char* p);
|
||||
static void BOOST_REGEX_CALL do_update_ctype();
|
||||
static void BOOST_REGEX_CALL do_update_collate();
|
||||
public:
|
||||
static std::string BOOST_RE_CALL error_string(unsigned id);
|
||||
static char* BOOST_RE_CALL get_catalogue() { return regex_message_catalogue; }
|
||||
static std::string BOOST_REGEX_CALL error_string(unsigned id);
|
||||
static char* BOOST_REGEX_CALL get_catalogue() { return regex_message_catalogue; }
|
||||
};
|
||||
|
||||
} // namespace re_detail
|
||||
|
||||
|
||||
template<>
|
||||
class BOOST_RE_IX_DECL c_regex_traits<char> : public re_detail::c_traits_base
|
||||
class BOOST_REGEX_DECL c_regex_traits<char> : public re_detail::c_traits_base
|
||||
{
|
||||
typedef re_detail::c_traits_base base_type;
|
||||
public:
|
||||
@ -183,54 +183,54 @@ public:
|
||||
typedef std::string string_type;
|
||||
typedef int locale_type;
|
||||
|
||||
static std::size_t BOOST_RE_CALL length(const char_type* p)
|
||||
static std::size_t BOOST_REGEX_CALL length(const char_type* p)
|
||||
{
|
||||
return std::strlen(p);
|
||||
}
|
||||
static unsigned int BOOST_RE_CALL syntax_type(size_type c)
|
||||
static unsigned int BOOST_REGEX_CALL syntax_type(size_type c)
|
||||
{
|
||||
return syntax_map[c];
|
||||
}
|
||||
static char BOOST_RE_CALL translate(char c, bool icase)
|
||||
static char BOOST_REGEX_CALL translate(char c, bool icase)
|
||||
{
|
||||
return icase ? lower_case_map[(size_type)(uchar_type)c] : c;
|
||||
}
|
||||
static void BOOST_RE_CALL transform(std::string& out, const std::string& in);
|
||||
static void BOOST_REGEX_CALL transform(std::string& out, const std::string& in);
|
||||
|
||||
static void BOOST_RE_CALL transform_primary(std::string& out, const std::string& in);
|
||||
static void BOOST_REGEX_CALL transform_primary(std::string& out, const std::string& in);
|
||||
|
||||
static bool BOOST_RE_CALL is_separator(char c)
|
||||
static bool BOOST_REGEX_CALL is_separator(char c)
|
||||
{
|
||||
return BOOST_RE_MAKE_BOOL((c == '\n') || (c == '\r'));
|
||||
return BOOST_REGEX_MAKE_BOOL((c == '\n') || (c == '\r'));
|
||||
}
|
||||
|
||||
static bool BOOST_RE_CALL is_combining(char)
|
||||
static bool BOOST_REGEX_CALL is_combining(char)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool BOOST_RE_CALL is_class(char c, boost::uint_fast32_t f)
|
||||
static bool BOOST_REGEX_CALL is_class(char c, boost::uint_fast32_t f)
|
||||
{
|
||||
return BOOST_RE_MAKE_BOOL(class_map[(size_type)(uchar_type)c] & f);
|
||||
return BOOST_REGEX_MAKE_BOOL(class_map[(size_type)(uchar_type)c] & f);
|
||||
}
|
||||
|
||||
static int BOOST_RE_CALL toi(char c);
|
||||
static int BOOST_RE_CALL toi(const char*& first, const char* last, int radix);
|
||||
static int BOOST_REGEX_CALL toi(char c);
|
||||
static int BOOST_REGEX_CALL toi(const char*& first, const char* last, int radix);
|
||||
|
||||
static boost::uint_fast32_t BOOST_RE_CALL lookup_classname(const char* first, const char* last)
|
||||
static boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const char* first, const char* last)
|
||||
{
|
||||
std::string s(first, last);
|
||||
return do_lookup_class(s.c_str());
|
||||
}
|
||||
|
||||
static bool BOOST_RE_CALL lookup_collatename(std::string& buf, const char* first, const char* last)
|
||||
static bool BOOST_REGEX_CALL lookup_collatename(std::string& buf, const char* first, const char* last)
|
||||
{
|
||||
std::string s(first, last);
|
||||
return do_lookup_collate(buf, s.c_str());
|
||||
}
|
||||
|
||||
static locale_type BOOST_RE_CALL imbue(locale_type l){ return l; }
|
||||
locale_type BOOST_RE_CALL getloc()const{ return locale_type(); }
|
||||
static locale_type BOOST_REGEX_CALL imbue(locale_type l){ return l; }
|
||||
locale_type BOOST_REGEX_CALL getloc()const{ return locale_type(); }
|
||||
|
||||
c_regex_traits()
|
||||
{
|
||||
@ -246,19 +246,19 @@ public:
|
||||
{ c_regex_traits<char>::update(); }
|
||||
operator void*() { return this; }
|
||||
};
|
||||
static void BOOST_RE_CALL update();
|
||||
static void BOOST_REGEX_CALL update();
|
||||
private:
|
||||
static void BOOST_RE_CALL init();
|
||||
static void BOOST_RE_CALL free();
|
||||
static void BOOST_REGEX_CALL init();
|
||||
static void BOOST_REGEX_CALL free();
|
||||
static c_regex_traits<char> i;
|
||||
|
||||
static unsigned sort_type;
|
||||
static char sort_delim;
|
||||
};
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
template<>
|
||||
class BOOST_RE_IX_DECL c_regex_traits<wchar_t> : public re_detail::c_traits_base
|
||||
class BOOST_REGEX_DECL c_regex_traits<wchar_t> : public re_detail::c_traits_base
|
||||
{
|
||||
typedef re_detail::c_traits_base base_type;
|
||||
public:
|
||||
@ -267,42 +267,42 @@ public:
|
||||
typedef unsigned int size_type;
|
||||
typedef std::basic_string<wchar_t> string_type;
|
||||
typedef int locale_type;
|
||||
static std::size_t BOOST_RE_CALL length(const char_type* p)
|
||||
static std::size_t BOOST_REGEX_CALL length(const char_type* p)
|
||||
{
|
||||
return std::wcslen(p);
|
||||
}
|
||||
static unsigned int BOOST_RE_CALL syntax_type(size_type c);
|
||||
static wchar_t BOOST_RE_CALL translate(wchar_t c, bool icase)
|
||||
static unsigned int BOOST_REGEX_CALL syntax_type(size_type c);
|
||||
static wchar_t BOOST_REGEX_CALL translate(wchar_t c, bool icase)
|
||||
{
|
||||
return icase ? ((c < 256) ? re_detail::wide_lower_case_map[(uchar_type)c] : std::towlower(c)) : c;
|
||||
}
|
||||
|
||||
static void BOOST_RE_CALL transform(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
|
||||
static void BOOST_REGEX_CALL transform(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
|
||||
|
||||
static void BOOST_RE_CALL transform_primary(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
|
||||
static void BOOST_REGEX_CALL transform_primary(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
|
||||
|
||||
static bool BOOST_RE_CALL is_separator(wchar_t c)
|
||||
static bool BOOST_REGEX_CALL is_separator(wchar_t c)
|
||||
{
|
||||
return BOOST_RE_MAKE_BOOL((c == L'\n') || (c == L'\r') || (c == (wchar_t)0x2028) || (c == (wchar_t)0x2029));
|
||||
return BOOST_REGEX_MAKE_BOOL((c == L'\n') || (c == L'\r') || (c == (wchar_t)0x2028) || (c == (wchar_t)0x2029));
|
||||
}
|
||||
|
||||
static bool BOOST_RE_CALL is_combining(wchar_t c)
|
||||
static bool BOOST_REGEX_CALL is_combining(wchar_t c)
|
||||
{ return re_detail::is_combining(c); }
|
||||
|
||||
static bool BOOST_RE_CALL is_class(wchar_t c, boost::uint_fast32_t f)
|
||||
static bool BOOST_REGEX_CALL is_class(wchar_t c, boost::uint_fast32_t f)
|
||||
{
|
||||
return BOOST_RE_MAKE_BOOL(((uchar_type)c < 256) ? (re_detail::wide_unicode_classes[(size_type)(uchar_type)c] & f) : do_iswclass(c, f));
|
||||
return BOOST_REGEX_MAKE_BOOL(((uchar_type)c < 256) ? (re_detail::wide_unicode_classes[(size_type)(uchar_type)c] & f) : do_iswclass(c, f));
|
||||
}
|
||||
|
||||
static int BOOST_RE_CALL toi(wchar_t c);
|
||||
static int BOOST_RE_CALL toi(const wchar_t*& first, const wchar_t* last, int radix);
|
||||
static int BOOST_REGEX_CALL toi(wchar_t c);
|
||||
static int BOOST_REGEX_CALL toi(const wchar_t*& first, const wchar_t* last, int radix);
|
||||
|
||||
static boost::uint_fast32_t BOOST_RE_CALL lookup_classname(const wchar_t* first, const wchar_t* last);
|
||||
static boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const wchar_t* first, const wchar_t* last);
|
||||
|
||||
static bool BOOST_RE_CALL lookup_collatename(std::basic_string<wchar_t>& s, const wchar_t* first, const wchar_t* last);
|
||||
static bool BOOST_REGEX_CALL lookup_collatename(std::basic_string<wchar_t>& s, const wchar_t* first, const wchar_t* last);
|
||||
|
||||
static locale_type BOOST_RE_CALL imbue(locale_type l){ return l; }
|
||||
locale_type BOOST_RE_CALL getloc()const{ return locale_type(); }
|
||||
static locale_type BOOST_REGEX_CALL imbue(locale_type l){ return l; }
|
||||
locale_type BOOST_REGEX_CALL getloc()const{ return locale_type(); }
|
||||
c_regex_traits<wchar_t>()
|
||||
{ init(); }
|
||||
~c_regex_traits<wchar_t>()
|
||||
@ -313,14 +313,14 @@ public:
|
||||
{ c_regex_traits<wchar_t>::update(); }
|
||||
operator void*() { return this; }
|
||||
};
|
||||
static void BOOST_RE_CALL update();
|
||||
static unsigned int BOOST_RE_CALL strnarrow(char *s1, unsigned int len, const wchar_t *s2);
|
||||
static unsigned int BOOST_RE_CALL strwiden(wchar_t *s1, unsigned int len, const char *s2);
|
||||
static void BOOST_REGEX_CALL update();
|
||||
static unsigned int BOOST_REGEX_CALL strnarrow(char *s1, unsigned int len, const wchar_t *s2);
|
||||
static unsigned int BOOST_REGEX_CALL strwiden(wchar_t *s1, unsigned int len, const char *s2);
|
||||
private:
|
||||
static bool BOOST_RE_CALL do_iswclass(wchar_t c, boost::uint_fast32_t f);
|
||||
static void BOOST_RE_CALL free();
|
||||
static void BOOST_RE_CALL init();
|
||||
static bool BOOST_RE_CALL do_lookup_collate(std::basic_string<wchar_t>& out, const wchar_t* first, const wchar_t* last);
|
||||
static bool BOOST_REGEX_CALL do_iswclass(wchar_t c, boost::uint_fast32_t f);
|
||||
static void BOOST_REGEX_CALL free();
|
||||
static void BOOST_REGEX_CALL init();
|
||||
static bool BOOST_REGEX_CALL do_lookup_collate(std::basic_string<wchar_t>& out, const wchar_t* first, const wchar_t* last);
|
||||
static c_regex_traits<wchar_t> init_;
|
||||
|
||||
static unsigned sort_type;
|
||||
@ -328,11 +328,11 @@ private:
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && !defined(BOOST_RE_NO_W32)
|
||||
#if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32)
|
||||
|
||||
namespace re_detail{
|
||||
|
||||
struct BOOST_RE_IX_DECL w32_traits_base : public regex_traits_base
|
||||
struct BOOST_REGEX_DECL w32_traits_base : public regex_traits_base
|
||||
{
|
||||
enum{
|
||||
char_class_none = 0,
|
||||
@ -354,7 +354,7 @@ struct BOOST_RE_IX_DECL w32_traits_base : public regex_traits_base
|
||||
char_class_win = C1_ALPHA | C1_CNTRL | C1_UPPER | C1_LOWER | C1_DIGIT | C1_PUNCT | C1_BLANK | C1_SPACE | C1_XDIGIT | C1_BLANK
|
||||
};
|
||||
public:
|
||||
static std::string BOOST_RE_CALL set_message_catalogue(const std::string& s);
|
||||
static std::string BOOST_REGEX_CALL set_message_catalogue(const std::string& s);
|
||||
protected:
|
||||
static char regex_message_catalogue[200];
|
||||
enum syntax_map_size
|
||||
@ -366,13 +366,13 @@ protected:
|
||||
static unsigned short class_map[map_size];
|
||||
static char lower_case_map[map_size];
|
||||
|
||||
static boost::uint_fast32_t BOOST_RE_CALL do_lookup_class(const char* p);
|
||||
static bool BOOST_RE_CALL do_lookup_collate(std::string& buf, const char* p);
|
||||
static void BOOST_RE_CALL do_free();
|
||||
static void BOOST_RE_CALL do_init();
|
||||
static boost::uint_fast32_t BOOST_REGEX_CALL do_lookup_class(const char* p);
|
||||
static bool BOOST_REGEX_CALL do_lookup_collate(std::string& buf, const char* p);
|
||||
static void BOOST_REGEX_CALL do_free();
|
||||
static void BOOST_REGEX_CALL do_init();
|
||||
public:
|
||||
static std::string BOOST_RE_CALL error_string(unsigned id);
|
||||
static char* BOOST_RE_CALL get_catalogue() { return regex_message_catalogue; }
|
||||
static std::string BOOST_REGEX_CALL error_string(unsigned id);
|
||||
static char* BOOST_REGEX_CALL get_catalogue() { return regex_message_catalogue; }
|
||||
};
|
||||
|
||||
} // namespace re_detail
|
||||
@ -381,7 +381,7 @@ template<class charT>
|
||||
class w32_regex_traits;
|
||||
|
||||
template<>
|
||||
class BOOST_RE_IX_DECL w32_regex_traits<char> : public re_detail::w32_traits_base
|
||||
class BOOST_REGEX_DECL w32_regex_traits<char> : public re_detail::w32_traits_base
|
||||
{
|
||||
typedef re_detail::w32_traits_base base_type;
|
||||
public:
|
||||
@ -391,54 +391,54 @@ public:
|
||||
typedef std::string string_type;
|
||||
typedef int locale_type;
|
||||
|
||||
static std::size_t BOOST_RE_CALL length(const char_type* p)
|
||||
static std::size_t BOOST_REGEX_CALL length(const char_type* p)
|
||||
{
|
||||
return std::strlen(p);
|
||||
}
|
||||
static unsigned int BOOST_RE_CALL syntax_type(size_type c)
|
||||
static unsigned int BOOST_REGEX_CALL syntax_type(size_type c)
|
||||
{
|
||||
return syntax_map[c];
|
||||
}
|
||||
static char BOOST_RE_CALL translate(char c, bool icase)
|
||||
static char BOOST_REGEX_CALL translate(char c, bool icase)
|
||||
{
|
||||
return icase ? lower_case_map[(size_type)(uchar_type)c] : c;
|
||||
}
|
||||
static void BOOST_RE_CALL transform(std::string& out, const std::string& in);
|
||||
static void BOOST_REGEX_CALL transform(std::string& out, const std::string& in);
|
||||
|
||||
static void BOOST_RE_CALL transform_primary(std::string& out, const std::string& in);
|
||||
static void BOOST_REGEX_CALL transform_primary(std::string& out, const std::string& in);
|
||||
|
||||
static bool BOOST_RE_CALL is_separator(char c)
|
||||
static bool BOOST_REGEX_CALL is_separator(char c)
|
||||
{
|
||||
return BOOST_RE_MAKE_BOOL((c == '\n') || (c == '\r'));
|
||||
return BOOST_REGEX_MAKE_BOOL((c == '\n') || (c == '\r'));
|
||||
}
|
||||
|
||||
static bool BOOST_RE_CALL is_combining(char)
|
||||
static bool BOOST_REGEX_CALL is_combining(char)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool BOOST_RE_CALL is_class(char c, boost::uint_fast32_t f)
|
||||
static bool BOOST_REGEX_CALL is_class(char c, boost::uint_fast32_t f)
|
||||
{
|
||||
return BOOST_RE_MAKE_BOOL(class_map[(size_type)(uchar_type)c] & f);
|
||||
return BOOST_REGEX_MAKE_BOOL(class_map[(size_type)(uchar_type)c] & f);
|
||||
}
|
||||
|
||||
static int BOOST_RE_CALL toi(char c);
|
||||
static int BOOST_RE_CALL toi(const char*& first, const char* last, int radix);
|
||||
static int BOOST_REGEX_CALL toi(char c);
|
||||
static int BOOST_REGEX_CALL toi(const char*& first, const char* last, int radix);
|
||||
|
||||
static boost::uint_fast32_t BOOST_RE_CALL lookup_classname(const char* first, const char* last)
|
||||
static boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const char* first, const char* last)
|
||||
{
|
||||
std::string s(first, last);
|
||||
return do_lookup_class(s.c_str());
|
||||
}
|
||||
|
||||
static bool BOOST_RE_CALL lookup_collatename(std::string& buf, const char* first, const char* last)
|
||||
static bool BOOST_REGEX_CALL lookup_collatename(std::string& buf, const char* first, const char* last)
|
||||
{
|
||||
std::string s(first, last);
|
||||
return do_lookup_collate(buf, s.c_str());
|
||||
}
|
||||
|
||||
static locale_type BOOST_RE_CALL imbue(locale_type l){ return l; }
|
||||
locale_type BOOST_RE_CALL getloc()const{ return locale_type(); }
|
||||
static locale_type BOOST_REGEX_CALL imbue(locale_type l){ return l; }
|
||||
locale_type BOOST_REGEX_CALL getloc()const{ return locale_type(); }
|
||||
|
||||
struct sentry
|
||||
{
|
||||
@ -447,16 +447,16 @@ public:
|
||||
~sentry(){}
|
||||
operator void*() { return this; }
|
||||
};
|
||||
static void BOOST_RE_CALL update();
|
||||
static void BOOST_REGEX_CALL update();
|
||||
w32_regex_traits();
|
||||
~w32_regex_traits();
|
||||
private:
|
||||
static w32_regex_traits<char> i;
|
||||
};
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
template<>
|
||||
class BOOST_RE_IX_DECL w32_regex_traits<wchar_t> : public re_detail::w32_traits_base
|
||||
class BOOST_REGEX_DECL w32_regex_traits<wchar_t> : public re_detail::w32_traits_base
|
||||
{
|
||||
typedef re_detail::w32_traits_base base_type;
|
||||
public:
|
||||
@ -465,42 +465,42 @@ public:
|
||||
typedef unsigned int size_type;
|
||||
typedef std::basic_string<wchar_t> string_type;
|
||||
typedef int locale_type;
|
||||
static std::size_t BOOST_RE_CALL length(const char_type* p)
|
||||
static std::size_t BOOST_REGEX_CALL length(const char_type* p)
|
||||
{
|
||||
return std::wcslen(p);
|
||||
}
|
||||
static unsigned int BOOST_RE_CALL syntax_type(size_type c);
|
||||
static wchar_t BOOST_RE_CALL translate(wchar_t c, bool icase)
|
||||
static unsigned int BOOST_REGEX_CALL syntax_type(size_type c);
|
||||
static wchar_t BOOST_REGEX_CALL translate(wchar_t c, bool icase)
|
||||
{
|
||||
return icase ? ((c < 256) ? re_detail::wide_lower_case_map[(uchar_type)c] : wtolower(c)) : c;
|
||||
}
|
||||
|
||||
static void BOOST_RE_CALL transform(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
|
||||
static void BOOST_REGEX_CALL transform(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
|
||||
|
||||
static void BOOST_RE_CALL transform_primary(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
|
||||
static void BOOST_REGEX_CALL transform_primary(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
|
||||
|
||||
static bool BOOST_RE_CALL is_separator(wchar_t c)
|
||||
static bool BOOST_REGEX_CALL is_separator(wchar_t c)
|
||||
{
|
||||
return BOOST_RE_MAKE_BOOL((c == L'\n') || (c == L'\r') || (c == (wchar_t)0x2028) || (c == (wchar_t)0x2029));
|
||||
return BOOST_REGEX_MAKE_BOOL((c == L'\n') || (c == L'\r') || (c == (wchar_t)0x2028) || (c == (wchar_t)0x2029));
|
||||
}
|
||||
|
||||
static bool BOOST_RE_CALL is_combining(wchar_t c)
|
||||
static bool BOOST_REGEX_CALL is_combining(wchar_t c)
|
||||
{ return re_detail::is_combining(c); }
|
||||
|
||||
static bool BOOST_RE_CALL is_class(wchar_t c, boost::uint_fast32_t f)
|
||||
static bool BOOST_REGEX_CALL is_class(wchar_t c, boost::uint_fast32_t f)
|
||||
{
|
||||
return BOOST_RE_MAKE_BOOL(((uchar_type)c < 256) ? (wide_unicode_classes[(size_type)(uchar_type)c] & f) : do_iswclass(c, f));
|
||||
return BOOST_REGEX_MAKE_BOOL(((uchar_type)c < 256) ? (wide_unicode_classes[(size_type)(uchar_type)c] & f) : do_iswclass(c, f));
|
||||
}
|
||||
|
||||
static int BOOST_RE_CALL toi(wchar_t c);
|
||||
static int BOOST_RE_CALL toi(const wchar_t*& first, const wchar_t* last, int radix);
|
||||
static int BOOST_REGEX_CALL toi(wchar_t c);
|
||||
static int BOOST_REGEX_CALL toi(const wchar_t*& first, const wchar_t* last, int radix);
|
||||
|
||||
static boost::uint_fast32_t BOOST_RE_CALL lookup_classname(const wchar_t* first, const wchar_t* last);
|
||||
static boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const wchar_t* first, const wchar_t* last);
|
||||
|
||||
static bool BOOST_RE_CALL lookup_collatename(std::basic_string<wchar_t>& s, const wchar_t* first, const wchar_t* last);
|
||||
static bool BOOST_REGEX_CALL lookup_collatename(std::basic_string<wchar_t>& s, const wchar_t* first, const wchar_t* last);
|
||||
|
||||
static locale_type BOOST_RE_CALL imbue(locale_type l){ return l; }
|
||||
locale_type BOOST_RE_CALL getloc()const{ return locale_type(); }
|
||||
static locale_type BOOST_REGEX_CALL imbue(locale_type l){ return l; }
|
||||
locale_type BOOST_REGEX_CALL getloc()const{ return locale_type(); }
|
||||
|
||||
struct sentry
|
||||
{
|
||||
@ -509,23 +509,23 @@ public:
|
||||
~sentry(){}
|
||||
operator void*() { return this; }
|
||||
};
|
||||
static void BOOST_RE_CALL update();
|
||||
static void BOOST_REGEX_CALL update();
|
||||
w32_regex_traits();
|
||||
~w32_regex_traits();
|
||||
static unsigned int BOOST_RE_CALL strnarrow(char *s1, unsigned int len, const wchar_t *s2);
|
||||
static unsigned int BOOST_RE_CALL strwiden(wchar_t *s1, unsigned int len, const char *s2);
|
||||
static unsigned int BOOST_REGEX_CALL strnarrow(char *s1, unsigned int len, const wchar_t *s2);
|
||||
static unsigned int BOOST_REGEX_CALL strwiden(wchar_t *s1, unsigned int len, const char *s2);
|
||||
|
||||
private:
|
||||
static bool BOOST_RE_CALL do_iswclass(wchar_t c, boost::uint_fast32_t f);
|
||||
static bool BOOST_RE_CALL do_lookup_collate(std::basic_string<wchar_t>& out, const wchar_t* first, const wchar_t* last);
|
||||
static bool BOOST_REGEX_CALL do_iswclass(wchar_t c, boost::uint_fast32_t f);
|
||||
static bool BOOST_REGEX_CALL do_lookup_collate(std::basic_string<wchar_t>& out, const wchar_t* first, const wchar_t* last);
|
||||
static w32_regex_traits<wchar_t> init_;
|
||||
static wchar_t BOOST_RE_CALL wtolower(wchar_t c);
|
||||
static wchar_t BOOST_REGEX_CALL wtolower(wchar_t c);
|
||||
static unsigned short wide_unicode_classes[];
|
||||
};
|
||||
#endif // Wide strings
|
||||
#endif // Win32
|
||||
|
||||
#ifndef BOOST_RE_NO_LOCALE_H
|
||||
#ifndef BOOST_NO_STD_LOCALE
|
||||
|
||||
} // namspace boost
|
||||
|
||||
@ -545,7 +545,7 @@ struct message_data<char>;
|
||||
template <>
|
||||
struct message_data<wchar_t>;
|
||||
|
||||
struct BOOST_RE_IX_DECL cpp_regex_traits_base : public regex_traits_base
|
||||
struct BOOST_REGEX_DECL cpp_regex_traits_base : public regex_traits_base
|
||||
{
|
||||
enum char_class_type
|
||||
{
|
||||
@ -571,7 +571,7 @@ struct BOOST_RE_IX_DECL cpp_regex_traits_base : public regex_traits_base
|
||||
| char_class_upper | char_class_xdigit
|
||||
};
|
||||
|
||||
static std::string BOOST_RE_CALL set_message_catalogue(const std::string& s);
|
||||
static std::string BOOST_REGEX_CALL set_message_catalogue(const std::string& s);
|
||||
protected:
|
||||
static char regex_message_cat[200];
|
||||
};
|
||||
@ -582,7 +582,7 @@ template <class charT>
|
||||
class cpp_regex_traits;
|
||||
|
||||
template<>
|
||||
class BOOST_RE_IX_DECL cpp_regex_traits<char> : public re_detail::cpp_regex_traits_base
|
||||
class BOOST_REGEX_DECL cpp_regex_traits<char> : public re_detail::cpp_regex_traits_base
|
||||
{
|
||||
typedef re_detail::cpp_regex_traits_base base_type;
|
||||
private:
|
||||
@ -608,36 +608,36 @@ public:
|
||||
cpp_regex_traits();
|
||||
~cpp_regex_traits();
|
||||
|
||||
static std::size_t BOOST_RE_CALL length(const char_type* p)
|
||||
static std::size_t BOOST_REGEX_CALL length(const char_type* p)
|
||||
{
|
||||
return std::strlen(p);
|
||||
}
|
||||
unsigned int BOOST_RE_CALL syntax_type(size_type c)const
|
||||
unsigned int BOOST_REGEX_CALL syntax_type(size_type c)const
|
||||
{
|
||||
return psyntax[c];
|
||||
}
|
||||
char BOOST_RE_CALL translate(char c, bool icase)const
|
||||
char BOOST_REGEX_CALL translate(char c, bool icase)const
|
||||
{
|
||||
return icase ? lower_map[(size_type)(uchar_type)c] : c;
|
||||
}
|
||||
void BOOST_RE_CALL transform(std::string& out, const std::string& in)const
|
||||
void BOOST_REGEX_CALL transform(std::string& out, const std::string& in)const
|
||||
{
|
||||
out = pcollate->transform(in.c_str(), in.c_str() + in.size()).c_str();
|
||||
}
|
||||
|
||||
void BOOST_RE_CALL transform_primary(std::string& out, const std::string& in)const;
|
||||
void BOOST_REGEX_CALL transform_primary(std::string& out, const std::string& in)const;
|
||||
|
||||
static bool BOOST_RE_CALL is_separator(char c)
|
||||
static bool BOOST_REGEX_CALL is_separator(char c)
|
||||
{
|
||||
return BOOST_RE_MAKE_BOOL((c == '\n') || (c == '\r'));
|
||||
return BOOST_REGEX_MAKE_BOOL((c == '\n') || (c == '\r'));
|
||||
}
|
||||
|
||||
static bool BOOST_RE_CALL is_combining(char)
|
||||
static bool BOOST_REGEX_CALL is_combining(char)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool BOOST_RE_CALL is_class(char c, boost::uint_fast32_t f)const
|
||||
bool BOOST_REGEX_CALL is_class(char c, boost::uint_fast32_t f)const
|
||||
{
|
||||
if(pctype->is((std::ctype<char>::mask)(f & char_class_all_base), c))
|
||||
return true;
|
||||
@ -648,15 +648,15 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
int BOOST_RE_CALL toi(char c)const;
|
||||
int BOOST_RE_CALL toi(const char*& first, const char* last, int radix)const;
|
||||
int BOOST_REGEX_CALL toi(char c)const;
|
||||
int BOOST_REGEX_CALL toi(const char*& first, const char* last, int radix)const;
|
||||
|
||||
boost::uint_fast32_t BOOST_RE_CALL lookup_classname(const char* first, const char* last)const;
|
||||
bool BOOST_RE_CALL lookup_collatename(std::string& s, const char* first, const char* last)const;
|
||||
boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const char* first, const char* last)const;
|
||||
bool BOOST_REGEX_CALL lookup_collatename(std::string& s, const char* first, const char* last)const;
|
||||
|
||||
std::string BOOST_RE_CALL error_string(unsigned id)const;
|
||||
locale_type BOOST_RE_CALL imbue(locale_type l);
|
||||
locale_type BOOST_RE_CALL BOOST_RE_CALL getloc()const{ return locale_inst; }
|
||||
std::string BOOST_REGEX_CALL error_string(unsigned id)const;
|
||||
locale_type BOOST_REGEX_CALL imbue(locale_type l);
|
||||
locale_type BOOST_REGEX_CALL getloc()const{ return locale_inst; }
|
||||
|
||||
struct sentry
|
||||
{
|
||||
@ -665,9 +665,9 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
template<>
|
||||
class BOOST_RE_IX_DECL cpp_regex_traits<wchar_t> : public re_detail::cpp_regex_traits_base
|
||||
class BOOST_REGEX_DECL cpp_regex_traits<wchar_t> : public re_detail::cpp_regex_traits_base
|
||||
{
|
||||
typedef re_detail::cpp_regex_traits_base base_type;
|
||||
public:
|
||||
@ -685,7 +685,7 @@ private:
|
||||
const std::collate<wchar_t>* pcollate;
|
||||
const std::codecvt<wchar_t, char, std::mbstate_t>* pcdv;
|
||||
std::locale locale_inst;
|
||||
unsigned int BOOST_RE_CALL do_syntax_type(size_type c)const;
|
||||
unsigned int BOOST_REGEX_CALL do_syntax_type(size_type c)const;
|
||||
unsigned sort_type;
|
||||
wchar_t sort_delim;
|
||||
|
||||
@ -694,34 +694,34 @@ private:
|
||||
|
||||
public:
|
||||
|
||||
static std::size_t BOOST_RE_CALL length(const char_type* p)
|
||||
static std::size_t BOOST_REGEX_CALL length(const char_type* p)
|
||||
{
|
||||
return std::wcslen(p);
|
||||
}
|
||||
unsigned int BOOST_RE_CALL syntax_type(size_type c)const
|
||||
unsigned int BOOST_REGEX_CALL syntax_type(size_type c)const
|
||||
{
|
||||
return (c < UCHAR_MAX) ? psyntax[c] : do_syntax_type(c);
|
||||
}
|
||||
wchar_t BOOST_RE_CALL translate(wchar_t c, bool icase)const
|
||||
wchar_t BOOST_REGEX_CALL translate(wchar_t c, bool icase)const
|
||||
{
|
||||
return icase ? (((uchar_type)c) <= UCHAR_MAX) ? lower_map[c] : pctype->tolower(c) : c;
|
||||
}
|
||||
void BOOST_RE_CALL transform(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in)const
|
||||
void BOOST_REGEX_CALL transform(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in)const
|
||||
{
|
||||
out = pcollate->transform(in.c_str(), in.c_str() + in.size());
|
||||
}
|
||||
|
||||
void BOOST_RE_CALL transform_primary(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in)const;
|
||||
void BOOST_REGEX_CALL transform_primary(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in)const;
|
||||
|
||||
static bool BOOST_RE_CALL is_separator(wchar_t c)
|
||||
static bool BOOST_REGEX_CALL is_separator(wchar_t c)
|
||||
{
|
||||
return BOOST_RE_MAKE_BOOL((c == L'\n') || (c == L'\r') || (c == (wchar_t)0x2028) || (c == (wchar_t)0x2029));
|
||||
return BOOST_REGEX_MAKE_BOOL((c == L'\n') || (c == L'\r') || (c == (wchar_t)0x2028) || (c == (wchar_t)0x2029));
|
||||
}
|
||||
|
||||
static bool BOOST_RE_CALL is_combining(wchar_t c)
|
||||
static bool BOOST_REGEX_CALL is_combining(wchar_t c)
|
||||
{ return re_detail::is_combining(c); }
|
||||
|
||||
bool BOOST_RE_CALL is_class(wchar_t c, boost::uint_fast32_t f)const
|
||||
bool BOOST_REGEX_CALL is_class(wchar_t c, boost::uint_fast32_t f)const
|
||||
{
|
||||
if(pctype->is((std::ctype<wchar_t>::mask)(f & char_class_all_base), c))
|
||||
return true;
|
||||
@ -734,18 +734,18 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
int BOOST_RE_CALL toi(wchar_t c)const;
|
||||
int BOOST_RE_CALL toi(const wchar_t*& first, const wchar_t* last, int radix)const;
|
||||
int BOOST_REGEX_CALL toi(wchar_t c)const;
|
||||
int BOOST_REGEX_CALL toi(const wchar_t*& first, const wchar_t* last, int radix)const;
|
||||
|
||||
boost::uint_fast32_t BOOST_RE_CALL lookup_classname(const wchar_t* first, const wchar_t* last)const;
|
||||
bool BOOST_RE_CALL lookup_collatename(std::basic_string<wchar_t>& s, const wchar_t* first, const wchar_t* last)const;
|
||||
boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const wchar_t* first, const wchar_t* last)const;
|
||||
bool BOOST_REGEX_CALL lookup_collatename(std::basic_string<wchar_t>& s, const wchar_t* first, const wchar_t* last)const;
|
||||
|
||||
std::string BOOST_RE_CALL error_string(unsigned id)const;
|
||||
std::string BOOST_REGEX_CALL error_string(unsigned id)const;
|
||||
cpp_regex_traits();
|
||||
~cpp_regex_traits();
|
||||
locale_type BOOST_RE_CALL imbue(locale_type l);
|
||||
locale_type BOOST_RE_CALL getloc()const{ return locale_inst; }
|
||||
unsigned int BOOST_RE_CALL strwiden(wchar_t *s1, unsigned int len, const char *s2)const;
|
||||
locale_type BOOST_REGEX_CALL imbue(locale_type l);
|
||||
locale_type BOOST_REGEX_CALL getloc()const{ return locale_inst; }
|
||||
unsigned int BOOST_REGEX_CALL strwiden(wchar_t *s1, unsigned int len, const char *s2)const;
|
||||
|
||||
struct sentry
|
||||
{
|
||||
@ -753,25 +753,25 @@ public:
|
||||
operator void*() { return this; }
|
||||
};
|
||||
};
|
||||
#endif // BOOST_RE_NO_WCSTRING
|
||||
#endif // BOOST_NO_WREGEX
|
||||
|
||||
#endif // BOOST_RE_NO_LOCALE_H
|
||||
#endif // BOOST_NO_STD_LOCALE
|
||||
|
||||
#ifdef BOOST_RE_LOCALE_W32
|
||||
#ifdef BOOST_REGEX_USE_WIN32_LOCALE
|
||||
|
||||
template <class charT>
|
||||
class regex_traits : public w32_regex_traits<charT>
|
||||
{
|
||||
};
|
||||
|
||||
#elif defined(BOOST_RE_LOCALE_C)
|
||||
#elif defined(BOOST_REGEX_USE_C_LOCALE)
|
||||
|
||||
template <class charT>
|
||||
class regex_traits : public c_regex_traits<charT>
|
||||
{
|
||||
};
|
||||
|
||||
#elif defined(BOOST_RE_LOCALE_CPP)
|
||||
#elif defined(BOOST_REGEX_USE_CPP_LOCALE)
|
||||
|
||||
template <class charT>
|
||||
class regex_traits : public cpp_regex_traits<charT>
|
||||
|
@ -20,20 +20,20 @@
|
||||
* DESCRIPTION: Includes all the regex source files, include this
|
||||
* file only if you need to build the regex library
|
||||
* as a single file. Before including this file you
|
||||
* must define BOOST_RE_NO_LIB, or include this file
|
||||
* must define BOOST_REGEX_NO_LIB, or include this file
|
||||
* before any other regex header.
|
||||
*/
|
||||
|
||||
#if !defined(BOOST_RE_NO_LIB) && defined(BOOST_REGEX_CONFIG_HPP)
|
||||
#error too late you have already included a regex header - try defining BOOST_RE_NO_LIB when you build
|
||||
#if !defined(BOOST_REGEX_NO_LIB) && defined(BOOST_REGEX_CONFIG_HPP)
|
||||
#error too late you have already included a regex header - try defining BOOST_REGEX_NO_LIB when you build
|
||||
#endif
|
||||
|
||||
//
|
||||
// include library source files:
|
||||
//
|
||||
#ifdef BOOST_RE_LOCALE_W32
|
||||
#ifdef BOOST_REGEX_USE_WIN32_LOCALE
|
||||
#include "libs/regex/src/w32_regex_traits.cpp"
|
||||
#elif defined(BOOST_RE_LOCALE_C)
|
||||
#elif defined(BOOST_REGEX_USE_C_LOCALE)
|
||||
#include "libs/regex/src/c_regex_traits.cpp"
|
||||
#else
|
||||
#include "libs/regex/src/cpp_regex_traits.cpp"
|
||||
|
28
include/boost/regex/user.hpp
Normal file
28
include/boost/regex/user.hpp
Normal file
@ -0,0 +1,28 @@
|
||||
|
||||
// define if you want the regex library to use the C locale
|
||||
// even on Win32:
|
||||
// #define BOOST_REGEX_USE_C_LOCALE
|
||||
|
||||
// define this is you want the regex library to use the C++
|
||||
// locale:
|
||||
// #define BOOST_REGEX_USE_CPP_LOCALE
|
||||
|
||||
|
||||
// define this if you want to statically link to regex,
|
||||
// even when the runtime is a dll (Probably Win32 specific):
|
||||
// #define BOOST_REGEX_STATIC_LINK
|
||||
|
||||
// define this if you don't want the lib to automatically
|
||||
// select its link libraries:
|
||||
// #define BOOST_REGEX_NO_LIB
|
||||
|
||||
// define this if templates with switch statements cause problems:
|
||||
// #define BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE
|
||||
|
||||
// define this to disable Win32 support when available:
|
||||
// #define BOOST_REGEX_NO_W32
|
||||
|
||||
// define this if bool is not a real type:
|
||||
// #define BOOST_REGEX_NO_BOOL
|
||||
|
||||
|
Reference in New Issue
Block a user