From 2d27c152c20a198956c66697c51c62944926725c Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sun, 9 Jan 2005 16:59:23 +0000 Subject: [PATCH] Almost ready to merge with main branch now, These are mostly updates to the docs, with some compiler fixes and general warning suppressions. [SVN r26648] --- build/Jamfile | 118 +++ build/bcb6.mak | 110 ++- build/gcc-shared.mak | 92 ++- build/gcc.mak | 91 ++- build/gcc_gen.sh | 28 +- build/generic.mak | 9 +- build/sunpro.mak | 30 +- build/vc6-stlport.mak | 252 ++++--- build/vc6.mak | 330 +++++---- build/vc7-stlport.mak | 252 ++++--- build/vc7.mak | 330 +++++---- build/vc71-stlport.mak | 252 ++++--- build/vc71.mak | 330 +++++---- build/vc_gen.sh | 38 +- doc/Attic/bad_expression.html | 9 +- doc/Attic/basic_regex.html | 6 +- doc/Attic/captures.html | 2 +- doc/Attic/error_type.html | 2 +- doc/Attic/format_boost_syntax.html | 163 ++++ doc/Attic/format_perl_syntax.html | 150 ++++ doc/Attic/format_sed_syntax.html | 109 +++ doc/Attic/format_syntax.html | 293 ++------ doc/Attic/history.html | 22 +- doc/Attic/icu_strings.html | 467 ++++++++++++ doc/Attic/install.html | 113 +-- doc/Attic/match_flag_type.html | 26 +- doc/Attic/mfc_strings.html | 294 ++++++++ doc/Attic/non_standard_strings.html | 53 ++ doc/Attic/regex_iterator.html | 43 +- doc/Attic/regex_token_iterator.html | 92 ++- doc/Attic/standards.html | 8 - doc/Attic/sub_match.html | 23 +- doc/Attic/syntax_basic.html | 16 +- doc/Attic/syntax_extended.html | 110 +-- doc/Attic/syntax_leftmost_longest.html | 65 ++ doc/Attic/syntax_perl.html | 192 +++-- doc/Attic/unicode.html | 66 ++ doc/bad_expression.html | 9 +- doc/basic_regex.html | 6 +- doc/captures.html | 2 +- doc/error_type.html | 2 +- doc/format_boost_syntax.html | 163 ++++ doc/format_perl_syntax.html | 150 ++++ doc/format_sed_syntax.html | 109 +++ doc/format_syntax.html | 293 ++------ doc/history.html | 22 +- doc/icu_strings.html | 467 ++++++++++++ doc/index.html | 63 +- doc/install.html | 113 +-- doc/match_flag_type.html | 26 +- doc/mfc_strings.html | 294 ++++++++ doc/non_standard_strings.html | 53 ++ doc/regex_iterator.html | 43 +- doc/regex_token_iterator.html | 92 ++- doc/standards.html | 8 - doc/sub_match.html | 23 +- doc/syntax_basic.html | 16 +- doc/syntax_extended.html | 110 +-- doc/syntax_leftmost_longest.html | 65 ++ doc/syntax_perl.html | 192 +++-- doc/unicode.html | 66 ++ example/Jamfile | 38 + .../iso8859_1_regex_traits.cpp | 318 -------- .../iso8859_1_regex_traits.hpp | 25 - example/iso8859_1_regex_traits/readme.txt | 49 -- example/snippets/icu_example.cpp | 182 +++++ example/snippets/mfc_example.cpp | 162 ++++ include/boost/regex/icu.hpp | 697 +++++++++++++++++- include/boost/regex/mfc.hpp | 2 +- .../boost/regex/pending/unicode_iterator.hpp | 6 +- .../boost/regex/v4/basic_regex_creator.hpp | 57 +- include/boost/regex/v4/basic_regex_parser.hpp | 88 ++- include/boost/regex/v4/cpp_regex_traits.hpp | 23 +- include/boost/regex/v4/instances.hpp | 16 +- include/boost/regex/v4/match_flags.hpp | 5 +- include/boost/regex/v4/match_results.hpp | 11 + include/boost/regex/v4/perl_matcher.hpp | 19 +- .../boost/regex/v4/perl_matcher_common.hpp | 12 +- .../regex/v4/perl_matcher_non_recursive.hpp | 33 +- .../boost/regex/v4/perl_matcher_recursive.hpp | 41 +- include/boost/regex/v4/regex_format.hpp | 60 +- include/boost/regex/v4/regex_iterator.hpp | 12 + include/boost/regex/v4/regex_match.hpp | 38 +- include/boost/regex/v4/regex_search.hpp | 51 +- .../boost/regex/v4/regex_token_iterator.hpp | 33 + include/boost/regex/v4/sub_match.hpp | 7 + include/boost/regex/v4/u32regex_iterator.hpp | 190 +++++ .../regex/v4/u32regex_token_iterator.hpp | 365 +++++++++ src/c_regex_traits.cpp | 2 +- src/cregex.cpp | 4 +- src/icu.cpp | 6 +- src/posix_api.cpp | 2 +- src/w32_regex_traits.cpp | 2 +- src/wide_posix_api.cpp | 2 +- test/Jamfile | 38 + test/regress/basic_tests.cpp | 5 + test/regress/info.hpp | 2 +- test/regress/test_icu.cpp | 250 ++++++- test/regress/test_locale.cpp | 28 +- test/regress/test_mfc.cpp | 4 - test/regress/test_operators.cpp | 4 +- test/regress/test_partial_match.hpp | 388 ++++++++++ test/regress/test_perl_ex.cpp | 5 + test/regress/test_regex_search.hpp | 27 +- test/regress/test_replace.cpp | 9 +- test/regress/test_unicode.cpp | 17 +- test/unicode/unicode_iterator_test.cpp | 16 +- tools/generate/tables.cpp | 182 +++++ 108 files changed, 8075 insertions(+), 2431 deletions(-) create mode 100644 doc/Attic/format_boost_syntax.html create mode 100644 doc/Attic/format_perl_syntax.html create mode 100644 doc/Attic/format_sed_syntax.html create mode 100644 doc/Attic/icu_strings.html create mode 100644 doc/Attic/mfc_strings.html create mode 100644 doc/Attic/non_standard_strings.html create mode 100644 doc/Attic/syntax_leftmost_longest.html create mode 100644 doc/Attic/unicode.html create mode 100644 doc/format_boost_syntax.html create mode 100644 doc/format_perl_syntax.html create mode 100644 doc/format_sed_syntax.html create mode 100644 doc/icu_strings.html create mode 100644 doc/mfc_strings.html create mode 100644 doc/non_standard_strings.html create mode 100644 doc/syntax_leftmost_longest.html create mode 100644 doc/unicode.html delete mode 100644 example/iso8859_1_regex_traits/iso8859_1_regex_traits.cpp delete mode 100644 example/iso8859_1_regex_traits/iso8859_1_regex_traits.hpp delete mode 100644 example/iso8859_1_regex_traits/readme.txt create mode 100644 example/snippets/icu_example.cpp create mode 100644 example/snippets/mfc_example.cpp create mode 100644 include/boost/regex/v4/u32regex_iterator.hpp create mode 100644 include/boost/regex/v4/u32regex_token_iterator.hpp create mode 100644 test/regress/test_partial_match.hpp create mode 100644 tools/generate/tables.cpp diff --git a/build/Jamfile b/build/Jamfile index bfce7ae7..7dfb768a 100644 --- a/build/Jamfile +++ b/build/Jamfile @@ -1,6 +1,117 @@ # copyright John Maddock 2003 subproject libs/regex/build ; +# bring in the rules for testing +import testing ; + +# +# ICU configuration: +# +rule check-icu-config ( ) +{ + if ! $(gICU_CONFIG_CHECKED) + { + if $(ICU_PATH) + { + dir += $(ICU_PATH) ; + } + + if [ GLOB $(dir)$(SLASH)include$(SLASH)unicode : utypes.h ] + { + ECHO Building Boost.Regex with Unicode/ICU support enabled ; + ECHO Using ICU in $(ICU_PATH:J=" ")$(SLASH)include ; + gHAS_ICU = true ; + + # try and find ICU libraries, look for NT versions first: + if $(ICU_LINK) + { + gICU_LIBS += $(ICU_LINK) ; + } + else if [ GLOB $(dir)$(SLASH)lib : icuuc.* ] + { + gICU_LIBS += icuuc ; + } + else if [ GLOB $(dir)$(SLASH)lib : libicuuc.* ] + { + gICU_LIBS += icuuc ; + } + else if [ GLOB $(ICU_PATH)/lib : cygicuuc.dll ] + { + gICU_LIBS += $(ICU_PATH)/lib/cygicuuc.dll ; + } + else if [ GLOB /usr/local/lib : cygicuuc.dll ] + { + gICU_LIBS += /usr/local/lib/cygicuuc.dll ; + } + else + { + ECHO ICU shared common library not found. ; + ECHO HINT: Set the environment variable ICU_LINK to contain ; + ECHO the linker options required to link to ICU. ; + } + + if $(ICU_LINK) + { + # gICU_LIBS += $(ICU_LINK) ; + } + else if [ GLOB $(dir)$(SLASH)lib : icuin.* ] + { + gICU_LIBS += icuin ; + } + else if [ GLOB $(dir)$(SLASH)lib : libicui18n.* ] + { + gICU_LIBS += icui18n ; + } + else if [ GLOB $(ICU_PATH)/lib : cygicuin.dll ] + { + gICU_LIBS += $(ICU_PATH)/lib/cygicuin.dll ; + } + else if [ GLOB /usr/local/lib : cygicuin.dll ] + { + gICU_LIBS += /usr/local/lib/cygicuin.dll ; + } + else + { + ECHO ICU shared i18n library not found. ; + ECHO HINT: Set the environment variable ICU_LINK to contain ; + ECHO the linker options required to link to ICU. ; + } + } + else + { + ECHO ****************************************************** ; + ECHO ; + ECHO Building Boost.Regex with Unicode/ICU support disabled. ; + ECHO HINT: define the environment variable ICU_PATH to point to the ; + ECHO root directy of your ICU installation if you have one. ; + ECHO Couldn't find utypes.h in $(ICU_PATH:J=" ")$(SLASH)include$(SLASH)unicode ; + ECHO ; + ECHO ****************************************************** ; + } + gICU_CONFIG_CHECKED = true ; + } + if $(gHAS_ICU) + { + return true ; + } +} + +if [ check-icu-config ] +{ + BOOST_REGEX_ICU_OPTS = "BOOST_HAS_ICU=1" ; + if $(gICU_LIBS) + { + BOOST_REGEX_ICU_OPTS += $(gICU_LIBS) ; + # this one is required for VC++ : + BOOST_REGEX_ICU_TEST_OPTS = "off" ; + } + if $(ICU_PATH) + { + BOOST_REGEX_ICU_OPTS += "$(ICU_PATH)/include" ; + BOOST_REGEX_ICU_OPTS += "$(ICU_PATH)/lib" ; + } + # ECHO "BOOST_REGEX_ICU_OPTS =" $(BOOST_REGEX_ICU_OPTS) ; +} # # this template defines the options common to @@ -14,6 +125,12 @@ template regex-options # on # como requires this: <*>BOOST_REGEX_NO_W32=1 + $(BOOST_REGEX_ICU_OPTS) + ; +template regex-test-options + : # sources + : # requirements + $(BOOST_REGEX_ICU_TEST_OPTS) ; # @@ -55,6 +172,7 @@ SOURCES = wide_posix_api.cpp winstances.cpp usinstances.cpp ; + lib boost_regex : ../src/$(SOURCES)