39static const WCHAR ignoreCaseW[] = {
'i',
'g',
'n',
'o',
'r',
'e',
'C',
'a',
's',
'e',0};
47 {
'l',
'e',
'f',
't',
'C',
'o',
'n',
't',
'e',
'x',
't',0};
49 {
'r',
'i',
'g',
'h',
't',
'C',
'o',
'n',
't',
'e',
'x',
't',0};
73 This->last_index = last_index;
101 for(
i=0;
i <
n;
i++) {
102 if(
ret->parens[
i].index == -1) {
103 ctx->match_parens[
i].index = 0;
104 ctx->match_parens[
i].length = 0;
106 ctx->match_parens[
i].index =
ret->parens[
i].index;
107 ctx->match_parens[
i].length =
ret->parens[
i].length;
112 memset(
ctx->match_parens+
n, 0,
sizeof(
ctx->match_parens) -
n*
sizeof(
ctx->match_parens[0]));
119 ctx->last_match_length =
ret->match_len;
159 match->cp = (*ret)->cp;
160 match->match_len = (*ret)->match_len;
168 (*ret)->cp =
match->cp;
169 (*ret)->match_len =
match->match_len;
334 FIXME(
"Not a RegExp\n");
381 static const WCHAR indexW[] = {
'i',
'n',
'd',
'e',
'x',0};
382 static const WCHAR inputW[] = {
'i',
'n',
'p',
'u',
't',0};
383 static const WCHAR lastIndexW[] = {
'l',
'a',
's',
't',
'I',
'n',
'd',
'e',
'x',0};
384 static const WCHAR zeroW[] = {
'0',0};
395 if(
result->parens[
i].index != -1)
447 DWORD last_index = 0;
453 FIXME(
"Not a RegExp\n");
665 WARN(
"regexp_new failed\n");
676 unsigned flags, opt_len = 0;
729 static const WCHAR indexW[] = {
'i',
'n',
'd',
'e',
'x',0};
730 static const WCHAR inputW[] = {
'i',
'n',
'p',
'u',
't',0};
731 static const WCHAR lastIndexW[] = {
'l',
'a',
's',
't',
'I',
'n',
'd',
'e',
'x',0};
735 unsigned match_cnt,
i;
793 for(
i=0;
i < match_cnt;
i++) {
954 case DISPATCH_CONSTRUCT: {
1009 static const WCHAR RegExpW[] = {
'R',
'e',
'g',
'E',
'x',
'p',0};
1042 WARN(
"wrong flag %c\n", *
p);
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
static void * heap_realloc(void *mem, size_t len)
HRESULT create_array(script_ctx_t *ctx, DWORD length, jsdisp_t **ret)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
HRESULT throw_type_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str)
HRESULT throw_regexp_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str)
HRESULT create_builtin_constructor(script_ctx_t *ctx, builtin_invoke_t value_proc, const WCHAR *name, const builtin_info_t *builtin_info, DWORD flags, jsdisp_t *prototype, jsdisp_t **ret)
void clear_ei(script_ctx_t *ctx)
GLdouble GLdouble GLdouble r
GLboolean GLboolean GLboolean b
GLuint GLsizei GLsizei * length
GLenum GLenum GLenum input
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
static const WCHAR inputW[]
_Check_return_ _CRTIMP double __cdecl floor(_In_ double x)
HRESULT jsdisp_propput_name(jsdisp_t *obj, const WCHAR *name, jsval_t val)
HRESULT init_dispex_from_constr(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *constr)
jsdisp_t * iface_to_jsdisp(IDispatch *iface)
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
HRESULT jsdisp_propput_idx(jsdisp_t *obj, DWORD idx, jsval_t val)
HRESULT builtin_set_const(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t value)
static const WCHAR RegExpW[]
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)
void regexp_destroy(regexp_t *re)
static match_state_t * alloc_match_state(regexp_t *regexp, heap_pool_t *pool, const WCHAR *pos)
static BOOL is_vclass(vdisp_t *vdisp, jsclass_t class)
#define DEFAULT_FUNCTION_VALUE
void heap_pool_clear(heap_pool_t *) DECLSPEC_HIDDEN
heap_pool_t * heap_pool_mark(heap_pool_t *) DECLSPEC_HIDDEN
static void jsdisp_release(jsdisp_t *jsdisp)
#define REM_NO_CTX_UPDATE
HRESULT to_number(script_ctx_t *, jsval_t, double *) DECLSPEC_HIDDEN
#define JS_E_FUNCTION_EXPECTED
static BOOL is_int32(double d)
static IDispatch * to_disp(jsdisp_t *jsdisp)
#define JS_E_REGEXP_SYNTAX
const char * debugstr_jsval(const jsval_t) DECLSPEC_HIDDEN
HRESULT to_flat_string(script_ctx_t *, jsval_t, jsstr_t **, const WCHAR **) DECLSPEC_HIDDEN
static BOOL is_class(jsdisp_t *jsdisp, jsclass_t class)
static const WCHAR idx8W[]
static HRESULT regexp_match(script_ctx_t *ctx, jsdisp_t *dispex, jsstr_t *jsstr, BOOL gflag, match_result_t **match_result, DWORD *result_cnt)
static const WCHAR leftContextW[]
static HRESULT RegExp_test(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const builtin_info_t RegExpInst_info
static const WCHAR lastIndexW[]
static const WCHAR idx1W[]
static const WCHAR idx9W[]
static HRESULT alloc_regexp(script_ctx_t *ctx, jsdisp_t *object_prototype, RegExpInstance **ret)
static HRESULT RegExpConstr_get_idx1(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static HRESULT RegExpConstr_get_idx4(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static const WCHAR idx6W[]
static HRESULT RegExp_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const builtin_prop_t RegExpConstr_props[]
HRESULT create_regexp_var(script_ctx_t *ctx, jsval_t src_arg, jsval_t *flags_arg, jsdisp_t **ret)
HRESULT regexp_string_match(script_ctx_t *ctx, jsdisp_t *re, jsstr_t *jsstr, jsval_t *r)
static HRESULT RegExpConstr_get_idx2(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static const WCHAR rightContextW[]
static const WCHAR testW[]
static HRESULT RegExpConstr_get_leftContext(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static HRESULT RegExpConstr_get_idx8(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static RegExpInstance * regexp_from_vdisp(vdisp_t *vdisp)
static HRESULT global_idx(script_ctx_t *ctx, DWORD idx, jsval_t *r)
static const WCHAR multilineW[]
static const WCHAR idx3W[]
static const WCHAR sourceW[]
static HRESULT do_regexp_match_next(script_ctx_t *ctx, RegExpInstance *regexp, DWORD rem_flags, jsstr_t *jsstr, const WCHAR *str, match_state_t *ret)
static HRESULT RegExp_get_global(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static RegExpInstance * regexp_from_jsdisp(jsdisp_t *jsdisp)
HRESULT create_regexp_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdisp_t **ret)
static const builtin_prop_t RegExp_props[]
static const WCHAR ignoreCaseW[]
static HRESULT RegExpConstr_get_idx6(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static HRESULT create_match_array(script_ctx_t *ctx, jsstr_t *input_str, const match_state_t *result, IDispatch **ret)
static const WCHAR idx7W[]
static const builtin_info_t RegExpConstr_info
static const WCHAR globalW[]
static HRESULT RegExp_exec(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT RegExpConstr_get_rightContext(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static HRESULT RegExpConstr_get_idx9(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static HRESULT RegExpConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
HRESULT regexp_match_next(script_ctx_t *ctx, jsdisp_t *dispex, DWORD rem_flags, jsstr_t *jsstr, match_state_t **ret)
static HRESULT RegExp_set_lastIndex(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t value)
static const WCHAR toStringW[]
static const WCHAR idx4W[]
HRESULT create_regexp(script_ctx_t *ctx, jsstr_t *src, DWORD flags, jsdisp_t **ret)
static HRESULT RegExpConstr_get_idx5(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static INT index_from_val(script_ctx_t *ctx, jsval_t v)
static HRESULT RegExp_toString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR idx5W[]
static const WCHAR idx2W[]
static HRESULT RegExp_get_source(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static HRESULT run_exec(script_ctx_t *ctx, vdisp_t *jsthis, jsval_t arg, jsstr_t **input, match_state_t **result, BOOL *ret)
static void set_last_index(RegExpInstance *This, DWORD last_index)
static HRESULT RegExpConstr_get_idx7(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static HRESULT RegExp_get_lastIndex(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static HRESULT RegExp_get_multiline(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static void RegExp_destructor(jsdisp_t *dispex)
static const WCHAR execW[]
static const builtin_info_t RegExp_info
static HRESULT RegExp_get_ignoreCase(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static const builtin_prop_t RegExpInst_props[]
static HRESULT RegExpConstr_get_idx3(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
HRESULT parse_regexp_flags(const WCHAR *str, DWORD str_len, DWORD *ret)
jsstr_t * jsstr_alloc_len(const WCHAR *buf, unsigned len)
jsstr_t * jsstr_undefined(void)
jsstr_t * jsstr_empty(void)
jsstr_t * jsstr_alloc_buf(unsigned len, WCHAR **buf)
static jsstr_t * jsstr_substr(jsstr_t *str, unsigned off, unsigned len)
static jsstr_t * jsstr_addref(jsstr_t *str)
static const WCHAR * jsstr_flatten(jsstr_t *str)
static void jsstr_release(jsstr_t *str)
static unsigned jsstr_length(jsstr_t *str)
static unsigned jsstr_flush(jsstr_t *str, WCHAR *buf)
HRESULT jsval_copy(jsval_t v, jsval_t *r)
void jsval_release(jsval_t val)
static jsval_t jsval_null(void)
static jsval_t jsval_string(jsstr_t *str)
static jsval_t jsval_obj(jsdisp_t *obj)
static jsval_t jsval_bool(BOOL b)
static jsstr_t * get_string(jsval_t v)
static BOOL is_undefined(jsval_t v)
static jsval_t jsval_disp(IDispatch *obj)
static IDispatch * get_object(jsval_t v)
static BOOL is_object_instance(jsval_t v)
static jsval_t jsval_number(double n)
static BOOL is_string(parse_buffer *buf)
#define CONTAINING_RECORD(address, type, field)