Compare commits

..

33 Commits

Author SHA1 Message Date
4cbcd3078e Merge branch 'develop' 2023-02-22 18:58:30 +00:00
a851f2141f Merge branch 'develop' 2022-06-27 18:36:04 +01:00
57aca85a8e Merge branch 'develop' 2022-06-26 18:56:14 +01:00
177ee2cc0f Merge branch 'develop' 2022-03-08 11:34:00 +00:00
63575ddad8 Merge branch 'develop' 2022-03-08 11:32:34 +00:00
e1c8a4b6a4 Merge branch 'develop' 2021-11-15 12:45:47 +00:00
9b946cfcb7 Merge branch 'develop' 2021-11-01 13:19:01 +01:00
86f82635d4 Merge branch 'develop' 2021-07-03 10:17:35 +01:00
0c8158f6ce Merge branch 'develop' 2021-06-25 19:19:28 +01:00
a3f97b5bec Merge pull request #126 from boostorg/header_fix
Add missing #include  for release.
2021-04-12 08:21:42 +01:00
13a13e58c9 Merge branch 'develop' into header_fix 2021-04-11 18:14:48 +01:00
714eaf8ae9 Merge branch 'develop' 2021-03-07 09:51:58 +00:00
78e73e29ec Merge branch 'develop'
Fixed Conflicts:
	doc/html/index.html
2021-02-25 19:27:04 +00:00
39f28ac456 Fix incorrect references to sub_match having a .last member.
Fixes https://github.com/boostorg/regex/issues/115.

# Fixed Conflicts:
#	doc/html/index.html
2020-11-23 18:12:18 +00:00
e9645776f9 Merge branch 'develop' 2020-06-23 18:57:40 +01:00
ea23777b48 Merge branch 'develop' 2020-04-28 17:41:58 +01:00
c21b52d87c Merge branch 'develop'
# Conflicts:
#	doc/html/boost_regex/background.html
#	doc/html/boost_regex/background/acknowledgements.html
#	doc/html/boost_regex/background/examples.html
#	doc/html/boost_regex/background/faq.html
#	doc/html/boost_regex/background/futher.html
#	doc/html/boost_regex/background/headers.html
#	doc/html/boost_regex/background/history.html
#	doc/html/boost_regex/background/locale.html
#	doc/html/boost_regex/background/performance.html
#	doc/html/boost_regex/background/performance/section_id1378460593.html
#	doc/html/boost_regex/background/performance/section_id1675827111.html
#	doc/html/boost_regex/background/performance/section_id3141719723.html
#	doc/html/boost_regex/background/performance/section_id3258595385.html
#	doc/html/boost_regex/background/performance/section_id3261825021.html
#	doc/html/boost_regex/background/performance/section_id3752650613.html
#	doc/html/boost_regex/background/performance/section_id4128344975.html
#	doc/html/boost_regex/background/performance/section_id4148872883.html
#	doc/html/boost_regex/background/redist.html
#	doc/html/boost_regex/background/standards.html
#	doc/html/boost_regex/background/thread_safety.html
#	doc/html/boost_regex/captures.html
#	doc/html/boost_regex/configuration.html
#	doc/html/boost_regex/configuration/algorithm.html
#	doc/html/boost_regex/configuration/compiler.html
#	doc/html/boost_regex/configuration/linkage.html
#	doc/html/boost_regex/configuration/locale.html
#	doc/html/boost_regex/configuration/tuning.html
#	doc/html/boost_regex/format.html
#	doc/html/boost_regex/format/boost_format_syntax.html
#	doc/html/boost_regex/format/perl_format.html
#	doc/html/boost_regex/format/sed_format.html
#	doc/html/boost_regex/install.html
#	doc/html/boost_regex/intro.html
#	doc/html/boost_regex/partial_matches.html
#	doc/html/boost_regex/ref.html
#	doc/html/boost_regex/ref/bad_expression.html
#	doc/html/boost_regex/ref/basic_regex.html
#	doc/html/boost_regex/ref/concepts.html
#	doc/html/boost_regex/ref/concepts/charT_concept.html
#	doc/html/boost_regex/ref/concepts/iterator_concepts.html
#	doc/html/boost_regex/ref/concepts/traits_concept.html
#	doc/html/boost_regex/ref/deprecated.html
#	doc/html/boost_regex/ref/deprecated/old_regex.html
#	doc/html/boost_regex/ref/deprecated/regex_format.html
#	doc/html/boost_regex/ref/deprecated/regex_grep.html
#	doc/html/boost_regex/ref/deprecated/regex_split.html
#	doc/html/boost_regex/ref/error_type.html
#	doc/html/boost_regex/ref/internals.html
#	doc/html/boost_regex/ref/internals/uni_iter.html
#	doc/html/boost_regex/ref/match_flag_type.html
#	doc/html/boost_regex/ref/match_results.html
#	doc/html/boost_regex/ref/non_std_strings.html
#	doc/html/boost_regex/ref/non_std_strings/icu.html
#	doc/html/boost_regex/ref/non_std_strings/icu/intro.html
#	doc/html/boost_regex/ref/non_std_strings/icu/unicode_algo.html
#	doc/html/boost_regex/ref/non_std_strings/icu/unicode_iter.html
#	doc/html/boost_regex/ref/non_std_strings/icu/unicode_types.html
#	doc/html/boost_regex/ref/non_std_strings/mfc_strings.html
#	doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_algo.html
#	doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_intro.html
#	doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_iter.html
#	doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_regex_create.html
#	doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_regex_types.html
#	doc/html/boost_regex/ref/posix.html
#	doc/html/boost_regex/ref/regex_iterator.html
#	doc/html/boost_regex/ref/regex_match.html
#	doc/html/boost_regex/ref/regex_replace.html
#	doc/html/boost_regex/ref/regex_search.html
#	doc/html/boost_regex/ref/regex_token_iterator.html
#	doc/html/boost_regex/ref/regex_traits.html
#	doc/html/boost_regex/ref/sub_match.html
#	doc/html/boost_regex/ref/syntax_option_type.html
#	doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_basic.html
#	doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_extended.html
#	doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_literal.html
#	doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_overview.html
#	doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_perl.html
#	doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_synopsis.html
#	doc/html/boost_regex/syntax.html
#	doc/html/boost_regex/syntax/basic_extended.html
#	doc/html/boost_regex/syntax/basic_syntax.html
#	doc/html/boost_regex/syntax/character_classes.html
#	doc/html/boost_regex/syntax/character_classes/optional_char_class_names.html
#	doc/html/boost_regex/syntax/character_classes/std_char_classes.html
#	doc/html/boost_regex/syntax/collating_names.html
#	doc/html/boost_regex/syntax/collating_names/digraphs.html
#	doc/html/boost_regex/syntax/collating_names/named_unicode.html
#	doc/html/boost_regex/syntax/collating_names/posix_symbolic_names.html
#	doc/html/boost_regex/syntax/leftmost_longest_rule.html
#	doc/html/boost_regex/syntax/perl_syntax.html
#	doc/html/boost_regex/unicode.html
#	doc/html/index.html
2019-10-31 17:47:34 +00:00
18e7b8c463 Merge branch 'develop' 2019-02-24 09:17:34 +00:00
866d546fd0 Merge branch 'develop' 2018-10-22 19:07:00 +01:00
309eee3459 doc regen. 2018-09-15 09:00:20 +01:00
c653a0bf05 Merge branch 'develop' 2018-09-15 08:59:28 +01:00
a9fc8fb5de Merge pull request #50 from boostorg/develop
Merge Fuzz-bug fixes from develop
2017-11-24 17:25:41 +00:00
b3f73b4792 Merge pull request #48 from boostorg/develop
Merge de-fuzz fixes from develop.
2017-10-29 17:03:03 +00:00
5bc2a4a301 Merge pull request #39 from boostorg/develop
Merge develop to master
2017-10-09 18:27:25 +01:00
8191d58266 Remove corpus files from master - we don't need them here! 2017-03-03 09:18:29 +00:00
f0b577a82c Merge branch 'develop' 2017-03-02 18:33:14 +00:00
ed556985d7 Merge branch 'develop' 2016-11-03 20:05:53 +01:00
bf7d64a7ef Add, and update, documentation build targets. 2016-10-10 11:39:53 -05:00
6f02c1a388 Merge branch 'develop' 2016-08-22 12:50:59 +01:00
dec7b5028d Merge branch 'develop' 2016-08-10 18:34:37 +01:00
dd20ac2669 Merge branch 'develop'
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2016-04-01 18:35:47 +01:00
d84bab7c4d Merge branch 'develop' 2016-02-15 19:32:53 +00:00
9034bd9c02 Merge branch 'develop' 2015-10-20 13:43:25 +01:00
3869 changed files with 181 additions and 6874 deletions

View File

@ -13,12 +13,12 @@ on:
release:
types: [published, created, edited]
jobs:
ubuntu-jammy:
runs-on: ubuntu-22.04
ubuntu-focal:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
compiler: [ g++-11, g++-12, g++-13 ]
compiler: [ g++-9, g++-10, clang++-9, clang++-10 ]
standard: [ c++11, c++14, c++17, c++2a ]
steps:
- uses: actions/checkout@v2
@ -34,7 +34,7 @@ jobs:
- name: Add repository
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Install packages
run: sudo apt install g++-11 g++-12 g++-13
run: sudo apt install g++-9 g++-10 clang-9 clang-10 libicu-dev
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
@ -55,8 +55,11 @@ jobs:
- name: Generate user config
run: 'echo "using $TOOLSET : : ${{ matrix.compiler }} : <cxxflags>-std=${{ matrix.standard }} ;" > ~/user-config.jam'
working-directory: ../boost-root
- name: Config info install
run: ../../../b2 config_info_travis_install toolset=$TOOLSET
working-directory: ../boost-root/libs/config/test
- name: Config info
run: ../../../b2 print_config_info toolset=$TOOLSET
run: ./config_info_travis
working-directory: ../boost-root/libs/config/test
- name: Test
run: ../../../b2 toolset=$TOOLSET
@ -86,12 +89,12 @@ jobs:
- name: Test
run: ${{ matrix.compiler }} -std=${{ matrix.standard }} -I../../include *.cpp ../../src/*.cpp -o regress && ./regress
working-directory: ./test/regress
ubuntu-jammy-clang:
runs-on: ubuntu-22.04
ubuntu-bionic:
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
compiler: [ clang++-15 ]
compiler: [ g++-7, g++-8, clang++-7, clang++-8 ]
standard: [ c++11, c++14, c++17 ]
steps:
- uses: actions/checkout@v2
@ -107,7 +110,7 @@ jobs:
- name: Add repository
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Install packages
run: sudo apt install clang-15
run: sudo apt install g++-7 g++-8 clang-7 clang-8 libicu-dev
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
@ -128,8 +131,11 @@ jobs:
- name: Generate user config
run: 'echo "using $TOOLSET : : ${{ matrix.compiler }} : <cxxflags>-std=${{ matrix.standard }} ;" > ~/user-config.jam'
working-directory: ../boost-root
- name: Config info install
run: ../../../b2 config_info_travis_install toolset=$TOOLSET
working-directory: ../boost-root/libs/config/test
- name: Config info
run: ../../../b2 print_config_info toolset=$TOOLSET
run: ./config_info_travis
working-directory: ../boost-root/libs/config/test
- name: Test
run: ../../../b2 toolset=$TOOLSET define=CI_SUPPRESS_KNOWN_ISSUES define=SLOW_COMPILER

View File

@ -47,19 +47,19 @@ test-suite regex-examples :
[ regex-test-run snippets/partial_regex_grep.cpp : $(BOOST_ROOT)/libs/regex/index.htm ]
[ regex-test-run snippets/partial_regex_iterate.cpp : $(BOOST_ROOT)/libs/regex/index.htm ]
[ regex-test-run snippets/partial_regex_match.cpp : 1234-5678-8765-4 ]
[ regex-test-run snippets/regex_grep_example_1.cpp : $(BOOST_ROOT)/boost/regex/v5/regex_token_iterator.hpp ]
[ regex-test-run snippets/regex_grep_example_2.cpp : $(BOOST_ROOT)/boost/regex/v5/regex_token_iterator.hpp ]
[ regex-test-run snippets/regex_grep_example_3.cpp : $(BOOST_ROOT)/boost/regex/v5/regex_token_iterator.hpp ]
[ regex-test-run snippets/regex_grep_example_4.cpp : $(BOOST_ROOT)/boost/regex/v5/regex_token_iterator.hpp ]
[ regex-test-run snippets/regex_grep_example_1.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
[ regex-test-run snippets/regex_grep_example_2.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
[ regex-test-run snippets/regex_grep_example_3.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
[ regex-test-run snippets/regex_grep_example_4.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
[ regex-test-run snippets/regex_match_example.cpp : -auto ]
[ regex-test-run snippets/regex_merge_example.cpp : $(BOOST_ROOT)/boost/regex/v5/regex_token_iterator.hpp ]
[ regex-test-run snippets/regex_replace_example.cpp : $(BOOST_ROOT)/boost/regex/v5/regex_token_iterator.hpp ]
[ regex-test-run snippets/regex_search_example.cpp : $(BOOST_ROOT)/boost/regex/v5/regex_token_iterator.hpp ]
[ regex-test-run snippets/regex_merge_example.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
[ regex-test-run snippets/regex_replace_example.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
[ regex-test-run snippets/regex_search_example.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
[ regex-test-run snippets/regex_split_example_1.cpp : -auto ]
[ regex-test-run snippets/regex_split_example_2.cpp : $(BOOST_ROOT)/libs/regex/doc/html/index.html ]
[ regex-test-run snippets/regex_token_iterator_eg_1.cpp : -auto ]
[ regex-test-run snippets/regex_token_iterator_eg_2.cpp : $(BOOST_ROOT)/libs/regex/doc/html/index.html ]
[ regex-test-run snippets/regex_iterator_example.cpp : $(BOOST_ROOT)/boost/regex/v5/regex_token_iterator.hpp ]
[ regex-test-run snippets/regex_iterator_example.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
[ run snippets/captures_example.cpp
../test/captures//boost_regex_extra
: : : <threading>multi <define>BOOST_REGEX_MATCH_EXTRA=1 ]

View File

@ -13,8 +13,6 @@
#pragma warning(disable: 4996 4127)
#endif
#define BOOST_TIMER_ENABLE_DEPRECATED
#include <boost/config.hpp>
#include <boost/regex.hpp>
#include <boost/cregex.hpp>

View File

@ -127,9 +127,6 @@ bool operator == (const allocator_architype<T>&, const allocator_architype<T>&)
template <class T>
bool operator != (const allocator_architype<T>&, const allocator_architype<T>&) { return false; }
template <class T>
void consume_type() {}
namespace boost{
//
// regex_traits_architype:
@ -374,8 +371,6 @@ struct BaseRegexConcept
e1 = except.code();
typedef typename Regex::value_type regex_value_type;
regex_value_type val{};
ignore_unused_variable_warning(val);
function_requires< RegexTraitsConcept<global_regex_namespace::regex_traits<char> > >();
function_requires< BaseRegexConcept<global_regex_namespace::basic_regex<char> > >();
}
@ -451,25 +446,15 @@ struct BaseRegexConcept
// match_results tests - some typedefs are not used, however these
// guarante that they exist (some compilers may warn on non-usage)
typedef typename match_results_type::value_type mr_value_type;
consume_type<mr_value_type>();
typedef typename match_results_type::const_reference mr_const_reference;
consume_type<mr_const_reference>();
typedef typename match_results_type::reference mr_reference;
consume_type<mr_reference>();
typedef typename match_results_type::const_iterator mr_const_iterator;
consume_type<mr_const_iterator>();
typedef typename match_results_type::iterator mr_iterator;
consume_type<mr_iterator>();
typedef typename match_results_type::difference_type mr_difference_type;
consume_type<mr_difference_type>();
typedef typename match_results_type::size_type mr_size_type;
consume_type<mr_size_type>();
typedef typename match_results_type::allocator_type mr_allocator_type;
consume_type<mr_allocator_type>();
typedef typename match_results_type::char_type mr_char_type;
consume_type<mr_char_type>();
typedef typename match_results_type::string_type mr_string_type;
consume_type<mr_string_type>();
match_results_type m1;
mr_allocator_type at;

View File

@ -90,8 +90,6 @@
# endif
#endif
#define BOOST_REGEX_MAX_RECURSION_DEPTH 100
/****************************************************************************
*

View File

@ -93,7 +93,3 @@
// define this if you want regex to use __cdecl calling convensions, even when __fastcall is available:
// #define BOOST_REGEX_NO_FASTCALL
// define this to control how deep non-avoidable recursive function calls can go, typical expressions
// and format strings should only recurse a handful of times, this is mainly to prevent DOS type attacks.
// #define BOOST_REGEX_MAX_RECURSION_DEPTH 100

View File

@ -248,7 +248,7 @@ private:
void fixup_recursions(re_syntax_base* state);
void create_startmaps(re_syntax_base* state);
int calculate_backstep(re_syntax_base* state);
void create_startmap(re_syntax_base* state, unsigned char* l_map, unsigned int* pnull, unsigned char mask, unsigned recursion_count = 0);
void create_startmap(re_syntax_base* state, unsigned char* l_map, unsigned int* pnull, unsigned char mask);
unsigned get_restart_type(re_syntax_base* state);
void set_all_masks(unsigned char* bits, unsigned char);
bool is_bad_repeat(re_syntax_base* pt);
@ -1074,7 +1074,7 @@ struct recursion_saver
};
template <class charT, class traits>
void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state, unsigned char* l_map, unsigned int* pnull, unsigned char mask, unsigned recursion_count)
void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state, unsigned char* l_map, unsigned int* pnull, unsigned char mask)
{
recursion_saver saved_recursions(&m_recursion_checks);
int not_last_jump = 1;
@ -1085,28 +1085,6 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state,
// track case sensitivity:
bool l_icase = m_icase;
if (recursion_count > BOOST_REGEX_MAX_RECURSION_DEPTH)
{
// Oops error:
if (0 == this->m_pdata->m_status) // update the error code if not already set
this->m_pdata->m_status = boost::regex_constants::error_complexity;
//
// clear the expression, we should be empty:
//
this->m_pdata->m_expression = 0;
this->m_pdata->m_expression_len = 0;
//
// and throw if required:
//
if (0 == (this->flags() & regex_constants::no_except))
{
std::string message = "Expression complexity exceeded.";
boost::regex_error e(message, boost::regex_constants::error_complexity, 0);
e.raise();
}
return;
}
while(state)
{
switch(state->type)
@ -1144,7 +1122,7 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state,
}
// now figure out if we can match a NULL string at this point:
if(pnull)
create_startmap(state->next.p, 0, pnull, mask, ++recursion_count);
create_startmap(state->next.p, 0, pnull, mask);
return;
}
case syntax_element_recurse:
@ -1206,7 +1184,7 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state,
case syntax_element_word_start:
{
// recurse, then AND with all the word characters:
create_startmap(state->next.p, l_map, pnull, mask, ++recursion_count);
create_startmap(state->next.p, l_map, pnull, mask);
if(l_map)
{
l_map[0] |= mask_init;
@ -1221,7 +1199,7 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state,
case syntax_element_word_end:
{
// recurse, then AND with all the word characters:
create_startmap(state->next.p, l_map, pnull, mask, ++recursion_count);
create_startmap(state->next.p, l_map, pnull, mask);
if(l_map)
{
l_map[0] |= mask_init;
@ -1313,11 +1291,11 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state,
return;
}
set_bad_repeat(state);
create_startmap(state->next.p, l_map, pnull, mask, ++recursion_count);
create_startmap(state->next.p, l_map, pnull, mask);
if((state->type == syntax_element_alt)
|| (static_cast<re_repeat*>(state)->min == 0)
|| (not_last_jump == 0))
create_startmap(rep->alt.p, l_map, pnull, mask, ++recursion_count);
create_startmap(rep->alt.p, l_map, pnull, mask);
}
}
return;
@ -1376,7 +1354,7 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state,
if(ok && ((m_recursion_checks[static_cast<re_brace*>(state)->index] & 2u) == 0))
{
m_recursion_checks[static_cast<re_brace*>(state)->index] |= 2u;
create_startmap(p->next.p, l_map, pnull, mask, ++recursion_count);
create_startmap(p->next.p, l_map, pnull, mask);
}
}
state = state->next.p;

View File

@ -97,11 +97,11 @@ private:
void put(char_type c);
void put(const sub_match_type& sub);
void format_all(unsigned recursion_count = 0);
void format_all();
void format_perl();
void format_escape();
void format_conditional(unsigned recursion_count);
void format_until_scope_end(unsigned recursion_count);
void format_conditional();
void format_until_scope_end();
bool handle_perl_verb(bool have_brace);
inline typename Results::value_type const& get_named_sub(ForwardIter i, ForwardIter j, const std::integral_constant<bool, false>&)
@ -199,7 +199,7 @@ OutputIterator basic_regex_formatter<OutputIterator, Results, traits, ForwardIte
}
template <class OutputIterator, class Results, class traits, class ForwardIter>
void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_all(unsigned recursion_count)
void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_all()
{
// over and over:
while(m_position != m_end)
@ -219,12 +219,12 @@ void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format
format_escape();
break;
case '(':
if((m_flags & boost::regex_constants::format_all) && (recursion_count < BOOST_REGEX_MAX_RECURSION_DEPTH))
if(m_flags & boost::regex_constants::format_all)
{
++m_position;
bool have_conditional = m_have_conditional;
m_have_conditional = false;
format_until_scope_end(recursion_count);
format_until_scope_end();
m_have_conditional = have_conditional;
if(m_position == m_end)
return;
@ -252,10 +252,10 @@ void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format
++m_position;
break;
case '?':
if((m_flags & boost::regex_constants::format_all) && (recursion_count < BOOST_REGEX_MAX_RECURSION_DEPTH))
if(m_flags & boost::regex_constants::format_all)
{
++m_position;
format_conditional(recursion_count);
format_conditional();
break;
}
put(*m_position);
@ -644,7 +644,7 @@ void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format
}
template <class OutputIterator, class Results, class traits, class ForwardIter>
void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_conditional(unsigned recursion_count)
void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_conditional()
{
if(m_position == m_end)
{
@ -692,7 +692,7 @@ void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format
if(m_results[v].matched)
{
m_have_conditional = true;
format_all(++recursion_count);
format_all();
m_have_conditional = false;
if((m_position != m_end) && (*m_position == static_cast<char_type>(':')))
{
@ -702,7 +702,7 @@ void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format
output_state saved_state = m_state;
m_state = output_none;
// format the rest of this scope:
format_until_scope_end(recursion_count);
format_until_scope_end();
// restore output state:
m_state = saved_state;
}
@ -714,7 +714,7 @@ void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format
m_state = output_none;
// format until ':' or ')':
m_have_conditional = true;
format_all(++recursion_count);
format_all();
m_have_conditional = false;
// restore state:
m_state = saved_state;
@ -723,17 +723,17 @@ void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format
// skip the ':':
++m_position;
// format the rest of this scope:
format_until_scope_end(recursion_count);
format_until_scope_end();
}
}
}
template <class OutputIterator, class Results, class traits, class ForwardIter>
void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_until_scope_end(unsigned recursion_count)
void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_until_scope_end()
{
do
{
format_all(++recursion_count);
format_all();
if((m_position == m_end) || (*m_position == static_cast<char_type>(')')))
return;
put(*m_position++);

View File

@ -35,7 +35,6 @@ class u32regex_iterator_implementation
public:
u32regex_iterator_implementation(const regex_type* p, BidirectionalIterator last, match_flag_type f)
: base(), end(last), re(*p), flags(f){}
u32regex_iterator_implementation(const u32regex_iterator_implementation&) = default;
bool init(BidirectionalIterator first)
{
base = first;

View File

@ -78,60 +78,149 @@ lib boost_regex_recursive :
local regress-sources = regress/$(R_SOURCE) ;
run regress/$(R_SOURCE) ../build//boost_regex ../build//icu_options
: # command line
: # input files
: # requirements
: regex_regress ;
test-suite regex
:
[ run regress/$(R_SOURCE) ../build//boost_regex ../build//icu_options
: # command line
: # input files
: # requirements
: regex_regress ]
run regress/$(R_SOURCE) ../build//boost_regex
../../thread/build//boost_thread ../build//icu_options
: # command line
: # input files
: # requirements
<define>TEST_THREADS
: regex_regress_threaded ;
[ run regress/$(R_SOURCE) ../build//boost_regex
../../thread/build//boost_thread ../build//icu_options
: # command line
: # input files
: # requirements
<define>TEST_THREADS
: regex_regress_threaded ]
run regress/$(R_SOURCE) ../build//boost_regex
../../thread/build//boost_thread ../build//icu_options
: # command line
: # input files
: # requirements
<define>TEST_THREADS
<define>BOOST_REGEX_MAX_CACHE_BLOCKS=0
: regex_regress_threaded_no_cache ;
[ run regress/$(R_SOURCE) ../build//boost_regex
../../thread/build//boost_thread ../build//icu_options
: # command line
: # input files
: # requirements
<define>TEST_THREADS
<define>BOOST_REGEX_MAX_CACHE_BLOCKS=0
: regex_regress_threaded_no_cache ]
[ regex-test posix_api_check : c_compiler_checks/posix_api_check.c ]
[ compile c_compiler_checks/wide_posix_api_check.c
: : wide_posix_api_check_c ]
[ regex-test posix_api_check_cpp : c_compiler_checks/posix_api_check.cpp ]
[ regex-test wide_posix_api_check_cpp
: c_compiler_checks/wide_posix_api_check.cpp ]
[ run pathology/bad_expression_test.cpp : : :
[ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ]
]
[ run pathology/recursion_test.cpp : : :
[ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ]
]
[ run named_subexpressions/named_subexpressions_test.cpp : : :
[ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ]
]
[ run unicode/unicode_iterator_test.cpp : : :
[ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ]
release <define>TEST_UTF8 : unicode_iterator_test_utf8 ]
[ run unicode/unicode_iterator_test.cpp : : :
[ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ]
release <define>TEST_UTF16 : unicode_iterator_test_utf16 ]
[ run unicode/unicode_casefold_test.cpp
../build//boost_regex ../build//icu_options
]
[ run static_mutex/static_mutex_test.cpp
../../thread/build//boost_thread ../build//boost_regex
]
[ run object_cache/object_cache_test.cpp : : :
[ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ]
]
[ run config_info/regex_config_info.cpp
../build//boost_regex/<link>static
: # command line
: # input files
: <test-info>always_show_run_output
]
[ run config_info/regex_config_info.cpp ../build//boost_regex
: # command line
: # input files
: <test-info>always_show_run_output
: regex_dll_config_info
]
[ run collate_info/collate_info.cpp ../build//boost_regex
: : : <test-info>always_show_run_output : test_collate_info ]
[ link concepts/concept_check.cpp :
[ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ]
]
[ link concepts/concept_check.cpp :
<define>BOOST_REGEX_STANDALONE [ check-target-builds ../build//is_legacy_03 : : <build>no ] : standalone_concept_check
]
[ link concepts/icu_concept_check.cpp :
<define>BOOST_REGEX_STANDALONE [ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ]
]
[ link concepts/icu_concept_check.cpp :
[ check-target-builds ../build//is_legacy_03 : : <build>no ] : standalone_icu_concept_check
]
[ link concepts/range_concept_check.cpp :
[ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ]
]
[ run concepts/test_bug_11988.cpp : : :
[ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ]
]
[ run
# sources
captures/captures_test.cpp
../build//icu_options
: # additional args
: # test-files
: # requirements
<threading>multi
<define>BOOST_REGEX_MATCH_EXTRA=1
<define>BOOST_REGEX_NO_LIB=1
[ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ]
: # test name
captures_test
]
[ run regress/$(R_SOURCE) .//boost_regex_recursive
../build//icu_options
: # command line
: # input files
: # requirements
<define>BOOST_REGEX_RECURSIVE=1
<define>BOOST_REGEX_CXX03=1
: regex_regress_recursive ]
[ run regress/$(R_SOURCE) ./noeh_test//boost_regex_noeh
../build//icu_options
: # command line
: # input files
: # requirements
<define>BOOST_NO_EXCEPTIONS=1
<exception-handling>off
<link>static
<runtime-link>shared
: regex_regress_noeh ]
;
regex-test posix_api_check : c_compiler_checks/posix_api_check.c ;
compile c_compiler_checks/wide_posix_api_check.c : : wide_posix_api_check_c ;
regex-test posix_api_check_cpp : c_compiler_checks/posix_api_check.cpp ;
regex-test wide_posix_api_check_cpp : c_compiler_checks/wide_posix_api_check.cpp ;
run pathology/bad_expression_test.cpp : : : [ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ] ;
run pathology/recursion_test.cpp : : : [ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ] ;
run named_subexpressions/named_subexpressions_test.cpp : : : [ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ] ;
run unicode/unicode_iterator_test.cpp : : : [ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ] release <define>TEST_UTF8 : unicode_iterator_test_utf8 ;
run unicode/unicode_iterator_test.cpp : : : [ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ] release <define>TEST_UTF16 : unicode_iterator_test_utf16 ;
run unicode/unicode_casefold_test.cpp ../build//boost_regex ../build//icu_options ;
run static_mutex/static_mutex_test.cpp ../../thread/build//boost_thread ../build//boost_regex ;
run object_cache/object_cache_test.cpp : : : [ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ] ;
run config_info/regex_config_info.cpp ../build//boost_regex/<link>static : : : <test-info>always_show_run_output ;
run config_info/regex_config_info.cpp ../build//boost_regex : : : <test-info>always_show_run_output : regex_dll_config_info ;
run collate_info/collate_info.cpp ../build//boost_regex : : : <test-info>always_show_run_output : test_collate_info ;
link concepts/concept_check.cpp : [ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ] <toolset>gcc:<cxxflags>-Wno-deprecated-copy ;
link concepts/concept_check.cpp : <define>BOOST_REGEX_STANDALONE [ check-target-builds ../build//is_legacy_03 : : <build>no ] <toolset>gcc:<cxxflags>-Wno-deprecated-copy : standalone_concept_check ;
link concepts/icu_concept_check.cpp : <define>BOOST_REGEX_STANDALONE [ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ] <toolset>gcc:<cxxflags>-Wno-deprecated-copy ;
link concepts/icu_concept_check.cpp : [ check-target-builds ../build//is_legacy_03 : : <build>no ] <toolset>gcc:<cxxflags>-Wno-deprecated-copy : standalone_icu_concept_check ;
link concepts/range_concept_check.cpp : [ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ] <toolset>gcc:<cxxflags>-Wno-deprecated-copy ;
run concepts/test_bug_11988.cpp : : : [ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ] ;
run captures/captures_test.cpp ../build//icu_options : : : <threading>multi <define>BOOST_REGEX_MATCH_EXTRA=1 <define>BOOST_REGEX_NO_LIB=1
[ check-target-builds ../build//is_legacy_03 : : <source>../build//boost_regex ] : captures_test ;
run regress/$(R_SOURCE) .//boost_regex_recursive ../build//icu_options : : : <define>BOOST_REGEX_RECURSIVE=1 <define>BOOST_REGEX_CXX03=1 : regex_regress_recursive ;
run regress/$(R_SOURCE) ./noeh_test//boost_regex_noeh ../build//icu_options : : : <define>BOOST_NO_EXCEPTIONS=1 <exception-handling>off <link>static <runtime-link>shared : regex_regress_noeh ;
compile test_consolidated.cpp ;
build-project ../example ;
# `quick` target (for CI)
run quick.cpp ../build//boost_regex ;
compile test_warnings.cpp
: <toolset>msvc:<warnings>all <toolset>msvc:<warnings-as-errors>on
<toolset>gcc:<warnings>all <toolset>gcc:<warnings-as-errors>on

View File

@ -1 +0,0 @@
Z(((((((a+)+)+)+)+)+)+)+|Y(((((((a+)+)+)+)+)+)+)+|X(((((((a+)+)+)+)+)+)+)+|W(((((((a+)+)+)+)+)+)+)+|V(((((((a+)+)+)+)+)+)+)+|CZ(((((((a+)+)+)+)+)+)+)+|CY(((((((a+)+)+)+)+)+)+;+|CX(((((((a+)+)+)+)+)+)+)+|CW(((((((a+)+)+)+)+)+)+)+|CV(((((((a+)+)+)+)+)+)+)+|(a+)+b)

View File

@ -1 +0,0 @@
Z(((((((a+)+)+)+)+<2B><><EFBFBD><EFBFBD>)+|Y(((((((a+)+)+)+)+)++)+)|X(((((((a+)+)+)+)+)+)+)+|W((<28><>(((a+)+)+)+)+)+)+)+;|V((()++)+)+|CW(((((((a+)+)+)+((((a+)+)+)+)+)+)+)+|CZ(((((((a+)+)+)+)+)+)+)+|CY(((((((a+)+)+)+)+)+)+)+|CX(((((((a+)+)+)+)+)+)+)+|CW(((((((a+)+)+)+)+)+)+)+|CV,((((((a+)+)+)+)+)+)+)+|(a+)+bc

View File

@ -1 +0,0 @@
8^\l*(?:((.<2E>*?)\W*(?1)\<5C>*\2[abc]| |((.)\)W*(?1)\W*\4|\ZZZZZZZZZZZZZZZZZZZZZZ<1B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\pd\)W*(?1)\W*\4|\ZZZZZZZZZZZZZZZZZZZZZZ<1B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><1B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\pd<1B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><1B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\pdquick brown )ox

View File

@ -1,73 +0,0 @@
'<27> (?: [\040\t] | \(
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
\) )* # optional leading comment
(?: (?:
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
|
" (?: # opening quote...
[^\\\x80-\xff\n\015"] # Anything except backslash and quote
| # or
\\ [^\x80-\xff] # Escaped something (something != CR)
)* " # closing quote
) # initial word
(?: (?: [\040\t] | \(
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
\) )* \. (?: [\040\t] | \(\x80-\xff]+ # some number of atom characters...
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
|
" (?: # opening quote...
[^\\\x80-\xff\n\015"] # Anything except backslash and quote
| # or
\\ [^\x80-\xff] # Escaped something (something != CR)
)* " # closing quote
) # initial word
(?: (?: [\040\t] | \(
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
\) )* \. (?: [\040\t] | \(
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
\) )* (?:
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
|
" (?: # opening quote...
[^\\\x80-\xff\n\015"] # Anything except backslash and quote
| # or
\\ [^\x80-\xff] # Escaped something (something != CR)
)* " # closing quote
) )* # further okay, if led by a period
(?: (\040\t] | \(
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
\) )* @ (?: [\040\t] | \(
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
\) )* (?:
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
| \[ # [
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
\] # ]
) # initial subdomain
(?: #
(?: [\040\t] | \(
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
\) )* \. # if led by a period...
(?: [\040\t] | \(
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
\) )* (?:
[^(\04<30>)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
| \[ # [
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
\] # ]
) # ...further okay
)*
# address spec
(?: [\040\t] | \(
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] ^ | \\[\x80-\xff] )* \) )*
\) )* > # trailing >
# name and address
) (?: [\040\t] | \(
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
\) )* # optional trailing comment
<user@dom.ain>

Some files were not shown because too many files have changed in this diff Show More