/[pcre]/code/trunk/pcre_study.c
ViewVC logotype

Diff of /code/trunk/pcre_study.c

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

revision 468 by ph10, Mon Oct 19 11:43:18 2009 UTC revision 469 by ph10, Mon Oct 19 14:38:48 2009 UTC
# Line 314  for (;;) Line 314  for (;;)
314      logic is that a recursion can only make sense if there is another      logic is that a recursion can only make sense if there is another
315      alternation that stops the recursing. That will provide the minimum length      alternation that stops the recursing. That will provide the minimum length
316      (when no recursion happens). A backreference within the group that it is      (when no recursion happens). A backreference within the group that it is
317      referencing behaves in the same way.      referencing behaves in the same way.
318    
319      If PCRE_JAVASCRIPT_COMPAT is set, a backreference to an unset bracket      If PCRE_JAVASCRIPT_COMPAT is set, a backreference to an unset bracket
320      matches an empty string (by default it causes a matching failure), so in      matches an empty string (by default it causes a matching failure), so in
321      that case we must set the minimum length to zero. */      that case we must set the minimum length to zero. */
322    
323      case OP_REF:      case OP_REF:
324      if ((options & PCRE_JAVASCRIPT_COMPAT) == 0)      if ((options & PCRE_JAVASCRIPT_COMPAT) == 0)
325        {        {
326        ce = cs = (uschar *)_pcre_find_bracket(startcode, utf8, GET2(cc, 1));        ce = cs = (uschar *)_pcre_find_bracket(startcode, utf8, GET2(cc, 1));
327        if (cs == NULL) return -2;        if (cs == NULL) return -2;
328        do ce += GET(ce, 1); while (*ce == OP_ALT);        do ce += GET(ce, 1); while (*ce == OP_ALT);
# Line 333  for (;;) Line 333  for (;;)
333          }          }
334        else d = find_minlength(cs, startcode, options);        else d = find_minlength(cs, startcode, options);
335        }        }
336      else d = 0;      else d = 0;
337      cc += 3;      cc += 3;
338    
339      /* Handle repeated back references */      /* Handle repeated back references */

Legend:
Removed from v.468  
changed lines
  Added in v.469

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12