/[emacs]/emacs/src/regex.c
ViewVC logotype

Diff of /emacs/src/regex.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.184 by handa, Thu Jan 16 04:31:55 2003 UTC revision 1.185 by lektu, Tue Feb 4 14:03:13 2003 UTC
# Line 2065  re_wctype_to_bit (cc) Line 2065  re_wctype_to_bit (cc)
2065  static void  static void
2066  extend_range_table_work_area (work_area)  extend_range_table_work_area (work_area)
2067       struct range_table_work_area *work_area;       struct range_table_work_area *work_area;
2068  {                                                                        {
2069    work_area->allocated += 16 * sizeof (int);    work_area->allocated += 16 * sizeof (int);
2070    if (work_area->table)    if (work_area->table)
2071      work_area->table      work_area->table
# Line 2104  set_image_of_range_1 (work_area, start, Line 2104  set_image_of_range_1 (work_area, start,
2104    
2105       `strange' indicates a character that has more than one       `strange' indicates a character that has more than one
2106       case-equivalent.  */       case-equivalent.  */
2107        
2108    enum case_type {one_case, two_case, strange};    enum case_type {one_case, two_case, strange};
2109    
2110    /* Describe the run that is in progress,    /* Describe the run that is in progress,
# Line 2174  set_image_of_range_1 (work_area, start, Line 2174  set_image_of_range_1 (work_area, start,
2174              }              }
2175            run_type = strange;            run_type = strange;
2176          }          }
2177                  
2178        if (this_type == strange)        if (this_type == strange)
2179          {          {
2180            /* For a strange character, add each of its equivalents, one            /* For a strange character, add each of its equivalents, one
# Line 2624  regex_compile (pattern, size, syntax, bu Line 2624  regex_compile (pattern, size, syntax, bu
2624                        (simple || !analyse_first (laststart, b, NULL, 0))                        (simple || !analyse_first (laststart, b, NULL, 0))
2625                        ? on_failure_jump : on_failure_jump_loop;                        ? on_failure_jump : on_failure_jump_loop;
2626                      assert (skip_one_char (laststart) <= b);                      assert (skip_one_char (laststart) <= b);
2627                        
2628                      if (!zero_times_ok && simple)                      if (!zero_times_ok && simple)
2629                        { /* Since simple * loops can be made faster by using                        { /* Since simple * loops can be made faster by using
2630                             on_failure_keep_string_jump, we turn simple P+                             on_failure_keep_string_jump, we turn simple P+
# Line 3941  analyse_first (p, pend, fastmap, multiby Line 3941  analyse_first (p, pend, fastmap, multiby
3941               case has already been handled, so we only need to look at the               case has already been handled, so we only need to look at the
3942               fallthrough case.  */               fallthrough case.  */
3943            continue;            continue;
3944              
3945          case succeed_n:          case succeed_n:
3946            /* If N == 0, it should be an on_failure_jump_loop instead.  */            /* If N == 0, it should be an on_failure_jump_loop instead.  */
3947            DEBUG_STATEMENT (EXTRACT_NUMBER (j, p + 2); assert (j > 0));            DEBUG_STATEMENT (EXTRACT_NUMBER (j, p + 2); assert (j > 0));
# Line 4424  skip_one_char (p) Line 4424  skip_one_char (p)
4424      {      {
4425      case anychar:      case anychar:
4426        break;        break;
4427          
4428      case exactn:      case exactn:
4429        p += *p + 1;        p += *p + 1;
4430        break;        break;
# Line 4441  skip_one_char (p) Line 4441  skip_one_char (p)
4441        else        else
4442          p += 1 + CHARSET_BITMAP_SIZE (p - 1);          p += 1 + CHARSET_BITMAP_SIZE (p - 1);
4443        break;        break;
4444          
4445      case syntaxspec:      case syntaxspec:
4446      case notsyntaxspec:      case notsyntaxspec:
4447  #ifdef emacs  #ifdef emacs
# Line 4524  mutually_exclusive_p (bufp, p1, p2) Line 4524  mutually_exclusive_p (bufp, p1, p2)
4524            return 1;            return 1;
4525          }          }
4526        break;        break;
4527          
4528      case endline:      case endline:
4529      case exactn:      case exactn:
4530        {        {
# Line 4634  mutually_exclusive_p (bufp, p1, p2) Line 4634  mutually_exclusive_p (bufp, p1, p2)
4634            }            }
4635        }        }
4636        break;        break;
4637          
4638      case charset_not:      case charset_not:
4639        switch (SWITCH_ENUM_CAST (*p1))        switch (SWITCH_ENUM_CAST (*p1))
4640          {          {
# Line 5318  re_match_2_internal (bufp, string1, size Line 5318  re_match_2_internal (bufp, string1, size
5318    
5319            assert (!REG_UNSET (regstart[*p]));            assert (!REG_UNSET (regstart[*p]));
5320            /* Strictly speaking, there should be code such as:            /* Strictly speaking, there should be code such as:
5321                
5322                  assert (REG_UNSET (regend[*p]));                  assert (REG_UNSET (regend[*p]));
5323                  PUSH_FAILURE_REGSTOP ((unsigned int)*p);                  PUSH_FAILURE_REGSTOP ((unsigned int)*p);
5324    
# Line 5735  re_match_2_internal (bufp, string1, size Line 5735  re_match_2_internal (bufp, string1, size
5735                PREFETCH ();                PREFETCH ();
5736                c2 = RE_STRING_CHAR (d, dend - d);                c2 = RE_STRING_CHAR (d, dend - d);
5737                s2 = SYNTAX (c2);                s2 = SYNTAX (c2);
5738            
5739                /* Case 2: S2 is not Sword. */                /* Case 2: S2 is not Sword. */
5740                if (s2 != Sword)                if (s2 != Sword)
5741                  goto fail;                  goto fail;

Legend:
Removed from v.1.184  
changed lines
  Added in v.1.185

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26