version 1.1.1.3, 2013/07/22 08:25:56
|
version 1.1.1.4, 2014/06/15 19:46:04
|
Line 425 for(;;)
|
Line 425 for(;;)
|
break; |
break; |
|
|
case OP_CREF: |
case OP_CREF: |
case OP_NCREF: |
|
fprintf(f, "%3d %s", GET2(code,1), priv_OP_names[*code]); |
fprintf(f, "%3d %s", GET2(code,1), priv_OP_names[*code]); |
break; |
break; |
|
|
|
case OP_DNCREF: |
|
{ |
|
pcre_uchar *entry = (pcre_uchar *)re + offset + (GET2(code, 1) * size) + |
|
IMM2_SIZE; |
|
fprintf(f, " %s Cond ref <", flag); |
|
print_puchar(f, entry); |
|
fprintf(f, ">%d", GET2(code, 1 + IMM2_SIZE)); |
|
} |
|
break; |
|
|
case OP_RREF: |
case OP_RREF: |
c = GET2(code, 1); |
c = GET2(code, 1); |
if (c == RREF_ANY) |
if (c == RREF_ANY) |
Line 437 for(;;)
|
Line 446 for(;;)
|
fprintf(f, " Cond recurse %d", c); |
fprintf(f, " Cond recurse %d", c); |
break; |
break; |
|
|
case OP_NRREF: | case OP_DNRREF: |
c = GET2(code, 1); | { |
if (c == RREF_ANY) | pcre_uchar *entry = (pcre_uchar *)re + offset + (GET2(code, 1) * size) + |
fprintf(f, " Cond nrecurse any"); | IMM2_SIZE; |
else | fprintf(f, " %s Cond recurse <", flag); |
fprintf(f, " Cond nrecurse %d", c); | print_puchar(f, entry); |
| fprintf(f, ">%d", GET2(code, 1 + IMM2_SIZE)); |
| } |
break; |
break; |
|
|
case OP_DEF: |
case OP_DEF: |
Line 598 for(;;)
|
Line 609 for(;;)
|
ccode = code + priv_OP_lengths[*code]; |
ccode = code + priv_OP_lengths[*code]; |
goto CLASS_REF_REPEAT; |
goto CLASS_REF_REPEAT; |
|
|
|
case OP_DNREFI: |
|
flag = "/i"; |
|
/* Fall through */ |
|
case OP_DNREF: |
|
{ |
|
pcre_uchar *entry = (pcre_uchar *)re + offset + (GET2(code, 1) * size) + |
|
IMM2_SIZE; |
|
fprintf(f, " %s \\k<", flag); |
|
print_puchar(f, entry); |
|
fprintf(f, ">%d", GET2(code, 1 + IMM2_SIZE)); |
|
} |
|
ccode = code + priv_OP_lengths[*code]; |
|
goto CLASS_REF_REPEAT; |
|
|
case OP_CALLOUT: |
case OP_CALLOUT: |
fprintf(f, " %s %d %d %d", priv_OP_names[*code], code[1], GET(code,2), |
fprintf(f, " %s %d %d %d", priv_OP_names[*code], code[1], GET(code,2), |
GET(code, 2 + LINK_SIZE)); |
GET(code, 2 + LINK_SIZE)); |
Line 608 for(;;)
|
Line 633 for(;;)
|
print_prop(f, code, " ", ""); |
print_prop(f, code, " ", ""); |
break; |
break; |
|
|
/* OP_XCLASS can only occur in UTF or PCRE16 modes. However, there's no | /* OP_XCLASS cannot occur in 8-bit, non-UTF mode. However, there's no harm |
harm in having this code always here, and it makes it less messy without | in having this code always here, and it makes it less messy without all |
all those #ifdefs. */ | those #ifdefs. */ |
|
|
case OP_CLASS: |
case OP_CLASS: |
case OP_NCLASS: |
case OP_NCLASS: |
Line 671 for(;;)
|
Line 696 for(;;)
|
pcre_uchar ch; |
pcre_uchar ch; |
while ((ch = *ccode++) != XCL_END) |
while ((ch = *ccode++) != XCL_END) |
{ |
{ |
if (ch == XCL_PROP) | BOOL not = FALSE; |
| const char *notch = ""; |
| |
| switch(ch) |
{ |
{ |
unsigned int ptype = *ccode++; | case XCL_NOTPROP: |
unsigned int pvalue = *ccode++; | not = TRUE; |
fprintf(f, "\\p{%s}", get_ucpname(ptype, pvalue)); | notch = "^"; |
} | /* Fall through */ |
else if (ch == XCL_NOTPROP) | |
{ | case XCL_PROP: |
unsigned int ptype = *ccode++; | { |
unsigned int pvalue = *ccode++; | unsigned int ptype = *ccode++; |
fprintf(f, "\\P{%s}", get_ucpname(ptype, pvalue)); | unsigned int pvalue = *ccode++; |
} | |
else | switch(ptype) |
{ | { |
| case PT_PXGRAPH: |
| fprintf(f, "[:%sgraph:]", notch); |
| break; |
| |
| case PT_PXPRINT: |
| fprintf(f, "[:%sprint:]", notch); |
| break; |
| |
| case PT_PXPUNCT: |
| fprintf(f, "[:%spunct:]", notch); |
| break; |
| |
| default: |
| fprintf(f, "\\%c{%s}", (not? 'P':'p'), |
| get_ucpname(ptype, pvalue)); |
| break; |
| } |
| } |
| break; |
| |
| default: |
ccode += 1 + print_char(f, ccode, utf); |
ccode += 1 + print_char(f, ccode, utf); |
if (ch == XCL_RANGE) |
if (ch == XCL_RANGE) |
{ |
{ |
fprintf(f, "-"); |
fprintf(f, "-"); |
ccode += 1 + print_char(f, ccode, utf); |
ccode += 1 + print_char(f, ccode, utf); |
} |
} |
|
break; |
} |
} |
} |
} |
} |
} |
Line 710 for(;;)
|
Line 760 for(;;)
|
case OP_CRMINPLUS: |
case OP_CRMINPLUS: |
case OP_CRQUERY: |
case OP_CRQUERY: |
case OP_CRMINQUERY: |
case OP_CRMINQUERY: |
|
case OP_CRPOSSTAR: |
|
case OP_CRPOSPLUS: |
|
case OP_CRPOSQUERY: |
fprintf(f, "%s", priv_OP_names[*ccode]); |
fprintf(f, "%s", priv_OP_names[*ccode]); |
extra += priv_OP_lengths[*ccode]; |
extra += priv_OP_lengths[*ccode]; |
break; |
break; |
|
|
case OP_CRRANGE: |
case OP_CRRANGE: |
case OP_CRMINRANGE: |
case OP_CRMINRANGE: |
|
case OP_CRPOSRANGE: |
min = GET2(ccode,1); |
min = GET2(ccode,1); |
max = GET2(ccode,1 + IMM2_SIZE); |
max = GET2(ccode,1 + IMM2_SIZE); |
if (max == 0) fprintf(f, "{%u,}", min); |
if (max == 0) fprintf(f, "{%u,}", min); |
else fprintf(f, "{%u,%u}", min, max); |
else fprintf(f, "{%u,%u}", min, max); |
if (*ccode == OP_CRMINRANGE) fprintf(f, "?"); |
if (*ccode == OP_CRMINRANGE) fprintf(f, "?"); |
|
else if (*ccode == OP_CRPOSRANGE) fprintf(f, "+"); |
extra += priv_OP_lengths[*ccode]; |
extra += priv_OP_lengths[*ccode]; |
break; |
break; |
|
|