diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2024-03-06 10:24:11 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2024-03-06 10:24:11 +0100 |
commit | 4538829ab86b5a1cd4e845e7eab165029c9d6d46 (patch) | |
tree | bbadf39aed0610c8f8f7b41fefff47773b8ac205 /libcutl/cutl/re/re.txx | |
parent | 23d41842168ac1a1580111b9c5c73500ceee3d57 (diff) | |
parent | aad5ad9bf0c02aa4e79bc6b7d6c934612fff4026 (diff) |
Update upstream source from tag 'upstream/4.2.0'
Update to upstream version '4.2.0'
with Debian dir 1b38df7bbcf313223de3c50107ac0255090fe647
Diffstat (limited to 'libcutl/cutl/re/re.txx')
-rw-r--r-- | libcutl/cutl/re/re.txx | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/libcutl/cutl/re/re.txx b/libcutl/cutl/re/re.txx deleted file mode 100644 index 174e0d4..0000000 --- a/libcutl/cutl/re/re.txx +++ /dev/null @@ -1,69 +0,0 @@ -// file : cutl/re/re.txx -// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC -// license : MIT; see accompanying LICENSE file - -namespace cutl -{ - namespace re - { - // - // basic_regexsub - // - template <typename C> - void basic_regexsub<C>:: - init (string_type const& s) - { - string_type r; - typename string_type::size_type p (parse (s, 0, r)); - regex_ = r; - p = parse (s, p, sub_); - if (p + 1 < s.size ()) - throw basic_format<C> (s, "junk after third delimiter"); - } - - // - // parse() - // - template <typename C> - typename std::basic_string<C>::size_type - parse (std::basic_string<C> const& s, - typename std::basic_string<C>::size_type p, - std::basic_string<C>& r) - { - r.clear (); - typename std::basic_string<C>::size_type n (s.size ()); - - if (p >= n) - throw basic_format<C> (s, "empty expression"); - - char d (s[p++]); - - for (; p < n; ++p) - { - if (s[p] == d) - break; - - if (s[p] == '\\') - { - if (++p < n) - { - // Pass the escape sequence through unless it is the delimiter. - // - if (s[p] != d) - r += '\\'; - - r += s[p]; - } - // else {We ran out of stuff before finding the delimiter.} - } - else - r += s[p]; - } - - if (p == n) - throw basic_format<C> (s, "missing closing delimiter"); - - return p; - } - } -} |