@@ -106,10 +106,14 @@ sherlock!(the_whitespace, r"the\s+\w+", 5410);
106
106
#[ cfg( not( feature = "re-pcre1" ) ) ]
107
107
#[ cfg( not( feature = "re-pcre2" ) ) ]
108
108
#[ cfg( not( feature = "re-stdcpp" ) ) ]
109
+ #[ cfg( not( feature = "re-boost" ) ) ]
109
110
#[ cfg( not( feature = "re-tcl" ) ) ]
110
111
sherlock ! ( everything_greedy, r".*" , 13053 ) ;
111
112
// std::regex . does not match \r
112
- #[ cfg( feature = "re-stdcpp" ) ]
113
+ #[ cfg( any(
114
+ feature = "re-stdcpp" ,
115
+ feature = "re-boost" ,
116
+ ) ) ]
113
117
sherlock ! ( everything_greedy, r"[^\n]*" , 13053 ) ;
114
118
#[ cfg( not( feature = "re-dphobos" ) ) ]
115
119
#[ cfg( not( feature = "re-onig" ) ) ]
@@ -122,24 +126,34 @@ sherlock!(everything_greedy_nl, r"(?s).*", 1);
122
126
123
127
// How fast can we match every letter? This also defeats any clever prefix
124
128
// tricks.
129
+ // std C++ does not support unicode character classes
125
130
#[ cfg( not( feature = "re-stdcpp" ) ) ]
131
+ #[ cfg( not( feature = "re-boost" ) ) ]
126
132
#[ cfg( not( feature = "re-tcl" ) ) ]
127
133
sherlock ! ( letters, r"\p{L}" , 447160 ) ;
128
134
135
+ // std C++ does not support unicode character classes
129
136
#[ cfg( not( feature = "re-stdcpp" ) ) ]
137
+ #[ cfg( not( feature = "re-boost" ) ) ]
130
138
#[ cfg( not( feature = "re-tcl" ) ) ]
131
139
sherlock ! ( letters_upper, r"\p{Lu}" , 14180 ) ;
132
140
141
+ // std C++ does not support unicode character classes
133
142
#[ cfg( not( feature = "re-stdcpp" ) ) ]
143
+ #[ cfg( not( feature = "re-boost" ) ) ]
134
144
#[ cfg( not( feature = "re-tcl" ) ) ]
135
145
sherlock ! ( letters_lower, r"\p{Ll}" , 432980 ) ;
136
146
137
147
// Similarly, for words.
138
- #[ cfg( not( feature = "re-re2" ) ) ]
139
148
#[ cfg( not( feature = "re-stdcpp" ) ) ]
149
+ #[ cfg( not( feature = "re-boost" ) ) ]
150
+ #[ cfg( not( feature = "re-re2" ) ) ]
140
151
sherlock ! ( words, r"\w+" , 109214 ) ;
141
- #[ cfg( feature = "re-re2" ) ]
142
- #[ cfg( feature = "re-stdcpp" ) ]
152
+ #[ cfg( any(
153
+ feature = "re-stdcpp" ,
154
+ feature = "re-boost" ,
155
+ feature = "re-re2" ,
156
+ ) ) ]
143
157
sherlock ! ( words, r"\w+" , 109222 ) ; // hmm, why does RE2 diverge here?
144
158
145
159
// Find complete words before Holmes. The `\w` defeats any prefix
@@ -162,6 +176,7 @@ sherlock!(holmes_cochar_watson, r"Holmes.{0,25}Watson|Watson.{0,25}Holmes", 7);
162
176
#[ cfg( not( feature = "re-pcre1" ) ) ]
163
177
#[ cfg( not( feature = "re-pcre2" ) ) ]
164
178
#[ cfg( not( feature = "re-stdcpp" ) ) ]
179
+ #[ cfg( not( feature = "re-boost" ) ) ]
165
180
#[ cfg( not( feature = "re-tcl" ) ) ]
166
181
sherlock ! (
167
182
holmes_coword_watson,
@@ -178,13 +193,17 @@ sherlock!(quotes, r#"["'][^"']{0,30}[?!.]["']"#, 767);
178
193
// lazy DFA the entire way.
179
194
// std C++ does not support multiline until C++17 nor the inline modifier syntax
180
195
#[ cfg( not( feature = "re-stdcpp" ) ) ]
196
+ #[ cfg( not( feature = "re-boost" ) ) ]
181
197
#[ cfg( not( feature = "re-dphobos" ) ) ]
182
198
sherlock ! (
183
199
line_boundary_sherlock_holmes,
184
200
r"(?m)^Sherlock Holmes|Sherlock Holmes$" ,
185
201
34 ) ;
186
202
// D matches both \r\n and \n as EOL
187
- #[ cfg( feature = "re-dphobos" ) ]
203
+ #[ cfg( any(
204
+ feature = "re-boost" ,
205
+ feature = "re-dphobos" ,
206
+ ) ) ]
188
207
sherlock ! (
189
208
line_boundary_sherlock_holmes,
190
209
r"(?m)^Sherlock Holmes|Sherlock Holmes$" ,
0 commit comments