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

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

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

revision 606 by ph10, Mon Jun 6 17:46:22 2011 UTC revision 613 by ph10, Sat Jul 2 16:59:52 2011 UTC
# Line 4931  for (;; ptr++) Line 4931  for (;; ptr++)
4931          if (namelen == verbs[i].len &&          if (namelen == verbs[i].len &&
4932              strncmp((char *)name, vn, namelen) == 0)              strncmp((char *)name, vn, namelen) == 0)
4933            {            {
4934            /* Check for open captures before ACCEPT */            /* Check for open captures before ACCEPT and convert it to
4935              ASSERT_ACCEPT if in an assertion. */
4936    
4937            if (verbs[i].op == OP_ACCEPT)            if (verbs[i].op == OP_ACCEPT)
4938              {              {
4939              open_capitem *oc;              open_capitem *oc;
4940                if (arglen != 0)
4941                  {
4942                  *errorcodeptr = ERR59;
4943                  goto FAILED;
4944                  }
4945              cd->had_accept = TRUE;              cd->had_accept = TRUE;
4946              for (oc = cd->open_caps; oc != NULL; oc = oc->next)              for (oc = cd->open_caps; oc != NULL; oc = oc->next)
4947                {                {
4948                *code++ = OP_CLOSE;                *code++ = OP_CLOSE;
4949                PUT2INC(code, 0, oc->number);                PUT2INC(code, 0, oc->number);
4950                }                }
4951                *code++ = (cd->assert_depth > 0)? OP_ASSERT_ACCEPT : OP_ACCEPT;
4952              }              }
4953    
4954            /* Handle the cases with/without an argument */            /* Handle other cases with/without an argument */
4955    
4956            if (arglen == 0)            else if (arglen == 0)
4957              {              {
4958              if (verbs[i].op < 0)   /* Argument is mandatory */              if (verbs[i].op < 0)   /* Argument is mandatory */
4959                {                {
# Line 5235  for (;; ptr++) Line 5242  for (;; ptr++)
5242          /* ------------------------------------------------------------ */          /* ------------------------------------------------------------ */
5243          case CHAR_EQUALS_SIGN:                 /* Positive lookahead */          case CHAR_EQUALS_SIGN:                 /* Positive lookahead */
5244          bravalue = OP_ASSERT;          bravalue = OP_ASSERT;
5245            cd->assert_depth += 1;
5246          ptr++;          ptr++;
5247          break;          break;
5248    
# Line 5249  for (;; ptr++) Line 5257  for (;; ptr++)
5257            continue;            continue;
5258            }            }
5259          bravalue = OP_ASSERT_NOT;          bravalue = OP_ASSERT_NOT;
5260            cd->assert_depth += 1;
5261          break;          break;
5262    
5263    
# Line 5258  for (;; ptr++) Line 5267  for (;; ptr++)
5267            {            {
5268            case CHAR_EQUALS_SIGN:               /* Positive lookbehind */            case CHAR_EQUALS_SIGN:               /* Positive lookbehind */
5269            bravalue = OP_ASSERTBACK;            bravalue = OP_ASSERTBACK;
5270              cd->assert_depth += 1;
5271            ptr += 2;            ptr += 2;
5272            break;            break;
5273    
5274            case CHAR_EXCLAMATION_MARK:          /* Negative lookbehind */            case CHAR_EXCLAMATION_MARK:          /* Negative lookbehind */
5275            bravalue = OP_ASSERTBACK_NOT;            bravalue = OP_ASSERTBACK_NOT;
5276              cd->assert_depth += 1;
5277            ptr += 2;            ptr += 2;
5278            break;            break;
5279    
# Line 5830  for (;; ptr++) Line 5841  for (;; ptr++)
5841             &length_prevgroup           /* Pre-compile phase */             &length_prevgroup           /* Pre-compile phase */
5842           ))           ))
5843        goto FAILED;        goto FAILED;
5844    
5845        if (bravalue >= OP_ASSERT && bravalue <= OP_ASSERTBACK_NOT)
5846          cd->assert_depth -= 1;
5847    
5848      /* At the end of compiling, code is still pointing to the start of the      /* At the end of compiling, code is still pointing to the start of the
5849      group, while tempcode has been updated to point past the end of the group      group, while tempcode has been updated to point past the end of the group
# Line 7152  field; this time it's used for rememberi Line 7166  field; this time it's used for rememberi
7166  */  */
7167    
7168  cd->final_bracount = cd->bracount;  /* Save for checking forward references */  cd->final_bracount = cd->bracount;  /* Save for checking forward references */
7169    cd->assert_depth = 0;
7170  cd->bracount = 0;  cd->bracount = 0;
7171  cd->names_found = 0;  cd->names_found = 0;
7172  cd->name_table = (uschar *)re + re->name_table_offset;  cd->name_table = (uschar *)re + re->name_table_offset;

Legend:
Removed from v.606  
changed lines
  Added in v.613

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12