mirror of
https://github.com/boostorg/regex.git
synced 2025-07-15 05:16:37 +02:00
Compare commits
55 Commits
boost-1.39
...
sandbox-br
Author | SHA1 | Date | |
---|---|---|---|
a24e82f0fd | |||
3e62631ecb | |||
8586e7a9cd | |||
356be46981 | |||
15d3eb8f57 | |||
48492bb9b5 | |||
e85cef1120 | |||
fd77d00dfd | |||
d2be09791d | |||
840a4ce2f5 | |||
e4b31ea37f | |||
b4152cd74d | |||
c997a1fcc6 | |||
b650e44ff2 | |||
330f23e84c | |||
85192b703d | |||
fe24031566 | |||
0362d61627 | |||
a2eccc999c | |||
545993d3eb | |||
d70f98e658 | |||
18623d00af | |||
30074a601a | |||
4212c0d915 | |||
1297f92b8a | |||
cb5443477b | |||
1012d28c32 | |||
3a15c301db | |||
546dd9f6fb | |||
be28ad44c7 | |||
6eb35e2cf1 | |||
831156d759 | |||
d7d38da27f | |||
31b68369ae | |||
4c105a90a1 | |||
8928c7737e | |||
3704b9c595 | |||
5fdf2752ae | |||
c7dda1b549 | |||
6e9b9a7995 | |||
e5bc36d7c9 | |||
c9d1a42e05 | |||
e32c5d0888 | |||
370c429bd6 | |||
0915f19c03 | |||
37040f4bfd | |||
2cbd1c8882 | |||
37cd93fc82 | |||
b1af72fd23 | |||
299086b99c | |||
07eaac9e0e | |||
71fdd5eb44 | |||
31668ed4be | |||
f72c7518be | |||
2995393609 |
@ -10,13 +10,10 @@ project boost/regex
|
||||
#
|
||||
# ICU configuration:
|
||||
#
|
||||
if [ modules.peek : ICU_PATH ]
|
||||
{
|
||||
ICU_PATH = [ modules.peek : ICU_PATH ] ;
|
||||
}
|
||||
|
||||
local ICU_PATH = [ modules.peek : ICU_PATH ] ;
|
||||
rule check-icu-config ( )
|
||||
{
|
||||
local ICU_PATH = [ modules.peek : ICU_PATH ] ;
|
||||
local HAVE_ICU = [ modules.peek : HAVE_ICU ] ;
|
||||
local ICU_LINK = [ modules.peek : ICU_LINK ] ;
|
||||
|
||||
@ -62,8 +59,8 @@ rule check-icu-config ( )
|
||||
}
|
||||
else
|
||||
{
|
||||
ECHO warning: ICU shared common library not found in path. ;
|
||||
ECHO hint: If the regex library fails to link then try again ;
|
||||
ECHO WARNING: ICU shared common library not found in path. ;
|
||||
ECHO HINT: If the regex library fails to link then try again ;
|
||||
ECHO with the environment variable ICU_LINK set to contain ;
|
||||
ECHO the linker options required to link to ICU. ;
|
||||
ECHO Defaulting to look for libicuuc ... ;
|
||||
@ -94,8 +91,8 @@ rule check-icu-config ( )
|
||||
}
|
||||
else
|
||||
{
|
||||
ECHO warning: ICU shared i18n library not found in path. ;
|
||||
ECHO hint: If the regex library fails to link then try again ;
|
||||
ECHO WARNING: ICU shared i18n library not found in path. ;
|
||||
ECHO HINT: If the regex library fails to link then try again ;
|
||||
ECHO with the environment variable ICU_LINK set to contain ;
|
||||
ECHO the linker options required to link to ICU. ;
|
||||
ECHO Defaulting to look for libicui18n ... ;
|
||||
@ -130,15 +127,15 @@ rule check-icu-config ( )
|
||||
echo $(os) ;
|
||||
if $(os) != "DARWIN"
|
||||
{
|
||||
ECHO warning: ICU shared data library not found in path. ;
|
||||
ECHO hint: If the regex library fails to link then try again ;
|
||||
ECHO WARNING: ICU shared data library not found in path. ;
|
||||
ECHO HINT: If the regex library fails to link then try again ;
|
||||
ECHO with the environment variable ICU_LINK set to contain ;
|
||||
ECHO the linker options required to link to ICU. ;
|
||||
}
|
||||
else
|
||||
{
|
||||
ECHO warning: ICU shared data library not found in path. ;
|
||||
ECHO hint: If the regex library fails to link then try again ;
|
||||
ECHO WARNING: ICU shared data library not found in path. ;
|
||||
ECHO HINT: If the regex library fails to link then try again ;
|
||||
ECHO with the environment variable ICU_LINK set to contain ;
|
||||
ECHO the linker options required to link to ICU. ;
|
||||
ECHO Defaulting to look for libicudata ... ;
|
||||
@ -163,14 +160,14 @@ rule check-icu-config ( )
|
||||
else
|
||||
{
|
||||
message icu_config
|
||||
: "warning: Building Boost.Regex with the optional Unicode/ICU support disabled."
|
||||
: "note: Please refer to the Boost.Regex documentation for more information"
|
||||
: "note: this is a strictly optional feature." ;
|
||||
: "Building Boost.Regex with the optional Unicode/ICU support disabled."
|
||||
: "Note: Please refer to the Boost.Regex documentation for more information"
|
||||
: "Note: this is a strictly optional feature." ;
|
||||
|
||||
if $(ICU_PATH)
|
||||
{
|
||||
message icu_config2
|
||||
: warning! ICU configuration failed
|
||||
: WARNING! ICU configuration failed
|
||||
: " Couldn't find utypes.h in " $(ICU_PATH:J=" ")/include/unicode ;
|
||||
}
|
||||
else
|
||||
|
@ -311,12 +311,12 @@ inline u32regex do_make_u32regex(InputIterator i,
|
||||
boost::regex_constants::syntax_option_type opt,
|
||||
const boost::mpl::int_<4>*)
|
||||
{
|
||||
typedef std::vector<UCHAR32> vector_type;
|
||||
typedef std::vector<UChar32> vector_type;
|
||||
vector_type v;
|
||||
while(i != j)
|
||||
{
|
||||
v.push_back((UCHAR32)(*i));
|
||||
++a;
|
||||
v.push_back((UChar32)(*i));
|
||||
++i;
|
||||
}
|
||||
if(v.size())
|
||||
return u32regex(&*v.begin(), v.size(), opt);
|
||||
|
@ -375,8 +375,13 @@ bool basic_regex_parser<charT, traits>::parse_open_paren()
|
||||
if(0 == (this->flags() & regbase::nosubs))
|
||||
{
|
||||
markid = ++m_mark_count;
|
||||
#ifndef BOOST_NO_STD_DISTANCE
|
||||
if(this->flags() & regbase::save_subexpression_location)
|
||||
this->m_pdata->m_subs.push_back(std::pair<std::size_t, std::size_t>(std::distance(m_base, m_position) - 1, 0));
|
||||
#else
|
||||
if(this->flags() & regbase::save_subexpression_location)
|
||||
this->m_pdata->m_subs.push_back(std::pair<std::size_t, std::size_t>((m_position - m_base) - 1, 0));
|
||||
#endif
|
||||
}
|
||||
re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_startmark, sizeof(re_brace)));
|
||||
pb->index = markid;
|
||||
@ -424,8 +429,13 @@ bool basic_regex_parser<charT, traits>::parse_open_paren()
|
||||
return false;
|
||||
}
|
||||
BOOST_ASSERT(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_mark);
|
||||
#ifndef BOOST_NO_STD_DISTANCE
|
||||
if(markid && (this->flags() & regbase::save_subexpression_location))
|
||||
this->m_pdata->m_subs.at(markid - 1).second = std::distance(m_base, m_position);
|
||||
#else
|
||||
if(markid && (this->flags() & regbase::save_subexpression_location))
|
||||
this->m_pdata->m_subs.at(markid - 1).second = (m_position - m_base);
|
||||
#endif
|
||||
++m_position;
|
||||
//
|
||||
// append closing parenthesis state:
|
||||
|
@ -31,10 +31,14 @@ namespace detail{
|
||||
template <class I>
|
||||
struct is_random_imp
|
||||
{
|
||||
#ifndef BOOST_NO_STD_ITERATOR_TRAITS
|
||||
private:
|
||||
typedef typename std::iterator_traits<I>::iterator_category cat;
|
||||
public:
|
||||
BOOST_STATIC_CONSTANT(bool, value = (::boost::is_convertible<cat*, std::random_access_iterator_tag*>::value));
|
||||
#else
|
||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||
#endif
|
||||
};
|
||||
|
||||
template <class I>
|
||||
|
@ -403,6 +403,10 @@ private:
|
||||
bool match_char_repeat();
|
||||
bool match_dot_repeat_fast();
|
||||
bool match_dot_repeat_slow();
|
||||
bool match_dot_repeat_dispatch()
|
||||
{
|
||||
return ::boost::is_random_access_iterator<BidiIterator>::value ? match_dot_repeat_fast() : match_dot_repeat_slow();
|
||||
}
|
||||
bool match_backstep();
|
||||
bool match_assert_backref();
|
||||
bool match_toggle_case();
|
||||
|
@ -154,7 +154,11 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_all_states()
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_combining,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_soft_buffer_end,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_restart_continue,
|
||||
(::boost::is_random_access_iterator<BidiIterator>::value ? &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_fast : &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_slow),
|
||||
// Although this next line *should* be evaluated at compile time, in practice
|
||||
// some compilers (VC++) emit run-time initialisation which breaks thread
|
||||
// safety, so use a dispatch function instead:
|
||||
//(::boost::is_random_access_iterator<BidiIterator>::value ? &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_fast : &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_slow),
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_dispatch,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_char_repeat,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_set_repeat,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat,
|
||||
|
@ -84,7 +84,11 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_all_states()
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_combining,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_soft_buffer_end,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_restart_continue,
|
||||
(::boost::is_random_access_iterator<BidiIterator>::value ? &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_fast : &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_slow),
|
||||
// Although this next line *should* be evaluated at compile time, in practice
|
||||
// some compilers (VC++) emit run-time initialisation which breaks thread
|
||||
// safety, so use a dispatch function instead:
|
||||
//(::boost::is_random_access_iterator<BidiIterator>::value ? &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_fast : &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_slow),
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_dispatch,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_char_repeat,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_set_repeat,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat,
|
||||
|
Reference in New Issue
Block a user