Compare commits

..

24 Commits

Author SHA1 Message Date
7e23c2b43c Document module support. 2024-12-18 18:54:01 +00:00
c898c51ea1 Merge branch 'develop' into modules
Fixed Conflicts:
	include/boost/regex/v5/basic_regex.hpp
	include/boost/regex/v5/basic_regex_creator.hpp
	include/boost/regex/v5/c_regex_traits.hpp
	include/boost/regex/v5/mem_block_cache.hpp
	include/boost/regex/v5/regex_format.hpp
	include/boost/regex/v5/regex_iterator.hpp
	include/boost/regex/v5/regex_raw_buffer.hpp
	include/boost/regex/v5/regex_token_iterator.hpp
2024-12-18 17:55:24 +00:00
9ddfbd2923 Adjust test script again. 2024-04-19 18:25:36 +01:00
456bf7756d More msvc workarounds. 2024-04-19 13:42:43 +01:00
27a5bcb1f4 TRy again with msvc config. 2024-04-19 13:28:21 +01:00
3d46d5158b Try again with msvc config. 2024-04-19 13:19:09 +01:00
a12c3c2c14 Try again with msvc config. 2024-04-19 12:23:50 +01:00
d2bfcaf146 Correct msvc version 2024-04-18 20:03:35 +01:00
736f0de18d Try again with implementation unit includes. 2024-04-18 20:02:16 +01:00
cc60bce275 Correct module implementation units.
Update script permissions.
2024-04-18 18:14:44 +01:00
2c0058a902 Hide key template instances behind factory functions.
And provide a separate "module library"
Update testing scripts.
2024-04-18 16:37:12 +01:00
fbfdda66fd Clean up #includes. 2024-04-10 12:28:57 +01:00
b4f600e910 Correct ICU library names. 2024-04-06 18:40:17 +01:00
02f8f3119e Update clang linkage options. 2024-04-06 18:33:44 +01:00
e91fac8614 Try again with CI. 2024-04-06 17:47:12 +01:00
6e502179f1 More test script fixes. 2024-04-06 17:41:20 +01:00
cf2a60c88b Add msvc module test. 2024-04-06 17:21:53 +01:00
19931d87bd See if clang-19 works. 2024-04-06 16:55:46 +01:00
7c460d93cf Try clang 17 2024-04-06 16:47:26 +01:00
9e36a0b67e Set file permissions. 2024-04-06 16:28:47 +01:00
d347b0d979 Try again with clang-18 install. 2024-04-06 14:13:03 +01:00
ba61613eff Remove modules Jamfile: it doesn't work.
Add shell script for testing modules with clang.
2024-04-06 13:57:40 +01:00
15acbd5117 Merge branch 'develop' into modules
Fixed Conflicts:
	include/boost/regex/config.hpp

Also fix up msvc build failures.
Example now build with msvc or with clang.  The build script is still hopelessly broken though.
2024-04-04 19:17:39 +01:00
66389f6e21 Add module support and tests. 2022-04-20 19:39:27 +01:00
3866 changed files with 6733 additions and 185 deletions

View File

@ -10,14 +10,9 @@ on:
- master
- develop
- feature/**
- cve-*
pull_request:
release:
types: [published, created, edited]
env:
UBSAN_OPTIONS: print_stacktrace=1
jobs:
ubuntu-jammy:
runs-on: ubuntu-22.04
@ -65,7 +60,7 @@ jobs:
run: ../../../b2 print_config_info toolset=$TOOLSET
working-directory: ../boost-root/libs/config/test
- name: Test
run: ../../../b2 toolset=$TOOLSET variant=debug,release ${{ startsWith(matrix.compiler, 'g++-13') && 'address-sanitizer=norecover undefined-sanitizer=norecover' || '' }}
run: ../../../b2 toolset=$TOOLSET
working-directory: ../boost-root/libs/regex/test
ubuntu-jammy-standalone:
runs-on: ubuntu-22.04
@ -175,54 +170,6 @@ jobs:
- name: Test
run: CXX=clang++-18 LIBRARIES="-licuuc -licudata -licui18n" ./test_clang.sh
working-directory: ../boost-root/libs/regex/test/module
ubuntu-noble-clang:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
compiler: [ clang++-16, clang++-17, clang++-18 ]
standard: [ c++11, c++14, c++17, c++20 ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
with:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[apple];[Apple];[APPLE]'
commit-filter-separator: ';'
fail-fast: true
- name: Set TOOLSET
run: echo ${{ matrix.compiler }} | awk '/^g/ { print "TOOLSET=gcc" } /^clang/ { print "TOOLSET=clang" }' >> $GITHUB_ENV
- name: Add repository
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Install packages
run: sudo apt install clang-16 clang-17 clang-18
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
run: git submodule update --init tools/boostdep
working-directory: ../boost-root
- name: Copy files
run: cp -r $GITHUB_WORKSPACE/* libs/regex
working-directory: ../boost-root
- name: Install deps
run: python tools/boostdep/depinst/depinst.py -I example -g "--jobs 3" regex
working-directory: ../boost-root
- name: Bootstrap
run: ./bootstrap.sh
working-directory: ../boost-root
- name: Generate headers
run: ./b2 headers
working-directory: ../boost-root
- name: Generate user config
run: 'echo "using $TOOLSET : : ${{ matrix.compiler }} : <cxxflags>-std=${{ matrix.standard }} ;" > ~/user-config.jam'
working-directory: ../boost-root
- name: Config info
run: ../../../b2 print_config_info toolset=$TOOLSET
working-directory: ../boost-root/libs/config/test
- name: Test
run: ../../../b2 toolset=$TOOLSET define=CI_SUPPRESS_KNOWN_ISSUES define=SLOW_COMPILER variant=debug,release ${{ startsWith(matrix.compiler, 'clang++-18') && 'address-sanitizer=norecover undefined-sanitizer=norecover' || '' }}
working-directory: ../boost-root/libs/regex/test
macos:
runs-on: macos-latest
strategy:

View File

@ -898,11 +898,6 @@ escape_type_class_jump:
}
const charT* pc = m_position;
std::intmax_t i = this->m_traits.toi(pc, m_end, 10);
if(i < 0 && !syn_end)
{
fail(regex_constants::error_backref, m_position - m_base);
return false;
}
if((i < 0) && syn_end)
{
// Check for a named capture, get the leftmost one if there is more than one:
@ -1002,7 +997,7 @@ bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_
if((m_position != m_end)
&& (0 == (this->flags() & regbase::main_option_type))
&& (this->m_traits.syntax_type(*m_position) == regex_constants::syntax_plus))
{
{
possessive = true;
++m_position;
}
@ -1119,13 +1114,6 @@ bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_
else
contin = false;
break;
case regex_constants::syntax_hash:
if (this->flags() & regex_constants::mod_x) {
while((m_position != m_end) && !is_separator(*m_position++)){}
contin = true;
break;
}
BOOST_REGEX_FALLTHROUGH;
default:
contin = false;
}

View File

@ -101,7 +101,7 @@ BOOST_REGEX_MODULE_EXPORT inline match_flags operator|(match_flags m1, match_fla
BOOST_REGEX_MODULE_EXPORT inline match_flags operator^(match_flags m1, match_flags m2)
{ return static_cast<match_flags>(static_cast<std::int32_t>(m1) ^ static_cast<std::int32_t>(m2)); }
BOOST_REGEX_MODULE_EXPORT inline match_flags operator~(match_flags m1)
{ return static_cast<match_flags>(~static_cast<std::int32_t>(m1) & static_cast<std::int32_t>(match_not_any)); }
{ return static_cast<match_flags>(~static_cast<std::int32_t>(m1)); }
BOOST_REGEX_MODULE_EXPORT inline match_flags& operator&=(match_flags& m1, match_flags m2)
{ m1 = m1&m2; return m1; }
BOOST_REGEX_MODULE_EXPORT inline match_flags& operator|=(match_flags& m1, match_flags m2)

View File

@ -227,10 +227,6 @@ public:
{
if(m_is_singular && m_subs.empty())
raise_logic_error();
if (sub >= INT_MAX - 2 )
return m_null;
sub += 2;
if(sub < (int)m_subs.size() && (sub >= 0))
{

View File

@ -237,8 +237,8 @@ void perl_matcher<BidiIterator, Allocator, traits>::extend_stack()
saved_state* backup_state;
stack_base = static_cast<saved_state*>(get_mem_block());
backup_state = reinterpret_cast<saved_state*>(reinterpret_cast<char*>(stack_base)+BOOST_REGEX_BLOCKSIZE);
saved_extra_block* block = reinterpret_cast<saved_extra_block*>(
reinterpret_cast<std::uintptr_t>(backup_state) - sizeof(saved_extra_block));
saved_extra_block* block = static_cast<saved_extra_block*>(backup_state);
--block;
(void) new (block) saved_extra_block(m_stack_base, m_backup_state);
m_stack_base = stack_base;
m_backup_state = block;

View File

@ -19,8 +19,6 @@
#ifndef BOOST_REGEX_V5_REGBASE_HPP
#define BOOST_REGEX_V5_REGBASE_HPP
#include <boost/regex/config.hpp>
namespace boost{
//
// class regbase

View File

@ -19,8 +19,6 @@
#ifndef BOOST_REGEX_SYNTAX_TYPE_HPP
#define BOOST_REGEX_SYNTAX_TYPE_HPP
#include <boost/regex/config.hpp>
namespace boost{
namespace regex_constants{

View File

@ -137,8 +137,5 @@ compile test_windows_defs_4.cpp ;
run issue153.cpp : : : "<toolset>msvc:<linkflags>-STACK:2097152" ;
run issue227.cpp ;
run issue232.cpp ;
run issue244.cpp ;
run issue245.cpp ;
run lookbehind_recursion_stress_test.cpp ;
run regex_replace_overflow.cpp ;

View File

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

View File

@ -0,0 +1 @@
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

@ -0,0 +1 @@
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

@ -0,0 +1,73 @@
'<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