aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/regex/hyperscan
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:15 +0300
commit72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch)
treeda2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /library/cpp/regex/hyperscan
parent778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff)
downloadydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/regex/hyperscan')
-rw-r--r--library/cpp/regex/hyperscan/hyperscan.cpp4
-rw-r--r--library/cpp/regex/hyperscan/hyperscan.h4
-rw-r--r--library/cpp/regex/hyperscan/ut/hyperscan_ut.cpp18
3 files changed, 13 insertions, 13 deletions
diff --git a/library/cpp/regex/hyperscan/hyperscan.cpp b/library/cpp/regex/hyperscan/hyperscan.cpp
index ba321f9c29..ba025c72b1 100644
--- a/library/cpp/regex/hyperscan/hyperscan.cpp
+++ b/library/cpp/regex/hyperscan/hyperscan.cpp
@@ -255,7 +255,7 @@ namespace NHyperscan {
hs_error_t status = Singleton<NPrivate::TImpl>()->SerializeDatabase(
db.Get(),
&databaseBytes,
- &databaseLength);
+ &databaseLength);
TSerializedDatabase serialization(databaseBytes);
if (status != HS_SUCCESS) {
ythrow yexception() << "Failed to serialize hyperscan database";
@@ -268,7 +268,7 @@ namespace NHyperscan {
hs_error_t status = Singleton<NPrivate::TImpl>()->DeserializeDatabase(
serialization.begin(),
serialization.size(),
- &rawDb);
+ &rawDb);
TDatabase db(rawDb);
if (status != HS_SUCCESS) {
if (status == HS_DB_PLATFORM_ERROR) {
diff --git a/library/cpp/regex/hyperscan/hyperscan.h b/library/cpp/regex/hyperscan/hyperscan.h
index 1c8f404389..608bc87300 100644
--- a/library/cpp/regex/hyperscan/hyperscan.h
+++ b/library/cpp/regex/hyperscan/hyperscan.h
@@ -144,7 +144,7 @@ namespace NHyperscan {
const TDatabase& db,
const TScratch& scratch,
const TStringBuf& text,
- TCallback& callback // applied to index of matched regex
+ TCallback& callback // applied to index of matched regex
) {
NPrivate::Scan<TCallback>(db, scratch, text, callback, *Singleton<NPrivate::TImpl>());
}
@@ -152,7 +152,7 @@ namespace NHyperscan {
bool Matches(
const TDatabase& db,
const TScratch& scratch,
- const TStringBuf& text);
+ const TStringBuf& text);
TString Serialize(const TDatabase& db);
diff --git a/library/cpp/regex/hyperscan/ut/hyperscan_ut.cpp b/library/cpp/regex/hyperscan/ut/hyperscan_ut.cpp
index 9caa53f2e7..9410c8d6ba 100644
--- a/library/cpp/regex/hyperscan/ut/hyperscan_ut.cpp
+++ b/library/cpp/regex/hyperscan/ut/hyperscan_ut.cpp
@@ -23,14 +23,14 @@ Y_UNIT_TEST_SUITE(HyperscanWrappers) {
db,
scratch,
"abc",
- callback);
+ callback);
UNIT_ASSERT_EQUAL(foundId, 0);
}
Y_UNIT_TEST(Matches) {
NHyperscan::TDatabase db = NHyperscan::Compile(
"a.c",
- HS_FLAG_DOTALL | HS_FLAG_SINGLEMATCH);
+ HS_FLAG_DOTALL | HS_FLAG_SINGLEMATCH);
NHyperscan::TScratch scratch = NHyperscan::MakeScratch(db);
UNIT_ASSERT(NHyperscan::Matches(db, scratch, "abc"));
UNIT_ASSERT(!NHyperscan::Matches(db, scratch, "foo"));
@@ -49,7 +49,7 @@ Y_UNIT_TEST_SUITE(HyperscanWrappers) {
{
42,
241,
- });
+ });
NHyperscan::TScratch scratch = NHyperscan::MakeScratch(db);
UNIT_ASSERT(NHyperscan::Matches(db, scratch, "foo"));
@@ -65,7 +65,7 @@ Y_UNIT_TEST_SUITE(HyperscanWrappers) {
db,
scratch,
"fooBaR",
- callback);
+ callback);
UNIT_ASSERT_EQUAL(foundIds.size(), 2);
UNIT_ASSERT(foundIds.contains(42));
UNIT_ASSERT(foundIds.contains(241));
@@ -82,13 +82,13 @@ Y_UNIT_TEST_SUITE(HyperscanWrappers) {
},
{
0,
- });
+ });
}
Y_UNIT_TEST(Serialize) {
NHyperscan::TDatabase db = NHyperscan::Compile(
"foo",
- HS_FLAG_DOTALL | HS_FLAG_SINGLEMATCH);
+ HS_FLAG_DOTALL | HS_FLAG_SINGLEMATCH);
TString serialization = Serialize(db);
db.Reset();
TDatabase db2 = Deserialize(serialization);
@@ -101,10 +101,10 @@ Y_UNIT_TEST_SUITE(HyperscanWrappers) {
Y_UNIT_TEST(GrowScratch) {
NHyperscan::TDatabase db1 = NHyperscan::Compile(
"foo",
- HS_FLAG_DOTALL | HS_FLAG_SINGLEMATCH);
+ HS_FLAG_DOTALL | HS_FLAG_SINGLEMATCH);
NHyperscan::TDatabase db2 = NHyperscan::Compile(
"longer\\w\\w\\wpattern",
- HS_FLAG_DOTALL | HS_FLAG_SINGLEMATCH | HS_FLAG_UTF8);
+ HS_FLAG_DOTALL | HS_FLAG_SINGLEMATCH | HS_FLAG_UTF8);
NHyperscan::TScratch scratch = NHyperscan::MakeScratch(db1);
NHyperscan::GrowScratch(scratch, db2);
UNIT_ASSERT(NHyperscan::Matches(db1, scratch, "foo"));
@@ -114,7 +114,7 @@ Y_UNIT_TEST_SUITE(HyperscanWrappers) {
Y_UNIT_TEST(CloneScratch) {
NHyperscan::TDatabase db = NHyperscan::Compile(
"foo",
- HS_FLAG_DOTALL | HS_FLAG_SINGLEMATCH);
+ HS_FLAG_DOTALL | HS_FLAG_SINGLEMATCH);
NHyperscan::TScratch scratch1 = NHyperscan::MakeScratch(db);
NHyperscan::TScratch scratch2 = NHyperscan::CloneScratch(scratch1);
scratch1.Reset();