Fix issue with (?!) not being a valid expression. Update tests and docs to match.

[SVN r77602]
This commit is contained in:
John Maddock
2012-03-28 12:00:34 +00:00
parent 9ab4fb9eff
commit b45d6bb70c
88 changed files with 148 additions and 98 deletions

View File

@ -2492,9 +2492,11 @@ option_group_jump:
this->m_pdata->m_data.align();
re_jump* jmp = static_cast<re_jump*>(this->getaddress(jump_offset));
jmp->alt.i = this->m_pdata->m_data.size() - this->getoffset(jmp);
if(this->m_last_state == jmp)
if((this->m_last_state == jmp) && (markid != -2))
{
// Oops... we didn't have anything inside the assertion:
// Oops... we didn't have anything inside the assertion.
// Note we don't get here for negated forward lookahead as (?!)
// does have some uses.
// Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;