/[pcre]/code/branches/pcre16/pcre_dfa_exec.c
ViewVC logotype

Diff of /code/branches/pcre16/pcre_dfa_exec.c

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

revision 763 by ph10, Mon Nov 21 10:48:42 2011 UTC revision 764 by zherczeg, Wed Nov 23 17:23:20 2011 UTC
# Line 1024  for (;;) Line 1024  for (;;)
1024            break;            break;
1025    
1026            case PT_GC:            case PT_GC:
1027            OK = _pcre_ucp_gentype[prop->chartype] == code[2];            OK = PRIV(ucp_gentype)[prop->chartype] == code[2];
1028            break;            break;
1029    
1030            case PT_PC:            case PT_PC:
# Line 1038  for (;;) Line 1038  for (;;)
1038            /* These are specials for combination cases. */            /* These are specials for combination cases. */
1039    
1040            case PT_ALNUM:            case PT_ALNUM:
1041            OK = _pcre_ucp_gentype[prop->chartype] == ucp_L ||            OK = PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
1042                 _pcre_ucp_gentype[prop->chartype] == ucp_N;                 PRIV(ucp_gentype)[prop->chartype] == ucp_N;
1043            break;            break;
1044    
1045            case PT_SPACE:    /* Perl space */            case PT_SPACE:    /* Perl space */
1046            OK = _pcre_ucp_gentype[prop->chartype] == ucp_Z ||            OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
1047                 c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR;                 c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR;
1048            break;            break;
1049    
1050            case PT_PXSPACE:  /* POSIX space */            case PT_PXSPACE:  /* POSIX space */
1051            OK = _pcre_ucp_gentype[prop->chartype] == ucp_Z ||            OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
1052                 c == CHAR_HT || c == CHAR_NL || c == CHAR_VT ||                 c == CHAR_HT || c == CHAR_NL || c == CHAR_VT ||
1053                 c == CHAR_FF || c == CHAR_CR;                 c == CHAR_FF || c == CHAR_CR;
1054            break;            break;
1055    
1056            case PT_WORD:            case PT_WORD:
1057            OK = _pcre_ucp_gentype[prop->chartype] == ucp_L ||            OK = PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
1058                 _pcre_ucp_gentype[prop->chartype] == ucp_N ||                 PRIV(ucp_gentype)[prop->chartype] == ucp_N ||
1059                 c == CHAR_UNDERSCORE;                 c == CHAR_UNDERSCORE;
1060            break;            break;
1061    
# Line 1218  for (;;) Line 1218  for (;;)
1218            break;            break;
1219    
1220            case PT_GC:            case PT_GC:
1221            OK = _pcre_ucp_gentype[prop->chartype] == code[3];            OK = PRIV(ucp_gentype)[prop->chartype] == code[3];
1222            break;            break;
1223    
1224            case PT_PC:            case PT_PC:
# Line 1232  for (;;) Line 1232  for (;;)
1232            /* These are specials for combination cases. */            /* These are specials for combination cases. */
1233    
1234            case PT_ALNUM:            case PT_ALNUM:
1235            OK = _pcre_ucp_gentype[prop->chartype] == ucp_L ||            OK = PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
1236                 _pcre_ucp_gentype[prop->chartype] == ucp_N;                 PRIV(ucp_gentype)[prop->chartype] == ucp_N;
1237            break;            break;
1238    
1239            case PT_SPACE:    /* Perl space */            case PT_SPACE:    /* Perl space */
1240            OK = _pcre_ucp_gentype[prop->chartype] == ucp_Z ||            OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
1241                 c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR;                 c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR;
1242            break;            break;
1243    
1244            case PT_PXSPACE:  /* POSIX space */            case PT_PXSPACE:  /* POSIX space */
1245            OK = _pcre_ucp_gentype[prop->chartype] == ucp_Z ||            OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
1246                 c == CHAR_HT || c == CHAR_NL || c == CHAR_VT ||                 c == CHAR_HT || c == CHAR_NL || c == CHAR_VT ||
1247                 c == CHAR_FF || c == CHAR_CR;                 c == CHAR_FF || c == CHAR_CR;
1248            break;            break;
1249    
1250            case PT_WORD:            case PT_WORD:
1251            OK = _pcre_ucp_gentype[prop->chartype] == ucp_L ||            OK = PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
1252                 _pcre_ucp_gentype[prop->chartype] == ucp_N ||                 PRIV(ucp_gentype)[prop->chartype] == ucp_N ||
1253                 c == CHAR_UNDERSCORE;                 c == CHAR_UNDERSCORE;
1254            break;            break;
1255    
# Line 1465  for (;;) Line 1465  for (;;)
1465            break;            break;
1466    
1467            case PT_GC:            case PT_GC:
1468            OK = _pcre_ucp_gentype[prop->chartype] == code[3];            OK = PRIV(ucp_gentype)[prop->chartype] == code[3];
1469            break;            break;
1470    
1471            case PT_PC:            case PT_PC:
# Line 1479  for (;;) Line 1479  for (;;)
1479            /* These are specials for combination cases. */            /* These are specials for combination cases. */
1480    
1481            case PT_ALNUM:            case PT_ALNUM:
1482            OK = _pcre_ucp_gentype[prop->chartype] == ucp_L ||            OK = PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
1483                 _pcre_ucp_gentype[prop->chartype] == ucp_N;                 PRIV(ucp_gentype)[prop->chartype] == ucp_N;
1484            break;            break;
1485    
1486            case PT_SPACE:    /* Perl space */            case PT_SPACE:    /* Perl space */
1487            OK = _pcre_ucp_gentype[prop->chartype] == ucp_Z ||            OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
1488                 c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR;                 c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR;
1489            break;            break;
1490    
1491            case PT_PXSPACE:  /* POSIX space */            case PT_PXSPACE:  /* POSIX space */
1492            OK = _pcre_ucp_gentype[prop->chartype] == ucp_Z ||            OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
1493                 c == CHAR_HT || c == CHAR_NL || c == CHAR_VT ||                 c == CHAR_HT || c == CHAR_NL || c == CHAR_VT ||
1494                 c == CHAR_FF || c == CHAR_CR;                 c == CHAR_FF || c == CHAR_CR;
1495            break;            break;
1496    
1497            case PT_WORD:            case PT_WORD:
1498            OK = _pcre_ucp_gentype[prop->chartype] == ucp_L ||            OK = PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
1499                 _pcre_ucp_gentype[prop->chartype] == ucp_N ||                 PRIV(ucp_gentype)[prop->chartype] == ucp_N ||
1500                 c == CHAR_UNDERSCORE;                 c == CHAR_UNDERSCORE;
1501            break;            break;
1502    
# Line 1737  for (;;) Line 1737  for (;;)
1737            break;            break;
1738    
1739            case PT_GC:            case PT_GC:
1740            OK = _pcre_ucp_gentype[prop->chartype] == code[5];            OK = PRIV(ucp_gentype)[prop->chartype] == code[5];
1741            break;            break;
1742    
1743            case PT_PC:            case PT_PC:
# Line 1751  for (;;) Line 1751  for (;;)
1751            /* These are specials for combination cases. */            /* These are specials for combination cases. */
1752    
1753            case PT_ALNUM:            case PT_ALNUM:
1754            OK = _pcre_ucp_gentype[prop->chartype] == ucp_L ||            OK = PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
1755                 _pcre_ucp_gentype[prop->chartype] == ucp_N;                 PRIV(ucp_gentype)[prop->chartype] == ucp_N;
1756            break;            break;
1757    
1758            case PT_SPACE:    /* Perl space */            case PT_SPACE:    /* Perl space */
1759            OK = _pcre_ucp_gentype[prop->chartype] == ucp_Z ||            OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
1760                 c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR;                 c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR;
1761            break;            break;
1762    
1763            case PT_PXSPACE:  /* POSIX space */            case PT_PXSPACE:  /* POSIX space */
1764            OK = _pcre_ucp_gentype[prop->chartype] == ucp_Z ||            OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
1765                 c == CHAR_HT || c == CHAR_NL || c == CHAR_VT ||                 c == CHAR_HT || c == CHAR_NL || c == CHAR_VT ||
1766                 c == CHAR_FF || c == CHAR_CR;                 c == CHAR_FF || c == CHAR_CR;
1767            break;            break;
1768    
1769            case PT_WORD:            case PT_WORD:
1770            OK = _pcre_ucp_gentype[prop->chartype] == ucp_L ||            OK = PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
1771                 _pcre_ucp_gentype[prop->chartype] == ucp_N ||                 PRIV(ucp_gentype)[prop->chartype] == ucp_N ||
1772                 c == CHAR_UNDERSCORE;                 c == CHAR_UNDERSCORE;
1773            break;            break;
1774    
# Line 2440  for (;;) Line 2440  for (;;)
2440          else          else
2441           {           {
2442           ecode = code + GET(code, 1);           ecode = code + GET(code, 1);
2443           if (clen > 0) isinclass = _pcre_xclass(c, code + 1 + LINK_SIZE);           if (clen > 0) isinclass = PRIV(xclass)(c, code + 1 + LINK_SIZE);
2444           }           }
2445    
2446          /* At this point, isinclass is set for all kinds of class, and ecode          /* At this point, isinclass is set for all kinds of class, and ecode
# Line 2566  for (;;) Line 2566  for (;;)
2566              if ((rrc = (*pcre_callout)(&cb)) < 0) return rrc;   /* Abandon */              if ((rrc = (*pcre_callout)(&cb)) < 0) return rrc;   /* Abandon */
2567              }              }
2568            if (rrc > 0) break;                      /* Fail this thread */            if (rrc > 0) break;                      /* Fail this thread */
2569            code += _pcre_OP_lengths[OP_CALLOUT];    /* Skip callout data */            code += PRIV(OP_lengths)[OP_CALLOUT];    /* Skip callout data */
2570            }            }
2571    
2572          condcode = code[LINK_SIZE+1];          condcode = code[LINK_SIZE+1];
# Line 2899  for (;;) Line 2899  for (;;)
2899          if ((rrc = (*pcre_callout)(&cb)) < 0) return rrc;   /* Abandon */          if ((rrc = (*pcre_callout)(&cb)) < 0) return rrc;   /* Abandon */
2900          }          }
2901        if (rrc == 0)        if (rrc == 0)
2902          { ADD_ACTIVE(state_offset + _pcre_OP_lengths[OP_CALLOUT], 0); }          { ADD_ACTIVE(state_offset + PRIV(OP_lengths)[OP_CALLOUT], 0); }
2903        break;        break;
2904    
2905    
# Line 3059  study data too. */ Line 3059  study data too. */
3059    
3060  if (re->magic_number != MAGIC_NUMBER)  if (re->magic_number != MAGIC_NUMBER)
3061    {    {
3062    re = _pcre_try_flipped(re, &internal_re, study, &internal_study);    re = PRIV(try_flipped)(re, &internal_re, study, &internal_study);
3063    if (re == NULL) return PCRE_ERROR_BADMAGIC;    if (re == NULL) return PCRE_ERROR_BADMAGIC;
3064    if (study != NULL) study = &internal_study;    if (study != NULL) study = &internal_study;
3065    }    }
# Line 3148  back the character offset. */ Line 3148  back the character offset. */
3148  if (utf8 && (options & PCRE_NO_UTF8_CHECK) == 0)  if (utf8 && (options & PCRE_NO_UTF8_CHECK) == 0)
3149    {    {
3150    int erroroffset;    int erroroffset;
3151    int errorcode = _pcre_valid_utf8((pcre_uchar *)subject, length, &erroroffset);    int errorcode = PRIV(valid_utf8)((pcre_uchar *)subject, length, &erroroffset);
3152    if (errorcode != 0)    if (errorcode != 0)
3153      {      {
3154      if (offsetcount >= 2)      if (offsetcount >= 2)
# Line 3169  if (utf8 && (options & PCRE_NO_UTF8_CHEC Line 3169  if (utf8 && (options & PCRE_NO_UTF8_CHEC
3169  is a feature that makes it possible to save compiled regex and re-use them  is a feature that makes it possible to save compiled regex and re-use them
3170  in other programs later. */  in other programs later. */
3171    
3172  if (md->tables == NULL) md->tables = _pcre_default_tables;  if (md->tables == NULL) md->tables = PRIV(default_tables);
3173    
3174  /* The lower casing table and the "must be at the start of a line" flag are  /* The lower casing table and the "must be at the start of a line" flag are
3175  used in a loop when finding where to start. */  used in a loop when finding where to start. */

Legend:
Removed from v.763  
changed lines
  Added in v.764

  ViewVC Help
Powered by ViewVC 1.1.5