flags.hpp
1 /*
2  * Copyright (c) 2021-2024, NVIDIA CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #pragma once
17 
18 #include <cudf/utilities/export.hpp>
19 
20 #include <cstdint>
21 
22 namespace CUDF_EXPORT cudf {
23 namespace strings {
24 
37 enum regex_flags : uint32_t {
38  DEFAULT = 0,
39  MULTILINE = 8,
40  DOTALL = 16,
41  ASCII = 256,
42  EXT_NEWLINE = 512
43 };
44 
51 constexpr bool is_multiline(regex_flags const f)
52 {
54 }
55 
62 constexpr bool is_dotall(regex_flags const f)
63 {
65 }
66 
73 constexpr bool is_ascii(regex_flags const f)
74 {
75  return (f & regex_flags::ASCII) == regex_flags::ASCII;
76 }
77 
84 constexpr bool is_ext_newline(regex_flags const f)
85 {
87 }
88 
96 enum class capture_groups : uint32_t {
97  EXTRACT,
99 };
100  // end of doxygen group
102 } // namespace strings
103 } // namespace CUDF_EXPORT cudf
capture_groups
Capture groups setting.
Definition: flags.hpp:96
regex_flags
Regex flags.
Definition: flags.hpp:37
constexpr bool is_ext_newline(regex_flags const f)
Returns true if the given flags contain EXT_NEWLINE.
Definition: flags.hpp:84
constexpr bool is_dotall(regex_flags const f)
Returns true if the given flags contain DOTALL.
Definition: flags.hpp:62
constexpr bool is_multiline(regex_flags const f)
Returns true if the given flags contain MULTILINE.
Definition: flags.hpp:51
constexpr bool is_ascii(regex_flags const f)
Returns true if the given flags contain ASCII.
Definition: flags.hpp:73
@ EXTRACT
Capture groups processed normally for extract.
@ NON_CAPTURE
Convert all capture groups to non-capture groups.
@ DOTALL
the '.' matching includes new-line characters
Definition: flags.hpp:40
@ DEFAULT
default
Definition: flags.hpp:38
@ ASCII
use only ASCII when matching built-in character classes
Definition: flags.hpp:41
@ MULTILINE
the '^' and '$' honor new-line characters
Definition: flags.hpp:39
@ EXT_NEWLINE
new-line matches extended characters
Definition: flags.hpp:42
cuDF interfaces
Definition: host_udf.hpp:39