44#define ReportRegExpError(a,b,c)
45#define ReportRegExpErrorHelper(a,b,c,d)
46#define JS_ReportErrorNumber(a,b,c,d)
47#define JS_ReportErrorFlagsAndNumber(a,b,c,d,e,f)
48#define js_ReportOutOfScriptQuota(a)
49#define JS_ReportOutOfMemory(a)
50#define JS_COUNT_OPERATION(a,b)
76#define JSMSG_MIN_TOO_BIG 47
77#define JSMSG_MAX_TOO_BIG 48
78#define JSMSG_OUT_OF_ORDER 49
79#define JSMSG_OUT_OF_MEMORY 137
81#define LINE_SEPARATOR 0x2028
82#define PARA_SEPARATOR 0x2029
84#define RE_IS_LETTER(c) (((c >= 'A') && (c <= 'Z')) || \
85 ((c >= 'a') && (c <= 'z')) )
86#define RE_IS_LINE_TERM(c) ((c == '\n') || (c == '\r') || \
87 (c == LINE_SEPARATOR) || (c == PARA_SEPARATOR))
89#define JS_ISWORD(c) ((c) < 128 && (isalnum(c) || (c) == '_'))
91#define JS7_ISDEC(c) ((((unsigned)(c)) - '0') <= 9)
92#define JS7_UNDEC(c) ((c) - '0')
147#define REOP_IS_SIMPLE(op) ((op) <= REOP_NCLASS)
231#define INITIAL_STATESTACK 100
232#define INITIAL_BACKTRACK 8000
292#define CLASS_CACHE_SIZE 4
333#define GET_ARG(pc) ((WORD)(((pc)[0] << 8) | (pc)[1]))
334#define SET_ARG(pc, arg) ((pc)[0] = (jsbytecode) ((arg) >> 8), \
335 (pc)[1] = (jsbytecode) (arg))
337#define OFFSET_LEN ARG_LEN
338#define OFFSET_MAX ((1 << (ARG_LEN * 8)) - 1)
339#define GET_OFFSET(pc) GET_ARG(pc)
347#define TREE_DEPTH_MAX ((1 << 24) / sizeof(EmitStateStackEntry))
353#define CLASS_BITMAPS_MEM_LIMIT (1 << 24)
390 if ((nextByte & 0x80) == 0) {
397 *
result = 0x7F & nextByte;
402 }
while ((nextByte & 0x80) != 0);
439 if (cv >=
'a' && cv <=
'f') {
440 *digit = cv -
'a' + 10;
452#define JUMP_OFFSET_HI(off) ((jsbytecode)((off) >> 8))
453#define JUMP_OFFSET_LO(off) ((jsbytecode)(off))
482 if (treeDepth == 0) {
483 emitStateStack =
NULL;
489 emitStateSP = emitStateStack;
518 assert((
size_t)(emitStateSP - emitStateStack) <= treeDepth);
531 assert((
size_t)(emitStateSP - emitStateStack) <= treeDepth);
565 emitStateSP > emitStateStack) {
572 for (esp = esp2 - 1; esp >= emitStateStack; --esp) {
588 assert(jump < esp2->nextTermFixup);
635 assert((
size_t)(emitStateSP - emitStateStack) <= treeDepth);
658 (
WCHAR*)
t->kid +
t->u.flat.length ==
660 t->u.flat.length +=
t->next->u.flat.length;
661 t->next =
t->next->next;
664 if (
t->kid &&
t->u.flat.length > 1) {
668 }
else if (
t->u.flat.chr < 256) {
686 assert((
size_t)(emitStateSP - emitStateStack) <= treeDepth);
706 assert((
size_t)(emitStateSP - emitStateStack) <= treeDepth);
724 assert((
size_t)(emitStateSP - emitStateStack) <= treeDepth);
731 if (
t->u.range.min == 0 &&
t->u.range.max == (
UINT)-1) {
733 }
else if (
t->u.range.min == 0 &&
t->u.range.max == 1) {
735 }
else if (
t->u.range.min == 1 &&
t->u.range.max == (
UINT) -1) {
738 if (!
t->u.range.greedy)
752 assert((
size_t)(emitStateSP - emitStateStack) <= treeDepth);
763 if (!
t->u.ucclass.sense)
768 charSet->
length =
t->u.ucclass.bmsize;
769 charSet->
u.
src.startIndex =
t->u.ucclass.startIndex;
770 charSet->
u.
src.length =
t->u.ucclass.kidlen;
771 charSet->
sense =
t->u.ucclass.sense;
782 if (emitStateSP == emitStateStack)
810 switch (opData->
op) {
815 result->kid = operandStack[operandSP - 2];
817 operandStack[operandSP - 2] =
result;
837 state->progLength += 13;
849 state->progLength += 13;
862 state->progLength += 13;
866 state->progLength += 7;
871 result = operandStack[operandSP - 2];
895#define JSREG_FIND_PAREN_COUNT 0x8000
896#define JSREG_FIND_PAREN_ERROR 0x4000
903#define OVERFLOW_VALUE ((UINT)-1)
927 temp.classBitmapsMem = 0;
935 return temp.parenCount;
975 UINT n, digit, nDigits,
i;
977 target->u.ucclass.bmsize = 0;
1017 localMax = (
UINT) (*
src++) & 0x1F;
1030 for (
i = 0; (
i < nDigits) && (
src <
end);
i++) {
1041 n = (
n << 4) | digit;
1046 canStartRange =
FALSE;
1049 js_GetErrorMessage,
NULL,
1050 JSMSG_BAD_CLASS_RANGE);
1060 canStartRange =
FALSE;
1063 js_GetErrorMessage,
NULL,
1064 JSMSG_BAD_CLASS_RANGE);
1091 if (
'0' <=
c &&
c <=
'7') {
1095 if (
'0' <=
c &&
c <=
'7') {
1119 if (rangeStart > localMax) {
1121 js_GetErrorMessage,
NULL,
1122 JSMSG_BAD_CLASS_RANGE);
1127 if (canStartRange &&
src <
end - 1) {
1131 rangeStart = (
WCHAR)localMax;
1136 rangeStart = localMax;
1140 WCHAR maxch = localMax;
1142 for (
i = rangeStart;
i <= localMax;
i++) {
1186 if (!ignoreValues &&
min >
max)
1220 term =
state->result;
1222 switch (*
state->cp) {
1227 state->result->u.range.min = 1;
1230 state->progLength += 4;
1236 state->result->u.range.min = 0;
1239 state->progLength += 4;
1245 state->result->u.range.min = 0;
1246 state->result->u.range.max = 1;
1248 state->progLength += 4;
1276 state->result->kid = term;
1346 const WCHAR *termStart;
1354 state->progLength++;
1360 state->progLength++;
1375 state->progLength++;
1381 state->progLength++;
1386 WARN(
"non-octal digit in an escape sequence that doesn't match a back-reference\n");
1391 if (
c <
'0' ||
'7' <
c)
1404 state->result->u.flat.chr =
c;
1405 state->result->u.flat.length = 1;
1406 state->progLength += 3;
1417 termStart =
state->cp - 1;
1423 WARN(
"back-reference exceeds number of capturing parentheses\n");
1431 state->cp = termStart;
1445 state->result->u.parenIndex =
num - 1;
1496 n = (
n << 4) | digit;
1506 state->progLength++;
1528 state->result->u.flat.chr =
c;
1529 state->result->u.flat.length = 1;
1530 state->result->kid = (
void *) (
state->cp - 1);
1531 state->progLength += 3;
1539 termStart =
state->cp;
1540 state->result->u.ucclass.startIndex = termStart -
state->cpbegin;
1544 JSMSG_UNTERM_CLASS, termStart);
1548 if (*
state->cp ==
'\\') {
1554 if (*
state->cp ==
']') {
1555 state->result->u.ucclass.kidlen =
state->cp - termStart;
1561 if (!
state->classCache[
i].start) {
1562 state->classCache[
i].start = termStart;
1563 state->classCache[
i].length =
state->result->u.ucclass.kidlen;
1567 if (
state->classCache[
i].length ==
1568 state->result->u.ucclass.kidlen) {
1569 for (
n = 0; ;
n++) {
1570 if (
n ==
state->classCache[
i].length) {
1571 state->result->u.ucclass.index
1572 =
state->classCache[
i].index;
1575 if (
state->classCache[
i].start[
n] != termStart[
n])
1580 state->result->u.ucclass.index =
state->classCount++;
1594 n = (
state->result->u.ucclass.bmsize >> 3) + 1;
1599 state->classBitmapsMem +=
n;
1626 JSMSG_BAD_QUANTIFIER,
state->cp - 1);
1633 state->result->u.flat.chr =
c;
1634 state->result->u.flat.length = 1;
1635 state->result->kid = (
void *) (
state->cp - 1);
1636 state->progLength += 3;
1648#define INITIAL_STACK_SIZE 128
1679 parenIndex =
state->parenCount;
1686 if (operatorSP >= operandSP) {
1693 switch (*
state->cp) {
1697 *
state->cp ==
'?' &&
1698 (
state->cp[1] ==
'=' ||
1699 state->cp[1] ==
'!' ||
1700 state->cp[1] ==
':')) {
1701 switch (
state->cp[1]) {
1705 state->progLength += 4;
1710 state->progLength += 4;
1722 state->parenCount++;
1723 if (
state->parenCount == 65535) {
1725 JSMSG_TOO_MANY_PARENS);
1735 for (
i = operatorSP - 1; ;
i--) {
1738 JSMSG_UNMATCHED_RIGHT_PAREN);
1760 operand =
state->result;
1762 if (operandSP == operandStackSize) {
1764 operandStackSize += operandStackSize;
1770 operandStack[operandSP++] = operand;
1778 while (operatorSP) {
1781 operandStack, operandSP))
1786 state->result = operandStack[0];
1791 switch (*
state->cp) {
1795 while (operatorSP &&
1799 operandStack, operandSP)) {
1811 for (
i = operatorSP - 1; ;
i--) {
1814 JSMSG_UNMATCHED_RIGHT_PAREN);
1830 switch (operatorStack[operatorSP].
op) {
1840 operand->
kid = operandStack[operandSP - 1];
1841 operandStack[operandSP - 1] = operand;
1844 JSMSG_REGEXP_TOO_COMPLEX);
1851 state->result = operandStack[operandSP - 1];
1854 operandStack[operandSP - 1] =
state->result;
1855 goto restartOperator;
1858 operandStack, operandSP))
1895 if (operatorSP == operatorStackSize) {
1897 operatorStackSize += operatorStackSize;
1901 operatorStack = tmp;
1903 operatorStack[operatorSP].
op =
op;
1905 operatorStack[operatorSP++].
parenIndex = parenIndex;
1924 size_t parenIndex,
size_t parenCount)
1945 btincr = ((btincr+btsize-1)/btsize)*btsize;
1962 result->parenCount = parenCount;
1963 result->parenIndex = parenIndex;
1970 if (parenCount != 0) {
1973 &
x->parens[parenIndex],
1975 for (
i = 0;
i != parenCount;
i++)
1976 x->parens[parenIndex +
i].index = -1;
2025 const WCHAR *parenContent;
2028 if (
cap->index == -1)
2037 for (
i = 0;
i <
len;
i++) {
2042 for (
i = 0;
i <
len;
i++) {
2043 if (parenContent[
i] !=
x->cp[
i])
2057 cs->u.bits[byteIndex] |= 1 << (
c & 0x7);
2067 UINT byteIndex1 = c1 >> 3;
2068 UINT byteIndex2 = c2 >> 3;
2075 if (byteIndex1 == byteIndex2) {
2076 cs->u.bits[byteIndex1] |= ((
BYTE)0xFF >> (7 - (c2 - c1))) << c1;
2078 cs->u.bits[byteIndex1] |= 0xFF << c1;
2079 for (
i = byteIndex1 + 1;
i < byteIndex2;
i++)
2080 cs->u.bits[
i] = 0xFF;
2081 cs->u.bits[byteIndex2] |= (
BYTE)0xFF >> (7 - c2);
2091 WCHAR rangeStart = 0;
2104 - 1 - charSet->
u.
src.startIndex);
2113 byteLength = (charSet->
length >> 3) + 1;
2115 if (!charSet->
u.
bits) {
2171 for (
i = 0; (
i < nDigits) && (
src <
end);
i++) {
2183 n = (
n << 4) | digit;
2202 if (
'0' <=
c &&
c <=
'7') {
2206 if (
'0' <=
c &&
c <=
'7') {
2261 assert(rangeStart <= thisCh);
2262 for (
i = rangeStart;
i <= thisCh;
i++) {
2288 rangeStart = thisCh;
2312#define PUSH_STATE_STACK(data) \
2314 ++(data)->stateStackTop; \
2315 if ((data)->stateStackTop == (data)->stateStackLimit && \
2316 !ReallocStateStack((data))) { \
2337 const WCHAR *startcp =
x->cp;
2361 if (
x->cp != gData->
cpend) {
2427 assert(parenIndex < gData->regexp->parenCount);
2432 assert(offset < gData->regexp->source_len);
2449 TRACE(
" '%c' == '%c'\n", (
char)matchCh, (
char)*
x->cp);
2450 if (
x->cp != gData->
cpend && *
x->cp == matchCh) {
2457 assert(offset < gData->regexp->source_len);
2473 TRACE(
" '%c' == '%c'\n", (
char)matchCh, (
char)*
x->cp);
2475 if (
x->cp != gData->
cpend && *
x->cp == matchCh) {
2490 assert(index < gData->regexp->classCount);
2491 if (
x->cp != gData->
cpend) {
2496 if (charSet->
length != 0 &&
2498 (charSet->
u.
bits[
index] & (1 << (ch & 0x7)))) {
2506 assert(index < gData->regexp->classCount);
2507 if (
x->cp != gData->
cpend) {
2512 if (charSet->
length == 0 ||
2514 !(charSet->
u.
bits[
index] & (1 << (ch & 0x7)))) {
2544 const WCHAR *startcp;
2545 size_t parenIndex,
k;
2546 size_t parenSoFar = 0;
2548 WCHAR matchCh1, matchCh2;
2561 while (
x->cp <= gData->
cpend) {
2599 if (
x->cp != gData->
cpend) {
2600 if (*
x->cp == matchCh2)
2608 if ((charSet->
length == 0 ||
2609 matchCh1 > charSet->
length ||
2610 !(charSet->
u.
bits[
k] & (1 << (matchCh1 & 0x7)))) ^
2625 if (
x->cp == gData->
cpend ||
2626 (*
x->cp != matchCh1 && *
x->cp != matchCh2)) {
2649 nextop = (
REOp) *nextpc++;
2688 assert(parenIndex < gData->regexp->parenCount);
2689 if (parenIndex + 1 > parenSoFar)
2690 parenSoFar = parenIndex + 1;
2691 x->parens[parenIndex].index =
x->cp - gData->
cpbegin;
2692 x->parens[parenIndex].length = 0;
2701 assert(parenIndex < gData->regexp->parenCount);
2702 cap = &
x->parens[parenIndex];
2704 cap->length = (delta < 0) ? 0 : (
size_t) delta;
2728 nextpc,
x,
x->cp, 0, 0)) {
2752 nextpc,
x,
x->cp, 0, 0)) {
2836 op = (
REOp) curState[-1].continue_op;
2865 nextop = (
REOp) *nextpc;
2901 goto minimalquantcommon;
2905 goto minimalquantcommon;
2909 goto minimalquantcommon;
2930 pc,
x,
x->cp, 0, 0)) {
2944#define PREPARE_REPEAT() \
2946 curState->index = x->cp - gData->cpbegin; \
2947 curState->continue_op = REOP_MINIMALREPEAT; \
2948 curState->continue_pc = pc; \
2950 for (k = curState->parenSoFar; k < parenSoFar; k++) \
2951 x->parens[k].index = -1; \
2952 PUSH_STATE_STACK(gData); \
2953 op = (REOp) *pc++; \
2954 assert(op < REOP_LIMIT); \
3010 if (gData->
cursz == 0)
3018 JSMSG_REGEXP_TOO_COMPLEX);
3024 gData->
cursz = backTrackData->
sz;
3027 x->
cp = backTrackData->
cp;
3040 (
char *)(backTrackData + 1) +
3046 x->parens[
k].index = -1;
3050 TRACE(
"\tBT_Pop: %ld,%ld\n",
3084 for (cp2 =
cp; cp2 <= gData->
cpend; cp2++) {
3088 x->parens[
j].index = -1;
3159 WARN(
"InitMatch failed\n");
3167 WARN(
"MatchRegExp failed\n");
3218 state.parenCount = 0;
3219 state.classCount = 0;
3220 state.progLength = 0;
3221 state.treeDepth = 0;
3222 state.classBitmapsMem = 0;
3226 if (
len != 0 && flat) {
3271 if ((
size_t)(endPC - re->
program) !=
state.progLength + 1) {
3300 *regexp = new_regexp;
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
static void * heap_realloc(void *mem, size_t len)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void cleanup(void)
__kernel_ptrdiff_t ptrdiff_t
GLint GLint GLint GLint GLint x
GLint GLint GLsizei width
GLenum GLenum GLvoid GLvoid GLvoid * span
GLuint GLsizei GLsizei * length
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define JSREG_FIND_PAREN_COUNT
#define js_ReportOutOfScriptQuota(a)
#define JSMSG_OUT_OF_MEMORY
static size_t GetCompactIndexWidth(size_t index)
static REBackTrackData * PushBackTrackState(REGlobalData *gData, REOp op, jsbytecode *target, match_state_t *x, const WCHAR *cp, size_t parenIndex, size_t parenCount)
static match_state_t * FlatNIMatcher(REGlobalData *gData, match_state_t *x, const WCHAR *matchChars, size_t length)
static jsbytecode * ReadCompactIndex(jsbytecode *pc, size_t *result)
static BOOL ProcessCharSet(REGlobalData *gData, RECharSet *charSet)
#define JS_COUNT_OPERATION(a, b)
static BOOL ParseRegExp(CompilerState *)
#define REOP_IS_SIMPLE(op)
#define JS_ReportOutOfMemory(a)
#define ReportRegExpError(a, b, c)
#define JSMSG_MIN_TOO_BIG
#define JUMP_OFFSET_LO(off)
struct REProgState REProgState
#define RE_IS_LINE_TERM(c)
static jsbytecode * EmitREBytecode(CompilerState *state, regexp_t *re, size_t treeDepth, jsbytecode *pc, RENode *t)
static HRESULT InitMatch(regexp_t *re, void *cx, heap_pool_t *pool, REGlobalData *gData)
static UINT GetDecimalValue(WCHAR c, UINT max, UINT(*findMax)(CompilerState *state), CompilerState *state)
static UINT FindParenCount(CompilerState *state)
static INT ParseMinMaxQuantifier(CompilerState *state, BOOL ignoreValues)
struct REGlobalData REGlobalData
#define JSMSG_MAX_TOO_BIG
HRESULT regexp_execute(regexp_t *regexp, void *cx, heap_pool_t *pool, const WCHAR *str, DWORD str_len, match_state_t *result)
regexp_t * regexp_new(void *cx, heap_pool_t *pool, const WCHAR *str, DWORD str_len, WORD flags, BOOL flat)
#define INITIAL_BACKTRACK
static BOOL CalculateBitmapSize(CompilerState *state, RENode *target, const WCHAR *src, const WCHAR *end)
struct RECharSet RECharSet
static BOOL isASCIIHexDigit(WCHAR c, UINT *digit)
#define JUMP_OFFSET_HI(off)
static void AddCharacterToCharSet(RECharSet *cs, WCHAR c)
static match_state_t * MatchRegExp(REGlobalData *gData, match_state_t *x)
#define JSMSG_OUT_OF_ORDER
struct CompilerState CompilerState
#define CLASS_BITMAPS_MEM_LIMIT
static match_state_t * BackrefMatcher(REGlobalData *gData, match_state_t *x, size_t parenIndex)
static BOOL ParseTerm(CompilerState *state)
#define JS_ReportErrorNumber(a, b, c, d)
void regexp_destroy(regexp_t *re)
#define INITIAL_STACK_SIZE
static match_state_t * ExecuteREBytecode(REGlobalData *gData, match_state_t *x)
#define PUSH_STATE_STACK(data)
struct EmitStateStackEntry EmitStateStackEntry
static match_state_t * SimpleMatch(REGlobalData *gData, match_state_t *x, REOp op, jsbytecode **startpc, BOOL updatecp)
#define JSREG_FIND_PAREN_ERROR
static BOOL SetForwardJumpOffset(jsbytecode *jump, jsbytecode *target)
struct REBackTrackData REBackTrackData
#define ReportRegExpErrorHelper(a, b, c, d)
static void AddCharacterRangeToCharSet(RECharSet *cs, UINT c1, UINT c2)
static BOOL ParseQuantifier(CompilerState *state)
static BOOL ProcessOp(CompilerState *state, REOpData *opData, RENode **operandStack, INT operandSP)
#define INITIAL_STATESTACK
static BOOL ReallocStateStack(REGlobalData *gData)
static RENode * NewRENode(CompilerState *state, REOp op)
static const char * reop_names[]
static jsbytecode * WriteCompactIndex(jsbytecode *pc, size_t index)
void * heap_pool_alloc(heap_pool_t *, DWORD) __WINE_ALLOC_SIZE(2) DECLSPEC_HIDDEN
void heap_pool_clear(heap_pool_t *) DECLSPEC_HIDDEN
heap_pool_t * heap_pool_mark(heap_pool_t *) DECLSPEC_HIDDEN
void * heap_pool_grow(heap_pool_t *, void *, DWORD, DWORD) DECLSPEC_HIDDEN
#define memcpy(s1, s2, n)
static unsigned __int64 next
#define offsetof(TYPE, MEMBER)
struct CompilerState::@457 classCache[CLASS_CACHE_SIZE]
jsbytecode * endTermFixup
jsbytecode * nextAltFixup
jsbytecode * nextTermFixup
JSPackedBool jumpToJumpFlag
jsbytecode * backtrack_pc
struct RECharSet::@447::@448 src
size_t backTrackStackSize
REBackTrackData * backTrackSP
REBackTrackData * backTrackStack
struct RENode::@452::@454 ucclass
struct RENode::@452::@453 range
struct RENode::@452::@456 altprereq
struct RENode::@452::@455 flat
struct REProgState::@449::@451 assertion
struct REProgState::@449::@450 quantifier
union REProgState::@449 u
struct RECharSet * classList
HRESULT regexp_set_flags(regexp_t **regexp, void *cx, heap_pool_t *pool, WORD flags)