Кресты / Говнокод #4120 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
const char* def = "DEFINE";
while(*def && (m_position != m_end) && (*m_position == charT(*def)))
  ++m_position, ++def;
if((m_position == m_end) || *def)
{
  // Rewind to start of (? sequence:
  --m_position;
  while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
  fail(regex_constants::error_perl_extension, m_position - m_base);
  return false;
}
re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_assert_backref, sizeof(re_brace)));
br->index = 9999; // special magic value!
if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
{
  // Rewind to start of (? sequence:
  --m_position;
  while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
  fail(regex_constants::error_perl_extension, m_position - m_base);
  return false;
}

Фрагмент из boost::regex, "magic value!", улыбнуло =]
basic_regex_parser.hpp : 2160

Запостил: rudvil rudvil, (Updated )

Комментарии (0) RSS

Добавить комментарий

Я, guest, находясь в здравом уме и твердой памяти, торжественно заявляю:

    А не использовать ли нам bbcode?


    8