Compare commits

..

55 Commits

Author SHA1 Message Date
a24e82f0fd Redo py3k branching from trunk again
[SVN r52115]
2009-04-01 16:55:33 +00:00
3e62631ecb Windows CE does not define the wcscoll function from the CRT so, for WinCE, don't try to pull wcscoll from the global namespace into the std namespace.
[SVN r52106]
2009-04-01 14:56:27 +00:00
8586e7a9cd Patch for ICU on AIX.
[SVN r51952]
2009-03-24 10:08:54 +00:00
356be46981 Add PDF generation options to fix external links to point to the web site.
Added a few more Boostbook based libs that were missed first time around.
Fixed PDF naming issues.

[SVN r51284]
2009-02-17 10:05:58 +00:00
15d3eb8f57 Workarounds to allow compilation by Sun studio without the -library=stlport4 option.
[SVN r51221]
2009-02-12 18:11:43 +00:00
48492bb9b5 Fixes #2713: change table initialisation so that it's initialised statically.
[SVN r51103]
2009-02-08 16:30:45 +00:00
e85cef1120 Fixes #2437.
[SVN r50510]
2009-01-08 09:58:45 +00:00
fd77d00dfd Update version number
[SVN r50498]
2009-01-07 12:29:03 +00:00
d2be09791d Fixes #2623.
[SVN r50422]
2009-01-01 10:23:10 +00:00
840a4ce2f5 Fix gcc warnings.
[SVN r50377]
2008-12-24 10:14:55 +00:00
e4b31ea37f Empty expressions, and empty alternatives are now
allowed when using the Perl regular expression syntax.  This change has
been added for Perl compatibility, when the new [syntax_option_type]
['no_empty_expressions] is set then the old behaviour is preserved and
empty expressions are prohibited.  This is issue
[@https://svn.boost.org/trac/boost/ticket/1081 #1081].

Fixes #1081.

[SVN r50374]
2008-12-23 19:06:04 +00:00
b4152cd74d Fix gcc warnings from ICU wrappers.
Add optional support for marked sub-expression location information.
Add support for ${n} in format replacement text.
Fixes #2556.
Fixes #2269.
Fixes #2514.

[SVN r50370]
2008-12-23 11:46:00 +00:00
c997a1fcc6 msvc warning suppression.
[SVN r50294]
2008-12-16 10:13:24 +00:00
b650e44ff2 Fix for building with /Zc:wchar_t-.
[SVN r49757]
2008-11-14 16:57:19 +00:00
330f23e84c Updating CMake files to latest trunk. Added dependency information for regression tests and a few new macros for internal use.
[SVN r49627]
2008-11-07 17:02:56 +00:00
85192b703d Continuing merge of CMake build system files into trunk with the encouragement of Doug Gregor
[SVN r49510]
2008-11-01 13:15:41 +00:00
fe24031566 Fix typo in regex_replace docs.
Regenerate docs.

[SVN r49443]
2008-10-23 14:52:50 +00:00
0362d61627 Updated makefiles.
[SVN r49359]
2008-10-16 12:52:17 +00:00
a2eccc999c Fix inspection report issues: remove tabs.
[SVN r49284]
2008-10-11 16:07:45 +00:00
545993d3eb Suppress configuration messages when not actually building the regex lib.
[SVN r49065]
2008-09-30 10:54:38 +00:00
d70f98e658 Fixes #2306.
Change "id" to "state_id".

[SVN r48751]
2008-09-12 12:40:23 +00:00
18623d00af Fix Jamfile logic: BOOST_REGEX_ICU_OPTS needs to be a list not a string.
[SVN r48574]
2008-09-04 08:36:34 +00:00
30074a601a Add /usr/local/include to the list of include paths for ICU on FreeBSD.
[SVN r48454]
2008-08-29 17:11:18 +00:00
4212c0d915 Update TR1 library to cope with GCC-4.3 in C++0x mode, and in TR1 mode.
Updated regex concepts to match the TR1.
Added "tricky" cmath_test to test for the functions Boost doesn't implement.

[SVN r48413]
2008-08-28 11:02:59 +00:00
1297f92b8a Tentative fix for issue #2244: ICU uses wchar_t as UCHAR whenever sizeof(wchar_t) == 2.
[SVN r48312]
2008-08-23 11:40:58 +00:00
cb5443477b Fix for VC8 without the service pack.
[SVN r48220]
2008-08-19 15:54:39 +00:00
1012d28c32 Fix for issue #2188.
[SVN r48185]
2008-08-17 11:15:07 +00:00
3a15c301db Disable MSVC std lib workarounds if we're really using STLPort or Apache/RW std lib.
[SVN r47880]
2008-07-30 09:35:44 +00:00
546dd9f6fb Fixes #1940.
[SVN r47795]
2008-07-25 09:28:01 +00:00
be28ad44c7 Tentative fix for some VC failures.
[SVN r47542]
2008-07-18 11:29:50 +00:00
6eb35e2cf1 Fixes #2097.
[SVN r47319]
2008-07-11 18:00:15 +00:00
831156d759 Replace a couple of non-ascii symbols.
[SVN r46943]
2008-07-01 09:58:27 +00:00
d7d38da27f Changed POSIX API functions to use the global C locale.
Fixes #1446.

[SVN r46170]
2008-06-05 17:07:42 +00:00
31b68369ae Patch for VC9 explicit template instantiation.
Fixes #1959.

[SVN r46077]
2008-06-03 12:52:55 +00:00
4c105a90a1 Changed behaviour of \B so that it succeeds when the neither adjacent character is a word character.
[SVN r45354]
2008-05-14 11:19:58 +00:00
8928c7737e Added needed #includes to source files.
[SVN r45353]
2008-05-14 11:14:30 +00:00
3704b9c595 Fixes for issue #1871 that prevents duplicate symbol errors with VC++ compilers, when building with /Zc:wchar_t-.
[SVN r44842]
2008-04-28 11:07:14 +00:00
5fdf2752ae Add explicit type cast to fix GCC-C++0X mode error.
[SVN r44437]
2008-04-15 17:50:11 +00:00
c7dda1b549 Fix doc typo from issue #1794.
[SVN r44169]
2008-04-11 08:53:54 +00:00
6e9b9a7995 Doh! Changes to code should actually compile!
A fix for the last change.

[SVN r44145]
2008-04-10 12:46:41 +00:00
e5bc36d7c9 Fix for bug #1790.
[SVN r44128]
2008-04-09 15:32:08 +00:00
c9d1a42e05 Added missing files.
[SVN r43632]
2008-03-15 18:19:11 +00:00
e32c5d0888 Added link to PDF docs, and regenerated.
[SVN r43351]
2008-02-21 12:58:15 +00:00
370c429bd6 Added comment to suppress inspect warning.
[SVN r43148]
2008-02-07 10:24:29 +00:00
0915f19c03 Extended leading repeat optimization to more cases.
[SVN r42992]
2008-01-27 18:43:35 +00:00
37040f4bfd Applies fix for issue #1598: added missing #include.
[SVN r42929]
2008-01-23 16:08:44 +00:00
2cbd1c8882 Patch regex concept checks and TR1 library to work with VC9 + MS TR1 feature pack.
[SVN r42751]
2008-01-14 13:17:09 +00:00
37cd93fc82 Fix documentation typos.
[SVN r42747]
2008-01-14 09:58:36 +00:00
b1af72fd23 Ooops, fix broken escape sequence.
[SVN r42745]
2008-01-14 09:46:12 +00:00
299086b99c Fix bugs reported by Will Drewry: certain invalid regexes can cause the library to access invalid memory, changed to ensure that the correct exception is thrown long before this happens.
[SVN r42674]
2008-01-11 09:55:43 +00:00
07eaac9e0e Fix typos.
[SVN r42455]
2008-01-04 16:54:35 +00:00
71fdd5eb44 Fix typos reported by Sebastian Pipping.
[SVN r42025]
2007-12-14 10:11:21 +00:00
31668ed4be Fixes #1471.
[SVN r41973]
2007-12-11 17:28:15 +00:00
f72c7518be Fixes #1455.
[SVN r41970]
2007-12-11 17:19:03 +00:00
2995393609 Oops, previous commit messed up POSIX timing code, now fixed.
[SVN r41359]
2007-11-25 15:47:58 +00:00
7 changed files with 45 additions and 22 deletions

View File

@ -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

View File

@ -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);

View File

@ -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:

View File

@ -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>

View File

@ -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();

View File

@ -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,

View File

@ -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,