aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/regex/hyperscan/hyperscan.h
diff options
context:
space:
mode:
authorartyasen <artyasen@yandex-team.com>2025-01-10 10:43:42 +0300
committerartyasen <artyasen@yandex-team.com>2025-01-10 11:54:42 +0300
commit215178650c519a89f29a47f942fe2be607a91e58 (patch)
tree58313a1490bf7d70dde00647915e468ae55e710d /library/cpp/regex/hyperscan/hyperscan.h
parent2677f7fd48473bd66e77dbf330dc9065db086e9f (diff)
downloadydb-215178650c519a89f29a47f942fe2be607a91e58.tar.gz
HyperScan literal compilation
add literal compilation commit_hash:29f6f2d5c4ec11ceb61add67bc4e697194a4efff
Diffstat (limited to 'library/cpp/regex/hyperscan/hyperscan.h')
-rw-r--r--library/cpp/regex/hyperscan/hyperscan.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/library/cpp/regex/hyperscan/hyperscan.h b/library/cpp/regex/hyperscan/hyperscan.h
index eae82fa384..7f8c877b07 100644
--- a/library/cpp/regex/hyperscan/hyperscan.h
+++ b/library/cpp/regex/hyperscan/hyperscan.h
@@ -60,6 +60,8 @@ namespace NHyperscan {
TDatabase Compile(const TStringBuf& regex, unsigned int flags, hs_platform_info_t* platform);
+ TDatabase CompileLiteral(const TStringBuf& literal, unsigned int flags, hs_platform_info_t* platform);
+
TDatabase CompileMulti(
const TVector<const char*>& regexs,
const TVector<unsigned int>& flags,
@@ -67,6 +69,13 @@ namespace NHyperscan {
hs_platform_info_t* platform,
const TVector<const hs_expr_ext_t*>* extendedParameters = nullptr);
+ TDatabase CompileMultiLiteral(
+ const TVector<const char*>& literals,
+ const TVector<unsigned int>& flags,
+ const TVector<unsigned int>& ids,
+ const TVector<size_t>& lens,
+ hs_platform_info_t* platform);
+
// We need to parametrize Scan and Matches functions for testing purposes
template<typename TCallback>
void Scan(
@@ -118,6 +127,10 @@ namespace NHyperscan {
TDatabase Compile(const TStringBuf& regex, unsigned int flags, TCPUFeatures cpuFeatures);
+ TDatabase CompileLiteral(const TStringBuf& literal, unsigned int flags);
+
+ TDatabase CompileLiteral(const TStringBuf& literal, unsigned int flags, TCPUFeatures cpuFeatures);
+
TDatabase CompileMulti(
const TVector<const char*>& regexs,
const TVector<unsigned int>& flags,
@@ -131,6 +144,19 @@ namespace NHyperscan {
TCPUFeatures cpuFeatures,
const TVector<const hs_expr_ext_t*>* extendedParameters = nullptr);
+ TDatabase CompileMultiLiteral(
+ const TVector<const char*>& literals,
+ const TVector<unsigned int>& flags,
+ const TVector<unsigned int>& ids,
+ const TVector<size_t>& lens);
+
+ TDatabase CompileMultiLiteral(
+ const TVector<const char*>& literals,
+ const TVector<unsigned int>& flags,
+ const TVector<unsigned int>& ids,
+ const TVector<size_t>& lens,
+ TCPUFeatures cpuFeatures);
+
TScratch MakeScratch(const TDatabase& db);
void GrowScratch(TScratch& scratch, const TDatabase& db);