NCBI C++ ToolKit
String_constraint.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: String_constraint.cpp 102921 2024-08-06 16:34:25Z gotvyans $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Author: J. Chen
27  *
28  * File Description:
29  * Evaluate if a string and an object match to CString_constraint
30  *
31  * Remark:
32  * This code was originally generated by application DATATOOL
33  * using the following specifications:
34  * 'macro.asn'.
35  */
36 
37 #include <ncbi_pch.hpp>
42 #include <util/compile_time.hpp>
43 
45 BEGIN_objects_SCOPE // namespace ncbi::objects::
46 
47 
48 static constexpr auto s_WeaselWords = ct::make_array<std::string_view>(
49  "candidate",
50  "hypothetical",
51  "novel",
52  "possible",
53  "potential",
54  "predicted",
55  "probable",
56  "putative",
57  "uncharacterized",
58  "unique"
59 );
60 
61 
62 namespace
63 {
64  bool x_IsWordCharacter(char c) {
65  return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_' || c == '-';
66  }
67  // split on spaces and punctuation
68  void x_Split(const string& s, vector<string>& v)
69  {
70  size_t i;
71  int n = -1;
72  for (i = 0; i < s.length(); i++) {
73  if (s[i] == ' ') { // assuming that tabs and other empty space characters are addressed before
74  if (n != -1) {
75  v.push_back(s.substr(n, i - n));
76  n = -1;
77  }
78  }
79  else if (x_IsWordCharacter(s[i])) {
80  if (n == -1) {
81  n = i;
82  }
83  else if (!x_IsWordCharacter(s[n])) {
84  v.push_back(s.substr(n, i - n));
85  n = i;
86  }
87  }
88  else {
89  if (n == -1) {
90  n = i;
91  }
92  else if (x_IsWordCharacter(s[n])) {
93  v.push_back(s.substr(n, i - n));
94  n = i;
95  }
96  }
97  }
98  if (n != -1) {
99  v.push_back(s.substr(n, i - n));
100  }
101  }
102 
103  string x_Assemble(vector<string>& v, vector<bool>& skip)
104  {
105  bool first = true;
106  string s;
107  for (size_t i = 0; i < v.size(); i++) {
108  if (!skip[i]) {
109  if (!first && x_IsWordCharacter(v[i][0])) {
110  s += ' ';
111  }
112  s += v[i];
113  first = false;
114  }
115  }
116  return s;
117  }
118 
119 
120  // El sueno de la razon produce monstruos
121  CTempString x_StripUnimportantCharacters(string& storage, const CTempString& str, bool strip_space, bool strip_punct)
122  {
123  if (str.empty()) {
124  return kEmptyStr;
125  }
126  if (!strip_space && !strip_punct)
127  return str;
128 
129  bool has_stripped = false;
131  const char* s = str.data();
132  for (; i < str.size(); i++, s++)
133  {
134  if ((strip_space && isspace(*s)) || (strip_punct && ispunct(*s)))
135  {
136  if (!has_stripped) // first occurence
137  {
138  storage.reserve(str.size()-1); // at least one symbol will be removed
139  storage.clear();
140  storage.append(str.data(), i);
141  has_stripped = true;
142  }
143  }
144  else
145  {
146  if (has_stripped)
147  storage.push_back(*s);
148  }
149  }
150 
151  if (has_stripped)
152  return storage;
153  else
154  return str;
155  }
156 
157  inline
158  bool x_DisallowCharacter(const char ch, bool disallow_slash)
159  {
160  if (isalpha(Uint1(ch)) || isdigit(Uint1(ch)) || ch == '_' || ch == '-') return true;
161  else if (disallow_slash && ch == '/') return true;
162  else return false;
163  }
164 
165 }
166 
167 
169 {
170  m_noweasel_start = 0;
171  const auto& callback = [&](size_t n, size_t p) {
172  if (n < s_WeaselWords.size()) {
173  if (p - m_noweasel_start == s_WeaselWords[n].length()) {
174  m_noweasel_start = p;
175  m_weaselmask |= (1 << n);
176  }
177  }
178  else { // space
179  if (p == m_noweasel_start) {
180  m_noweasel_start = p + 1;
181  }
182  }
183  };
184 
185 // Including state machine
186 #include "weasel.inc"
187 
188  static const TLocalFSM s_FSM{s_compact, s_hits_init_1, s_hits_init_2, s_states, nullptr};
189 
190  CMultipatternSearch::Search(this->m_original, s_FSM, callback);
191 }
192 
193 
195 {
196 }
197 
198 
200 {
201 }
202 
203 
205 {
206  if (GetIs_all_caps() ||
207  GetIs_all_lower() ||
208  GetIs_all_punct() ||
209  GetIs_first_cap() ||
211  return false;
212  } else if (!CanGetMatch_text() || GetMatch_text().empty()) {
213  return true;
214  }
215 
216  return false;
217 }
218 
220 {
222 }
223 
225 {
227 }
228 
230 {
232  for (unsigned i=0; i< match.size(); i++) {
233  if (!ispunct(match[i])) return false;
234  }
235  return true;
236 }
237 
238 bool CString_constraint::x_IsSkippable(const char ch) const
239 {
240  if (ispunct(ch) && GetIgnore_punct()) {
241  return true;
242  } else if (isspace(ch) && GetIgnore_space()) {
243  return true;
244  } else {
245  return false;
246  }
247 }
248 
250 {
251  for (CTempString::size_type i = 0; i < match.size(); i++) {
252  if (!x_IsSkippable(match[i])) {
253  return false;
254  }
255  }
256  return true;
257 }
258 
260 {
262  // ignore punctuation and spaces at the beginning of the phrase
263  CTempString::const_iterator it = str.begin();
264  while (it != str.end() && !isalpha((unsigned char) (*it))) {
265  if (isdigit( (unsigned char) (*it))) {
266  return false;
267  }
268  ++it;
269  }
270 
271  if (it != str.end()) {
272  return isalpha((unsigned char) (*it)) && isupper((unsigned char) (*it));
273  }
274  return false;
275 }
276 
278 {
280  bool first(true);
281  bool rval(true);
282  for (size_t i = 0; i < str.size() && rval; ++i) {
283  if (isalpha( (unsigned char) str[i])) {
284  if (first) {
285  rval = rval && isupper( (unsigned char) str[i] );
286  first = false;
287  }
288  } else if ( str[i] == '-' ){
289  // hyphenated words are considered as one composed word
290  if ((i > 0 && !isalpha( (unsigned char) str[i - 1])) ||
291  (i + 1 < str.size() && !isalpha( (unsigned char) str[i + 1] )))
292  first = true;
293  } else if (isdigit( (unsigned char) str[i])){
294  if (i + 1 < str.size() && isalpha( (unsigned char) str[i + 1])) {
295  rval = false;
296  }
297  } else {
298  first = true;
299  }
300  }
301  return rval;
302 }
303 
304 bool CString_constraint::x_IsWholeWordMatch(const CTempString& start, size_t found, size_t match_len, bool disallow_slash) const
305 {
306  size_t after_idx;
307  if (!match_len) {
308  return true;
309  }
310  else if (start.empty() || found == string::npos) {
311  return false;
312  }
313  else {
314  if (found) {
315  if (x_DisallowCharacter (start[found-1], disallow_slash)) {
316  return false;
317  }
318  }
319  after_idx = found + match_len;
320  if (after_idx < start.size() && x_DisallowCharacter(start[after_idx], disallow_slash)) {
321  return false;
322  }
323  }
324  return true;
325 }
326 
327 
328 bool CString_constraint :: x_PartialCompare(const string& str, const string& pattern, char prev_char, size_t & match_len) const
329 {
330  // check for synonyms to skip
331  if (IsSetIgnore_words()) {
333  vector<size_t> match_lens = (*word)->GetMatchLens(str, pattern, prev_char);
334  if (match_lens.size() > 0) {
335  size_t word_len = (*word)->GetWord().length();
336  ITERATE(vector<size_t>, len, match_lens) {
337  size_t this_match = 0;
338  char this_prev_char = 0;
339  if (*len > 0) {
340  this_prev_char = str.c_str()[(*len) - 1];
341  } else {
342  this_prev_char = prev_char;
343  }
344  bool require_end = false;
346  require_end = true;
347  }
348  if (x_PartialCompare(str.substr(*len), pattern.substr(word_len), this_prev_char, this_match) &&
349  (!require_end || this_match == str.substr(*len).length())) {
350  match_len += *len;
351  match_len += this_match;
352  return true;
353  }
354  }
355  }
356  }
357  }
358 
359  if (pattern.length() == 0) {
360  return true;
361  }
362 
363  if (str.length() == 0) {
364  if (x_IsAllSkippable(pattern)) {
365  return true;
366  }
367  // special case: can continue if the next character is a space, might have words to ignore
368  if (isspace(pattern[0])) {
369  return x_PartialCompare(str, pattern.substr(1), ' ', match_len);
370  } else {
371  return false;
372  }
373  }
374  if (GetIgnore_space()) {
375  if (isspace(Uint1(str[0]))) {
376  match_len++;
377  return x_PartialCompare(str.substr(1), pattern, str[0], match_len);
378  } else if (isspace(Uint1(pattern[0]))) {
379  return x_PartialCompare(str, pattern.substr(1), prev_char, match_len);
380  }
381  }
382  if (GetIgnore_punct()) {
383  if (ispunct(Uint1(str[0]))) {
384  match_len++;
385  return x_PartialCompare(str.substr(1), pattern, str[0], match_len);
386  } else if (ispunct(Uint1(pattern[0]))) {
387  return x_PartialCompare(str, pattern.substr(1), prev_char, match_len);
388  }
389  }
390  if (str[0] == pattern[0]) {
391  match_len++;
392  return x_PartialCompare(str.substr(1), pattern.substr(1), str[0], match_len);
393  } else if ((!IsSetCase_sensitive() || !GetCase_sensitive()) &&
394  tolower(Uint1(str[0])) == tolower(Uint1(pattern[0]))) {
395  match_len++;
396  return x_PartialCompare(str.substr(1), pattern.substr(1), str[0], match_len);
397  }
398 
399  return false;
400 }
401 
402 
403 bool CString_constraint :: x_AdvancedStringCompare(const string& str, const string& str_match, const char prev_char, size_t * ini_target_match_len) const
404 {
405  bool rval = false;
406  size_t match_len = 0;
407  if (x_PartialCompare(str, str_match, prev_char, match_len)) {
408  if (ini_target_match_len != NULL) {
409  *ini_target_match_len = match_len;
410  }
411  rval = true;
412  }
413 
414  return rval;
415 }
416 
417 bool CString_constraint::x_AdvancedStringMatch(const string& str, const string& tmp_match) const
418 {
419  bool rval = false;
420  string match_text = CanGetMatch_text() ? tmp_match : kEmptyStr;
421 
422  size_t match_len = 0;
423 
424  if (x_AdvancedStringCompare (str, match_text, 0, &match_len) && (GetMatch_location() != eString_location_equals || match_len == str.length())) {
425  return true;
426  }
428  return false;
429  }
430  else {
431  size_t pos = 1;
432  size_t len = str.size();
433  while (!rval && pos < len) {
434  if (GetWhole_word()) {
435  while (pos < len && isalpha (Uint1(str[pos-1]))) pos++;
436  }
437  if (pos < len) {
438  size_t sub_match_len = 0;
439  if (x_AdvancedStringCompare (str.substr(pos), match_text, 0, &sub_match_len)) {
440  if (sub_match_len < len - pos && GetMatch_location() == eString_location_ends) {
441  pos++;
442  }
443  else {
444  rval = true;
445  }
446  }
447  else {
448  pos++;
449  }
450  }
451  }
452  }
453  return rval;
454 }
455 
456 
458 {
459  if (CanGetMatch_text() && m_match.original().original().empty()) {
461  }
462  if (m_match.original().original().empty()) {
463  return "";
464  }
465  if (e_case == e_automatic) {
467  }
468  switch (e_case) {
469  case e_automatic:
470  case e_original:
471  return m_match.original().original();
472  case e_lowercase:
473  return m_match.original().lowercase();
474  case e_uppercase:
475  return m_match.original().uppercase();
476  }
477  return {};
478 }
479 
480 
482 {
483  if (m_match.original().original().empty()) {
485  }
486 
487  if (e_case == e_automatic) {
489  }
490  if (GetIgnore_weasel() && !(m_match.GetWeaselMask() & s.GetWeaselMask())) {
491  switch (e_case) {
492  case e_automatic:
493  case e_original:
494  return s.GetNoweasel();
495  case e_lowercase:
496  return s.GetNoweaselLC();
497  case e_uppercase:
498  return s.GetNoweaselUC();
499  }
500  }
501  else {
502  switch (e_case) {
503  case e_automatic:
504  case e_original:
505  return s.original().original();
506  case e_lowercase:
507  return s.original().lowercase();
508  case e_uppercase:
509  return s.original().uppercase();
510  }
511  }
512  return {};
513 }
514 
515 
517 {
519  if (loc == eString_location_equals) {
520  return search == pattern;
521  }
522  SIZE_TYPE found = search.find(pattern);
523  if (found == NPOS) {
524  return false;
525  }
526  else if (loc == eString_location_starts) {
527  return found == 0 && (!GetWhole_word() || x_IsWholeWordMatch(search, found, pattern.size()));
528  }
529  else if (loc == eString_location_contains) {
530  CTempString next_guess = search.substr(found + 1);
531  return (!GetWhole_word() || x_IsWholeWordMatch(search, found, pattern.size())) ? true : x_MatchFound(next_guess, pattern);
532  }
533  else if (loc == eString_location_ends) {
534  CTempString next_guess = search.substr(found + 1);
535  return found + pattern.size() == search.size() && (!GetWhole_word() || x_IsWholeWordMatch(search, found, pattern.size())) ? true : x_MatchFound(next_guess, pattern);
536  }
537  return false;
538 }
539 
540 
542 {
543  if (str.original().original().empty()) {
544  return false;
545  }
546 
547  // bool rval(false);
548  if (Empty()) {
549  return true;
550  }
551 
552  if (GetIs_all_caps() && !x_IsAllCaps(str)) {
553  return false;
554  }
555  else if (GetIs_all_lower() && !x_IsAllLowerCase(str)) {
556  return false;
557  }
558  else if (GetIs_all_punct() && !x_IsAllPunctuation(str)) {
559  return false;
560  }
561  else if (GetIs_first_cap() && !x_IsFirstCap(str)) {
562  return false;
563  }
564  else if (GetIs_first_each_cap() && !x_IsFirstEachCap(str)) {
565  return false;
566  }
567  else {
569  cout << "eString_location_inlist is not supported!\n";
570  return false;
571  }
572 
575 
576  unsigned mask = GetIgnore_weasel() ? m_match.GetWeaselMask() : 0;
577  unsigned str_mask = GetIgnore_weasel() ? str.GetWeaselMask() : 0;
578 
579  if ((mask & str_mask) != mask) {
580  return false; // shortcut
581  }
582 
584  if (mask) {
585  cout << pattern << " <===> " << search << "\nSelf-weasel case with ignored words is not supported!\n";
586  return false;
587  }
588  return x_AdvancedStringMatch(search, pattern);
589  }
590  else {
591  string s_search, p_search;
593  search = x_StripUnimportantCharacters(s_search, search, GetIgnore_space(), GetIgnore_punct());
594  pattern = x_StripUnimportantCharacters(p_search, pattern, GetIgnore_space(), GetIgnore_punct());
595  }
596 
597  if (!mask) { // no self-weasel
598  return x_MatchFound(search, pattern);
599  }
600 
601  // clinical case
602  vector<string> v;
603  x_Split(search, v);
604  vector<bool> skip(v.size(), false);
605  vector<size_t> test;
606  for (size_t i = 0; i < v.size(); i++) {
607  for (size_t k = 0; k < s_WeaselWords.size(); k++) {
608  unsigned m = (1 << k);
609  if (m & str_mask) {
610  string lower = v[i];
611  NStr::ToLower(lower);
612  if (s_WeaselWords[k].compare(lower) == 0) {
613  if (m & mask) {
614  test.push_back(i);
615  }
616  skip[i] = true;
617  }
618  }
619  }
620  }
621  // combinatorics
622  while (true) {
623  string guess = x_Assemble(v, skip);
624  CTempString next_guess = guess; // Using CTempString everywhere was a bad idea...
625  if (x_MatchFound(next_guess, pattern)) {
626  return true;
627  }
628  for (size_t i = 0; i < test.size(); i++) {
629  if (skip[test[i]]) {
630  skip[test[i]] = false;
631  break;
632  }
633  else {
634  skip[test[i]] = true;
635  if (i == test.size() - 1) {
636  return false;
637  }
638  }
639  }
640  }
641  }
642  }
643  return false;
644 }
645 
647 {
649  return GetNot_present() ? (!rval) : rval;
650 }
651 
652 bool CString_constraint::x_ReplaceContains(string& val, const string& replace) const
653 {
654  bool rval = false;
655 
656  size_t offset = 0;
657  while (offset < val.length()) {
658  size_t match_len = 0;
660  offset == 0 ? 0 : val.c_str()[offset - 1],
661  &match_len)) {
662  val = val.substr(0, offset) + replace + val.substr(offset + match_len);
663  rval = true;
664  offset += replace.length();
665  } else {
666  offset++;
667  }
668  }
669  return rval;
670 }
671 
672 
673 bool CString_constraint::ReplaceStringConstraintPortionInString(string& result, const CMatchString& str, const string& replace) const
674 {
675  bool rval = false;
676 
677  const string& val = str;
678 
679  if (val.empty()) {
680  if (Empty() || (IsSetNot_present() && GetNot_present())) {
681  result = replace;
682  rval = true;
683  }
684  } else if (Empty()) {
685  result = replace;
686  rval = true;
687  } else {
688  if (IsSetMatch_location()) {
689  switch (GetMatch_location()) {
692  result = replace;
693  rval = true;
694  break;
696  {{
697  size_t match_len = 0;
698  if (x_AdvancedStringCompare(val, GetMatch_text(), 0, &match_len)) {
699  result = replace;
700  result.append(val.data()+match_len, val.length()-match_len);
701  rval = true;
702  }
703  }}
704  break;
706  result = val;
707  rval = x_ReplaceContains(result, replace);
708  break;
710  {{
711  size_t offset = 0;
712  while (!rval && offset < val.length()) {
713  size_t match_len = 0;
714  if (x_AdvancedStringCompare(val.substr(offset),
715  GetMatch_text(),
716  (offset == 0 ? 0 : val.c_str()[offset - 1]),
717  &match_len)
718  && offset + match_len == val.length()) {
719  result = val.substr(0, offset) + replace;
720  rval = true;
721  } else {
722  offset++;
723  }
724  }
725  }}
726  break;
727  }
728  } else {
729  result = val;
730  rval = x_ReplaceContains(result, replace);
731  }
732  }
733  return rval;
734 }
735 
736 END_objects_SCOPE // namespace ncbi::objects::
static constexpr auto s_WeaselWords
User-defined methods of the data storage class.
ncbi::TMaskedQueryRegions mask
const string & uppercase() const
const string & original() const
const string & lowercase() const
CTempString GetNoweaselLC() const
CTempString GetNoweasel() const
CTempString GetNoweaselUC() const
CTempString::size_type m_noweasel_start
CAutoLowerCase m_original
void x_PopWeasel() const
unsigned GetWeaselMask() const
const CAutoLowerCase & original() const
void Search(const char *input, VoidCall1 found_callback) const
CTempString x_GetCompareString(const CMatchString &s, ECase e_case=e_automatic) const
bool x_IsAllSkippable(const CTempString &str) const
bool x_IsWholeWordMatch(const CTempString &start, size_t found, size_t match_len, bool disallow_slash=false) const
CTempString x_GetConstraintString(ECase e_case=e_automatic) const
bool x_MatchFound(CTempString &search, CTempString &pattern) const
bool x_IsFirstCap(const CMatchString &str) const
bool ReplaceStringConstraintPortionInString(string &result, const CMatchString &str, const string &replace) const
bool x_IsAllLowerCase(const CMatchString &str) const
bool x_IsAllPunctuation(const CMatchString &str) const
bool x_ReplaceContains(string &val, const string &replace) const
bool Match(const CMatchString &str) const
bool x_DoesSingleStringMatchConstraint(const CMatchString &str) const
bool x_IsAllCaps(const CMatchString &str) const
bool x_IsFirstEachCap(const CMatchString &str) const
bool x_AdvancedStringCompare(const string &str, const string &str_match, const char prev_char, size_t *ini_target_match_len=0) const
bool x_IsSkippable(const char ch) const
bool x_AdvancedStringMatch(const string &str, const string &tmp_match) const
bool x_PartialCompare(const string &str, const string &pattern, char prev_char, size_t &match_len) const
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
Definition: tempstr.hpp:65
#define test(a, b, c, d, e)
Definition: numeric.c:170
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
Definition: dlist.tmpl.h:46
static const char * str(char *buf, int n)
Definition: stats.c:84
int offset
Definition: replacements.h:160
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:815
#define NULL
Definition: ncbistd.hpp:225
uint8_t Uint1
1-byte (8-bit) unsigned integer
Definition: ncbitype.h:99
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
NCBI_NS_STD::string::size_type SIZE_TYPE
Definition: ncbistr.hpp:132
#define kEmptyStr
Definition: ncbistr.hpp:123
#define NPOS
Definition: ncbistr.hpp:133
const char * const_iterator
Definition: tempstr.hpp:71
bool empty(void) const
Return true if the represented string is empty (i.e., the length is zero)
Definition: tempstr.hpp:334
size_t size_type
Definition: tempstr.hpp:70
CTempString substr(size_type pos) const
Obtain a substring from this string, beginning at a given offset.
Definition: tempstr.hpp:776
size_type find(const CTempString match, size_type pos=0) const
Find the first instance of the entire matching string within the current string, beginning at an opti...
Definition: tempstr.hpp:655
size_type size(void) const
Return the length of the represented array.
Definition: tempstr.hpp:327
static string & ToLower(string &str)
Convert string to lower case – string& version.
Definition: ncbistr.cpp:405
TCase_sensitive GetCase_sensitive(void) const
Get the Case_sensitive member data.
const TIgnore_words & GetIgnore_words(void) const
Get the Ignore_words member data.
bool IsSetMatch_location(void) const
Check if a value has been assigned to Match_location data member.
TIs_first_each_cap GetIs_first_each_cap(void) const
Get the Is_first_each_cap member data.
TIgnore_space GetIgnore_space(void) const
Get the Ignore_space member data.
TMatch_location GetMatch_location(void) const
Get the Match_location member data.
bool IsSetCase_sensitive(void) const
Check if a value has been assigned to Case_sensitive data member.
TIs_all_caps GetIs_all_caps(void) const
Get the Is_all_caps member data.
TIs_first_cap GetIs_first_cap(void) const
Get the Is_first_cap member data.
bool IsSetNot_present(void) const
Check if a value has been assigned to Not_present data member.
TWhole_word GetWhole_word(void) const
Get the Whole_word member data.
TIgnore_weasel GetIgnore_weasel(void) const
Get the Ignore_weasel member data.
TIgnore_punct GetIgnore_punct(void) const
Get the Ignore_punct member data.
EString_location
simple constraints
const TMatch_text & GetMatch_text(void) const
Get the Match_text member data.
TNot_present GetNot_present(void) const
Get the Not_present member data.
list< CRef< CWord_substitution > > Tdata
TIs_all_punct GetIs_all_punct(void) const
Get the Is_all_punct member data.
TIs_all_lower GetIs_all_lower(void) const
Get the Is_all_lower member data.
bool CanGetMatch_text(void) const
Check if it is safe to call GetMatch_text method.
bool CanGetIgnore_words(void) const
Check if it is safe to call GetIgnore_words method.
bool IsSetIgnore_words(void) const
Check if a value has been assigned to Ignore_words data member.
@ eString_location_inlist
@ eString_location_equals
@ eString_location_contains
@ eString_location_starts
@ eString_location_ends
int i
yy_size_t n
int len
const TYPE & Get(const CNamedParameterList *param)
constexpr bool empty(list< Ts... >) noexcept
int isalpha(Uchar c)
Definition: ncbictype.hpp:61
int isspace(Uchar c)
Definition: ncbictype.hpp:69
int tolower(Uchar c)
Definition: ncbictype.hpp:72
int isdigit(Uchar c)
Definition: ncbictype.hpp:64
int ispunct(Uchar c)
Definition: ncbictype.hpp:68
int isupper(Uchar c)
Definition: ncbictype.hpp:70
static int match(PCRE2_SPTR start_eptr, PCRE2_SPTR start_ecode, uint16_t top_bracket, PCRE2_SIZE frame_size, pcre2_match_data *match_data, match_block *mb)
Definition: pcre2_match.c:594
else result
Definition: token2.c:20
Modified on Wed Sep 04 15:05:33 2024 by modify_doxy.py rev. 669887