forked from boostorg/regex
merged from trunk
[SVN r45360]
This commit is contained in:
@ -535,7 +535,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_within_word()
|
|||||||
if(position == last)
|
if(position == last)
|
||||||
return false;
|
return false;
|
||||||
// both prev and this character must be m_word_mask:
|
// both prev and this character must be m_word_mask:
|
||||||
if(traits_inst.isctype(*position, m_word_mask))
|
bool prev = traits_inst.isctype(*position, m_word_mask);
|
||||||
{
|
{
|
||||||
bool b;
|
bool b;
|
||||||
if((position == backstop) && ((m_match_flags & match_prev_avail) == 0))
|
if((position == backstop) && ((m_match_flags & match_prev_avail) == 0))
|
||||||
@ -546,7 +546,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_within_word()
|
|||||||
b = traits_inst.isctype(*position, m_word_mask);
|
b = traits_inst.isctype(*position, m_word_mask);
|
||||||
++position;
|
++position;
|
||||||
}
|
}
|
||||||
if(b)
|
if(b == prev)
|
||||||
{
|
{
|
||||||
pstate = pstate->next.p;
|
pstate = pstate->next.p;
|
||||||
return true;
|
return true;
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
|
|
||||||
#ifdef _DLL_CPPLIB
|
#ifdef _DLL_CPPLIB
|
||||||
#include <boost/detail/workaround.hpp>
|
#include <boost/detail/workaround.hpp>
|
||||||
|
#include <memory>
|
||||||
|
#include <string>
|
||||||
//
|
//
|
||||||
// This is a horrible workaround, without declaring these symbols extern we get
|
// This is a horrible workaround, without declaring these symbols extern we get
|
||||||
// duplicate symbol errors when linking if the application is built without
|
// duplicate symbol errors when linking if the application is built without
|
||||||
|
@ -23,6 +23,8 @@
|
|||||||
#include <boost/detail/workaround.hpp>
|
#include <boost/detail/workaround.hpp>
|
||||||
|
|
||||||
#ifdef _DLL_CPPLIB
|
#ifdef _DLL_CPPLIB
|
||||||
|
#include <memory>
|
||||||
|
#include <string>
|
||||||
//
|
//
|
||||||
// This is a horrible workaround, without declaring these symbols extern we get
|
// This is a horrible workaround, without declaring these symbols extern we get
|
||||||
// duplicate symbol errors when linking if the application is built without
|
// duplicate symbol errors when linking if the application is built without
|
||||||
|
@ -109,6 +109,9 @@ void test_assertion_escapes()
|
|||||||
TEST_REGEX_SEARCH("a\\B", perl, "ab", match_default, make_array(0, 1, -2, -2));
|
TEST_REGEX_SEARCH("a\\B", perl, "ab", match_default, make_array(0, 1, -2, -2));
|
||||||
TEST_REGEX_SEARCH("a\\B", perl, "a", match_default, make_array(-2, -2));
|
TEST_REGEX_SEARCH("a\\B", perl, "a", match_default, make_array(-2, -2));
|
||||||
TEST_REGEX_SEARCH("a\\B", perl, "a ", match_default, make_array(-2, -2));
|
TEST_REGEX_SEARCH("a\\B", perl, "a ", match_default, make_array(-2, -2));
|
||||||
|
TEST_REGEX_SEARCH("\\By\\b", perl, "xy", match_default, make_array(1, 2, -2, -2));
|
||||||
|
TEST_REGEX_SEARCH("\\by\\B", perl, "yz", match_default, make_array(0, 1, -2, -2));
|
||||||
|
TEST_REGEX_SEARCH("\\B\\*\\B", perl, " * ", match_default, make_array(1, 2, -2, -2));
|
||||||
// buffer operators:
|
// buffer operators:
|
||||||
TEST_REGEX_SEARCH("\\`abc", perl, "abc", match_default, make_array(0, 3, -2, -2));
|
TEST_REGEX_SEARCH("\\`abc", perl, "abc", match_default, make_array(0, 3, -2, -2));
|
||||||
TEST_REGEX_SEARCH("\\`abc", perl, "\nabc", match_default, make_array(-2, -2));
|
TEST_REGEX_SEARCH("\\`abc", perl, "\nabc", match_default, make_array(-2, -2));
|
||||||
|
Reference in New Issue
Block a user