Empty expressions, and empty alternatives are now

allowed when using the Perl regular expression syntax.  This change has
been added for Perl compatibility, when the new [syntax_option_type]
['no_empty_expressions] is set then the old behaviour is preserved and
empty expressions are prohibited.  This is issue
[@https://svn.boost.org/trac/boost/ticket/1081 #1081].

Fixes #1081.

[SVN r50374]
This commit is contained in:
John Maddock
2008-12-23 19:06:04 +00:00
parent b4152cd74d
commit e4b31ea37f
25 changed files with 147 additions and 81 deletions

View File

@ -42,7 +42,8 @@ void basic_tests()
TEST_REGEX_SEARCH("()", perl, "zzz", match_default, make_array(0, 0, 0, 0, -2, 1, 1, 1, 1, -2, 2, 2, 2, 2, -2, 3, 3, 3, 3, -2, -2));
TEST_REGEX_SEARCH("()", perl, "", match_default, make_array(0, 0, 0, 0, -2, -2));
TEST_INVALID_REGEX("(", perl);
TEST_INVALID_REGEX("", perl);
TEST_INVALID_REGEX("", perl|no_empty_expressions);
TEST_REGEX_SEARCH("", perl, "abc", match_default, make_array(0, 0, -2, 1, 1, -2, 2, 2, -2, 3, 3, -2, -2));
TEST_INVALID_REGEX(")", perl);
TEST_INVALID_REGEX("(aa", perl);
TEST_INVALID_REGEX("aa)", perl);