aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/re2
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:17 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:17 +0300
commitd3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch)
treedd4bd3ca0f36b817e96812825ffaf10d645803f2 /contrib/libs/re2
parent72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff)
downloadydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/re2')
-rw-r--r--contrib/libs/re2/re2/parse.cc22
-rw-r--r--contrib/libs/re2/re2/perl_groups.cc42
-rw-r--r--contrib/libs/re2/re2/re2.cc2
-rw-r--r--contrib/libs/re2/re2/unicode_casefold.h4
-rw-r--r--contrib/libs/re2/re2/unicode_groups.h16
-rw-r--r--contrib/libs/re2/util/utf.h2
-rw-r--r--contrib/libs/re2/ya.make2
7 files changed, 45 insertions, 45 deletions
diff --git a/contrib/libs/re2/re2/parse.cc b/contrib/libs/re2/re2/parse.cc
index 718bc9c679..85f16f060b 100644
--- a/contrib/libs/re2/re2/parse.cc
+++ b/contrib/libs/re2/re2/parse.cc
@@ -1329,7 +1329,7 @@ static bool ParseInteger(StringPiece* s, int* np) {
if (s->empty() || !isdigit((*s)[0] & 0xFF))
return false;
// Disallow leading zeros.
- if (s->size() >= 2 && (*s)[0] == '0' && isdigit((*s)[1] & 0xFF))
+ if (s->size() >= 2 && (*s)[0] == '0' && isdigit((*s)[1] & 0xFF))
return false;
int n = 0;
int c;
@@ -1471,7 +1471,7 @@ static bool ParseEscape(StringPiece* s, Rune* rp,
int code;
switch (c) {
default:
- if (c < Runeself && !isalpha(c) && !isdigit(c)) {
+ if (c < Runeself && !isalpha(c) && !isdigit(c)) {
// Escaped non-word characters are always themselves.
// PCRE is not quite so rigorous: it accepts things like
// \q, but we don't. We once rejected \_, but too many
@@ -1633,11 +1633,11 @@ static const UGroup* LookupGroup(const StringPiece& name,
}
// Look for a POSIX group with the given name (e.g., "[:^alpha:]")
-static const UGroup* LookupPosixGroup(const StringPiece& name) {
+static const UGroup* LookupPosixGroup(const StringPiece& name) {
return LookupGroup(name, posix_groups, num_posix_groups);
}
-static const UGroup* LookupPerlGroup(const StringPiece& name) {
+static const UGroup* LookupPerlGroup(const StringPiece& name) {
return LookupGroup(name, perl_groups, num_perl_groups);
}
@@ -1648,7 +1648,7 @@ static URange32 any32[] = { { 65536, Runemax } };
static UGroup anygroup = { "Any", +1, any16, 1, any32, 1 };
// Look for a Unicode group with the given name (e.g., "Han")
-static const UGroup* LookupUnicodeGroup(const StringPiece& name) {
+static const UGroup* LookupUnicodeGroup(const StringPiece& name) {
// Special case: "Any" means any.
if (name == StringPiece("Any"))
return &anygroup;
@@ -1708,7 +1708,7 @@ static void AddUGroup(CharClassBuilder *cc, const UGroup *g, int sign,
// On success, sets *s to span the remainder of the string
// and returns the corresponding UGroup.
// The StringPiece must *NOT* be edited unless the call succeeds.
-const UGroup* MaybeParsePerlCCEscape(StringPiece* s, Regexp::ParseFlags parse_flags) {
+const UGroup* MaybeParsePerlCCEscape(StringPiece* s, Regexp::ParseFlags parse_flags) {
if (!(parse_flags & Regexp::PerlClasses))
return NULL;
if (s->size() < 2 || (*s)[0] != '\\')
@@ -1716,7 +1716,7 @@ const UGroup* MaybeParsePerlCCEscape(StringPiece* s, Regexp::ParseFlags parse_fl
// Could use StringPieceToRune, but there aren't
// any non-ASCII Perl group names.
StringPiece name(s->data(), 2);
- const UGroup *g = LookupPerlGroup(name);
+ const UGroup *g = LookupPerlGroup(name);
if (g == NULL)
return NULL;
s->remove_prefix(name.size());
@@ -1783,7 +1783,7 @@ ParseStatus ParseUnicodeGroup(StringPiece* s, Regexp::ParseFlags parse_flags,
#if !defined(RE2_USE_ICU)
// Look up the group in the RE2 Unicode data.
- const UGroup *g = LookupUnicodeGroup(name);
+ const UGroup *g = LookupUnicodeGroup(name);
if (g == NULL) {
status->set_code(kRegexpBadCharRange);
status->set_error_arg(seq);
@@ -1843,7 +1843,7 @@ static ParseStatus ParseCCName(StringPiece* s, Regexp::ParseFlags parse_flags,
q += 2;
StringPiece name(p, static_cast<size_t>(q - p));
- const UGroup *g = LookupPosixGroup(name);
+ const UGroup *g = LookupPosixGroup(name);
if (g == NULL) {
status->set_code(kRegexpBadCharRange);
status->set_error_arg(name);
@@ -1981,7 +1981,7 @@ bool Regexp::ParseState::ParseCharClass(StringPiece* s,
}
// Look for Perl character class symbols (extension).
- const UGroup *g = MaybeParsePerlCCEscape(s, flags_);
+ const UGroup *g = MaybeParsePerlCCEscape(s, flags_);
if (g != NULL) {
AddUGroup(re->ccb_, g, g->sign, flags_);
continue;
@@ -2456,7 +2456,7 @@ Regexp* Regexp::Parse(const StringPiece& s, ParseFlags global_flags,
}
}
- const UGroup *g = MaybeParsePerlCCEscape(&t, ps.flags());
+ const UGroup *g = MaybeParsePerlCCEscape(&t, ps.flags());
if (g != NULL) {
Regexp* re = new Regexp(kRegexpCharClass, ps.flags() & ~FoldCase);
re->ccb_ = new CharClassBuilder;
diff --git a/contrib/libs/re2/re2/perl_groups.cc b/contrib/libs/re2/re2/perl_groups.cc
index 605c0e4aa7..4687444581 100644
--- a/contrib/libs/re2/re2/perl_groups.cc
+++ b/contrib/libs/re2/re2/perl_groups.cc
@@ -5,21 +5,21 @@
namespace re2 {
-static const URange16 code1[] = { /* \d */
+static const URange16 code1[] = { /* \d */
{ 0x30, 0x39 },
};
-static const URange16 code2[] = { /* \s */
+static const URange16 code2[] = { /* \s */
{ 0x9, 0xa },
{ 0xc, 0xd },
{ 0x20, 0x20 },
};
-static const URange16 code3[] = { /* \w */
+static const URange16 code3[] = { /* \w */
{ 0x30, 0x39 },
{ 0x41, 0x5a },
{ 0x5f, 0x5f },
{ 0x61, 0x7a },
};
-const UGroup perl_groups[] = {
+const UGroup perl_groups[] = {
{ "\\d", +1, code1, 1, 0, 0 },
{ "\\D", -1, code1, 1, 0, 0 },
{ "\\s", +1, code2, 3, 0, 0 },
@@ -27,64 +27,64 @@ const UGroup perl_groups[] = {
{ "\\w", +1, code3, 4, 0, 0 },
{ "\\W", -1, code3, 4, 0, 0 },
};
-const int num_perl_groups = 6;
-static const URange16 code4[] = { /* [:alnum:] */
+const int num_perl_groups = 6;
+static const URange16 code4[] = { /* [:alnum:] */
{ 0x30, 0x39 },
{ 0x41, 0x5a },
{ 0x61, 0x7a },
};
-static const URange16 code5[] = { /* [:alpha:] */
+static const URange16 code5[] = { /* [:alpha:] */
{ 0x41, 0x5a },
{ 0x61, 0x7a },
};
-static const URange16 code6[] = { /* [:ascii:] */
+static const URange16 code6[] = { /* [:ascii:] */
{ 0x0, 0x7f },
};
-static const URange16 code7[] = { /* [:blank:] */
+static const URange16 code7[] = { /* [:blank:] */
{ 0x9, 0x9 },
{ 0x20, 0x20 },
};
-static const URange16 code8[] = { /* [:cntrl:] */
+static const URange16 code8[] = { /* [:cntrl:] */
{ 0x0, 0x1f },
{ 0x7f, 0x7f },
};
-static const URange16 code9[] = { /* [:digit:] */
+static const URange16 code9[] = { /* [:digit:] */
{ 0x30, 0x39 },
};
-static const URange16 code10[] = { /* [:graph:] */
+static const URange16 code10[] = { /* [:graph:] */
{ 0x21, 0x7e },
};
-static const URange16 code11[] = { /* [:lower:] */
+static const URange16 code11[] = { /* [:lower:] */
{ 0x61, 0x7a },
};
-static const URange16 code12[] = { /* [:print:] */
+static const URange16 code12[] = { /* [:print:] */
{ 0x20, 0x7e },
};
-static const URange16 code13[] = { /* [:punct:] */
+static const URange16 code13[] = { /* [:punct:] */
{ 0x21, 0x2f },
{ 0x3a, 0x40 },
{ 0x5b, 0x60 },
{ 0x7b, 0x7e },
};
-static const URange16 code14[] = { /* [:space:] */
+static const URange16 code14[] = { /* [:space:] */
{ 0x9, 0xd },
{ 0x20, 0x20 },
};
-static const URange16 code15[] = { /* [:upper:] */
+static const URange16 code15[] = { /* [:upper:] */
{ 0x41, 0x5a },
};
-static const URange16 code16[] = { /* [:word:] */
+static const URange16 code16[] = { /* [:word:] */
{ 0x30, 0x39 },
{ 0x41, 0x5a },
{ 0x5f, 0x5f },
{ 0x61, 0x7a },
};
-static const URange16 code17[] = { /* [:xdigit:] */
+static const URange16 code17[] = { /* [:xdigit:] */
{ 0x30, 0x39 },
{ 0x41, 0x46 },
{ 0x61, 0x66 },
};
-const UGroup posix_groups[] = {
+const UGroup posix_groups[] = {
{ "[:alnum:]", +1, code4, 3, 0, 0 },
{ "[:^alnum:]", -1, code4, 3, 0, 0 },
{ "[:alpha:]", +1, code5, 2, 0, 0 },
@@ -114,6 +114,6 @@ const UGroup posix_groups[] = {
{ "[:xdigit:]", +1, code17, 3, 0, 0 },
{ "[:^xdigit:]", -1, code17, 3, 0, 0 },
};
-const int num_posix_groups = 28;
+const int num_posix_groups = 28;
} // namespace re2
diff --git a/contrib/libs/re2/re2/re2.cc b/contrib/libs/re2/re2/re2.cc
index 1a226d12b9..47fb385e4e 100644
--- a/contrib/libs/re2/re2/re2.cc
+++ b/contrib/libs/re2/re2/re2.cc
@@ -956,7 +956,7 @@ bool RE2::CheckRewriteString(const StringPiece& rewrite,
if (c == '\\') {
continue;
}
- if (!isdigit(c)) {
+ if (!isdigit(c)) {
*error = "Rewrite schema error: "
"'\\' must be followed by a digit or '\\'.";
return false;
diff --git a/contrib/libs/re2/re2/unicode_casefold.h b/contrib/libs/re2/re2/unicode_casefold.h
index d71f50f0b8..8bdbb42fbc 100644
--- a/contrib/libs/re2/re2/unicode_casefold.h
+++ b/contrib/libs/re2/re2/unicode_casefold.h
@@ -59,8 +59,8 @@ struct CaseFold {
int32_t delta;
};
-extern const CaseFold unicode_casefold[];
-extern const int num_unicode_casefold;
+extern const CaseFold unicode_casefold[];
+extern const int num_unicode_casefold;
extern const CaseFold unicode_tolower[];
extern const int num_unicode_tolower;
diff --git a/contrib/libs/re2/re2/unicode_groups.h b/contrib/libs/re2/re2/unicode_groups.h
index 512203c43a..75f55daa61 100644
--- a/contrib/libs/re2/re2/unicode_groups.h
+++ b/contrib/libs/re2/re2/unicode_groups.h
@@ -41,26 +41,26 @@ struct UGroup
{
const char *name;
int sign; // +1 for [abc], -1 for [^abc]
- const URange16 *r16;
+ const URange16 *r16;
int nr16;
- const URange32 *r32;
+ const URange32 *r32;
int nr32;
};
// Named by property or script name (e.g., "Nd", "N", "Han").
// Negated groups are not included.
-extern const UGroup unicode_groups[];
-extern const int num_unicode_groups;
+extern const UGroup unicode_groups[];
+extern const int num_unicode_groups;
// Named by POSIX name (e.g., "[:alpha:]", "[:^lower:]").
// Negated groups are included.
-extern const UGroup posix_groups[];
-extern const int num_posix_groups;
+extern const UGroup posix_groups[];
+extern const int num_posix_groups;
// Named by Perl name (e.g., "\\d", "\\D").
// Negated groups are included.
-extern const UGroup perl_groups[];
-extern const int num_perl_groups;
+extern const UGroup perl_groups[];
+extern const int num_perl_groups;
} // namespace re2
diff --git a/contrib/libs/re2/util/utf.h b/contrib/libs/re2/util/utf.h
index 74a52727c3..85b4297239 100644
--- a/contrib/libs/re2/util/utf.h
+++ b/contrib/libs/re2/util/utf.h
@@ -18,7 +18,7 @@
#ifndef UTIL_UTF_H_
#define UTIL_UTF_H_
-#include <stdint.h>
+#include <stdint.h>
namespace re2 {
diff --git a/contrib/libs/re2/ya.make b/contrib/libs/re2/ya.make
index 1af8c4ed6a..8072de2eb2 100644
--- a/contrib/libs/re2/ya.make
+++ b/contrib/libs/re2/ya.make
@@ -21,7 +21,7 @@ ADDINCL(
)
NO_COMPILER_WARNINGS()
-
+
IF (WITH_VALGRIND)
CFLAGS(
GLOBAL -DRE2_ON_VALGRIND