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

@ -38,7 +38,7 @@ int get_posix_compile_options(boost::regex_constants::syntax_option_type opts)
{
case regbase::perl:
result = (opts & regbase::no_perl_ex) ? REG_EXTENDED : REG_PERL;
if(opts & (regbase::no_bk_refs|regbase::no_mod_m|regbase::mod_x|regbase::mod_s|regbase::no_mod_s|regbase::no_escape_in_lists))
if(opts & (regbase::no_bk_refs|regbase::no_mod_m|regbase::mod_x|regbase::mod_s|regbase::no_mod_s|regbase::no_escape_in_lists|regbase::no_empty_expressions))
return -1;
break;
case regbase::basic: