Compare commits

..

1 Commits

Author SHA1 Message Date
88d7a593cc This commit was manufactured by cvs2svn to create tag
'Version_1_21_2'.

[SVN r9983]
2001-04-25 14:10:57 +00:00
64 changed files with 4660 additions and 2348 deletions

File diff suppressed because it is too large Load Diff

View File

@ -124,7 +124,7 @@ bcb5re300_clean :
bcb5\bcb5re300.lib : bcb5\bcb5re300\c_regex_traits.obj bcb5\bcb5re300\c_regex_traits_common.obj bcb5\bcb5re300\cpp_regex_traits.obj bcb5\bcb5re300\cregex.obj bcb5\bcb5re300\fileiter.obj bcb5\bcb5re300\posix_api.obj bcb5\bcb5re300\regex.obj bcb5\bcb5re300\regex_debug.obj bcb5\bcb5re300\regex_synch.obj bcb5\bcb5re300\w32_regex_traits.obj bcb5\bcb5re300\wide_posix_api.obj
tlib @&&|
/P32 /C /u /a $(XSFLAGS) bcb5\bcb5re300.lib +bcb5\bcb5re300\c_regex_traits.obj +bcb5\bcb5re300\c_regex_traits_common.obj +bcb5\bcb5re300\cpp_regex_traits.obj +bcb5\bcb5re300\cregex.obj +bcb5\bcb5re300\fileiter.obj +bcb5\bcb5re300\posix_api.obj +bcb5\bcb5re300\regex.obj +bcb5\bcb5re300\regex_debug.obj +bcb5\bcb5re300\regex_synch.obj +bcb5\bcb5re300\w32_regex_traits.obj +bcb5\bcb5re300\wide_posix_api.obj
/P32 /u /a $(XSFLAGS) bcb5\bcb5re300.lib +bcb5\bcb5re300\c_regex_traits.obj +bcb5\bcb5re300\c_regex_traits_common.obj +bcb5\bcb5re300\cpp_regex_traits.obj +bcb5\bcb5re300\cregex.obj +bcb5\bcb5re300\fileiter.obj +bcb5\bcb5re300\posix_api.obj +bcb5\bcb5re300\regex.obj +bcb5\bcb5re300\regex_debug.obj +bcb5\bcb5re300\regex_synch.obj +bcb5\bcb5re300\w32_regex_traits.obj +bcb5\bcb5re300\wide_posix_api.obj
|
########################################################
@ -198,7 +198,7 @@ bcb5re300m_clean :
bcb5\bcb5re300m.lib : bcb5\bcb5re300m\c_regex_traits.obj bcb5\bcb5re300m\c_regex_traits_common.obj bcb5\bcb5re300m\cpp_regex_traits.obj bcb5\bcb5re300m\cregex.obj bcb5\bcb5re300m\fileiter.obj bcb5\bcb5re300m\posix_api.obj bcb5\bcb5re300m\regex.obj bcb5\bcb5re300m\regex_debug.obj bcb5\bcb5re300m\regex_synch.obj bcb5\bcb5re300m\w32_regex_traits.obj bcb5\bcb5re300m\wide_posix_api.obj
tlib @&&|
/P32 /C /u /a $(XSFLAGS) bcb5\bcb5re300m.lib +bcb5\bcb5re300m\c_regex_traits.obj +bcb5\bcb5re300m\c_regex_traits_common.obj +bcb5\bcb5re300m\cpp_regex_traits.obj +bcb5\bcb5re300m\cregex.obj +bcb5\bcb5re300m\fileiter.obj +bcb5\bcb5re300m\posix_api.obj +bcb5\bcb5re300m\regex.obj +bcb5\bcb5re300m\regex_debug.obj +bcb5\bcb5re300m\regex_synch.obj +bcb5\bcb5re300m\w32_regex_traits.obj +bcb5\bcb5re300m\wide_posix_api.obj
/P32 /u /a $(XSFLAGS) bcb5\bcb5re300m.lib +bcb5\bcb5re300m\c_regex_traits.obj +bcb5\bcb5re300m\c_regex_traits_common.obj +bcb5\bcb5re300m\cpp_regex_traits.obj +bcb5\bcb5re300m\cregex.obj +bcb5\bcb5re300m\fileiter.obj +bcb5\bcb5re300m\posix_api.obj +bcb5\bcb5re300m\regex.obj +bcb5\bcb5re300m\regex_debug.obj +bcb5\bcb5re300m\regex_synch.obj +bcb5\bcb5re300m\w32_regex_traits.obj +bcb5\bcb5re300m\wide_posix_api.obj
|
########################################################

View File

@ -127,7 +127,7 @@ bcb4re300_clean :
bcb4\bcb4re300.lib : bcb4\bcb4re300\c_regex_traits.obj bcb4\bcb4re300\c_regex_traits_common.obj bcb4\bcb4re300\cpp_regex_traits.obj bcb4\bcb4re300\cregex.obj bcb4\bcb4re300\fileiter.obj bcb4\bcb4re300\posix_api.obj bcb4\bcb4re300\regex.obj bcb4\bcb4re300\regex_debug.obj bcb4\bcb4re300\regex_synch.obj bcb4\bcb4re300\w32_regex_traits.obj bcb4\bcb4re300\wide_posix_api.obj
tlib @&&|
/P32 /C /u /a $(XSFLAGS) bcb4\bcb4re300.lib +bcb4\bcb4re300\c_regex_traits.obj +bcb4\bcb4re300\c_regex_traits_common.obj +bcb4\bcb4re300\cpp_regex_traits.obj +bcb4\bcb4re300\cregex.obj +bcb4\bcb4re300\fileiter.obj +bcb4\bcb4re300\posix_api.obj +bcb4\bcb4re300\regex.obj +bcb4\bcb4re300\regex_debug.obj +bcb4\bcb4re300\regex_synch.obj +bcb4\bcb4re300\w32_regex_traits.obj +bcb4\bcb4re300\wide_posix_api.obj
/P32 /u /a $(XSFLAGS) bcb4\bcb4re300.lib +bcb4\bcb4re300\c_regex_traits.obj +bcb4\bcb4re300\c_regex_traits_common.obj +bcb4\bcb4re300\cpp_regex_traits.obj +bcb4\bcb4re300\cregex.obj +bcb4\bcb4re300\fileiter.obj +bcb4\bcb4re300\posix_api.obj +bcb4\bcb4re300\regex.obj +bcb4\bcb4re300\regex_debug.obj +bcb4\bcb4re300\regex_synch.obj +bcb4\bcb4re300\w32_regex_traits.obj +bcb4\bcb4re300\wide_posix_api.obj
|
########################################################
@ -201,7 +201,7 @@ bcb4re300m_clean :
bcb4\bcb4re300m.lib : bcb4\bcb4re300m\c_regex_traits.obj bcb4\bcb4re300m\c_regex_traits_common.obj bcb4\bcb4re300m\cpp_regex_traits.obj bcb4\bcb4re300m\cregex.obj bcb4\bcb4re300m\fileiter.obj bcb4\bcb4re300m\posix_api.obj bcb4\bcb4re300m\regex.obj bcb4\bcb4re300m\regex_debug.obj bcb4\bcb4re300m\regex_synch.obj bcb4\bcb4re300m\w32_regex_traits.obj bcb4\bcb4re300m\wide_posix_api.obj
tlib @&&|
/P32 /C /u /a $(XSFLAGS) bcb4\bcb4re300m.lib +bcb4\bcb4re300m\c_regex_traits.obj +bcb4\bcb4re300m\c_regex_traits_common.obj +bcb4\bcb4re300m\cpp_regex_traits.obj +bcb4\bcb4re300m\cregex.obj +bcb4\bcb4re300m\fileiter.obj +bcb4\bcb4re300m\posix_api.obj +bcb4\bcb4re300m\regex.obj +bcb4\bcb4re300m\regex_debug.obj +bcb4\bcb4re300m\regex_synch.obj +bcb4\bcb4re300m\w32_regex_traits.obj +bcb4\bcb4re300m\wide_posix_api.obj
/P32 /u /a $(XSFLAGS) bcb4\bcb4re300m.lib +bcb4\bcb4re300m\c_regex_traits.obj +bcb4\bcb4re300m\c_regex_traits_common.obj +bcb4\bcb4re300m\cpp_regex_traits.obj +bcb4\bcb4re300m\cregex.obj +bcb4\bcb4re300m\fileiter.obj +bcb4\bcb4re300m\posix_api.obj +bcb4\bcb4re300m\regex.obj +bcb4\bcb4re300m\regex_debug.obj +bcb4\bcb4re300m\regex_synch.obj +bcb4\bcb4re300m\w32_regex_traits.obj +bcb4\bcb4re300m\wide_posix_api.obj
|
########################################################
@ -275,7 +275,7 @@ bcb4re300v_clean :
bcb4\bcb4re300v.lib : bcb4\bcb4re300v\c_regex_traits.obj bcb4\bcb4re300v\c_regex_traits_common.obj bcb4\bcb4re300v\cpp_regex_traits.obj bcb4\bcb4re300v\cregex.obj bcb4\bcb4re300v\fileiter.obj bcb4\bcb4re300v\posix_api.obj bcb4\bcb4re300v\regex.obj bcb4\bcb4re300v\regex_debug.obj bcb4\bcb4re300v\regex_synch.obj bcb4\bcb4re300v\w32_regex_traits.obj bcb4\bcb4re300v\wide_posix_api.obj
tlib @&&|
/P32 /C /u /a $(XSFLAGS) bcb4\bcb4re300v.lib +bcb4\bcb4re300v\c_regex_traits.obj +bcb4\bcb4re300v\c_regex_traits_common.obj +bcb4\bcb4re300v\cpp_regex_traits.obj +bcb4\bcb4re300v\cregex.obj +bcb4\bcb4re300v\fileiter.obj +bcb4\bcb4re300v\posix_api.obj +bcb4\bcb4re300v\regex.obj +bcb4\bcb4re300v\regex_debug.obj +bcb4\bcb4re300v\regex_synch.obj +bcb4\bcb4re300v\w32_regex_traits.obj +bcb4\bcb4re300v\wide_posix_api.obj
/P32 /u /a $(XSFLAGS) bcb4\bcb4re300v.lib +bcb4\bcb4re300v\c_regex_traits.obj +bcb4\bcb4re300v\c_regex_traits_common.obj +bcb4\bcb4re300v\cpp_regex_traits.obj +bcb4\bcb4re300v\cregex.obj +bcb4\bcb4re300v\fileiter.obj +bcb4\bcb4re300v\posix_api.obj +bcb4\bcb4re300v\regex.obj +bcb4\bcb4re300v\regex_debug.obj +bcb4\bcb4re300v\regex_synch.obj +bcb4\bcb4re300v\w32_regex_traits.obj +bcb4\bcb4re300v\wide_posix_api.obj
|
########################################################

View File

@ -127,7 +127,7 @@ bcb5re300_clean :
bcb5\bcb5re300.lib : bcb5\bcb5re300\c_regex_traits.obj bcb5\bcb5re300\c_regex_traits_common.obj bcb5\bcb5re300\cpp_regex_traits.obj bcb5\bcb5re300\cregex.obj bcb5\bcb5re300\fileiter.obj bcb5\bcb5re300\posix_api.obj bcb5\bcb5re300\regex.obj bcb5\bcb5re300\regex_debug.obj bcb5\bcb5re300\regex_synch.obj bcb5\bcb5re300\w32_regex_traits.obj bcb5\bcb5re300\wide_posix_api.obj
tlib @&&|
/P32 /C /u /a $(XSFLAGS) bcb5\bcb5re300.lib +bcb5\bcb5re300\c_regex_traits.obj +bcb5\bcb5re300\c_regex_traits_common.obj +bcb5\bcb5re300\cpp_regex_traits.obj +bcb5\bcb5re300\cregex.obj +bcb5\bcb5re300\fileiter.obj +bcb5\bcb5re300\posix_api.obj +bcb5\bcb5re300\regex.obj +bcb5\bcb5re300\regex_debug.obj +bcb5\bcb5re300\regex_synch.obj +bcb5\bcb5re300\w32_regex_traits.obj +bcb5\bcb5re300\wide_posix_api.obj
/P32 /u /a $(XSFLAGS) bcb5\bcb5re300.lib +bcb5\bcb5re300\c_regex_traits.obj +bcb5\bcb5re300\c_regex_traits_common.obj +bcb5\bcb5re300\cpp_regex_traits.obj +bcb5\bcb5re300\cregex.obj +bcb5\bcb5re300\fileiter.obj +bcb5\bcb5re300\posix_api.obj +bcb5\bcb5re300\regex.obj +bcb5\bcb5re300\regex_debug.obj +bcb5\bcb5re300\regex_synch.obj +bcb5\bcb5re300\w32_regex_traits.obj +bcb5\bcb5re300\wide_posix_api.obj
|
########################################################
@ -201,7 +201,7 @@ bcb5re300m_clean :
bcb5\bcb5re300m.lib : bcb5\bcb5re300m\c_regex_traits.obj bcb5\bcb5re300m\c_regex_traits_common.obj bcb5\bcb5re300m\cpp_regex_traits.obj bcb5\bcb5re300m\cregex.obj bcb5\bcb5re300m\fileiter.obj bcb5\bcb5re300m\posix_api.obj bcb5\bcb5re300m\regex.obj bcb5\bcb5re300m\regex_debug.obj bcb5\bcb5re300m\regex_synch.obj bcb5\bcb5re300m\w32_regex_traits.obj bcb5\bcb5re300m\wide_posix_api.obj
tlib @&&|
/P32 /C /u /a $(XSFLAGS) bcb5\bcb5re300m.lib +bcb5\bcb5re300m\c_regex_traits.obj +bcb5\bcb5re300m\c_regex_traits_common.obj +bcb5\bcb5re300m\cpp_regex_traits.obj +bcb5\bcb5re300m\cregex.obj +bcb5\bcb5re300m\fileiter.obj +bcb5\bcb5re300m\posix_api.obj +bcb5\bcb5re300m\regex.obj +bcb5\bcb5re300m\regex_debug.obj +bcb5\bcb5re300m\regex_synch.obj +bcb5\bcb5re300m\w32_regex_traits.obj +bcb5\bcb5re300m\wide_posix_api.obj
/P32 /u /a $(XSFLAGS) bcb5\bcb5re300m.lib +bcb5\bcb5re300m\c_regex_traits.obj +bcb5\bcb5re300m\c_regex_traits_common.obj +bcb5\bcb5re300m\cpp_regex_traits.obj +bcb5\bcb5re300m\cregex.obj +bcb5\bcb5re300m\fileiter.obj +bcb5\bcb5re300m\posix_api.obj +bcb5\bcb5re300m\regex.obj +bcb5\bcb5re300m\regex_debug.obj +bcb5\bcb5re300m\regex_synch.obj +bcb5\bcb5re300m\w32_regex_traits.obj +bcb5\bcb5re300m\wide_posix_api.obj
|
########################################################
@ -275,7 +275,7 @@ bcb5re300v_clean :
bcb5\bcb5re300v.lib : bcb5\bcb5re300v\c_regex_traits.obj bcb5\bcb5re300v\c_regex_traits_common.obj bcb5\bcb5re300v\cpp_regex_traits.obj bcb5\bcb5re300v\cregex.obj bcb5\bcb5re300v\fileiter.obj bcb5\bcb5re300v\posix_api.obj bcb5\bcb5re300v\regex.obj bcb5\bcb5re300v\regex_debug.obj bcb5\bcb5re300v\regex_synch.obj bcb5\bcb5re300v\w32_regex_traits.obj bcb5\bcb5re300v\wide_posix_api.obj
tlib @&&|
/P32 /C /u /a $(XSFLAGS) bcb5\bcb5re300v.lib +bcb5\bcb5re300v\c_regex_traits.obj +bcb5\bcb5re300v\c_regex_traits_common.obj +bcb5\bcb5re300v\cpp_regex_traits.obj +bcb5\bcb5re300v\cregex.obj +bcb5\bcb5re300v\fileiter.obj +bcb5\bcb5re300v\posix_api.obj +bcb5\bcb5re300v\regex.obj +bcb5\bcb5re300v\regex_debug.obj +bcb5\bcb5re300v\regex_synch.obj +bcb5\bcb5re300v\w32_regex_traits.obj +bcb5\bcb5re300v\wide_posix_api.obj
/P32 /u /a $(XSFLAGS) bcb5\bcb5re300v.lib +bcb5\bcb5re300v\c_regex_traits.obj +bcb5\bcb5re300v\c_regex_traits_common.obj +bcb5\bcb5re300v\cpp_regex_traits.obj +bcb5\bcb5re300v\cregex.obj +bcb5\bcb5re300v\fileiter.obj +bcb5\bcb5re300v\posix_api.obj +bcb5\bcb5re300v\regex.obj +bcb5\bcb5re300v\regex_debug.obj +bcb5\bcb5re300v\regex_synch.obj +bcb5\bcb5re300v\w32_regex_traits.obj +bcb5\bcb5re300v\wide_posix_api.obj
|
########################################################

View File

@ -1,16 +1,3 @@
Version 311:
FIXED: Support for STLPort 4.1b6.
FIXED: Library calling convention for VC6 debug builds.
FIXED: Borland compiler support when using non-default calling convention.
CHANGED: Reorganised and simplified config setup.
ADDED: Support for replacing only the first occurance during a regex_merge
using the format_first_only flag.
CHANGED: Removed use of deprecated api set_expression in one of the examples.
Version 310:
ADDED: Support for static linking with VC6 + dynamic runtime.
CHANGED: Library directory structure.
Version 305:
FIXED: VC6.sp5 fix.
ADDED: Support for mixed static/dynamic linking with vc6.
@ -258,9 +245,6 @@ BUG: character sets don't function correctly when regbase::char_classes

1206
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -111,6 +111,16 @@ AC_DEFINE_UNQUOTED(BOOST_RE_SIZEOF_INT, [$ac_cv_sizeof_int])
AC_DEFINE_UNQUOTED(BOOST_RE_SIZEOF_LONG, [$ac_cv_sizeof_long])
if test "$ac_cv_sizeof_int" -lt 4; then
if test "$ac_cv_sizeof_long" -ge 4; then
AC_DEFINE(BOOST_RE_INT32_LONG)
else
AC_MSG_ERROR(Cannot find any 32-bit integer type for your compiler)
fi
ac_ext=$use_ac_ext
fi
ac_ext=$use_ac_ext
ac_ext=$use_ac_ext
@ -182,6 +192,37 @@ void do_throw()
AC_MSG_ERROR(Sorry, without exception handling you can't compile this library)])
AC_ARG_ENABLE(mutable, [--disable-mutable turns off mutable support])
if test "$enable_mutable" = "no"; then
AC_DEFINE(BOOST_RE_NO_MUTABLE, [])
else
AC_MSG_CHECKING(for mutable keyword)
AC_TRY_COMPILE(
[
#include <stdlib.h>
class foo
{
mutable int val;
public:
foo(int i) : val(i) {}
void set(int i)const;
};
void foo::set(int i)const
{
val = i;
}
],
[
const foo f(4);
f.set(3);
],
[AC_MSG_RESULT(yes)],
[AC_DEFINE(BOOST_RE_NO_MUTABLE, []) AC_MSG_RESULT(no)])
fi
AC_MSG_CHECKING(for default template parameter support)
AC_TRY_COMPILE(
[
@ -263,6 +304,44 @@ int foo(const dummy<T>& )
[AC_MSG_RESULT(yes)],
[AC_DEFINE(BOOST_RE_NO_PARTIAL_FUNC_SPEC, []) AC_MSG_RESULT(no)])
AC_MSG_CHECKING([for template friend functions])
AC_TRY_COMPILE(
[
#include <stdlib.h>
template <class T2>
void foo(T2 t);
template <class T>
struct dummy
{
template <class T2> friend void foo(T2);
private:
void foo2();
void foo3()const;
};
template <class T2>
void foo(T2 t)
{
dummy<T2> d1;
d1.foo2();
d1.foo3();
dummy<int> d2;
d2.foo2();
d2.foo3();
}
],
[
foo(3);
foo(2.345);
],
[AC_MSG_RESULT(yes)],
[AC_DEFINE(BOOST_RE_NO_TEMPLATE_FRIEND, []) AC_MSG_RESULT(no)])
AC_ARG_ENABLE(ms-windows, [--disable-ms-windows turns off native MS Windows support (when available)])
AC_ARG_ENABLE(threads, [--disable-threads turns off multi-threading support (when available)])
@ -283,6 +362,7 @@ AC_TRY_COMPILE(
int i = GetVersion();
],
[iswin="true"
AC_DEFINE(BOOST_RE_PLATFORM_WINDOWS, [])
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
enable_ms_windows="no"]
@ -358,6 +438,21 @@ enable_ms_windows="no"
fi
if test "$iswin" != "true"; then
AC_MSG_CHECKING(for MS DOS)
AC_TRY_COMPILE(
[
#include <dos.h>
],
[
int i = _doserrno;
],
[AC_DEFINE(BOOST_RE_PLATFORM_DOS, []) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
fi
AC_MSG_CHECKING(for bool support)
AC_TRY_COMPILE(
@ -475,7 +570,7 @@ fi
AC_ARG_ENABLE(member-templates, [--disable-member-templates turns off member template class and function support])
if test "$enable_member_templates" = "no"; then
AC_DEFINE(BOOST_NO_MEMBER_TEMPLATES, [])
AC_DEFINE(BOOST_RE_NO_MEMBER_TEMPLATES, [])
else
AC_MSG_CHECKING(for member template classes and functions)
@ -513,7 +608,7 @@ public:
fa = ia;
],
[AC_MSG_RESULT(yes)],
[AC_DEFINE(BOOST_NO_MEMBER_TEMPLATES,[])
[AC_DEFINE(BOOST_RE_NO_MEMBER_TEMPLATES,[])
AC_MSG_RESULT(no)])
fi
@ -540,6 +635,85 @@ AC_MSG_RESULT(no)])
fi
AC_ARG_ENABLE(int64, [--disable-int64 turns off support for 64-bit integer types])
if test "$enable_int64" = "no"; then
AC_DEFINE(BOOST_RE_INT64_T_0)
else
AC_MSG_CHECKING(for 64-bit integral type)
if test "$ac_cv_sizeof_short" -eq 8; then
AC_DEFINE(BOOST_RE_INT64_T_1)
AC_MSG_RESULT(yes - short)
have_int64="true"
fi
if test "$ac_cv_sizeof_int" -eq 8 && test "$have_int64" != "true"; then
AC_DEFINE(BOOST_RE_INT64_T_2)
AC_MSG_RESULT(yes - int)
have_int64="true"
fi
if test "$ac_cv_sizeof_long" -eq 8 && test "$have_int64" != "true"; then
AC_DEFINE(BOOST_RE_INT64_T_3)
AC_MSG_RESULT(yes - long)
have_int64="true"
fi
if test "$have_int64" != "true"; then
AC_TRY_COMPILE(
[
#include <inttypes.h>
int64_t i = INT64_C(0x100000000);
],
[
],
[AC_MSG_RESULT(yes - int64_t)
have_int64="true"
AC_DEFINE(BOOST_RE_INT64_T_4)
],
[])
fi
if test "$have_int64" != "true"; then
AC_TRY_COMPILE(
[
#include <stdlib.h>
long long i = 0x100000000LL;
],
[
],
[AC_MSG_RESULT(yes - long long)
have_int64="true"
AC_DEFINE(BOOST_RE_INT64_T_5)
],
[])
fi
if test "$have_int64" != "true"; then
AC_TRY_COMPILE(
[
#include <stdlib.h>
__int64 i = 0x100000000i64;
],
[
],
[AC_MSG_RESULT(yes - __int64)
have_int64="true"
AC_DEFINE(BOOST_RE_INT64_T_6)
],
[])
fi
if test "$have_int64" != "true"; then
AC_DEFINE(BOOST_RE_INT64_T,0)
AC_MSG_RESULT(no)
fi
fi
AC_ARG_ENABLE(messages, [--disable-messages turns off support for POSIX message categories, when available.])
if test "$enable_messages" = "no" || test "$enable_ms_windows" != "no"; then
AC_DEFINE(BOOST_RE_NO_CAT, [])
@ -591,6 +765,100 @@ AC_DEFINE(BOOST_RE_THREADS, [])],
fi
AC_ARG_ENABLE(nested-template-prefix, [--disable-nested-template-prefix turns off use of \"template\" as the nested template class access specifier.])
if test "$enable_nested_template_prefix" = "no" || test "$enable_member_templates" = "no"; then
AC_DEFINE(BOOST_RE_NESTED_TEMPLATE_DECL, [])
else
AC_MSG_CHECKING(for template nested class access)
AC_TRY_COMPILE(
[
template <class T>
class alloc
{
public:
void* allocate(int);
void deallocate(void*);
alloc();
alloc(const alloc&);
template <class U>
alloc(const alloc<U>&) {}
alloc& operator=(const alloc&);
template <class U>
alloc& operator=(const alloc<U>&)
{ return *this; }
template <class U>
struct rebind
{
typedef alloc<U> other;
};
};
],
[
alloc<int> ia;
alloc<double> da(ia);
alloc<float> fa;
fa.allocate(5);
fa = ia;
alloc<int>::template rebind<double>::other da2(ia);
],
[
AC_MSG_RESULT(yes)
AC_DEFINE(BOOST_RE_NESTED_TEMPLATE_DECL,template)
],
[
AC_DEFINE(BOOST_RE_NESTED_TEMPLATE_DECL,[])
AC_MSG_RESULT(no)
])
fi
AC_MSG_CHECKING(for explicit template instantiation)
AC_TRY_COMPILE(
[
#include "confdefs.h"
#include <stdlib.h>
template <class T>
class factorial
{
public:
factorial();
T operator()(T);
};
template <class T>
factorial<T>::factorial()
{
}
template <class T>
T factorial<T>::operator()(T t)
{
T result = 1;
for(T i = 1; i <= t; ++i)
{
result *= i;
}
return result;
}
template class factorial<int>;
template class factorial<short>;
],
[
],
[
AC_MSG_RESULT(yes)
],
[
AC_DEFINE(BOOST_RE_NO_TEMPLATE_INST,[])
AC_MSG_RESULT(no)
])
AC_ARG_ENABLE(fastcall, [--disable-fastcall turns off use __fastcall and __stdcall.])
if test "$enable_fastcall" = "no" || test "$enable_ms_windows" != "no"; then
AC_DEFINE(BOOST_RE_CALL, [])
@ -653,6 +921,58 @@ have_std_namespace="yes"
[AC_MSG_RESULT(no - either STL is not present or in a non-standard namespace.)
AC_MSG_ERROR([Sorry, you can't compile this library unless the standard library is in namespace std.])])
AC_MSG_CHECKING(for <iterator>)
AC_TRY_COMPILE(
[
#include <iterator>
],
[
],
[AC_MSG_RESULT(yes)
],
[AC_MSG_RESULT(no)
AC_DEFINE(BOOST_RE_NO_ITERATOR_H, [])
])
AC_MSG_CHECKING(for <algorithm>)
AC_TRY_COMPILE(
[
#include <algorithm>
#include "confdefs.h"
],
[
],
[AC_MSG_RESULT(yes)
],
[AC_MSG_RESULT(no)
need_algo="yes"
])
if test "$enable_stl" != "no" && test "$need_algo" = "yes"; then
AC_MSG_CHECKING(for <algo>)
AC_TRY_COMPILE(
[
#include <algo>
],
[
],
[AC_MSG_RESULT(yes)
AC_DEFINE(BOOST_RE_USE_ALGO, [])
],
[AC_MSG_RESULT(no - disabling STL support)
AC_DEFINE(BOOST_RE_NO_STL, [])
AC_DEFINE(BOOST_RE_NO_EXCEPTION_H, [])
AC_DEFINE(BOOST_RE_NO_ITERATOR_H, [])
AC_DEFINE(BOOST_RE_NO_MEMORY_H, [])
AC_DEFINE(BOOST_RE_NO_LOCALE_H, [])
AC_DEFINE(BOOST_RE_NO_STRING_H, [])
enable_stl="no"
])
fi
AC_MSG_CHECKING(for <memory>)
AC_TRY_COMPILE(
@ -663,7 +983,7 @@ AC_TRY_COMPILE(
template <class A>
struct tester
{
typedef typename A::template rebind<int> binder;
typedef typename A::BOOST_RE_NESTED_TEMPLATE_DECL rebind<int> binder;
typedef typename binder::other alloc_type;
alloc_type a;
tester(A al): a(al) {}
@ -674,7 +994,7 @@ std::allocator<double> d(a);
typedef std::allocator<char> alloc_type;
alloc_type::template rebind<int>::other o(a);
alloc_type::BOOST_RE_NESTED_TEMPLATE_DECL rebind<int>::other o(a);
tester<std::allocator<char> > t(a);
],
@ -683,7 +1003,7 @@ tester<std::allocator<char> > t(a);
[AC_MSG_RESULT(yes)
],
[AC_MSG_RESULT(no)
AC_DEFINE(BOOST_NO_STD_ALLOCATOR, [])
AC_DEFINE(BOOST_RE_NO_MEMORY_H, [])
])
@ -748,10 +1068,6 @@ std::locale l;
std::map<std::string, std::string> m;
],
[
if(std::has_facet<std::ctype<char> >(l))
{
const std::ctype<char>& ct = std::use_facet<std::ctype<char> >(l);
}
],
[AC_MSG_RESULT(yes)
ac_have_locale='yes'
@ -796,13 +1112,211 @@ AC_TRY_COMPILE(
i = std::distance(j, k);
],
[AC_MSG_RESULT(yes)
AC_DEFINE(BOOST_RE_DISTANCE_T_1)
have_dist="yes"
],
[
AC_MSG_RESULT(no)
AC_DEFINE(BOOST_NO_STD_DISTANCE)
])
[])
if test "$enable_stl" != "no" && test "$have_dist" != "yes"; then
AC_TRY_COMPILE(
[
#include <iterator>
#include "confdefs.h"
],
[
int i, *j, *k;
std::distance(j, k, i);
],
[AC_MSG_RESULT(yes)
AC_DEFINE(BOOST_RE_DISTANCE_T_2)
have_dist="yes"
],
[AC_MSG_RESULT(no)
AC_DEFINE(BOOST_RE_DISTANCE_T_0)
have_dist="yes"])
fi
if test "$enable_stl" != "no" && test "$have_si" != "yes"; then
AC_MSG_CHECKING(for standard iterator syntax)
AC_TRY_COMPILE(
[
#include <iterator>
#include "confdefs.h"
],
[
std::iterator<std::output_iterator_tag, char, std::ptrdiff_t, char*, char&> oi;
std::iterator<std::input_iterator_tag, char, std::ptrdiff_t, char*, char&> ii;
std::iterator<std::forward_iterator_tag, char, std::ptrdiff_t, char*, char&> fi;
std::iterator<std::bidirectional_iterator_tag, char, std::ptrdiff_t, char*, char&> bi;
std::iterator<std::random_access_iterator_tag, char, std::ptrdiff_t, char*, char&> ri;
],
[AC_MSG_RESULT(yes)
AC_DEFINE(BOOST_RE_ITERATOR_T_1)
have_si="yes"
have_oi="yes"
have_ii="yes"
have_fi="yes"
have_bi="yes"
have_ri="yes"
],
[])
fi
if test "$enable_stl" != "no" && test "$have_si" != "yes"; then
AC_TRY_COMPILE(
[
#include <iterator>
#include "confdefs.h"
],
[
std::iterator<std::output_iterator_tag, char, std::ptrdiff_t> oi;
std::iterator<std::input_iterator_tag, char, std::ptrdiff_t> ii;
std::iterator<std::forward_iterator_tag, char, std::ptrdiff_t> fi;
std::iterator<std::bidirectional_iterator_tag, char, std::ptrdiff_t> bi;
std::iterator<std::random_access_iterator_tag, char, std::ptrdiff_t> ri;
],
[AC_MSG_RESULT(yes)
AC_DEFINE(BOOST_RE_ITERATOR_T_2)
have_si="yes"
have_oi="yes"
have_ii="yes"
have_fi="yes"
have_bi="yes"
have_ri="yes"
],
[AC_MSG_RESULT(no)])
AC_DEFINE(BOOST_RE_ITERATOR_T_0)
fi
if test "$have_oi" != "yes"; then
AC_MSG_CHECKING(for output iterator syntax)
AC_TRY_COMPILE(
[
#include <iterator>
#include "confdefs.h"
],
[
std::output_iterator oi;
],
[AC_MSG_RESULT(yes)
AC_DEFINE(BOOST_RE_OI_T_3)
have_oi="yes"
],
[AC_MSG_RESULT(no)
AC_DEFINE(BOOST_RE_OI_T_0)
have_oi="yes"])
fi
if test "$enable_stl" != "no" && test "$have_ii" != "yes"; then
AC_MSG_CHECKING(for input iterator syntax)
AC_TRY_COMPILE(
[
#include <iterator>
#include "confdefs.h"
],
[
std::input_iterator<char, std::ptrdiff_t> oi;
],
[AC_MSG_RESULT(yes)
AC_DEFINE(BOOST_RE_II_T_3)
have_ii="yes"
],
[])
fi
if test "$enable_stl" != "no" && test "$have_ii" != "yes"; then
AC_TRY_COMPILE(
[
#include <iterator>
#include "confdefs.h"
],
[
std::input_iterator<char> oi;
],
[AC_MSG_RESULT(yes)
AC_DEFINE(BOOST_RE_II_T_4)
have_ii="yes"
],
[AC_MSG_RESULT(no)
AC_DEFINE(BOOST_RE_II_T_0)
have_ii="yes"])
fi
if test "$enable_stl" != "no" && test "$have_fi" != "yes"; then
AC_MSG_CHECKING(for forward iterator syntax)
AC_TRY_COMPILE(
[
#include <iterator>
#include "confdefs.h"
],
[
std::forward_iterator<int, std::ptrdiff_t> oi;
],
[AC_MSG_RESULT(yes)
AC_DEFINE(BOOST_RE_FI_T_3)
have_fi="yes"
],
[AC_MSG_RESULT(no)
AC_DEFINE(BOOST_RE_FI_T_0)
have_fi="yes"])
fi
if test "$enable_stl" != "no" && test "$have_bi" != "yes"; then
AC_MSG_CHECKING(for bidirectional iterator syntax)
AC_TRY_COMPILE(
[
#include <iterator>
#include "confdefs.h"
],
[
std::bidirectional_iterator<int, std::ptrdiff_t> oi;
],
[AC_MSG_RESULT(yes)
AC_DEFINE(BOOST_RE_BI_T_)
have_bi="yes"
],
[AC_MSG_RESULT(no)
AC_DEFINE(BOOST_RE_BI_T_0)
have_bi="yes"])
fi
if test "$enable_stl" != "no" && test "$have_ri" != "yes"; then
AC_MSG_CHECKING(for random access iterator syntax)
AC_TRY_COMPILE(
[
#include <iterator>
#include "confdefs.h"
],
[
std::random_access_iterator<int, std::ptrdiff_t> oi;
],
[AC_MSG_RESULT(yes)
AC_DEFINE(BOOST_RE_RI_T_3)
have_ri="yes"
],
[AC_MSG_RESULT(no)
AC_DEFINE(BOOST_RE_RI_T_0)
have_ri="yes"])
fi
if test "$enable_stl" != "no"; then
AC_MSG_CHECKING(for output iterator assignment)
@ -1143,7 +1657,7 @@ AC_DEFINE(BOOST_RE_AUTO_CONF)
AC_MSG_RESULT(***)
AC_MSG_RESULT($0: setting up headers...)
AC_MSG_RESULT(***)
AC_OUTPUT(build/makefile example/jgrep/makefile example/timer/makefile test/regress/makefile makefile)
AC_OUTPUT(lib/makefile example/jgrep/makefile example/timer/makefile test/regress/makefile makefile)
AC_MSG_RESULT(***)
AC_MSG_RESULT($0: regex++ package tuned for use with \"${CXX}\" compiler.)
AC_MSG_RESULT($0: To restore original settings - copy jm_opt.in to ../../boost/regex/detail/regex_options.hpp)
@ -1179,10 +1693,6 @@ rm -f jm_opt.out

View File

@ -15,7 +15,7 @@
/*
* FILE jgrep.cpp
* VERSION 3.12
* VERSION 3.10
*/
#include <stdio.h>

View File

@ -15,7 +15,7 @@
/*
* FILE jgrep.h
* VERSION 3.12
* VERSION 3.10
*/
#ifndef _JGREP_H

View File

@ -15,7 +15,7 @@
/*
* FILE main.cpp
* VERSION 3.12
* VERSION 3.10
*/

View File

@ -36,7 +36,7 @@ void search(std::istream& is)
// and how much is left to fill:
unsigned size = next_pos - buf;
// copy forward whatever we have left:
memmove(buf, next_pos, leftover);
memcpy(buf, next_pos, leftover);
// fill the rest from the stream:
unsigned read = is.readsome(buf + leftover, size);
// check to see if we've run out of text:
@ -80,4 +80,3 @@ int main(int argc, char* argv[])
return 0;
}

View File

@ -57,9 +57,8 @@ void load_file(std::string& s, std::istream& is)
int main(int argc, const char** argv)
{
try{
e1.assign(expression_text);
e2.assign(pre_expression);
e1.set_expression(expression_text);
e2.set_expression(pre_expression);
for(int i = 1; i < argc; ++i)
{
std::cout << "Processing file " << argv[i] << std::endl;
@ -81,9 +80,6 @@ int main(int argc, const char** argv)
boost::regex_merge(out, s.begin(), s.end(), e1, format_string);
os << footer_text;
}
}
catch(...)
{ return -1; }
return 0;
}
@ -133,4 +129,3 @@ const char* footer_text = "</PRE>\n</BODY>\n\n";

176
faq.htm
View File

@ -1,20 +1,28 @@
<!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<META NAME="Generator" CONTENT="Microsoft Word 97">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Template"
CONTENT="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
<META NAME="GENERATOR" CONTENT="Mozilla/4.5 [en] (Win98; I) [Netscape]">
<TITLE>Regex++ - FAQ</TITLE>
<META NAME="Template" CONTENT="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
</HEAD>
<BODY LINK="#0000ff" VLINK="#800080" BGCOLOR="#ffffff">
<P><!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en">&nbsp; </P>
<TABLE CELLSPACING=0 BORDER=0 CELLPADDING=7 WIDTH=624>
<TR><TD WIDTH="50%" VALIGN="TOP">
<H3><IMG SRC="../../c++boost.gif" WIDTH=276 HEIGHT=86 ALT="C++ Boost"></H3></TD>
<TD WIDTH="50%" VALIGN="TOP">
<H3 ALIGN="CENTER">Regex++, FAQ.</H3>
<I><P ALIGN="CENTER">(version 3.12, 18 April 2000)</I> </P>
<I><PRE>Copyright (c) 1998-2000
<BODY BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#800080">
&nbsp; <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="7" WIDTH="100%">
<TR>
<TD VALIGN="TOP" WIDTH="50%"> <H3>
<IMG SRC="../../c++boost.gif" HEIGHT="86" WIDTH="276" ALT="C++ Boost"></H3>
</TD>
<TD VALIGN="TOP" WIDTH="50%"> <CENTER>
<H3> Regex++, FAQ.</H3>
</CENTER>
<CENTER>
<I>(version 3.10, 18 April 2000)</I>
</CENTER>
<PRE><I>Copyright (c) 1998-2000
Dr John Maddock
Permission to use, copy, modify, distribute and sell this software
@ -23,49 +31,111 @@ provided that the above copyright notice appear in all copies and
that both that copyright notice and this permission notice appear
in supporting documentation.&nbsp; Dr John Maddock makes no representations
about the suitability of this software for any purpose.&nbsp;&nbsp;
It is provided "as is" without express or implied warranty.</PRE></I></TD>
It is provided &quot;as is&quot; without express or implied warranty.</I></PRE>
</TD>
</TR>
</TABLE>
<FONT COLOR="#ff0000"><P>Q. Why does using parenthesis in a regular expression change the result of a match?</P>
</FONT><P>Parentheses don't only mark; they determine what the best match is as well. regex++ tries to follow the POSIX standard leftmost longest rule for determining what matched. So if there is more than one possible match after considering the whole expression, it looks next at the first sub-expression and then the second sub-expression and so on. So...</P>
<PRE>"(0*)([0-9]*)" against "00123" would produce
$1 = "00"
$2 = "123"</PRE>
<P>where as</P>
<PRE>"0*([0-9)*" against "00123" would produce
$1 = "00123"</PRE>
<P>If you think about it, had $1 only matched the "123", this would be "less good" than the match "00123" which is both further to the left and longer. If you want $1 to match only the "123" part, then you need to use something like:</P>
<PRE>"0*([1-9][0-9]*)"</PRE>
<P>as the expression.</P>
<FONT COLOR="#ff0000"><P>Q. Configure says that my compiler is unable to merge template instances, what does this mean?</FONT> </P>
<P>A. When you compile template code, you can end up with the same template instances in multiple translation units - this will lead to link time errors unless your compiler/linker is smart enough to merge these template instances into a single record in the executable file. If you see this warning after running configure, then you can still link to libregex++.a if: </P>
<P><FONT COLOR="#FF0000">Q. Configure says that my compiler is unable to merge
template instances, what does this mean?</FONT> </P>
<P>A. When you compile template code, you can end up with the same template
instances in multiple translation units - this will lead to link time errors
unless your compiler/linker is smart enough to merge these template instances
into a single record in the executable file. If you see this warning after
running configure, then you can still link to libregex++.a if: </P>
<OL>
<LI>You use only the low-level template classes (reg_expression&lt;&gt; match_results&lt;&gt; etc), from a single translation unit, and use no other part of regex++.</LI>
<LI>You use only the POSIX API functions (regcomp regexec etc), and no other part of regex++.</LI>
<LI>You use only the high level class RegEx, and no other part of regex++. </LI></OL>
<P>Another option is to create a master include file, which #include's all the regex++ source files, and all the source files in which you use regex++. You then compile and link this master file as a single translation unit. </P>
<FONT COLOR="#ff0000"><P>Q. Configure says that my compiler is unable to merge template instances from archive files, what does this mean?</FONT> </P>
<P>A. When you compile template code, you can end up with the same template instances in multiple translation units - this will lead to link time errors unless your compiler/linker is smart enough to merge these template instances into a single record in the executable file. Some compilers are able to do this for normal .cpp or .o files, but fail if the object file has been placed in a library archive. If you see this warning after running configure, then you can still link to libregex++.a if: </P>
<LI> You use only the low-level template classes (reg_expression&lt;&gt;
match_results&lt;&gt; etc), from a single translation unit, and use no other part
of regex++.</LI>
<LI> You use only the POSIX API functions (regcomp regexec etc), and no other
part of regex++.</LI>
<LI> You use only the high level class RegEx, and no other part of regex++.
</LI>
</OL>
Another option is to create a master include file, which #include's all the
regex++ source files, and all the source files in which you use regex++. You
then compile and link this master file as a single translation unit. <P><FONT
COLOR="#FF0000">Q. Configure says that my compiler is unable to merge template
instances from archive files, what does this mean?</FONT> </P>
<P>A. When you compile template code, you can end up with the same template
instances in multiple translation units - this will lead to link time errors
unless your compiler/linker is smart enough to merge these template instances
into a single record in the executable file. Some compilers are able to do this
for normal .cpp or .o files, but fail if the object file has been placed in a
library archive. If you see this warning after running configure, then you can
still link to libregex++.a if: </P>
<OL>
<LI>You use only the low-level template classes (reg_expression&lt;&gt; match_results&lt;&gt; etc), and use no other part of regex++.</LI>
<LI>You use only the POSIX API functions (regcomp regexec etc), and no other part of regex++.</LI>
<LI>You use only the high level class RegEx, and no other part of regex++. </LI></OL>
<P>Another option is to add the regex++ source files directly to your project instead of linking to libregex++.a, generally you should do this only if you are getting link time errors with libregex++.a. </P>
<FONT COLOR="#ff0000"><P>Q. Configure says that my compiler can't merge templates containing switch statements, what does this mean?</FONT> </P>
<P>A. Some compilers can't merge templates that contain static data - this includes switch statements which implicitly generate static data as well as code. Principally this affects the egcs compiler - but note gcc 2.81 also suffers from this problem - the compiler will compile and link the code - but the code will not run because the code and the static data it uses have become separated. The default behaviour of regex++ is to try and fix this problem by declaring "problem" templates inside unnamed namespaces, so that the templates have internal linkage. Note that this can result in a great deal of code bloat. If the compiler doesn't support namespaces, or if code bloat becomes a problem, then follow the guidelines above for placing all the templates used in a single translation unit, and edit jm_opt.h so that BOOST_RE_NO_TEMPLATE_SWITCH_MERGE is no longer defined. </P>
<FONT COLOR="#ff0000"><P>Q. I can't get regex++ to work with escape characters, what's going on?</FONT> </P>
<P>A. If you embed regular expressions in C++ code, then remember that escape characters are processed twice: once by the C++ compiler, and once by the regex++ expression compiler, so to pass the regular expression \d+ to regex++, you need to embed "\\d+" in your code. Likewise to match a literal backslash you will need to embed "\\\\" in your code. </P>
<FONT COLOR="#ff0000"><P>Q. Why don't character ranges work properly?</FONT> <BR>
A. The POSIX standard specifies that character range expressions are locale sensitive - so for example the expression [A-Z] will match any collating element that collates between 'A' and 'Z'. That means that for most locales other than "C" or "POSIX", [A-Z] would match the single character 't' for example, which is not what most people expect - or at least not what most people have come to expect from regular expression engines. For this reason, the default behaviour of regex++ is to turn locale sensitive collation off by setting the regbase::nocollate compile time flag (this is set by regbase::normal). However if you set a non-default compile time flag - for example regbase::extended or regbase::basic, then locale dependent collation will be enabled, this also applies to the POSIX API functions which use either regbase::extended or regbase::basic internally, in the latter case use REG_NOCOLLATE in combination with either REG_BASIC or REG_EXTENDED when invoking regcomp if you don't want locale sensitive collation. <I>[Note - when regbase::nocollate in effect, the library behaves "as if" the LC_COLLATE locale category were always "C", regardless of what its actually set to - end note</I>]. </P>
<FONT COLOR="#ff0000"><P>&nbsp;Q. Why can't I use the "convenience" versions of query_match/reg_search/reg_grep/reg_format/reg_merge?</FONT> </P>
<P>A. These versions may or may not be available depending upon the capabilities of your compiler, the rules determining the format of these functions are quite complex - and only the versions visible to a standard compliant compiler are given in the help. To find out what your compiler supports, run &lt;boost/regex.hpp&gt; through your C++ pre-processor, and search the output file for the function that you are interested in. </P>
<FONT COLOR="#ff0000"><P>Q. Why are there no throw specifications on any of the functions? What exceptions can the library throw?</FONT> </P>
<P>A. Not all compilers support (or honor) throw specifications, others support them but with reduced efficiency. Throw specifications may be added at a later date as compilers begin to handle this better. The library should throw only three types of exception: boost::bad_expression can be thrown by reg_expression when compiling a regular expression; boost::bad_pattern can be thrown by the class sub_match's conversion operators; finally std::bad_alloc can be thrown by just about any of the functions in this library. </P>
<P><HR></P>
<I><P>Copyright </I><A HREF="mailto:John_Maddock@compuserve.com"><I>Dr John Maddock</I></A><I> 1998-2000 all rights reserved.</I> </P></BODY>
<LI> You use only the low-level template classes (reg_expression&lt;&gt;
match_results&lt;&gt; etc), and use no other part of regex++.</LI>
<LI> You use only the POSIX API functions (regcomp regexec etc), and no other
part of regex++.</LI>
<LI> You use only the high level class RegEx, and no other part of regex++.
</LI>
</OL>
Another option is to add the regex++ source files directly to your project
instead of linking to libregex++.a, generally you should do this only if you
are getting link time errors with libregex++.a. <P><FONT COLOR="#FF0000">Q.
Configure says that my compiler can't merge templates containing switch
statements, what does this mean?</FONT> </P>
<P>A. Some compilers can't merge templates that contain static data - this
includes switch statements which implicitly generate static data as well as
code. Principally this affects the egcs compiler - but note gcc 2.81 also
suffers from this problem - the compiler will compile and link the code - but
the code will not run because the code and the static data it uses have become
separated. The default behaviour of regex++ is to try and fix this problem by
declaring &quot;problem&quot; templates inside unnamed namespaces, so that the
templates have internal linkage. Note that this can result in a great deal of
code bloat. If the compiler doesn't support namespaces, or if code bloat
becomes a problem, then follow the guidelines above for placing all the
templates used in a single translation unit, and edit jm_opt.h so that
BOOST_RE_NO_TEMPLATE_SWITCH_MERGE is no longer defined. </P>
<P><FONT COLOR="#FF0000">Q. I can't get regex++ to work with escape characters,
what's going on?</FONT> </P>
<P>A. If you embed regular expressions in C++ code, then remember that escape
characters are processed twice: once by the C++ compiler, and once by the
regex++ expression compiler, so to pass the regular expression \d+ to regex++,
you need to embed &quot;\\d+&quot; in your code. Likewise to match a literal
backslash you will need to embed &quot;\\\\&quot; in your code. </P>
<P><FONT COLOR="#FF0000">Q. Why don't character ranges work properly?</FONT>
<BR>
A. The POSIX standard specifies that character range expressions are locale
sensitive - so for example the expression [A-Z] will match any collating
element that collates between 'A' and 'Z'. That means that for most locales
other than &quot;C&quot; or &quot;POSIX&quot;, [A-Z] would match the single
character 't' for example, which is not what most people expect - or at least
not what most people have come to expect from regular expression engines. For
this reason, the default behaviour of regex++ is to turn locale sensitive
collation off by setting the regbase::nocollate compile time flag (this is set
by regbase::normal). However if you set a non-default compile time flag - for
example regbase::extended or regbase::basic, then locale dependent collation
will be enabled, this also applies to the POSIX API functions which use either
regbase::extended or regbase::basic internally, in the latter case use
REG_NOCOLLATE in combination with either REG_BASIC or REG_EXTENDED when
invoking regcomp if you don't want locale sensitive collation. <I>[Note - when
regbase::nocollate in effect, the library behaves &quot;as if&quot; the
LC_COLLATE locale category were always &quot;C&quot;, regardless of what its
actually set to - end note</I>]. </P>
<P><FONT COLOR="#FF0000">&nbsp;Q. Why can't I use the &quot;convenience&quot;
versions of query_match/reg_search/reg_grep/reg_format/reg_merge?</FONT> </P>
<P>A. These versions may or may not be available depending upon the
capabilities of your compiler, the rules determining the format of these
functions are quite complex - and only the versions visible to a standard
compliant compiler are given in the help. To find out what your compiler
supports, run &lt;boost/regex.hpp&gt; through your C++ pre-processor, and
search the output file for the function that you are interested in. </P>
<P><FONT COLOR="#FF0000">Q. Why are there no throw specifications on any of the
functions? What exceptions can the library throw?</FONT> </P>
<P>A. Not all compilers support (or honor) throw specifications, others support
them but with reduced efficiency. Throw specifications may be added at a later
date as compilers begin to handle this better. The library should throw only
three types of exception: boost::bad_expression can be thrown by reg_expression
when compiling a regular expression; boost::bad_pattern can be thrown by the
class sub_match's conversion operators; finally std::bad_alloc can be thrown by
just about any of the functions in this library. <BR>
</P>
<HR>
<P><I>Copyright <A HREF="mailto:John_Maddock@compuserve.com">Dr John
Maddock</A> 1998-2000 all rights reserved.</I> </P>
</BODY>
</HTML>

View File

@ -20,7 +20,7 @@
<H3> Regex++, Format String Reference.</H3>
</CENTER>
<CENTER>
<I>(version 3.12, 18 April 2000)</I>
<I>(version 3.10, 18 April 2000)</I>
</CENTER>
<PRE><I>Copyright (c) 1998-2000
Dr John Maddock

View File

@ -15,13 +15,12 @@ content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
<table border="0" cellpadding="7" cellspacing="0" width="100%">
<tr>
<td valign="top" width="50%"><h3><img
src="../../c++boost.gif" alt="C++ Boost" width="276"
height="86"></h3>
<td valign="top" width="50%"><h3><img src="../../c++boost.gif"
alt="C++ Boost" width="276" height="86"></h3>
</td>
<td valign="top" width="50%"><h3 align="center">Regex++,
RegEx Class Reference. </h3>
<p><i>(version 3.12, 18 April 2000)</i> </p>
<p><i>(version 3.10, 18 April 2000)</i> </p>
<pre><i>Copyright (c) 1998-2000
Dr John Maddock
@ -113,8 +112,8 @@ are allowed. </p>
</tr>
<tr>
<td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%">RegEx(<b>const</b>
RegEx&amp; o);</td>
<td valign="top" width="43%">RegEx(<b>const</b> RegEx&amp;
o);</td>
<td valign="top" width="42%">Copy constructor, all the
properties of parameter <i>o</i> are copied.</td>
<td valign="top" width="7%">&nbsp;</td>
@ -197,8 +196,7 @@ are allowed. </p>
<tr>
<td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>bool</b> Match(<b>const</b>
<b>char</b>* p, <b>unsigned</b> <b>int</b> flags =
match_default);</td>
<b>char</b>* p, <b>unsigned</b> <b>int</b> flags = match_default);</td>
<td valign="top" width="42%">Attempts to match the
current expression against the text <i>p</i> using the
match flags <i>flags</i> - see <a
@ -223,8 +221,7 @@ are allowed. </p>
<tr>
<td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>bool</b> Search(<b>const</b>
<b>char</b>* p, <b>unsigned</b> <b>int</b> flags =
match_default);</td>
<b>char</b>* p, <b>unsigned</b> <b>int</b> flags = match_default);</td>
<td valign="top" width="42%">Attempts to find a match for
the current expression somewhere in the text <i>p</i>
using the match flags <i>flags </i>- see <a
@ -309,8 +306,7 @@ are allowed. </p>
<td valign="top" width="7%">&nbsp;</td>
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
Grep(std::vector&lt;<b>unsigned int</b>&gt;&amp; v, <b>const</b>
<b>char</b>* p, <b>unsigned</b> <b>int</b> flags =
match_default);</td>
<b>char</b>* p, <b>unsigned</b> <b>int</b> flags = match_default);</td>
<td valign="top" width="42%">Finds all matches of the
current expression in the text <i>p</i> using the match
flags <i>flags </i>- see <a
@ -439,16 +435,11 @@ are allowed. </p>
replace operation: searches through the string <i>in</i>
for all occurrences of the current expression, for each
occurrence replaces the match with the format string <i>fmt</i>.
Uses <i>flags</i> to determine what gets matched, and how
the format string should be treated. If <i>copy</i> is
true then all unmatched sections of input are copied
unchanged to output, if the flag <em>format_first_only</em>
is set then only the first occurance of the pattern found
is replaced. Returns the new string. See <a
Uses <i>flags</i> to determine what gets matched. If <i>copy</i>
is true then all unmatched sections of input are copied
unchanged to output. Returns the new string. See <a
href="format_string.htm#format_string">also format string
syntax</a>, <a href="template_class_ref.htm#match_type">match
flags</a> and <a
href="template_class_ref.htm#format_flags">format flags</a>.</td>
syntax</a>.</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr>
@ -460,23 +451,18 @@ are allowed. </p>
replace operation: searches through the string <i>in</i>
for all occurrences of the current expression, for each
occurrence replaces the match with the format string <i>fmt</i>.
Uses <i>flags</i> to determine what gets matched, and how
the format string should be treated. If <i>copy</i> is
true then all unmatched sections of input are copied
unchanged to output, if the flag <em>format_first_only</em>
is set then only the first occurance of the pattern found
is replaced. Returns the new string. See <a
Uses <i>flags</i> to determine what gets matched. If <i>copy</i>
is true then all unmatched sections of input are copied
unchanged to output. Returns the new string. See <a
href="format_string.htm#format_string">also format string
syntax</a>, <a href="template_class_ref.htm#match_type">match
flags</a> and <a
href="template_class_ref.htm#format_flags">format flags</a>.</td>
syntax</a>.</td>
<td valign="top" width="7%">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td valign="top"><b>unsigned</b> Split(std::vector&lt;std::string&gt;&amp;
v, std::string&amp; s, <b>unsigned</b> flags =
match_default, <b>unsigned</b> max_count = ~0);</td>
v, std::string&amp; s, <b>unsigned</b> flags = match_default,
<b>unsigned</b> max_count = ~0);</td>
<td valign="top">Splits the input string and pushes each
one onto the vector. If the expression contains no marked
sub-expressions, then one string is outputted for each

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE cregex.cpp
* VERSION 3.12
* VERSION 3.10
* DESCRIPTION: Declares POSIX API functions
* + boost::RegEx high level wrapper.
*/
@ -27,7 +27,11 @@
#include <boost/regex/detail/regex_config.hpp>
#ifdef __BORLANDC__
#pragma option push -a4 -b -Ve -pc
#if __BORLANDC__ == 0x530
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve
#endif
#endif
/* include these defs only for POSIX compatablity */
@ -283,7 +287,9 @@ public:
};
#ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop
#endif
#endif
} // namespace boost

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE regex.h
* VERSION 3.12
* VERSION 3.10
* DESCRIPTION: Declares POSIX API functions
*/

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE regex.cpp
* VERSION 3.12
* VERSION 3.10
* DESCRIPTION: Declares boost::reg_expression<> and associated
* functions and classes. This header is the main
* entry point for the template regex code.
@ -55,7 +55,11 @@
namespace boost{
#ifdef __BORLANDC__
#pragma option push -a4 -b -Ve -pc
#if __BORLANDC__ == 0x530
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve
#endif
#endif
namespace re_detail{
@ -101,9 +105,9 @@ public:
{
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
jm_uintfast32_t BOOST_RE_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);
jm_uintfast32_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)
result |= base_type::char_class_alpha;
return result;
@ -238,7 +242,7 @@ struct re_literal : public re_syntax_base
struct re_set_long : public re_syntax_base
{
unsigned int csingles, cranges, cequivalents;
boost::uint_fast32_t cclasses;
jm_uintfast32_t cclasses;
bool isnot;
};
@ -519,7 +523,7 @@ public:
set_expression(first, last, f | regbase::use_except);
return *this;
}
#ifndef BOOST_NO_MEMBER_TEMPLATES
#ifndef BOOST_RE_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)
@ -604,25 +608,20 @@ public:
//
// str:
std::basic_string<charT> BOOST_RE_CALL str()const
{
std::basic_string<charT> result;
if(this->error_code() == 0)
result = std::basic_string<charT>(_expression, _expression_len);
return result;
}
{ return std::basic_string<charT>(_expression, _expression_len); }
//
// begin, end:
const_iterator BOOST_RE_CALL begin()const
{ return (this->error_code() ? 0 : _expression); }
{ return _expression; }
const_iterator BOOST_RE_CALL end()const
{ return (this->error_code() ? 0 : _expression + _expression_len); }
{ return _expression + _expression_len; }
//
// swap:
void BOOST_RE_CALL swap(reg_expression&)throw();
//
// size:
size_type BOOST_RE_CALL size()const
{ return (this->error_code() ? 0 : _expression_len); }
{ return _expression_len; }
//
// max_size:
size_type BOOST_RE_CALL max_size()const
@ -632,14 +631,14 @@ public:
bool BOOST_RE_CALL empty()const
{ return this->error_code(); }
unsigned BOOST_RE_CALL mark_count()const { return (this->error_code() ? 0 : marks); }
unsigned BOOST_RE_CALL mark_count()const { return marks; }
bool BOOST_RE_CALL operator==(const reg_expression&)const;
bool BOOST_RE_CALL operator<(const reg_expression&)const;
//
// The following are deprecated as public interfaces
// but are available for compatability with earlier versions.
allocator_type BOOST_RE_CALL allocator()const;
const charT* BOOST_RE_CALL expression()const { return (this->error_code() ? 0 : _expression); }
const charT* BOOST_RE_CALL expression()const { return _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); }
//
@ -672,8 +671,8 @@ private:
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_aux(re_detail::jstack<traits_string_type, Allocator>& singles, re_detail::jstack<traits_string_type, Allocator>& ranges, re_detail::jstack<jm_uintfast32_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<jm_uintfast32_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);
@ -741,7 +740,8 @@ struct sub_match
operator std::basic_string<value_type> ()const
{
std::basic_string<value_type> result;
unsigned len = boost::re_detail::distance((iterator)first, (iterator)second);
unsigned len;
BOOST_RE_DISTANCE((iterator)first, (iterator)second, len);
result.reserve(len);
iterator i = first;
while(i != second)
@ -778,7 +778,8 @@ struct sub_match
difference_type BOOST_RE_CALL length()const
{
difference_type n = boost::re_detail::distance((iterator)first, (iterator)second);
difference_type n;
BOOST_RE_DISTANCE((iterator)first, (iterator)second, n);
return n;
}
};
@ -845,7 +846,7 @@ class match_results_base
{
public:
typedef Allocator alloc_type;
typedef typename boost::re_detail::rebind_allocator<iterator, Allocator>::type iterator_alloc;
typedef BOOST_RE_MAYBE_TYPENAME REBIND_TYPE(iterator, Allocator) 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 +859,7 @@ public:
typedef iterator iterator_type;
protected:
typedef typename boost::re_detail::rebind_allocator<char, Allocator>::type c_alloc;
typedef BOOST_RE_MAYBE_TYPENAME REBIND_TYPE(char, Allocator) c_alloc;
struct c_reference : public c_alloc
{
@ -928,7 +929,8 @@ public:
const sub_match<iterator>& m = (*this)[sub];
if(m.matched == false)
return 0;
difference_type n = boost::re_detail::distance((iterator)m.first, (iterator)m.second);
difference_type n;
BOOST_RE_DISTANCE((iterator)m.first, (iterator)m.second, n);
return n;
}
@ -948,7 +950,8 @@ public:
const sub_match<iterator>& s = (*this)[sub];
if(s.matched == false)
return -1;
difference_type n = boost::re_detail::distance((iterator)(ref->base), (iterator)(s.first));
difference_type n;
BOOST_RE_DISTANCE((iterator)ref->base, (iterator)s.first, n);
return n;
}
@ -976,7 +979,7 @@ public:
void BOOST_RE_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_RE_CALL set_first(iterator i, size_t pos);
void BOOST_RE_CALL set_second(iterator i)
{
@ -987,7 +990,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_RE_CALL set_second(iterator i, size_t pos, bool m = true)
{
cow();
((sub_match<iterator>*)((char*)ref + sizeof(c_reference) + sizeof(sub_match<iterator>) * pos))->second = i;
@ -1032,7 +1035,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_RE_CALL match_results_base<iterator, Allocator>::set_first(iterator i, size_t pos)
{
cow();
((sub_match<iterator>*)((char*)ref + sizeof(c_reference) + sizeof(sub_match<iterator>) * pos))->first = i;
@ -1267,13 +1270,13 @@ void BOOST_RE_CALL match_results_base<iterator, Allocator>::maybe_assign(const m
{
//
// leftmost takes priority over longest:
base1 = boost::re_detail::distance(base, p1->first);
base2 = boost::re_detail::distance(base, p2->first);
BOOST_RE_DISTANCE(base, p1->first, base1);
BOOST_RE_DISTANCE(base, p2->first, base2);
if(base1 < base2) return;
if(base2 < base1) break;
len1 = boost::re_detail::distance(p1->first, p1->second);
len2 = boost::re_detail::distance(p2->first, p2->second);
BOOST_RE_DISTANCE(p1->first, p1->second, len1);
BOOST_RE_DISTANCE(p2->first, p2->second, len2);
if((len1 != len2) || ((p1->matched == false) && (p2->matched == true)))
break;
if((p1->matched == true) && (p2->matched == false))
@ -1465,7 +1468,9 @@ iterator BOOST_RE_CALL re_is_set_member(iterator next,
} // namepsace re_detail
#ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop
#endif
#endif
} // namespace boost

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE fileiter.hpp
* VERSION 3.12
* VERSION 3.10
* DESCRIPTION: Declares various platform independent file and
* directory iterators, plus binary file input in
* the form of class map_file.
@ -79,7 +79,11 @@ namespace boost{
namespace re_detail{
#ifdef __BORLANDC__
#pragma option push -a4 -b -Ve -pc
#if __BORLANDC__ == 0x530
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve
#endif
#endif
struct _fi_find_data
@ -192,7 +196,7 @@ public:
friend class mapfile_iterator;
};
class BOOST_RE_IX_DECL mapfile_iterator
class BOOST_RE_IX_DECL mapfile_iterator : public BOOST_RE_RA_ITERATOR(char, long)
{
typedef mapfile::pointer internal_pointer;
internal_pointer* node;
@ -321,7 +325,7 @@ struct file_iterator_ref
};
class BOOST_RE_IX_DECL file_iterator
class BOOST_RE_IX_DECL file_iterator : public BOOST_RE_INPUT_ITERATOR(const char*, std::ptrdiff_t)
{
char* _root;
char* _path;
@ -329,12 +333,6 @@ class BOOST_RE_IX_DECL file_iterator
file_iterator_ref* ref;
public:
typedef std::ptrdiff_t difference_type;
typedef const char* value_type;
typedef const char** pointer;
typedef const char*& reference;
typedef std::input_iterator_tag iterator_category;
file_iterator();
file_iterator(const char* wild);
~file_iterator();
@ -368,7 +366,7 @@ inline bool operator < (const file_iterator&, const file_iterator&)
}
class BOOST_RE_IX_DECL directory_iterator
class BOOST_RE_IX_DECL directory_iterator : public BOOST_RE_INPUT_ITERATOR(const char*, std::ptrdiff_t)
{
char* _root;
char* _path;
@ -376,12 +374,6 @@ class BOOST_RE_IX_DECL directory_iterator
file_iterator_ref* ref;
public:
typedef std::ptrdiff_t difference_type;
typedef const char* value_type;
typedef const char** pointer;
typedef const char*& reference;
typedef std::input_iterator_tag iterator_category;
directory_iterator();
directory_iterator(const char* wild);
~directory_iterator();
@ -418,7 +410,9 @@ inline bool operator < (const directory_iterator&, const directory_iterator&)
}
#ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop
#endif
#endif
@ -443,4 +437,3 @@ using boost::re_detail::mapfile;

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE regex_compile.hpp
* VERSION 3.12
* VERSION 3.10
* DESCRIPTION: Declares reg_expression<> member functions. This is
* an internal header file, do not include directly.
*/
@ -25,11 +25,15 @@
#define BOOST_REGEX_COMPILE_HPP
namespace boost{
#ifdef __BORLANDC__
#pragma option push -a4 -b -Ve -pc
#endif
namespace re_detail{
#ifdef __BORLANDC__
#if __BORLANDC__ == 0x530
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve
#endif
#endif
template <class traits>
struct kmp_translator
@ -640,7 +644,7 @@ re_detail::re_syntax_base* BOOST_RE_CALL reg_expression<charT, traits, Allocator
{
re_detail::jstack<traits_string_type, Allocator> singles(64, data.allocator());
re_detail::jstack<traits_string_type, Allocator> ranges(64, data.allocator());
re_detail::jstack<boost::uint_fast32_t, Allocator> classes(64, data.allocator());
re_detail::jstack<jm_uintfast32_t, Allocator> classes(64, data.allocator());
re_detail::jstack<traits_string_type, Allocator> equivalents(64, data.allocator());
classes.push(cls);
if(dat)
@ -656,7 +660,7 @@ re_detail::re_syntax_base* BOOST_RE_CALL reg_expression<charT, traits, Allocator
{
re_detail::jstack<traits_string_type, Allocator> singles(64, data.allocator());
re_detail::jstack<traits_string_type, Allocator> ranges(64, data.allocator());
re_detail::jstack<boost::uint_fast32_t, Allocator> classes(64, data.allocator());
re_detail::jstack<jm_uintfast32_t, Allocator> classes(64, data.allocator());
re_detail::jstack<traits_string_type, Allocator> equivalents(64, data.allocator());
bool has_digraphs = false;
jm_assert(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*first) == traits_type::syntax_open_set);
@ -715,7 +719,7 @@ re_detail::re_syntax_base* BOOST_RE_CALL reg_expression<charT, traits, Allocator
fail(REG_ERANGE);
return 0;
}
boost::uint_fast32_t id = traits_inst.lookup_classname(base+2, first-2);
jm_uintfast32_t id = traits_inst.lookup_classname(base+2, first-2);
if(_flags & regbase::icase)
{
if((id == traits_type::char_class_upper) || (id == traits_type::char_class_lower))
@ -969,13 +973,13 @@ 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_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<jm_uintfast32_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));
unsigned int csingles = 0;
unsigned int cranges = 0;
boost::uint_fast32_t cclasses = 0;
jm_uintfast32_t cclasses = 0;
unsigned int cequivalents = 0;
bool nocollate_state = flags() & regbase::nocollate;
@ -1007,7 +1011,7 @@ re_detail::re_syntax_base* BOOST_RE_CALL reg_expression<charT, traits, Allocator
// be sure...
// delay throw to later:
#ifdef __BORLANDC__
boost::uint_fast32_t f = _flags;
jm_uintfast32_t f = _flags;
_flags &= ~regbase::use_except;
#endif
fail(REG_ERANGE);
@ -1048,7 +1052,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_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<jm_uintfast32_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));
@ -1080,7 +1084,7 @@ re_detail::re_syntax_base* BOOST_RE_CALL reg_expression<charT, traits, Allocator
// be sure...
// delay throw to later:
#ifdef __BORLANDC__
boost::uint_fast32_t f = _flags;
jm_uintfast32_t f = _flags;
_flags &= ~regbase::use_except;
#endif
fail(REG_ERANGE);
@ -1113,7 +1117,7 @@ re_detail::re_syntax_base* BOOST_RE_CALL reg_expression<charT, traits, Allocator
equivalents.pop();
}
boost::uint_fast32_t flags = 0;
jm_uintfast32_t flags = 0;
while(classes.empty() == false)
{
flags |= classes.peek();
@ -1155,7 +1159,7 @@ 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)
{
typedef typename boost::re_detail::rebind_allocator<bool, Allocator>::type b_alloc;
typedef BOOST_RE_MAYBE_TYPENAME REBIND_TYPE(bool, Allocator) b_alloc;
register unsigned char* base = (unsigned char*)b;
register re_detail::re_syntax_base* ptr = b;
@ -1730,13 +1734,8 @@ unsigned int BOOST_RE_CALL reg_expression<charT, traits, Allocator>::set_express
return error_code();
}
// extend:
dat = add_simple(dat, re_detail::syntax_element_jump, re_detail::re_jump_size);
/*dat = */add_simple(dat, re_detail::syntax_element_jump, re_detail::re_jump_size);
data.align();
//
// we don't know what value to put here yet,
// use an arbitrarily large value for now
// and check it later (TODO!)
((re_detail::re_jump*)dat)->alt.i = INT_MAX/2;
// now work out where to insert:
unsigned int offset = 0;
@ -2036,7 +2035,9 @@ void BOOST_RE_CALL reg_expression<charT, traits, Allocator>::fail(unsigned int e
#endif
#ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop
#endif
#endif
} // namespace boost

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE regex_config.hpp
* VERSION 3.12
* VERSION 3.10
* DESCRIPTION: auto-configure options for regular expression code.
*/
@ -50,7 +50,6 @@ full list of macros and their usage.
#include <clocale>
#include <string>
#include <boost/smart_ptr.hpp>
#include <boost/cstdint.hpp>
#else
//
// C build,
@ -76,31 +75,33 @@ full list of macros and their usage.
#define BOOST_RE_PLATFORM_W32
#endif
#if (defined(__MSL_CPP__) && __MSL_CPP__ < 0x6209) || defined(__DECCXX)
// no std::messages facet
#ifdef __MWERKS__
// no std::maessages facet
#define BOOST_RE_NO_MESSAGES
#endif
#if defined(__MSL__) || defined(__DECCXX)
#define BOOST_RE_NO_CAT
#endif
#ifdef __BORLANDC__
#if __BORLANDC__ < 0x500
#define BOOST_RE_NO_NAMESPACES
#define BOOST_RE_NO_BOOL
#define BOOST_RE_NO_MUTABLE
#endif
// versions prior to 0x530 not supported:
#if __BORLANDC__ < 0x540
#define BOOST_RE_NO_MEMBER_TEMPLATES
// inline contructors exhibit strange behaviour
// under Builder 3 and C++ 5.x when throwing exceptions
#define INLINE_EXCEPTION_BUG
#define BOOST_RE_NESTED_TEMPLATE_DECL
#define BOOST_RE_NO_PARTIAL_FUNC_SPEC
#define BOOST_RE_NO_STRING_DEF_ARGS
#define BOOST_RE_NO_TYPEINFO // bad_cast etc not in namespace std.
#endif
//
// Builder 4 seems to have broken template friend support:
#define BOOST_RE_NO_TEMPLATE_FRIEND
#if (__BORLANDC__ == 0x550) || (__BORLANDC__ == 0x551)
// problems with std::basic_string and dll RTL:
@ -121,18 +122,22 @@ full list of macros and their usage.
#error exception handling support required
#endif
#ifdef _Windows
#define BOOST_RE_PLATFORM_WINDOWS
#else
#define BOOST_RE_PLATFORM_DOS
#endif
#ifndef __WIN32__
#define BOOST_RE_CALL
#define BOOST_RE_CCALL
#else
#ifndef BOOST_RE_CALL
#define BOOST_RE_CALL __fastcall
#endif
#ifndef BOOST_RE_CCALL
#define BOOST_RE_CCALL __stdcall
#endif
#define BOOST_RE_CALL __fastcall
#define BOOST_RE_CCALL __stdcall
#endif
#define BOOST_RE_INT64t __int64
#define BOOST_RE_IMM64(val) val##i64
#define BOOST_RE_NO_CAT
// broken wide character support:
#define BOOST_RE_NO_SWPRINTF
@ -149,86 +154,39 @@ full list of macros and their usage.
#endif
//
// import export options:
#if defined(_RTLDLL) && !defined(BOOST_RE_NO_LIB)
#ifdef _RTLDLL
#ifdef BOOST_RE_BUILD_DLL
#define BOOST_RE_IX_DECL __declspec( dllexport )
#elif !defined(BOOST_REGEX_LIBRARY_INCLUDE_HPP) && !defined(BOOST_RE_NO_LIB)
#define BOOST_RE_IX_DECL __declspec( dllimport )
#endif
#endif
#ifndef BOOST_RE_NO_LIB
#include <boost/regex/detail/regex_library_include.hpp>
#endif
#include <cwchar>
#include <cwctype>
#endif
// Intel C++
#ifdef __ICL
#ifndef BOOST_RE_CALL
#ifdef _DEBUG
#define BOOST_RE_CALL __cdecl
#else
#define BOOST_RE_CALL __fastcall
#endif
#endif
#ifndef BOOST_RE_CCALL
#define BOOST_RE_CCALL __stdcall
#endif
#if !defined(_CPPUNWIND) && defined(__cplusplus)
#error exception handling support required
#endif
#define BOOST_RE_NO_CAT
#define BOOST_RE_NO_SWPRINTF
#ifdef _MT
#define BOOST_RE_THREADS
#endif
//
// import export options:
#if defined(_DLL) && !defined(BOOST_RE_STATIC_LIB) && !defined(BOOST_RE_NO_LIB)
#ifdef BOOST_RE_BUILD_DLL
#define BOOST_RE_IX_DECL __declspec( dllexport )
#elif !defined(BOOST_REGEX_LIBRARY_INCLUDE_HPP) && !defined(BOOST_RE_NO_LIB)
#define BOOST_RE_IX_DECL __declspec( dllimport )
#endif
#endif
//
// disable automatic library selection for now
// anyone know if this works?
//#include <boost/regex/detail/regex_library_include.hpp>
#endif
//
// only want "real" Visual C++ here:
#if defined(BOOST_MSVC) && !defined(__WATCOMC__) && !defined(__BORLANDC__) && !defined(__GNUC__) && !defined(__MWERKS__) && !defined (__ICL)
#ifndef BOOST_RE_CALL
#ifdef _DEBUG
#define BOOST_RE_CALL __cdecl
#else
#define BOOST_RE_CALL __fastcall
#endif
#endif
#ifndef BOOST_RE_CCALL
#define BOOST_RE_CCALL __stdcall
#endif
#define BOOST_RE_CALL __fastcall
#define BOOST_RE_CCALL __stdcall
#if BOOST_MSVC < 1100
#define BOOST_RE_NO_NAMESPACES
#define BOOST_RE_NO_DEFAULT_PARAM
#define BOOST_RE_NO_BOOL
#define BOOST_RE_NO_MUTABLE
#define BOOST_RE_NO_WCSTRING
#define BOOST_RE_NO_LOCALE_H
#define BOOST_RE_NO_TEMPLATE_RETURNS
#define BOOST_RE_NO_INT64
#endif
#if BOOST_MSVC < 1200
#define BOOST_RE_NESTED_TEMPLATE_DECL
#define BOOST_RE_NO_STRING_DEF_ARGS
#endif
@ -236,11 +194,16 @@ full list of macros and their usage.
#error exception handling support required
#endif
#define BOOST_RE_PLATFORM_WINDOWS
//
// no support for nested template classes yet....
// although this part of VC6 is badly documented
#define BOOST_RE_NO_MEMBER_TEMPLATES
#define BOOST_RE_INT64t __int64
#define BOOST_RE_IMM64(val) val##i64
#define BOOST_RE_NO_CAT
#define BOOST_RE_NO_PARTIAL_FUNC_SPEC
#define BOOST_RE_NO_TEMPLATE_FRIEND
#define BOOST_RE_NO_SWPRINTF
#ifdef _MT
@ -259,7 +222,7 @@ full list of macros and their usage.
//
// import export options:
#if defined(_DLL) && !defined(BOOST_RE_STATIC_LIB) && !defined(BOOST_RE_NO_LIB)
#if defined(_DLL) && !defined(BOOST_RE_STATIC_LIB)
#ifdef BOOST_RE_BUILD_DLL
#define BOOST_RE_IX_DECL __declspec( dllexport )
#elif !defined(BOOST_REGEX_LIBRARY_INCLUDE_HPP) && !defined(BOOST_RE_NO_LIB)
@ -273,10 +236,15 @@ full list of macros and their usage.
#ifdef __GNUC__
#if (__GNUC__ < 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ < 91))
#define BOOST_RE_NO_NAMESPACES
#define BOOST_RE_NO_MUTABLE
#define BOOST_RE_NO_MEMBER_TEMPLATES
#define BOOST_RE_NO_PARTIAL_FUNC_SPEC
#define BOOST_RE_NO_TEMPLATE_FRIEND
#endif
#define BOOST_RE_INT64t long long
#define BOOST_RE_IMM64(val) val##LL
#if defined(_WIN32) || defined(__CYGWIN__)
#ifdef _WIN32
/* there seems to be a problem with <windows.h> in gcc */
#define BOOST_RE_LOCALE_C
#define BOOST_RE_NO_W32
@ -284,6 +252,7 @@ full list of macros and their usage.
#define BOOST_RE_NO_TEMPLATE_SWITCH_MERGE
#endif
#define BOOST_RE_NO_CAT
#define BOOST_RE_NESTED_TEMPLATE_DECL
#define BOOST_RE_NO_SWPRINTF
#include <string>
#ifdef __BASTRING__
@ -293,19 +262,29 @@ full list of macros and their usage.
// for now we'll always define these
// unless we know that the platform can cope
// with wide character strings:
#if !defined(linux) || (defined(__GLIBCPP__) && !defined(_GLIBCPP_USE_WCHAR_T))
#if !defined(linux)
#define BOOST_RE_NO_WCTYPE_H
#define BOOST_RE_NO_WCSTRING
#endif
#endif
#ifdef __MWERKS__
#define BOOST_RE_NO_CAT
#endif
#ifdef __SUNPRO_CC
#if (__SUNPRO_CC < 0x500)
#define BOOST_RE_NO_NAMESPACES
#define BOOST_RE_NO_MUTABLE
#define BOOST_RE_NO_MEMBER_TEMPLATES
#define BOOST_RE_OLD_IOSTREAM
#endif
#define BOOST_RE_INT64t long long
#define BOOST_RE_IMM64(val) val##LL
#define BOOST_RE_NESTED_TEMPLATE_DECL
#define BOOST_RE_NO_SWPRINTF
#define BOOST_RE_NO_TEMPLATE_FRIEND
#define BOOST_RE_NO_LOCALE_H
#endif
@ -315,13 +294,20 @@ full list of macros and their usage.
# if (__HP_aCC < 31400)
// non-conformant aCC:
#define BOOST_RE_NO_NAMESPACES
#define BOOST_RE_NO_MUTABLE
#define BOOST_RE_OLD_IOSTREAM
#define BOOST_NO_STD_ALLOCATOR
#define BOOST_RE_NESTED_TEMPLATE_DECL
#define BOOST_RE_NO_TEMPLATE_FRIEND
#else
#if !defined(_NAMESPACE_STD)
#define BOOST_RE_OLD_IOSTREAM
#endif
#define BOOST_RE_NESTED_TEMPLATE_DECL template
#endif
#define BOOST_RE_NO_MEMBER_TEMPLATES
#define BOOST_RE_NO_MEMORY_H
#define BOOST_RE_INT64t long long
#define BOOST_RE_IMM64(val) val##LL
#define BOOST_RE_NO_SWPRINTF
#define BOOST_RE_NO_CAT
#endif
@ -347,10 +333,10 @@ full list of macros and their usage.
# endif
#endif
#if (defined(_REENTRANT) || defined(_PTHREADS) || defined(__BEOS__)) && !defined(_NOTHREADS)
#ifdef _REENTRANT
//
// Several compilers define _REENTRANT or
// _PTHREADS when threading support is turned on:
// several compilers define _REENTRANT when
// threading support is turned on:
//
#define BOOST_RE_THREADS
#endif
@ -374,6 +360,20 @@ full list of macros and their usage.
#define BOOST_RE_MAYBE_ACCESS_SPEC
#endif
#if !defined(BOOST_RE_INT64t) || !defined(BOOST_RE_IMM64)
#define BOOST_RE_NO_INT64
#endif
#ifndef BOOST_RE_INT32_LONG
typedef unsigned int jm_uintfast32_t;
#else
typedef unsigned long jm_uintfast32_t;
#endif
#ifndef BOOST_RE_NESTED_TEMPLATE_DECL
#define BOOST_RE_NESTED_TEMPLATE_DECL template
#endif
#ifndef BOOST_RE_IX_DECL
#define BOOST_RE_IX_DECL
#endif
@ -411,34 +411,33 @@ full list of macros and their usage.
#ifndef BOOST_RE_NO_ITERATOR_H
#include <iterator>
#if defined(__SGI_STL_INTERNAL_ITERATOR_H) || defined(_STLP_INTERNAL_ITERATOR_H) || defined(__SGI_STL_ITERATOR_H) || defined(__SGI_STL_PORT)
#if defined(__SGI_STL_INTERNAL_ITERATOR_H) || defined(__SGI_STL_ITERATOR_H)
/* we are using SGI's STL
some of these (std)
may be guesswork: */
# if (!defined (__SGI_STL_OWN_IOSTREAMS) && !defined(_STLP_OWN_IOSTREAMS) && !defined(__GLIBCPP__) && !defined(__STL_USE_NEW_IOSTREAMS)) || defined (__STL_HAS_NO_NEW_IOSTREAMS) || defined(_STLP_HAS_NO_NEW_IOSTREAMS) || defined (__STL_USE_NO_IOSTREAMS) || defined(__STLP_USE_NO_IOSTREAMS) || defined(__STL_NO_MBSTATE_T) || defined(__STLP_NO_MBSTATE_T)
# if (!defined (__SGI_STL_OWN_IOSTREAMS) && !defined(__GLIBCPP__) && !defined(__STL_USE_NEW_IOSTREAMS)) || defined (__STL_HAS_NO_NEW_IOSTREAMS) || defined (__STL_USE_NO_IOSTREAMS) || defined(__STL_NO_MBSTATE_T)
// Old IO streams:
#define BOOST_RE_NO_LOCALE_H
#define BOOST_RE_OLD_IOSTREAM
#else
#include <locale>
#if defined( __STL_NO_EXPLICIT_FUNCTION_TMPL_ARGS) || defined(_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS)
#ifdef __STL_NO_EXPLICIT_FUNCTION_TMPL_ARGS
#define BOOST_RE_USE_FACET(l, m) (*std::_Use_facet<m >(l))
#endif
#endif
#ifdef __BASTRING__
#define BOOST_RE_NO_WCSTRING
#endif
#if !(defined(__STL_MEMBER_TEMPLATE_CLASSES) || defined(__STLP_MEMBER_TEMPLATE_CLASSES)) || !(defined(__STL_MEMBER_TEMPLATES) || defined(__STLP_MEMBER_TEMPLATES))
#define BOOST_NO_MEMBER_TEMPLATES
#if !defined(__STL_MEMBER_TEMPLATE_CLASSES) || !defined(__STL_MEMBER_TEMPLATES)
#define BOOST_RE_NO_MEMBER_TEMPLATES
#endif
#define BOOST_RE_NO_TYPEINFO
#if defined(__STL_NO_BOOL) || defined(__STLP_NO_BOOL)
#ifdef __STL_NO_BOOL
#define BOOST_RE_NO_BOOL
#endif
#if defined(__STL_LIMITED_DEFAULT_TEMPLATES) || defined(__STLP_LIMITED_DEFAULT_TEMPLATES)
#ifdef __STL_LIMITED_DEFAULT_TEMPLATES
#define BOOST_RE_NO_TRICKY_DEFAULT_PARAM
#define BOOST_RE_NO_STRING_DEF_ARGS
#endif
@ -448,17 +447,36 @@ full list of macros and their usage.
#define BOOST_RE_ALGO_INCLUDED
#if !(defined( __STL_CLASS_PARTIAL_SPECIALIZATION) || defined(__STLP_CLASS_PARTIAL_SPECIALIZATION)) || !defined(__SGI_STL_PORT)
#define BOOST_NO_STD_DISTANCE
#endif
#define BOOST_RE_DISTANCE(i, j, n) do { n = 0; std::distance(i, j, n); } while(false)
#define BOOST_RE_OUTPUT_ITERATOR(T, D) std::output_iterator
#define BOOST_RE_INPUT_ITERATOR(T, D) std::input_iterator<T, D>
#define BOOST_RE_FWD_ITERATOR(T, D) std::forward_iterator<T, D>
#define BOOST_RE_BIDI_ITERATOR(T, D) std::bidirectional_iterator<T, D>
#define BOOST_RE_RA_ITERATOR(T, D) std::random_access_iterator<T, D>
#if defined(__STL_USE_STD_ALLOCATORS) || (defined(__SGI_STL_PORT ) && !defined(__STL_MEMBER_TEMPLATE_CLASSES) && !defined(__STL_MEMBER_TEMPLATES))
#if defined(__STL_USE_STD_ALLOCATORS) || (defined(__SGI_STL_PORT ) && !defined(__STL_MEMBER_TEMPLATE_CLASSES) && !defined(__STLP_MEMBER_TEMPLATE_CLASSES) && !defined(__STL_MEMBER_TEMPLATES) && !defined(__STLP_MEMBER_TEMPLATES))
/* new style allocator's with nested template classes */
#undef BOOST_RE_NO_MEMBER_TEMPLATES
#define REBIND_INSTANCE(x, y, inst) y::BOOST_RE_NESTED_TEMPLATE_DECL rebind<x>::other(inst)
#define REBIND_TYPE(x, y) y::BOOST_RE_NESTED_TEMPLATE_DECL rebind<x>::other
#define BOOST_RE_DEF_ALLOC_PARAM(x) BOOST_RE_TRICKY_DEFAULT_PARAM( std::allocator<x> )
#define BOOST_RE_DEF_ALLOC(x) std::allocator<x>
#else /* __STL_USE_STD_ALLOCATORS */
#define BOOST_NO_STD_ALLOCATOR
#define BOOST_RE_OLD_ALLOCATORS
#define REBIND_INSTANCE(x, y, inst) BOOST_RE_MAYBE_ACCESS_SPEC boost::re_detail::re_alloc_binder<x, y>(inst)
#define REBIND_TYPE(x, y) BOOST_RE_MAYBE_ACCESS_SPEC re_alloc_binder<x, y>
#define BOOST_RE_DEF_ALLOC_PARAM(x) BOOST_RE_TRICKY_DEFAULT_PARAM( jm_def_alloc )
#define BOOST_RE_DEF_ALLOC(x) jm_def_alloc
#define BOOST_RE_NEED_BINDER
#define BOOST_RE_NEED_ALLOC
#endif /* __STL_USE_STD_ALLOCATORS */
#define BOOST_RE_STL_DONE
#ifndef __SGI_STL_PORT
//#define BOOST_RE_NO_NOT_EQUAL
#endif
#elif defined(_RWSTD_VER) || defined(__STD_ITERATOR__)
@ -476,7 +494,7 @@ full list of macros and their usage.
#endif
#if defined(RWSTD_NO_MEMBER_TEMPLATES) || defined(RWSTD_NO_MEM_CLASS_TEMPLATES)
#define BOOST_NO_MEMBER_TEMPLATES
#define BOOST_RE_NO_MEMBER_TEMPLATES
#endif
#ifdef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE
#define BOOST_RE_NO_TEMPLATE_RETURNS
@ -486,6 +504,10 @@ full list of macros and their usage.
#error exception handling support required
#endif
#ifdef RWSTD_NO_MUTABLE
#define BOOST_RE_NO_MUTABLE
#endif
#ifdef RWSTD_NO_DEFAULT_TEMPLATES
#define BOOST_RE_NO_DEFAULT_PARAM
#define BOOST_RE_NO_TRICKY_DEFAULT_PARAM
@ -501,20 +523,57 @@ full list of macros and their usage.
#define BOOST_RE_NO_BOOL
#endif
#if (BOOST_RWSTD_VER < 0x020000) || defined(_RWSTD_NO_CLASS_PARTIAL_SPEC)
#define BOOST_NO_STD_DISTANCE
#if BOOST_RWSTD_VER > 0x020000
#ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC
#define BOOST_RE_DISTANCE(i, j, n) do { n = 0; std::distance(i, j, n); } while(false)
#else
#define BOOST_RE_DISTANCE(i, j, n) (n = std::distance(i, j))
#endif
#define BOOST_RE_OUTPUT_ITERATOR(T, D) std::iterator<std::output_iterator_tag, T, D, T*, T&>
#define BOOST_RE_INPUT_ITERATOR(T, D) std::iterator<std::input_iterator_tag, T, D, T*, T&>
#define BOOST_RE_FWD_ITERATOR(T, D) std::iterator<std::forward_iterator_tag, T, D, T*, T&>
#define BOOST_RE_BIDI_ITERATOR(T, D) std::iterator<std::bidirectional_iterator_tag, T, D, T*, T&>
#define BOOST_RE_RA_ITERATOR(T, D) std::iterator<std::random_access_iterator_tag, T, D, T*, T&>
#else
#define BOOST_RE_DISTANCE(i, j, n) std::distance(i, j, n)do { n = 0; std::distance(i, j, n); } while(false)
#define BOOST_RE_OUTPUT_ITERATOR(T, D) std::output_iterator
#if BOOST_RWSTD_VER >= 0x0200
#define BOOST_RE_INPUT_ITERATOR(T, D) std::input_iterator<T>
#else
#define BOOST_RE_INPUT_ITERATOR(T, D) std::input_iterator<T, D>
#endif
#define BOOST_RE_FWD_ITERATOR(T, D) std::forward_iterator<T, D>
#define BOOST_RE_BIDI_ITERATOR(T, D) std::bidirectional_iterator<T, D>
#define BOOST_RE_RA_ITERATOR(T, D) std::random_access_iterator<T, D>
#endif
#include <memory>
#if !defined(_RWSTD_ALLOCATOR)
#if defined(_RWSTD_ALLOCATOR) && !defined(BOOST_RE_NO_MEMORY_H) && !defined(BOOST_RE_NO_MEMBER_TEMPLATES)
/* new style allocator */
#define REBIND_INSTANCE(x, y, inst) y::BOOST_RE_NESTED_TEMPLATE_DECL rebind<x>::other(inst)
#define REBIND_TYPE(x, y) y::BOOST_RE_NESTED_TEMPLATE_DECL rebind<x>::other
#define BOOST_RE_DEF_ALLOC_PARAM(x) BOOST_RE_TRICKY_DEFAULT_PARAM( std::allocator<x> )
#define BOOST_RE_DEF_ALLOC(x) std::allocator<x>
#else
/*
// old style allocator
// this varies a great deal between versions, and there is no way
// that I can tell of differentiating between them, so use our
// own default allocator...
*/
#define BOOST_NO_STD_ALLOCATOR
#define BOOST_RE_OLD_ALLOCATORS
#define REBIND_INSTANCE(x, y, inst) BOOST_RE_MAYBE_ACCESS_SPEC boost::re_detail::re_alloc_binder<x, y>(inst)
#define REBIND_TYPE(x, y) BOOST_RE_MAYBE_ACCESS_SPEC re_alloc_binder<x, y>
#define BOOST_RE_DEF_ALLOC_PARAM(x) BOOST_RE_TRICKY_DEFAULT_PARAM( jm_def_alloc )
#define BOOST_RE_DEF_ALLOC(x) jm_def_alloc
#define BOOST_RE_NEED_BINDER
#define BOOST_RE_NEED_ALLOC
#endif
#define BOOST_RE_STL_DONE
@ -522,14 +581,57 @@ full list of macros and their usage.
#define BOOST_RE_NO_OI_ASSIGN
#endif
#elif defined (ITERATOR_H)
/* HP STL */
#define BOOST_RE_NO_LOCALE_H
#include <algo.h>
#define BOOST_RE_ALGO_INCLUDED
#define BOOST_RE_DISTANCE(i, j, n) std::distance(i, j, n)do { n = 0; std::distance(i, j, n); } while(false)
#define BOOST_RE_OUTPUT_ITERATOR(T, D) std::output_iterator
#define BOOST_RE_INPUT_ITERATOR(T, D) std::input_iterator<T, D>
#define BOOST_RE_FWD_ITERATOR(T, D) std::forward_iterator<T, D>
#define BOOST_RE_BIDI_ITERATOR(T, D) std::bidirectional_iterator<T, D>
#define BOOST_RE_RA_ITERATOR(T, D) std::random_access_iterator<T, D>
/* old style allocator */
#define BOOST_RE_OLD_ALLOCATORS
#define REBIND_INSTANCE(x, y, inst) BOOST_RE_MAYBE_ACCESS_SPEC boost::re_detail::re_alloc_binder<x, y>(inst)
#define REBIND_TYPE(x, y) BOOST_RE_MAYBE_ACCESS_SPEC re_alloc_binder<x, y>
#define BOOST_RE_DEF_ALLOC_PARAM(x) BOOST_RE_TRICKY_DEFAULT_PARAM( jm_def_alloc )
#define BOOST_RE_DEF_ALLOC(x) jm_def_alloc
#define BOOST_RE_NEED_BINDER
#define BOOST_RE_NEED_ALLOC
#define BOOST_RE_NO_NOT_EQUAL
#define BOOST_RE_STL_DONE
#elif (defined(BOOST_MSVC) || defined(__ICL)) && (defined(_YVALS) || defined(_CPPLIB_VER))
/* VC6 or Intel C++, with Dinkum STL */
#define BOOST_RE_NO_OI_ASSIGN
#define BOOST_RE_DISTANCE(i, j, n) n = std::distance(i, j)
#define BOOST_RE_OUTPUT_ITERATOR(T, D) std::iterator<std::output_iterator_tag, T, D>
#define BOOST_RE_INPUT_ITERATOR(T, D) std::iterator<std::input_iterator_tag, T, D>
#define BOOST_RE_FWD_ITERATOR(T, D) std::iterator<std::forward_iterator_tag, T, D>
#define BOOST_RE_BIDI_ITERATOR(T, D) std::iterator<std::bidirectional_iterator_tag, T, D>
#define BOOST_RE_RA_ITERATOR(T, D) std::iterator<std::random_access_iterator_tag, T, D>
/* MS's allocators are rather ambiguous about their properties
at least as far as MSDN is concerned, so play safe: */
#define BOOST_NO_STD_ALLOCATOR
#define BOOST_RE_OLD_ALLOCATORS
#define REBIND_INSTANCE(x, y, inst) BOOST_RE_MAYBE_ACCESS_SPEC boost::re_detail::re_alloc_binder<x, y>(inst)
#define REBIND_TYPE(x, y) BOOST_RE_MAYBE_ACCESS_SPEC re_alloc_binder<x, y>
#define BOOST_RE_DEF_ALLOC_PARAM(x) BOOST_RE_TRICKY_DEFAULT_PARAM( jm_def_alloc )
#define BOOST_RE_DEF_ALLOC(x) jm_def_alloc
#define BOOST_RE_NEED_BINDER
#define BOOST_RE_NEED_ALLOC
#define BOOST_RE_STL_DONE
#ifndef _CPPLIB_VER
@ -546,12 +648,59 @@ full list of macros and their usage.
/* unknown STL version
try the defaults: */
// dwa 10/05/00 Why were we assuming a broken distance in this case?
#define BOOST_RE_DISTANCE(i, j, n) (n = std::distance(i, j))
/* these may be suspect for older libraries */
#define BOOST_RE_OUTPUT_ITERATOR(T, D) std::iterator<std::output_iterator_tag, T, D, T*, T&>
#define BOOST_RE_INPUT_ITERATOR(T, D) std::iterator<std::input_iterator_tag, T, D, T*, T&>
#define BOOST_RE_FWD_ITERATOR(T, D) std::iterator<std::forward_iterator_tag, T, D, T*, T&>
#define BOOST_RE_BIDI_ITERATOR(T, D) std::iterator<std::bidirectional_iterator_tag, T, D, T*, T&>
#define BOOST_RE_RA_ITERATOR(T, D) std::iterator<std::random_access_iterator_tag, T, D, T*, T&>
#endif /* <iterator> config */
#else /* no <iterator> at all */
#define BOOST_RE_DISTANCE(i, j, n) (n = j - i)
#define BOOST_RE_OUTPUT_ITERATOR(T, D) boost::re_detail::dummy_iterator_base<T>
#define BOOST_RE_INPUT_ITERATOR(T, D) boost::re_detail::dummy_iterator_base<T>
#define BOOST_RE_FWD_ITERATOR(T, D) boost::re_detail::dummy_iterator_base<T>
#define BOOST_RE_BIDI_ITERATOR(T, D) boost::re_detail::dummy_iterator_base<T>
#define BOOST_RE_RA_ITERATOR(T, D) boost::re_detail::dummy_iterator_base<T>
#endif
/* now do allocator if not already done */
#ifndef BOOST_RE_STL_DONE
#ifdef BOOST_RE_NO_MEMORY_H
/* old style allocator */
#define BOOST_RE_OLD_ALLOCATORS
#define REBIND_INSTANCE(x, y, inst) BOOST_RE_MAYBE_ACCESS_SPEC boost::re_detail::re_alloc_binder<x, y>(inst)
#define REBIND_TYPE(x, y) BOOST_RE_MAYBE_ACCESS_SPEC re_alloc_binder<x, y>
#define BOOST_RE_DEF_ALLOC_PARAM(x) BOOST_RE_TRICKY_DEFAULT_PARAM( jm_def_alloc )
#define BOOST_RE_DEF_ALLOC(x) jm_def_alloc
#define BOOST_RE_NEED_BINDER
#define BOOST_RE_NEED_ALLOC
#else
/* new style allocator's with nested template classes */
#define REBIND_INSTANCE(x, y, inst) y::BOOST_RE_NESTED_TEMPLATE_DECL rebind<x>::other(inst)
#define REBIND_TYPE(x, y) y::BOOST_RE_NESTED_TEMPLATE_DECL rebind<x>::other
#define BOOST_RE_DEF_ALLOC_PARAM(x) BOOST_RE_TRICKY_DEFAULT_PARAM( std::allocator<x> )
#define BOOST_RE_DEF_ALLOC(x) std::allocator<x>
#endif
#endif
#endif // BOOST_RE_AUTO_CONFIGURE
@ -587,6 +736,12 @@ full list of macros and their usage.
/* compiler configuration goes here: */
#ifdef BOOST_RE_NO_MUTABLE
#define BOOST_RE_MUTABLE
#else
#define BOOST_RE_MUTABLE mutable
#endif
#if defined( BOOST_RE_NO_BOOL) && !defined(bool)
#define bool int
#define true 1
@ -609,9 +764,6 @@ full list of macros and their usage.
#define BOOST_RE_NO_STRING_DEF_ARGS
#endif
#if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_NO_STD_ALLOCATOR)
#define BOOST_NO_STD_ALLOCATOR
#endif
/* add our class def's if they are needed: */
@ -620,7 +772,11 @@ namespace boost{
namespace re_detail{
#ifdef __BORLANDC__
#pragma option push -a4 -b -Ve -pc
#if __BORLANDC__ == 0x530
#pragma option push -a4 -b
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b
#endif
#endif
// add our destroy functions:
@ -676,7 +832,7 @@ public:
const Allocator& BOOST_RE_CALL instance()const { return *this; }
#ifndef BOOST_NO_MEMBER_TEMPLATES
#ifndef BOOST_RE_NO_MEMBER_TEMPLATES
template <class U>
struct rebind
@ -729,7 +885,7 @@ public:
::operator delete(p);
}
#ifndef BOOST_NO_MEMBER_TEMPLATES
#ifndef BOOST_RE_NO_MEMBER_TEMPLATES
template <class U>
struct rebind
{
@ -771,42 +927,20 @@ inline bool BOOST_RE_CALL boolify(I val)
#define BOOST_RE_MAKE_BOOL(x) x
#endif
template <class T, class A>
struct rebind_allocator
{
#ifdef BOOST_NO_STD_ALLOCATOR
typedef re_alloc_binder<T,A> type;
#else
typedef typename A::template rebind<T> binder;
typedef typename binder::other type;
#endif
};
#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 __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop
#endif
#endif
} // namespace re_detail
} // namespace boost
#ifdef BOOST_NO_STD_ALLOCATOR
#define BOOST_RE_DEF_ALLOC(T) boost::re_detail::jm_def_alloc
#define BOOST_RE_DEF_ALLOC_PARAM(T) BOOST_RE_DEFAULT_PARAM(boost::re_detail::jm_def_alloc)
#else
#include <memory>
#define BOOST_RE_DEF_ALLOC(T) std::allocator<T>
#define BOOST_RE_DEF_ALLOC_PARAM(T) BOOST_RE_TRICKY_DEFAULT_PARAM(std::allocator<T>)
#ifdef BOOST_RE_NEED_BINDER
using re_detail::re_alloc_binder;
#endif
#ifdef BOOST_RE_NEED_ALLOC
using re_detail::jm_def_alloc;
#endif
} // namespace boost
#ifdef __GNUC__
#define INLINE_EXCEPTION_BUG
@ -886,6 +1020,11 @@ public:
#ifdef __BORLANDC__
#pragma message "macro allocator: " BOOST_RE_DEF_ALLOC_PARAM(wchar_t)
#pragma message "macro jm_input_iterator: " BOOST_RE_INPUT_ITERATOR(char, std::ptrdiff_t)
#pragma message "macro jm_output_iterator: " BOOST_RE_OUTPUT_ITERATOR(char, std::ptrdiff_t)
#pragma message "macro jm_fwd_iterator: " BOOST_RE_FWD_ITERATOR(char, std::ptrdiff_t)
#pragma message "macro jm_bidi_iterator: " BOOST_RE_BIDI_ITERATOR(char, std::ptrdiff_t)
#pragma message "macro jm_ra_iterator: " BOOST_RE_RA_ITERATOR(char, std::ptrdiff_t)
#ifdef BOOST_RE_LOCALE_CPP
#pragma message "locale support enabled"
#endif
@ -1007,7 +1146,7 @@ public:
#undef wcsxfrm
#endif
#if defined(BOOST_NO_STDC_NAMESPACE) || (defined(std) && defined(__SGI_STL_PORT)) || defined(_STLP_IMPORT_VENDOR_CSTD) || defined(__STL_IMPORT_VENDOR_CSTD)
#if defined(BOOST_NO_STDC_NAMESPACE) || (defined(std) && defined(__SGI_STL_PORT))
//
// fix namespaces,
// note that we almost always do this for STLPort, as it doesn't always
@ -1133,8 +1272,6 @@ namespace std{

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE regex_cstring.hpp
* VERSION 3.12
* VERSION 3.10
* DESCRIPTION: This is an internal header file, do not include directly.
* String support and helper functions, for regular
* expression library.
@ -35,7 +35,11 @@ namespace boost{
namespace re_detail{
#ifdef __BORLANDC__
#pragma option push -a4 -b -Ve -pc
#if __BORLANDC__ == 0x530
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve
#endif
#endif
//
@ -120,7 +124,9 @@ inline void BOOST_RE_CALL re_strfree(charT* p)
}
#ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop
#endif
#endif
} // namespace re_detail

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE regex_format.hpp
* VERSION 3.12
* VERSION 3.10
* DESCRIPTION: Provides formatting output routines for search and replace
* operations. Note this is an internal header file included
* by regex.hpp, do not include on its own.
@ -33,14 +33,17 @@ enum format_flags_t{
format_sed = match_max << 1, // sed style replacement.
format_perl = format_sed << 1, // perl style replacement.
format_no_copy = format_perl << 1, // don't copy non-matching segments.
format_first_only = format_no_copy << 1, // Only replace first occurance.
format_is_if = format_first_only << 1 // internal use only.
format_is_if = format_no_copy << 1 // internal use only.
};
namespace re_detail{
#ifdef __BORLANDC__
#pragma option push -a4 -b -Ve -pc
#if __BORLANDC__ == 0x530
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve -w-8037
#endif
#endif
template <class O, class I>
@ -469,7 +472,7 @@ public:
oi_assign(out, re_copy_out(*out, iterator(m[-1].first), iterator(m[-1].second)));
oi_assign(out, _reg_format_aux(*out, m, f, flags, *pt));
*last = m[-2].first;
return flags & format_first_only ? false : true;
return true;
}
};
@ -566,7 +569,9 @@ std::basic_string<charT> regex_merge(const std::basic_string<charT>& s,
}
#ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop
#endif
#endif
} // namespace boost

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE regex_kmp.hpp
* VERSION 3.12
* VERSION 3.10
* DESCRIPTION: Provides Knuth Morris Pratt search operations.
* Note this is an internal header file included
* by regex.hpp, do not include on its own.
@ -34,7 +34,11 @@ namespace boost{
namespace re_detail{
#ifdef __BORLANDC__
#pragma option push -a4 -b -Ve -pc
#if __BORLANDC__ == 0x530
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve
#endif
#endif
template <class charT>
@ -49,17 +53,17 @@ 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 BOOST_RE_MAYBE_TYPENAME REBIND_TYPE(char, Allocator) 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 BOOST_RE_MAYBE_TYPENAME REBIND_TYPE(char, Allocator) atype;
int i, j, m;
i = 0;
m = boost::re_detail::distance(first, last);
BOOST_RE_DISTANCE(first, last, m);
++m;
unsigned int size = sizeof(kmp_info<charT>) + sizeof(int)*m + sizeof(charT)*m;
--m;
@ -98,7 +102,9 @@ kmp_info<charT>* kmp_compile(iterator first, iterator last, charT, Trans transla
}
#ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop
#endif
#endif
} // namepsace re_detail

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE regex_libary_include.hpp
* VERSION 3.12
* VERSION 3.10
* DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers.
* Note this is an internal header file included
* by regex.hpp, do not include on its own.

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE regex_match.hpp
* VERSION 3.12
* VERSION 3.10
* DESCRIPTION: Regular expression matching algorithms.
* Note this is an internal header file included
* by regex.hpp, do not include on its own.
@ -31,7 +31,11 @@ namespace boost{
namespace re_detail{
#ifdef __BORLANDC__
#pragma option push -a4 -b -Ve -pc
#if __BORLANDC__ == 0x530
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve
#endif
#endif
template <class iterator, class charT, class traits_type, class Allocator>
@ -146,8 +150,8 @@ 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 BOOST_RE_MAYBE_TYPENAME REBIND_TYPE(int, Allocator) i_alloc;
typedef BOOST_RE_MAYBE_TYPENAME REBIND_TYPE(iterator, Allocator) it_alloc;
match_results_base<iterator, Allocator> temp_match;
// failure stacks:
@ -205,10 +209,12 @@ void _priv_match_data<iterator, Allocator>::free()
{
if(caccumulators)
{
//REBIND_INSTANCE(int, Allocator, temp_match.allocator()).deallocate(accumulators, caccumulators);
i_alloc temp1(temp_match.allocator());
temp1.deallocate(accumulators, caccumulators);
for(unsigned i = 0; i < caccumulators; ++i)
jm_destroy(loop_starts + i);
//REBIND_INSTANCE(iterator, Allocator, temp_match.allocator()).deallocate(loop_starts, caccumulators);
it_alloc temp2(temp_match.allocator());
temp2.deallocate(loop_starts, caccumulators);
}
@ -1158,9 +1164,7 @@ unsigned int reg_grep2(Predicate foo, I first, I last, const reg_expression<char
// depending on what the first record is we may be able to
// optimise the search:
type = (flags & match_continuous) ?
static_cast<unsigned int>(regbase::restart_continue)
: static_cast<unsigned int>(access::restart_type(e));
type = (flags & match_continuous) ? regbase::restart_continue : access::restart_type(e);
if(type == regbase::restart_buf)
return cmatches;
@ -1194,13 +1198,13 @@ unsigned int reg_grep2(Predicate foo, I first, I last, const reg_expression<char
++cmatches;
if(foo(m) == false)
return cmatches;
if(m[0].second == last)
return cmatches;
_skip_and_inc(clines, last_line, first, restart);
next_base = m[0].second;
pd.temp_match.init_fail(next_base, last);
m.init_fail(next_base, last);
j = 0;
if(m[0].second == last)
return cmatches;
}
else
{
@ -1809,7 +1813,9 @@ inline unsigned int regex_grep(bool (*foo)(const match_results<std::basic_string
#ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop
#endif
#endif
} // namespace boost

View File

@ -10,6 +10,21 @@
/* BOOST_NO_STDC_NAMESPACE C library not in namespace std */
/* #define BOOST_NO_STDC_NAMESPACE */
/* BOOST_RE_NO_MUTABLE Disables use of mutable keyword. */
/* #define BOOST_RE_NO_MUTABLE */
/* BOOST_RE_INT32_LONG If 32-bit integers are long */
/* #define BOOST_RE_INT32_LONG */
/* BOOST_RE_NO_TEMPLATE_FRIEND If template friend declarations are not supported */
/* #define BOOST_RE_NO_TEMPLATE_FRIEND */
/* BOOST_RE_PLATFORM_WINDOWS Platform is MS Windows. */
/* #define BOOST_RE_PLATFORM_WINDOWS */
/* BOOST_RE_PLATFORM_DOS Platform if MSDOS. */
/* #define BOOST_RE_PLATFORM_DOS */
/* BOOST_RE_PLATFORM_W32 Platform is MS Win32 */
/* #define BOOST_RE_PLATFORM_W32 */
@ -34,8 +49,8 @@
/* 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_MEMBER_TEMPLATES If member function templates or nested template classes are not allowed. */
/* #define BOOST_RE_NO_MEMBER_TEMPLATES */
/* BOOST_RE_NO_TEMPLATE_RETURNS If template functions based on return type are not supported. */
/* #define BOOST_RE_NO_TEMPLATE_RETURNS */
@ -43,6 +58,25 @@
/* BOOST_RE_NO_PARTIAL_FUNC_SPEC If partial template function specialisation is not supported */
/* #define BOOST_RE_NO_PARTIAL_FUNC_SPEC */
/* BOOST_RE_NO_INT64 If 64bit integers are not supported. */
/* BOOST_RE_INT64t The type of a 64-bit signed integer if available. */
/* BOOST_RE_IMM64(val) Declares a 64-bit immediate value by appending any
necessary suffix to val. */
/* BOOST_RE_INT64_T 0 = NA
1 = short
2 = int
3 = long
4 = int64_t
5 = long long
6 = __int64 */
/* #define BOOST_RE_INT64_T_0 */
/* #define BOOST_RE_INT64_T_1 */
/* #define BOOST_RE_INT64_T_2 */
/* #define BOOST_RE_INT64_T_3 */
/* #define BOOST_RE_INT64_T_4 */
/* #define BOOST_RE_INT64_T_5 */
/* #define BOOST_RE_INT64_T_6 */
/* BOOST_RE_NO_CAT Define if the compiler does not support POSIX style
message categories (catopen catgets catclose). */
/* #define BOOST_RE_NO_CAT */
@ -51,6 +85,15 @@
the current translation mode. */
/* #define BOOST_RE_THREADS */
/* BOOST_RE_NESTED_TEMPLATE_DECL Defaults to template, the standard prefix when accessing
nested template classes, can be redefined to nothing if
the compiler does not support this. */
/* #define BOOST_RE_NESTED_TEMPLATE_DECL */
/* BOOST_RE_NO_TEMPLATE_INST If explicit template instantiation with the "template class X<T>"
syntax is not supported */
/* #define BOOST_RE_NO_TEMPLATE_INST */
/* BOOST_RE_NO_TEMPLATE_MERGE If template in separate translation units don't merge at link time */
/* #define BOOST_RE_NO_TEMPLATE_MERGE */
@ -84,11 +127,11 @@
/* 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
/* BOOST_RE_NO_MEMORY_H 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 */
/* #define BOOST_RE_NO_MEMORY_H */
/* BOOST_RE_NO_LOCALE_H Define if there is no verion of the standard
<locale> header available. */
@ -111,13 +154,267 @@
/* 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_DISTANCE_T For std::distance:
0 = NA
1 = std::distance(i, j, n)
2 = n = std::distance(i, j) */
/* #define BOOST_RE_DISTANCE_T_0 */
/* #define BOOST_RE_DISTANCE_T_1 */
/* #define BOOST_RE_DISTANCE_T_2 */
/* BOOST_RE_ITERATOR_T Defines generic standard iterator type if available, use this as
a shortcut to define all the other iterator types.
1 = std::iterator<std::tag_type, T, D, T*, T&>
2 = std::iterator<std::tag_type, T, D> */
/* #define BOOST_RE_ITERATOR_T_0 */
/* #define BOOST_RE_ITERATOR_T_1 */
/* #define BOOST_RE_ITERATOR_T_2 */
/* BOOST_RE_OI_T For output iterators:
0 = NA
1 = std::iterator<std::output_iterator_tag, T, D, T*, T&>
2 = std::iterator<std::output_iterator_tag, T, D>
3 = std::output_iterator */
/* #define BOOST_RE_OI_T_0 */
/* #define BOOST_RE_OI_T_1 */
/* #define BOOST_RE_OI_T_2 */
/* #define BOOST_RE_OI_T_3 */
/* BOOST_RE_II_T For input iterators:
0 = NA
1 = std::iterator<std::input_iterator_tag, T, D, T*, T&>
2 = std::iterator<std::input_iterator_tag, T, D>
3 = std::input_iterator<T, D>
4 = std::input_iterator<T> */
/* #define BOOST_RE_II_T_0 */
/* #define BOOST_RE_II_T_1 */
/* #define BOOST_RE_II_T_2 */
/* #define BOOST_RE_II_T_3 */
/* #define BOOST_RE_II_T_4 */
/* BOOST_RE_FI_T For forward iterators:
0 = NA
1 = std::iterator<std::forward_iterator_tag, T, D, T*, T&>
2 = std::iterator<std::forward_iterator_tag, T, D>
3 = std::forward_iterator<T, D> */
/* #define BOOST_RE_FI_T_0 */
/* #define BOOST_RE_FI_T_1 */
/* #define BOOST_RE_FI_T_2 */
/* #define BOOST_RE_FI_T_3 */
/* BOOST_RE_BI_T For bidirectional iterators:
0 = NA
1 = std::iterator<std::bidirectional_iterator_tag, T, D, T*, T&>
2 = std::iterator<std::bidirectional_iterator_tag, T, D>
3 = std::bidirectional_iterator<T, D> */
/* #define BOOST_RE_BI_T_0 */
/* #define BOOST_RE_BI_T_1 */
/* #define BOOST_RE_BI_T_2 */
/* #define BOOST_RE_BI_T_3 */
/* BOOST_RE_RI_T For random access iterators:
0 = NA
1 = std::iterator<std::random_access_iterator_tag, T, D, T*, T&>
2 = std::iterator<std::random_access_iterator_tag, T, D>
3 = std::random_access_iterator<T, D> */
/* #define BOOST_RE_RI_T_0 */
/* #define BOOST_RE_RI_T_1 */
/* #define BOOST_RE_RI_T_2 */
/* #define BOOST_RE_RI_T_3 */
/* 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 */
#ifdef BOOST_RE_INT64_T_0
#define BOOST_RE_NO_INT64
#elif defined(BOOST_RE_INT64_T_1)
#define BOOST_RE_INT64t short
#define BOOST_RE_IMM64(val) val
#elif defined(BOOST_RE_INT64_T_2)
#define BOOST_RE_INT64t int
#define BOOST_RE_IMM64(val) val
#elif defined(BOOST_RE_INT64_T_3)
#define BOOST_RE_INT64t long
#define BOOST_RE_IMM64(val) val##L
#elif defined(BOOST_RE_INT64_T_4)
#define BOOST_RE_INT64t int64_t
#define BOOST_RE_IMM64(val) INT64_C(val)
#elif defined(BOOST_RE_INT64_T_5)
#define BOOST_RE_INT64t long long
#define BOOST_RE_IMM64(val) val##LL
#elif defined(BOOST_RE_INT64_T_6)
#define BOOST_RE_INT64t __int64
#define BOOST_RE_IMM64(val) val##i64
#else
syntax error: unknown value for BOOST_RE_INT64_T
#endif
#ifdef BOOST_RE_DISTANCE_T_0
# define BOOST_RE_DISTANCE(i, j, n) n = j - i
#elif defined(BOOST_RE_DISTANCE_T_1)
# define BOOST_RE_DISTANCE(i, j, n) n = std::distance(i, j)
#elif defined(BOOST_RE_DISTANCE_T_2)
# define BOOST_RE_DISTANCE(i, j, n) (n = 0, std::distance(i, j, n))
#else
syntax erorr
#endif
#ifdef BOOST_RE_ITERATOR_T_0
#ifndef BOOST_RE_OI_T_0
#define BOOST_RE_OI_T_0 BOOST_RE_ITERATOR_T_0
#endif
#ifndef BOOST_RE_II_T_0
#define BOOST_RE_II_T_0 BOOST_RE_ITERATOR_T_0
#endif
#ifndef BOOST_RE_FI_T_0
#define BOOST_RE_FI_T_0 BOOST_RE_ITERATOR_T_0
#endif
#ifndef BOOST_RE_BI_T_0
#define BOOST_RE_BI_T_0 BOOST_RE_ITERATOR_T_0
#endif
#ifndef BOOST_RE_RI_T_0
#define BOOST_RE_RI_T_0 BOOST_RE_ITERATOR_T_0
#endif
#endif
#ifdef BOOST_RE_ITERATOR_T_1
#ifndef BOOST_RE_OI_T_1
#define BOOST_RE_OI_T_1 BOOST_RE_ITERATOR_T_1
#endif
#ifndef BOOST_RE_II_T_1
#define BOOST_RE_II_T_1 BOOST_RE_ITERATOR_T_1
#endif
#ifndef BOOST_RE_FI_T_1
#define BOOST_RE_FI_T_1 BOOST_RE_ITERATOR_T_1
#endif
#ifndef BOOST_RE_BI_T_1
#define BOOST_RE_BI_T_1 BOOST_RE_ITERATOR_T_1
#endif
#ifndef BOOST_RE_RI_T_1
#define BOOST_RE_RI_T_1 BOOST_RE_ITERATOR_T_1
#endif
#endif
#ifdef BOOST_RE_ITERATOR_T_2
#ifndef BOOST_RE_OI_T_2
#define BOOST_RE_OI_T_2 BOOST_RE_ITERATOR_T_2
#endif
#ifndef BOOST_RE_II_T_2
#define BOOST_RE_II_T_2 BOOST_RE_ITERATOR_T_2
#endif
#ifndef BOOST_RE_FI_T_2
#define BOOST_RE_FI_T_2 BOOST_RE_ITERATOR_T_2
#endif
#ifndef BOOST_RE_BI_T_2
#define BOOST_RE_BI_T_2 BOOST_RE_ITERATOR_T_2
#endif
#ifndef BOOST_RE_RI_T_2
#define BOOST_RE_RI_T_2 BOOST_RE_ITERATOR_T_2
#endif
#endif
#ifdef BOOST_RE_ITERATOR_T_3
#ifndef BOOST_RE_OI_T_3
#define BOOST_RE_OI_T_3 BOOST_RE_ITERATOR_T_3
#endif
#ifndef BOOST_RE_II_T_3
#define BOOST_RE_II_T_3 BOOST_RE_ITERATOR_T_3
#endif
#ifndef BOOST_RE_FI_T_3
#define BOOST_RE_FI_T_3 BOOST_RE_ITERATOR_T_3
#endif
#ifndef BOOST_RE_BI_T_3
#define BOOST_RE_BI_T_3 BOOST_RE_ITERATOR_T_3
#endif
#ifndef BOOST_RE_RI_T_3
#define BOOST_RE_RI_T_3 BOOST_RE_ITERATOR_T_3
#endif
#endif
#ifdef BOOST_RE_ITERATOR_T_4
#ifndef BOOST_RE_OI_T_4
#define BOOST_RE_OI_T_4 BOOST_RE_ITERATOR_T_4
#endif
#ifndef BOOST_RE_II_T_4
#define BOOST_RE_II_T_4 BOOST_RE_ITERATOR_T_4
#endif
#ifndef BOOST_RE_FI_T_4
#define BOOST_RE_FI_T_4 BOOST_RE_ITERATOR_T_4
#endif
#ifndef BOOST_RE_BI_T_4
#define BOOST_RE_BI_T_4 BOOST_RE_ITERATOR_T_4
#endif
#ifndef BOOST_RE_RI_T_4
#define BOOST_RE_RI_T_4 BOOST_RE_ITERATOR_T_4
#endif
#endif
#ifdef BOOST_RE_OI_T_0
# define BOOST_RE_OUTPUT_ITERATOR(T, D) boost::re_detail::dummy_iterator_base<T>
#elif defined(BOOST_RE_OI_T_1)
# define BOOST_RE_OUTPUT_ITERATOR(T, D) std::iterator<std::output_iterator_tag, T, D, T*, T&>
#elif defined(BOOST_RE_OI_T_2)
# define BOOST_RE_OUTPUT_ITERATOR(T, D) std::iterator<std::output_iterator_tag, T, D>
#elif defined(BOOST_RE_OI_T_3)
# define BOOST_RE_OUTPUT_ITERATOR(T, D) std::output_iterator
#else
syntax error
#endif
#ifdef BOOST_RE_II_T_0
# define BOOST_RE_INPUT_ITERATOR(T, D) boost::re_detail::dummy_iterator_base<T>
#elif defined(BOOST_RE_II_T_1)
#define BOOST_RE_INPUT_ITERATOR(T, D) std::iterator<std::input_iterator_tag, T, D, T*, T&>
#elif defined(BOOST_RE_II_T_2)
#define BOOST_RE_INPUT_ITERATOR(T, D) std::iterator<std::input_iterator_tag, T, D>
#elif defined(BOOST_RE_II_T_3)
# define BOOST_RE_INPUT_ITERATOR(T, D) std::input_iterator<T, D>
#elif defined(BOOST_RE_II_T_4)
# define BOOST_RE_INPUT_ITERATOR(T, D) std::input_iterator<T>
#else
syntax error
#endif
#ifdef BOOST_RE_FI_T_0
# define BOOST_RE_FWD_ITERATOR(T, D) boost::re_detail::dummy_iterator_base<T>
#elif defined(BOOST_RE_FI_T_1)
# define BOOST_RE_FWD_ITERATOR(T, D) std::iterator<std::forward_iterator_tag, T, D, T*, T&>
#elif defined(BOOST_RE_FI_T_2)
# define BOOST_RE_FWD_ITERATOR(T, D) std::iterator<std::forward_iterator_tag, T, D>
#elif defined(BOOST_RE_FI_T_3)
# define BOOST_RE_FWD_ITERATOR(T, D) std::forward_iterator<T, D>
#else
syntax error
#endif
#ifdef BOOST_RE_BI_T_0
# define BOOST_RE_BIDI_ITERATOR(T, D) boost::re_detail::dummy_iterator_base<T>
#elif defined(BOOST_RE_BI_T_1)
# define BOOST_RE_BIDI_ITERATOR(T, D) std::iterator<std::bidirectional_iterator_tag, T, D, T*, T&>
#elif defined(BOOST_RE_BI_T_2)
# define BOOST_RE_BIDI_ITERATOR(T, D) std::iterator<std::bidirectional_iterator_tag, T, D>
#elif defined(BOOST_RE_BI_T_3)
# define BOOST_RE_BIDI_ITERATOR(T, D) std::bidirectional_iterator<T, D>
#else
syntax error
#endif
#ifdef BOOST_RE_RI_T_0
# define BOOST_RE_RA_ITERATOR(T, D) boost::re_detail::dummy_iterator_base<T>
#elif defined(BOOST_RE_RI_T_1)
# define BOOST_RE_RA_ITERATOR(T, D) std::iterator<std::random_access_iterator_tag, T, D, T*, T&>
#elif defined(BOOST_RE_RI_T_2)
# define BOOST_RE_RA_ITERATOR(T, D) std::iterator<std::random_access_iterator_tag, T, D>
#elif defined(BOOST_RE_RI_T_3)
# define BOOST_RE_RA_ITERATOR(T, D) std::random_access_iterator<T, D>
#else
syntax error
#endif
#include <stdexcept>
#ifndef BOOST_RE_NO_ITERATOR_H
@ -129,6 +426,24 @@
#endif
#endif
#if defined(BOOST_RE_NO_MEMORY_H) || defined(__GNUC__)
#define BOOST_RE_OLD_ALLOCATORS
#define REBIND_INSTANCE(x, y, inst) re_alloc_binder<x, y>(inst)
#define REBIND_TYPE(x, y) re_alloc_binder<x, y>
#define BOOST_RE_DEF_ALLOC_PARAM(x) BOOST_RE_DEFAULT_PARAM( boost::re_detail::jm_def_alloc )
#define BOOST_RE_DEF_ALLOC(x) boost::re_detail::jm_def_alloc
#define BOOST_RE_NEED_BINDER
#define BOOST_RE_NEED_ALLOC
#else
#include <memory>
#define REBIND_INSTANCE(x, y, inst) y::BOOST_RE_NESTED_TEMPLATE_DECL rebind<x>::other(inst)
#define REBIND_TYPE(x, y) y::BOOST_RE_NESTED_TEMPLATE_DECL rebind<x>::other
#define BOOST_RE_DEF_ALLOC_PARAM(x) BOOST_RE_TRICKY_DEFAULT_PARAM( std::allocator<x> )
#define BOOST_RE_DEF_ALLOC(x) std::allocator<x>
#endif
#endif // BOOST_RE_AUTO_CONFIGURE

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE regex_raw_buffer.hpp
* VERSION 3.12
* VERSION 3.10
* DESCRIPTION: Raw character buffer for regex code.
* Note this is an internal header file included
* by regex.hpp, do not include on its own.
@ -33,7 +33,11 @@ namespace boost{
namespace re_detail{
#ifdef __BORLANDC__
#pragma option push -a4 -b -Ve -pc
#if __BORLANDC__ == 0x530
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve
#endif
#endif
struct empty_padding{};
@ -105,7 +109,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 BOOST_RE_MAYBE_TYPENAME REBIND_TYPE(unsigned char, allocator_type) alloc_inst_type;
typedef typename alloc_inst_type::size_type size_type;
typedef typename alloc_inst_type::pointer pointer;
private:
@ -232,7 +236,9 @@ void* BOOST_RE_CALL raw_storage<Allocator>::insert(size_type pos, size_type n)
}
#ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop
#endif
#endif
} // namespace re_detail

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE regex_split.hpp
* VERSION 3.12
* VERSION 3.10
* DESCRIPTION: Implements regex_split and associated functions.
* Note this is an internal header file included
* by regex.hpp, do not include on its own.
@ -28,7 +28,11 @@
namespace boost{
#ifdef __BORLANDC__
#pragma option push -a4 -b -Ve -pc
#if __BORLANDC__ == 0x530
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve
#endif
#endif
namespace re_detail{
@ -141,7 +145,9 @@ inline std::size_t regex_split(OutputIterator out,
}
#ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop
#endif
#endif
} // namespace boost

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE regex_stack.hpp
* VERSION 3.12
* VERSION 3.10
* DESCRIPTION: Implements customised internal regex stacks.
* Note this is an internal header file included
* by regex.hpp, do not include on its own.
@ -36,7 +36,11 @@ namespace boost{
namespace re_detail{
#ifdef __BORLANDC__
#pragma option push -a4 -b -Ve -pc
#if __BORLANDC__ == 0x530
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve
#endif
#endif
//
@ -48,8 +52,8 @@ template <class T, class Allocator BOOST_RE_DEF_ALLOC_PARAM(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 BOOST_RE_MAYBE_TYPENAME REBIND_TYPE(unsigned char, Allocator) allocator_type;
typedef BOOST_RE_MAYBE_TYPENAME REBIND_TYPE(T, Allocator) T_alloc_type;
typedef typename T_alloc_type::size_type size_type;
typedef T value_type;
struct node
@ -207,7 +211,9 @@ jstack<T, Allocator>::~jstack()
}
#ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop
#endif
#endif
} // namespace re_detail

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE regex_synch.hpp
* VERSION 3.12
* VERSION 3.10
* DESCRIPTION: Thread synchronisation for regex code.
* Note this is an internal header file included
* by regex.hpp, do not include on its own.
@ -33,21 +33,20 @@
#include <windows.h>
#endif
#if !defined(BOOST_RE_PLATFORM_W32) && defined(BOOST_RE_THREADS)
#if defined(__BEOS__)
#include <OS.h>
#include <cassert>
#else
#if !defined(BOOST_RE_PLATFORM_W32) && defined(BOOST_RE_THREADS)
#include <pthread.h>
#endif
#endif
namespace boost{
namespace re_detail{
#ifdef __BORLANDC__
#pragma option push -a4 -b -Ve -pc
#if __BORLANDC__ == 0x530
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve
#endif
#endif
void BOOST_RE_CALL re_init_threads();
@ -56,35 +55,6 @@ void BOOST_RE_CALL re_free_threads();
#ifdef BOOST_RE_THREADS
#ifndef BOOST_RE_PLATFORM_W32
#ifdef __BEOS__
typedef sem_id CRITICAL_SECTION;
inline void BOOST_RE_CALL InitializeCriticalSection(CRITICAL_SECTION* ps)
{
*ps = create_sem(1, "regex++");
assert(*ps > 0);
}
inline void BOOST_RE_CALL DeleteCriticalSection(CRITICAL_SECTION* ps)
{
int t = delete_sem(*ps);
assert(t == B_NO_ERROR);
}
inline void BOOST_RE_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)
{
status_t t = release_sem(*ps);
assert(t == B_NO_ERROR);
}
#else // __BEOS__
typedef pthread_mutex_t CRITICAL_SECTION;
@ -107,7 +77,7 @@ inline void BOOST_RE_CALL LeaveCriticalSection(CRITICAL_SECTION* ps)
{
pthread_mutex_unlock(ps);
}
#endif // __BEOS__
#endif
template <class Lock>
@ -170,7 +140,7 @@ public:
typedef lock_guard<critical_section> ro_guard;
typedef lock_guard<critical_section> rw_guard;
friend class lock_guard<critical_section>;
friend lock_guard<critical_section>;
};
inline bool BOOST_RE_CALL operator==(const critical_section&, const critical_section&)
@ -197,7 +167,9 @@ BOOST_RE_IX_DECL extern unsigned int re_lock_count;
#endif // BOOST_RE_THREADS
#ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop
#endif
#endif
} // namespace re_detail

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE pattern_except.cpp
* VERSION 3.12
* VERSION 3.10
* DESCRIPTION: Declares pattern-matching exception classes.
*/
@ -28,7 +28,11 @@
namespace boost{
#ifdef __BORLANDC__
#pragma option push -a4 -b -Ve -pc
#if __BORLANDC__ == 0x530
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve
#endif
#endif
class BOOST_RE_IX_DECL bad_pattern : public std::runtime_error
@ -47,7 +51,9 @@ public:
#ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop
#endif
#endif
} // namespace boost

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE regex.cpp
* VERSION 3.12
* VERSION 3.10
* DESCRIPTION: Declares regular expression traits classes.
*/
@ -29,7 +29,11 @@
namespace boost{
#ifdef __BORLANDC__
#pragma option push -a4 -b -Ve -pc
#if __BORLANDC__ == 0x530
#pragma option push -a4 -b -Ve
#elif __BORLANDC__ > 0x530
#pragma option push -a8 -b -Ve
#endif
#endif
template <class charT>
@ -143,7 +147,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 set_message_catalogue(const std::string& s);
protected:
#if defined(__MWERKS__) && __MWERKS__ <= 0x6000
friend class c_regex_traits<char>;
@ -160,13 +164,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 jm_uintfast32_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();
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 error_string(unsigned id);
static char* get_catalogue() { return regex_message_catalogue; }
};
} // namespace re_detail
@ -183,7 +187,7 @@ public:
typedef std::string string_type;
typedef int locale_type;
static std::size_t BOOST_RE_CALL length(const char_type* p)
static size_t BOOST_RE_CALL length(const char_type* p)
{
return std::strlen(p);
}
@ -209,7 +213,7 @@ public:
return false;
}
static bool BOOST_RE_CALL is_class(char c, boost::uint_fast32_t f)
static bool BOOST_RE_CALL is_class(char c, jm_uintfast32_t f)
{
return BOOST_RE_MAKE_BOOL(class_map[(size_type)(uchar_type)c] & f);
}
@ -217,7 +221,7 @@ public:
static int BOOST_RE_CALL toi(char c);
static int BOOST_RE_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 jm_uintfast32_t BOOST_RE_CALL lookup_classname(const char* first, const char* last)
{
std::string s(first, last);
return do_lookup_class(s.c_str());
@ -229,7 +233,7 @@ public:
return do_lookup_collate(buf, s.c_str());
}
static locale_type BOOST_RE_CALL imbue(locale_type l){ return l; }
static locale_type imbue(locale_type l){ return l; }
locale_type BOOST_RE_CALL getloc()const{ return locale_type(); }
c_regex_traits()
@ -246,10 +250,10 @@ public:
{ c_regex_traits<char>::update(); }
operator void*() { return this; }
};
static void BOOST_RE_CALL update();
static void update();
private:
static void BOOST_RE_CALL init();
static void BOOST_RE_CALL free();
static void init();
static void free();
static c_regex_traits<char> i;
static unsigned sort_type;
@ -267,7 +271,7 @@ 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 size_t BOOST_RE_CALL length(const char_type* p)
{
return std::wcslen(p);
}
@ -289,7 +293,7 @@ public:
static bool BOOST_RE_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_RE_CALL is_class(wchar_t c, jm_uintfast32_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));
}
@ -297,11 +301,11 @@ public:
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 boost::uint_fast32_t BOOST_RE_CALL lookup_classname(const wchar_t* first, const wchar_t* last);
static jm_uintfast32_t BOOST_RE_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 locale_type BOOST_RE_CALL imbue(locale_type l){ return l; }
static locale_type imbue(locale_type l){ return l; }
locale_type BOOST_RE_CALL getloc()const{ return locale_type(); }
c_regex_traits<wchar_t>()
{ init(); }
@ -317,7 +321,7 @@ public:
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);
private:
static bool BOOST_RE_CALL do_iswclass(wchar_t c, boost::uint_fast32_t f);
static bool BOOST_RE_CALL do_iswclass(wchar_t c, jm_uintfast32_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);
@ -353,7 +357,7 @@ struct BOOST_RE_IX_DECL w32_traits_base : public regex_traits_base
char_class_unicode = 0x0400
};
public:
static std::string BOOST_RE_CALL set_message_catalogue(const std::string& s);
static std::string set_message_catalogue(const std::string& s);
protected:
static char regex_message_catalogue[200];
enum syntax_map_size
@ -365,13 +369,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 jm_uintfast32_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();
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 error_string(unsigned id);
static char* get_catalogue() { return regex_message_catalogue; }
};
} // namespace re_detail
@ -390,7 +394,7 @@ public:
typedef std::string string_type;
typedef int locale_type;
static std::size_t BOOST_RE_CALL length(const char_type* p)
static size_t BOOST_RE_CALL length(const char_type* p)
{
return std::strlen(p);
}
@ -416,7 +420,7 @@ public:
return false;
}
static bool BOOST_RE_CALL is_class(char c, boost::uint_fast32_t f)
static bool BOOST_RE_CALL is_class(char c, jm_uintfast32_t f)
{
return BOOST_RE_MAKE_BOOL(class_map[(size_type)(uchar_type)c] & f);
}
@ -424,7 +428,7 @@ public:
static int BOOST_RE_CALL toi(char c);
static int BOOST_RE_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 jm_uintfast32_t BOOST_RE_CALL lookup_classname(const char* first, const char* last)
{
std::string s(first, last);
return do_lookup_class(s.c_str());
@ -436,7 +440,7 @@ public:
return do_lookup_collate(buf, s.c_str());
}
static locale_type BOOST_RE_CALL imbue(locale_type l){ return l; }
static locale_type imbue(locale_type l){ return l; }
locale_type BOOST_RE_CALL getloc()const{ return locale_type(); }
struct sentry
@ -446,7 +450,7 @@ public:
~sentry(){}
operator void*() { return this; }
};
static void BOOST_RE_CALL update();
static void update();
w32_regex_traits();
~w32_regex_traits();
private:
@ -464,7 +468,7 @@ 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 size_t BOOST_RE_CALL length(const char_type* p)
{
return std::wcslen(p);
}
@ -486,7 +490,7 @@ public:
static bool BOOST_RE_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_RE_CALL is_class(wchar_t c, jm_uintfast32_t f)
{
return BOOST_RE_MAKE_BOOL(((uchar_type)c < 256) ? (wide_unicode_classes[(size_type)(uchar_type)c] & f) : do_iswclass(c, f));
}
@ -494,11 +498,11 @@ public:
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 boost::uint_fast32_t BOOST_RE_CALL lookup_classname(const wchar_t* first, const wchar_t* last);
static jm_uintfast32_t BOOST_RE_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 locale_type BOOST_RE_CALL imbue(locale_type l){ return l; }
static locale_type imbue(locale_type l){ return l; }
locale_type BOOST_RE_CALL getloc()const{ return locale_type(); }
struct sentry
@ -515,7 +519,7 @@ public:
static unsigned int BOOST_RE_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_iswclass(wchar_t c, jm_uintfast32_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 w32_regex_traits<wchar_t> init_;
static wchar_t BOOST_RE_CALL wtolower(wchar_t c);
@ -570,7 +574,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 set_message_catalogue(const std::string& s);
protected:
static char regex_message_cat[200];
};
@ -607,7 +611,7 @@ public:
cpp_regex_traits();
~cpp_regex_traits();
static std::size_t BOOST_RE_CALL length(const char_type* p)
static size_t BOOST_RE_CALL length(const char_type* p)
{
return std::strlen(p);
}
@ -636,7 +640,7 @@ public:
return false;
}
bool BOOST_RE_CALL is_class(char c, boost::uint_fast32_t f)const
bool BOOST_RE_CALL is_class(char c, jm_uintfast32_t f)const
{
if(pctype->is((std::ctype<char>::mask)(f & char_class_all_base), c))
return true;
@ -650,7 +654,7 @@ public:
int BOOST_RE_CALL toi(char c)const;
int BOOST_RE_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;
jm_uintfast32_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;
std::string BOOST_RE_CALL error_string(unsigned id)const;
@ -693,7 +697,7 @@ private:
public:
static std::size_t BOOST_RE_CALL length(const char_type* p)
static size_t BOOST_RE_CALL length(const char_type* p)
{
return std::wcslen(p);
}
@ -720,7 +724,7 @@ public:
static bool BOOST_RE_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_RE_CALL is_class(wchar_t c, jm_uintfast32_t f)const
{
if(pctype->is((std::ctype<wchar_t>::mask)(f & char_class_all_base), c))
return true;
@ -736,14 +740,14 @@ public:
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;
boost::uint_fast32_t BOOST_RE_CALL lookup_classname(const wchar_t* first, const wchar_t* last)const;
jm_uintfast32_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;
std::string BOOST_RE_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; }
locale_type BOOST_RE_CALL BOOST_RE_CALL getloc()const{ return locale_inst; }
unsigned int BOOST_RE_CALL strwiden(wchar_t *s1, unsigned int len, const char *s2)const;
struct sentry
@ -782,7 +786,9 @@ class regex_traits : public cpp_regex_traits<charT>
#endif
#ifdef __BORLANDC__
#if __BORLANDC__ > 0x520
#pragma option pop
#endif
#endif
} // namespace boost

View File

@ -1,48 +0,0 @@
/*
*
* Copyright (c) 1998-2000
* Dr John Maddock
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Dr John Maddock makes no representations
* about the suitability of this software for any purpose.
* It is provided "as is" without express or implied warranty.
*
*/
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE src.cpp
* VERSION 3.11
* 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
* 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
#endif
//
// include library source files:
//
#ifdef BOOST_RE_LOCALE_W32
#include "libs/regex/src/w32_regex_traits.cpp"
#elif defined(BOOST_RE_LOCALE_C)
#include "libs/regex/src/c_regex_traits.cpp"
#else
#include "libs/regex/src/cpp_regex_traits.cpp"
#endif
#include "libs/regex/src/c_regex_traits_common.cpp"
#include "libs/regex/src/cregex.cpp"
#include "libs/regex/src/fileiter.cpp"
#include "libs/regex/src/posix_api.cpp"
#include "libs/regex/src/wide_posix_api.cpp"
#include "libs/regex/src/regex.cpp"
#include "libs/regex/src/regex_debug.cpp"
#include "libs/regex/src/regex_synch.cpp"

View File

@ -23,7 +23,7 @@ content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
</td>
<td valign="top" width="50%"><h3 align="center">Regex++,
Index.</h3>
<p><i>(version 3.12, 18 April 2000)</i> </p>
<p><i>(version 3.10, 18 April 2000)</i> </p>
<pre><i>Copyright (c) 1998-2000
Dr John Maddock

View File

@ -23,7 +23,7 @@ content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
</td>
<td valign="top" width="50%"><h3 align="center">Regex++,
Introduction.</h3>
<p><i>(version 3.12, 18 April 2000)</i> </p>
<p><i>(version 3.10, 18 April 2000)</i> </p>
<pre><i>Copyright (c) 1998-2000
Dr John Maddock
@ -247,7 +247,7 @@ can use it, instructions for specific platforms are as follows: </p>
<ul>
<li>Open up a console window and change to the
&lt;boost&gt;\libs\regex\build directory. </li>
&lt;boost&gt;\libs\regex\lib directory. </li>
<li>Select the appropriate makefile (bcb4.mak for C++ Builder
4, bcb5.mak for C++ Builder 5, and bcc55.mak for the 5.5
command line tools). </li>
@ -304,7 +304,7 @@ href="http://ourworld.compuserve.com/homepages/john_maddock/regexpp.htm">library
<p>Open up a command prompt, which has the necessary MSVC
environment variables defined (for example by using the batch
file Vcvars32.bat installed by the Visual Studio installation),
and change to the &lt;boost&gt;\libs\regex\build directory. </p>
and change to the &lt;boost&gt;\libs\regex\lib directory. </p>
<p>Select the correct makefile - vc6.mak for &quot;vanilla&quot;
Visual C++ 6 or vc6-stlport.mak if you are using STLPort.</p>
@ -410,7 +410,7 @@ run one of the makefiles described above.</p>
<p><b>Sun Workshop 6.1</b></p>
<p>There is a makefile for the sun (6.1) compiler (C++ version 3.12).
<p>There is a makefile for the sun (6.1) compiler (C++ version 3.10).
From the command prompt change to the &lt;boost&gt;/libs/regex/build
directory and type: </p>

327
jm_opt.in
View File

@ -10,6 +10,21 @@
/* BOOST_NO_STDC_NAMESPACE C library not in namespace std */
#undef BOOST_NO_STDC_NAMESPACE
/* BOOST_RE_NO_MUTABLE Disables use of mutable keyword. */
#undef BOOST_RE_NO_MUTABLE
/* BOOST_RE_INT32_LONG If 32-bit integers are long */
#undef BOOST_RE_INT32_LONG
/* BOOST_RE_NO_TEMPLATE_FRIEND If template friend declarations are not supported */
#undef BOOST_RE_NO_TEMPLATE_FRIEND
/* BOOST_RE_PLATFORM_WINDOWS Platform is MS Windows. */
#undef BOOST_RE_PLATFORM_WINDOWS
/* BOOST_RE_PLATFORM_DOS Platform if MSDOS. */
#undef BOOST_RE_PLATFORM_DOS
/* BOOST_RE_PLATFORM_W32 Platform is MS Win32 */
#undef BOOST_RE_PLATFORM_W32
@ -34,8 +49,8 @@
/* BOOST_RE_NO_WSPRINTF If there is no wsprintf available. */
#undef BOOST_RE_NO_WSPRINTF
/* BOOST_NO_MEMBER_TEMPLATES If member function templates or nested template classes are not allowed. */
#undef BOOST_NO_MEMBER_TEMPLATES
/* BOOST_RE_NO_MEMBER_TEMPLATES If member function templates or nested template classes are not allowed. */
#undef BOOST_RE_NO_MEMBER_TEMPLATES
/* BOOST_RE_NO_TEMPLATE_RETURNS If template functions based on return type are not supported. */
#undef BOOST_RE_NO_TEMPLATE_RETURNS
@ -43,6 +58,25 @@
/* BOOST_RE_NO_PARTIAL_FUNC_SPEC If partial template function specialisation is not supported */
#undef BOOST_RE_NO_PARTIAL_FUNC_SPEC
/* BOOST_RE_NO_INT64 If 64bit integers are not supported. */
/* BOOST_RE_INT64t The type of a 64-bit signed integer if available. */
/* BOOST_RE_IMM64(val) Declares a 64-bit immediate value by appending any
necessary suffix to val. */
/* BOOST_RE_INT64_T 0 = NA
1 = short
2 = int
3 = long
4 = int64_t
5 = long long
6 = __int64 */
#undef BOOST_RE_INT64_T_0
#undef BOOST_RE_INT64_T_1
#undef BOOST_RE_INT64_T_2
#undef BOOST_RE_INT64_T_3
#undef BOOST_RE_INT64_T_4
#undef BOOST_RE_INT64_T_5
#undef BOOST_RE_INT64_T_6
/* BOOST_RE_NO_CAT Define if the compiler does not support POSIX style
message categories (catopen catgets catclose). */
#undef BOOST_RE_NO_CAT
@ -51,6 +85,15 @@
the current translation mode. */
#undef BOOST_RE_THREADS
/* BOOST_RE_NESTED_TEMPLATE_DECL Defaults to template, the standard prefix when accessing
nested template classes, can be redefined to nothing if
the compiler does not support this. */
#undef BOOST_RE_NESTED_TEMPLATE_DECL
/* BOOST_RE_NO_TEMPLATE_INST If explicit template instantiation with the "template class X<T>"
syntax is not supported */
#undef BOOST_RE_NO_TEMPLATE_INST
/* BOOST_RE_NO_TEMPLATE_MERGE If template in separate translation units don't merge at link time */
#undef BOOST_RE_NO_TEMPLATE_MERGE
@ -84,11 +127,11 @@
/* BOOST_RE_NO_ITERATOR_H Define if you do not have a version of <iterator>. */
#undef BOOST_RE_NO_ITERATOR_H
/* BOOST_NO_STD_ALLOCATOR Define if <memory> does not fully comply with the
/* BOOST_RE_NO_MEMORY_H 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. */
#undef BOOST_NO_STD_ALLOCATOR
#undef BOOST_RE_NO_MEMORY_H
/* BOOST_RE_NO_LOCALE_H Define if there is no verion of the standard
<locale> header available. */
@ -111,13 +154,267 @@
/* BOOST_RE_OLD_IOSTREAM If the new iostreamm classes are not available */
#undef BOOST_RE_OLD_IOSTREAM
/* BOOST_NO_STD_DISTANCE If there is no std::distance. */
#undef BOOST_NO_STD_DISTANCE
/* BOOST_RE_DISTANCE_T For std::distance:
0 = NA
1 = std::distance(i, j, n)
2 = n = std::distance(i, j) */
#undef BOOST_RE_DISTANCE_T_0
#undef BOOST_RE_DISTANCE_T_1
#undef BOOST_RE_DISTANCE_T_2
/* BOOST_RE_ITERATOR_T Defines generic standard iterator type if available, use this as
a shortcut to define all the other iterator types.
1 = std::iterator<std::tag_type, T, D, T*, T&>
2 = std::iterator<std::tag_type, T, D> */
#undef BOOST_RE_ITERATOR_T_0
#undef BOOST_RE_ITERATOR_T_1
#undef BOOST_RE_ITERATOR_T_2
/* BOOST_RE_OI_T For output iterators:
0 = NA
1 = std::iterator<std::output_iterator_tag, T, D, T*, T&>
2 = std::iterator<std::output_iterator_tag, T, D>
3 = std::output_iterator */
#undef BOOST_RE_OI_T_0
#undef BOOST_RE_OI_T_1
#undef BOOST_RE_OI_T_2
#undef BOOST_RE_OI_T_3
/* BOOST_RE_II_T For input iterators:
0 = NA
1 = std::iterator<std::input_iterator_tag, T, D, T*, T&>
2 = std::iterator<std::input_iterator_tag, T, D>
3 = std::input_iterator<T, D>
4 = std::input_iterator<T> */
#undef BOOST_RE_II_T_0
#undef BOOST_RE_II_T_1
#undef BOOST_RE_II_T_2
#undef BOOST_RE_II_T_3
#undef BOOST_RE_II_T_4
/* BOOST_RE_FI_T For forward iterators:
0 = NA
1 = std::iterator<std::forward_iterator_tag, T, D, T*, T&>
2 = std::iterator<std::forward_iterator_tag, T, D>
3 = std::forward_iterator<T, D> */
#undef BOOST_RE_FI_T_0
#undef BOOST_RE_FI_T_1
#undef BOOST_RE_FI_T_2
#undef BOOST_RE_FI_T_3
/* BOOST_RE_BI_T For bidirectional iterators:
0 = NA
1 = std::iterator<std::bidirectional_iterator_tag, T, D, T*, T&>
2 = std::iterator<std::bidirectional_iterator_tag, T, D>
3 = std::bidirectional_iterator<T, D> */
#undef BOOST_RE_BI_T_0
#undef BOOST_RE_BI_T_1
#undef BOOST_RE_BI_T_2
#undef BOOST_RE_BI_T_3
/* BOOST_RE_RI_T For random access iterators:
0 = NA
1 = std::iterator<std::random_access_iterator_tag, T, D, T*, T&>
2 = std::iterator<std::random_access_iterator_tag, T, D>
3 = std::random_access_iterator<T, D> */
#undef BOOST_RE_RI_T_0
#undef BOOST_RE_RI_T_1
#undef BOOST_RE_RI_T_2
#undef BOOST_RE_RI_T_3
/* BOOST_RE_NO_OI_ASSIGN If output iterators ostream_iterator<>, back_insert_iterator<> and
front_insert_iterator<> do not have assignment operators */
#undef BOOST_RE_NO_OI_ASSIGN
#ifdef BOOST_RE_INT64_T_0
#define BOOST_RE_NO_INT64
#elif defined(BOOST_RE_INT64_T_1)
#define BOOST_RE_INT64t short
#define BOOST_RE_IMM64(val) val
#elif defined(BOOST_RE_INT64_T_2)
#define BOOST_RE_INT64t int
#define BOOST_RE_IMM64(val) val
#elif defined(BOOST_RE_INT64_T_3)
#define BOOST_RE_INT64t long
#define BOOST_RE_IMM64(val) val##L
#elif defined(BOOST_RE_INT64_T_4)
#define BOOST_RE_INT64t int64_t
#define BOOST_RE_IMM64(val) INT64_C(val)
#elif defined(BOOST_RE_INT64_T_5)
#define BOOST_RE_INT64t long long
#define BOOST_RE_IMM64(val) val##LL
#elif defined(BOOST_RE_INT64_T_6)
#define BOOST_RE_INT64t __int64
#define BOOST_RE_IMM64(val) val##i64
#else
syntax error: unknown value for BOOST_RE_INT64_T
#endif
#ifdef BOOST_RE_DISTANCE_T_0
# define BOOST_RE_DISTANCE(i, j, n) n = j - i
#elif defined(BOOST_RE_DISTANCE_T_1)
# define BOOST_RE_DISTANCE(i, j, n) n = std::distance(i, j)
#elif defined(BOOST_RE_DISTANCE_T_2)
# define BOOST_RE_DISTANCE(i, j, n) (n = 0, std::distance(i, j, n))
#else
syntax erorr
#endif
#ifdef BOOST_RE_ITERATOR_T_0
#ifndef BOOST_RE_OI_T_0
#define BOOST_RE_OI_T_0 BOOST_RE_ITERATOR_T_0
#endif
#ifndef BOOST_RE_II_T_0
#define BOOST_RE_II_T_0 BOOST_RE_ITERATOR_T_0
#endif
#ifndef BOOST_RE_FI_T_0
#define BOOST_RE_FI_T_0 BOOST_RE_ITERATOR_T_0
#endif
#ifndef BOOST_RE_BI_T_0
#define BOOST_RE_BI_T_0 BOOST_RE_ITERATOR_T_0
#endif
#ifndef BOOST_RE_RI_T_0
#define BOOST_RE_RI_T_0 BOOST_RE_ITERATOR_T_0
#endif
#endif
#ifdef BOOST_RE_ITERATOR_T_1
#ifndef BOOST_RE_OI_T_1
#define BOOST_RE_OI_T_1 BOOST_RE_ITERATOR_T_1
#endif
#ifndef BOOST_RE_II_T_1
#define BOOST_RE_II_T_1 BOOST_RE_ITERATOR_T_1
#endif
#ifndef BOOST_RE_FI_T_1
#define BOOST_RE_FI_T_1 BOOST_RE_ITERATOR_T_1
#endif
#ifndef BOOST_RE_BI_T_1
#define BOOST_RE_BI_T_1 BOOST_RE_ITERATOR_T_1
#endif
#ifndef BOOST_RE_RI_T_1
#define BOOST_RE_RI_T_1 BOOST_RE_ITERATOR_T_1
#endif
#endif
#ifdef BOOST_RE_ITERATOR_T_2
#ifndef BOOST_RE_OI_T_2
#define BOOST_RE_OI_T_2 BOOST_RE_ITERATOR_T_2
#endif
#ifndef BOOST_RE_II_T_2
#define BOOST_RE_II_T_2 BOOST_RE_ITERATOR_T_2
#endif
#ifndef BOOST_RE_FI_T_2
#define BOOST_RE_FI_T_2 BOOST_RE_ITERATOR_T_2
#endif
#ifndef BOOST_RE_BI_T_2
#define BOOST_RE_BI_T_2 BOOST_RE_ITERATOR_T_2
#endif
#ifndef BOOST_RE_RI_T_2
#define BOOST_RE_RI_T_2 BOOST_RE_ITERATOR_T_2
#endif
#endif
#ifdef BOOST_RE_ITERATOR_T_3
#ifndef BOOST_RE_OI_T_3
#define BOOST_RE_OI_T_3 BOOST_RE_ITERATOR_T_3
#endif
#ifndef BOOST_RE_II_T_3
#define BOOST_RE_II_T_3 BOOST_RE_ITERATOR_T_3
#endif
#ifndef BOOST_RE_FI_T_3
#define BOOST_RE_FI_T_3 BOOST_RE_ITERATOR_T_3
#endif
#ifndef BOOST_RE_BI_T_3
#define BOOST_RE_BI_T_3 BOOST_RE_ITERATOR_T_3
#endif
#ifndef BOOST_RE_RI_T_3
#define BOOST_RE_RI_T_3 BOOST_RE_ITERATOR_T_3
#endif
#endif
#ifdef BOOST_RE_ITERATOR_T_4
#ifndef BOOST_RE_OI_T_4
#define BOOST_RE_OI_T_4 BOOST_RE_ITERATOR_T_4
#endif
#ifndef BOOST_RE_II_T_4
#define BOOST_RE_II_T_4 BOOST_RE_ITERATOR_T_4
#endif
#ifndef BOOST_RE_FI_T_4
#define BOOST_RE_FI_T_4 BOOST_RE_ITERATOR_T_4
#endif
#ifndef BOOST_RE_BI_T_4
#define BOOST_RE_BI_T_4 BOOST_RE_ITERATOR_T_4
#endif
#ifndef BOOST_RE_RI_T_4
#define BOOST_RE_RI_T_4 BOOST_RE_ITERATOR_T_4
#endif
#endif
#ifdef BOOST_RE_OI_T_0
# define BOOST_RE_OUTPUT_ITERATOR(T, D) boost::re_detail::dummy_iterator_base<T>
#elif defined(BOOST_RE_OI_T_1)
# define BOOST_RE_OUTPUT_ITERATOR(T, D) std::iterator<std::output_iterator_tag, T, D, T*, T&>
#elif defined(BOOST_RE_OI_T_2)
# define BOOST_RE_OUTPUT_ITERATOR(T, D) std::iterator<std::output_iterator_tag, T, D>
#elif defined(BOOST_RE_OI_T_3)
# define BOOST_RE_OUTPUT_ITERATOR(T, D) std::output_iterator
#else
syntax error
#endif
#ifdef BOOST_RE_II_T_0
# define BOOST_RE_INPUT_ITERATOR(T, D) boost::re_detail::dummy_iterator_base<T>
#elif defined(BOOST_RE_II_T_1)
#define BOOST_RE_INPUT_ITERATOR(T, D) std::iterator<std::input_iterator_tag, T, D, T*, T&>
#elif defined(BOOST_RE_II_T_2)
#define BOOST_RE_INPUT_ITERATOR(T, D) std::iterator<std::input_iterator_tag, T, D>
#elif defined(BOOST_RE_II_T_3)
# define BOOST_RE_INPUT_ITERATOR(T, D) std::input_iterator<T, D>
#elif defined(BOOST_RE_II_T_4)
# define BOOST_RE_INPUT_ITERATOR(T, D) std::input_iterator<T>
#else
syntax error
#endif
#ifdef BOOST_RE_FI_T_0
# define BOOST_RE_FWD_ITERATOR(T, D) boost::re_detail::dummy_iterator_base<T>
#elif defined(BOOST_RE_FI_T_1)
# define BOOST_RE_FWD_ITERATOR(T, D) std::iterator<std::forward_iterator_tag, T, D, T*, T&>
#elif defined(BOOST_RE_FI_T_2)
# define BOOST_RE_FWD_ITERATOR(T, D) std::iterator<std::forward_iterator_tag, T, D>
#elif defined(BOOST_RE_FI_T_3)
# define BOOST_RE_FWD_ITERATOR(T, D) std::forward_iterator<T, D>
#else
syntax error
#endif
#ifdef BOOST_RE_BI_T_0
# define BOOST_RE_BIDI_ITERATOR(T, D) boost::re_detail::dummy_iterator_base<T>
#elif defined(BOOST_RE_BI_T_1)
# define BOOST_RE_BIDI_ITERATOR(T, D) std::iterator<std::bidirectional_iterator_tag, T, D, T*, T&>
#elif defined(BOOST_RE_BI_T_2)
# define BOOST_RE_BIDI_ITERATOR(T, D) std::iterator<std::bidirectional_iterator_tag, T, D>
#elif defined(BOOST_RE_BI_T_3)
# define BOOST_RE_BIDI_ITERATOR(T, D) std::bidirectional_iterator<T, D>
#else
syntax error
#endif
#ifdef BOOST_RE_RI_T_0
# define BOOST_RE_RA_ITERATOR(T, D) boost::re_detail::dummy_iterator_base<T>
#elif defined(BOOST_RE_RI_T_1)
# define BOOST_RE_RA_ITERATOR(T, D) std::iterator<std::random_access_iterator_tag, T, D, T*, T&>
#elif defined(BOOST_RE_RI_T_2)
# define BOOST_RE_RA_ITERATOR(T, D) std::iterator<std::random_access_iterator_tag, T, D>
#elif defined(BOOST_RE_RI_T_3)
# define BOOST_RE_RA_ITERATOR(T, D) std::random_access_iterator<T, D>
#else
syntax error
#endif
#include <stdexcept>
#ifndef BOOST_RE_NO_ITERATOR_H
@ -129,6 +426,24 @@
#endif
#endif
#if defined(BOOST_RE_NO_MEMORY_H) || defined(__GNUC__)
#define BOOST_RE_OLD_ALLOCATORS
#define REBIND_INSTANCE(x, y, inst) re_alloc_binder<x, y>(inst)
#define REBIND_TYPE(x, y) re_alloc_binder<x, y>
#define BOOST_RE_DEF_ALLOC_PARAM(x) BOOST_RE_DEFAULT_PARAM( boost::re_detail::jm_def_alloc )
#define BOOST_RE_DEF_ALLOC(x) boost::re_detail::jm_def_alloc
#define BOOST_RE_NEED_BINDER
#define BOOST_RE_NEED_ALLOC
#else
#include <memory>
#define REBIND_INSTANCE(x, y, inst) y::BOOST_RE_NESTED_TEMPLATE_DECL rebind<x>::other(inst)
#define REBIND_TYPE(x, y) y::BOOST_RE_NESTED_TEMPLATE_DECL rebind<x>::other
#define BOOST_RE_DEF_ALLOC_PARAM(x) BOOST_RE_TRICKY_DEFAULT_PARAM( std::allocator<x> )
#define BOOST_RE_DEF_ALLOC(x) std::allocator<x>
#endif
#endif // BOOST_RE_AUTO_CONFIGURE

View File

@ -4,7 +4,7 @@ ALL_DEP=@ac_all_dep@
base: ./build/libboost_regex.a
./build/libboost_regex.a: $(ALL_DEP)
sh dmi.sh build
sh dmi.sh lib
jgrep : base
@ -26,4 +26,3 @@ all : base jgrep test timer

View File

@ -490,7 +490,7 @@ EOF
# now for the main target for this library:
echo $subdir\\$libname.lib : $all_obj >> $tout
echo " tlib @&&|" >> $tout
echo "/P32 /C /u /a \$(XSFLAGS) $subdir\\$libname.lib $all_lib_obj" >> $tout
echo "/P32 /u /a \$(XSFLAGS) $subdir\\$libname.lib $all_lib_obj" >> $tout
echo "|" >> $tout
echo "" >> $tout
}
@ -1041,6 +1041,5 @@ rm -f $tout $iout

View File

@ -30,9 +30,14 @@
#define JM_CSTD std
#define JM jm
#define JM_RA_ITERATOR(a,b) BOOST_RE_RA_ITERATOR(a,b)
#ifdef BOOST_RE_OLD_IOSTREAM
#define JM_OLD_IOSTREAM
#endif
#ifdef BOOST_RE_NO_MEMBER_TEMPLATES
#define JM_NO_MEMBER_TEMPLATES
#endif
#ifdef __cplusplus

View File

@ -20,7 +20,7 @@
<H3> Regex++, POSIX API Reference.</H3>
</CENTER>
<CENTER>
<I>(version 3.12, 18 April 2000)</I>
<I>(version 3.10, 18 April 2000)</I>
</CENTER>
<PRE><I>Copyright (c) 1998-2000
Dr John Maddock

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE c_regex_traits.cpp
* VERSION 3.12
* VERSION 3.10
* DESCRIPTION: Implements the c_regex_traits<charT> traits class
*/
@ -42,7 +42,7 @@ namespace{
//
// character classes:
//
boost::uint_fast32_t re_char_class_id[] = {
jm_uintfast32_t re_char_class_id[] = {
boost::re_detail::c_traits_base::char_class_alnum,
boost::re_detail::c_traits_base::char_class_alpha,
boost::re_detail::c_traits_base::char_class_cntrl,
@ -136,7 +136,7 @@ BOOST_RE_IX_DECL char* re_custom_error_messages[] = {
0,
};
#if !defined(LC_MESSAGES)
#if !defined(LC_MESSAGES) && defined(BOOST_RE_NO_CAT)
#define LC_MESSAGES LC_CTYPE
#endif
@ -403,7 +403,7 @@ namespace re_detail{
char c_traits_base::regex_message_catalogue[200] = {0};
std::string BOOST_RE_CALL c_traits_base::error_string(unsigned id)
std::string c_traits_base::error_string(unsigned id)
{
return re_get_error_str(id);
}
@ -481,7 +481,7 @@ void BOOST_RE_CALL c_traits_base::do_update_ctype()
re_update_classes();
}
boost::uint_fast32_t BOOST_RE_CALL c_traits_base::do_lookup_class(const char* p)
jm_uintfast32_t BOOST_RE_CALL c_traits_base::do_lookup_class(const char* p)
{
BOOST_RE_GUARD_STACK
unsigned int i;
@ -527,7 +527,7 @@ bool BOOST_RE_CALL c_traits_base::do_lookup_collate(std::string& buf, const char
return result;
}
std::string BOOST_RE_CALL c_traits_base::set_message_catalogue(const std::string& l)
std::string c_traits_base::set_message_catalogue(const std::string& l)
{
if(sizeof(regex_message_catalogue) <= l.size())
return l;
@ -571,7 +571,7 @@ bool BOOST_RE_CALL c_regex_traits<wchar_t>::lookup_collatename(std::basic_string
c_regex_traits<char> c_regex_traits<char>::i;
void BOOST_RE_CALL c_regex_traits<char>::init()
void c_regex_traits<char>::init()
{
BOOST_RE_GUARD_STACK
#ifdef BOOST_RE_THREADS
@ -597,7 +597,7 @@ void BOOST_RE_CALL c_regex_traits<char>::init()
++entry_count;
}
void BOOST_RE_CALL c_regex_traits<char>::update()
void c_regex_traits<char>::update()
{
BOOST_RE_GUARD_STACK
#ifdef BOOST_RE_THREADS
@ -617,7 +617,7 @@ void BOOST_RE_CALL c_regex_traits<char>::update()
sort_type = re_detail::find_sort_syntax(&i, &sort_delim);
}
void BOOST_RE_CALL c_regex_traits<char>::free()
void c_regex_traits<char>::free()
{
BOOST_RE_GUARD_STACK
#ifdef BOOST_RE_THREADS
@ -858,7 +858,7 @@ void BOOST_RE_CALL c_regex_traits<wchar_t>::free()
#endif
}
bool BOOST_RE_CALL c_regex_traits<wchar_t>::do_iswclass(wchar_t c, boost::uint_fast32_t f)
bool BOOST_RE_CALL c_regex_traits<wchar_t>::do_iswclass(wchar_t c, jm_uintfast32_t f)
{
BOOST_RE_GUARD_STACK
if((c & ~0xFF) == 0)
@ -976,7 +976,7 @@ int BOOST_RE_CALL c_regex_traits<wchar_t>::toi(const wchar_t*& first, const wcha
return result;
}
boost::uint_fast32_t BOOST_RE_CALL c_regex_traits<wchar_t>::lookup_classname(const wchar_t* first, const wchar_t* last)
jm_uintfast32_t BOOST_RE_CALL c_regex_traits<wchar_t>::lookup_classname(const wchar_t* first, const wchar_t* last)
{
std::basic_string<wchar_t> s(first, last);
unsigned int len = strnarrow((char*)0, 0, s.c_str());

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE: c_regex_traits_common.cpp
* VERSION: 3.12
* VERSION: 3.10
* DESCRIPTION: Implements common code and data for the
* c_regex_traits<charT> traits classes.
*/

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE: c_regex_traits.cpp
* VERSION: 3.12
* VERSION: 3.10
* DESCRIPTION: Implements the cpp_regex_traits<charT> traits class
*/
#include <clocale>
@ -39,7 +39,7 @@ namespace{
const unsigned int re_classes_max = 14;
const unsigned int char_set_size = CHAR_MAX - CHAR_MIN + 1;
boost::uint_fast32_t re_char_class_id[] = {
jm_uintfast32_t re_char_class_id[] = {
boost::re_detail::cpp_regex_traits_base::char_class_alnum,
boost::re_detail::cpp_regex_traits_base::char_class_alpha,
boost::re_detail::cpp_regex_traits_base::char_class_cntrl,
@ -270,7 +270,7 @@ message_data<char>::message_data(const std::locale& l, const std::string& regex_
#endif
}
std::string BOOST_RE_CALL cpp_regex_traits_base::set_message_catalogue(const std::string& l)
std::string cpp_regex_traits_base::set_message_catalogue(const std::string& l)
{
if(sizeof(regex_message_cat) <= l.size())
return l;
@ -342,7 +342,7 @@ int BOOST_RE_CALL cpp_regex_traits<char>::toi(const char*& first, const char* la
return 0;
}
boost::uint_fast32_t BOOST_RE_CALL cpp_regex_traits<char>::lookup_classname(const char* first, const char* last)const
jm_uintfast32_t BOOST_RE_CALL cpp_regex_traits<char>::lookup_classname(const char* first, const char* last)const
{
BOOST_RE_GUARD_STACK
unsigned int i;
@ -708,7 +708,7 @@ int BOOST_RE_CALL cpp_regex_traits<wchar_t>::toi(const wchar_t*& first, const wc
return 0;
}
boost::uint_fast32_t BOOST_RE_CALL cpp_regex_traits<wchar_t>::lookup_classname(const wchar_t* first, const wchar_t* last)const
jm_uintfast32_t BOOST_RE_CALL cpp_regex_traits<wchar_t>::lookup_classname(const wchar_t* first, const wchar_t* last)const
{
BOOST_RE_GUARD_STACK
unsigned int i;

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE: cregex.cpp
* VERSION: 3.12
* VERSION: 3.10
* DESCRIPTION: Implements high level class boost::RexEx
*/
#include <boost/cregex.hpp>
@ -170,7 +170,7 @@ RegEx& RegEx::operator=(const char* p)
unsigned int RegEx::SetExpression(const char* p, bool icase)
{
BOOST_RE_GUARD_STACK
boost::uint_fast32_t f = icase ? regbase::normal | regbase::use_except | regbase::icase : regbase::normal | regbase::use_except;
jm_uintfast32_t f = icase ? regbase::normal | regbase::use_except | regbase::icase : regbase::normal | regbase::use_except;
return pdata->e.set_expression(p, f);
}
@ -505,18 +505,18 @@ unsigned int RegEx::Length(int i)const
switch(pdata->t)
{
case re_detail::RegExData::type_pc:
return pdata->m[i].matched ? pdata->m[i].second - pdata->m[i].first : (unsigned)-1;
return pdata->m[i].matched ? pdata->m[i].second - pdata->m[i].first : 0;
case re_detail::RegExData::type_pf:
return pdata->fm[i].matched ? pdata->fm[i].second - pdata->fm[i].first : (unsigned)-1;
return pdata->fm[i].matched ? pdata->fm[i].second - pdata->fm[i].first : 0;
case re_detail::RegExData::type_copy:
{
std::map<int, std::string, std::less<int> >::iterator pos = pdata->strings.find(i);
if(pos == pdata->strings.end())
return (unsigned)-1;
return 0;
return (*pos).second.size();
}
}
return (unsigned)-1;
return 0;
}
std::string RegEx::What(int i)const

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE: fileiter.cpp
* VERSION: 3.12
* VERSION: 3.10
* DESCRIPTION: Implements file io primitives + directory searching for class boost::RegEx.
*/

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE: posix_api.cpp
* VERSION: 3.12
* VERSION: 3.10
* DESCRIPTION: Implements the Posix API wrappers.
*/
@ -49,7 +49,7 @@ BOOST_RE_IX_DECL int BOOST_RE_CCALL regcompA(regex_tA* expression, const char* p
}
}
// set default flags:
boost::uint_fast32_t flags = (f & REG_EXTENDED) ? regbase::extended : regbase::basic;
jm_uintfast32_t flags = (f & REG_EXTENDED) ? regbase::extended : regbase::basic;
expression->eflags = (f & REG_NEWLINE) ? match_not_dot_newline : 0;
// and translate those that are actually set:
@ -152,7 +152,7 @@ BOOST_RE_IX_DECL int BOOST_RE_CCALL regexecA(const regex_tA* expression, const c
{
BOOST_RE_GUARD_STACK
bool result = false;
boost::uint_fast32_t flags = match_default | expression->eflags;
jm_uintfast32_t flags = match_default | expression->eflags;
const char* end;
const char* start;
cmatch m;

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE: primary_transform.hpp
* VERSION: 3.12
* VERSION: 3.10
* DESCRIPTION: Heuristically determines the sort string format in use
* by the current locale.
*/

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE: regex.cpp
* VERSION: 3.12
* VERSION: 3.10
* DESCRIPTION: Misc boost::regbase member funnctions.
*/

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE: regex_debug.cpp
* VERSION: 3.12
* VERSION: 3.10
* DESCRIPTION: Misc. debugging helpers.
*/

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE: regex_synch.cpp
* VERSION: 3.12
* VERSION: 3.10
* DESCRIPTION: Thread synch helper functions, for regular
* expression library.
*/

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE: w32_regex_traits.cpp
* VERSION: 3.12
* VERSION: 3.10
* DESCRIPTION: Implements the w32_regex_traits<charT> traits class
*/
@ -37,7 +37,7 @@ namespace{
//
// character classes:
boost::uint_fast32_t re_char_class_id[] = {
jm_uintfast32_t re_char_class_id[] = {
boost::re_detail::w32_traits_base::char_class_alnum,
boost::re_detail::w32_traits_base::char_class_alpha,
boost::re_detail::w32_traits_base::char_class_cntrl,
@ -373,12 +373,12 @@ void BOOST_RE_CALL w32_traits_base::do_free()
}
}
std::string BOOST_RE_CALL w32_traits_base::error_string(unsigned id)
std::string w32_traits_base::error_string(unsigned id)
{
return re_get_error_str(id);
}
boost::uint_fast32_t BOOST_RE_CALL w32_traits_base::do_lookup_class(const char* p)
jm_uintfast32_t BOOST_RE_CALL w32_traits_base::do_lookup_class(const char* p)
{
BOOST_RE_GUARD_STACK
unsigned int i;
@ -424,7 +424,7 @@ bool BOOST_RE_CALL w32_traits_base::do_lookup_collate(std::string& buf, const ch
return result;
}
std::string BOOST_RE_CALL w32_traits_base::set_message_catalogue(const std::string& l)
std::string w32_traits_base::set_message_catalogue(const std::string& l)
{
BOOST_RE_GUARD_STACK
#ifdef BOOST_RE_THREADS
@ -445,7 +445,7 @@ char w32_traits_base::lower_case_map[map_size];
w32_regex_traits<char> w32_regex_traits<char>::i;
void BOOST_RE_CALL w32_regex_traits<char>::update()
void w32_regex_traits<char>::update()
{
BOOST_RE_GUARD_STACK
#ifdef BOOST_RE_THREADS
@ -645,7 +645,7 @@ w32_regex_traits<wchar_t>::~w32_regex_traits()
#endif
}
bool BOOST_RE_CALL w32_regex_traits<wchar_t>::do_iswclass(wchar_t c, boost::uint_fast32_t f)
bool BOOST_RE_CALL w32_regex_traits<wchar_t>::do_iswclass(wchar_t c, jm_uintfast32_t f)
{
BOOST_RE_GUARD_STACK
if((c & ~0xFF) == 0)
@ -756,7 +756,7 @@ int BOOST_RE_CALL w32_regex_traits<wchar_t>::toi(const wchar_t*& first, const wc
return result;
}
boost::uint_fast32_t BOOST_RE_CALL w32_regex_traits<wchar_t>::lookup_classname(const wchar_t* first, const wchar_t* last)
jm_uintfast32_t BOOST_RE_CALL w32_regex_traits<wchar_t>::lookup_classname(const wchar_t* first, const wchar_t* last)
{
std::basic_string<wchar_t> s(first, last);
unsigned int len = strnarrow((char*)0, 0, s.c_str());

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE: wide_posix_api.cpp
* VERSION: 3.12
* VERSION: 3.10
* DESCRIPTION: Implements the wide character POSIX API wrappers.
*/
@ -59,7 +59,7 @@ BOOST_RE_IX_DECL int BOOST_RE_CCALL regcompW(regex_tW* expression, const wchar_t
}
}
// set default flags:
boost::uint_fast32_t flags = (f & REG_EXTENDED) ? regbase::extended : regbase::basic;
jm_uintfast32_t flags = (f & REG_EXTENDED) ? regbase::extended : regbase::basic;
expression->eflags = (f & REG_NEWLINE) ? match_not_dot_newline : 0;
// and translate those that are actually set:
@ -162,7 +162,7 @@ BOOST_RE_IX_DECL int BOOST_RE_CCALL regexecW(const regex_tW* expression, const w
{
BOOST_RE_GUARD_STACK
bool result = false;
boost::uint_fast32_t flags = match_default | expression->eflags;
jm_uintfast32_t flags = match_default | expression->eflags;
const wchar_t* end;
const wchar_t* start;
wcmatch m;

View File

@ -20,7 +20,7 @@
<H3> Regex++, Regular Expression Syntax.</H3>
</CENTER>
<CENTER>
<I>(version 3.12, 18 April 2000)</I>
<I>(version 3.10, 18 April 2000)</I>
</CENTER>
<PRE><I>Copyright (c) 1998-2000
Dr John Maddock

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,7 @@ TLINK32 = $(BCROOT)\bin\ILink32.exe
IDE_LinkFLAGS32 = -L$(BCROOT)\LIB
LINKOPTS= -ap -Tpe -x
CFLAGS= -O2 -tWC -DSTRICT; -w-inl -w-aus -w-csu -w-eff -w-rch -I$(BCROOT)\include;..\..\..\..\; -L..\..\build\bcb5 $(CXXFLAGS)
CFLAGS= -O2 -tWC -DSTRICT; -w-inl -w-aus -w-csu -w-eff -w-rch -I$(BCROOT)\include;..\..\..\..\; -L..\..\build\bcb5
all :: r1.exe r2.exe r3.exe r4.exe r5.exe r6.exe r1m.exe r2m.exe r3m.exe r4m.exe r5m.exe r6m.exe r1v.exe r2v.exe r3v.exe r4v.exe r5v.exe r6v.exe r1l.exe r2l.exe r3l.exe r4l.exe r5l.exe r6l.exe r1lm.exe r2lm.exe r3lm.exe r4lm.exe r5lm.exe r6lm.exe r1lv.exe r2lv.exe r3lv.exe r4lv.exe r5lv.exe r6lv.exe
echo testing static single threaded version....
@ -185,4 +185,3 @@ r6lv.exe : tests.cpp parse.cpp regress.cpp

View File

@ -16,7 +16,7 @@
/*
*
* FILE parse.cpp
* VERSION 3.12
* VERSION 3.10
*
* Input parsing functions for regress.
*
@ -82,7 +82,6 @@ flag_info flag_data[] = {
{ BOOST_RE_STR("format_sed"), 10, format_sed, 3 },
{ BOOST_RE_STR("format_perl"), 11, format_perl, 3 },
{ BOOST_RE_STR("format_no_copy"), 14, format_no_copy, 3 },
{ BOOST_RE_STR("format_first_only"), 17, format_first_only, 3 },
{ BOOST_RE_STR("REG_NO_POSIX_TEST"), 17, REG_NO_POSIX_TEST, 4 },
{ BOOST_RE_STR("REG_UNICODE_ONLY"), 16, REG_UNICODE_ONLY, 4 },

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE regex_test.cpp
* VERSION 3.12
* VERSION 3.10
* DESCRIPTION: Builds regression test program with default
* locale and narrow character tests. Also
* instantiates all the templates in the library
@ -27,7 +27,6 @@
#define BOOST_RE_NO_LIB
#include <boost/regex.hpp>
#include <boost/regex/src.cpp>
//
// instantiate templates used:
@ -180,5 +179,22 @@ template test_string_type regex_merge(const test_string_type&,
#include "parse.cpp"
#include "regress.cpp"
//
// include library source files:
//
#ifdef BOOST_RE_LOCALE_W32
#include "libs/regex/src/w32_regex_traits.cpp"
#elif defined(BOOST_RE_LOCALE_C)
#include "libs/regex/src/c_regex_traits.cpp"
#else
#include "libs/regex/src/cpp_regex_traits.cpp"
#endif
#include "libs/regex/src/c_regex_traits_common.cpp"
#include "libs/regex/src/cregex.cpp"
#include "libs/regex/src/fileiter.cpp"
#include "libs/regex/src/posix_api.cpp"
#include "libs/regex/src/regex.cpp"
#include "libs/regex/src/regex_debug.cpp"
#include "libs/regex/src/regex_synch.cpp"

View File

@ -16,7 +16,7 @@
/*
*
* FILE regress.cpp
* VERSION 3.12
* VERSION 3.10
*
* main() and associated code for regress.
*
@ -39,8 +39,6 @@ using std::endl;
#pragma hrdstop
#endif
#include <boost/test/cpp_main.cpp>
#include "regress.h"
#if defined(BOOST_MSVC) && defined(_DEBUG)
@ -74,7 +72,7 @@ void usage()
}
int cpp_main(int argc, char * argv[])
int main(int argc, char * argv[])
{
#if defined(BOOST_MSVC) && defined(_DEBUG)
// turn on heap reporting at program exit:
@ -113,6 +111,10 @@ int cpp_main(int argc, char * argv[])
}
cout << line << " lines, " << tests << " tests completed in file " << argv[i] << endl;
}
if(error_count)
cout << "There were " << error_count << " failures in total..." << endl;
else
cout << "No failures detected..." << endl;
return error_count;
}
@ -152,10 +154,6 @@ istream& get_line(istream& is, nstring_type& s, char delim)
return is;
}
#ifdef BOOST_NO_STDC_NAMESPACE
namespace std{ using ::mbtowc; }
#endif
istream& get_line(istream& is, string_type& s, char delim)
{
nstring_type t;
@ -168,7 +166,7 @@ istream& get_line(istream& is, string_type& s, char delim)
int cchars;
while(i != j)
{
cchars = std::mbtowc(buf, i, j - i);
cchars = mbtowc(buf, i, j - i);
if(cchars == -1)
break;
if(cchars == 0)

View File

@ -16,7 +16,7 @@
/*
*
* FILE regress.h
* VERSION 3.12
* VERSION 3.10
*
* Function and data declarations for regress.
*
@ -129,7 +129,7 @@ public:
typedef char value_type;
#ifndef BOOST_NO_MEMBER_TEMPLATES
#ifndef BOOST_RE_NO_MEMBER_TEMPLATES
template <class U>
struct rebind
{
@ -187,7 +187,7 @@ public:
// class debug_iterator
//
template <class T>
struct debug_iterator
struct debug_iterator : public BOOST_RE_RA_ITERATOR(T, std::ptrdiff_t)
{
typedef std::ptrdiff_t difference_type;
typedef char_t value_type;
@ -306,46 +306,16 @@ struct debug_iterator
}
};
#if defined(__SGI_STL_PORT)
#if defined(__SGI_STL_PORT) && (__SGI_STL_PORT >= 0x400)
namespace std{
template <class T>
#if __SGI_STL_PORT <= 0x400
inline random_access_iterator_tag __STL_CALL __ITERATOR_CATEGORY(const debug_iterator<T>&) {
#else
inline random_access_iterator_tag __iterator_category(const debug_iterator<T>&) {
#endif
return random_access_iterator_tag();
}
}
#elif defined(__STL_CONFIG_H)
namespace std{
template <class T>
inline random_access_iterator_tag
iterator_category(const debug_iterator<T>&) {
return random_access_iterator_tag();
}
}
#endif
#if (defined(BOOST_MSVC) || defined(__ICL)) && (defined(_YVALS) || defined(_CPPLIB_VER))
namespace std{
template <class T>
inline random_access_iterator_tag __cdecl
_Iter_cat(const debug_iterator<T>&) {
return random_access_iterator_tag();
}
}
#endif
#ifdef BOOST_RWSTD_VER
namespace std{
template <class T>
inline random_access_iterator_tag
inline random_access_iterator_tag __STL_CALL
__iterator_category(const debug_iterator<T>&) {
return random_access_iterator_tag();
}
}
#endif
#ifdef BOOST_RE_TEST_LOCALE_W32
typedef boost::reg_expression<char_t, boost::w32_regex_traits<char_t>, jm_debug_alloc> re_type;
#elif defined(BOOST_RE_TEST_LOCALE_CPP)
@ -370,4 +340,3 @@ typedef boost::reg_expression<char_t, boost::c_regex_traits<char_t>, jm_debug_al

View File

@ -16,7 +16,7 @@
/*
*
* FILE tests.cpp
* VERSION 3.12
* VERSION 3.10
*
* the actual tests conducted by regress.
*
@ -438,11 +438,7 @@ void cpp_tests(const reg_expression<C, T, A>& e, bool recurse = true)
unsigned int hl_match_id;
bool
#if defined(__BORLANDC__) || defined(BOOST_MSVC)
__cdecl
#endif
hl_grep_test_proc(const RegEx& e)
bool hl_grep_test_proc(const RegEx& e)
{
int start, end;
start = e.Position(0);
@ -539,8 +535,7 @@ void cpp_hl_tests(RegEx& e, bool recurse = true)
unsigned int j = 0;
while(matches[j] != -2)
{
if( (matches[j] != (int)e.Position(i))
|| ((matches[j] != -1) && ((matches[j+1] - matches[j] != (int)e.Length(i)))) )
if( (matches[j] != (int)e.Position(i)) || (matches[j+1] - matches[j] != (int)e.Length(i)) )
{
begin_error();
cout << "RegEx::Search error in subexpression " << i << ": found [" << e.Position(i) << "," << (e.Position(i) + e.Length(i)) << "] expected [" << matches[j] << "," << matches[j+1] << "]" << endl;
@ -564,8 +559,7 @@ void cpp_hl_tests(RegEx& e, bool recurse = true)
unsigned int j = 0;
while(matches[j] != -2)
{
if( (matches[j] != (int)e.Position(i))
|| ((matches[j] != -1) && ((matches[j+1] - matches[j] != (int)e.Length(i)))) )
if( (matches[j] != (int)e.Position(i)) || (matches[j+1] - matches[j] != (int)e.Length(i)) )
{
begin_error();
cout << "RegEx::Match error in subexpression " << i << ": found [" << e.Position(i) << "," << (e.Position(i) + e.Length(i)) << "] expected [" << matches[j] << "," << matches[j+1] << "]" << endl;

View File

@ -813,13 +813,6 @@ a+(b+) "...aaabb,,,ab*abbb?" $1 "...bb,,,b*bbb?"
(a+)|(b+) "...aaabb,,,ab*abbb?" (?1A:B)C "...ACBC,,,ACBC*ACBC?"
(a+)|(b+) "...aaabb,,,ab*abbb?" ?1:B "...B,,,B*B?"
- match_default normal REG_EXTENDED REG_STARTEND REG_MERGE format_first_only
; move to copying unmatched data, but replace first occurance only:
a+ "...aaa,,," bbb "...bbb,,,"
a+(b+) "...aaabb,,," $1 "...bb,,,"
a+(b+) "...aaabb,,,ab*abbb?" $1 "...bb,,,ab*abbb?"
(a+)|(b+) "...aaabb,,,ab*abbb?" (?1A)(?2B) "...Abb,,,ab*abbb?"
;
; changes to newline handling with 2.11:
;
@ -878,4 +871,3 @@ a+(?#b+)b+ xaaabbba 1 7

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE regex_test.cpp
* VERSION 3.12
* VERSION 3.10
* DESCRIPTION: Builds regression test program with default
* locale and wide character tests. Also
* instantiates all the templates in the library
@ -39,7 +39,6 @@
#endif
#include <boost/regex.hpp>
#include <boost/regex/src.cpp>
#ifdef BOOST_RE_NO_WCSTRING
#error The regex library is not configured for wide character support
@ -191,5 +190,23 @@ template test_string_type regex_merge(const test_string_type&,
#include "parse.cpp"
#include "regress.cpp"
//
// include library source files:
//
#ifdef BOOST_RE_LOCALE_W32
#include "libs/regex/src/w32_regex_traits.cpp"
#elif defined(BOOST_RE_LOCALE_C)
#include "libs/regex/src/c_regex_traits.cpp"
#else
#include "libs/regex/src/cpp_regex_traits.cpp"
#endif
#include "libs/regex/src/c_regex_traits_common.cpp"
#include "libs/regex/src/cregex.cpp"
#include "libs/regex/src/fileiter.cpp"
#include "libs/regex/src/regex.cpp"
#include "libs/regex/src/regex_debug.cpp"
#include "libs/regex/src/regex_synch.cpp"
#include "libs/regex/src/wide_posix_api.cpp"

View File

@ -19,7 +19,7 @@
HEIGHT="86" ALT="C++ Boost"> </H3>
</TD>
<TD VALIGN="top" WIDTH="50%"><H3 ALIGN="center">Regex++, Traits Class
Reference. <I>(version 3.12, 18 April 2000)</I>&nbsp; </H3>
Reference. <I>(version 3.10, 18 April 2000)</I>&nbsp; </H3>
<PRE>
<I>Copyright (c) 1998-2000
Dr John Maddock