44#define ReportRegExpError(a,b,c) throw_error((a)->context, E_FAIL, L"")
45#define ReportRegExpErrorHelper(a,b,c,d) throw_error((a)->context, E_FAIL, L"")
46#define JS_ReportErrorNumber(a,b,c,d) throw_error((a), E_FAIL, L"")
47#define JS_ReportErrorFlagsAndNumber(a,b,c,d,e,f) throw_error((a), E_FAIL, L"")
48#define JS_COUNT_OPERATION(a,b) do { } while(0)
74#define JSMSG_MIN_TOO_BIG 47
75#define JSMSG_MAX_TOO_BIG 48
76#define JSMSG_OUT_OF_ORDER 49
77#define JSMSG_OUT_OF_MEMORY 137
79#define LINE_SEPARATOR 0x2028
80#define PARA_SEPARATOR 0x2029
82#define RE_IS_LETTER(c) (((c >= 'A') && (c <= 'Z')) || \
83 ((c >= 'a') && (c <= 'z')) )
84#define RE_IS_LINE_TERM(c) ((c == '\n') || (c == '\r') || \
85 (c == LINE_SEPARATOR) || (c == PARA_SEPARATOR))
87#define JS_ISWORD(c) ((c) < 128 && (isalnum(c) || (c) == '_'))
89#define JS7_ISDEC(c) ((((unsigned)(c)) - '0') <= 9)
90#define JS7_UNDEC(c) ((c) - '0')
145#define REOP_IS_SIMPLE(op) ((op) <= REOP_NCLASS)
229#define INITIAL_STATESTACK 100
230#define INITIAL_BACKTRACK 8000
290#define CLASS_CACHE_SIZE 4
331#define GET_ARG(pc) ((WORD)(((pc)[0] << 8) | (pc)[1]))
332#define SET_ARG(pc, arg) ((pc)[0] = (jsbytecode) ((arg) >> 8), \
333 (pc)[1] = (jsbytecode) (arg))
335#define OFFSET_LEN ARG_LEN
336#define OFFSET_MAX ((1 << (ARG_LEN * 8)) - 1)
337#define GET_OFFSET(pc) GET_ARG(pc)
345#define TREE_DEPTH_MAX ((1 << 24) / sizeof(EmitStateStackEntry))
351#define CLASS_BITMAPS_MEM_LIMIT (1 << 24)
388 if ((nextByte & 0x80) == 0) {
395 *
result = 0x7F & nextByte;
400 }
while ((nextByte & 0x80) != 0);
437 if (
cv >=
'a' &&
cv <=
'f') {
438 *digit =
cv -
'a' + 10;
450#define JUMP_OFFSET_HI(off) ((jsbytecode)((off) >> 8))
451#define JUMP_OFFSET_LO(off) ((jsbytecode)(off))
480 if (treeDepth == 0) {
481 emitStateStack =
NULL;
487 emitStateSP = emitStateStack;
516 assert((
size_t)(emitStateSP - emitStateStack) <= treeDepth);
529 assert((
size_t)(emitStateSP - emitStateStack) <= treeDepth);
563 emitStateSP > emitStateStack) {
570 for (esp = esp2 - 1; esp >= emitStateStack; --esp) {
586 assert(jump < esp2->nextTermFixup);
633 assert((
size_t)(emitStateSP - emitStateStack) <= treeDepth);
656 (
WCHAR*)
t->kid +
t->u.flat.length ==
658 t->u.flat.length +=
t->next->u.flat.length;
659 t->next =
t->next->next;
662 if (
t->kid &&
t->u.flat.length > 1) {
666 }
else if (
t->u.flat.chr < 256) {
684 assert((
size_t)(emitStateSP - emitStateStack) <= treeDepth);
704 assert((
size_t)(emitStateSP - emitStateStack) <= treeDepth);
722 assert((
size_t)(emitStateSP - emitStateStack) <= treeDepth);
729 if (
t->u.range.min == 0 &&
t->u.range.max == (
UINT)-1) {
731 }
else if (
t->u.range.min == 0 &&
t->u.range.max == 1) {
733 }
else if (
t->u.range.min == 1 &&
t->u.range.max == (
UINT) -1) {
736 if (!
t->u.range.greedy)
750 assert((
size_t)(emitStateSP - emitStateStack) <= treeDepth);
761 if (!
t->u.ucclass.sense)
766 charSet->
length =
t->u.ucclass.bmsize;
767 charSet->
u.
src.startIndex =
t->u.ucclass.startIndex;
768 charSet->
u.
src.length =
t->u.ucclass.kidlen;
769 charSet->
sense =
t->u.ucclass.sense;
780 if (emitStateSP == emitStateStack)
789 free(emitStateStack);
808 switch (opData->
op) {
813 result->kid = operandStack[operandSP - 2];
815 operandStack[operandSP - 2] =
result;
835 state->progLength += 13;
847 state->progLength += 13;
860 state->progLength += 13;
864 state->progLength += 7;
869 result = operandStack[operandSP - 2];
893#define JSREG_FIND_PAREN_COUNT 0x8000
894#define JSREG_FIND_PAREN_ERROR 0x4000
901#define OVERFLOW_VALUE ((UINT)-1)
925 temp.classBitmapsMem = 0;
933 return temp.parenCount;
973 UINT n, digit, nDigits,
i;
975 target->u.ucclass.bmsize = 0;
1015 localMax = (
UINT) (*
src++) & 0x1F;
1028 for (
i = 0; (
i < nDigits) && (
src <
end);
i++) {
1039 n = (
n << 4) | digit;
1044 canStartRange =
FALSE;
1047 js_GetErrorMessage,
NULL,
1048 JSMSG_BAD_CLASS_RANGE);
1058 canStartRange =
FALSE;
1061 js_GetErrorMessage,
NULL,
1062 JSMSG_BAD_CLASS_RANGE);
1089 if (
'0' <=
c &&
c <=
'7') {
1093 if (
'0' <=
c &&
c <=
'7') {
1117 if (rangeStart > localMax) {
1119 js_GetErrorMessage,
NULL,
1120 JSMSG_BAD_CLASS_RANGE);
1125 if (canStartRange &&
src <
end - 1) {
1129 rangeStart = (
WCHAR)localMax;
1134 rangeStart = localMax;
1138 WCHAR maxch = localMax;
1140 for (
i = rangeStart;
i <= localMax;
i++) {
1184 if (!ignoreValues &&
min >
max)
1218 term =
state->result;
1220 switch (*
state->cp) {
1225 state->result->u.range.min = 1;
1228 state->progLength += 4;
1234 state->result->u.range.min = 0;
1237 state->progLength += 4;
1243 state->result->u.range.min = 0;
1244 state->result->u.range.max = 1;
1246 state->progLength += 4;
1274 state->result->kid = term;
1344 const WCHAR *termStart;
1352 state->progLength++;
1358 state->progLength++;
1373 state->progLength++;
1379 state->progLength++;
1384 WARN(
"non-octal digit in an escape sequence that doesn't match a back-reference\n");
1389 if (
c <
'0' ||
'7' <
c)
1402 state->result->u.flat.chr =
c;
1403 state->result->u.flat.length = 1;
1404 state->progLength += 3;
1415 termStart =
state->cp - 1;
1421 WARN(
"back-reference exceeds number of capturing parentheses\n");
1429 state->cp = termStart;
1443 state->result->u.parenIndex =
num - 1;
1494 n = (
n << 4) | digit;
1504 state->progLength++;
1526 state->result->u.flat.chr =
c;
1527 state->result->u.flat.length = 1;
1528 state->result->kid = (
void *) (
state->cp - 1);
1529 state->progLength += 3;
1537 termStart =
state->cp;
1538 state->result->u.ucclass.startIndex = termStart -
state->cpbegin;
1542 JSMSG_UNTERM_CLASS, termStart);
1546 if (*
state->cp ==
'\\') {
1552 if (*
state->cp ==
']') {
1553 state->result->u.ucclass.kidlen =
state->cp - termStart;
1559 if (!
state->classCache[
i].start) {
1560 state->classCache[
i].start = termStart;
1561 state->classCache[
i].length =
state->result->u.ucclass.kidlen;
1565 if (
state->classCache[
i].length ==
1566 state->result->u.ucclass.kidlen) {
1567 for (
n = 0; ;
n++) {
1568 if (
n ==
state->classCache[
i].length) {
1569 state->result->u.ucclass.index
1570 =
state->classCache[
i].index;
1573 if (
state->classCache[
i].start[
n] != termStart[
n])
1578 state->result->u.ucclass.index =
state->classCount++;
1592 n = (
state->result->u.ucclass.bmsize >> 3) + 1;
1597 state->classBitmapsMem +=
n;
1630 state->result->u.flat.chr =
c;
1631 state->result->u.flat.length = 1;
1632 state->result->kid = (
void *) (
state->cp - 1);
1633 state->progLength += 3;
1645#define INITIAL_STACK_SIZE 128
1671 operandStack =
malloc(
sizeof(
RENode *) * operandStackSize);
1676 parenIndex =
state->parenCount;
1683 if (operatorSP >= operandSP) {
1690 switch (*
state->cp) {
1694 *
state->cp ==
'?' &&
1695 (
state->cp[1] ==
'=' ||
1696 state->cp[1] ==
'!' ||
1697 state->cp[1] ==
':')) {
1698 switch (
state->cp[1]) {
1702 state->progLength += 4;
1707 state->progLength += 4;
1719 state->parenCount++;
1720 if (
state->parenCount == 65535) {
1722 JSMSG_TOO_MANY_PARENS);
1732 for (
i = operatorSP - 1; ;
i--) {
1735 JSMSG_UNMATCHED_RIGHT_PAREN);
1757 operand =
state->result;
1759 if (operandSP == operandStackSize) {
1761 operandStackSize += operandStackSize;
1762 tmp =
realloc(operandStack,
sizeof(
RENode *) * operandStackSize);
1767 operandStack[operandSP++] = operand;
1775 while (operatorSP) {
1778 operandStack, operandSP))
1783 state->result = operandStack[0];
1788 switch (*
state->cp) {
1792 while (operatorSP &&
1796 operandStack, operandSP)) {
1808 for (
i = operatorSP - 1; ;
i--) {
1811 JSMSG_UNMATCHED_RIGHT_PAREN);
1827 switch (operatorStack[operatorSP].
op) {
1837 operand->
kid = operandStack[operandSP - 1];
1838 operandStack[operandSP - 1] = operand;
1841 JSMSG_REGEXP_TOO_COMPLEX);
1848 state->result = operandStack[operandSP - 1];
1851 operandStack[operandSP - 1] =
state->result;
1852 goto restartOperator;
1855 operandStack, operandSP))
1892 if (operatorSP == operatorStackSize) {
1894 operatorStackSize += operatorStackSize;
1898 operatorStack = tmp;
1900 operatorStack[operatorSP].
op =
op;
1902 operatorStack[operatorSP++].
parenIndex = parenIndex;
1907 free(operatorStack);
1921 size_t parenIndex,
size_t parenCount)
1942 btincr = ((btincr+btsize-1)/btsize)*btsize;
1959 result->parenCount = parenCount;
1960 result->parenIndex = parenIndex;
1967 if (parenCount != 0) {
1970 &
x->parens[parenIndex],
1972 for (
i = 0;
i != parenCount;
i++)
1973 x->parens[parenIndex +
i].index = -1;
2022 const WCHAR *parenContent;
2025 if (
cap->index == -1)
2034 for (
i = 0;
i <
len;
i++) {
2039 for (
i = 0;
i <
len;
i++) {
2040 if (parenContent[
i] !=
x->cp[
i])
2054 cs->u.bits[byteIndex] |= 1 << (
c & 0x7);
2064 UINT byteIndex1 = c1 >> 3;
2065 UINT byteIndex2 = c2 >> 3;
2072 if (byteIndex1 == byteIndex2) {
2073 cs->u.bits[byteIndex1] |= ((
BYTE)0xFF >> (7 - (c2 - c1))) << c1;
2075 cs->u.bits[byteIndex1] |= 0xFF << c1;
2076 for (
i = byteIndex1 + 1;
i < byteIndex2;
i++)
2077 cs->u.bits[
i] = 0xFF;
2078 cs->u.bits[byteIndex2] |= (
BYTE)0xFF >> (7 - c2);
2088 WCHAR rangeStart = 0;
2101 - 1 - charSet->
u.
src.startIndex);
2110 byteLength = (charSet->
length >> 3) + 1;
2112 if (!charSet->
u.
bits) {
2168 for (
i = 0; (
i < nDigits) && (
src <
end);
i++) {
2180 n = (
n << 4) | digit;
2199 if (
'0' <=
c &&
c <=
'7') {
2203 if (
'0' <=
c &&
c <=
'7') {
2258 assert(rangeStart <= thisCh);
2259 for (
i = rangeStart;
i <= thisCh;
i++) {
2285 rangeStart = thisCh;
2309#define PUSH_STATE_STACK(data) \
2311 ++(data)->stateStackTop; \
2312 if ((data)->stateStackTop == (data)->stateStackLimit && \
2313 !ReallocStateStack((data))) { \
2334 const WCHAR *startcp =
x->cp;
2358 if (
x->cp != gData->
cpend) {
2424 assert(parenIndex < gData->regexp->parenCount);
2429 assert(offset < gData->regexp->source_len);
2446 TRACE(
" '%c' == '%c'\n", (
char)matchCh, (
char)*
x->cp);
2447 if (
x->cp != gData->
cpend && *
x->cp == matchCh) {
2454 assert(offset < gData->regexp->source_len);
2470 TRACE(
" '%c' == '%c'\n", (
char)matchCh, (
char)*
x->cp);
2472 if (
x->cp != gData->
cpend && *
x->cp == matchCh) {
2487 assert(index < gData->regexp->classCount);
2488 if (
x->cp != gData->
cpend) {
2493 if (charSet->
length != 0 &&
2503 assert(index < gData->regexp->classCount);
2504 if (
x->cp != gData->
cpend) {
2509 if (charSet->
length == 0 ||
2541 const WCHAR *startcp;
2542 size_t parenIndex,
k;
2543 size_t parenSoFar = 0;
2545 WCHAR matchCh1, matchCh2;
2558 while (
x->cp <= gData->
cpend) {
2596 if (
x->cp != gData->
cpend) {
2597 if (*
x->cp == matchCh2)
2605 if ((charSet->
length == 0 ||
2606 matchCh1 > charSet->
length ||
2607 !(charSet->
u.
bits[
k] & (1 << (matchCh1 & 0x7)))) ^
2622 if (
x->cp == gData->
cpend ||
2623 (*
x->cp != matchCh1 && *
x->cp != matchCh2)) {
2646 nextop = (
REOp) *nextpc++;
2685 assert(parenIndex < gData->regexp->parenCount);
2686 if (parenIndex + 1 > parenSoFar)
2687 parenSoFar = parenIndex + 1;
2688 x->parens[parenIndex].index =
x->cp - gData->
cpbegin;
2689 x->parens[parenIndex].length = 0;
2698 assert(parenIndex < gData->regexp->parenCount);
2699 cap = &
x->parens[parenIndex];
2701 cap->length = (delta < 0) ? 0 : (
size_t) delta;
2725 nextpc,
x,
x->cp, 0, 0)) {
2749 nextpc,
x,
x->cp, 0, 0)) {
2833 op = (
REOp) curState[-1].continue_op;
2862 nextop = (
REOp) *nextpc;
2898 goto minimalquantcommon;
2902 goto minimalquantcommon;
2906 goto minimalquantcommon;
2927 pc,
x,
x->cp, 0, 0)) {
2941#define PREPARE_REPEAT() \
2943 curState->index = x->cp - gData->cpbegin; \
2944 curState->continue_op = REOP_MINIMALREPEAT; \
2945 curState->continue_pc = pc; \
2947 for (k = curState->parenSoFar; k < parenSoFar; k++) \
2948 x->parens[k].index = -1; \
2949 PUSH_STATE_STACK(gData); \
2950 op = (REOp) *pc++; \
2951 assert(op < REOP_LIMIT); \
3007 if (gData->
cursz == 0)
3015 JSMSG_REGEXP_TOO_COMPLEX);
3021 gData->
cursz = backTrackData->
sz;
3024 x->
cp = backTrackData->
cp;
3037 (
char *)(backTrackData + 1) +
3043 x->parens[
k].index = -1;
3047 TRACE(
"\tBT_Pop: %Id,%Id\n",
3081 for (cp2 =
cp; cp2 <= gData->
cpend; cp2++) {
3085 x->parens[
j].index = -1;
3155 WARN(
"InitMatch failed\n");
3163 WARN(
"MatchRegExp failed\n");
3214 state.parenCount = 0;
3215 state.classCount = 0;
3216 state.progLength = 0;
3217 state.treeDepth = 0;
3218 state.classBitmapsMem = 0;
3222 if (
len != 0 && flat) {
3267 if ((
size_t)(endPC - re->
program) !=
state.progLength + 1) {
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void cleanup(void)
HRESULT throw_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str)
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 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 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_clear(heap_pool_t *)
heap_pool_t * heap_pool_mark(heap_pool_t *)
void * heap_pool_grow(heap_pool_t *, void *, DWORD, DWORD)
#define SCRIPTLANGUAGEVERSION_ES5
void * heap_pool_alloc(heap_pool_t *, DWORD) __WINE_ALLOC_SIZE(2)
#define JS_E_REGEXP_SYNTAX
#define JS_E_UNEXPECTED_QUANTIFIER
#define memcpy(s1, s2, n)
static unsigned __int64 next
#define offsetof(TYPE, MEMBER)
struct CompilerState::@456 classCache[CLASS_CACHE_SIZE]
jsbytecode * endTermFixup
jsbytecode * nextAltFixup
jsbytecode * nextTermFixup
JSPackedBool jumpToJumpFlag
jsbytecode * backtrack_pc
struct RECharSet::@446::@447 src
size_t backTrackStackSize
REBackTrackData * backTrackSP
REBackTrackData * backTrackStack
struct RENode::@451::@453 ucclass
struct RENode::@451::@454 flat
struct RENode::@451::@455 altprereq
struct RENode::@451::@452 range
struct REProgState::@448::@450 assertion
union REProgState::@448 u
struct REProgState::@448::@449 quantifier
struct RECharSet * classList
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out