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

Diff of /code/trunk/pcre_compile.c

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

revision 701 by ph10, Tue Sep 20 11:30:56 2011 UTC revision 721 by ph10, Fri Oct 7 15:51:39 2011 UTC
# Line 1761  for (;;) Line 1761  for (;;)
1761        break;        break;
1762    
1763        case OP_THEN_ARG:        case OP_THEN_ARG:
1764        code += code[1+LINK_SIZE];        code += code[1];
1765        break;        break;
1766        }        }
1767    
# Line 1880  for (;;) Line 1880  for (;;)
1880        break;        break;
1881    
1882        case OP_THEN_ARG:        case OP_THEN_ARG:
1883        code += code[1+LINK_SIZE];        code += code[1];
1884        break;        break;
1885        }        }
1886    
# Line 2217  for (code = first_significant_code(code Line 2217  for (code = first_significant_code(code
2217      break;      break;
2218    
2219      case OP_THEN_ARG:      case OP_THEN_ARG:
2220      code += code[1+LINK_SIZE];      code += code[1];
2221      break;      break;
2222    
2223      /* None of the remaining opcodes are required to match a character. */      /* None of the remaining opcodes are required to match a character. */
# Line 5045  for (;; ptr++) Line 5045  for (;; ptr++)
5045                PUT2INC(code, 0, oc->number);                PUT2INC(code, 0, oc->number);
5046                }                }
5047              *code++ = (cd->assert_depth > 0)? OP_ASSERT_ACCEPT : OP_ACCEPT;              *code++ = (cd->assert_depth > 0)? OP_ASSERT_ACCEPT : OP_ACCEPT;
5048    
5049              /* Do not set firstbyte after *ACCEPT */              /* Do not set firstbyte after *ACCEPT */
5050              if (firstbyte == REQ_UNSET) firstbyte = REQ_NONE;              if (firstbyte == REQ_UNSET) firstbyte = REQ_NONE;
5051              }              }
# Line 5060  for (;; ptr++) Line 5060  for (;; ptr++)
5060                goto FAILED;                goto FAILED;
5061                }                }
5062              *code = verbs[i].op;              *code = verbs[i].op;
5063              if (*code++ == OP_THEN)              if (*code++ == OP_THEN) cd->external_flags |= PCRE_HASTHEN;
               {  
               PUT(code, 0, code - bcptr->current_branch - 1);  
               code += LINK_SIZE;  
               }  
5064              }              }
5065    
5066            else            else
# Line 5075  for (;; ptr++) Line 5071  for (;; ptr++)
5071                goto FAILED;                goto FAILED;
5072                }                }
5073              *code = verbs[i].op_arg;              *code = verbs[i].op_arg;
5074              if (*code++ == OP_THEN_ARG)              if (*code++ == OP_THEN_ARG) cd->external_flags |= PCRE_HASTHEN;
               {  
               PUT(code, 0, code - bcptr->current_branch - 1);  
               code += LINK_SIZE;  
               }  
5075              *code++ = arglen;              *code++ = arglen;
5076              memcpy(code, arg, arglen);              memcpy(code, arg, arglen);
5077              code += arglen;              code += arglen;
# Line 5940  for (;; ptr++) Line 5932  for (;; ptr++)
5932        cd->assert_depth -= 1;        cd->assert_depth -= 1;
5933    
5934      /* 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
5935      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.
5936      and any option resetting that may follow it. The pattern pointer (ptr)      The pattern pointer (ptr) is on the bracket.
     is on the bracket. */  
5937    
5938      /* If this is a conditional bracket, check that there are no more than      If this is a conditional bracket, check that there are no more than
5939      two branches in the group, or just one if it's a DEFINE group. We do this      two branches in the group, or just one if it's a DEFINE group. We do this
5940      in the real compile phase, not in the pre-pass, where the whole group may      in the real compile phase, not in the pre-pass, where the whole group may
5941      not be available. */      not be available. */
# Line 6326  for (;; ptr++) Line 6317  for (;; ptr++)
6317      byte, set it from this character, but revert to none on a zero repeat.      byte, set it from this character, but revert to none on a zero repeat.
6318      Otherwise, leave the firstbyte value alone, and don't change it on a zero      Otherwise, leave the firstbyte value alone, and don't change it on a zero
6319      repeat. */      repeat. */
6320    
6321      if (firstbyte == REQ_UNSET)      if (firstbyte == REQ_UNSET)
6322        {        {
6323        zerofirstbyte = REQ_NONE;        zerofirstbyte = REQ_NONE;

Legend:
Removed from v.701  
changed lines
  Added in v.721

  ViewVC Help
Powered by ViewVC 1.1.5