flags.hpp
1 /*
2  * Copyright (c) 2021-2022, 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 <cstdint>
19 
20 namespace cudf {
21 namespace strings {
22 
35 enum regex_flags : uint32_t {
36  DEFAULT = 0,
37  MULTILINE = 8,
38  DOTALL = 16,
39  ASCII = 256
40 };
41 
48 constexpr bool is_multiline(regex_flags const f)
49 {
51 }
52 
59 constexpr bool is_dotall(regex_flags const f)
60 {
62 }
63 
70 constexpr bool is_ascii(regex_flags const f)
71 {
72  return (f & regex_flags::ASCII) == regex_flags::ASCII;
73 }
74 
82 enum class capture_groups : uint32_t {
83  EXTRACT,
85 };
86  // end of doxygen group
88 } // namespace strings
89 } // namespace cudf
capture_groups
Capture groups setting.
Definition: flags.hpp:82
regex_flags
Regex flags.
Definition: flags.hpp:35
constexpr bool is_dotall(regex_flags const f)
Returns true if the given flags contain DOTALL.
Definition: flags.hpp:59
constexpr bool is_multiline(regex_flags const f)
Returns true if the given flags contain MULTILINE.
Definition: flags.hpp:48
constexpr bool is_ascii(regex_flags const f)
Returns true if the given flags contain ASCII.
Definition: flags.hpp:70
@ 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:38
@ DEFAULT
default
Definition: flags.hpp:36
@ ASCII
use only ASCII when matching built-in character classes
Definition: flags.hpp:39
@ MULTILINE
the '^' and '$' honor new-line characters
Definition: flags.hpp:37
cuDF interfaces
Definition: aggregation.hpp:34