Go to the SVN repository for this file.
54 #ifndef OP_LISTS_DEFINED 56 #define OP_LISTS_DEFINED 61 #define OP_lengths PCRE2_SUFFIX(OP_lengths_) 62 #define get_ucpname PCRE2_SUFFIX(get_ucpname_) 63 #define pcre2_printint PCRE2_SUFFIX(pcre2_printint_) 64 #define print_char PCRE2_SUFFIX(print_char_) 65 #define print_custring PCRE2_SUFFIX(print_custring_) 66 #define print_custring_bylen PCRE2_SUFFIX(print_custring_bylen_) 67 #define print_prop PCRE2_SUFFIX(print_prop_) 99 #ifdef SUPPORT_UNICODE 102 #if PCRE2_CODE_UNIT_WIDTH == 8 103one_code_unit = c < 0x80;
104 #elif PCRE2_CODE_UNIT_WIDTH == 16 105one_code_unit = (c & 0xfc00) != 0xd800;
107one_code_unit = (c & 0xfffff800u) != 0xd800u;
116 if(
PRINTABLE(c)) fprintf(
f,
"%c", (
char)c);
117 else if(c < 0x80) fprintf(
f,
"\\x%02x", c);
118 elsefprintf(
f,
"\\x{%02x}", c);
126 #ifndef SUPPORT_UNICODE 134 #if PCRE2_CODE_UNIT_WIDTH == 8 135 if((c & 0xc0) != 0xc0)
137fprintf(
f,
"\\X{%x}", c);
146 for(
i= 1;
i<=
a;
i++)
148 if((ptr[
i] & 0xc0) != 0x80)
150fprintf(
f,
"\\X{%x}", c);
154c |= (ptr[
i] & 0x3f) << s;
156fprintf(
f,
"\\x{%x}", c);
164 #if PCRE2_CODE_UNIT_WIDTH == 16 165 if((ptr[1] & 0xfc00) != 0xdc00)
167fprintf(
f,
"\\X{%x}", c);
170c = (((c & 0x3ff) << 10) | (ptr[1] & 0x3ff)) + 0x10000;
171fprintf(
f,
"\\x{%x}", c);
179 #if PCRE2_CODE_UNIT_WIDTH == 32 180fprintf(
f,
"\\X{%x}", c);
207 while(*ptr !=
'\0')
210 if(
PRINTABLE(c)) fprintf(
f,
"%c", c);
elsefprintf(
f,
"\\x{%x}", c);
220 if(
PRINTABLE(c)) fprintf(
f,
"%c", c);
elsefprintf(
f,
"\\x{%x}", c);
242 #ifdef SUPPORT_UNICODE 244 const char*yield =
"??";
246 unsigned intptypex = (ptype ==
PT_SC)?
PT_SCX: ptype;
248 for(
int i=
PRIV(utt_size) - 1;
i>= 0;
i--)
252 if((ptype == u->
type|| ptypex == u->
type) && pvalue == u->
value)
255 size_tsl = strlen(s);
269 if(++
count>= 2)
break;
306 const char*sc = (
code[1] ==
PT_SC)?
"script:":
"";
313fprintf (
f,
"%s%sclist", before, (*
code==
OP_PROP)?
"":
"not ");
314 while(*p <
NOTACHAR) fprintf(
f,
" %04x", *p++);
315fprintf(
f,
"%s", after);
341 uint32_tnesize = re->name_entry_size;
345 code= codestart = nametable + re->name_count * re->name_entry_size;
352 const char*flag =
" ";
353 unsigned intextra = 0;
356fprintf(
f,
"%3d ", (
int)(
code- codestart));
378fprintf(
f,
"------------------------------------------------------------------\n");
393fprintf(
f,
" /i ");
407 if(print_lengths) fprintf(
f,
"%3d ", GET(
code, 1));
408 elsefprintf(
f,
" ");
431 if(print_lengths) fprintf(
f,
"%3d ", GET(
code, 1));
432 elsefprintf(
f,
" ");
437 if(print_lengths) fprintf(
f,
"%3d ",
GET2(
code, 1));
438 elsefprintf(
f,
" ");
443 if(print_lengths) fprintf(
f,
"%3d %d ",
GET2(
code, 1),
445 elsefprintf(
f,
" ");
460fprintf(
f,
" %s Cond ref <", flag);
469fprintf(
f,
" Cond recurse any");
471fprintf(
f,
" Cond recurse %d", c);
477fprintf(
f,
" %s Cond recurse <", flag);
484fprintf(
f,
" Cond false");
488fprintf(
f,
" Cond true");
520fprintf(
f,
" %s ", flag);
545fprintf(
f,
" %s ", flag);
575fprintf(
f,
" %s [^", flag);
601fprintf(
f,
" %s [^", flag);
617fprintf(
f,
" %s [^", flag);
628 if(print_lengths) fprintf(
f,
"%3d ", GET(
code, 1));
629 elsefprintf(
f,
" ");
637fprintf(
f,
" %s \\%d", flag,
GET2(
code,1));
639 gotoCLASS_REF_REPEAT;
647fprintf(
f,
" %s \\k<", flag);
652 gotoCLASS_REF_REPEAT;
664 for(
i= 0;
PRIV(callout_start_delims)[
i] != 0;
i++)
665 if(c ==
PRIV(callout_start_delims)[
i])
667c =
PRIV(callout_end_delims)[
i];
687 BOOLprintmap, invertmap;
697extra = GET(
code, 1);
699printmap = (*ccode &
XCL_MAP) != 0;
723 for(
i= 0;
i< 32;
i++) inverted_map[
i] = 255 ^
map[
i];
727 for(
i= 0;
i< 256;
i++)
729 if((
map[
i/8] & (1u << (
i&7))) != 0)
732 for(j =
i+1; j < 256; j++)
733 if((
map[j/8] & (1u << (j&7))) == 0)
break;
734 if(
i==
'-'||
i==
']') fprintf(
f,
"\\");
736 elsefprintf(
f,
"\\x%02x",
i);
739 if(j !=
i+ 1) fprintf(
f,
"-");
740 if(j ==
'-'|| j ==
']') fprintf(
f,
"\\");
742 elsefprintf(
f,
"\\x%02x", j);
756 while((ch = *ccode++) !=
XCL_END)
758 const char*notch =
"";
768 unsigned intptype = *ccode++;
769 unsigned intpvalue = *ccode++;
775fprintf(
f,
"[:%sgraph:]", notch);
779fprintf(
f,
"[:%sprint:]", notch);
783fprintf(
f,
"[:%spunct:]", notch);
787fprintf(
f,
"[:%sxdigit:]", notch);
792fprintf(
f,
"\\%c{%c%s}", ((notch[0] ==
'^')?
'P':
'p'),
840 if(
max== 0) fprintf(
f,
"{%u,}",
min);
841 elsefprintf(
f,
"{%u,%u}",
min,
max);
#define TRUE
bool replacment for C indicating true.
#define FALSE
bool replacment for C indicating false.
struct pcre2_real_code pcre2_real_code
static const char * OP_names[]
#define print_custring_bylen
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4