Diff for /parser3/src/main/pa_string.C between versions 1.172.2.21.2.39 and 1.172.2.21.2.42

version 1.172.2.21.2.39, 2003/04/10 11:35:10 version 1.172.2.21.2.42, 2003/05/26 09:56:19
Line 52  void String::ArrayFragment::append_posit Line 52  void String::ArrayFragment::append_posit
                 //fprintf(err, "1end=%u\n", fragment_end);fflush(err);                  //fprintf(err, "1end=%u\n", fragment_end);fflush(err);
   
                 // not reached fragments which may include 'substr'?                  // not reached fragments which may include 'substr'?
                 if(!(substr_begin>=fragment_begin && substr_begin<=fragment_end))                  if(!(substr_begin>=fragment_begin && substr_begin<fragment_end))
                         continue;                          continue;
   
                 // found first fragment including piece of 'substr'                  // found first fragment including piece of 'substr'
Line 233  void String::split(ArrayString& result, Line 233  void String::split(ArrayString& result,
         if(size_t delim_length=strlen(delim)) {          if(size_t delim_length=strlen(delim)) {
                 int pos_before;                  int pos_before;
                 // while we have 'delim'...                  // while we have 'delim'...
                 for(; (pos_before=pos(delim, pos_after, lang))>=0 && limit; limit--) {                  for(; (pos_before=pos(delim, pos_after, lang))!=STRING_NOT_FOUND && limit; limit--) {
                         result+=&mid(pos_after, pos_before);                          result+=&mid(pos_after, pos_before);
                         pos_after=pos_before+delim_length;                          pos_after=pos_before+delim_length;
                 }                  }
Line 255  void String::split(ArrayString& result, Line 255  void String::split(ArrayString& result,
         if(!delim.is_empty()) {          if(!delim.is_empty()) {
                 int pos_before;                  int pos_before;
                 // while we have 'delim'...                  // while we have 'delim'...
                 for(; (pos_before=pos(delim, pos_after, lang))>=0 && limit; limit--) {                  for(; (pos_before=pos(delim, pos_after, lang))!=STRING_NOT_FOUND && limit; limit--) {
                         result+=&mid(pos_after, pos_before);                          result+=&mid(pos_after, pos_before);
                         pos_after=pos_before+delim.length();                          pos_after=pos_before+delim.length();
                 }                  }
Line 291  static void regex_options(const String* Line 291  static void regex_options(const String*
   
     if(options && !options->is_empty())       if(options && !options->is_empty()) 
                 for(Regex_option *o=regex_option; o->keyL; o++)                   for(Regex_option *o=regex_option; o->keyL; o++) 
                         if(options->pos(o->keyL)>=0                          if(options->pos(o->keyL)!=STRING_NOT_FOUND
                                 || (o->keyU && options->pos(o->keyU)>=0)) {                                  || (o->keyU && options->pos(o->keyU)!=STRING_NOT_FOUND)) {
                                 if(o->flag)                                  if(o->flag)
                                         *o->flag=true;                                          *o->flag=true;
                                 else { // result                                  else { // result
Line 342  Table* String::match(Charset& source_cha Line 342  Table* String::match(Charset& source_cha
         int ovector[oveclength];          int ovector[oveclength];
   
         // create table          // create table
         Table& table=*new Table(string_match_table_template);          Table::Action_options table_options;
           Table& table=*new Table(string_match_table_template, table_options);
   
         int exec_option_bits=0;          int exec_option_bits=0;
         int prestart=0;          int prestart=0;

Removed from v.1.172.2.21.2.39  
changed lines
  Added in v.1.172.2.21.2.42


E-mail: