1 *** boost/regex/v4/basic_regex_parser.hpp.orig 2008-01-14 12:53:01.000000000 -0600
2 --- boost/regex/v4/basic_regex_parser.hpp 2008-01-14 12:57:25.000000000 -0600
3 *************** bool basic_regex_parser<charT, traits>::
6 case syntax_element_restart_continue:
7 case syntax_element_jump:
8 case syntax_element_startmark:
9 + case syntax_element_backstep:
10 // can't legally repeat any of the above:
11 fail(regex_constants::error_badrepeat, m_position - m_base);
13 *************** bool basic_regex_parser<charT, traits>::
18 re_syntax_base* b = this->getaddress(expected_alt_point);
19 + // Make sure we have exactly one alternative following this state:
20 if(b->type != syntax_element_alt)
22 re_alt* alt = static_cast<re_alt*>(this->insert_state(expected_alt_point, syntax_element_alt, sizeof(re_alt)));
23 *************** bool basic_regex_parser<charT, traits>::
26 fail(regex_constants::error_bad_pattern, m_position - m_base);
29 + // check for invalid repetition of next state:
30 + b = this->getaddress(expected_alt_point);
31 + b = this->getaddress(static_cast<re_alt*>(b)->next.i, b);
32 + if((b->type != syntax_element_assert_backref)
33 + && (b->type != syntax_element_startmark))
35 + fail(regex_constants::error_badrepeat, m_position - m_base);
40 // append closing parenthesis state: