perl_matcher.hpp 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626
  1. /*
  2. *
  3. * Copyright (c) 2002
  4. * John Maddock
  5. *
  6. * Use, modification and distribution are subject to the
  7. * Boost Software License, Version 1.0. (See accompanying file
  8. * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  9. *
  10. */
  11. #ifndef BOOST_REGEX_MATCHER_HPP
  12. #define BOOST_REGEX_MATCHER_HPP
  13. #include <boost/regex/v5/match_flags.hpp>
  14. #include <boost/regex/v5/match_results.hpp>
  15. #include <boost/regex/v5/regbase.hpp>
  16. #include <boost/regex/v5/iterator_category.hpp>
  17. #include <boost/regex/v5/states.hpp>
  18. #include <boost/regex/v5/regex_traits.hpp>
  19. #ifndef BOOST_REGEX_AS_MODULE
  20. #ifndef BOOST_REGEX_STANDALONE
  21. #include <boost/throw_exception.hpp>
  22. #endif
  23. #include <climits>
  24. #endif
  25. #ifdef BOOST_REGEX_MSVC
  26. # pragma warning(push)
  27. #pragma warning(disable : 4251 4459)
  28. #if BOOST_REGEX_MSVC < 1700
  29. # pragma warning(disable : 4231)
  30. #endif
  31. # if BOOST_REGEX_MSVC < 1600
  32. # pragma warning(disable : 4660)
  33. # endif
  34. #if BOOST_REGEX_MSVC < 1910
  35. #pragma warning(disable:4800)
  36. #endif
  37. #endif
  38. #ifndef BOOST_REGEX_STANDALONE
  39. # define BOOST_REGEX_DETAIL_THROW(ex) boost::throw_exception(ex)
  40. #else
  41. # define BOOST_REGEX_DETAIL_THROW(ex) throw ex
  42. #endif
  43. namespace boost{
  44. namespace BOOST_REGEX_DETAIL_NS{
  45. //
  46. // error checking API:
  47. //
  48. inline void verify_options(boost::regex_constants::syntax_option_type, match_flag_type mf)
  49. {
  50. auto is_perl = (mf & match_perl);
  51. auto is_posix = (mf & match_posix);
  52. if (is_perl && is_posix)
  53. {
  54. BOOST_REGEX_DETAIL_THROW(std::logic_error("Usage Error: Can't mix Perl and POSIX matching rules"));
  55. }
  56. //
  57. // can't mix match_extra with POSIX matching rules:
  58. //
  59. if ((mf & match_extra) && is_posix)
  60. {
  61. BOOST_REGEX_DETAIL_THROW(std::logic_error("Usage Error: Can't mix regular expression captures with POSIX matching rules"));
  62. }
  63. }
  64. //
  65. // function can_start:
  66. //
  67. template <class charT>
  68. inline bool can_start(charT c, const unsigned char* map, unsigned char mask)
  69. {
  70. return ((c < static_cast<charT>(0)) ? true : ((c >= static_cast<charT>(1 << CHAR_BIT)) ? true : map[c] & mask));
  71. }
  72. inline bool can_start(char c, const unsigned char* map, unsigned char mask)
  73. {
  74. return map[(unsigned char)c] & mask;
  75. }
  76. inline bool can_start(signed char c, const unsigned char* map, unsigned char mask)
  77. {
  78. return map[(unsigned char)c] & mask;
  79. }
  80. inline bool can_start(unsigned char c, const unsigned char* map, unsigned char mask)
  81. {
  82. return map[c] & mask;
  83. }
  84. inline bool can_start(unsigned short c, const unsigned char* map, unsigned char mask)
  85. {
  86. return ((c >= (1 << CHAR_BIT)) ? true : map[c] & mask);
  87. }
  88. #if defined(WCHAR_MIN) && (WCHAR_MIN == 0) && !defined(BOOST_NO_INTRINSIC_WCHAR_T)
  89. inline bool can_start(wchar_t c, const unsigned char* map, unsigned char mask)
  90. {
  91. return ((c >= static_cast<wchar_t>(1u << CHAR_BIT)) ? true : map[c] & mask);
  92. }
  93. #endif
  94. #if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
  95. inline bool can_start(unsigned int c, const unsigned char* map, unsigned char mask)
  96. {
  97. return (((c >= static_cast<unsigned int>(1u << CHAR_BIT)) ? true : map[c] & mask));
  98. }
  99. #endif
  100. template <class C, class T, class A>
  101. inline int string_compare(const std::basic_string<C,T,A>& s, const C* p)
  102. {
  103. if(0 == *p)
  104. {
  105. if(s.empty() || ((s.size() == 1) && (s[0] == 0)))
  106. return 0;
  107. }
  108. return s.compare(p);
  109. }
  110. template <class Seq, class C>
  111. inline int string_compare(const Seq& s, const C* p)
  112. {
  113. std::size_t i = 0;
  114. while((i < s.size()) && (p[i] == s[i]))
  115. {
  116. ++i;
  117. }
  118. return (i == s.size()) ? -(int)p[i] : (int)s[i] - (int)p[i];
  119. }
  120. # define STR_COMP(s,p) string_compare(s,p)
  121. template<class charT>
  122. inline const charT* re_skip_past_null(const charT* p)
  123. {
  124. while (*p != static_cast<charT>(0)) ++p;
  125. return ++p;
  126. }
  127. template <class iterator, class charT, class traits_type, class char_classT>
  128. iterator re_is_set_member(iterator next,
  129. iterator last,
  130. const re_set_long<char_classT>* set_,
  131. const regex_data<charT, traits_type>& e, bool icase)
  132. {
  133. const charT* p = reinterpret_cast<const charT*>(set_+1);
  134. iterator ptr;
  135. unsigned int i;
  136. //bool icase = e.m_flags & regex_constants::icase;
  137. if(next == last) return next;
  138. typedef typename traits_type::string_type traits_string_type;
  139. const ::boost::regex_traits_wrapper<traits_type>& traits_inst = *(e.m_ptraits);
  140. // dwa 9/13/00 suppress incorrect MSVC warning - it claims this is never
  141. // referenced
  142. (void)traits_inst;
  143. // try and match a single character, could be a multi-character
  144. // collating element...
  145. for(i = 0; i < set_->csingles; ++i)
  146. {
  147. ptr = next;
  148. if(*p == static_cast<charT>(0))
  149. {
  150. // treat null string as special case:
  151. if(traits_inst.translate(*ptr, icase))
  152. {
  153. ++p;
  154. continue;
  155. }
  156. return set_->isnot ? next : (ptr == next) ? ++next : ptr;
  157. }
  158. else
  159. {
  160. while(*p && (ptr != last))
  161. {
  162. if(traits_inst.translate(*ptr, icase) != *p)
  163. break;
  164. ++p;
  165. ++ptr;
  166. }
  167. if(*p == static_cast<charT>(0)) // if null we've matched
  168. return set_->isnot ? next : (ptr == next) ? ++next : ptr;
  169. p = re_skip_past_null(p); // skip null
  170. }
  171. }
  172. charT col = traits_inst.translate(*next, icase);
  173. if(set_->cranges || set_->cequivalents)
  174. {
  175. traits_string_type s1;
  176. //
  177. // try and match a range, NB only a single character can match
  178. if(set_->cranges)
  179. {
  180. if((e.m_flags & regex_constants::collate) == 0)
  181. s1.assign(1, col);
  182. else
  183. {
  184. charT a[2] = { col, charT(0), };
  185. s1 = traits_inst.transform(a, a + 1);
  186. }
  187. for(i = 0; i < set_->cranges; ++i)
  188. {
  189. if(STR_COMP(s1, p) >= 0)
  190. {
  191. do{ ++p; }while(*p);
  192. ++p;
  193. if(STR_COMP(s1, p) <= 0)
  194. return set_->isnot ? next : ++next;
  195. }
  196. else
  197. {
  198. // skip first string
  199. do{ ++p; }while(*p);
  200. ++p;
  201. }
  202. // skip second string
  203. do{ ++p; }while(*p);
  204. ++p;
  205. }
  206. }
  207. //
  208. // try and match an equivalence class, NB only a single character can match
  209. if(set_->cequivalents)
  210. {
  211. charT a[2] = { col, charT(0), };
  212. s1 = traits_inst.transform_primary(a, a +1);
  213. for(i = 0; i < set_->cequivalents; ++i)
  214. {
  215. if(STR_COMP(s1, p) == 0)
  216. return set_->isnot ? next : ++next;
  217. // skip string
  218. do{ ++p; }while(*p);
  219. ++p;
  220. }
  221. }
  222. }
  223. if(traits_inst.isctype(col, set_->cclasses) == true)
  224. return set_->isnot ? next : ++next;
  225. if((set_->cnclasses != 0) && (traits_inst.isctype(col, set_->cnclasses) == false))
  226. return set_->isnot ? next : ++next;
  227. return set_->isnot ? ++next : next;
  228. }
  229. template <class BidiIterator>
  230. class repeater_count
  231. {
  232. repeater_count** stack;
  233. repeater_count* next;
  234. int state_id;
  235. std::size_t count; // the number of iterations so far
  236. BidiIterator start_pos; // where the last repeat started
  237. repeater_count* unwind_until(int n, repeater_count* p, int current_recursion_id)
  238. {
  239. while(p && (p->state_id != n))
  240. {
  241. if(-2 - current_recursion_id == p->state_id)
  242. return 0;
  243. p = p->next;
  244. if(p && (p->state_id < 0))
  245. {
  246. p = unwind_until(p->state_id, p, current_recursion_id);
  247. if(!p)
  248. return p;
  249. p = p->next;
  250. }
  251. }
  252. return p;
  253. }
  254. public:
  255. repeater_count(repeater_count** s) : stack(s), next(0), state_id(-1), count(0), start_pos() {}
  256. repeater_count(int i, repeater_count** s, BidiIterator start, int current_recursion_id)
  257. : start_pos(start)
  258. {
  259. state_id = i;
  260. stack = s;
  261. next = *stack;
  262. *stack = this;
  263. if((state_id > next->state_id) && (next->state_id >= 0))
  264. count = 0;
  265. else
  266. {
  267. repeater_count* p = next;
  268. p = unwind_until(state_id, p, current_recursion_id);
  269. if(p)
  270. {
  271. count = p->count;
  272. start_pos = p->start_pos;
  273. }
  274. else
  275. count = 0;
  276. }
  277. }
  278. ~repeater_count()
  279. {
  280. if(next)
  281. *stack = next;
  282. }
  283. std::size_t get_count() { return count; }
  284. int get_id() { return state_id; }
  285. std::size_t operator++() { return ++count; }
  286. bool check_null_repeat(const BidiIterator& pos, std::size_t max)
  287. {
  288. // this is called when we are about to start a new repeat,
  289. // if the last one was NULL move our count to max,
  290. // otherwise save the current position.
  291. bool result = (count == 0) ? false : (pos == start_pos);
  292. if(result)
  293. count = max;
  294. else
  295. start_pos = pos;
  296. return result;
  297. }
  298. };
  299. struct saved_state;
  300. enum saved_state_type
  301. {
  302. saved_type_end = 0,
  303. saved_type_paren = 1,
  304. saved_type_recurse = 2,
  305. saved_type_assertion = 3,
  306. saved_state_alt = 4,
  307. saved_state_repeater_count = 5,
  308. saved_state_extra_block = 6,
  309. saved_state_greedy_single_repeat = 7,
  310. saved_state_rep_slow_dot = 8,
  311. saved_state_rep_fast_dot = 9,
  312. saved_state_rep_char = 10,
  313. saved_state_rep_short_set = 11,
  314. saved_state_rep_long_set = 12,
  315. saved_state_non_greedy_long_repeat = 13,
  316. saved_state_count = 14
  317. };
  318. #ifdef BOOST_REGEX_MSVC
  319. # pragma warning(push)
  320. #if BOOST_REGEX_MSVC >= 1800
  321. #pragma warning(disable:26495)
  322. #endif
  323. #endif
  324. template <class Results>
  325. struct recursion_info
  326. {
  327. typedef typename Results::value_type value_type;
  328. typedef typename value_type::iterator iterator;
  329. int idx;
  330. const re_syntax_base* preturn_address;
  331. Results results;
  332. repeater_count<iterator>* repeater_stack;
  333. iterator location_of_start;
  334. };
  335. #ifdef BOOST_REGEX_MSVC
  336. # pragma warning(pop)
  337. #endif
  338. template <class BidiIterator, class Allocator, class traits>
  339. class perl_matcher
  340. {
  341. public:
  342. typedef typename traits::char_type char_type;
  343. typedef perl_matcher<BidiIterator, Allocator, traits> self_type;
  344. typedef bool (self_type::*matcher_proc_type)();
  345. typedef std::size_t traits_size_type;
  346. typedef typename is_byte<char_type>::width_type width_type;
  347. typedef typename std::iterator_traits<BidiIterator>::difference_type difference_type;
  348. typedef match_results<BidiIterator, Allocator> results_type;
  349. perl_matcher(BidiIterator first, BidiIterator end,
  350. match_results<BidiIterator, Allocator>& what,
  351. const basic_regex<char_type, traits>& e,
  352. match_flag_type f,
  353. BidiIterator l_base)
  354. : m_result(what), base(first), last(end),
  355. position(first), backstop(l_base), re(e), traits_inst(e.get_traits()),
  356. m_independent(false), next_count(&rep_obj), rep_obj(&next_count)
  357. , m_recursions(0)
  358. {
  359. construct_init(e, f);
  360. }
  361. bool match();
  362. bool find();
  363. void setf(match_flag_type f)
  364. { m_match_flags |= f; }
  365. void unsetf(match_flag_type f)
  366. { m_match_flags &= ~f; }
  367. private:
  368. void construct_init(const basic_regex<char_type, traits>& e, match_flag_type f);
  369. bool find_imp();
  370. bool match_imp();
  371. void estimate_max_state_count(std::random_access_iterator_tag*);
  372. void estimate_max_state_count(void*);
  373. bool match_prefix();
  374. bool match_all_states();
  375. // match procs, stored in s_match_vtable:
  376. bool match_startmark();
  377. bool match_endmark();
  378. bool match_literal();
  379. bool match_start_line();
  380. bool match_end_line();
  381. bool match_wild();
  382. bool match_match();
  383. bool match_word_boundary();
  384. bool match_within_word();
  385. bool match_word_start();
  386. bool match_word_end();
  387. bool match_buffer_start();
  388. bool match_buffer_end();
  389. bool match_backref();
  390. bool match_long_set();
  391. bool match_set();
  392. bool match_jump();
  393. bool match_alt();
  394. bool match_rep();
  395. bool match_combining();
  396. bool match_soft_buffer_end();
  397. bool match_restart_continue();
  398. bool match_long_set_repeat();
  399. bool match_set_repeat();
  400. bool match_char_repeat();
  401. bool match_dot_repeat_fast();
  402. bool match_dot_repeat_slow();
  403. bool match_dot_repeat_dispatch()
  404. {
  405. return ::boost::is_random_access_iterator<BidiIterator>::value ? match_dot_repeat_fast() : match_dot_repeat_slow();
  406. }
  407. bool match_backstep();
  408. bool match_assert_backref();
  409. bool match_toggle_case();
  410. bool match_recursion();
  411. bool match_fail();
  412. bool match_accept();
  413. bool match_commit();
  414. bool match_then();
  415. bool skip_until_paren(int index, bool match = true);
  416. // find procs stored in s_find_vtable:
  417. bool find_restart_any();
  418. bool find_restart_word();
  419. bool find_restart_line();
  420. bool find_restart_buf();
  421. bool find_restart_lit();
  422. private:
  423. // final result structure to be filled in:
  424. match_results<BidiIterator, Allocator>& m_result;
  425. // temporary result for POSIX matches:
  426. std::unique_ptr<match_results<BidiIterator, Allocator> > m_temp_match;
  427. // pointer to actual result structure to fill in:
  428. match_results<BidiIterator, Allocator>* m_presult;
  429. // start of sequence being searched:
  430. BidiIterator base;
  431. // end of sequence being searched:
  432. BidiIterator last;
  433. // current character being examined:
  434. BidiIterator position;
  435. // where to restart next search after failed match attempt:
  436. BidiIterator restart;
  437. // where the current search started from, acts as base for $` during grep:
  438. BidiIterator search_base;
  439. // how far we can go back when matching lookbehind:
  440. BidiIterator backstop;
  441. // the expression being examined:
  442. const basic_regex<char_type, traits>& re;
  443. // the expression's traits class:
  444. const ::boost::regex_traits_wrapper<traits>& traits_inst;
  445. // the next state in the machine being matched:
  446. const re_syntax_base* pstate;
  447. // matching flags in use:
  448. match_flag_type m_match_flags;
  449. // how many states we have examined so far:
  450. std::ptrdiff_t state_count;
  451. // max number of states to examine before giving up:
  452. std::ptrdiff_t max_state_count;
  453. // whether we should ignore case or not:
  454. bool icase;
  455. // set to true when (position == last), indicates that we may have a partial match:
  456. bool m_has_partial_match;
  457. // set to true whenever we get a match:
  458. bool m_has_found_match;
  459. // set to true whenever we're inside an independent sub-expression:
  460. bool m_independent;
  461. // the current repeat being examined:
  462. repeater_count<BidiIterator>* next_count;
  463. // the first repeat being examined (top of linked list):
  464. repeater_count<BidiIterator> rep_obj;
  465. // the mask to pass when matching word boundaries:
  466. typename traits::char_class_type m_word_mask;
  467. // the bitmask to use when determining whether a match_any matches a newline or not:
  468. unsigned char match_any_mask;
  469. // recursion information:
  470. std::vector<recursion_info<results_type> > recursion_stack;
  471. //
  472. // additional members for non-recursive version:
  473. //
  474. typedef bool (self_type::*unwind_proc_type)(bool);
  475. void extend_stack();
  476. bool unwind(bool);
  477. bool unwind_end(bool);
  478. bool unwind_paren(bool);
  479. bool unwind_recursion_stopper(bool);
  480. bool unwind_assertion(bool);
  481. bool unwind_alt(bool);
  482. bool unwind_repeater_counter(bool);
  483. bool unwind_extra_block(bool);
  484. bool unwind_greedy_single_repeat(bool);
  485. bool unwind_slow_dot_repeat(bool);
  486. bool unwind_fast_dot_repeat(bool);
  487. bool unwind_char_repeat(bool);
  488. bool unwind_short_set_repeat(bool);
  489. bool unwind_long_set_repeat(bool);
  490. bool unwind_non_greedy_repeat(bool);
  491. bool unwind_recursion(bool);
  492. bool unwind_recursion_pop(bool);
  493. bool unwind_commit(bool);
  494. bool unwind_then(bool);
  495. bool unwind_case(bool);
  496. void destroy_single_repeat();
  497. void push_matched_paren(int index, const sub_match<BidiIterator>& sub);
  498. void push_recursion_stopper();
  499. void push_assertion(const re_syntax_base* ps, bool positive);
  500. void push_alt(const re_syntax_base* ps);
  501. void push_repeater_count(int i, repeater_count<BidiIterator>** s);
  502. void push_single_repeat(std::size_t c, const re_repeat* r, BidiIterator last_position, int state_id);
  503. void push_non_greedy_repeat(const re_syntax_base* ps);
  504. void push_recursion(int idx, const re_syntax_base* p, results_type* presults, results_type* presults2);
  505. void push_recursion_pop();
  506. void push_case_change(bool);
  507. // pointer to base of stack:
  508. saved_state* m_stack_base;
  509. // pointer to current stack position:
  510. saved_state* m_backup_state;
  511. // how many memory blocks have we used up?:
  512. unsigned used_block_count;
  513. // determines what value to return when unwinding from recursion,
  514. // allows for mixed recursive/non-recursive algorithm:
  515. bool m_recursive_result;
  516. // We have unwound to a lookahead/lookbehind, used by COMMIT/PRUNE/SKIP:
  517. bool m_unwound_lookahead;
  518. // We have unwound to an alternative, used by THEN:
  519. bool m_unwound_alt;
  520. // We are unwinding a commit - used by independent subs to determine whether to stop there or carry on unwinding:
  521. //bool m_unwind_commit;
  522. // Recursion limit:
  523. unsigned m_recursions;
  524. #ifdef BOOST_REGEX_MSVC
  525. # pragma warning(push)
  526. #if BOOST_REGEX_MSVC >= 1800
  527. #pragma warning(disable:26495)
  528. #endif
  529. #endif
  530. // these operations aren't allowed, so are declared private,
  531. // bodies are provided to keep explicit-instantiation requests happy:
  532. perl_matcher& operator=(const perl_matcher&)
  533. {
  534. return *this;
  535. }
  536. perl_matcher(const perl_matcher& that)
  537. : m_result(that.m_result), re(that.re), traits_inst(that.traits_inst), rep_obj(0) {}
  538. #ifdef BOOST_REGEX_MSVC
  539. # pragma warning(pop)
  540. #endif
  541. };
  542. template <class Matcher>
  543. inline bool factory_match(Matcher& m)
  544. {
  545. return m.match();
  546. }
  547. template <class Matcher>
  548. inline bool factory_find(Matcher& m)
  549. {
  550. return m.find();
  551. }
  552. #ifdef BOOST_REGEX_AS_MODULE
  553. bool factory_match(perl_matcher<const char*, match_results<const char*>::allocator_type, regex::traits_type>& m);
  554. bool factory_match(perl_matcher<const wchar_t*, match_results<const wchar_t*>::allocator_type, wregex::traits_type>& m);
  555. bool factory_match(perl_matcher<std::string::const_iterator, match_results<std::string::const_iterator>::allocator_type, regex::traits_type>& m);
  556. bool factory_match(perl_matcher<std::wstring::const_iterator, match_results<std::wstring::const_iterator>::allocator_type, wregex::traits_type>& m);
  557. bool factory_match(perl_matcher<std::string::iterator, match_results<std::string::iterator>::allocator_type, regex::traits_type>& m);
  558. bool factory_match(perl_matcher<std::wstring::iterator, match_results<std::wstring::iterator>::allocator_type, wregex::traits_type>& m);
  559. bool factory_find(perl_matcher<const char*, match_results<const char*>::allocator_type, regex::traits_type>& m);
  560. bool factory_find(perl_matcher<const wchar_t*, match_results<const wchar_t*>::allocator_type, wregex::traits_type>& m);
  561. bool factory_find(perl_matcher<std::string::const_iterator, match_results<std::string::const_iterator>::allocator_type, regex::traits_type>& m);
  562. bool factory_find(perl_matcher<std::wstring::const_iterator, match_results<std::wstring::const_iterator>::allocator_type, wregex::traits_type>& m);
  563. bool factory_find(perl_matcher<std::string::iterator, match_results<std::string::iterator>::allocator_type, regex::traits_type>& m);
  564. bool factory_find(perl_matcher<std::wstring::iterator, match_results<std::wstring::iterator>::allocator_type, wregex::traits_type>& m);
  565. #endif
  566. } // namespace BOOST_REGEX_DETAIL_NS
  567. #ifdef BOOST_REGEX_MSVC
  568. # pragma warning(pop)
  569. #endif
  570. } // namespace boost
  571. //
  572. // include the implementation of perl_matcher:
  573. //
  574. #include <boost/regex/v5/perl_matcher_non_recursive.hpp>
  575. // this one has to be last:
  576. #include <boost/regex/v5/perl_matcher_common.hpp>
  577. #endif