aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/re2
diff options
context:
space:
mode:
authormaxim-yurchuk <maxim-yurchuk@yandex-team.com>2024-10-09 12:29:46 +0300
committermaxim-yurchuk <maxim-yurchuk@yandex-team.com>2024-10-09 13:14:22 +0300
commit9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80 (patch)
treea8fb3181d5947c0d78cf402aa56e686130179049 /contrib/libs/re2
parenta44b779cd359f06c3ebbef4ec98c6b38609d9d85 (diff)
downloadydb-9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80.tar.gz
publishFullContrib: true for ydb
<HIDDEN_URL> commit_hash:c82a80ac4594723cebf2c7387dec9c60217f603e
Diffstat (limited to 'contrib/libs/re2')
-rw-r--r--contrib/libs/re2/.yandex_meta/__init__.py99
-rw-r--r--contrib/libs/re2/.yandex_meta/devtools.copyrights.report285
-rw-r--r--contrib/libs/re2/.yandex_meta/devtools.licenses.report175
-rw-r--r--contrib/libs/re2/.yandex_meta/licenses.list.txt159
-rw-r--r--contrib/libs/re2/.yandex_meta/override.nix29
-rw-r--r--contrib/libs/re2/patches/atomic.patch11
-rw-r--r--contrib/libs/re2/patches/tstring-into-piece.patch11
-rw-r--r--contrib/libs/re2/patches/tstring-parse.patch26
-rw-r--r--contrib/libs/re2/patches/tstring-re.patch80
-rw-r--r--contrib/libs/re2/re2/testing/.yandex_meta/licenses.list.txt69
10 files changed, 944 insertions, 0 deletions
diff --git a/contrib/libs/re2/.yandex_meta/__init__.py b/contrib/libs/re2/.yandex_meta/__init__.py
new file mode 100644
index 0000000000..cd11be23f4
--- /dev/null
+++ b/contrib/libs/re2/.yandex_meta/__init__.py
@@ -0,0 +1,99 @@
+from devtools.yamaker import fileutil
+from devtools.yamaker.modules import GLOBAL, Linkable, Switch
+from devtools.yamaker.project import CMakeNinjaNixProject
+
+
+def post_install(self):
+ with self.yamakes["."] as libre2:
+ # TString support will be added by patches
+ libre2.NO_UTIL = False
+
+ libre2.before("SRCS", Switch(WITH_VALGRIND=Linkable(CFLAGS=[GLOBAL("-DRE2_ON_VALGRIND")])))
+
+ libre2.PEERDIR.add("library/cpp/sanitizer/include")
+
+ with self.yamakes["re2/testing"] as test:
+ test.module = "GTEST"
+ test.GTEST = ""
+ # fmt: off
+ test.PEERDIR = [
+ peerdir
+ for peerdir in test.PEERDIR
+ if "contrib/restricted/googletest" not in peerdir
+ ]
+ # fmt: on
+ fileutil.re_sub_dir(
+ f"{self.dstdir}/re2/testing",
+ "util/test.h",
+ "library/cpp/testing/gtest/gtest.h",
+ )
+ test.EXPLICIT_DATA = True
+
+
+re2 = CMakeNinjaNixProject(
+ owners=["g:cpp-contrib"],
+ nixattr="re2",
+ arcdir="contrib/libs/re2",
+ ignore_targets=[
+ "exhaustive_test",
+ "exhaustive1_test",
+ "exhaustive2_test",
+ "exhaustive3_test",
+ "random_test",
+ "regexp_benchmark",
+ ],
+ # merge all tests together and put ya.make into re2/testing
+ # We will change test framework to GTEST during post_install
+ put={
+ "re2": ".",
+ "testing": "re2/testing",
+ },
+ put_with={
+ "testing": [
+ "charclass_test",
+ "compile_test",
+ "dfa_test",
+ "filtered_re2_test",
+ "mimics_pcre_test",
+ "parse_test",
+ "possible_match_test",
+ "re2_arg_test",
+ "re2_test",
+ "regexp_test",
+ "required_prefix_test",
+ "search_test",
+ "set_test",
+ "simplify_test",
+ "string_generator_test",
+ ],
+ },
+ use_provides=[
+ "contrib/restricted/abseil-cpp/.yandex_meta",
+ ],
+ post_install=post_install,
+ # Default re2 cmake build provides TARGET_INCLUDE_DIRECTORIES
+ # which yamaker handles by default, exposing entire contrib/libs/re2 via ADDINCL GLOBAL.
+ #
+ # We do not want this to happen, hence we disable this option handling and inclink target headers into include/ directory instead,
+ # which we then expose by the means of ADDINCL GLOBAL.
+ addincl_global={
+ ".": ["./include"],
+ },
+ inclink={
+ "include/re2": [
+ "re2/re2.h",
+ "re2/stringpiece.h",
+ ],
+ "include/util": [
+ "util/logging.h",
+ "util/utf.h",
+ ],
+ },
+ disable_includes=[
+ # ifdef USEPCRE
+ "pcre.h",
+ # ifdef RE2_USE_ICU
+ "unicode/",
+ ],
+ write_public_incs=False,
+)
diff --git a/contrib/libs/re2/.yandex_meta/devtools.copyrights.report b/contrib/libs/re2/.yandex_meta/devtools.copyrights.report
new file mode 100644
index 0000000000..1ad551a1f2
--- /dev/null
+++ b/contrib/libs/re2/.yandex_meta/devtools.copyrights.report
@@ -0,0 +1,285 @@
+# File format ($ symbol means the beginning of a line):
+#
+# $ # this message
+# $ # =======================
+# $ # comments (all commentaries should starts with some number of spaces and # symbol)
+# ${action} {license id} {license text hash}
+# $BELONGS ./ya/make/file/relative/path/1/ya.make ./ya/make/2/ya.make
+# ${all_file_action} filename
+# $ # user commentaries (many lines)
+# $ generated description - files with this license, license text... (some number of lines that starts with some number of spaces, do not modify)
+# ${action} {license spdx} {license text hash}
+# $BELONGS ./ya/make/file/relative/path/3/ya.make
+# ${all_file_action} filename
+# $ # user commentaries
+# $ generated description
+# $ ...
+#
+# You can modify action, all_file_action and add commentaries
+# Available actions:
+# keep - keep license in contrib and use in credits
+# skip - skip license
+# remove - remove all files with this license
+# rename - save license text/links into licenses texts file, but not store SPDX into LINCENSE macro. You should store correct license id into devtools.license.spdx.txt file
+#
+# {all file action} records will be generated when license text contains filename that exists on filesystem (in contrib directory)
+# We suppose that that files can contain some license info
+# Available all file actions:
+# FILE_IGNORE - ignore file (do nothing)
+# FILE_INCLUDE - include all file data into licenses text file
+# =======================
+
+KEEP COPYRIGHT_SERVICE_LABEL 1562f9fc10f07a8091b58eb7feeaf463
+BELONGS re2/testing/ya.make
+ License text:
+ // Copyright 2002-2009 The RE2 Authors. All Rights Reserved.
+ Scancode info:
+ Original SPDX id: COPYRIGHT_SERVICE_LABEL
+ Score : 100.00
+ Match type : COPYRIGHT
+ Files with this license:
+ re2/testing/re2_test.cc [2:2]
+
+KEEP COPYRIGHT_SERVICE_LABEL 15b1af953b23d6d5a49bf79fb79b2017
+BELONGS re2/testing/ya.make ya.make
+ License text:
+ // Copyright 2007 The RE2 Authors. All Rights Reserved.
+ Scancode info:
+ Original SPDX id: COPYRIGHT_SERVICE_LABEL
+ Score : 100.00
+ Match type : COPYRIGHT
+ Files with this license:
+ re2/compile.cc [1:1]
+ re2/prog.cc [1:1]
+ re2/prog.h [1:1]
+ re2/testing/compile_test.cc [1:1]
+
+KEEP COPYRIGHT_SERVICE_LABEL 351febcb30e76a5b6779c64e59e794f9
+BELONGS ya.make
+ License text:
+ // Copyright 2018 The RE2 Authors. All Rights Reserved.
+ Scancode info:
+ Original SPDX id: COPYRIGHT_SERVICE_LABEL
+ Score : 100.00
+ Match type : COPYRIGHT
+ Files with this license:
+ re2/pod_array.h [1:1]
+
+KEEP COPYRIGHT_SERVICE_LABEL 50f9c058308948c8237df668fefa9f91
+BELONGS re2/testing/ya.make
+ License text:
+ // Copyright 2006-2008 The RE2 Authors. All Rights Reserved.
+ Scancode info:
+ Original SPDX id: COPYRIGHT_SERVICE_LABEL
+ Score : 100.00
+ Match type : COPYRIGHT
+ Files with this license:
+ re2/testing/dfa_test.cc [1:1]
+ re2/testing/possible_match_test.cc [1:1]
+
+KEEP COPYRIGHT_SERVICE_LABEL 51de4dadf8ddb3e24ef7e5c9c5db75f3
+BELONGS ya.make
+ License text:
+ // Copyright 2003-2009 The RE2 Authors. All Rights Reserved.
+ Scancode info:
+ Original SPDX id: COPYRIGHT_SERVICE_LABEL
+ Score : 100.00
+ Match type : COPYRIGHT
+ Files with this license:
+ re2/re2.cc [1:1]
+ re2/re2.h [1:1]
+
+KEEP COPYRIGHT_SERVICE_LABEL 63ff8d5fb242e0714bc7407b8c88b848
+BELONGS ya.make
+ License text:
+ // Copyright 2022 The RE2 Authors. All Rights Reserved.
+ Scancode info:
+ Original SPDX id: COPYRIGHT_SERVICE_LABEL
+ Score : 100.00
+ Match type : COPYRIGHT
+ Files with this license:
+ re2/stringpiece.h [1:1]
+
+KEEP COPYRIGHT_SERVICE_LABEL 69abe630ff56f0d38f9b6964427759bd
+BELONGS ya.make
+ License text:
+ // Copyright (c) 2009 The RE2 Authors. All rights reserved.
+ Scancode info:
+ Original SPDX id: COPYRIGHT_SERVICE_LABEL
+ Score : 100.00
+ Match type : COPYRIGHT
+ Files with this license:
+ LICENSE [1:1]
+
+KEEP COPYRIGHT_SERVICE_LABEL 80cd7203a122d873ea5f8390ee4e7268
+BELONGS re2/testing/ya.make
+ License text:
+ // Copyright 2005 The RE2 Authors. All Rights Reserved.
+ Scancode info:
+ Original SPDX id: COPYRIGHT_SERVICE_LABEL
+ Score : 100.00
+ Match type : COPYRIGHT
+ Files with this license:
+ re2/testing/re2_arg_test.cc [1:1]
+
+KEEP COPYRIGHT_SERVICE_LABEL 828ff93a2c8a710751f569104ad7c308
+BELONGS re2/testing/ya.make ya.make
+ License text:
+ // Copyright 2008 The RE2 Authors. All Rights Reserved.
+ Scancode info:
+ Original SPDX id: COPYRIGHT_SERVICE_LABEL
+ Score : 100.00
+ Match type : COPYRIGHT
+ Files with this license:
+ re2/bitstate.cc [1:1]
+ re2/dfa.cc [1:1]
+ re2/mimics_pcre.cc [1:1]
+ re2/onepass.cc [1:1]
+ re2/testing/backtrack.cc [1:1]
+ re2/testing/exhaustive_tester.cc [1:1]
+ re2/testing/mimics_pcre_test.cc [1:1]
+ re2/testing/regexp_generator.cc [1:1]
+ re2/testing/regexp_generator.h [1:1]
+ re2/testing/string_generator.cc [1:1]
+ re2/testing/string_generator.h [1:1]
+ re2/testing/string_generator_test.cc [1:1]
+ re2/testing/tester.cc [1:1]
+ re2/testing/tester.h [1:1]
+ re2/unicode_casefold.h [1:1]
+ re2/unicode_groups.h [1:1]
+
+KEEP COPYRIGHT_SERVICE_LABEL 93b4819d1521cb7da7a97bcbcfa5dead
+BELONGS re2/testing/ya.make ya.make
+ License text:
+ // Copyright 2010 The RE2 Authors. All Rights Reserved.
+ Scancode info:
+ Original SPDX id: COPYRIGHT_SERVICE_LABEL
+ Score : 100.00
+ Match type : COPYRIGHT
+ Files with this license:
+ re2/set.cc [1:1]
+ re2/set.h [1:1]
+ re2/testing/set_test.cc [1:1]
+
+KEEP COPYRIGHT_SERVICE_LABEL b458789a3d0d3925b560d74f7c9b69b5
+BELONGS ya.make
+ License text:
+ // Copyright 2016 The RE2 Authors. All Rights Reserved.
+ Scancode info:
+ Original SPDX id: COPYRIGHT_SERVICE_LABEL
+ Score : 100.00
+ Match type : COPYRIGHT
+ Files with this license:
+ re2/bitmap256.h [1:1]
+ util/strutil.h [1:1]
+
+KEEP COPYRIGHT_SERVICE_LABEL ba70303a8088968ba06e01f684a8c2bd
+BELONGS re2/testing/ya.make ya.make
+ License text:
+ // Copyright 2006-2007 The RE2 Authors. All Rights Reserved.
+ Scancode info:
+ Original SPDX id: COPYRIGHT_SERVICE_LABEL
+ Score : 100.00
+ Match type : COPYRIGHT
+ Files with this license:
+ re2/nfa.cc [1:1]
+ re2/testing/search_test.cc [1:1]
+
+KEEP COPYRIGHT_SERVICE_LABEL bc65447f501c333ced533a3743bb75e2
+BELONGS ya.make
+ License text:
+ // Copyright 2003-2010 Google Inc. All Rights Reserved.
+ Scancode info:
+ Original SPDX id: COPYRIGHT_SERVICE_LABEL
+ Score : 100.00
+ Match type : COPYRIGHT
+ Files with this license:
+ util/pcre.h [1:1]
+
+KEEP COPYRIGHT_SERVICE_LABEL d91867789f9f394d1d13f17477b9032c
+BELONGS ya.make
+ License text:
+ // Copyright 1999-2005 The RE2 Authors. All Rights Reserved.
+ Scancode info:
+ Original SPDX id: COPYRIGHT_SERVICE_LABEL
+ Score : 100.00
+ Match type : COPYRIGHT
+ Files with this license:
+ util/strutil.cc [1:1]
+
+KEEP COPYRIGHT_SERVICE_LABEL dcc5eb5a5cb8943a6751d54e49098f08
+BELONGS re2/testing/ya.make ya.make
+ License text:
+ // Copyright 2006 The RE2 Authors. All Rights Reserved.
+ Scancode info:
+ Original SPDX id: COPYRIGHT_SERVICE_LABEL
+ Score : 100.00
+ Match type : COPYRIGHT
+ Files with this license:
+ re2/parse.cc [1:1]
+ re2/regexp.cc [1:1]
+ re2/regexp.h [1:1]
+ re2/simplify.cc [1:1]
+ re2/sparse_array.h [1:1]
+ re2/sparse_set.h [1:1]
+ re2/testing/charclass_test.cc [1:1]
+ re2/testing/dump.cc [1:1]
+ re2/testing/parse_test.cc [1:1]
+ re2/testing/regexp_test.cc [1:1]
+ re2/testing/simplify_test.cc [1:1]
+ re2/tostring.cc [1:1]
+ re2/walker-inl.h [1:1]
+
+KEEP COPYRIGHT_SERVICE_LABEL dd5282342e69b23e1beac28388c7eada
+BELONGS re2/testing/ya.make ya.make
+ License text:
+ // Copyright 2009 The RE2 Authors. All Rights Reserved.
+ Scancode info:
+ Original SPDX id: COPYRIGHT_SERVICE_LABEL
+ Score : 100.00
+ Match type : COPYRIGHT
+ Files with this license:
+ re2/filtered_re2.cc [1:1]
+ re2/filtered_re2.h [1:1]
+ re2/prefilter.cc [1:1]
+ re2/prefilter.h [1:1]
+ re2/prefilter_tree.cc [1:1]
+ re2/prefilter_tree.h [1:1]
+ re2/testing/exhaustive_tester.h [1:1]
+ re2/testing/filtered_re2_test.cc [1:1]
+ re2/testing/null_walker.cc [1:1]
+ re2/testing/required_prefix_test.cc [1:1]
+ util/malloc_counter.h [1:1]
+
+KEEP COPYRIGHT_SERVICE_LABEL e83feca84ce335a1318a198f5177c4cc
+BELONGS ya.make
+ License text:
+ // Copyright 2003-2009 Google Inc. All rights reserved.
+ Scancode info:
+ Original SPDX id: COPYRIGHT_SERVICE_LABEL
+ Score : 100.00
+ Match type : COPYRIGHT
+ Files with this license:
+ util/pcre.cc [1:1]
+
+KEEP COPYRIGHT_SERVICE_LABEL ea0547b2330fd015b14b7464abf7125f
+BELONGS ya.make
+ Note: matched license text is too long. Read it in the source files.
+ Scancode info:
+ Original SPDX id: COPYRIGHT_SERVICE_LABEL
+ Score : 100.00
+ Match type : COPYRIGHT
+ Files with this license:
+ util/rune.cc [2:7]
+ util/utf.h [2:7]
+
+KEEP COPYRIGHT_SERVICE_LABEL f698743eaf5cb31994c361cb23b69af7
+BELONGS ya.make
+ License text:
+ // Copyright 2023 The RE2 Authors. All Rights Reserved.
+ Scancode info:
+ Original SPDX id: COPYRIGHT_SERVICE_LABEL
+ Score : 100.00
+ Match type : COPYRIGHT
+ Files with this license:
+ re2/bitmap256.cc [1:1]
diff --git a/contrib/libs/re2/.yandex_meta/devtools.licenses.report b/contrib/libs/re2/.yandex_meta/devtools.licenses.report
new file mode 100644
index 0000000000..de8548f7b1
--- /dev/null
+++ b/contrib/libs/re2/.yandex_meta/devtools.licenses.report
@@ -0,0 +1,175 @@
+# File format ($ symbol means the beginning of a line):
+#
+# $ # this message
+# $ # =======================
+# $ # comments (all commentaries should starts with some number of spaces and # symbol)
+# ${action} {license id} {license text hash}
+# $BELONGS ./ya/make/file/relative/path/1/ya.make ./ya/make/2/ya.make
+# ${all_file_action} filename
+# $ # user commentaries (many lines)
+# $ generated description - files with this license, license text... (some number of lines that starts with some number of spaces, do not modify)
+# ${action} {license spdx} {license text hash}
+# $BELONGS ./ya/make/file/relative/path/3/ya.make
+# ${all_file_action} filename
+# $ # user commentaries
+# $ generated description
+# $ ...
+#
+# You can modify action, all_file_action and add commentaries
+# Available actions:
+# keep - keep license in contrib and use in credits
+# skip - skip license
+# remove - remove all files with this license
+# rename - save license text/links into licenses texts file, but not store SPDX into LINCENSE macro. You should store correct license id into devtools.license.spdx.txt file
+#
+# {all file action} records will be generated when license text contains filename that exists on filesystem (in contrib directory)
+# We suppose that that files can contain some license info
+# Available all file actions:
+# FILE_IGNORE - ignore file (do nothing)
+# FILE_INCLUDE - include all file data into licenses text file
+# =======================
+
+KEEP BSD-3-Clause 42a5737a61dde3441b283fd1db553e3b
+BELONGS re2/testing/ya.make ya.make
+FILE_INCLUDE LICENSE found in files: re2/bitmap256.cc at line 3, re2/bitmap256.h at line 3, re2/bitstate.cc at line 3, re2/compile.cc at line 3, re2/dfa.cc at line 3, re2/filtered_re2.cc at line 3, re2/filtered_re2.h at line 3, re2/mimics_pcre.cc at line 3, re2/nfa.cc at line 3, re2/onepass.cc at line 3, re2/parse.cc at line 3, re2/pod_array.h at line 3, re2/prefilter.cc at line 3, re2/prefilter.h at line 3, re2/prefilter_tree.cc at line 3, re2/prefilter_tree.h at line 3, re2/prog.cc at line 3, re2/prog.h at line 3, re2/re2.cc at line 3, re2/re2.h at line 3, re2/regexp.cc at line 3, re2/regexp.h at line 3, re2/set.cc at line 3, re2/set.h at line 3, re2/simplify.cc at line 3, re2/sparse_array.h at line 3, re2/sparse_set.h at line 3, re2/stringpiece.h at line 3, re2/testing/backtrack.cc at line 3, re2/testing/charclass_test.cc at line 3, re2/testing/compile_test.cc at line 3, re2/testing/dfa_test.cc at line 3, re2/testing/dump.cc at line 3, re2/testing/exhaustive_tester.cc at line 3, re2/testing/exhaustive_tester.h at line 3, re2/testing/filtered_re2_test.cc at line 3, re2/testing/mimics_pcre_test.cc at line 3, re2/testing/null_walker.cc at line 3, re2/testing/parse_test.cc at line 3, re2/testing/possible_match_test.cc at line 3, re2/testing/re2_arg_test.cc at line 3, re2/testing/re2_test.cc at line 4, re2/testing/regexp_generator.cc at line 3, re2/testing/regexp_generator.h at line 3, re2/testing/regexp_test.cc at line 3, re2/testing/required_prefix_test.cc at line 3, re2/testing/search_test.cc at line 3, re2/testing/set_test.cc at line 3, re2/testing/simplify_test.cc at line 3, re2/testing/string_generator.cc at line 3, re2/testing/string_generator.h at line 3, re2/testing/string_generator_test.cc at line 3, re2/testing/tester.cc at line 3, re2/testing/tester.h at line 3, re2/tostring.cc at line 3, re2/unicode_casefold.h at line 3, re2/unicode_groups.h at line 3, re2/walker-inl.h at line 3, util/malloc_counter.h at line 3, util/pcre.cc at line 3, util/pcre.h at line 3, util/strutil.cc at line 3, util/strutil.h at line 3
+ License text:
+ // Use of this source code is governed by a BSD-style
+ // license that can be found in the LICENSE file.
+ Scancode info:
+ Original SPDX id: BSD-3-Clause
+ Score : 90.00
+ Match type : NOTICE
+ Links : http://www.opensource.org/licenses/BSD-3-Clause, https://spdx.org/licenses/BSD-3-Clause
+ Files with this license:
+ re2/bitmap256.cc [2:3]
+ re2/bitmap256.h [2:3]
+ re2/bitstate.cc [2:3]
+ re2/compile.cc [2:3]
+ re2/dfa.cc [2:3]
+ re2/filtered_re2.cc [2:3]
+ re2/filtered_re2.h [2:3]
+ re2/mimics_pcre.cc [2:3]
+ re2/nfa.cc [2:3]
+ re2/onepass.cc [2:3]
+ re2/parse.cc [2:3]
+ re2/pod_array.h [2:3]
+ re2/prefilter.cc [2:3]
+ re2/prefilter.h [2:3]
+ re2/prefilter_tree.cc [2:3]
+ re2/prefilter_tree.h [2:3]
+ re2/prog.cc [2:3]
+ re2/prog.h [2:3]
+ re2/re2.cc [2:3]
+ re2/re2.h [2:3]
+ re2/regexp.cc [2:3]
+ re2/regexp.h [2:3]
+ re2/set.cc [2:3]
+ re2/set.h [2:3]
+ re2/simplify.cc [2:3]
+ re2/sparse_array.h [2:3]
+ re2/sparse_set.h [2:3]
+ re2/stringpiece.h [2:3]
+ re2/testing/backtrack.cc [2:3]
+ re2/testing/charclass_test.cc [2:3]
+ re2/testing/compile_test.cc [2:3]
+ re2/testing/dfa_test.cc [2:3]
+ re2/testing/dump.cc [2:3]
+ re2/testing/exhaustive_tester.cc [2:3]
+ re2/testing/exhaustive_tester.h [2:3]
+ re2/testing/filtered_re2_test.cc [2:3]
+ re2/testing/mimics_pcre_test.cc [2:3]
+ re2/testing/null_walker.cc [2:3]
+ re2/testing/parse_test.cc [2:3]
+ re2/testing/possible_match_test.cc [2:3]
+ re2/testing/re2_arg_test.cc [2:3]
+ re2/testing/re2_test.cc [3:4]
+ re2/testing/regexp_generator.cc [2:3]
+ re2/testing/regexp_generator.h [2:3]
+ re2/testing/regexp_test.cc [2:3]
+ re2/testing/required_prefix_test.cc [2:3]
+ re2/testing/search_test.cc [2:3]
+ re2/testing/set_test.cc [2:3]
+ re2/testing/simplify_test.cc [2:3]
+ re2/testing/string_generator.cc [2:3]
+ re2/testing/string_generator.h [2:3]
+ re2/testing/string_generator_test.cc [2:3]
+ re2/testing/tester.cc [2:3]
+ re2/testing/tester.h [2:3]
+ re2/tostring.cc [2:3]
+ re2/unicode_casefold.h [2:3]
+ re2/unicode_groups.h [2:3]
+ re2/walker-inl.h [2:3]
+ util/malloc_counter.h [2:3]
+ util/pcre.cc [2:3]
+ util/pcre.h [2:3]
+ util/strutil.cc [2:3]
+ util/strutil.h [2:3]
+
+SKIP Apache-2.0 4f259c3df2e0ec98e3ba6ca286e690cc
+BELONGS ya.make
+FILE_INCLUDE LICENSE found in files: README at line 31
+ License text:
+ Unless otherwise noted, the RE2 source files are distributed
+ under the BSD-style license found in the LICENSE file.
+ Scancode info:
+ Original SPDX id: Apache-2.0
+ Score : 80.00
+ Match type : NOTICE
+ Links : http://www.apache.org/licenses/, http://www.apache.org/licenses/LICENSE-2.0, https://spdx.org/licenses/Apache-2.0
+ Files with this license:
+ README [30:31]
+
+KEEP X11-Lucent 71c654f01a03bded10ee9ebcb4aad7ac
+BELONGS ya.make
+ Note: matched license text is too long. Read it in the source files.
+ Scancode info:
+ Original SPDX id: LicenseRef-scancode-x11-lucent
+ Score : 100.00
+ Match type : TEXT
+ Links : https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/x11-lucent.LICENSE
+ Files with this license:
+ util/rune.cc [4:12]
+
+KEEP X11-Lucent b5677fabdf76935718fbac4c7effead7
+BELONGS ya.make
+FILE_IGNORE util/rune.cc found in files: util/utf.h at line 14
+ # copy of x11-lucent.LICENSE
+ Note: matched license text is too long. Read it in the source files.
+ Scancode info:
+ Original SPDX id: LicenseRef-scancode-x11-lucent
+ Score : 67.14
+ Match type : NOTICE
+ Links : https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/x11-lucent.LICENSE
+ Files with this license:
+ util/utf.h [4:14]
+ Scancode info:
+ Original SPDX id: LPL-1.02
+ Score : 67.14
+ Match type : NOTICE
+ Links : http://plan9.bell-labs.com/plan9/license.html, https://spdx.org/licenses/LPL-1.02
+ Files with this license:
+ util/utf.h [4:14]
+
+KEEP BSD-3-Clause cfdf581c1aced09db4a64f39adeb5675
+BELONGS ya.make
+FILE_INCLUDE LICENSE found in files: README at line 31
+ License text:
+ under the BSD-style license found in the LICENSE file.
+ Scancode info:
+ Original SPDX id: BSD-3-Clause
+ Score : 90.00
+ Match type : REFERENCE
+ Links : http://www.opensource.org/licenses/BSD-3-Clause, https://spdx.org/licenses/BSD-3-Clause
+ Files with this license:
+ README [31:31]
+
+KEEP BSD-3-Clause dc296f6ff032e932bf091ed8f47e321c
+BELONGS ya.make
+ Note: matched license text is too long. Read it in the source files.
+ Scancode info:
+ Original SPDX id: BSD-3-Clause
+ Score : 100.00
+ Match type : TEXT
+ Links : http://www.opensource.org/licenses/BSD-3-Clause, https://spdx.org/licenses/BSD-3-Clause
+ Files with this license:
+ LICENSE [3:27]
diff --git a/contrib/libs/re2/.yandex_meta/licenses.list.txt b/contrib/libs/re2/.yandex_meta/licenses.list.txt
new file mode 100644
index 0000000000..0385798f79
--- /dev/null
+++ b/contrib/libs/re2/.yandex_meta/licenses.list.txt
@@ -0,0 +1,159 @@
+====================BSD-3-Clause====================
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+====================BSD-3-Clause====================
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+
+====================BSD-3-Clause====================
+under the BSD-style license found in the LICENSE file.
+
+
+====================COPYRIGHT====================
+ * The authors of this software are Rob Pike and Ken Thompson.
+ * Copyright (c) 2002 by Lucent Technologies.
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose without fee is hereby granted, provided that this entire notice
+ * is included in all copies of any software which is or includes a copy
+ * or modification of this software and in all copies of the supporting
+
+
+====================COPYRIGHT====================
+// Copyright (c) 2009 The RE2 Authors. All rights reserved.
+
+
+====================COPYRIGHT====================
+// Copyright 1999-2005 The RE2 Authors. All Rights Reserved.
+
+
+====================COPYRIGHT====================
+// Copyright 2003-2009 Google Inc. All rights reserved.
+
+
+====================COPYRIGHT====================
+// Copyright 2003-2009 The RE2 Authors. All Rights Reserved.
+
+
+====================COPYRIGHT====================
+// Copyright 2003-2010 Google Inc. All Rights Reserved.
+
+
+====================COPYRIGHT====================
+// Copyright 2006 The RE2 Authors. All Rights Reserved.
+
+
+====================COPYRIGHT====================
+// Copyright 2006-2007 The RE2 Authors. All Rights Reserved.
+
+
+====================COPYRIGHT====================
+// Copyright 2007 The RE2 Authors. All Rights Reserved.
+
+
+====================COPYRIGHT====================
+// Copyright 2008 The RE2 Authors. All Rights Reserved.
+
+
+====================COPYRIGHT====================
+// Copyright 2009 The RE2 Authors. All Rights Reserved.
+
+
+====================COPYRIGHT====================
+// Copyright 2010 The RE2 Authors. All Rights Reserved.
+
+
+====================COPYRIGHT====================
+// Copyright 2016 The RE2 Authors. All Rights Reserved.
+
+
+====================COPYRIGHT====================
+// Copyright 2018 The RE2 Authors. All Rights Reserved.
+
+
+====================COPYRIGHT====================
+// Copyright 2022 The RE2 Authors. All Rights Reserved.
+
+
+====================COPYRIGHT====================
+// Copyright 2023 The RE2 Authors. All Rights Reserved.
+
+
+====================File: LICENSE====================
+// Copyright (c) 2009 The RE2 Authors. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+====================X11-Lucent====================
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose without fee is hereby granted, provided that this entire notice
+ * is included in all copies of any software which is or includes a copy
+ * or modification of this software and in all copies of the supporting
+ * documentation for such software.
+ * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTY. IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES MAKE ANY
+ * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
+ * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
+
+
+====================X11-Lucent====================
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose without fee is hereby granted, provided that this entire notice
+ * is included in all copies of any software which is or includes a copy
+ * or modification of this software and in all copies of the supporting
+ * documentation for such software.
+ * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTY. IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES MAKE ANY
+ * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
+ * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
+ *
+ * This file and rune.cc have been converted to compile as C++ code
diff --git a/contrib/libs/re2/.yandex_meta/override.nix b/contrib/libs/re2/.yandex_meta/override.nix
new file mode 100644
index 0000000000..039b5c9a4c
--- /dev/null
+++ b/contrib/libs/re2/.yandex_meta/override.nix
@@ -0,0 +1,29 @@
+pkgs: attrs: with pkgs; with attrs; rec {
+ version = "2024-07-02";
+
+ src = fetchFromGitHub {
+ owner = "google";
+ repo = "re2";
+ rev = "${version}";
+ hash = "sha256-IeANwJlJl45yf8iu/AZNDoiyIvTCZIeK1b74sdCfAIc=";
+ };
+
+ buildInputs = [
+ abseil-cpp
+ gbenchmark
+ gtest
+ ];
+
+ # revert weird macOS-specific setting from nixpkgs upstream
+ cmakeBuildDir = "build";
+
+ cmakeFlags = [
+ "-DBUILD_SHARED_LIBS=ON"
+ "-DRE2_BUILD_TESTING=ON"
+
+ # re2 (as of 2023-06-02) unconditionally targets c++14,
+ # we patch it in order to make it linkable against abseil-cpp
+ # "-DCMAKE_CXX_STANDARD=17"
+ ];
+
+}
diff --git a/contrib/libs/re2/patches/atomic.patch b/contrib/libs/re2/patches/atomic.patch
new file mode 100644
index 0000000000..dceec1ea31
--- /dev/null
+++ b/contrib/libs/re2/patches/atomic.patch
@@ -0,0 +1,11 @@
+--- a/re2/re2.cc (index)
++++ b/re2/re2.cc (working tree)
+@@ -1312,7 +1312,7 @@ union Hook {
+ #if !defined(__clang__) && defined(_MSC_VER)
+ // Citing https://github.com/protocolbuffers/protobuf/pull/4777 as precedent,
+ // this is a gross hack to make std::atomic<T*> constant-initialized on MSVC.
+- static_assert(ATOMIC_POINTER_LOCK_FREE == 2,
++ static_assert(std::atomic<T*>::is_always_lock_free,
+ "std::atomic<T*> must be always lock-free");
+ T* cb_for_constinit_;
+ #endif
diff --git a/contrib/libs/re2/patches/tstring-into-piece.patch b/contrib/libs/re2/patches/tstring-into-piece.patch
new file mode 100644
index 0000000000..b203fe72ff
--- /dev/null
+++ b/contrib/libs/re2/patches/tstring-into-piece.patch
@@ -0,0 +1,11 @@
+--- a/re2/re2.h (index)
++++ a/re2/re2.h (working tree)
+@@ -280,6 +280,8 @@ class RE2 {
+ #endif
+ RE2(absl::string_view pattern);
+ RE2(absl::string_view pattern, const Options& options);
++ // ambiguity resolution.
++ RE2(const TString& pattern) : RE2(StringPiece(pattern)) {}
+ ~RE2();
+
+ // Returns whether RE2 was created properly.
diff --git a/contrib/libs/re2/patches/tstring-parse.patch b/contrib/libs/re2/patches/tstring-parse.patch
new file mode 100644
index 0000000000..a70c5b4174
--- /dev/null
+++ b/contrib/libs/re2/patches/tstring-parse.patch
@@ -0,0 +1,26 @@
+--- a/re2/re2.cc (index)
++++ b/re2/re2.cc (working tree)
+@@ -1050,6 +1050,13 @@ bool Parse(const char* str, size_t n, std::string* dest) {
+ return true;
+ }
+
++template <>
++bool Parse(const char* str, size_t n, TString* dest) {
++ if (dest == NULL) return true;
++ dest->assign(str, n);
++ return true;
++}
++
+ template <>
+ bool Parse(const char* str, size_t n, absl::string_view* dest) {
+ if (dest == NULL) return true;
+--- a/re2/re2.h (index)
++++ b/re2/re2.h (working tree)
+@@ -794,6 +794,7 @@ template <typename T> struct Parse3ary : public std::false_type {};
+ template <> struct Parse3ary<void> : public std::true_type {};
+ template <> struct Parse3ary<std::string> : public std::true_type {};
+ template <> struct Parse3ary<absl::string_view> : public std::true_type {};
++template <> struct Parse3ary<TString> : public std::true_type {};
+ template <> struct Parse3ary<char> : public std::true_type {};
+ template <> struct Parse3ary<signed char> : public std::true_type {};
+ template <> struct Parse3ary<unsigned char> : public std::true_type {};
diff --git a/contrib/libs/re2/patches/tstring-re.patch b/contrib/libs/re2/patches/tstring-re.patch
new file mode 100644
index 0000000000..bd72376e90
--- /dev/null
+++ b/contrib/libs/re2/patches/tstring-re.patch
@@ -0,0 +1,80 @@
+--- a/re2/re2.h (index)
++++ b/re2/re2.h (working tree)
+@@ -210,6 +210,7 @@
+ #include <string>
+ #include <type_traits>
+ #include <vector>
++#include <util/generic/string.h>
+
+ #include "absl/base/call_once.h"
+ #include "absl/strings/string_view.h"
+@@ -461,6 +464,14 @@ class RE2 {
+ static bool Replace(std::string* str,
+ const RE2& re,
+ absl::string_view rewrite);
++ static bool Replace(TString* str,
++ const RE2& pattern,
++ absl::string_view rewrite) {
++ std::string tmp(*str);
++ bool res = Replace(&tmp, pattern, rewrite);
++ *str = tmp;
++ return res;
++ }
+
+ // Like Replace(), except replaces successive non-overlapping occurrences
+ // of the pattern in the string with the rewrite. E.g.
+@@ -479,6 +492,15 @@ class RE2 {
+ const RE2& re,
+ absl::string_view rewrite);
+
++ static int GlobalReplace(TString* str,
++ const RE2& pattern,
++ absl::string_view rewrite) {
++ std::string tmp(*str);
++ int res = GlobalReplace(&tmp, pattern, rewrite);
++ *str = tmp;
++ return res;
++ }
++
+ // Like Replace, except that if the pattern matches, "rewrite"
+ // is copied into "out" with substitutions. The non-matching
+ // portions of "text" are ignored.
+@@ -492,6 +516,16 @@ class RE2 {
+ absl::string_view rewrite,
+ std::string* out);
+
++ static bool Extract(const StringPiece& text,
++ const RE2& pattern,
++ absl::string_view rewrite,
++ TString *out) {
++ std::string tmp;
++ bool res = Extract(text, pattern, rewrite, &tmp);
++ *out = tmp;
++ return res;
++ }
++
+ // Escapes all potentially meaningful regexp characters in
+ // 'unquoted'. The returned string, used as a regular expression,
+ // will match exactly the original string. For example,
+@@ -581,6 +617,21 @@ class RE2 {
+ bool CheckRewriteString(absl::string_view rewrite,
+ std::string* error) const;
+
++ bool CheckRewriteString(absl::string_view rewrite, std::nullptr_t error) const {
++ return CheckRewriteString(rewrite, static_cast<std::string*>(error));
++ }
++
++ bool CheckRewriteString(absl::string_view rewrite, TString* error) const {
++ if (error) {
++ std::string tmp;
++ bool res = CheckRewriteString(rewrite, &tmp);
++ error->assign(tmp.data(), tmp.size());
++ return res;
++ } else {
++ return CheckRewriteString(rewrite, nullptr);
++ }
++ }
++
+ // Returns the maximum submatch needed for the rewrite to be done by
+ // Replace(). E.g. if rewrite == "foo \\2,\\1", returns 2.
+ static int MaxSubmatch(const StringPiece& rewrite);
diff --git a/contrib/libs/re2/re2/testing/.yandex_meta/licenses.list.txt b/contrib/libs/re2/re2/testing/.yandex_meta/licenses.list.txt
new file mode 100644
index 0000000000..0dec3af329
--- /dev/null
+++ b/contrib/libs/re2/re2/testing/.yandex_meta/licenses.list.txt
@@ -0,0 +1,69 @@
+====================BSD-3-Clause====================
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+
+====================COPYRIGHT====================
+// Copyright 2002-2009 The RE2 Authors. All Rights Reserved.
+
+
+====================COPYRIGHT====================
+// Copyright 2005 The RE2 Authors. All Rights Reserved.
+
+
+====================COPYRIGHT====================
+// Copyright 2006 The RE2 Authors. All Rights Reserved.
+
+
+====================COPYRIGHT====================
+// Copyright 2006-2007 The RE2 Authors. All Rights Reserved.
+
+
+====================COPYRIGHT====================
+// Copyright 2006-2008 The RE2 Authors. All Rights Reserved.
+
+
+====================COPYRIGHT====================
+// Copyright 2007 The RE2 Authors. All Rights Reserved.
+
+
+====================COPYRIGHT====================
+// Copyright 2008 The RE2 Authors. All Rights Reserved.
+
+
+====================COPYRIGHT====================
+// Copyright 2009 The RE2 Authors. All Rights Reserved.
+
+
+====================COPYRIGHT====================
+// Copyright 2010 The RE2 Authors. All Rights Reserved.
+
+
+====================File: LICENSE====================
+// Copyright (c) 2009 The RE2 Authors. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.