https://git.reactos.org/?p=reactos.git;a=commitdiff;h=660f7b9090794ff98d5b5…
commit 660f7b9090794ff98d5b5f60d8ab12eff540b51f
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sat Jan 26 13:11:40 2019 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Sat Jan 26 13:11:40 2019 +0100
[JSCRIPT] Sync with Wine Staging 4.0. CORE-15682
---
dll/win32/jscript/array.c | 53 +-
dll/win32/jscript/bool.c | 2 +-
dll/win32/jscript/compile.c | 19 +-
dll/win32/jscript/date.c | 26 +-
dll/win32/jscript/decode.c | 10 +-
dll/win32/jscript/dispex.c | 2 +-
dll/win32/jscript/engine.c | 55 +-
dll/win32/jscript/engine.h | 10 +-
dll/win32/jscript/error.c | 6 +-
dll/win32/jscript/function.c | 14 +-
dll/win32/jscript/global.c | 2 +-
dll/win32/jscript/jscript.c | 2 +
dll/win32/jscript/jscript.h | 7 +-
dll/win32/jscript/json.c | 4 +-
dll/win32/jscript/jsregexp.c | 10 +-
dll/win32/jscript/jsutils.c | 14 +-
dll/win32/jscript/lang/jscript_Da.rc | 4 +
dll/win32/jscript/lang/jscript_De.rc | 4 +
dll/win32/jscript/lang/jscript_En.rc | 4 +
dll/win32/jscript/lang/jscript_Es.rc | 4 +
dll/win32/jscript/lang/jscript_Fr.rc | 4 +
dll/win32/jscript/lang/jscript_He.rc | 4 +
dll/win32/jscript/lang/jscript_Hu.rc | 4 +
dll/win32/jscript/lang/jscript_It.rc | 4 +
dll/win32/jscript/lang/jscript_Ja.rc | 4 +
dll/win32/jscript/lang/jscript_Ko.rc | 4 +
dll/win32/jscript/lang/jscript_Lt.rc | 4 +
dll/win32/jscript/lang/jscript_Nl.rc | 4 +
dll/win32/jscript/lang/jscript_No.rc | 4 +
dll/win32/jscript/lang/jscript_Pl.rc | 4 +
dll/win32/jscript/lang/jscript_Pt.rc | 8 +
dll/win32/jscript/lang/jscript_Ro.rc | 4 +
dll/win32/jscript/lang/jscript_Ru.rc | 4 +
dll/win32/jscript/lang/jscript_Si.rc | 4 +
dll/win32/jscript/lang/jscript_Sq.rc | 4 +
dll/win32/jscript/lang/jscript_Tr.rc | 4 +
dll/win32/jscript/lang/jscript_Uk.rc | 4 +
dll/win32/jscript/lang/jscript_Zh.rc | 8 +
dll/win32/jscript/lex.c | 25 +-
dll/win32/jscript/math.c | 4 +-
dll/win32/jscript/number.c | 2 +-
dll/win32/jscript/object.c | 24 +-
dll/win32/jscript/parser.h | 9 +-
dll/win32/jscript/parser.tab.c | 2206 ++++++++++++++++++----------------
dll/win32/jscript/parser.tab.h | 73 +-
dll/win32/jscript/parser.y | 66 +-
dll/win32/jscript/rsrc.rc | 2 +-
dll/win32/jscript/string.c | 33 +-
dll/win32/jscript/vbarray.c | 2 +-
media/doc/README.WINE | 2 +-
50 files changed, 1550 insertions(+), 1230 deletions(-)
diff --git a/dll/win32/jscript/array.c b/dll/win32/jscript/array.c
index fcccdd61f3..2dbb593bd6 100644
--- a/dll/win32/jscript/array.c
+++ b/dll/win32/jscript/array.c
@@ -36,6 +36,7 @@ typedef struct {
static const WCHAR lengthW[] =
{'l','e','n','g','t','h',0};
static const WCHAR concatW[] =
{'c','o','n','c','a','t',0};
+static const WCHAR forEachW[] =
{'f','o','r','E','a','c','h',0};
static const WCHAR joinW[] = {'j','o','i','n',0};
static const WCHAR popW[] = {'p','o','p',0};
static const WCHAR pushW[] = {'p','u','s','h',0};
@@ -950,6 +951,47 @@ static HRESULT Array_toLocaleString(script_ctx_t *ctx, vdisp_t
*vthis, WORD flag
return E_NOTIMPL;
}
+static HRESULT Array_forEach(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, unsigned
argc, jsval_t *argv,
+ jsval_t *r)
+{
+ jsval_t value, args[3], res;
+ jsdisp_t *jsthis;
+ unsigned length, i;
+ HRESULT hres;
+
+ TRACE("\n");
+
+ /* FIXME: Check IsCallable */
+ if(argc != 1 || !is_object_instance(argv[0])) {
+ FIXME("Unsupported arguments\n");
+ return E_NOTIMPL;
+ }
+
+ hres = get_length(ctx, vthis, &jsthis, &length);
+ if(FAILED(hres))
+ return hres;
+
+ for(i = 0; i < length; i++) {
+ hres = jsdisp_get_idx(jsthis, i, &value);
+ if(hres == DISP_E_UNKNOWNNAME)
+ continue;
+ if(FAILED(hres))
+ return hres;
+
+ args[0] = value;
+ args[1] = jsval_number(i);
+ args[2] = jsval_obj(jsthis);
+ hres = disp_call_value(ctx, get_object(argv[0]), NULL, DISPATCH_METHOD,
ARRAY_SIZE(args), args, &res);
+ jsval_release(value);
+ if(FAILED(hres))
+ return hres;
+ jsval_release(res);
+ }
+
+ if(r) *r = jsval_undefined();
+ return S_OK;
+}
+
static HRESULT Array_indexOf(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, unsigned
argc, jsval_t *argv,
jsval_t *r)
{
@@ -1023,7 +1065,7 @@ static HRESULT Array_unshift(script_ctx_t *ctx, vdisp_t *vthis, WORD
flags, unsi
return hres;
if(argc) {
- buf_end = buf + sizeof(buf)/sizeof(WCHAR)-1;
+ buf_end = buf + ARRAY_SIZE(buf)-1;
*buf_end-- = 0;
i = length;
@@ -1103,7 +1145,8 @@ static void Array_on_put(jsdisp_t *dispex, const WCHAR *name)
static const builtin_prop_t Array_props[] = {
{concatW, Array_concat, PROPF_METHOD|1},
- {indexOfW, Array_indexOf, PROPF_ES5|PROPF_METHOD|1},
+ {forEachW, Array_forEach, PROPF_METHOD|PROPF_ES5|1},
+ {indexOfW, Array_indexOf, PROPF_METHOD|PROPF_ES5|1},
{joinW, Array_join, PROPF_METHOD|1},
{lengthW, NULL,0, Array_get_length,
Array_set_length},
{popW, Array_pop, PROPF_METHOD},
@@ -1121,7 +1164,7 @@ static const builtin_prop_t Array_props[] = {
static const builtin_info_t Array_info = {
JSCLASS_ARRAY,
{NULL, NULL,0, Array_get_value},
- sizeof(Array_props)/sizeof(*Array_props),
+ ARRAY_SIZE(Array_props),
Array_props,
Array_destructor,
Array_on_put
@@ -1134,7 +1177,7 @@ static const builtin_prop_t ArrayInst_props[] = {
static const builtin_info_t ArrayInst_info = {
JSCLASS_ARRAY,
{NULL, NULL,0, Array_get_value},
- sizeof(ArrayInst_props)/sizeof(*ArrayInst_props),
+ ARRAY_SIZE(ArrayInst_props),
ArrayInst_props,
Array_destructor,
Array_on_put
@@ -1241,7 +1284,7 @@ static const builtin_prop_t ArrayConstr_props[] = {
static const builtin_info_t ArrayConstr_info = {
JSCLASS_FUNCTION,
DEFAULT_FUNCTION_VALUE,
- sizeof(ArrayConstr_props)/sizeof(*ArrayConstr_props),
+ ARRAY_SIZE(ArrayConstr_props),
ArrayConstr_props,
NULL,
NULL
diff --git a/dll/win32/jscript/bool.c b/dll/win32/jscript/bool.c
index 75c98c2403..2d0b9d0c1b 100644
--- a/dll/win32/jscript/bool.c
+++ b/dll/win32/jscript/bool.c
@@ -121,7 +121,7 @@ static const builtin_prop_t Bool_props[] = {
static const builtin_info_t Bool_info = {
JSCLASS_BOOLEAN,
{NULL, Bool_value, 0},
- sizeof(Bool_props)/sizeof(*Bool_props),
+ ARRAY_SIZE(Bool_props),
Bool_props,
NULL,
NULL
diff --git a/dll/win32/jscript/compile.c b/dll/win32/jscript/compile.c
index 6e6be9135f..006386a4e9 100644
--- a/dll/win32/jscript/compile.c
+++ b/dll/win32/jscript/compile.c
@@ -609,7 +609,7 @@ static HRESULT compile_new_expression(compiler_ctx_t *ctx,
call_expression_t *ex
if(FAILED(hres))
return hres;
- return push_instr(ctx, OP_push_ret) ? S_OK : E_OUTOFMEMORY;
+ return push_instr(ctx, OP_push_acc) ? S_OK : E_OUTOFMEMORY;
}
static HRESULT compile_call_expression(compiler_ctx_t *ctx, call_expression_t *expr, BOOL
emit_ret)
@@ -651,7 +651,7 @@ static HRESULT compile_call_expression(compiler_ctx_t *ctx,
call_expression_t *e
if(FAILED(hres))
return hres;
- return !emit_ret || push_instr(ctx, OP_push_ret) ? S_OK : E_OUTOFMEMORY;
+ return !emit_ret || push_instr(ctx, OP_push_acc) ? S_OK : E_OUTOFMEMORY;
}
static HRESULT compile_delete_expression(compiler_ctx_t *ctx, unary_expression_t *expr)
@@ -693,7 +693,7 @@ static HRESULT compile_delete_expression(compiler_ctx_t *ctx,
unary_expression_t
case EXPR_IDENT:
return push_instr_bstr(ctx, OP_delete_ident,
((identifier_expression_t*)expr->expression)->identifier);
default: {
- const WCHAR fixmeW[] =
{'F','I','X','M','E',0};
+ static const WCHAR fixmeW[] =
{'F','I','X','M','E',0};
WARN("invalid delete, unimplemented exception message\n");
@@ -888,8 +888,7 @@ static HRESULT compile_array_literal(compiler_ctx_t *ctx,
array_literal_expressi
static HRESULT compile_object_literal(compiler_ctx_t *ctx, property_value_expression_t
*expr)
{
- prop_val_t *iter;
- unsigned instr;
+ property_definition_t *iter;
BSTR name;
HRESULT hres;
@@ -905,11 +904,9 @@ static HRESULT compile_object_literal(compiler_ctx_t *ctx,
property_value_expres
if(FAILED(hres))
return hres;
- instr = push_instr(ctx, OP_obj_prop);
- if(!instr)
- return E_OUTOFMEMORY;
-
- instr_ptr(ctx, instr)->u.arg->bstr = name;
+ hres = push_instr_bstr_uint(ctx, OP_obj_prop, name, iter->type);
+ if(FAILED(hres))
+ return hres;
}
return S_OK;
@@ -1999,7 +1996,7 @@ static HRESULT visit_expression(compiler_ctx_t *ctx, expression_t
*expr)
hres = visit_expression(ctx, ((member_expression_t*)expr)->expression);
break;
case EXPR_PROPVAL: {
- prop_val_t *iter;
+ property_definition_t *iter;
for(iter = ((property_value_expression_t*)expr)->property_list; iter; iter =
iter->next) {
hres = visit_expression(ctx, iter->value);
if(FAILED(hres))
diff --git a/dll/win32/jscript/date.c b/dll/win32/jscript/date.c
index 28ad23d644..2676cd1cb1 100644
--- a/dll/win32/jscript/date.c
+++ b/dll/win32/jscript/date.c
@@ -523,10 +523,10 @@ static inline HRESULT date_to_string(DOUBLE time, BOOL show_offset,
int offset,
lcid_en = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT);
week[0] = 0;
- GetLocaleInfoW(lcid_en, week_ids[(int)week_day(time)], week,
sizeof(week)/sizeof(*week));
+ GetLocaleInfoW(lcid_en, week_ids[(int)week_day(time)], week, ARRAY_SIZE(week));
month[0] = 0;
- GetLocaleInfoW(lcid_en, month_ids[(int)month_from_time(time)], month,
sizeof(month)/sizeof(*month));
+ GetLocaleInfoW(lcid_en, month_ids[(int)month_from_time(time)], month,
ARRAY_SIZE(month));
year = year_from_time(time);
if(year<0) {
@@ -732,10 +732,10 @@ static inline HRESULT create_utc_string(script_ctx_t *ctx, vdisp_t
*jsthis, jsva
lcid_en = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT);
week[0] = 0;
- GetLocaleInfoW(lcid_en, week_ids[(int)week_day(date->time)], week,
sizeof(week)/sizeof(*week));
+ GetLocaleInfoW(lcid_en, week_ids[(int)week_day(date->time)], week,
ARRAY_SIZE(week));
month[0] = 0;
- GetLocaleInfoW(lcid_en, month_ids[(int)month_from_time(date->time)], month,
sizeof(month)/sizeof(*month));
+ GetLocaleInfoW(lcid_en, month_ids[(int)month_from_time(date->time)], month,
ARRAY_SIZE(month));
year = year_from_time(date->time);
if(year<0) {
@@ -809,10 +809,10 @@ static HRESULT dateobj_to_date_string(DateInstance *date, jsval_t
*r)
lcid_en = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT);
week[0] = 0;
- GetLocaleInfoW(lcid_en, week_ids[(int)week_day(time)], week,
sizeof(week)/sizeof(*week));
+ GetLocaleInfoW(lcid_en, week_ids[(int)week_day(time)], week, ARRAY_SIZE(week));
month[0] = 0;
- GetLocaleInfoW(lcid_en, month_ids[(int)month_from_time(time)], month,
sizeof(month)/sizeof(*month));
+ GetLocaleInfoW(lcid_en, month_ids[(int)month_from_time(time)], month,
ARRAY_SIZE(month));
year = year_from_time(time);
if(year<0) {
@@ -1983,7 +1983,7 @@ static const builtin_prop_t Date_props[] = {
static const builtin_info_t Date_info = {
JSCLASS_DATE,
{NULL, NULL,0, Date_get_value},
- sizeof(Date_props)/sizeof(*Date_props),
+ ARRAY_SIZE(Date_props),
Date_props,
NULL,
NULL
@@ -2037,7 +2037,7 @@ static inline HRESULT date_parse(jsstr_t *input_str, double *ret) {
LOCALE_SMONTHNAME1, LOCALE_SDAYNAME7, LOCALE_SDAYNAME1,
LOCALE_SDAYNAME2, LOCALE_SDAYNAME3, LOCALE_SDAYNAME4,
LOCALE_SDAYNAME5, LOCALE_SDAYNAME6 };
- WCHAR *strings[sizeof(string_ids)/sizeof(DWORD)];
+ WCHAR *strings[ARRAY_SIZE(string_ids)];
WCHAR *parse;
int input_len, parse_len = 0, nest_level = 0, i, size;
int year = 0, month = 0, day = 0, hour = 0, min = 0, sec = 0;
@@ -2088,7 +2088,7 @@ static inline HRESULT date_parse(jsstr_t *input_str, double *ret) {
/* FIXME: Cache strings */
lcid_en = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT);
- for(i=0; i<sizeof(string_ids)/sizeof(DWORD); i++) {
+ for(i=0; i<ARRAY_SIZE(string_ids); i++) {
size = GetLocaleInfoW(lcid_en, string_ids[i], NULL, 0);
strings[i] = heap_alloc((size+1)*sizeof(WCHAR));
if(!strings[i]) {
@@ -2269,7 +2269,7 @@ static inline HRESULT date_parse(jsstr_t *input_str, double *ret) {
for(size=i; parse[size]>='A' &&
parse[size]<='Z'; size++);
size -= i;
- for(j=0; j<sizeof(string_ids)/sizeof(DWORD); j++)
+ for(j=0; j<ARRAY_SIZE(string_ids); j++)
if(!strncmpiW(&parse[i], strings[j], size)) break;
if(j < 12) {
@@ -2277,7 +2277,7 @@ static inline HRESULT date_parse(jsstr_t *input_str, double *ret) {
set_month = TRUE;
month = 11-j;
}
- else if(j == sizeof(string_ids)/sizeof(DWORD)) break;
+ else if(j == ARRAY_SIZE(string_ids)) break;
i += size;
}
@@ -2302,7 +2302,7 @@ static inline HRESULT date_parse(jsstr_t *input_str, double *ret) {
*ret = NAN;
}
- for(i=0; i<sizeof(string_ids)/sizeof(DWORD); i++)
+ for(i=0; i<ARRAY_SIZE(string_ids); i++)
heap_free(strings[i]);
heap_free(parse);
@@ -2522,7 +2522,7 @@ static const builtin_prop_t DateConstr_props[] = {
static const builtin_info_t DateConstr_info = {
JSCLASS_FUNCTION,
DEFAULT_FUNCTION_VALUE,
- sizeof(DateConstr_props)/sizeof(*DateConstr_props),
+ ARRAY_SIZE(DateConstr_props),
DateConstr_props,
NULL,
NULL
diff --git a/dll/win32/jscript/decode.c b/dll/win32/jscript/decode.c
index d402d7c961..ccbd04c05b 100644
--- a/dll/win32/jscript/decode.c
+++ b/dll/win32/jscript/decode.c
@@ -91,7 +91,7 @@ static BOOL decode_dword(const WCHAR *p, DWORD *ret)
DWORD i;
for(i=0; i<6; i++) {
- if(p[i] >= sizeof(digits)/sizeof(*digits) || digits[p[i]] == 0xff)
+ if(p[i] >= ARRAY_SIZE(digits) || digits[p[i]] == 0xff)
return FALSE;
}
if(p[6] != '=' || p[7] != '=')
@@ -117,10 +117,10 @@ HRESULT decode_source(WCHAR *code)
static const WCHAR decode_endW[] =
{'^','#','~','@'};
while(*src) {
- if(!strncmpW(src, decode_beginW, sizeof(decode_beginW)/sizeof(*decode_beginW)))
{
+ if(!strncmpW(src, decode_beginW, ARRAY_SIZE(decode_beginW))) {
DWORD len, i, j=0, csum, s=0;
- src += sizeof(decode_beginW)/sizeof(*decode_beginW);
+ src += ARRAY_SIZE(decode_beginW);
if(!decode_dword(src, &len))
return JS_E_INVALID_CHAR;
@@ -165,9 +165,9 @@ HRESULT decode_source(WCHAR *code)
return JS_E_INVALID_CHAR;
src += 8;
- if(strncmpW(src, decode_endW, sizeof(decode_endW)/sizeof(*decode_endW)))
+ if(strncmpW(src, decode_endW, ARRAY_SIZE(decode_endW)))
return JS_E_INVALID_CHAR;
- src += sizeof(decode_endW)/sizeof(*decode_endW);
+ src += ARRAY_SIZE(decode_endW);
}else {
*dst++ = *src++;
}
diff --git a/dll/win32/jscript/dispex.c b/dll/win32/jscript/dispex.c
index 65ca47a515..bc02aa4d67 100644
--- a/dll/win32/jscript/dispex.c
+++ b/dll/win32/jscript/dispex.c
@@ -1290,7 +1290,7 @@ HRESULT disp_call_value(script_ctx_t *ctx, IDispatch *disp,
IDispatch *jsthis, W
dp.rgdispidNamedArgs = NULL;
}
- if(dp.cArgs > sizeof(buf)/sizeof(*buf)) {
+ if(dp.cArgs > ARRAY_SIZE(buf)) {
dp.rgvarg = heap_alloc(dp.cArgs*sizeof(VARIANT));
if(!dp.rgvarg) {
if(dispex)
diff --git a/dll/win32/jscript/engine.c b/dll/win32/jscript/engine.c
index d41afa5c3b..bed8c64a05 100644
--- a/dll/win32/jscript/engine.c
+++ b/dll/win32/jscript/engine.c
@@ -390,9 +390,10 @@ static inline jsval_t steal_ret(call_frame_t *frame)
return r;
}
-static inline void clear_ret(call_frame_t *frame)
+static inline void clear_acc(script_ctx_t *ctx)
{
- jsval_release(steal_ret(frame));
+ jsval_release(ctx->acc);
+ ctx->acc = jsval_undefined();
}
static HRESULT scope_push(scope_chain_t *scope, jsdisp_t *jsobj, IDispatch *obj,
scope_chain_t **ret)
@@ -1160,7 +1161,6 @@ static HRESULT interp_refval(script_ctx_t *ctx)
static HRESULT interp_new(script_ctx_t *ctx)
{
const unsigned argc = get_op_uint(ctx, 0);
- call_frame_t *frame = ctx->call_ctx;
jsval_t constr;
TRACE("%d\n", argc);
@@ -1176,9 +1176,9 @@ static HRESULT interp_new(script_ctx_t *ctx)
else if(!get_object(constr))
return throw_type_error(ctx, JS_E_INVALID_PROPERTY, NULL);
- clear_ret(frame);
+ clear_acc(ctx);
return disp_call_value(ctx, get_object(constr), NULL, DISPATCH_CONSTRUCT |
DISPATCH_JSCRIPT_CALLEREXECSSOURCE,
- argc, stack_args(ctx, argc), &frame->ret);
+ argc, stack_args(ctx, argc), &ctx->acc);
}
/* ECMA-262 3rd Edition 11.2.3 */
@@ -1186,7 +1186,6 @@ static HRESULT interp_call(script_ctx_t *ctx)
{
const unsigned argn = get_op_uint(ctx, 0);
const int do_ret = get_op_int(ctx, 1);
- call_frame_t *frame = ctx->call_ctx;
jsval_t obj;
TRACE("%d %d\n", argn, do_ret);
@@ -1195,9 +1194,9 @@ static HRESULT interp_call(script_ctx_t *ctx)
if(!is_object_instance(obj))
return throw_type_error(ctx, JS_E_INVALID_PROPERTY, NULL);
- clear_ret(frame);
+ clear_acc(ctx);
return disp_call_value(ctx, get_object(obj), NULL, DISPATCH_METHOD |
DISPATCH_JSCRIPT_CALLEREXECSSOURCE,
- argn, stack_args(ctx, argn), do_ret ? &frame->ret :
NULL);
+ argn, stack_args(ctx, argn), do_ret ? &ctx->acc :
NULL);
}
/* ECMA-262 3rd Edition 11.2.3 */
@@ -1205,7 +1204,6 @@ static HRESULT interp_call_member(script_ctx_t *ctx)
{
const unsigned argn = get_op_uint(ctx, 0);
const int do_ret = get_op_int(ctx, 1);
- call_frame_t *frame = ctx->call_ctx;
exprval_t ref;
TRACE("%d %d\n", argn, do_ret);
@@ -1213,9 +1211,9 @@ static HRESULT interp_call_member(script_ctx_t *ctx)
if(!stack_topn_exprval(ctx, argn, &ref))
return throw_type_error(ctx, ref.u.hres, NULL);
- clear_ret(frame);
+ clear_acc(ctx);
return exprval_call(ctx, &ref, DISPATCH_METHOD |
DISPATCH_JSCRIPT_CALLEREXECSSOURCE,
- argn, stack_args(ctx, argn), do_ret ? &frame->ret : NULL);
+ argn, stack_args(ctx, argn), do_ret ? &ctx->acc : NULL);
}
/* ECMA-262 3rd Edition 11.1.1 */
@@ -1452,6 +1450,7 @@ static HRESULT interp_new_obj(script_ctx_t *ctx)
static HRESULT interp_obj_prop(script_ctx_t *ctx)
{
const BSTR name = get_op_bstr(ctx, 0);
+ unsigned type = get_op_uint(ctx, 1);
jsdisp_t *obj;
jsval_t val;
HRESULT hres;
@@ -1463,7 +1462,28 @@ static HRESULT interp_obj_prop(script_ctx_t *ctx)
assert(is_object_instance(stack_top(ctx)));
obj = as_jsdisp(get_object(stack_top(ctx)));
- hres = jsdisp_propput_name(obj, name, val);
+ if(type == PROPERTY_DEFINITION_VALUE) {
+ hres = jsdisp_propput_name(obj, name, val);
+ }else {
+ property_desc_t desc = {PROPF_ENUMERABLE | PROPF_CONFIGURABLE};
+ jsdisp_t *func;
+
+ assert(is_object_instance(val));
+ func = iface_to_jsdisp(get_object(val));
+
+ desc.mask = desc.flags;
+ if(type == PROPERTY_DEFINITION_GETTER) {
+ desc.explicit_getter = TRUE;
+ desc.getter = func;
+ }else {
+ desc.explicit_setter = TRUE;
+ desc.setter = func;
+ }
+
+ hres = jsdisp_define_property(obj, name, &desc);
+ jsdisp_release(func);
+ }
+
jsval_release(val);
return hres;
}
@@ -2605,16 +2625,15 @@ static HRESULT interp_setret(script_ctx_t *ctx)
return S_OK;
}
-static HRESULT interp_push_ret(script_ctx_t *ctx)
+static HRESULT interp_push_acc(script_ctx_t *ctx)
{
- call_frame_t *frame = ctx->call_ctx;
HRESULT hres;
TRACE("\n");
- hres = stack_push(ctx, frame->ret);
+ hres = stack_push(ctx, ctx->acc);
if(SUCCEEDED(hres))
- frame->ret = jsval_undefined();
+ ctx->acc = jsval_undefined();
return hres;
}
@@ -2801,8 +2820,8 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, jsval_t *r)
assert(frame->scope == frame->base_scope);
if(return_to_interp) {
- clear_ret(frame->prev_frame);
- frame->prev_frame->ret = steal_ret(frame);
+ jsval_release(ctx->acc);
+ ctx->acc = steal_ret(frame);
}else if(r) {
*r = steal_ret(frame);
}
diff --git a/dll/win32/jscript/engine.h b/dll/win32/jscript/engine.h
index 6d40e30905..6ee8f062df 100644
--- a/dll/win32/jscript/engine.h
+++ b/dll/win32/jscript/engine.h
@@ -68,15 +68,15 @@
X(new, 1, ARG_UINT, 0) \
X(new_obj, 1, 0,0) \
X(null, 1, 0,0) \
- X(obj_prop, 1, ARG_BSTR, 0) \
+ X(obj_prop, 1, ARG_BSTR, ARG_UINT) \
X(or, 1, 0,0) \
X(pop, 1, ARG_UINT, 0) \
X(pop_except, 0, ARG_ADDR, 0) \
X(pop_scope, 1, 0,0) \
X(postinc, 1, ARG_INT, 0) \
X(preinc, 1, ARG_INT, 0) \
+ X(push_acc, 1, 0,0) \
X(push_except,1, ARG_ADDR, ARG_UINT) \
- X(push_ret, 1, 0,0) \
X(push_scope, 1, 0,0) \
X(regexp, 1, ARG_STR, ARG_UINT) \
X(rshift, 1, 0,0) \
@@ -131,6 +131,12 @@ typedef struct {
} u;
} instr_t;
+typedef enum {
+ PROPERTY_DEFINITION_VALUE,
+ PROPERTY_DEFINITION_GETTER,
+ PROPERTY_DEFINITION_SETTER
+} property_definition_type_t;
+
typedef struct {
BSTR name;
int ref;
diff --git a/dll/win32/jscript/error.c b/dll/win32/jscript/error.c
index 8cf52f00eb..ef855dce30 100644
--- a/dll/win32/jscript/error.c
+++ b/dll/win32/jscript/error.c
@@ -144,7 +144,7 @@ static const builtin_prop_t Error_props[] = {
static const builtin_info_t Error_info = {
JSCLASS_ERROR,
{NULL, Error_value, 0},
- sizeof(Error_props)/sizeof(*Error_props),
+ ARRAY_SIZE(Error_props),
Error_props,
NULL,
NULL
@@ -348,7 +348,7 @@ HRESULT init_error_constr(script_ctx_t *ctx, jsdisp_t
*object_prototype)
jsstr_t *str;
HRESULT hres;
- for(i=0; i < sizeof(names)/sizeof(names[0]); i++) {
+ for(i=0; i < ARRAY_SIZE(names); i++) {
hres = alloc_error(ctx, i==0 ? object_prototype : NULL, NULL, &err);
if(FAILED(hres))
return hres;
@@ -385,7 +385,7 @@ static HRESULT throw_error(script_ctx_t *ctx, HRESULT error, const
WCHAR *str, j
return error;
buf[0] = '\0';
- LoadStringW(jscript_hinstance, HRESULT_CODE(error), buf,
sizeof(buf)/sizeof(WCHAR));
+ LoadStringW(jscript_hinstance, HRESULT_CODE(error), buf, ARRAY_SIZE(buf));
if(str) pos = strchrW(buf, '|');
if(pos) {
diff --git a/dll/win32/jscript/function.c b/dll/win32/jscript/function.c
index 0aae300d01..9795f77e90 100644
--- a/dll/win32/jscript/function.c
+++ b/dll/win32/jscript/function.c
@@ -304,12 +304,12 @@ static HRESULT function_to_string(FunctionInstance *function,
jsstr_t **ret)
WCHAR *ptr;
name_len = strlenW(function->name);
- str =
jsstr_alloc_buf((sizeof(native_prefixW)+sizeof(native_suffixW))/sizeof(WCHAR) + name_len,
&ptr);
+ str = jsstr_alloc_buf(ARRAY_SIZE(native_prefixW) + ARRAY_SIZE(native_suffixW) +
name_len, &ptr);
if(!str)
return E_OUTOFMEMORY;
memcpy(ptr, native_prefixW, sizeof(native_prefixW));
- memcpy(ptr += sizeof(native_prefixW)/sizeof(WCHAR), function->name,
name_len*sizeof(WCHAR));
+ memcpy(ptr += ARRAY_SIZE(native_prefixW), function->name,
name_len*sizeof(WCHAR));
memcpy(ptr + name_len, native_suffixW, sizeof(native_suffixW));
}else {
str = jsstr_alloc_len(function->func_code->source,
function->func_code->source_len);
@@ -593,7 +593,7 @@ static const builtin_prop_t Function_props[] = {
static const builtin_info_t Function_info = {
JSCLASS_FUNCTION,
DEFAULT_FUNCTION_VALUE,
- sizeof(Function_props)/sizeof(*Function_props),
+ ARRAY_SIZE(Function_props),
Function_props,
Function_destructor,
NULL
@@ -607,7 +607,7 @@ static const builtin_prop_t FunctionInst_props[] = {
static const builtin_info_t FunctionInst_info = {
JSCLASS_FUNCTION,
DEFAULT_FUNCTION_VALUE,
- sizeof(FunctionInst_props)/sizeof(*FunctionInst_props),
+ ARRAY_SIZE(FunctionInst_props),
FunctionInst_props,
Function_destructor,
NULL
@@ -764,11 +764,11 @@ static HRESULT construct_function(script_ctx_t *ctx, unsigned argc,
jsval_t *arg
}
if(SUCCEEDED(hres)) {
- len += (sizeof(function_anonymousW) + sizeof(function_beginW) +
sizeof(function_endW)) / sizeof(WCHAR);
+ len += ARRAY_SIZE(function_anonymousW) + ARRAY_SIZE(function_beginW) +
ARRAY_SIZE(function_endW);
str = heap_alloc(len*sizeof(WCHAR));
if(str) {
memcpy(str, function_anonymousW, sizeof(function_anonymousW));
- ptr = str + sizeof(function_anonymousW)/sizeof(WCHAR);
+ ptr = str + ARRAY_SIZE(function_anonymousW);
if(argc > 1) {
while(1) {
ptr += jsstr_flush(params[j], ptr);
@@ -779,7 +779,7 @@ static HRESULT construct_function(script_ctx_t *ctx, unsigned argc,
jsval_t *arg
}
}
memcpy(ptr, function_beginW, sizeof(function_beginW));
- ptr += sizeof(function_beginW)/sizeof(WCHAR);
+ ptr += ARRAY_SIZE(function_beginW);
if(argc)
ptr += jsstr_flush(params[argc-1], ptr);
memcpy(ptr, function_endW, sizeof(function_endW));
diff --git a/dll/win32/jscript/global.c b/dll/win32/jscript/global.c
index cc2c3c1ef4..33de641483 100644
--- a/dll/win32/jscript/global.c
+++ b/dll/win32/jscript/global.c
@@ -964,7 +964,7 @@ static const builtin_prop_t JSGlobal_props[] = {
static const builtin_info_t JSGlobal_info = {
JSCLASS_GLOBAL,
{NULL, NULL, 0},
- sizeof(JSGlobal_props)/sizeof(*JSGlobal_props),
+ ARRAY_SIZE(JSGlobal_props),
JSGlobal_props,
NULL,
NULL
diff --git a/dll/win32/jscript/jscript.c b/dll/win32/jscript/jscript.c
index 15d81d2c53..75eef39e35 100644
--- a/dll/win32/jscript/jscript.c
+++ b/dll/win32/jscript/jscript.c
@@ -69,6 +69,7 @@ void script_release(script_ctx_t *ctx)
if(--ctx->ref)
return;
+ jsval_release(ctx->acc);
clear_ei(ctx);
if(ctx->cc)
release_cc(ctx->cc);
@@ -715,6 +716,7 @@ static HRESULT WINAPI JScriptParse_InitNew(IActiveScriptParse *iface)
ctx->version = This->version;
ctx->html_mode = This->html_mode;
ctx->ei.val = jsval_undefined();
+ ctx->acc = jsval_undefined();
heap_pool_init(&ctx->tmp_heap);
hres = create_jscaller(ctx);
diff --git a/dll/win32/jscript/jscript.h b/dll/win32/jscript/jscript.h
index 7b5cf90e0e..475ca4ad5a 100644
--- a/dll/win32/jscript/jscript.h
+++ b/dll/win32/jscript/jscript.h
@@ -92,10 +92,12 @@ extern HINSTANCE jscript_hinstance DECLSPEC_HIDDEN;
#define PROPF_ARGMASK 0x00ff
#define PROPF_METHOD 0x0100
-#define PROPF_ENUMERABLE 0x0200
-#define PROPF_CONSTR 0x0400
+#define PROPF_CONSTR 0x0200
+
+#define PROPF_ENUMERABLE 0x0400
#define PROPF_WRITABLE 0x0800
#define PROPF_CONFIGURABLE 0x1000
+#define PROPF_ALL (PROPF_ENUMERABLE | PROPF_WRITABLE | PROPF_CONFIGURABLE)
#define PROPF_VERSION_MASK 0x01ff0000
#define PROPF_VERSION_SHIFT 16
@@ -424,6 +426,7 @@ struct _script_ctx_t {
jsval_t *stack;
unsigned stack_size;
unsigned stack_top;
+ jsval_t acc;
jsstr_t *last_match;
match_result_t match_parens[9];
diff --git a/dll/win32/jscript/json.c b/dll/win32/jscript/json.c
index 0430d415ba..d440543690 100644
--- a/dll/win32/jscript/json.c
+++ b/dll/win32/jscript/json.c
@@ -487,7 +487,7 @@ static HRESULT json_quote(stringify_ctx_t *ctx, const WCHAR *ptr,
size_t len)
break;
default:
if(*ptr < ' ') {
- const WCHAR formatW[] =
{'\\','u','%','0','4','x',0};
+ static const WCHAR formatW[] =
{'\\','u','%','0','4','x',0};
WCHAR buf[7];
sprintfW(buf, formatW, *ptr);
if(!append_string(ctx, buf))
@@ -836,7 +836,7 @@ static const builtin_prop_t JSON_props[] = {
static const builtin_info_t JSON_info = {
JSCLASS_JSON,
{NULL, NULL, 0},
- sizeof(JSON_props)/sizeof(*JSON_props),
+ ARRAY_SIZE(JSON_props),
JSON_props,
NULL,
NULL
diff --git a/dll/win32/jscript/jsregexp.c b/dll/win32/jscript/jsregexp.c
index 821c0164eb..84360694ee 100644
--- a/dll/win32/jscript/jsregexp.c
+++ b/dll/win32/jscript/jsregexp.c
@@ -96,7 +96,7 @@ static HRESULT do_regexp_match_next(script_ctx_t *ctx, RegExpInstance
*regexp,
}
if(!(rem_flags & REM_NO_CTX_UPDATE)) {
- DWORD i, n = min(sizeof(ctx->match_parens)/sizeof(ctx->match_parens[0]),
ret->paren_count);
+ DWORD i, n = min(ARRAY_SIZE(ctx->match_parens), ret->paren_count);
for(i=0; i < n; i++) {
if(ret->parens[i].index == -1) {
@@ -108,7 +108,7 @@ static HRESULT do_regexp_match_next(script_ctx_t *ctx, RegExpInstance
*regexp,
}
}
- if(n < sizeof(ctx->match_parens)/sizeof(ctx->match_parens[0]))
+ if(n < ARRAY_SIZE(ctx->match_parens))
memset(ctx->match_parens+n, 0, sizeof(ctx->match_parens) -
n*sizeof(ctx->match_parens[0]));
}
@@ -595,7 +595,7 @@ static const builtin_prop_t RegExp_props[] = {
static const builtin_info_t RegExp_info = {
JSCLASS_REGEXP,
{NULL, RegExp_value, 0},
- sizeof(RegExp_props)/sizeof(*RegExp_props),
+ ARRAY_SIZE(RegExp_props),
RegExp_props,
RegExp_destructor,
NULL
@@ -612,7 +612,7 @@ static const builtin_prop_t RegExpInst_props[] = {
static const builtin_info_t RegExpInst_info = {
JSCLASS_REGEXP,
{NULL, RegExp_value, 0},
- sizeof(RegExpInst_props)/sizeof(*RegExpInst_props),
+ ARRAY_SIZE(RegExpInst_props),
RegExpInst_props,
RegExp_destructor,
NULL
@@ -995,7 +995,7 @@ static const builtin_prop_t RegExpConstr_props[] = {
static const builtin_info_t RegExpConstr_info = {
JSCLASS_FUNCTION,
DEFAULT_FUNCTION_VALUE,
- sizeof(RegExpConstr_props)/sizeof(*RegExpConstr_props),
+ ARRAY_SIZE(RegExpConstr_props),
RegExpConstr_props,
NULL,
NULL
diff --git a/dll/win32/jscript/jsutils.c b/dll/win32/jscript/jsutils.c
index 5045072603..b653e525d8 100644
--- a/dll/win32/jscript/jsutils.c
+++ b/dll/win32/jscript/jsutils.c
@@ -526,8 +526,8 @@ static HRESULT str_to_number(jsstr_t *str, double *ret)
ptr++;
}
- if(!strncmpW(ptr, infinityW, sizeof(infinityW)/sizeof(WCHAR))) {
- ptr += sizeof(infinityW)/sizeof(WCHAR);
+ if(!strncmpW(ptr, infinityW, ARRAY_SIZE(infinityW))) {
+ ptr += ARRAY_SIZE(infinityW);
while(*ptr && isspaceW(*ptr))
ptr++;
@@ -701,7 +701,7 @@ static jsstr_t *int_to_string(int i)
i = -i;
}
- p = buf + sizeof(buf)/sizeof(*buf)-1;
+ p = buf + ARRAY_SIZE(buf)-1;
*p-- = 0;
while(i) {
*p-- = i%10 + '0';
@@ -718,7 +718,7 @@ static jsstr_t *int_to_string(int i)
HRESULT double_to_string(double n, jsstr_t **str)
{
- const WCHAR InfinityW[] =
{'-','I','n','f','i','n','i','t','y',0};
+ static const WCHAR InfinityW[] =
{'-','I','n','f','i','n','i','t','y',0};
if(isnan(n)) {
*str = jsstr_nan();
@@ -748,9 +748,9 @@ HRESULT double_to_string(double n, jsstr_t **str)
/* ECMA-262 3rd Edition 9.8 */
HRESULT to_string(script_ctx_t *ctx, jsval_t val, jsstr_t **str)
{
- const WCHAR nullW[] = {'n','u','l','l',0};
- const WCHAR trueW[] = {'t','r','u','e',0};
- const WCHAR falseW[] =
{'f','a','l','s','e',0};
+ static const WCHAR nullW[] = {'n','u','l','l',0};
+ static const WCHAR trueW[] = {'t','r','u','e',0};
+ static const WCHAR falseW[] =
{'f','a','l','s','e',0};
switch(jsval_type(val)) {
case JSV_UNDEFINED:
diff --git a/dll/win32/jscript/lang/jscript_Da.rc b/dll/win32/jscript/lang/jscript_Da.rc
index 966c28afcf..6f043fb960 100644
--- a/dll/win32/jscript/lang/jscript_Da.rc
+++ b/dll/win32/jscript/lang/jscript_Da.rc
@@ -64,4 +64,8 @@ STRINGTABLE
IDS_PRECISION_OUT_OF_RANGE "Precision is out of range"
IDS_INVALID_LENGTH "Array længde skal være et endeligt positivt
heltal"
IDS_ARRAY_EXPECTED "Array objekt forventet"
+ IDS_INVALID_WRITABLE_PROP_DESC "'writable' attribute on the property
descriptor cannot be set to 'true' on this object"
+ IDS_NONCONFIGURABLE_REDEFINED "Cannot redefine non-configurable property
'|'"
+ IDS_NONWRITABLE_MODIFIED "Cannot modify non-writable property
'|'"
+ IDS_PROP_DESC_MISMATCH "Property cannot have both accessors and a
value"
}
diff --git a/dll/win32/jscript/lang/jscript_De.rc b/dll/win32/jscript/lang/jscript_De.rc
index 013437ae0d..88751d4a8c 100644
--- a/dll/win32/jscript/lang/jscript_De.rc
+++ b/dll/win32/jscript/lang/jscript_De.rc
@@ -63,4 +63,8 @@ STRINGTABLE
IDS_PRECISION_OUT_OF_RANGE "Precision is out of range"
IDS_INVALID_LENGTH "Größe des Array muss eine endliche, positive Ganzzahl
sein"
IDS_ARRAY_EXPECTED "Array-Objekt erwartet"
+ IDS_INVALID_WRITABLE_PROP_DESC "'writable' attribute on the property
descriptor cannot be set to 'true' on this object"
+ IDS_NONCONFIGURABLE_REDEFINED "Cannot redefine non-configurable property
'|'"
+ IDS_NONWRITABLE_MODIFIED "Cannot modify non-writable property
'|'"
+ IDS_PROP_DESC_MISMATCH "Property cannot have both accessors and a
value"
}
diff --git a/dll/win32/jscript/lang/jscript_En.rc b/dll/win32/jscript/lang/jscript_En.rc
index 9a2bff8695..0381b43e26 100644
--- a/dll/win32/jscript/lang/jscript_En.rc
+++ b/dll/win32/jscript/lang/jscript_En.rc
@@ -61,4 +61,8 @@ STRINGTABLE
IDS_PRECISION_OUT_OF_RANGE "Precision is out of range"
IDS_INVALID_LENGTH "Array length must be a finite positive integer"
IDS_ARRAY_EXPECTED "Array object expected"
+ IDS_INVALID_WRITABLE_PROP_DESC "'writable' attribute on the property
descriptor cannot be set to 'true' on this object"
+ IDS_NONCONFIGURABLE_REDEFINED "Cannot redefine non-configurable property
'|'"
+ IDS_NONWRITABLE_MODIFIED "Cannot modify non-writable property
'|'"
+ IDS_PROP_DESC_MISMATCH "Property cannot have both accessors and a
value"
}
diff --git a/dll/win32/jscript/lang/jscript_Es.rc b/dll/win32/jscript/lang/jscript_Es.rc
index 2fe3ac4ef1..5ab0de9685 100644
--- a/dll/win32/jscript/lang/jscript_Es.rc
+++ b/dll/win32/jscript/lang/jscript_Es.rc
@@ -64,4 +64,8 @@ STRINGTABLE
IDS_PRECISION_OUT_OF_RANGE "Precision is out of range"
IDS_INVALID_LENGTH "La longitud del arreglo debe ser un entero positivo
finito"
IDS_ARRAY_EXPECTED "Objeto Arreglo esperado"
+ IDS_INVALID_WRITABLE_PROP_DESC "'writable' attribute on the property
descriptor cannot be set to 'true' on this object"
+ IDS_NONCONFIGURABLE_REDEFINED "Cannot redefine non-configurable property
'|'"
+ IDS_NONWRITABLE_MODIFIED "Cannot modify non-writable property
'|'"
+ IDS_PROP_DESC_MISMATCH "Property cannot have both accessors and a
value"
}
diff --git a/dll/win32/jscript/lang/jscript_Fr.rc b/dll/win32/jscript/lang/jscript_Fr.rc
index edbf23b5b3..cf250f3ea5 100644
--- a/dll/win32/jscript/lang/jscript_Fr.rc
+++ b/dll/win32/jscript/lang/jscript_Fr.rc
@@ -66,4 +66,8 @@ STRINGTABLE
IDS_PRECISION_OUT_OF_RANGE "Precision is out of range"
IDS_INVALID_LENGTH "La longueur d'un tableau doit être un entier
positif"
IDS_ARRAY_EXPECTED "Objet tableau attendu"
+ IDS_INVALID_WRITABLE_PROP_DESC "'writable' attribute on the property
descriptor cannot be set to 'true' on this object"
+ IDS_NONCONFIGURABLE_REDEFINED "Cannot redefine non-configurable property
'|'"
+ IDS_NONWRITABLE_MODIFIED "Cannot modify non-writable property
'|'"
+ IDS_PROP_DESC_MISMATCH "Property cannot have both accessors and a
value"
}
diff --git a/dll/win32/jscript/lang/jscript_He.rc b/dll/win32/jscript/lang/jscript_He.rc
index 52331c9b6a..b65b04c7ad 100644
--- a/dll/win32/jscript/lang/jscript_He.rc
+++ b/dll/win32/jscript/lang/jscript_He.rc
@@ -63,4 +63,8 @@ STRINGTABLE
IDS_PRECISION_OUT_OF_RANGE "Precision is out of range"
IDS_INVALID_LENGTH "Array length must be a finite positive integer"
IDS_ARRAY_EXPECTED "אובייקט מערך היה צפוי"
+ IDS_INVALID_WRITABLE_PROP_DESC "'writable' attribute on the property
descriptor cannot be set to 'true' on this object"
+ IDS_NONCONFIGURABLE_REDEFINED "Cannot redefine non-configurable property
'|'"
+ IDS_NONWRITABLE_MODIFIED "Cannot modify non-writable property
'|'"
+ IDS_PROP_DESC_MISMATCH "Property cannot have both accessors and a
value"
}
diff --git a/dll/win32/jscript/lang/jscript_Hu.rc b/dll/win32/jscript/lang/jscript_Hu.rc
index 34232eb20b..3c2061a288 100644
--- a/dll/win32/jscript/lang/jscript_Hu.rc
+++ b/dll/win32/jscript/lang/jscript_Hu.rc
@@ -64,4 +64,8 @@ STRINGTABLE
IDS_PRECISION_OUT_OF_RANGE "Precision is out of range"
IDS_INVALID_LENGTH "A tömb hosszának egy véges pozitív egész számnak kell
lennie"
IDS_ARRAY_EXPECTED "Tömb objektumot vártam"
+ IDS_INVALID_WRITABLE_PROP_DESC "'writable' attribute on the property
descriptor cannot be set to 'true' on this object"
+ IDS_NONCONFIGURABLE_REDEFINED "Cannot redefine non-configurable property
'|'"
+ IDS_NONWRITABLE_MODIFIED "Cannot modify non-writable property
'|'"
+ IDS_PROP_DESC_MISMATCH "Property cannot have both accessors and a
value"
}
diff --git a/dll/win32/jscript/lang/jscript_It.rc b/dll/win32/jscript/lang/jscript_It.rc
index 1382333a19..52a11c1ba9 100644
--- a/dll/win32/jscript/lang/jscript_It.rc
+++ b/dll/win32/jscript/lang/jscript_It.rc
@@ -65,4 +65,8 @@ STRINGTABLE
IDS_PRECISION_OUT_OF_RANGE "Precision is out of range"
IDS_INVALID_LENGTH "La lunghezza dell'array deve essere un intero
finito e positivo"
IDS_ARRAY_EXPECTED "Richiesto un oggetto array"
+ IDS_INVALID_WRITABLE_PROP_DESC "'writable' attribute on the property
descriptor cannot be set to 'true' on this object"
+ IDS_NONCONFIGURABLE_REDEFINED "Cannot redefine non-configurable property
'|'"
+ IDS_NONWRITABLE_MODIFIED "Cannot modify non-writable property
'|'"
+ IDS_PROP_DESC_MISMATCH "Property cannot have both accessors and a
value"
}
diff --git a/dll/win32/jscript/lang/jscript_Ja.rc b/dll/win32/jscript/lang/jscript_Ja.rc
index c27a38862f..2e2c48f1c0 100644
--- a/dll/win32/jscript/lang/jscript_Ja.rc
+++ b/dll/win32/jscript/lang/jscript_Ja.rc
@@ -65,4 +65,8 @@ STRINGTABLE
IDS_PRECISION_OUT_OF_RANGE "Precision is out of range"
IDS_INVALID_LENGTH "配列の長さは有限の正整数でなければなりません"
IDS_ARRAY_EXPECTED "配列オブジェクトを期待していました"
+ IDS_INVALID_WRITABLE_PROP_DESC "'writable' attribute on the property
descriptor cannot be set to 'true' on this object"
+ IDS_NONCONFIGURABLE_REDEFINED "Cannot redefine non-configurable property
'|'"
+ IDS_NONWRITABLE_MODIFIED "Cannot modify non-writable property
'|'"
+ IDS_PROP_DESC_MISMATCH "Property cannot have both accessors and a
value"
}
diff --git a/dll/win32/jscript/lang/jscript_Ko.rc b/dll/win32/jscript/lang/jscript_Ko.rc
index 3e16b2b5ff..acd1747afe 100644
--- a/dll/win32/jscript/lang/jscript_Ko.rc
+++ b/dll/win32/jscript/lang/jscript_Ko.rc
@@ -65,4 +65,8 @@ STRINGTABLE
IDS_PRECISION_OUT_OF_RANGE "Precision is out of range"
IDS_INVALID_LENGTH "배열 길이는 반드시 한정된 양의 정수이어야 합니다"
IDS_ARRAY_EXPECTED "배열 객체가 필요합니다"
+ IDS_INVALID_WRITABLE_PROP_DESC "'writable' attribute on the property
descriptor cannot be set to 'true' on this object"
+ IDS_NONCONFIGURABLE_REDEFINED "Cannot redefine non-configurable property
'|'"
+ IDS_NONWRITABLE_MODIFIED "Cannot modify non-writable property
'|'"
+ IDS_PROP_DESC_MISMATCH "Property cannot have both accessors and a
value"
}
diff --git a/dll/win32/jscript/lang/jscript_Lt.rc b/dll/win32/jscript/lang/jscript_Lt.rc
index 8b8ef968dc..8e77fef5df 100644
--- a/dll/win32/jscript/lang/jscript_Lt.rc
+++ b/dll/win32/jscript/lang/jscript_Lt.rc
@@ -64,4 +64,8 @@ STRINGTABLE
IDS_PRECISION_OUT_OF_RANGE "Precision is out of range"
IDS_INVALID_LENGTH "Masyvo dydis turi būti teigiamas sveikasis
skaičius"
IDS_ARRAY_EXPECTED "Tikėtasi masyvo objekto"
+ IDS_INVALID_WRITABLE_PROP_DESC "'writable' attribute on the property
descriptor cannot be set to 'true' on this object"
+ IDS_NONCONFIGURABLE_REDEFINED "Cannot redefine non-configurable property
'|'"
+ IDS_NONWRITABLE_MODIFIED "Cannot modify non-writable property
'|'"
+ IDS_PROP_DESC_MISMATCH "Property cannot have both accessors and a
value"
}
diff --git a/dll/win32/jscript/lang/jscript_Nl.rc b/dll/win32/jscript/lang/jscript_Nl.rc
index cc6d6cde93..164d668d82 100644
--- a/dll/win32/jscript/lang/jscript_Nl.rc
+++ b/dll/win32/jscript/lang/jscript_Nl.rc
@@ -63,4 +63,8 @@ STRINGTABLE
IDS_PRECISION_OUT_OF_RANGE "Precision is out of range"
IDS_INVALID_LENGTH "Array lengte moet een eindig, positief geheel getal
zijn"
IDS_ARRAY_EXPECTED "Array object verwacht"
+ IDS_INVALID_WRITABLE_PROP_DESC "'writable' attribute on the property
descriptor cannot be set to 'true' on this object"
+ IDS_NONCONFIGURABLE_REDEFINED "Cannot redefine non-configurable property
'|'"
+ IDS_NONWRITABLE_MODIFIED "Cannot modify non-writable property
'|'"
+ IDS_PROP_DESC_MISMATCH "Property cannot have both accessors and a
value"
}
diff --git a/dll/win32/jscript/lang/jscript_No.rc b/dll/win32/jscript/lang/jscript_No.rc
index fe4cd2cf97..1273e889d8 100644
--- a/dll/win32/jscript/lang/jscript_No.rc
+++ b/dll/win32/jscript/lang/jscript_No.rc
@@ -63,4 +63,8 @@ STRINGTABLE
IDS_PRECISION_OUT_OF_RANGE "Precision is out of range"
IDS_INVALID_LENGTH "Rekkens lengde må være et endelig, positivt tall"
IDS_ARRAY_EXPECTED "Forventet rekke-objekt"
+ IDS_INVALID_WRITABLE_PROP_DESC "'writable' attribute on the property
descriptor cannot be set to 'true' on this object"
+ IDS_NONCONFIGURABLE_REDEFINED "Cannot redefine non-configurable property
'|'"
+ IDS_NONWRITABLE_MODIFIED "Cannot modify non-writable property
'|'"
+ IDS_PROP_DESC_MISMATCH "Property cannot have both accessors and a
value"
}
diff --git a/dll/win32/jscript/lang/jscript_Pl.rc b/dll/win32/jscript/lang/jscript_Pl.rc
index e98630562e..0b7321a131 100644
--- a/dll/win32/jscript/lang/jscript_Pl.rc
+++ b/dll/win32/jscript/lang/jscript_Pl.rc
@@ -61,4 +61,8 @@ STRINGTABLE
IDS_PRECISION_OUT_OF_RANGE "Precyzja jest poza zakresem"
IDS_INVALID_LENGTH "Długość tablicy musi być skończoną dodatnią liczbą
stałą"
IDS_ARRAY_EXPECTED "Oczekiwany obiekt tablicowy"
+ IDS_INVALID_WRITABLE_PROP_DESC "'writable' attribute on the property
descriptor cannot be set to 'true' on this object"
+ IDS_NONCONFIGURABLE_REDEFINED "Cannot redefine non-configurable property
'|'"
+ IDS_NONWRITABLE_MODIFIED "Cannot modify non-writable property
'|'"
+ IDS_PROP_DESC_MISMATCH "Property cannot have both accessors and a
value"
}
diff --git a/dll/win32/jscript/lang/jscript_Pt.rc b/dll/win32/jscript/lang/jscript_Pt.rc
index b8fac6c356..38293294e2 100644
--- a/dll/win32/jscript/lang/jscript_Pt.rc
+++ b/dll/win32/jscript/lang/jscript_Pt.rc
@@ -64,6 +64,10 @@ STRINGTABLE
IDS_PRECISION_OUT_OF_RANGE "Precision is out of range"
IDS_INVALID_LENGTH "Tamanho do vetor tem que ser um inteiro finito
positivo"
IDS_ARRAY_EXPECTED "Objeto Array esperado"
+ IDS_INVALID_WRITABLE_PROP_DESC "'writable' attribute on the property
descriptor cannot be set to 'true' on this object"
+ IDS_NONCONFIGURABLE_REDEFINED "Cannot redefine non-configurable property
'|'"
+ IDS_NONWRITABLE_MODIFIED "Cannot modify non-writable property
'|'"
+ IDS_PROP_DESC_MISMATCH "Property cannot have both accessors and a
value"
}
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE
@@ -111,4 +115,8 @@ STRINGTABLE
IDS_PRECISION_OUT_OF_RANGE "Precision is out of range"
IDS_INVALID_LENGTH "Tamanho do vector tem de ser um inteiro finito
positivo"
IDS_ARRAY_EXPECTED "Objecto Array esperado"
+ IDS_INVALID_WRITABLE_PROP_DESC "'writable' attribute on the property
descriptor cannot be set to 'true' on this object"
+ IDS_NONCONFIGURABLE_REDEFINED "Cannot redefine non-configurable property
'|'"
+ IDS_NONWRITABLE_MODIFIED "Cannot modify non-writable property
'|'"
+ IDS_PROP_DESC_MISMATCH "Property cannot have both accessors and a
value"
}
diff --git a/dll/win32/jscript/lang/jscript_Ro.rc b/dll/win32/jscript/lang/jscript_Ro.rc
index c699b63cf7..783e62170e 100644
--- a/dll/win32/jscript/lang/jscript_Ro.rc
+++ b/dll/win32/jscript/lang/jscript_Ro.rc
@@ -66,4 +66,8 @@ STRINGTABLE
IDS_PRECISION_OUT_OF_RANGE "Precizia este în afara limitelor admise"
IDS_INVALID_LENGTH "Lungimea unei matrice trebuie să fie un număr întreg
pozitiv"
IDS_ARRAY_EXPECTED "Era așteptat un obiect matrice"
+ IDS_INVALID_WRITABLE_PROP_DESC "'writable' attribute on the property
descriptor cannot be set to 'true' on this object"
+ IDS_NONCONFIGURABLE_REDEFINED "Cannot redefine non-configurable property
'|'"
+ IDS_NONWRITABLE_MODIFIED "Cannot modify non-writable property
'|'"
+ IDS_PROP_DESC_MISMATCH "Property cannot have both accessors and a
value"
}
diff --git a/dll/win32/jscript/lang/jscript_Ru.rc b/dll/win32/jscript/lang/jscript_Ru.rc
index 431d7cf562..c4e9d80f20 100644
--- a/dll/win32/jscript/lang/jscript_Ru.rc
+++ b/dll/win32/jscript/lang/jscript_Ru.rc
@@ -65,4 +65,8 @@ STRINGTABLE
IDS_PRECISION_OUT_OF_RANGE "Точность вне диапазона"
IDS_INVALID_LENGTH "Длиной массива должно быть конечное положительное
число"
IDS_ARRAY_EXPECTED "Предполагается наличие объекта 'Array'"
+ IDS_INVALID_WRITABLE_PROP_DESC "'writable' attribute on the property
descriptor cannot be set to 'true' on this object"
+ IDS_NONCONFIGURABLE_REDEFINED "Cannot redefine non-configurable property
'|'"
+ IDS_NONWRITABLE_MODIFIED "Cannot modify non-writable property
'|'"
+ IDS_PROP_DESC_MISMATCH "Property cannot have both accessors and a
value"
}
diff --git a/dll/win32/jscript/lang/jscript_Si.rc b/dll/win32/jscript/lang/jscript_Si.rc
index 001ec769c3..8368d6474d 100644
--- a/dll/win32/jscript/lang/jscript_Si.rc
+++ b/dll/win32/jscript/lang/jscript_Si.rc
@@ -63,4 +63,8 @@ STRINGTABLE
IDS_PRECISION_OUT_OF_RANGE "Precision is out of range"
IDS_INVALID_LENGTH "Dožina polja mora bit pozitivno celo število"
IDS_ARRAY_EXPECTED "Pričakujem Array objekt"
+ IDS_INVALID_WRITABLE_PROP_DESC "'writable' attribute on the property
descriptor cannot be set to 'true' on this object"
+ IDS_NONCONFIGURABLE_REDEFINED "Cannot redefine non-configurable property
'|'"
+ IDS_NONWRITABLE_MODIFIED "Cannot modify non-writable property
'|'"
+ IDS_PROP_DESC_MISMATCH "Property cannot have both accessors and a
value"
}
diff --git a/dll/win32/jscript/lang/jscript_Sq.rc b/dll/win32/jscript/lang/jscript_Sq.rc
index 6d0dacf04d..79a8407b12 100644
--- a/dll/win32/jscript/lang/jscript_Sq.rc
+++ b/dll/win32/jscript/lang/jscript_Sq.rc
@@ -64,4 +64,8 @@ STRINGTABLE
IDS_PRECISION_OUT_OF_RANGE "Precision is out of range"
IDS_INVALID_LENGTH "Gjatësia e një grupi duhet të jetë një numër i plotë
pozitiv i caktuar"
IDS_ARRAY_EXPECTED "Objekti Array Pritej"
+ IDS_INVALID_WRITABLE_PROP_DESC "'writable' attribute on the property
descriptor cannot be set to 'true' on this object"
+ IDS_NONCONFIGURABLE_REDEFINED "Cannot redefine non-configurable property
'|'"
+ IDS_NONWRITABLE_MODIFIED "Cannot modify non-writable property
'|'"
+ IDS_PROP_DESC_MISMATCH "Property cannot have both accessors and a
value"
}
diff --git a/dll/win32/jscript/lang/jscript_Tr.rc b/dll/win32/jscript/lang/jscript_Tr.rc
index 5e2b948fe1..034b9f58bf 100644
--- a/dll/win32/jscript/lang/jscript_Tr.rc
+++ b/dll/win32/jscript/lang/jscript_Tr.rc
@@ -61,4 +61,8 @@ STRINGTABLE
IDS_PRECISION_OUT_OF_RANGE "Duyarlılık aralık dışında."
IDS_INVALID_LENGTH "Dizi büyüklüğü bir sonlu artı tam sayı olmalı."
IDS_ARRAY_EXPECTED "Dizi nesnesi bekleniyordu."
+ IDS_INVALID_WRITABLE_PROP_DESC "'writable' attribute on the property
descriptor cannot be set to 'true' on this object"
+ IDS_NONCONFIGURABLE_REDEFINED "Cannot redefine non-configurable property
'|'"
+ IDS_NONWRITABLE_MODIFIED "Cannot modify non-writable property
'|'"
+ IDS_PROP_DESC_MISMATCH "Property cannot have both accessors and a
value"
}
diff --git a/dll/win32/jscript/lang/jscript_Uk.rc b/dll/win32/jscript/lang/jscript_Uk.rc
index bc6a2b7bbf..677f773de3 100644
--- a/dll/win32/jscript/lang/jscript_Uk.rc
+++ b/dll/win32/jscript/lang/jscript_Uk.rc
@@ -65,4 +65,8 @@ STRINGTABLE
IDS_PRECISION_OUT_OF_RANGE "Precision is out of range"
IDS_INVALID_LENGTH "Довжиною масиву повинне бути скінченне додатнє ціле
число"
IDS_ARRAY_EXPECTED "Очікується об'єкт Array"
+ IDS_INVALID_WRITABLE_PROP_DESC "'writable' attribute on the property
descriptor cannot be set to 'true' on this object"
+ IDS_NONCONFIGURABLE_REDEFINED "Cannot redefine non-configurable property
'|'"
+ IDS_NONWRITABLE_MODIFIED "Cannot modify non-writable property
'|'"
+ IDS_PROP_DESC_MISMATCH "Property cannot have both accessors and a
value"
}
diff --git a/dll/win32/jscript/lang/jscript_Zh.rc b/dll/win32/jscript/lang/jscript_Zh.rc
index 2d98207e8c..b5c6f0c9d4 100644
--- a/dll/win32/jscript/lang/jscript_Zh.rc
+++ b/dll/win32/jscript/lang/jscript_Zh.rc
@@ -65,6 +65,10 @@ STRINGTABLE
IDS_PRECISION_OUT_OF_RANGE "精度是超出范围"
IDS_INVALID_LENGTH "数组长度必须为一个有限的正整数"
IDS_ARRAY_EXPECTED "预期的数组对象"
+ IDS_INVALID_WRITABLE_PROP_DESC "'writable' attribute on the property
descriptor cannot be set to 'true' on this object"
+ IDS_NONCONFIGURABLE_REDEFINED "Cannot redefine non-configurable property
'|'"
+ IDS_NONWRITABLE_MODIFIED "Cannot modify non-writable property
'|'"
+ IDS_PROP_DESC_MISMATCH "Property cannot have both accessors and a
value"
}
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL
@@ -112,4 +116,8 @@ STRINGTABLE
IDS_PRECISION_OUT_OF_RANGE "精度是超出範圍"
IDS_INVALID_LENGTH "陣列長度必須為一個有限的正整數"
IDS_ARRAY_EXPECTED "預期的陣列物件"
+ IDS_INVALID_WRITABLE_PROP_DESC "'writable' attribute on the property
descriptor cannot be set to 'true' on this object"
+ IDS_NONCONFIGURABLE_REDEFINED "Cannot redefine non-configurable property
'|'"
+ IDS_NONWRITABLE_MODIFIED "Cannot modify non-writable property
'|'"
+ IDS_PROP_DESC_MISMATCH "Property cannot have both accessors and a
value"
}
\ No newline at end of file
diff --git a/dll/win32/jscript/lex.c b/dll/win32/jscript/lex.c
index b4cc82a259..cbaebdbfa5 100644
--- a/dll/win32/jscript/lex.c
+++ b/dll/win32/jscript/lex.c
@@ -32,6 +32,12 @@
#include "wine/debug.h"
#include "wine/unicode.h"
+#ifdef __REACTOS__
+/* FIXME: Inspect - For some reason these exist in the generated header but are not
picked up */
+#define kGET (270)
+#define kSET (272)
+#endif
+
WINE_DEFAULT_DEBUG_CHANNEL(jscript);
static const WCHAR breakW[] =
{'b','r','e','a','k',0};
@@ -46,12 +52,14 @@ static const WCHAR falseW[] =
{'f','a','l','s','e',0};
static const WCHAR finallyW[] =
{'f','i','n','a','l','l','y',0};
static const WCHAR forW[] = {'f','o','r',0};
static const WCHAR functionW[] =
{'f','u','n','c','t','i','o','n',0};
+static const WCHAR getW[] = {'g','e','t',0};
static const WCHAR ifW[] = {'i','f',0};
static const WCHAR inW[] = {'i','n',0};
static const WCHAR instanceofW[] =
{'i','n','s','t','a','n','c','e','o','f',0};
static const WCHAR newW[] = {'n','e','w',0};
static const WCHAR nullW[] = {'n','u','l','l',0};
static const WCHAR returnW[] =
{'r','e','t','u','r','n',0};
+static const WCHAR setW[] = {'s','e','t',0};
static const WCHAR switchW[] =
{'s','w','i','t','c','h',0};
static const WCHAR thisW[] = {'t','h','i','s',0};
static const WCHAR throwW[] =
{'t','h','r','o','w',0};
@@ -70,11 +78,12 @@ static const struct {
const WCHAR *word;
int token;
BOOL no_nl;
+ unsigned min_version;
} keywords[] = {
- {breakW, kBREAK, TRUE},
+ {breakW, kBREAK, TRUE},
{caseW, kCASE},
{catchW, kCATCH},
- {continueW, kCONTINUE, TRUE},
+ {continueW, kCONTINUE, TRUE},
{defaultW, kDEFAULT},
{deleteW, kDELETE},
{doW, kDO},
@@ -83,12 +92,14 @@ static const struct {
{finallyW, kFINALLY},
{forW, kFOR},
{functionW, kFUNCTION},
+ {getW, kGET, FALSE, SCRIPTLANGUAGEVERSION_ES5},
{ifW, kIF},
{inW, kIN},
{instanceofW, kINSTANCEOF},
{newW, kNEW},
{nullW, kNULL},
- {returnW, kRETURN, TRUE},
+ {returnW, kRETURN, TRUE},
+ {setW, kSET, FALSE, SCRIPTLANGUAGEVERSION_ES5},
{switchW, kSWITCH},
{thisW, kTHIS},
{throwW, kTHROW},
@@ -162,13 +173,19 @@ static int hex_to_int(WCHAR c)
static int check_keywords(parser_ctx_t *ctx, const WCHAR **lval)
{
- int min = 0, max = sizeof(keywords)/sizeof(keywords[0])-1, r, i;
+ int min = 0, max = ARRAY_SIZE(keywords)-1, r, i;
while(min <= max) {
i = (min+max)/2;
r = check_keyword(ctx, keywords[i].word, lval);
if(!r) {
+ if(ctx->script->version < keywords[i].min_version) {
+ TRACE("ignoring keyword %s in incompatible mode\n",
+ debugstr_w(keywords[i].word));
+ ctx->ptr -= strlenW(keywords[i].word);
+ return 0;
+ }
ctx->implicit_nl_semicolon = keywords[i].no_nl;
return keywords[i].token;
}
diff --git a/dll/win32/jscript/math.c b/dll/win32/jscript/math.c
index 109df9d321..dc07a97758 100644
--- a/dll/win32/jscript/math.c
+++ b/dll/win32/jscript/math.c
@@ -522,7 +522,7 @@ static const builtin_prop_t Math_props[] = {
static const builtin_info_t Math_info = {
JSCLASS_MATH,
{NULL, NULL, 0},
- sizeof(Math_props)/sizeof(*Math_props),
+ ARRAY_SIZE(Math_props),
Math_props,
NULL,
NULL
@@ -558,7 +558,7 @@ HRESULT create_math(script_ctx_t *ctx, jsdisp_t **ret)
return hres;
}
- for(i=0; i < sizeof(constants)/sizeof(*constants); i++) {
+ for(i=0; i < ARRAY_SIZE(constants); i++) {
hres = jsdisp_define_data_property(math, constants[i].name, 0,
jsval_number(constants[i].val));
if(FAILED(hres)) {
diff --git a/dll/win32/jscript/number.c b/dll/win32/jscript/number.c
index 94c8cc4e07..3d9890b36a 100644
--- a/dll/win32/jscript/number.c
+++ b/dll/win32/jscript/number.c
@@ -524,7 +524,7 @@ static const builtin_prop_t Number_props[] = {
static const builtin_info_t Number_info = {
JSCLASS_NUMBER,
{NULL, NULL,0, Number_get_value},
- sizeof(Number_props)/sizeof(*Number_props),
+ ARRAY_SIZE(Number_props),
Number_props,
NULL,
NULL
diff --git a/dll/win32/jscript/object.c b/dll/win32/jscript/object.c
index d18f1c9c00..487eb5f14b 100644
--- a/dll/win32/jscript/object.c
+++ b/dll/win32/jscript/object.c
@@ -252,7 +252,7 @@ static const builtin_prop_t Object_props[] = {
static const builtin_info_t Object_info = {
JSCLASS_OBJECT,
{NULL, NULL,0, Object_get_value},
- sizeof(Object_props)/sizeof(*Object_props),
+ ARRAY_SIZE(Object_props),
Object_props,
Object_destructor,
NULL
@@ -493,23 +493,23 @@ static HRESULT Object_getOwnPropertyDescriptor(script_ctx_t *ctx,
vdisp_t *jsthi
return hres;
if(prop_desc.explicit_getter || prop_desc.explicit_setter) {
- hres = jsdisp_propput_name(desc_obj, getW, prop_desc.getter
- ? jsval_obj(prop_desc.getter) : jsval_undefined());
+ hres = jsdisp_define_data_property(desc_obj, getW, PROPF_ALL,
+ prop_desc.getter ? jsval_obj(prop_desc.getter) : jsval_undefined());
if(SUCCEEDED(hres))
- hres = jsdisp_propput_name(desc_obj, setW, prop_desc.setter
- ? jsval_obj(prop_desc.setter) :
jsval_undefined());
+ hres = jsdisp_define_data_property(desc_obj, setW, PROPF_ALL,
+ prop_desc.setter ? jsval_obj(prop_desc.setter) : jsval_undefined());
}else {
hres = jsdisp_propput_name(desc_obj, valueW, prop_desc.value);
if(SUCCEEDED(hres))
- hres = jsdisp_propput_name(desc_obj, writableW,
- jsval_bool(!!(prop_desc.flags &
PROPF_WRITABLE)));
+ hres = jsdisp_define_data_property(desc_obj, writableW, PROPF_ALL,
+ jsval_bool(!!(prop_desc.flags & PROPF_WRITABLE)));
}
if(SUCCEEDED(hres))
- hres = jsdisp_propput_name(desc_obj, enumerableW,
- jsval_bool(!!(prop_desc.flags &
PROPF_ENUMERABLE)));
+ hres = jsdisp_define_data_property(desc_obj, enumerableW, PROPF_ALL,
+ jsval_bool(!!(prop_desc.flags & PROPF_ENUMERABLE)));
if(SUCCEEDED(hres))
- hres = jsdisp_propput_name(desc_obj, configurableW,
- jsval_bool(!!(prop_desc.flags &
PROPF_CONFIGURABLE)));
+ hres = jsdisp_define_data_property(desc_obj, configurableW, PROPF_ALL,
+ jsval_bool(!!(prop_desc.flags & PROPF_CONFIGURABLE)));
release_property_descriptor(&prop_desc);
if(SUCCEEDED(hres) && r)
@@ -528,7 +528,7 @@ static const builtin_prop_t ObjectConstr_props[] = {
static const builtin_info_t ObjectConstr_info = {
JSCLASS_FUNCTION,
DEFAULT_FUNCTION_VALUE,
- sizeof(ObjectConstr_props)/sizeof(*ObjectConstr_props),
+ ARRAY_SIZE(ObjectConstr_props),
ObjectConstr_props,
NULL,
NULL
diff --git a/dll/win32/jscript/parser.h b/dll/win32/jscript/parser.h
index a797d08161..f19db5bd5e 100644
--- a/dll/win32/jscript/parser.h
+++ b/dll/win32/jscript/parser.h
@@ -360,16 +360,17 @@ typedef struct {
int length;
} array_literal_expression_t;
-typedef struct _prop_val_t {
+typedef struct _property_definition_t {
+ unsigned type;
literal_t *name;
expression_t *value;
- struct _prop_val_t *next;
-} prop_val_t;
+ struct _property_definition_t *next;
+} property_definition_t;
typedef struct {
expression_t expr;
- prop_val_t *property_list;
+ property_definition_t *property_list;
} property_value_expression_t;
BOOL try_parse_ccval(parser_ctx_t*,ccval_t*) DECLSPEC_HIDDEN;
diff --git a/dll/win32/jscript/parser.tab.c b/dll/win32/jscript/parser.tab.c
index 65c26dcf68..43d616134d 100644
--- a/dll/win32/jscript/parser.tab.c
+++ b/dll/win32/jscript/parser.tab.c
@@ -94,12 +94,14 @@ static literal_t *new_string_literal(parser_ctx_t*,const WCHAR*);
static literal_t *new_null_literal(parser_ctx_t*);
typedef struct _property_list_t {
- prop_val_t *head;
- prop_val_t *tail;
+ property_definition_t *head;
+ property_definition_t *tail;
} property_list_t;
-static property_list_t *new_property_list(parser_ctx_t*,literal_t*,expression_t*);
-static property_list_t
*property_list_add(parser_ctx_t*,property_list_t*,literal_t*,expression_t*);
+static property_definition_t *new_property_definition(parser_ctx_t *ctx,
property_definition_type_t,
+ literal_t *name, expression_t
*value);
+static property_list_t *new_property_list(parser_ctx_t*,property_definition_t*);
+static property_list_t
*property_list_add(parser_ctx_t*,property_list_t*,property_definition_t*);
typedef struct _element_list_t {
array_element_t *head;
@@ -189,7 +191,7 @@ static source_elements_t *new_source_elements(parser_ctx_t*);
static source_elements_t
*source_elements_add_statement(source_elements_t*,statement_t*);
-#line 193 "parser.tab.c" /* yacc.c:339 */
+#line 195 "parser.tab.c" /* yacc.c:339 */
# ifndef YY_NULL
# if defined __cplusplus && 201103L <= __cplusplus
@@ -236,39 +238,41 @@ extern int parser_debug;
kIF = 267,
kFINALLY = 268,
kFOR = 269,
- kIN = 270,
- kINSTANCEOF = 271,
- kNEW = 272,
- kNULL = 273,
- kRETURN = 274,
- kSWITCH = 275,
- kTHIS = 276,
- kTHROW = 277,
- kTRUE = 278,
- kFALSE = 279,
- kTRY = 280,
- kTYPEOF = 281,
- kVAR = 282,
- kVOID = 283,
- kWHILE = 284,
- kWITH = 285,
- tANDAND = 286,
- tOROR = 287,
- tINC = 288,
- tDEC = 289,
- tHTMLCOMMENT = 290,
- kDIVEQ = 291,
- kDCOL = 292,
- tIdentifier = 293,
- tAssignOper = 294,
- tEqOper = 295,
- tShiftOper = 296,
- tRelOper = 297,
- tNumericLiteral = 298,
- tBooleanLiteral = 299,
- tStringLiteral = 300,
- tEOF = 301,
- LOWER_THAN_ELSE = 302
+ kGET = 270,
+ kIN = 271,
+ kSET = 272,
+ kINSTANCEOF = 273,
+ kNEW = 274,
+ kNULL = 275,
+ kRETURN = 276,
+ kSWITCH = 277,
+ kTHIS = 278,
+ kTHROW = 279,
+ kTRUE = 280,
+ kFALSE = 281,
+ kTRY = 282,
+ kTYPEOF = 283,
+ kVAR = 284,
+ kVOID = 285,
+ kWHILE = 286,
+ kWITH = 287,
+ tANDAND = 288,
+ tOROR = 289,
+ tINC = 290,
+ tDEC = 291,
+ tHTMLCOMMENT = 292,
+ kDIVEQ = 293,
+ kDCOL = 294,
+ tIdentifier = 295,
+ tAssignOper = 296,
+ tEqOper = 297,
+ tShiftOper = 298,
+ tRelOper = 299,
+ tNumericLiteral = 300,
+ tBooleanLiteral = 301,
+ tStringLiteral = 302,
+ tEOF = 303,
+ LOWER_THAN_ELSE = 304
};
#endif
@@ -277,7 +281,7 @@ extern int parser_debug;
typedef union YYSTYPE YYSTYPE;
union YYSTYPE
{
-#line 145 "parser.y" /* yacc.c:355 */
+#line 147 "parser.y" /* yacc.c:355 */
int ival;
const WCHAR *srcptr;
@@ -292,13 +296,14 @@ union YYSTYPE
const WCHAR *identifier;
struct _parameter_list_t *parameter_list;
struct _property_list_t *property_list;
+ property_definition_t *property_definition;
source_elements_t *source_elements;
statement_t *statement;
struct _statement_list_t *statement_list;
struct _variable_list_t *variable_list;
variable_declaration_t *variable_declaration;
-#line 302 "parser.tab.c" /* yacc.c:355 */
+#line 307 "parser.tab.c" /* yacc.c:355 */
};
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
@@ -312,7 +317,7 @@ int parser_parse (parser_ctx_t *ctx);
/* Copy the second part of user declarations. */
-#line 316 "parser.tab.c" /* yacc.c:358 */
+#line 321 "parser.tab.c" /* yacc.c:358 */
#ifdef short
# undef short
@@ -535,21 +540,21 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 3
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 1287
+#define YYLAST 1393
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 70
+#define YYNTOKENS 72
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 97
+#define YYNNTS 99
/* YYNRULES -- Number of rules. */
-#define YYNRULES 247
+#define YYNRULES 254
/* YYNSTATES -- Number of states. */
-#define YYNSTATES 440
+#define YYNSTATES 454
/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 302
+#define YYMAXUTOK 304
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -561,16 +566,16 @@ static const yytype_uint8 yytranslate[] =
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 64, 2, 2, 2, 62, 57, 2,
- 68, 69, 60, 58, 50, 59, 67, 61, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 53, 52,
- 2, 51, 2, 54, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 66, 2, 2, 2, 64, 59, 2,
+ 70, 71, 62, 60, 52, 61, 69, 63, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 55, 54,
+ 2, 53, 2, 56, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 65, 2, 66, 56, 2, 2, 2, 2, 2,
+ 2, 67, 2, 68, 58, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 49, 55, 38, 63, 2, 2, 2,
+ 2, 2, 2, 51, 57, 40, 65, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -587,39 +592,40 @@ static const yytype_uint8 yytranslate[] =
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
- 35, 36, 37, 39, 40, 41, 42, 43, 44, 45,
- 46, 47, 48
+ 35, 36, 37, 38, 39, 41, 42, 43, 44, 45,
+ 46, 47, 48, 49, 50
};
#if YYDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 253, 253, 257, 258, 262, 263, 268, 270, 272,
- 276, 280, 284, 285, 290, 291, 295, 296, 297, 298,
- 299, 300, 301, 302, 303, 304, 305, 306, 307, 308,
- 309, 313, 314, 319, 320, 324, 325, 329, 334, 335,
- 340, 342, 347, 352, 357, 358, 362, 367, 368, 372,
- 377, 381, 386, 388, 393, 395, 398, 400, 397, 404,
- 406, 403, 409, 411, 416, 421, 426, 431, 436, 441,
- 446, 448, 453, 454, 458, 459, 464, 469, 474, 479,
- 480, 481, 486, 491, 495, 496, 499, 500, 504, 505,
- 510, 511, 515, 517, 521, 522, 526, 527, 529, 534,
- 536, 538, 543, 544, 549, 551, 556, 557, 562, 564,
- 569, 570, 575, 577, 582, 583, 588, 590, 595, 596,
- 601, 603, 608, 609, 614, 616, 621, 622, 627, 628,
- 633, 634, 636, 638, 643, 644, 646, 651, 652, 657,
- 659, 661, 666, 667, 669, 671, 676, 677, 679, 680,
- 682, 683, 684, 685, 686, 687, 691, 693, 695, 701,
- 702, 706, 707, 711, 712, 713, 715, 717, 722, 724,
- 726, 728, 733, 734, 738, 739, 744, 745, 746, 747,
- 748, 749, 753, 754, 755, 756, 761, 763, 768, 769,
- 773, 774, 778, 779, 784, 786, 791, 792, 793, 797,
- 798, 802, 803, 814, 815, 816, 817, 818, 819, 820,
- 821, 822, 823, 824, 825, 826, 827, 828, 829, 830,
- 831, 832, 833, 834, 835, 836, 837, 838, 839, 840,
- 841, 845, 846, 847, 848, 849, 851, 856, 857, 858,
- 861, 862, 865, 866, 869, 870, 873, 874
+ 0, 258, 258, 262, 263, 267, 268, 273, 275, 277,
+ 281, 285, 289, 290, 295, 296, 300, 301, 302, 303,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 318, 319, 324, 325, 329, 330, 334, 339, 340,
+ 345, 347, 352, 357, 362, 363, 367, 372, 373, 377,
+ 382, 386, 391, 393, 398, 400, 403, 405, 402, 409,
+ 411, 408, 414, 416, 421, 426, 431, 436, 441, 446,
+ 451, 453, 458, 459, 463, 464, 469, 474, 479, 484,
+ 485, 486, 491, 496, 500, 501, 504, 505, 509, 510,
+ 515, 516, 520, 522, 526, 527, 531, 532, 534, 539,
+ 541, 543, 548, 549, 554, 556, 561, 562, 567, 569,
+ 574, 575, 580, 582, 587, 588, 593, 595, 600, 601,
+ 606, 608, 613, 614, 619, 621, 626, 627, 632, 633,
+ 638, 639, 641, 643, 648, 649, 651, 656, 657, 662,
+ 664, 666, 671, 672, 674, 676, 681, 682, 684, 685,
+ 687, 688, 689, 690, 691, 692, 696, 698, 700, 706,
+ 707, 711, 712, 716, 717, 718, 720, 722, 727, 729,
+ 731, 733, 738, 739, 743, 744, 749, 750, 751, 752,
+ 753, 754, 758, 759, 760, 761, 766, 768, 773, 774,
+ 778, 779, 783, 784, 786, 797, 798, 803, 805, 807,
+ 811, 816, 817, 818, 822, 823, 827, 828, 839, 840,
+ 841, 842, 843, 844, 845, 846, 847, 848, 849, 850,
+ 851, 852, 853, 854, 855, 856, 857, 858, 859, 860,
+ 861, 862, 863, 864, 865, 866, 867, 868, 872, 873,
+ 874, 875, 876, 878, 883, 884, 885, 888, 889, 892,
+ 893, 896, 897, 900, 901
};
#endif
@@ -630,28 +636,29 @@ static const char *const yytname[] =
{
"$end", "error", "$undefined", "kBREAK",
"kCASE", "kCATCH", "kCONTINUE",
"kDEFAULT", "kDELETE", "kDO", "kELSE",
"kFUNCTION", "kIF", "kFINALLY",
- "kFOR", "kIN", "kINSTANCEOF", "kNEW",
"kNULL", "kRETURN", "kSWITCH",
- "kTHIS", "kTHROW", "kTRUE", "kFALSE",
"kTRY", "kTYPEOF", "kVAR", "kVOID",
- "kWHILE", "kWITH", "tANDAND", "tOROR",
"tINC", "tDEC", "tHTMLCOMMENT",
- "kDIVEQ", "kDCOL", "'}'",
"tIdentifier", "tAssignOper", "tEqOper",
- "tShiftOper", "tRelOper", "tNumericLiteral",
"tBooleanLiteral",
- "tStringLiteral", "tEOF", "LOWER_THAN_ELSE",
"'{'", "','", "'='",
"';'",
- "':'", "'?'", "'|'",
"'^'", "'&'", "'+'",
"'-'", "'*'", "'/'",
"'%'",
- "'~'", "'!'", "'['",
"']'", "'.'", "'('",
"')'", "$accept", "Program",
- "HtmlComment", "SourceElements", "FunctionExpression",
"KFunction",
- "FunctionBody", "FormalParameterList",
"FormalParameterList_opt",
- "Statement", "StatementList", "StatementList_opt",
"Block",
- "VariableStatement", "VariableDeclarationList",
- "VariableDeclarationListNoIn", "VariableDeclaration",
- "VariableDeclarationNoIn", "Initialiser_opt",
"Initialiser",
- "InitialiserNoIn_opt", "InitialiserNoIn",
"EmptyStatement",
- "ExpressionStatement", "IfStatement",
"IterationStatement", "$@1", "$@2",
- "$@3", "$@4", "ContinueStatement",
"BreakStatement", "ReturnStatement",
- "WithStatement", "LabelledStatement", "SwitchStatement",
"CaseBlock",
- "CaseClausules_opt", "CaseClausules", "CaseClausule",
"DefaultClausule",
- "ThrowStatement", "TryStatement", "Catch",
"Finally", "Expression_opt",
- "Expression_err", "Expression", "ExpressionNoIn_opt",
"ExpressionNoIn",
- "AssignOper", "AssignmentExpression",
"AssignmentExpressionNoIn",
+ "kFOR", "kGET", "kIN", "kSET",
"kINSTANCEOF", "kNEW", "kNULL", "kRETURN",
+ "kSWITCH", "kTHIS", "kTHROW", "kTRUE",
"kFALSE", "kTRY", "kTYPEOF",
+ "kVAR", "kVOID", "kWHILE", "kWITH",
"tANDAND", "tOROR", "tINC", "tDEC",
+ "tHTMLCOMMENT", "kDIVEQ", "kDCOL",
"'}'", "tIdentifier", "tAssignOper",
+ "tEqOper", "tShiftOper", "tRelOper",
"tNumericLiteral",
+ "tBooleanLiteral", "tStringLiteral", "tEOF",
"LOWER_THAN_ELSE", "'{'",
+ "','", "'='", "';'",
"':'", "'?'", "'|'",
"'^'", "'&'", "'+'",
"'-'",
+ "'*'", "'/'", "'%'",
"'~'", "'!'", "'['",
"']'", "'.'", "'('",
"')'",
+ "$accept", "Program", "HtmlComment",
"SourceElements",
+ "FunctionExpression", "KFunction", "FunctionBody",
"FormalParameterList",
+ "FormalParameterList_opt", "Statement", "StatementList",
+ "StatementList_opt", "Block", "VariableStatement",
+ "VariableDeclarationList", "VariableDeclarationListNoIn",
+ "VariableDeclaration", "VariableDeclarationNoIn",
"Initialiser_opt",
+ "Initialiser", "InitialiserNoIn_opt", "InitialiserNoIn",
+ "EmptyStatement", "ExpressionStatement", "IfStatement",
+ "IterationStatement", "$@1", "$@2", "$@3",
"$@4", "ContinueStatement",
+ "BreakStatement", "ReturnStatement", "WithStatement",
+ "LabelledStatement", "SwitchStatement", "CaseBlock",
"CaseClausules_opt",
+ "CaseClausules", "CaseClausule", "DefaultClausule",
"ThrowStatement",
+ "TryStatement", "Catch", "Finally",
"Expression_opt", "Expression_err",
+ "Expression", "ExpressionNoIn_opt", "ExpressionNoIn",
"AssignOper",
+ "AssignmentExpression", "AssignmentExpressionNoIn",
"ConditionalExpression", "ConditionalExpressionNoIn",
"LogicalORExpression", "LogicalORExpressionNoIn",
"LogicalANDExpression",
"LogicalANDExpressionNoIn", "BitwiseORExpression",
@@ -664,9 +671,10 @@ static const char *const yytname[] =
"LeftHandSideExpression", "NewExpression",
"MemberExpression",
"CallExpression", "Arguments", "ArgumentList",
"PrimaryExpression",
"ArrayLiteral", "ElementList", "Elision",
"Elision_opt", "ObjectLiteral",
- "PropertyNameAndValueList", "PropertyName",
"Identifier_opt",
- "IdentifierName", "ReservedAsIdentifier", "Literal",
"BooleanLiteral",
- "semicolon_opt", "left_bracket", "right_bracket",
"semicolon", YY_NULL
+ "PropertyNameAndValueList", "PropertyDefinition",
"GetterSetterMethod",
+ "PropertyName", "Identifier_opt", "IdentifierName",
+ "ReservedAsIdentifier", "Literal", "BooleanLiteral",
"semicolon_opt",
+ "left_bracket", "right_bracket", "semicolon", YY_NULL
};
#endif
@@ -678,19 +686,20 @@ static const yytype_uint16 yytoknum[] =
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
- 285, 286, 287, 288, 289, 290, 291, 292, 125, 293,
- 294, 295, 296, 297, 298, 299, 300, 301, 302, 123,
- 44, 61, 59, 58, 63, 124, 94, 38, 43, 45,
- 42, 47, 37, 126, 33, 91, 93, 46, 40, 41
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 125, 295, 296, 297, 298, 299, 300, 301, 302, 303,
+ 304, 123, 44, 61, 59, 58, 63, 124, 94, 38,
+ 43, 45, 42, 47, 37, 126, 33, 91, 93, 46,
+ 40, 41
};
# endif
-#define YYPACT_NINF -349
+#define YYPACT_NINF -361
#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-349)))
+ (!!((Yystate) == (-361)))
-#define YYTABLE_NINF -231
+#define YYTABLE_NINF -238
#define yytable_value_is_error(Yytable_value) \
0
@@ -699,50 +708,52 @@ static const yytype_uint16 yytoknum[] =
STATE-NUM. */
static const yytype_int16 yypact[] =
{
- -349, 55, 650, -349, 37, 37, 1094, 839, -349, 28,
- 28, 248, -349, 1094, 28, -349, 1094, -349, -349, -15,
- 1094, 59, 1094, 28, 28, 1094, 1094, -349, -349, 4,
- -349, -349, -349, 587, -349, 1094, 1094, -349, 1094, 1094,
- -8, 1094, 66, 490, 35, -349, -349, -349, -349, -349,
- -349, -349, -349, -349, -349, -349, -349, -349, -349, -349,
- 109, -349, -349, 7, 69, 56, 46, 86, 107, 25,
- 129, 125, 200, -349, -349, 196, -349, 122, 147, -349,
- -349, -349, -349, -349, -349, 47, 47, -349, 1160, -349,
- -349, 177, 162, -349, -349, 431, 937, -349, 122, 47,
- 176, 1094, 109, 713, 134, -349, 180, 113, -349, -349,
- 431, 1094, -349, -349, 839, 34, -349, -349, 127, -349,
- 1094, 839, -349, 181, 63, -349, 64, -349, -349, 248,
- 184, 986, 65, 190, 1094, 192, 195, -15, 1094, 59,
- 1094, 70, 92, 522, 4, 202, 211, -349, 776, -22,
- 214, -349, -349, -349, -349, -349, -349, -349, -349, 102,
- 108, 1094, 20, -349, 53, 231, -349, 1094, -349, -349,
- 1094, 1094, 1094, 1094, 1094, 1094, 1094, 1094, 1094, 1094,
- 1094, 1094, 1094, 1094, 1094, 1094, -349, -349, -349, -349,
- 1094, 1094, 1094, 1248, 888, -349, 1094, 1248, -349, -349,
- -349, -349, -349, -349, -349, -349, -349, -349, -349, -349,
- -349, -349, -349, -349, -349, -349, -349, -349, -349, -349,
- -349, -349, -349, -349, -349, -349, 28, -349, 23, 176,
- 234, -349, 203, -349, -349, 40, 245, 222, 223, 221,
- 239, 2, 129, 142, -349, -349, 19, -349, -349, 28,
- -15, 268, -349, 1094, -349, -349, 59, -349, 23, 19,
- -349, -349, -349, -349, 1204, 1094, 232, -349, -349, -349,
- -349, -349, 244, 231, -349, 236, 23, -349, 69, 235,
- 56, 46, 86, 107, 25, 129, 129, 129, 125, 200,
- 200, -349, -349, -349, -349, -349, 119, -349, -349, -349,
- 84, 120, -349, 431, -349, -349, 839, 240, 250, 275,
- 77, 1094, 1094, 1094, 1094, 1094, 1094, 1094, 1094, 1094,
- 1094, 431, 1094, 1094, 249, 262, -349, -349, -349, -349,
- 839, 839, 252, -349, 253, 1035, 28, 23, 263, 257,
- 1094, -349, 1094, -349, -349, 23, 298, 1094, -349, -349,
- 234, 77, 431, -349, -349, 1094, -349, 206, 245, 258,
- 222, 223, 221, 239, 2, 129, 129, 23, -349, -349,
- 306, -349, 23, -349, -349, 1094, -349, -349, 231, 265,
- -349, -349, -349, -349, 47, 839, -349, -349, 1094, 23,
- -349, 1094, 839, 1094, 18, 306, -349, -15, -349, 23,
- -349, 839, 274, -349, -349, -349, 839, 77, -349, -349,
- 87, 266, -349, 306, -349, -349, 269, 277, -349, 77,
- -349, 1094, 839, 839, 283, -349, -349, 1094, 23, 839,
- -349, -349, -349, 284, 23, 839, -349, 839, -349, -349
+ -361, 82, 649, -361, -15, -15, 1146, 844, -361, 60,
+ 60, 236, -361, 1146, 60, -361, 1146, -361, -361, 14,
+ 1146, 73, 1146, 60, 60, 1146, 1146, -361, -361, 72,
+ -361, -361, -361, 584, -361, 1146, 1146, -361, 1146, 1146,
+ 94, 1146, 88, 472, 36, -361, -361, -361, -361, -361,
+ -361, -361, -361, -361, -361, -361, -361, -361, -361, -361,
+ 51, -361, -361, 86, 123, 124, 130, 145, 163, 22,
+ 183, -5, 182, -361, -361, 155, -361, 219, 224, -361,
+ -361, -361, -361, -361, -361, 31, 31, -361, 1214, -361,
+ -361, 230, 217, -361, -361, 434, 965, -361, 219, 31,
+ 205, 1146, 51, 714, 198, -361, 197, 59, -361, -361,
+ 434, 1146, -361, -361, 844, 9, -361, -361, 114, -361,
+ 1146, 844, -361, 212, 38, -361, 79, 1306, -361, 1306,
+ -361, 236, 221, 1025, 83, 223, 1146, 226, 246, 14,
+ 1146, 73, 1146, 95, 103, 517, 72, 249, 250, -361,
+ 779, 149, -361, 252, -361, -361, -361, -361, -361, -361,
+ -361, -361, 102, 107, 1146, 17, -361, 93, 244, -361,
+ 1146, -361, -361, 1146, 1146, 1146, 1146, 1146, 1146, 1146,
+ 1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146, -361,
+ -361, -361, -361, 1146, 1146, 1146, 1352, 904, -361, 1146,
+ 1352, -361, -361, -361, -361, -361, -361, -361, -361, -361,
+ -361, -361, -361, -361, -361, -361, -361, -361, -361, -361,
+ -361, -361, -361, -361, -361, -361, -361, -361, -361, 60,
+ -361, 24, 205, 251, -361, 256, -361, -361, 111, 276,
+ 253, 255, 258, 272, 98, 183, 237, -361, -361, 16,
+ -361, -361, 60, 14, 305, -361, 1146, -361, -361, 73,
+ -361, 24, 16, -361, -361, -361, 60, 60, -361, -361,
+ -361, 1260, 1146, 267, -361, -361, -361, -361, -361, 279,
+ 244, -361, 269, 24, -361, 123, 270, 124, 130, 145,
+ 163, 22, 183, 183, 183, -5, 182, 182, -361, -361,
+ -361, -361, -361, 108, -361, -361, -361, 26, 116, -361,
+ 434, -361, -361, 844, 271, 274, 306, 48, 1146, 1146,
+ 1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146, 434, 1146,
+ 1146, 277, 286, -361, -361, -361, -361, 844, 844, -361,
+ 244, -361, -361, -361, -361, 278, 1085, 60, 24, 288,
+ 280, 1146, -361, 1146, -361, -361, 24, 322, 1146, -361,
+ -361, 251, 48, 434, -361, -361, 1146, -361, 216, 276,
+ 282, 253, 255, 258, 272, 98, 183, 183, 24, -361,
+ -361, 329, -361, 24, -361, -361, 24, -361, -361, 244,
+ 283, -361, -361, -361, -361, 31, 844, -361, -361, 1146,
+ 24, -361, 1146, 844, 1146, 46, 329, -361, 14, 289,
+ 24, -361, 844, 301, -361, -361, -361, 844, 48, -361,
+ -361, 186, 287, -361, 329, -361, -361, -361, 292, 309,
+ -361, 48, -361, 1146, 844, 844, 310, 312, -361, -361,
+ 1146, 24, 844, -361, -361, -361, -361, 313, 24, 844,
+ -361, 844, -361, -361
};
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -750,80 +761,82 @@ static const yytype_int16 yypact[] =
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
- 5, 0, 4, 1, 199, 199, 0, 0, 10, 0,
- 0, 0, 231, 84, 0, 176, 0, 237, 238, 0,
- 0, 0, 0, 0, 0, 0, 0, 3, 236, 177,
- 233, 239, 234, 0, 50, 0, 0, 235, 0, 0,
+ 5, 0, 4, 1, 204, 204, 0, 0, 10, 0,
+ 0, 0, 238, 84, 0, 176, 0, 244, 245, 0,
+ 0, 0, 0, 0, 0, 0, 0, 3, 243, 177,
+ 240, 246, 241, 0, 50, 0, 0, 242, 0, 0,
190, 0, 0, 19, 0, 6, 16, 17, 18, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
0, 88, 96, 102, 106, 110, 114, 118, 122, 126,
130, 137, 139, 142, 146, 156, 159, 161, 160, 163,
- 179, 180, 178, 232, 200, 0, 0, 177, 0, 164,
- 147, 156, 0, 243, 242, 0, 90, 162, 161, 0,
+ 179, 180, 178, 239, 205, 0, 0, 177, 0, 164,
+ 147, 156, 0, 250, 249, 0, 90, 162, 161, 0,
85, 0, 0, 0, 0, 149, 44, 0, 38, 148,
- 0, 0, 150, 151, 0, 199, 204, 205, 199, 207,
- 208, 209, 210, 10, 0, 212, 0, 216, 217, 218,
- 231, 84, 0, 176, 223, 237, 238, 225, 226, 227,
- 228, 0, 0, 36, 177, 233, 234, 31, 0, 0,
- 0, 196, 202, 152, 153, 154, 155, 188, 182, 0,
- 191, 0, 0, 2, 0, 14, 241, 0, 240, 51,
+ 0, 0, 150, 151, 0, 204, 209, 210, 204, 212,
+ 213, 214, 215, 10, 0, 217, 0, 220, 222, 227,
+ 223, 224, 238, 84, 0, 176, 230, 244, 245, 232,
+ 233, 234, 235, 0, 0, 36, 177, 240, 241, 31,
+ 0, 0, 195, 0, 201, 207, 152, 153, 154, 155,
+ 188, 182, 0, 191, 0, 0, 2, 0, 14, 248,
+ 0, 247, 51, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 157,
+ 158, 95, 94, 0, 0, 0, 0, 0, 168, 0,
+ 0, 169, 65, 64, 208, 211, 213, 214, 219, 221,
+ 218, 224, 225, 226, 228, 229, 230, 231, 216, 232,
+ 233, 234, 235, 236, 237, 192, 206, 203, 202, 0,
+ 87, 0, 86, 0, 56, 91, 92, 99, 104, 108,
+ 112, 116, 120, 124, 128, 134, 156, 167, 66, 0,
+ 78, 36, 0, 0, 79, 80, 0, 42, 45, 0,
+ 37, 0, 0, 68, 220, 227, 0, 0, 35, 32,
+ 193, 0, 0, 190, 184, 189, 183, 186, 181, 0,
+ 14, 12, 15, 0, 89, 107, 0, 111, 115, 119,
+ 123, 127, 133, 132, 131, 138, 140, 141, 143, 144,
+ 145, 97, 98, 0, 166, 172, 174, 0, 0, 171,
+ 0, 252, 251, 0, 47, 59, 40, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 157, 158, 95, 94,
- 0, 0, 0, 0, 0, 168, 0, 0, 169, 65,
- 64, 203, 206, 208, 209, 214, 215, 213, 218, 219,
- 220, 221, 222, 223, 224, 211, 225, 226, 227, 228,
- 229, 230, 192, 201, 198, 197, 0, 87, 0, 86,
- 0, 56, 91, 92, 99, 104, 108, 112, 116, 120,
- 124, 128, 134, 156, 167, 66, 0, 78, 36, 0,
- 0, 79, 80, 0, 42, 45, 0, 37, 0, 0,
- 68, 35, 32, 193, 0, 0, 190, 184, 189, 183,
- 186, 181, 0, 14, 12, 15, 0, 89, 107, 0,
- 111, 115, 119, 123, 127, 133, 132, 131, 138, 140,
- 141, 143, 144, 145, 97, 98, 0, 166, 172, 174,
- 0, 0, 171, 0, 245, 244, 0, 47, 59, 40,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 83, 81, 46, 39,
- 0, 0, 0, 194, 191, 0, 0, 0, 0, 0,
- 0, 165, 0, 173, 170, 0, 53, 0, 43, 48,
- 0, 0, 0, 247, 246, 84, 93, 156, 109, 0,
- 113, 117, 121, 125, 129, 136, 135, 0, 100, 101,
- 72, 69, 0, 55, 67, 0, 185, 187, 14, 0,
- 13, 5, 103, 175, 0, 0, 49, 41, 84, 0,
- 57, 0, 0, 0, 0, 73, 74, 0, 195, 0,
- 5, 11, 0, 54, 52, 60, 0, 0, 105, 62,
- 0, 0, 70, 72, 75, 82, 0, 0, 7, 0,
- 63, 84, 33, 33, 0, 5, 8, 84, 0, 34,
- 76, 77, 71, 0, 0, 0, 9, 0, 58, 61
+ 0, 0, 0, 83, 81, 46, 39, 0, 0, 198,
+ 14, 199, 194, 196, 197, 191, 0, 0, 0, 0,
+ 0, 0, 165, 0, 173, 170, 0, 53, 0, 43,
+ 48, 0, 0, 0, 254, 253, 84, 93, 156, 109,
+ 0, 113, 117, 121, 125, 129, 136, 135, 0, 100,
+ 101, 72, 69, 0, 55, 67, 0, 185, 187, 14,
+ 0, 13, 5, 103, 175, 0, 0, 49, 41, 84,
+ 0, 57, 0, 0, 0, 0, 73, 74, 0, 0,
+ 0, 5, 11, 0, 54, 52, 60, 0, 0, 105,
+ 62, 0, 0, 70, 72, 75, 82, 5, 0, 0,
+ 7, 0, 63, 84, 33, 33, 0, 0, 5, 8,
+ 84, 0, 34, 76, 77, 71, 200, 0, 0, 0,
+ 9, 0, 58, 61
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -349, -349, -349, 323, -2, -349, -348, -349, -269, 1,
- -172, -98, -12, -349, -349, -349, 71, -24, -349, -349,
- -349, -349, -349, -349, -349, -349, -349, -349, -349, -349,
- -349, -349, -349, -349, -349, -349, -349, -80, -349, -61,
- -349, -349, -349, -349, 99, -341, -108, -4, -349, -349,
- 278, -86, -296, -349, -349, -349, -349, 182, 42, 183,
- 43, 185, 41, 186, 45, 187, 49, 188, 52, -95,
- 179, 93, 343, -349, 24, -5, -1, -349, 58, -349,
- -349, -349, -349, 101, 106, -349, -349, 110, 8, -16,
- -349, -349, -349, -64, 9, -104, -340
+ -361, -361, -361, 345, -2, -361, -357, -361, -261, 1,
+ -164, -70, -10, -361, -361, -361, 109, 8, -361, -361,
+ -361, -361, -361, -361, -361, -361, -361, -361, -361, -361,
+ -361, -361, -361, -361, -361, -361, -361, -54, -361, -35,
+ -361, -361, -361, -361, 118, -333, -68, -12, -361, -361,
+ 298, -146, -284, -361, -361, -361, -361, 201, 56, 202,
+ 55, 203, 58, 204, 61, 200, 62, 206, 57, -90,
+ 207, 112, 160, -361, 37, 4, 5, -361, 74, -361,
+ -361, -361, -361, 110, 115, -361, -361, 120, 122, 65,
+ 7, -22, -361, -361, -361, -72, -3, -239, -360
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 1, 42, 401, 89, 44, 402, 275, 276, 147,
- 148, 430, 46, 47, 107, 308, 108, 309, 254, 255,
- 348, 349, 48, 49, 50, 51, 310, 407, 351, 419,
- 52, 53, 54, 55, 56, 57, 371, 394, 395, 396,
- 413, 58, 59, 251, 252, 99, 228, 60, 231, 232,
- 323, 61, 233, 62, 234, 63, 235, 64, 236, 65,
- 237, 66, 238, 67, 239, 68, 240, 69, 241, 70,
- 71, 72, 73, 74, 75, 76, 77, 78, 195, 300,
- 79, 80, 159, 160, 161, 81, 149, 150, 85, 151,
- 152, 82, 83, 169, 95, 306, 355
+ -1, 1, 42, 412, 89, 44, 413, 282, 283, 149,
+ 150, 443, 46, 47, 107, 315, 108, 316, 257, 258,
+ 359, 360, 48, 49, 50, 51, 317, 418, 362, 431,
+ 52, 53, 54, 55, 56, 57, 382, 405, 406, 407,
+ 424, 58, 59, 254, 255, 99, 231, 60, 234, 235,
+ 330, 61, 236, 62, 237, 63, 238, 64, 239, 65,
+ 240, 66, 241, 67, 242, 68, 243, 69, 244, 70,
+ 71, 72, 73, 74, 75, 76, 77, 78, 198, 307,
+ 79, 80, 162, 163, 164, 81, 151, 152, 339, 153,
+ 85, 154, 155, 82, 83, 172, 95, 313, 366
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
@@ -831,348 +844,373 @@ static const yytype_int16 yydefgoto[] =
number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_int16 yytable[] =
{
- 43, 242, 258, 45, 337, 43, 97, 104, 92, 100,
- 98, 388, 102, 86, 390, 356, 263, 359, 319, 96,
- 304, 199, 200, 101, 304, 411, 368, 369, 264, 93,
- 91, 43, 110, 111, 103, 245, 93, 162, 247, 170,
- 177, 178, 157, 257, 91, 320, 91, 405, 166, 91,
- 91, 386, 417, 165, 93, 3, 412, 114, 158, 91,
- 91, 171, 91, 91, 93, 93, 93, 421, 179, 167,
- 167, 93, 312, 84, 164, 270, 84, 433, 353, 427,
- 428, 277, 285, 286, 287, 279, 434, -203, 305, 271,
- 272, 229, 305, 93, 313, 408, 94, 246, 106, 168,
- 172, 43, 174, 94, 294, 295, 229, 259, 299, 399,
- 166, 173, 43, 163, 166, 260, -215, -213, -221, 43,
- 243, 94, 92, -229, 97, 104, 86, 100, 98, 354,
- 102, 94, 94, 94, 342, 96, 198, 167, 94, 249,
- 422, 101, 324, 175, 91, -230, 43, 250, 176, 262,
- 110, 111, 266, 343, 330, 331, 244, 321, 268, 167,
- 94, 168, 91, 256, 91, 168, 84, 328, 267, 167,
- 167, 180, 339, 273, 269, 186, 187, 297, 188, 333,
- -206, 302, 189, 181, 182, 341, 344, 192, 296, 193,
- 194, 226, 301, 322, 91, 345, 91, 91, 91, 91,
- 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
- 186, 187, 196, 367, 197, 194, 242, 242, 242, 242,
- 242, 242, 242, 242, 365, 366, 167, 242, 242, 186,
- 187, 253, 188, 379, -214, 303, 189, -219, 326, 186,
- 187, 384, 188, -222, 389, -224, 189, 190, -211, 377,
- 429, 429, 242, 311, 382, -198, 383, 322, 325, 8,
- 183, 184, 185, 392, -197, 11, 12, 265, 397, 15,
- 274, 17, 18, 307, 289, 290, 314, 315, 317, 316,
- 318, 250, 157, 336, 28, 406, 338, 87, 340, 398,
- 352, 347, 30, 31, 32, 416, 242, 88, 370, 229,
- 350, 372, 380, 268, 43, 375, 381, 346, 385, 37,
- 393, 391, 418, 40, 400, 426, 41, 229, 425, 423,
- 403, 432, 436, 2, 435, 431, 387, 329, 43, 43,
- 437, 373, 374, 424, 414, 357, 91, 357, 91, 91,
- 91, 91, 91, 91, 91, 378, 357, 357, 229, 90,
- 327, 100, 278, 191, 358, 280, 361, 360, 281, 288,
- 282, 362, 283, 105, 284, 109, 363, 334, 112, 113,
- 364, 357, 335, 0, 332, 0, 0, 0, 153, 154,
- 0, 155, 156, 43, 100, 415, 404, 0, 0, 410,
- 43, 0, 0, 409, 0, 0, 0, 0, 0, 43,
- 0, 0, 45, 0, 43, 0, 0, 420, 0, 0,
- 0, 0, 0, 0, 0, 357, 0, 100, 0, 0,
- 43, 43, 0, 100, 0, 0, 0, 43, 0, 0,
- 262, 0, 227, 43, 0, 43, 438, 0, 439, 6,
- 0, 0, 8, 0, 0, 0, 0, 0, 11, 12,
- 0, 0, 15, 0, 17, 18, 0, 20, 0, 22,
- 0, 0, 0, 90, 25, 26, 0, 28, 0, 0,
- 87, 0, 0, 0, 0, 30, 31, 32, 0, 0,
- 88, 105, 0, 109, 0, 0, 0, 0, 0, 35,
- 36, -164, 37, 0, 38, 39, 40, 0, 0, 41,
- 0, 0, 0, 0, 0, -164, -164, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, -164, -164, -192, 0, 0, 291, 292, 293, 0,
- -164, -164, -164, -164, 0, 0, 0, -192, -192, 0,
- -164, -164, 0, 0, -164, -164, -164, -164, 0, 0,
- -164, 0, -164, -192, -192, 0, 0, -164, 0, 0,
- 0, 0, -192, -192, -192, -192, 0, 0, 0, 0,
- 0, 0, -192, -192, 0, 0, -192, -192, -192, -192,
- 0, 0, -192, 0, -192, 0, 0, 0, 0, -192,
- 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
- 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
- 135, 136, 137, 138, 139, 140, 141, 142, 0, 0,
- 25, 26, 0, 28, 0, 143, 144, 0, 0, 0,
- 0, 145, 31, 146, 0, 0, 33, 0, 0, 34,
- 0, 0, 0, 0, 0, 35, 36, 0, 37, 0,
- 38, 39, 40, 4, 0, 41, 5, 0, 6, 7,
- 0, 8, 9, 0, 10, 0, 0, 11, 12, 13,
- 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
- 24, 0, 0, 25, 26, 27, 28, 0, 0, 29,
- 0, 0, 0, 0, 30, 31, 32, 0, 0, 33,
- 0, 0, 34, 0, 0, 0, 0, 0, 35, 36,
- 0, 37, 0, 38, 39, 40, 4, 0, 41, 5,
- 0, 6, 7, 0, 8, 9, 0, 10, 0, 0,
- 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
- 21, 22, 23, 24, 0, 0, 25, 26, 0, 28,
- 0, 248, 29, 0, 0, 0, 0, 30, 31, 32,
- 0, 0, 33, 0, 0, 34, 0, 0, 0, 0,
- 0, 35, 36, 0, 37, 0, 38, 39, 40, 4,
- 0, 41, 5, 0, 6, 7, 0, 8, 9, 0,
- 10, 0, 0, 11, 12, 13, 14, 15, 16, 17,
+ 43, 100, 399, 45, 102, 43, 245, 96, 92, 104,
+ 331, 101, 86, 202, 203, 97, 98, 311, 277, 348,
+ 110, 111, 337, 338, 284, 311, 84, 248, 286, 165,
+ 250, 43, 169, 401, 367, 260, 370, 93, 180, 93,
+ 181, 168, 261, 91, 350, 379, 380, 301, 302, 364,
+ 84, 306, 169, 422, 429, 184, 185, 91, 433, 91,
+ 169, 93, 91, 91, -208, 103, 416, 182, 170, 170,
+ 437, 440, 91, 91, 397, 91, 91, 167, 353, 386,
+ 93, 447, 3, 232, 93, 171, 423, 312, 278, 249,
+ 292, 293, 294, -221, 93, 312, 93, 354, 232, 262,
+ 441, 43, 365, 170, 93, 171, 94, 448, 94, 390,
+ 335, 259, 43, 171, 106, 263, 326, 395, 419, 43,
+ 173, 100, 92, 96, 102, 86, 344, 114, 410, 104,
+ 94, 101, 279, 246, -218, 97, 98, 166, -228, 403,
+ 110, 111, 174, 327, 408, 319, 160, 409, 43, 94,
+ -236, 269, 201, 94, 273, 84, 175, 91, -237, 275,
+ 170, 417, 161, 94, 280, 94, 90, 320, 170, -211,
+ 274, 428, 247, 94, 304, 276, 352, 91, 309, 91,
+ 105, 176, 109, 303, 355, 112, 113, 308, 177, 270,
+ 189, 190, 266, 191, 267, 156, 157, 192, 158, 159,
+ 388, 271, 449, 252, 178, 393, 179, 394, 193, 451,
+ 91, 253, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 310, 183, 245, 245,
+ 245, 245, 245, 245, 245, 245, 376, 377, 170, 245,
+ 245, 434, 356, 333, 186, 187, 188, 8, 229, 332,
+ 256, 189, 190, 328, 191, 11, 12, 170, 192, 15,
+ 378, 17, 18, 340, 340, 189, 190, -219, 245, 329,
+ 442, 442, 189, 190, 28, 191, -225, 87, -229, 192,
+ 90, -231, 30, 31, 32, 281, 195, 88, 196, 197,
+ 329, 199, 314, 200, 197, 400, 296, 297, 232, 37,
+ 105, -216, 109, 40, -203, -202, 41, 272, 318, 321,
+ 322, 43, 245, 323, 357, 325, 232, 324, 253, 160,
+ 347, 349, 363, 414, 358, 351, 361, 383, 381, 391,
+ 275, 392, 396, 404, 411, 43, 43, 402, 384, 385,
+ 427, 430, 435, 438, 389, 2, 298, 299, 300, 439,
+ 445, 232, 446, 450, 100, 368, 91, 368, 91, 91,
+ 91, 91, 91, 91, 91, 444, 368, 368, 336, 398,
+ 436, 425, 334, 194, 285, 369, 371, 287, 290, 288,
+ 372, 289, 375, 345, 373, 291, 374, 100, 346, 341,
+ 295, 343, 421, 0, 43, 368, 0, 415, 426, 0,
+ 0, 43, 0, 0, 420, 0, 0, 0, 0, 0,
+ 43, 0, 0, 45, 0, 43, 0, 0, 432, 0,
+ 0, 100, 0, 0, 0, 0, 0, 0, 100, 0,
+ 0, 0, 43, 43, 0, 230, 0, 0, 0, 368,
+ 43, 0, 6, 269, 0, 8, 0, 43, 0, 43,
+ 452, 0, 453, 11, 12, 0, 0, 15, 0, 17,
+ 18, 0, 20, 0, 22, 0, 0, 0, 0, 25,
+ 26, 0, 28, -164, 0, 87, 0, 0, 0, 0,
+ 30, 31, 32, 0, 0, 88, 0, 0, -164, 0,
+ -164, 0, 0, 0, 35, 36, 0, 37, 0, 38,
+ 39, 40, 0, 0, 41, -164, -164, 0, 0, 0,
+ 0, 0, 0, 0, -164, -164, -164, -164, -192, 0,
+ 0, 0, 0, 0, -164, -164, 0, 0, -164, -164,
+ -164, -164, 0, -192, -164, -192, -164, 0, 0, 0,
+ 0, -164, 0, 0, 0, 0, 0, 0, 0, 0,
+ -192, -192, 0, 0, 0, 0, 0, 0, 0, -192,
+ -192, -192, -192, 0, 0, 0, 0, 0, 0, -192,
+ -192, 0, 0, -192, -192, -192, -192, 0, 0, -192,
+ 0, -192, 0, 0, 0, 0, -192, 115, 116, 117,
+ 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ 138, 139, 140, 141, 142, 143, 144, 0, 0, 25,
+ 26, 0, 28, 0, 145, 146, 0, 0, 0, 0,
+ 147, 31, 148, 0, 0, 33, 0, 0, 34, 0,
+ 0, 0, 0, 0, 35, 36, 0, 37, 0, 38,
+ 39, 40, 4, 0, 41, 5, 0, 6, 7, 0,
+ 8, 9, 0, 10, 0, 0, 0, 0, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 0, 0, 25, 26, 27, 28, 0, 0,
+ 29, 0, 0, 0, 0, 30, 31, 32, 0, 0,
+ 33, 0, 0, 34, 0, 0, 0, 0, 0, 35,
+ 36, 0, 37, 0, 38, 39, 40, 4, 0, 41,
+ 5, 0, 6, 7, 0, 8, 9, 0, 10, 0,
+ 0, 0, 0, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 0, 0, 25,
- 26, 0, 28, 0, 261, 29, 0, 0, 0, 0,
+ 26, 0, 28, 0, 251, 29, 0, 0, 0, 0,
30, 31, 32, 0, 0, 33, 0, 0, 34, 0,
0, 0, 0, 0, 35, 36, 0, 37, 0, 38,
39, 40, 4, 0, 41, 5, 0, 6, 7, 0,
- 8, 9, 0, 10, 0, 0, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- 0, 0, 25, 26, 0, 28, 0, 0, 29, 0,
- 0, 0, 0, 30, 31, 32, 0, 0, 33, 0,
- 0, 34, 0, 0, 0, 0, 6, 35, 36, 8,
- 37, 0, 38, 39, 40, 11, 12, 41, 0, 15,
+ 8, 9, 0, 10, 0, 0, 0, 0, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 0, 0, 25, 26, 0, 28, 0, 268,
+ 29, 0, 0, 0, 0, 30, 31, 32, 0, 0,
+ 33, 0, 0, 34, 0, 0, 0, 0, 0, 35,
+ 36, 0, 37, 0, 38, 39, 40, 4, 0, 41,
+ 5, 0, 6, 7, 0, 8, 9, 0, 10, 0,
+ 0, 0, 0, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 0, 0, 25,
+ 26, 0, 28, 0, 0, 29, 0, 0, 0, 0,
+ 30, 31, 32, 0, 0, 33, 0, 0, 34, 0,
+ 0, 0, 0, 0, 35, 36, 0, 37, 0, 38,
+ 39, 40, 6, 0, 41, 8, 0, 0, 0, 0,
+ 0, 0, 0, 11, 12, 0, 0, 15, 0, 17,
+ 18, 0, 20, 0, 22, 0, 0, 0, 0, 25,
+ 26, 0, 28, 0, 0, 87, 0, 0, 0, 0,
+ 30, 31, 32, 0, 0, 88, 0, 0, 0, 0,
+ 0, 0, 0, 0, 35, 36, 0, 37, 0, 38,
+ 39, 40, 0, 6, 41, 305, 8, 0, 0, 0,
+ 0, 0, 0, 0, 11, 12, 0, 0, 15, 0,
+ 17, 18, 0, 20, 233, 22, 0, 0, 0, 0,
+ 25, 26, 0, 28, 0, 0, 87, 0, 0, 0,
+ 0, 30, 31, 32, 0, 0, 88, 0, 0, 0,
+ 0, 0, 0, 0, 0, 35, 36, 0, 37, 0,
+ 38, 39, 40, 6, 0, 41, 8, 0, 0, 0,
+ 0, 0, 0, 0, 11, 12, 0, 0, 15, 0,
+ 17, 18, 0, 20, 0, 22, 0, 0, 0, 0,
+ 25, 26, 0, 28, 0, 0, 87, 0, 0, 0,
+ 0, 30, 31, 32, 0, 0, 88, 0, 0, 0,
+ -226, 0, 0, 0, 0, 35, 36, 0, 37, 0,
+ 38, 39, 40, 6, 0, 41, 8, 0, 0, 0,
+ 0, 0, 0, 0, 11, 12, 0, 0, 15, 0,
+ 17, 18, 0, 20, 0, 22, 0, 0, 0, 0,
+ 25, 26, 0, 28, 0, 0, 87, 0, 0, 0,
+ 0, 30, 31, 32, 0, 0, 88, 0, 0, 0,
+ 0, 0, 0, 0, 0, 35, 36, 0, 37, 0,
+ 38, 39, 40, 387, 6, 41, 0, 8, 0, 0,
+ 0, 0, 0, 0, 0, 11, 12, 0, 0, 15,
0, 17, 18, 0, 20, 0, 22, 0, 0, 0,
0, 25, 26, 0, 28, 0, 0, 87, 0, 0,
0, 0, 30, 31, 32, 0, 0, 88, 0, 0,
- 0, 0, 0, 0, 0, 6, 35, 36, 8, 37,
- 0, 38, 39, 40, 11, 12, 41, 298, 15, 0,
- 17, 18, 0, 20, 230, 22, 0, 0, 0, 0,
- 25, 26, 0, 28, 0, 0, 87, 0, 0, 0,
- 0, 30, 31, 32, 0, 0, 88, 0, 0, 0,
- 0, 0, 0, 0, 6, 35, 36, 8, 37, 0,
- 38, 39, 40, 11, 12, 41, 0, 15, 0, 17,
- 18, 0, 20, 0, 22, 0, 0, 0, 0, 25,
- 26, 0, 28, 0, 0, 87, 0, 0, 0, 0,
- 30, 31, 32, 0, 0, 88, 0, 0, 0, -220,
- 0, 0, 0, 6, 35, 36, 8, 37, 0, 38,
- 39, 40, 11, 12, 41, 0, 15, 0, 17, 18,
- 0, 20, 0, 22, 0, 0, 0, 0, 25, 26,
- 0, 28, 0, 0, 87, 0, 0, 0, 0, 30,
- 31, 32, 0, 0, 88, 0, 0, 0, 0, 0,
- 0, 0, 0, 35, 36, 0, 37, 0, 38, 39,
- 40, 376, 6, 41, 0, 8, 0, 0, 0, 0,
- 0, 11, 12, 0, 0, 15, 0, 17, 18, 0,
- 20, 0, 22, 0, 0, 0, 0, 25, 26, 0,
- 28, 0, 0, 87, 0, 0, 0, 0, 30, 31,
- 32, 0, 0, 88, 0, 0, 0, 0, 0, 0,
- 0, 0, 35, 36, 0, 37, 0, 38, 39, 40,
- 0, 0, 41, 201, 116, 117, 202, 119, 203, 204,
- 122, 205, 206, 125, 207, 127, 128, 208, 209, 210,
- 211, 212, 213, 214, 215, 216, 217, 218, 219, 220,
- 221, 0, 0, 0, 0, 0, 0, 0, 222, 223,
- 0, 0, 0, 0, 224, 0, 225, 201, 116, 117,
- 202, 119, 203, 204, 122, 205, 206, 125, 207, 127,
- 128, 208, 209, 210, 211, 212, 213, 214, 215, 216,
- 217, 218, 219, 220, 221, 0, 0, 0, 0, 0,
- 0, 0, 0, 223, 0, 0, 0, 0, 224, 0,
- 225, 201, 116, 117, 202, 119, 203, 204, 122, 205,
- 206, 125, 207, 127, 128, 208, 209, 210, 211, 212,
- 213, 214, 215, 216, 217, 218, 219, 220, 221, 0,
- 0, 0, 0, 0, 0, 0, 0, 223
+ 0, 0, 0, 0, 0, 0, 35, 36, 0, 37,
+ 0, 38, 39, 40, 0, 0, 41, 204, 116, 117,
+ 205, 119, 206, 207, 122, 208, 209, 125, 210, 127,
+ 128, 129, 130, 211, 212, 213, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, 224, 0, 0, 0,
+ 0, 0, 0, 0, 225, 226, 0, 0, 0, 0,
+ 227, 0, 228, 204, 116, 117, 205, 119, 206, 207,
+ 122, 208, 209, 125, 210, 127, 128, 129, 130, 211,
+ 212, 213, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, 224, 0, 0, 0, 0, 0, 0, 0,
+ 342, 226, 0, 0, 0, 0, 227, 0, 228, 204,
+ 116, 117, 205, 119, 206, 207, 122, 208, 209, 125,
+ 210, 264, 128, 265, 130, 211, 212, 213, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, 224, 0,
+ 0, 0, 0, 0, 0, 0, 0, 226, 0, 0,
+ 0, 0, 227, 0, 228, 204, 116, 117, 205, 119,
+ 206, 207, 122, 208, 209, 125, 210, 264, 128, 265,
+ 130, 211, 212, 213, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, 224, 0, 0, 0, 0, 0,
+ 0, 0, 0, 226
};
static const yytype_int16 yycheck[] =
{
- 2, 96, 110, 2, 273, 7, 11, 19, 7, 13,
- 11, 351, 16, 5, 355, 311, 38, 313, 16, 10,
- 1, 85, 86, 14, 1, 7, 322, 323, 50, 1,
- 6, 33, 23, 24, 49, 99, 1, 41, 102, 32,
- 15, 16, 50, 107, 20, 43, 22, 388, 1, 25,
- 26, 347, 400, 44, 1, 0, 38, 53, 66, 35,
- 36, 54, 38, 39, 1, 1, 1, 407, 43, 50,
- 50, 1, 32, 39, 39, 161, 39, 425, 1, 419,
- 421, 167, 177, 178, 179, 171, 427, 53, 69, 69,
- 37, 95, 69, 1, 54, 391, 68, 101, 39, 52,
- 31, 103, 56, 68, 190, 191, 110, 111, 194, 378,
- 1, 55, 114, 47, 1, 114, 53, 53, 53, 121,
- 96, 68, 121, 53, 129, 137, 118, 131, 129, 52,
- 134, 68, 68, 68, 50, 126, 78, 50, 68, 5,
- 53, 132, 246, 57, 120, 53, 148, 13, 41, 148,
- 141, 142, 50, 69, 258, 259, 98, 15, 50, 50,
- 68, 52, 138, 50, 140, 52, 39, 253, 66, 50,
- 50, 42, 276, 164, 66, 33, 34, 193, 36, 265,
- 53, 197, 40, 58, 59, 66, 66, 65, 192, 67,
- 68, 29, 196, 51, 170, 303, 172, 173, 174, 175,
- 176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
- 33, 34, 65, 321, 67, 68, 311, 312, 313, 314,
- 315, 316, 317, 318, 319, 320, 50, 322, 323, 33,
- 34, 51, 36, 337, 53, 226, 40, 53, 250, 33,
- 34, 345, 36, 53, 352, 53, 40, 51, 53, 335,
- 422, 423, 347, 50, 340, 53, 342, 51, 249, 11,
- 60, 61, 62, 367, 53, 17, 18, 53, 372, 21,
- 39, 23, 24, 39, 181, 182, 31, 55, 57, 56,
- 41, 13, 50, 39, 36, 389, 50, 39, 53, 375,
- 15, 51, 44, 45, 46, 399, 391, 49, 49, 303,
- 50, 39, 39, 50, 306, 53, 49, 306, 10, 61,
- 4, 53, 38, 65, 49, 38, 68, 321, 49, 53,
- 384, 38, 38, 0, 428, 423, 350, 256, 330, 331,
- 434, 330, 331, 413, 395, 311, 312, 313, 314, 315,
- 316, 317, 318, 319, 320, 336, 322, 323, 352, 6,
- 251, 355, 170, 75, 312, 172, 315, 314, 173, 180,
- 174, 316, 175, 20, 176, 22, 317, 266, 25, 26,
- 318, 347, 266, -1, 264, -1, -1, -1, 35, 36,
- -1, 38, 39, 385, 388, 397, 385, -1, -1, 393,
- 392, -1, -1, 392, -1, -1, -1, -1, -1, 401,
- -1, -1, 401, -1, 406, -1, -1, 406, -1, -1,
- -1, -1, -1, -1, -1, 391, -1, 421, -1, -1,
- 422, 423, -1, 427, -1, -1, -1, 429, -1, -1,
- 429, -1, 1, 435, -1, 437, 435, -1, 437, 8,
- -1, -1, 11, -1, -1, -1, -1, -1, 17, 18,
- -1, -1, 21, -1, 23, 24, -1, 26, -1, 28,
- -1, -1, -1, 120, 33, 34, -1, 36, -1, -1,
- 39, -1, -1, -1, -1, 44, 45, 46, -1, -1,
- 49, 138, -1, 140, -1, -1, -1, -1, -1, 58,
- 59, 1, 61, -1, 63, 64, 65, -1, -1, 68,
- -1, -1, -1, -1, -1, 15, 16, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 31, 32, 1, -1, -1, 183, 184, 185, -1,
- 40, 41, 42, 43, -1, -1, -1, 15, 16, -1,
- 50, 51, -1, -1, 54, 55, 56, 57, -1, -1,
- 60, -1, 62, 31, 32, -1, -1, 67, -1, -1,
- -1, -1, 40, 41, 42, 43, -1, -1, -1, -1,
- -1, -1, 50, 51, -1, -1, 54, 55, 56, 57,
- -1, -1, 60, -1, 62, -1, -1, -1, -1, 67,
- 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
- 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 23, 24, 25, 26, 27, 28, 29, 30, -1, -1,
- 33, 34, -1, 36, -1, 38, 39, -1, -1, -1,
- -1, 44, 45, 46, -1, -1, 49, -1, -1, 52,
- -1, -1, -1, -1, -1, 58, 59, -1, 61, -1,
- 63, 64, 65, 3, -1, 68, 6, -1, 8, 9,
- -1, 11, 12, -1, 14, -1, -1, 17, 18, 19,
- 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
- 30, -1, -1, 33, 34, 35, 36, -1, -1, 39,
- -1, -1, -1, -1, 44, 45, 46, -1, -1, 49,
- -1, -1, 52, -1, -1, -1, -1, -1, 58, 59,
- -1, 61, -1, 63, 64, 65, 3, -1, 68, 6,
- -1, 8, 9, -1, 11, 12, -1, 14, -1, -1,
- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
- 27, 28, 29, 30, -1, -1, 33, 34, -1, 36,
- -1, 38, 39, -1, -1, -1, -1, 44, 45, 46,
- -1, -1, 49, -1, -1, 52, -1, -1, -1, -1,
- -1, 58, 59, -1, 61, -1, 63, 64, 65, 3,
- -1, 68, 6, -1, 8, 9, -1, 11, 12, -1,
- 14, -1, -1, 17, 18, 19, 20, 21, 22, 23,
- 24, 25, 26, 27, 28, 29, 30, -1, -1, 33,
- 34, -1, 36, -1, 38, 39, -1, -1, -1, -1,
- 44, 45, 46, -1, -1, 49, -1, -1, 52, -1,
- -1, -1, -1, -1, 58, 59, -1, 61, -1, 63,
- 64, 65, 3, -1, 68, 6, -1, 8, 9, -1,
- 11, 12, -1, 14, -1, -1, 17, 18, 19, 20,
+ 2, 13, 362, 2, 16, 7, 96, 10, 7, 19,
+ 249, 14, 5, 85, 86, 11, 11, 1, 164, 280,
+ 23, 24, 261, 262, 170, 1, 41, 99, 174, 41,
+ 102, 33, 1, 366, 318, 107, 320, 1, 16, 1,
+ 18, 44, 110, 6, 283, 329, 330, 193, 194, 1,
+ 41, 197, 1, 7, 411, 60, 61, 20, 418, 22,
+ 1, 1, 25, 26, 55, 51, 399, 45, 52, 52,
+ 427, 431, 35, 36, 358, 38, 39, 41, 52, 340,
+ 1, 438, 0, 95, 1, 54, 40, 71, 71, 101,
+ 180, 181, 182, 55, 1, 71, 1, 71, 110, 111,
+ 433, 103, 54, 52, 1, 54, 70, 440, 70, 348,
+ 256, 52, 114, 54, 41, 114, 18, 356, 402, 121,
+ 34, 133, 121, 126, 136, 118, 272, 55, 389, 139,
+ 70, 134, 39, 96, 55, 131, 131, 49, 55, 378,
+ 143, 144, 56, 45, 383, 34, 52, 386, 150, 70,
+ 55, 150, 78, 70, 52, 41, 33, 120, 55, 52,
+ 52, 400, 68, 70, 167, 70, 6, 56, 52, 55,
+ 68, 410, 98, 70, 196, 68, 68, 140, 200, 142,
+ 20, 57, 22, 195, 68, 25, 26, 199, 58, 40,
+ 35, 36, 127, 38, 129, 35, 36, 42, 38, 39,
+ 346, 52, 441, 5, 59, 351, 43, 353, 53, 448,
+ 173, 13, 175, 176, 177, 178, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, 188, 229, 44, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 52, 329,
+ 330, 55, 310, 253, 62, 63, 64, 11, 31, 252,
+ 53, 35, 36, 16, 38, 19, 20, 52, 42, 23,
+ 328, 25, 26, 266, 267, 35, 36, 55, 358, 53,
+ 434, 435, 35, 36, 38, 38, 55, 41, 55, 42,
+ 120, 55, 46, 47, 48, 41, 67, 51, 69, 70,
+ 53, 67, 41, 69, 70, 363, 184, 185, 310, 63,
+ 140, 55, 142, 67, 55, 55, 70, 55, 52, 33,
+ 57, 313, 402, 58, 313, 43, 328, 59, 13, 52,
+ 41, 52, 16, 395, 53, 55, 52, 41, 51, 41,
+ 52, 51, 10, 4, 51, 337, 338, 55, 337, 338,
+ 51, 40, 55, 51, 347, 0, 186, 187, 188, 40,
+ 40, 363, 40, 40, 366, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 435, 329, 330, 259, 361,
+ 424, 406, 254, 75, 173, 319, 321, 175, 178, 176,
+ 322, 177, 325, 273, 323, 179, 324, 399, 273, 267,
+ 183, 271, 404, -1, 396, 358, -1, 396, 408, -1,
+ -1, 403, -1, -1, 403, -1, -1, -1, -1, -1,
+ 412, -1, -1, 412, -1, 417, -1, -1, 417, -1,
+ -1, 433, -1, -1, -1, -1, -1, -1, 440, -1,
+ -1, -1, 434, 435, -1, 1, -1, -1, -1, 402,
+ 442, -1, 8, 442, -1, 11, -1, 449, -1, 451,
+ 449, -1, 451, 19, 20, -1, -1, 23, -1, 25,
+ 26, -1, 28, -1, 30, -1, -1, -1, -1, 35,
+ 36, -1, 38, 1, -1, 41, -1, -1, -1, -1,
+ 46, 47, 48, -1, -1, 51, -1, -1, 16, -1,
+ 18, -1, -1, -1, 60, 61, -1, 63, -1, 65,
+ 66, 67, -1, -1, 70, 33, 34, -1, -1, -1,
+ -1, -1, -1, -1, 42, 43, 44, 45, 1, -1,
+ -1, -1, -1, -1, 52, 53, -1, -1, 56, 57,
+ 58, 59, -1, 16, 62, 18, 64, -1, -1, -1,
+ -1, 69, -1, -1, -1, -1, -1, -1, -1, -1,
+ 33, 34, -1, -1, -1, -1, -1, -1, -1, 42,
+ 43, 44, 45, -1, -1, -1, -1, -1, -1, 52,
+ 53, -1, -1, 56, 57, 58, 59, -1, -1, 62,
+ -1, 64, -1, -1, -1, -1, 69, 3, 4, 5,
+ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, -1, -1, 35,
+ 36, -1, 38, -1, 40, 41, -1, -1, -1, -1,
+ 46, 47, 48, -1, -1, 51, -1, -1, 54, -1,
+ -1, -1, -1, -1, 60, 61, -1, 63, -1, 65,
+ 66, 67, 3, -1, 70, 6, -1, 8, 9, -1,
+ 11, 12, -1, 14, -1, -1, -1, -1, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
- -1, -1, 33, 34, -1, 36, -1, -1, 39, -1,
- -1, -1, -1, 44, 45, 46, -1, -1, 49, -1,
- -1, 52, -1, -1, -1, -1, 8, 58, 59, 11,
- 61, -1, 63, 64, 65, 17, 18, 68, -1, 21,
- -1, 23, 24, -1, 26, -1, 28, -1, -1, -1,
- -1, 33, 34, -1, 36, -1, -1, 39, -1, -1,
- -1, -1, 44, 45, 46, -1, -1, 49, -1, -1,
- -1, -1, -1, -1, -1, 8, 58, 59, 11, 61,
- -1, 63, 64, 65, 17, 18, 68, 69, 21, -1,
- 23, 24, -1, 26, 27, 28, -1, -1, -1, -1,
- 33, 34, -1, 36, -1, -1, 39, -1, -1, -1,
- -1, 44, 45, 46, -1, -1, 49, -1, -1, -1,
- -1, -1, -1, -1, 8, 58, 59, 11, 61, -1,
- 63, 64, 65, 17, 18, 68, -1, 21, -1, 23,
- 24, -1, 26, -1, 28, -1, -1, -1, -1, 33,
- 34, -1, 36, -1, -1, 39, -1, -1, -1, -1,
- 44, 45, 46, -1, -1, 49, -1, -1, -1, 53,
- -1, -1, -1, 8, 58, 59, 11, 61, -1, 63,
- 64, 65, 17, 18, 68, -1, 21, -1, 23, 24,
- -1, 26, -1, 28, -1, -1, -1, -1, 33, 34,
- -1, 36, -1, -1, 39, -1, -1, -1, -1, 44,
- 45, 46, -1, -1, 49, -1, -1, -1, -1, -1,
- -1, -1, -1, 58, 59, -1, 61, -1, 63, 64,
- 65, 66, 8, 68, -1, 11, -1, -1, -1, -1,
- -1, 17, 18, -1, -1, 21, -1, 23, 24, -1,
- 26, -1, 28, -1, -1, -1, -1, 33, 34, -1,
- 36, -1, -1, 39, -1, -1, -1, -1, 44, 45,
- 46, -1, -1, 49, -1, -1, -1, -1, -1, -1,
- -1, -1, 58, 59, -1, 61, -1, 63, 64, 65,
- -1, -1, 68, 3, 4, 5, 6, 7, 8, 9,
- 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
- 30, -1, -1, -1, -1, -1, -1, -1, 38, 39,
- -1, -1, -1, -1, 44, -1, 46, 3, 4, 5,
+ 31, 32, -1, -1, 35, 36, 37, 38, -1, -1,
+ 41, -1, -1, -1, -1, 46, 47, 48, -1, -1,
+ 51, -1, -1, 54, -1, -1, -1, -1, -1, 60,
+ 61, -1, 63, -1, 65, 66, 67, 3, -1, 70,
+ 6, -1, 8, 9, -1, 11, 12, -1, 14, -1,
+ -1, -1, -1, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, -1, -1, 35,
+ 36, -1, 38, -1, 40, 41, -1, -1, -1, -1,
+ 46, 47, 48, -1, -1, 51, -1, -1, 54, -1,
+ -1, -1, -1, -1, 60, 61, -1, 63, -1, 65,
+ 66, 67, 3, -1, 70, 6, -1, 8, 9, -1,
+ 11, 12, -1, 14, -1, -1, -1, -1, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, -1, -1, 35, 36, -1, 38, -1, 40,
+ 41, -1, -1, -1, -1, 46, 47, 48, -1, -1,
+ 51, -1, -1, 54, -1, -1, -1, -1, -1, 60,
+ 61, -1, 63, -1, 65, 66, 67, 3, -1, 70,
+ 6, -1, 8, 9, -1, 11, 12, -1, 14, -1,
+ -1, -1, -1, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, -1, -1, 35,
+ 36, -1, 38, -1, -1, 41, -1, -1, -1, -1,
+ 46, 47, 48, -1, -1, 51, -1, -1, 54, -1,
+ -1, -1, -1, -1, 60, 61, -1, 63, -1, 65,
+ 66, 67, 8, -1, 70, 11, -1, -1, -1, -1,
+ -1, -1, -1, 19, 20, -1, -1, 23, -1, 25,
+ 26, -1, 28, -1, 30, -1, -1, -1, -1, 35,
+ 36, -1, 38, -1, -1, 41, -1, -1, -1, -1,
+ 46, 47, 48, -1, -1, 51, -1, -1, -1, -1,
+ -1, -1, -1, -1, 60, 61, -1, 63, -1, 65,
+ 66, 67, -1, 8, 70, 71, 11, -1, -1, -1,
+ -1, -1, -1, -1, 19, 20, -1, -1, 23, -1,
+ 25, 26, -1, 28, 29, 30, -1, -1, -1, -1,
+ 35, 36, -1, 38, -1, -1, 41, -1, -1, -1,
+ -1, 46, 47, 48, -1, -1, 51, -1, -1, -1,
+ -1, -1, -1, -1, -1, 60, 61, -1, 63, -1,
+ 65, 66, 67, 8, -1, 70, 11, -1, -1, -1,
+ -1, -1, -1, -1, 19, 20, -1, -1, 23, -1,
+ 25, 26, -1, 28, -1, 30, -1, -1, -1, -1,
+ 35, 36, -1, 38, -1, -1, 41, -1, -1, -1,
+ -1, 46, 47, 48, -1, -1, 51, -1, -1, -1,
+ 55, -1, -1, -1, -1, 60, 61, -1, 63, -1,
+ 65, 66, 67, 8, -1, 70, 11, -1, -1, -1,
+ -1, -1, -1, -1, 19, 20, -1, -1, 23, -1,
+ 25, 26, -1, 28, -1, 30, -1, -1, -1, -1,
+ 35, 36, -1, 38, -1, -1, 41, -1, -1, -1,
+ -1, 46, 47, 48, -1, -1, 51, -1, -1, -1,
+ -1, -1, -1, -1, -1, 60, 61, -1, 63, -1,
+ 65, 66, 67, 68, 8, 70, -1, 11, -1, -1,
+ -1, -1, -1, -1, -1, 19, 20, -1, -1, 23,
+ -1, 25, 26, -1, 28, -1, 30, -1, -1, -1,
+ -1, 35, 36, -1, 38, -1, -1, 41, -1, -1,
+ -1, -1, 46, 47, 48, -1, -1, 51, -1, -1,
+ -1, -1, -1, -1, -1, -1, 60, 61, -1, 63,
+ -1, 65, 66, 67, -1, -1, 70, 3, 4, 5,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 30, -1, -1, -1, -1, -1,
- -1, -1, -1, 39, -1, -1, -1, -1, 44, -1,
- 46, 3, 4, 5, 6, 7, 8, 9, 10, 11,
- 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 25, 26, 27, 28, 29, 30, -1,
- -1, -1, -1, -1, -1, -1, -1, 39
+ 26, 27, 28, 29, 30, 31, 32, -1, -1, -1,
+ -1, -1, -1, -1, 40, 41, -1, -1, -1, -1,
+ 46, -1, 48, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, -1, -1, -1, -1, -1, -1, -1,
+ 40, 41, -1, -1, -1, -1, 46, -1, 48, 3,
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, -1,
+ -1, -1, -1, -1, -1, -1, -1, 41, -1, -1,
+ -1, -1, 46, -1, 48, 3, 4, 5, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, -1, -1, -1, -1, -1,
+ -1, -1, -1, 41
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
- 0, 71, 73, 0, 3, 6, 8, 9, 11, 12,
- 14, 17, 18, 19, 20, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 30, 33, 34, 35, 36, 39,
- 44, 45, 46, 49, 52, 58, 59, 61, 63, 64,
- 65, 68, 72, 74, 75, 79, 82, 83, 92, 93,
- 94, 95, 100, 101, 102, 103, 104, 105, 111, 112,
- 117, 121, 123, 125, 127, 129, 131, 133, 135, 137,
- 139, 140, 141, 142, 143, 144, 145, 146, 147, 150,
- 151, 155, 161, 162, 39, 158, 158, 39, 49, 74,
- 142, 144, 79, 1, 68, 164, 164, 145, 146, 115,
- 117, 164, 117, 49, 82, 142, 39, 84, 86, 142,
- 164, 164, 142, 142, 53, 3, 4, 5, 6, 7,
+ 0, 73, 75, 0, 3, 6, 8, 9, 11, 12,
+ 14, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 35, 36, 37, 38, 41,
+ 46, 47, 48, 51, 54, 60, 61, 63, 65, 66,
+ 67, 70, 74, 76, 77, 81, 84, 85, 94, 95,
+ 96, 97, 102, 103, 104, 105, 106, 107, 113, 114,
+ 119, 123, 125, 127, 129, 131, 133, 135, 137, 139,
+ 141, 142, 143, 144, 145, 146, 147, 148, 149, 152,
+ 153, 157, 165, 166, 41, 162, 162, 41, 51, 76,
+ 144, 146, 81, 1, 70, 168, 168, 147, 148, 117,
+ 119, 168, 119, 51, 84, 144, 41, 86, 88, 144,
+ 168, 168, 144, 144, 55, 3, 4, 5, 6, 7,
8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
- 28, 29, 30, 38, 39, 44, 46, 79, 80, 156,
- 157, 159, 160, 142, 142, 142, 142, 50, 66, 152,
- 153, 154, 117, 47, 39, 164, 1, 50, 52, 163,
- 32, 54, 31, 55, 56, 57, 41, 15, 16, 43,
- 42, 58, 59, 60, 61, 62, 33, 34, 36, 40,
- 51, 120, 65, 67, 68, 148, 65, 67, 148, 163,
- 163, 3, 6, 8, 9, 11, 12, 14, 17, 18,
- 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
- 29, 30, 38, 39, 44, 46, 29, 1, 116, 117,
- 27, 118, 119, 122, 124, 126, 128, 130, 132, 134,
- 136, 138, 139, 144, 148, 163, 117, 163, 38, 5,
- 13, 113, 114, 51, 88, 89, 50, 163, 116, 117,
- 79, 38, 79, 38, 50, 53, 50, 66, 50, 66,
- 121, 69, 37, 164, 39, 77, 78, 121, 127, 121,
- 129, 131, 133, 135, 137, 139, 139, 139, 140, 141,
- 141, 142, 142, 142, 121, 121, 117, 159, 69, 121,
- 149, 117, 159, 164, 1, 69, 165, 39, 85, 87,
- 96, 50, 32, 54, 31, 55, 56, 57, 41, 16,
- 43, 15, 51, 120, 165, 164, 82, 114, 121, 86,
- 165, 165, 157, 121, 153, 154, 39, 78, 50, 165,
- 53, 66, 50, 69, 66, 116, 79, 51, 90, 91,
- 50, 98, 15, 1, 52, 166, 122, 144, 128, 122,
- 130, 132, 134, 136, 138, 139, 139, 116, 122, 122,
- 49, 106, 39, 79, 79, 53, 66, 121, 164, 165,
- 39, 49, 121, 121, 165, 10, 122, 87, 166, 116,
- 115, 53, 165, 4, 107, 108, 109, 165, 121, 78,
- 49, 73, 76, 163, 79, 115, 165, 97, 122, 79,
- 117, 7, 38, 110, 109, 82, 165, 76, 38, 99,
- 79, 166, 53, 53, 107, 49, 38, 166, 115, 80,
- 81, 81, 38, 76, 115, 165, 38, 165, 79, 79
+ 28, 29, 30, 31, 32, 40, 41, 46, 48, 81,
+ 82, 158, 159, 161, 163, 164, 144, 144, 144, 144,
+ 52, 68, 154, 155, 156, 119, 49, 41, 168, 1,
+ 52, 54, 167, 34, 56, 33, 57, 58, 59, 43,
+ 16, 18, 45, 44, 60, 61, 62, 63, 64, 35,
+ 36, 38, 42, 53, 122, 67, 69, 70, 150, 67,
+ 69, 150, 167, 167, 3, 6, 8, 9, 11, 12,
+ 14, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 40, 41, 46, 48, 31,
+ 1, 118, 119, 29, 120, 121, 124, 126, 128, 130,
+ 132, 134, 136, 138, 140, 141, 146, 150, 167, 119,
+ 167, 40, 5, 13, 115, 116, 53, 90, 91, 52,
+ 167, 118, 119, 81, 15, 17, 161, 161, 40, 81,
+ 40, 52, 55, 52, 68, 52, 68, 123, 71, 39,
+ 168, 41, 79, 80, 123, 129, 123, 131, 133, 135,
+ 137, 139, 141, 141, 141, 142, 143, 143, 144, 144,
+ 144, 123, 123, 119, 163, 71, 123, 151, 119, 163,
+ 168, 1, 71, 169, 41, 87, 89, 98, 52, 34,
+ 56, 33, 57, 58, 59, 43, 18, 45, 16, 53,
+ 122, 169, 168, 84, 116, 123, 88, 169, 169, 160,
+ 168, 160, 40, 159, 123, 155, 156, 41, 80, 52,
+ 169, 55, 68, 52, 71, 68, 118, 81, 53, 92,
+ 93, 52, 100, 16, 1, 54, 170, 124, 146, 130,
+ 124, 132, 134, 136, 138, 140, 141, 141, 118, 124,
+ 124, 51, 108, 41, 81, 81, 80, 68, 123, 168,
+ 169, 41, 51, 123, 123, 169, 10, 124, 89, 170,
+ 118, 117, 55, 169, 4, 109, 110, 111, 169, 169,
+ 80, 51, 75, 78, 167, 81, 117, 169, 99, 124,
+ 81, 119, 7, 40, 112, 111, 84, 51, 169, 78,
+ 40, 101, 81, 170, 55, 55, 109, 78, 51, 40,
+ 170, 117, 82, 83, 83, 40, 40, 78, 117, 169,
+ 40, 169, 81, 81
};
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
- 0, 70, 71, 72, 72, 73, 73, 74, 74, 74,
- 75, 76, 77, 77, 78, 78, 79, 79, 79, 79,
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
- 79, 80, 80, 81, 81, 82, 82, 83, 84, 84,
- 85, 85, 86, 87, 88, 88, 89, 90, 90, 91,
- 92, 93, 94, 94, 95, 95, 96, 97, 95, 98,
- 99, 95, 95, 95, 100, 101, 102, 103, 104, 105,
- 106, 106, 107, 107, 108, 108, 109, 110, 111, 112,
- 112, 112, 113, 114, 115, 115, 116, 116, 117, 117,
- 118, 118, 119, 119, 120, 120, 121, 121, 121, 122,
- 122, 122, 123, 123, 124, 124, 125, 125, 126, 126,
- 127, 127, 128, 128, 129, 129, 130, 130, 131, 131,
- 132, 132, 133, 133, 134, 134, 135, 135, 136, 136,
- 137, 137, 137, 137, 138, 138, 138, 139, 139, 140,
- 140, 140, 141, 141, 141, 141, 142, 142, 142, 142,
- 142, 142, 142, 142, 142, 142, 143, 143, 143, 144,
- 144, 145, 145, 146, 146, 146, 146, 146, 147, 147,
- 147, 147, 148, 148, 149, 149, 150, 150, 150, 150,
- 150, 150, 151, 151, 151, 151, 152, 152, 153, 153,
- 154, 154, 155, 155, 156, 156, 157, 157, 157, 158,
- 158, 159, 159, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 161, 161, 161, 161, 161, 161, 162, 162, 162,
- 163, 163, 164, 164, 165, 165, 166, 166
+ 0, 72, 73, 74, 74, 75, 75, 76, 76, 76,
+ 77, 78, 79, 79, 80, 80, 81, 81, 81, 81,
+ 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
+ 81, 82, 82, 83, 83, 84, 84, 85, 86, 86,
+ 87, 87, 88, 89, 90, 90, 91, 92, 92, 93,
+ 94, 95, 96, 96, 97, 97, 98, 99, 97, 100,
+ 101, 97, 97, 97, 102, 103, 104, 105, 106, 107,
+ 108, 108, 109, 109, 110, 110, 111, 112, 113, 114,
+ 114, 114, 115, 116, 117, 117, 118, 118, 119, 119,
+ 120, 120, 121, 121, 122, 122, 123, 123, 123, 124,
+ 124, 124, 125, 125, 126, 126, 127, 127, 128, 128,
+ 129, 129, 130, 130, 131, 131, 132, 132, 133, 133,
+ 134, 134, 135, 135, 136, 136, 137, 137, 138, 138,
+ 139, 139, 139, 139, 140, 140, 140, 141, 141, 142,
+ 142, 142, 143, 143, 143, 143, 144, 144, 144, 144,
+ 144, 144, 144, 144, 144, 144, 145, 145, 145, 146,
+ 146, 147, 147, 148, 148, 148, 148, 148, 149, 149,
+ 149, 149, 150, 150, 151, 151, 152, 152, 152, 152,
+ 152, 152, 153, 153, 153, 153, 154, 154, 155, 155,
+ 156, 156, 157, 157, 157, 158, 158, 159, 159, 159,
+ 160, 161, 161, 161, 162, 162, 163, 163, 164, 164,
+ 164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
+ 164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
+ 164, 164, 164, 164, 164, 164, 164, 164, 165, 165,
+ 165, 165, 165, 165, 166, 166, 166, 167, 167, 168,
+ 168, 169, 169, 170, 170
};
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
@@ -1197,12 +1235,13 @@ static const yytype_uint8 yyr2[] =
1, 1, 2, 1, 1, 4, 3, 3, 2, 2,
4, 3, 2, 3, 1, 3, 1, 1, 1, 1,
1, 3, 2, 3, 3, 5, 2, 4, 1, 2,
- 0, 1, 2, 3, 3, 5, 1, 1, 1, 0,
+ 0, 1, 2, 3, 4, 1, 3, 3, 3, 3,
+ 6, 1, 1, 1, 0, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1
+ 1, 1, 1, 1, 1
};
@@ -1885,1468 +1924,1522 @@ yyreduce:
switch (yyn)
{
case 2:
-#line 254 "parser.y" /* yacc.c:1646 */
+#line 259 "parser.y" /* yacc.c:1646 */
{ program_parsed(ctx, (yyvsp[-2].source_elements)); }
-#line 1891 "parser.tab.c" /* yacc.c:1646 */
+#line 1930 "parser.tab.c" /* yacc.c:1646 */
break;
case 3:
-#line 257 "parser.y" /* yacc.c:1646 */
+#line 262 "parser.y" /* yacc.c:1646 */
{}
-#line 1897 "parser.tab.c" /* yacc.c:1646 */
+#line 1936 "parser.tab.c" /* yacc.c:1646 */
break;
case 4:
-#line 258 "parser.y" /* yacc.c:1646 */
+#line 263 "parser.y" /* yacc.c:1646 */
{}
-#line 1903 "parser.tab.c" /* yacc.c:1646 */
+#line 1942 "parser.tab.c" /* yacc.c:1646 */
break;
case 5:
-#line 262 "parser.y" /* yacc.c:1646 */
+#line 267 "parser.y" /* yacc.c:1646 */
{ (yyval.source_elements) = new_source_elements(ctx); }
-#line 1909 "parser.tab.c" /* yacc.c:1646 */
+#line 1948 "parser.tab.c" /* yacc.c:1646 */
break;
case 6:
-#line 264 "parser.y" /* yacc.c:1646 */
+#line 269 "parser.y" /* yacc.c:1646 */
{ (yyval.source_elements) =
source_elements_add_statement((yyvsp[-1].source_elements), (yyvsp[0].statement)); }
-#line 1915 "parser.tab.c" /* yacc.c:1646 */
+#line 1954 "parser.tab.c" /* yacc.c:1646 */
break;
case 7:
-#line 269 "parser.y" /* yacc.c:1646 */
+#line 274 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_function_expression(ctx, NULL, (yyvsp[-4].parameter_list),
(yyvsp[-1].source_elements), NULL, (yyvsp[-6].srcptr),
(yyvsp[0].srcptr)-(yyvsp[-6].srcptr)+1); }
-#line 1921 "parser.tab.c" /* yacc.c:1646 */
+#line 1960 "parser.tab.c" /* yacc.c:1646 */
break;
case 8:
-#line 271 "parser.y" /* yacc.c:1646 */
+#line 276 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_function_expression(ctx, (yyvsp[-6].identifier),
(yyvsp[-4].parameter_list), (yyvsp[-1].source_elements), NULL, (yyvsp[-7].srcptr),
(yyvsp[0].srcptr)-(yyvsp[-7].srcptr)+1); }
-#line 1927 "parser.tab.c" /* yacc.c:1646 */
+#line 1966 "parser.tab.c" /* yacc.c:1646 */
break;
case 9:
-#line 273 "parser.y" /* yacc.c:1646 */
+#line 278 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_function_expression(ctx, (yyvsp[-6].identifier),
(yyvsp[-4].parameter_list), (yyvsp[-1].source_elements), (yyvsp[-8].identifier),
(yyvsp[-9].srcptr), (yyvsp[0].srcptr)-(yyvsp[-9].srcptr)+1); }
-#line 1933 "parser.tab.c" /* yacc.c:1646 */
+#line 1972 "parser.tab.c" /* yacc.c:1646 */
break;
case 10:
-#line 276 "parser.y" /* yacc.c:1646 */
+#line 281 "parser.y" /* yacc.c:1646 */
{ (yyval.srcptr) = ctx->ptr - 8; }
-#line 1939 "parser.tab.c" /* yacc.c:1646 */
+#line 1978 "parser.tab.c" /* yacc.c:1646 */
break;
case 11:
-#line 280 "parser.y" /* yacc.c:1646 */
+#line 285 "parser.y" /* yacc.c:1646 */
{ (yyval.source_elements) = (yyvsp[0].source_elements); }
-#line 1945 "parser.tab.c" /* yacc.c:1646 */
+#line 1984 "parser.tab.c" /* yacc.c:1646 */
break;
case 12:
-#line 284 "parser.y" /* yacc.c:1646 */
+#line 289 "parser.y" /* yacc.c:1646 */
{ (yyval.parameter_list) = new_parameter_list(ctx, (yyvsp[0].identifier)); }
-#line 1951 "parser.tab.c" /* yacc.c:1646 */
+#line 1990 "parser.tab.c" /* yacc.c:1646 */
break;
case 13:
-#line 286 "parser.y" /* yacc.c:1646 */
+#line 291 "parser.y" /* yacc.c:1646 */
{ (yyval.parameter_list) = parameter_list_add(ctx, (yyvsp[-2].parameter_list),
(yyvsp[0].identifier)); }
-#line 1957 "parser.tab.c" /* yacc.c:1646 */
+#line 1996 "parser.tab.c" /* yacc.c:1646 */
break;
case 14:
-#line 290 "parser.y" /* yacc.c:1646 */
+#line 295 "parser.y" /* yacc.c:1646 */
{ (yyval.parameter_list) = NULL; }
-#line 1963 "parser.tab.c" /* yacc.c:1646 */
+#line 2002 "parser.tab.c" /* yacc.c:1646 */
break;
case 15:
-#line 291 "parser.y" /* yacc.c:1646 */
+#line 296 "parser.y" /* yacc.c:1646 */
{ (yyval.parameter_list) = (yyvsp[0].parameter_list); }
-#line 1969 "parser.tab.c" /* yacc.c:1646 */
+#line 2008 "parser.tab.c" /* yacc.c:1646 */
break;
case 16:
-#line 295 "parser.y" /* yacc.c:1646 */
+#line 300 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 1975 "parser.tab.c" /* yacc.c:1646 */
+#line 2014 "parser.tab.c" /* yacc.c:1646 */
break;
case 17:
-#line 296 "parser.y" /* yacc.c:1646 */
+#line 301 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 1981 "parser.tab.c" /* yacc.c:1646 */
+#line 2020 "parser.tab.c" /* yacc.c:1646 */
break;
case 18:
-#line 297 "parser.y" /* yacc.c:1646 */
+#line 302 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 1987 "parser.tab.c" /* yacc.c:1646 */
+#line 2026 "parser.tab.c" /* yacc.c:1646 */
break;
case 19:
-#line 298 "parser.y" /* yacc.c:1646 */
+#line 303 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_expression_statement(ctx, (yyvsp[0].expr)); }
-#line 1993 "parser.tab.c" /* yacc.c:1646 */
+#line 2032 "parser.tab.c" /* yacc.c:1646 */
break;
case 20:
-#line 299 "parser.y" /* yacc.c:1646 */
+#line 304 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 1999 "parser.tab.c" /* yacc.c:1646 */
+#line 2038 "parser.tab.c" /* yacc.c:1646 */
break;
case 21:
-#line 300 "parser.y" /* yacc.c:1646 */
+#line 305 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 2005 "parser.tab.c" /* yacc.c:1646 */
+#line 2044 "parser.tab.c" /* yacc.c:1646 */
break;
case 22:
-#line 301 "parser.y" /* yacc.c:1646 */
+#line 306 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 2011 "parser.tab.c" /* yacc.c:1646 */
+#line 2050 "parser.tab.c" /* yacc.c:1646 */
break;
case 23:
-#line 302 "parser.y" /* yacc.c:1646 */
+#line 307 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 2017 "parser.tab.c" /* yacc.c:1646 */
+#line 2056 "parser.tab.c" /* yacc.c:1646 */
break;
case 24:
-#line 303 "parser.y" /* yacc.c:1646 */
+#line 308 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 2023 "parser.tab.c" /* yacc.c:1646 */
+#line 2062 "parser.tab.c" /* yacc.c:1646 */
break;
case 25:
-#line 304 "parser.y" /* yacc.c:1646 */
+#line 309 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 2029 "parser.tab.c" /* yacc.c:1646 */
+#line 2068 "parser.tab.c" /* yacc.c:1646 */
break;
case 26:
-#line 305 "parser.y" /* yacc.c:1646 */
+#line 310 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 2035 "parser.tab.c" /* yacc.c:1646 */
+#line 2074 "parser.tab.c" /* yacc.c:1646 */
break;
case 27:
-#line 306 "parser.y" /* yacc.c:1646 */
+#line 311 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 2041 "parser.tab.c" /* yacc.c:1646 */
+#line 2080 "parser.tab.c" /* yacc.c:1646 */
break;
case 28:
-#line 307 "parser.y" /* yacc.c:1646 */
+#line 312 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 2047 "parser.tab.c" /* yacc.c:1646 */
+#line 2086 "parser.tab.c" /* yacc.c:1646 */
break;
case 29:
-#line 308 "parser.y" /* yacc.c:1646 */
+#line 313 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 2053 "parser.tab.c" /* yacc.c:1646 */
+#line 2092 "parser.tab.c" /* yacc.c:1646 */
break;
case 30:
-#line 309 "parser.y" /* yacc.c:1646 */
+#line 314 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 2059 "parser.tab.c" /* yacc.c:1646 */
+#line 2098 "parser.tab.c" /* yacc.c:1646 */
break;
case 31:
-#line 313 "parser.y" /* yacc.c:1646 */
+#line 318 "parser.y" /* yacc.c:1646 */
{ (yyval.statement_list) = new_statement_list(ctx, (yyvsp[0].statement)); }
-#line 2065 "parser.tab.c" /* yacc.c:1646 */
+#line 2104 "parser.tab.c" /* yacc.c:1646 */
break;
case 32:
-#line 315 "parser.y" /* yacc.c:1646 */
+#line 320 "parser.y" /* yacc.c:1646 */
{ (yyval.statement_list) = statement_list_add((yyvsp[-1].statement_list),
(yyvsp[0].statement)); }
-#line 2071 "parser.tab.c" /* yacc.c:1646 */
+#line 2110 "parser.tab.c" /* yacc.c:1646 */
break;
case 33:
-#line 319 "parser.y" /* yacc.c:1646 */
+#line 324 "parser.y" /* yacc.c:1646 */
{ (yyval.statement_list) = NULL; }
-#line 2077 "parser.tab.c" /* yacc.c:1646 */
+#line 2116 "parser.tab.c" /* yacc.c:1646 */
break;
case 34:
-#line 320 "parser.y" /* yacc.c:1646 */
+#line 325 "parser.y" /* yacc.c:1646 */
{ (yyval.statement_list) = (yyvsp[0].statement_list); }
-#line 2083 "parser.tab.c" /* yacc.c:1646 */
+#line 2122 "parser.tab.c" /* yacc.c:1646 */
break;
case 35:
-#line 324 "parser.y" /* yacc.c:1646 */
+#line 329 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_block_statement(ctx, (yyvsp[-1].statement_list)); }
-#line 2089 "parser.tab.c" /* yacc.c:1646 */
+#line 2128 "parser.tab.c" /* yacc.c:1646 */
break;
case 36:
-#line 325 "parser.y" /* yacc.c:1646 */
+#line 330 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_block_statement(ctx, NULL); }
-#line 2095 "parser.tab.c" /* yacc.c:1646 */
+#line 2134 "parser.tab.c" /* yacc.c:1646 */
break;
case 37:
-#line 330 "parser.y" /* yacc.c:1646 */
+#line 335 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_var_statement(ctx, (yyvsp[-1].variable_list)); }
-#line 2101 "parser.tab.c" /* yacc.c:1646 */
+#line 2140 "parser.tab.c" /* yacc.c:1646 */
break;
case 38:
-#line 334 "parser.y" /* yacc.c:1646 */
+#line 339 "parser.y" /* yacc.c:1646 */
{ (yyval.variable_list) = new_variable_list(ctx, (yyvsp[0].variable_declaration)); }
-#line 2107 "parser.tab.c" /* yacc.c:1646 */
+#line 2146 "parser.tab.c" /* yacc.c:1646 */
break;
case 39:
-#line 336 "parser.y" /* yacc.c:1646 */
+#line 341 "parser.y" /* yacc.c:1646 */
{ (yyval.variable_list) = variable_list_add(ctx, (yyvsp[-2].variable_list),
(yyvsp[0].variable_declaration)); }
-#line 2113 "parser.tab.c" /* yacc.c:1646 */
+#line 2152 "parser.tab.c" /* yacc.c:1646 */
break;
case 40:
-#line 341 "parser.y" /* yacc.c:1646 */
+#line 346 "parser.y" /* yacc.c:1646 */
{ (yyval.variable_list) = new_variable_list(ctx, (yyvsp[0].variable_declaration)); }
-#line 2119 "parser.tab.c" /* yacc.c:1646 */
+#line 2158 "parser.tab.c" /* yacc.c:1646 */
break;
case 41:
-#line 343 "parser.y" /* yacc.c:1646 */
+#line 348 "parser.y" /* yacc.c:1646 */
{ (yyval.variable_list) = variable_list_add(ctx, (yyvsp[-2].variable_list),
(yyvsp[0].variable_declaration)); }
-#line 2125 "parser.tab.c" /* yacc.c:1646 */
+#line 2164 "parser.tab.c" /* yacc.c:1646 */
break;
case 42:
-#line 348 "parser.y" /* yacc.c:1646 */
+#line 353 "parser.y" /* yacc.c:1646 */
{ (yyval.variable_declaration) = new_variable_declaration(ctx,
(yyvsp[-1].identifier), (yyvsp[0].expr)); }
-#line 2131 "parser.tab.c" /* yacc.c:1646 */
+#line 2170 "parser.tab.c" /* yacc.c:1646 */
break;
case 43:
-#line 353 "parser.y" /* yacc.c:1646 */
+#line 358 "parser.y" /* yacc.c:1646 */
{ (yyval.variable_declaration) = new_variable_declaration(ctx,
(yyvsp[-1].identifier), (yyvsp[0].expr)); }
-#line 2137 "parser.tab.c" /* yacc.c:1646 */
+#line 2176 "parser.tab.c" /* yacc.c:1646 */
break;
case 44:
-#line 357 "parser.y" /* yacc.c:1646 */
+#line 362 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = NULL; }
-#line 2143 "parser.tab.c" /* yacc.c:1646 */
+#line 2182 "parser.tab.c" /* yacc.c:1646 */
break;
case 45:
-#line 358 "parser.y" /* yacc.c:1646 */
+#line 363 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2149 "parser.tab.c" /* yacc.c:1646 */
+#line 2188 "parser.tab.c" /* yacc.c:1646 */
break;
case 46:
-#line 363 "parser.y" /* yacc.c:1646 */
+#line 368 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2155 "parser.tab.c" /* yacc.c:1646 */
+#line 2194 "parser.tab.c" /* yacc.c:1646 */
break;
case 47:
-#line 367 "parser.y" /* yacc.c:1646 */
+#line 372 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = NULL; }
-#line 2161 "parser.tab.c" /* yacc.c:1646 */
+#line 2200 "parser.tab.c" /* yacc.c:1646 */
break;
case 48:
-#line 368 "parser.y" /* yacc.c:1646 */
+#line 373 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2167 "parser.tab.c" /* yacc.c:1646 */
+#line 2206 "parser.tab.c" /* yacc.c:1646 */
break;
case 49:
-#line 373 "parser.y" /* yacc.c:1646 */
+#line 378 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2173 "parser.tab.c" /* yacc.c:1646 */
+#line 2212 "parser.tab.c" /* yacc.c:1646 */
break;
case 50:
-#line 377 "parser.y" /* yacc.c:1646 */
+#line 382 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_statement(ctx, STAT_EMPTY, 0); }
-#line 2179 "parser.tab.c" /* yacc.c:1646 */
+#line 2218 "parser.tab.c" /* yacc.c:1646 */
break;
case 51:
-#line 382 "parser.y" /* yacc.c:1646 */
+#line 387 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_expression_statement(ctx, (yyvsp[-1].expr)); }
-#line 2185 "parser.tab.c" /* yacc.c:1646 */
+#line 2224 "parser.tab.c" /* yacc.c:1646 */
break;
case 52:
-#line 387 "parser.y" /* yacc.c:1646 */
+#line 392 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_if_statement(ctx, (yyvsp[-4].expr), (yyvsp[-2].statement),
(yyvsp[0].statement)); }
-#line 2191 "parser.tab.c" /* yacc.c:1646 */
+#line 2230 "parser.tab.c" /* yacc.c:1646 */
break;
case 53:
-#line 389 "parser.y" /* yacc.c:1646 */
+#line 394 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_if_statement(ctx, (yyvsp[-2].expr), (yyvsp[0].statement),
NULL); }
-#line 2197 "parser.tab.c" /* yacc.c:1646 */
+#line 2236 "parser.tab.c" /* yacc.c:1646 */
break;
case 54:
-#line 394 "parser.y" /* yacc.c:1646 */
+#line 399 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_while_statement(ctx, TRUE, (yyvsp[-2].expr),
(yyvsp[-5].statement)); }
-#line 2203 "parser.tab.c" /* yacc.c:1646 */
+#line 2242 "parser.tab.c" /* yacc.c:1646 */
break;
case 55:
-#line 396 "parser.y" /* yacc.c:1646 */
+#line 401 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_while_statement(ctx, FALSE, (yyvsp[-2].expr),
(yyvsp[0].statement)); }
-#line 2209 "parser.tab.c" /* yacc.c:1646 */
+#line 2248 "parser.tab.c" /* yacc.c:1646 */
break;
case 56:
-#line 398 "parser.y" /* yacc.c:1646 */
+#line 403 "parser.y" /* yacc.c:1646 */
{ if(!explicit_error(ctx, (yyvsp[0].expr), ';')) YYABORT; }
-#line 2215 "parser.tab.c" /* yacc.c:1646 */
+#line 2254 "parser.tab.c" /* yacc.c:1646 */
break;
case 57:
-#line 400 "parser.y" /* yacc.c:1646 */
+#line 405 "parser.y" /* yacc.c:1646 */
{ if(!explicit_error(ctx, (yyvsp[0].expr), ';')) YYABORT; }
-#line 2221 "parser.tab.c" /* yacc.c:1646 */
+#line 2260 "parser.tab.c" /* yacc.c:1646 */
break;
case 58:
-#line 402 "parser.y" /* yacc.c:1646 */
+#line 407 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_for_statement(ctx, NULL, (yyvsp[-8].expr),
(yyvsp[-5].expr), (yyvsp[-2].expr), (yyvsp[0].statement)); }
-#line 2227 "parser.tab.c" /* yacc.c:1646 */
+#line 2266 "parser.tab.c" /* yacc.c:1646 */
break;
case 59:
-#line 404 "parser.y" /* yacc.c:1646 */
+#line 409 "parser.y" /* yacc.c:1646 */
{ if(!explicit_error(ctx, (yyvsp[0].variable_list), ';')) YYABORT; }
-#line 2233 "parser.tab.c" /* yacc.c:1646 */
+#line 2272 "parser.tab.c" /* yacc.c:1646 */
break;
case 60:
-#line 406 "parser.y" /* yacc.c:1646 */
+#line 411 "parser.y" /* yacc.c:1646 */
{ if(!explicit_error(ctx, (yyvsp[0].expr), ';')) YYABORT; }
-#line 2239 "parser.tab.c" /* yacc.c:1646 */
+#line 2278 "parser.tab.c" /* yacc.c:1646 */
break;
case 61:
-#line 408 "parser.y" /* yacc.c:1646 */
+#line 413 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_for_statement(ctx, (yyvsp[-8].variable_list), NULL,
(yyvsp[-5].expr), (yyvsp[-2].expr), (yyvsp[0].statement)); }
-#line 2245 "parser.tab.c" /* yacc.c:1646 */
+#line 2284 "parser.tab.c" /* yacc.c:1646 */
break;
case 62:
-#line 410 "parser.y" /* yacc.c:1646 */
+#line 415 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_forin_statement(ctx, NULL, (yyvsp[-4].expr),
(yyvsp[-2].expr), (yyvsp[0].statement)); }
-#line 2251 "parser.tab.c" /* yacc.c:1646 */
+#line 2290 "parser.tab.c" /* yacc.c:1646 */
break;
case 63:
-#line 412 "parser.y" /* yacc.c:1646 */
+#line 417 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_forin_statement(ctx, (yyvsp[-4].variable_declaration),
NULL, (yyvsp[-2].expr), (yyvsp[0].statement)); }
-#line 2257 "parser.tab.c" /* yacc.c:1646 */
+#line 2296 "parser.tab.c" /* yacc.c:1646 */
break;
case 64:
-#line 417 "parser.y" /* yacc.c:1646 */
+#line 422 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_continue_statement(ctx, (yyvsp[-1].identifier)); }
-#line 2263 "parser.tab.c" /* yacc.c:1646 */
+#line 2302 "parser.tab.c" /* yacc.c:1646 */
break;
case 65:
-#line 422 "parser.y" /* yacc.c:1646 */
+#line 427 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_break_statement(ctx, (yyvsp[-1].identifier)); }
-#line 2269 "parser.tab.c" /* yacc.c:1646 */
+#line 2308 "parser.tab.c" /* yacc.c:1646 */
break;
case 66:
-#line 427 "parser.y" /* yacc.c:1646 */
+#line 432 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_return_statement(ctx, (yyvsp[-1].expr)); }
-#line 2275 "parser.tab.c" /* yacc.c:1646 */
+#line 2314 "parser.tab.c" /* yacc.c:1646 */
break;
case 67:
-#line 432 "parser.y" /* yacc.c:1646 */
+#line 437 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_with_statement(ctx, (yyvsp[-2].expr),
(yyvsp[0].statement)); }
-#line 2281 "parser.tab.c" /* yacc.c:1646 */
+#line 2320 "parser.tab.c" /* yacc.c:1646 */
break;
case 68:
-#line 437 "parser.y" /* yacc.c:1646 */
+#line 442 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_labelled_statement(ctx, (yyvsp[-2].identifier),
(yyvsp[0].statement)); }
-#line 2287 "parser.tab.c" /* yacc.c:1646 */
+#line 2326 "parser.tab.c" /* yacc.c:1646 */
break;
case 69:
-#line 442 "parser.y" /* yacc.c:1646 */
+#line 447 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_switch_statement(ctx, (yyvsp[-2].expr),
(yyvsp[0].case_clausule)); }
-#line 2293 "parser.tab.c" /* yacc.c:1646 */
+#line 2332 "parser.tab.c" /* yacc.c:1646 */
break;
case 70:
-#line 447 "parser.y" /* yacc.c:1646 */
+#line 452 "parser.y" /* yacc.c:1646 */
{ (yyval.case_clausule) = new_case_block(ctx, (yyvsp[-1].case_list), NULL, NULL); }
-#line 2299 "parser.tab.c" /* yacc.c:1646 */
+#line 2338 "parser.tab.c" /* yacc.c:1646 */
break;
case 71:
-#line 449 "parser.y" /* yacc.c:1646 */
+#line 454 "parser.y" /* yacc.c:1646 */
{ (yyval.case_clausule) = new_case_block(ctx, (yyvsp[-3].case_list),
(yyvsp[-2].case_clausule), (yyvsp[-1].case_list)); }
-#line 2305 "parser.tab.c" /* yacc.c:1646 */
+#line 2344 "parser.tab.c" /* yacc.c:1646 */
break;
case 72:
-#line 453 "parser.y" /* yacc.c:1646 */
+#line 458 "parser.y" /* yacc.c:1646 */
{ (yyval.case_list) = NULL; }
-#line 2311 "parser.tab.c" /* yacc.c:1646 */
+#line 2350 "parser.tab.c" /* yacc.c:1646 */
break;
case 73:
-#line 454 "parser.y" /* yacc.c:1646 */
+#line 459 "parser.y" /* yacc.c:1646 */
{ (yyval.case_list) = (yyvsp[0].case_list); }
-#line 2317 "parser.tab.c" /* yacc.c:1646 */
+#line 2356 "parser.tab.c" /* yacc.c:1646 */
break;
case 74:
-#line 458 "parser.y" /* yacc.c:1646 */
+#line 463 "parser.y" /* yacc.c:1646 */
{ (yyval.case_list) = new_case_list(ctx, (yyvsp[0].case_clausule)); }
-#line 2323 "parser.tab.c" /* yacc.c:1646 */
+#line 2362 "parser.tab.c" /* yacc.c:1646 */
break;
case 75:
-#line 460 "parser.y" /* yacc.c:1646 */
+#line 465 "parser.y" /* yacc.c:1646 */
{ (yyval.case_list) = case_list_add(ctx, (yyvsp[-1].case_list),
(yyvsp[0].case_clausule)); }
-#line 2329 "parser.tab.c" /* yacc.c:1646 */
+#line 2368 "parser.tab.c" /* yacc.c:1646 */
break;
case 76:
-#line 465 "parser.y" /* yacc.c:1646 */
+#line 470 "parser.y" /* yacc.c:1646 */
{ (yyval.case_clausule) = new_case_clausule(ctx, (yyvsp[-2].expr),
(yyvsp[0].statement_list)); }
-#line 2335 "parser.tab.c" /* yacc.c:1646 */
+#line 2374 "parser.tab.c" /* yacc.c:1646 */
break;
case 77:
-#line 470 "parser.y" /* yacc.c:1646 */
+#line 475 "parser.y" /* yacc.c:1646 */
{ (yyval.case_clausule) = new_case_clausule(ctx, NULL, (yyvsp[0].statement_list)); }
-#line 2341 "parser.tab.c" /* yacc.c:1646 */
+#line 2380 "parser.tab.c" /* yacc.c:1646 */
break;
case 78:
-#line 475 "parser.y" /* yacc.c:1646 */
+#line 480 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_throw_statement(ctx, (yyvsp[-1].expr)); }
-#line 2347 "parser.tab.c" /* yacc.c:1646 */
+#line 2386 "parser.tab.c" /* yacc.c:1646 */
break;
case 79:
-#line 479 "parser.y" /* yacc.c:1646 */
+#line 484 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_try_statement(ctx, (yyvsp[-1].statement),
(yyvsp[0].catch_block), NULL); }
-#line 2353 "parser.tab.c" /* yacc.c:1646 */
+#line 2392 "parser.tab.c" /* yacc.c:1646 */
break;
case 80:
-#line 480 "parser.y" /* yacc.c:1646 */
+#line 485 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_try_statement(ctx, (yyvsp[-1].statement), NULL,
(yyvsp[0].statement)); }
-#line 2359 "parser.tab.c" /* yacc.c:1646 */
+#line 2398 "parser.tab.c" /* yacc.c:1646 */
break;
case 81:
-#line 482 "parser.y" /* yacc.c:1646 */
+#line 487 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_try_statement(ctx, (yyvsp[-2].statement),
(yyvsp[-1].catch_block), (yyvsp[0].statement)); }
-#line 2365 "parser.tab.c" /* yacc.c:1646 */
+#line 2404 "parser.tab.c" /* yacc.c:1646 */
break;
case 82:
-#line 487 "parser.y" /* yacc.c:1646 */
+#line 492 "parser.y" /* yacc.c:1646 */
{ (yyval.catch_block) = new_catch_block(ctx, (yyvsp[-2].identifier),
(yyvsp[0].statement)); }
-#line 2371 "parser.tab.c" /* yacc.c:1646 */
+#line 2410 "parser.tab.c" /* yacc.c:1646 */
break;
case 83:
-#line 491 "parser.y" /* yacc.c:1646 */
+#line 496 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 2377 "parser.tab.c" /* yacc.c:1646 */
+#line 2416 "parser.tab.c" /* yacc.c:1646 */
break;
case 84:
-#line 495 "parser.y" /* yacc.c:1646 */
+#line 500 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = NULL; }
-#line 2383 "parser.tab.c" /* yacc.c:1646 */
+#line 2422 "parser.tab.c" /* yacc.c:1646 */
break;
case 85:
-#line 496 "parser.y" /* yacc.c:1646 */
+#line 501 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2389 "parser.tab.c" /* yacc.c:1646 */
+#line 2428 "parser.tab.c" /* yacc.c:1646 */
break;
case 86:
-#line 499 "parser.y" /* yacc.c:1646 */
+#line 504 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2395 "parser.tab.c" /* yacc.c:1646 */
+#line 2434 "parser.tab.c" /* yacc.c:1646 */
break;
case 87:
-#line 500 "parser.y" /* yacc.c:1646 */
+#line 505 "parser.y" /* yacc.c:1646 */
{ set_error(ctx, JS_E_SYNTAX); YYABORT; }
-#line 2401 "parser.tab.c" /* yacc.c:1646 */
+#line 2440 "parser.tab.c" /* yacc.c:1646 */
break;
case 88:
-#line 504 "parser.y" /* yacc.c:1646 */
+#line 509 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2407 "parser.tab.c" /* yacc.c:1646 */
+#line 2446 "parser.tab.c" /* yacc.c:1646 */
break;
case 89:
-#line 506 "parser.y" /* yacc.c:1646 */
+#line 511 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_COMMA, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2413 "parser.tab.c" /* yacc.c:1646 */
+#line 2452 "parser.tab.c" /* yacc.c:1646 */
break;
case 90:
-#line 510 "parser.y" /* yacc.c:1646 */
+#line 515 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = NULL; }
-#line 2419 "parser.tab.c" /* yacc.c:1646 */
+#line 2458 "parser.tab.c" /* yacc.c:1646 */
break;
case 91:
-#line 511 "parser.y" /* yacc.c:1646 */
+#line 516 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2425 "parser.tab.c" /* yacc.c:1646 */
+#line 2464 "parser.tab.c" /* yacc.c:1646 */
break;
case 92:
-#line 516 "parser.y" /* yacc.c:1646 */
+#line 521 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2431 "parser.tab.c" /* yacc.c:1646 */
+#line 2470 "parser.tab.c" /* yacc.c:1646 */
break;
case 93:
-#line 518 "parser.y" /* yacc.c:1646 */
+#line 523 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_COMMA, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2437 "parser.tab.c" /* yacc.c:1646 */
+#line 2476 "parser.tab.c" /* yacc.c:1646 */
break;
case 94:
-#line 521 "parser.y" /* yacc.c:1646 */
+#line 526 "parser.y" /* yacc.c:1646 */
{ (yyval.ival) = (yyvsp[0].ival); }
-#line 2443 "parser.tab.c" /* yacc.c:1646 */
+#line 2482 "parser.tab.c" /* yacc.c:1646 */
break;
case 95:
-#line 522 "parser.y" /* yacc.c:1646 */
+#line 527 "parser.y" /* yacc.c:1646 */
{ (yyval.ival) = EXPR_ASSIGNDIV; }
-#line 2449 "parser.tab.c" /* yacc.c:1646 */
+#line 2488 "parser.tab.c" /* yacc.c:1646 */
break;
case 96:
-#line 526 "parser.y" /* yacc.c:1646 */
+#line 531 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2455 "parser.tab.c" /* yacc.c:1646 */
+#line 2494 "parser.tab.c" /* yacc.c:1646 */
break;
case 97:
-#line 528 "parser.y" /* yacc.c:1646 */
+#line 533 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_ASSIGN, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2461 "parser.tab.c" /* yacc.c:1646 */
+#line 2500 "parser.tab.c" /* yacc.c:1646 */
break;
case 98:
-#line 530 "parser.y" /* yacc.c:1646 */
+#line 535 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, (yyvsp[-1].ival), (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2467 "parser.tab.c" /* yacc.c:1646 */
+#line 2506 "parser.tab.c" /* yacc.c:1646 */
break;
case 99:
-#line 535 "parser.y" /* yacc.c:1646 */
+#line 540 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2473 "parser.tab.c" /* yacc.c:1646 */
+#line 2512 "parser.tab.c" /* yacc.c:1646 */
break;
case 100:
-#line 537 "parser.y" /* yacc.c:1646 */
+#line 542 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_ASSIGN, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2479 "parser.tab.c" /* yacc.c:1646 */
+#line 2518 "parser.tab.c" /* yacc.c:1646 */
break;
case 101:
-#line 539 "parser.y" /* yacc.c:1646 */
+#line 544 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, (yyvsp[-1].ival), (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2485 "parser.tab.c" /* yacc.c:1646 */
+#line 2524 "parser.tab.c" /* yacc.c:1646 */
break;
case 102:
-#line 543 "parser.y" /* yacc.c:1646 */
+#line 548 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2491 "parser.tab.c" /* yacc.c:1646 */
+#line 2530 "parser.tab.c" /* yacc.c:1646 */
break;
case 103:
-#line 545 "parser.y" /* yacc.c:1646 */
+#line 550 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_conditional_expression(ctx, (yyvsp[-4].expr), (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2497 "parser.tab.c" /* yacc.c:1646 */
+#line 2536 "parser.tab.c" /* yacc.c:1646 */
break;
case 104:
-#line 550 "parser.y" /* yacc.c:1646 */
+#line 555 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2503 "parser.tab.c" /* yacc.c:1646 */
+#line 2542 "parser.tab.c" /* yacc.c:1646 */
break;
case 105:
-#line 552 "parser.y" /* yacc.c:1646 */
+#line 557 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_conditional_expression(ctx, (yyvsp[-4].expr), (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2509 "parser.tab.c" /* yacc.c:1646 */
+#line 2548 "parser.tab.c" /* yacc.c:1646 */
break;
case 106:
-#line 556 "parser.y" /* yacc.c:1646 */
+#line 561 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2515 "parser.tab.c" /* yacc.c:1646 */
+#line 2554 "parser.tab.c" /* yacc.c:1646 */
break;
case 107:
-#line 558 "parser.y" /* yacc.c:1646 */
+#line 563 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_OR, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2521 "parser.tab.c" /* yacc.c:1646 */
+#line 2560 "parser.tab.c" /* yacc.c:1646 */
break;
case 108:
-#line 563 "parser.y" /* yacc.c:1646 */
+#line 568 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2527 "parser.tab.c" /* yacc.c:1646 */
+#line 2566 "parser.tab.c" /* yacc.c:1646 */
break;
case 109:
-#line 565 "parser.y" /* yacc.c:1646 */
+#line 570 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_OR, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2533 "parser.tab.c" /* yacc.c:1646 */
+#line 2572 "parser.tab.c" /* yacc.c:1646 */
break;
case 110:
-#line 569 "parser.y" /* yacc.c:1646 */
+#line 574 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2539 "parser.tab.c" /* yacc.c:1646 */
+#line 2578 "parser.tab.c" /* yacc.c:1646 */
break;
case 111:
-#line 571 "parser.y" /* yacc.c:1646 */
+#line 576 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_AND, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2545 "parser.tab.c" /* yacc.c:1646 */
+#line 2584 "parser.tab.c" /* yacc.c:1646 */
break;
case 112:
-#line 576 "parser.y" /* yacc.c:1646 */
+#line 581 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2551 "parser.tab.c" /* yacc.c:1646 */
+#line 2590 "parser.tab.c" /* yacc.c:1646 */
break;
case 113:
-#line 578 "parser.y" /* yacc.c:1646 */
+#line 583 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_AND, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2557 "parser.tab.c" /* yacc.c:1646 */
+#line 2596 "parser.tab.c" /* yacc.c:1646 */
break;
case 114:
-#line 582 "parser.y" /* yacc.c:1646 */
+#line 587 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2563 "parser.tab.c" /* yacc.c:1646 */
+#line 2602 "parser.tab.c" /* yacc.c:1646 */
break;
case 115:
-#line 584 "parser.y" /* yacc.c:1646 */
+#line 589 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_BOR, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2569 "parser.tab.c" /* yacc.c:1646 */
+#line 2608 "parser.tab.c" /* yacc.c:1646 */
break;
case 116:
-#line 589 "parser.y" /* yacc.c:1646 */
+#line 594 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2575 "parser.tab.c" /* yacc.c:1646 */
+#line 2614 "parser.tab.c" /* yacc.c:1646 */
break;
case 117:
-#line 591 "parser.y" /* yacc.c:1646 */
+#line 596 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_BOR, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2581 "parser.tab.c" /* yacc.c:1646 */
+#line 2620 "parser.tab.c" /* yacc.c:1646 */
break;
case 118:
-#line 595 "parser.y" /* yacc.c:1646 */
+#line 600 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2587 "parser.tab.c" /* yacc.c:1646 */
+#line 2626 "parser.tab.c" /* yacc.c:1646 */
break;
case 119:
-#line 597 "parser.y" /* yacc.c:1646 */
+#line 602 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_BXOR, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2593 "parser.tab.c" /* yacc.c:1646 */
+#line 2632 "parser.tab.c" /* yacc.c:1646 */
break;
case 120:
-#line 602 "parser.y" /* yacc.c:1646 */
+#line 607 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2599 "parser.tab.c" /* yacc.c:1646 */
+#line 2638 "parser.tab.c" /* yacc.c:1646 */
break;
case 121:
-#line 604 "parser.y" /* yacc.c:1646 */
+#line 609 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_BXOR, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2605 "parser.tab.c" /* yacc.c:1646 */
+#line 2644 "parser.tab.c" /* yacc.c:1646 */
break;
case 122:
-#line 608 "parser.y" /* yacc.c:1646 */
+#line 613 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2611 "parser.tab.c" /* yacc.c:1646 */
+#line 2650 "parser.tab.c" /* yacc.c:1646 */
break;
case 123:
-#line 610 "parser.y" /* yacc.c:1646 */
+#line 615 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_BAND, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2617 "parser.tab.c" /* yacc.c:1646 */
+#line 2656 "parser.tab.c" /* yacc.c:1646 */
break;
case 124:
-#line 615 "parser.y" /* yacc.c:1646 */
+#line 620 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2623 "parser.tab.c" /* yacc.c:1646 */
+#line 2662 "parser.tab.c" /* yacc.c:1646 */
break;
case 125:
-#line 617 "parser.y" /* yacc.c:1646 */
+#line 622 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_BAND, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2629 "parser.tab.c" /* yacc.c:1646 */
+#line 2668 "parser.tab.c" /* yacc.c:1646 */
break;
case 126:
-#line 621 "parser.y" /* yacc.c:1646 */
+#line 626 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2635 "parser.tab.c" /* yacc.c:1646 */
+#line 2674 "parser.tab.c" /* yacc.c:1646 */
break;
case 127:
-#line 623 "parser.y" /* yacc.c:1646 */
+#line 628 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, (yyvsp[-1].ival), (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2641 "parser.tab.c" /* yacc.c:1646 */
+#line 2680 "parser.tab.c" /* yacc.c:1646 */
break;
case 128:
-#line 627 "parser.y" /* yacc.c:1646 */
+#line 632 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2647 "parser.tab.c" /* yacc.c:1646 */
+#line 2686 "parser.tab.c" /* yacc.c:1646 */
break;
case 129:
-#line 629 "parser.y" /* yacc.c:1646 */
+#line 634 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, (yyvsp[-1].ival), (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2653 "parser.tab.c" /* yacc.c:1646 */
+#line 2692 "parser.tab.c" /* yacc.c:1646 */
break;
case 130:
-#line 633 "parser.y" /* yacc.c:1646 */
+#line 638 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2659 "parser.tab.c" /* yacc.c:1646 */
+#line 2698 "parser.tab.c" /* yacc.c:1646 */
break;
case 131:
-#line 635 "parser.y" /* yacc.c:1646 */
+#line 640 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, (yyvsp[-1].ival), (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2665 "parser.tab.c" /* yacc.c:1646 */
+#line 2704 "parser.tab.c" /* yacc.c:1646 */
break;
case 132:
-#line 637 "parser.y" /* yacc.c:1646 */
+#line 642 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_INSTANCEOF, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2671 "parser.tab.c" /* yacc.c:1646 */
+#line 2710 "parser.tab.c" /* yacc.c:1646 */
break;
case 133:
-#line 639 "parser.y" /* yacc.c:1646 */
+#line 644 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_IN, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2677 "parser.tab.c" /* yacc.c:1646 */
+#line 2716 "parser.tab.c" /* yacc.c:1646 */
break;
case 134:
-#line 643 "parser.y" /* yacc.c:1646 */
+#line 648 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2683 "parser.tab.c" /* yacc.c:1646 */
+#line 2722 "parser.tab.c" /* yacc.c:1646 */
break;
case 135:
-#line 645 "parser.y" /* yacc.c:1646 */
+#line 650 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, (yyvsp[-1].ival), (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2689 "parser.tab.c" /* yacc.c:1646 */
+#line 2728 "parser.tab.c" /* yacc.c:1646 */
break;
case 136:
-#line 647 "parser.y" /* yacc.c:1646 */
+#line 652 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_INSTANCEOF, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2695 "parser.tab.c" /* yacc.c:1646 */
+#line 2734 "parser.tab.c" /* yacc.c:1646 */
break;
case 137:
-#line 651 "parser.y" /* yacc.c:1646 */
+#line 656 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2701 "parser.tab.c" /* yacc.c:1646 */
+#line 2740 "parser.tab.c" /* yacc.c:1646 */
break;
case 138:
-#line 653 "parser.y" /* yacc.c:1646 */
+#line 658 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, (yyvsp[-1].ival), (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2707 "parser.tab.c" /* yacc.c:1646 */
+#line 2746 "parser.tab.c" /* yacc.c:1646 */
break;
case 139:
-#line 658 "parser.y" /* yacc.c:1646 */
+#line 663 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2713 "parser.tab.c" /* yacc.c:1646 */
+#line 2752 "parser.tab.c" /* yacc.c:1646 */
break;
case 140:
-#line 660 "parser.y" /* yacc.c:1646 */
+#line 665 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_ADD, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2719 "parser.tab.c" /* yacc.c:1646 */
+#line 2758 "parser.tab.c" /* yacc.c:1646 */
break;
case 141:
-#line 662 "parser.y" /* yacc.c:1646 */
+#line 667 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_SUB, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2725 "parser.tab.c" /* yacc.c:1646 */
+#line 2764 "parser.tab.c" /* yacc.c:1646 */
break;
case 142:
-#line 666 "parser.y" /* yacc.c:1646 */
+#line 671 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2731 "parser.tab.c" /* yacc.c:1646 */
+#line 2770 "parser.tab.c" /* yacc.c:1646 */
break;
case 143:
-#line 668 "parser.y" /* yacc.c:1646 */
+#line 673 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_MUL, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2737 "parser.tab.c" /* yacc.c:1646 */
+#line 2776 "parser.tab.c" /* yacc.c:1646 */
break;
case 144:
-#line 670 "parser.y" /* yacc.c:1646 */
+#line 675 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_DIV, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2743 "parser.tab.c" /* yacc.c:1646 */
+#line 2782 "parser.tab.c" /* yacc.c:1646 */
break;
case 145:
-#line 672 "parser.y" /* yacc.c:1646 */
+#line 677 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_MOD, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2749 "parser.tab.c" /* yacc.c:1646 */
+#line 2788 "parser.tab.c" /* yacc.c:1646 */
break;
case 146:
-#line 676 "parser.y" /* yacc.c:1646 */
+#line 681 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2755 "parser.tab.c" /* yacc.c:1646 */
+#line 2794 "parser.tab.c" /* yacc.c:1646 */
break;
case 147:
-#line 678 "parser.y" /* yacc.c:1646 */
+#line 683 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_unary_expression(ctx, EXPR_DELETE, (yyvsp[0].expr)); }
-#line 2761 "parser.tab.c" /* yacc.c:1646 */
+#line 2800 "parser.tab.c" /* yacc.c:1646 */
break;
case 148:
-#line 679 "parser.y" /* yacc.c:1646 */
+#line 684 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_unary_expression(ctx, EXPR_VOID, (yyvsp[0].expr)); }
-#line 2767 "parser.tab.c" /* yacc.c:1646 */
+#line 2806 "parser.tab.c" /* yacc.c:1646 */
break;
case 149:
-#line 681 "parser.y" /* yacc.c:1646 */
+#line 686 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_unary_expression(ctx, EXPR_TYPEOF, (yyvsp[0].expr)); }
-#line 2773 "parser.tab.c" /* yacc.c:1646 */
+#line 2812 "parser.tab.c" /* yacc.c:1646 */
break;
case 150:
-#line 682 "parser.y" /* yacc.c:1646 */
+#line 687 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_unary_expression(ctx, EXPR_PREINC, (yyvsp[0].expr)); }
-#line 2779 "parser.tab.c" /* yacc.c:1646 */
+#line 2818 "parser.tab.c" /* yacc.c:1646 */
break;
case 151:
-#line 683 "parser.y" /* yacc.c:1646 */
+#line 688 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_unary_expression(ctx, EXPR_PREDEC, (yyvsp[0].expr)); }
-#line 2785 "parser.tab.c" /* yacc.c:1646 */
+#line 2824 "parser.tab.c" /* yacc.c:1646 */
break;
case 152:
-#line 684 "parser.y" /* yacc.c:1646 */
+#line 689 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_unary_expression(ctx, EXPR_PLUS, (yyvsp[0].expr)); }
-#line 2791 "parser.tab.c" /* yacc.c:1646 */
+#line 2830 "parser.tab.c" /* yacc.c:1646 */
break;
case 153:
-#line 685 "parser.y" /* yacc.c:1646 */
+#line 690 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_unary_expression(ctx, EXPR_MINUS, (yyvsp[0].expr)); }
-#line 2797 "parser.tab.c" /* yacc.c:1646 */
+#line 2836 "parser.tab.c" /* yacc.c:1646 */
break;
case 154:
-#line 686 "parser.y" /* yacc.c:1646 */
+#line 691 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_unary_expression(ctx, EXPR_BITNEG, (yyvsp[0].expr)); }
-#line 2803 "parser.tab.c" /* yacc.c:1646 */
+#line 2842 "parser.tab.c" /* yacc.c:1646 */
break;
case 155:
-#line 687 "parser.y" /* yacc.c:1646 */
+#line 692 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_unary_expression(ctx, EXPR_LOGNEG, (yyvsp[0].expr)); }
-#line 2809 "parser.tab.c" /* yacc.c:1646 */
+#line 2848 "parser.tab.c" /* yacc.c:1646 */
break;
case 156:
-#line 692 "parser.y" /* yacc.c:1646 */
+#line 697 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2815 "parser.tab.c" /* yacc.c:1646 */
+#line 2854 "parser.tab.c" /* yacc.c:1646 */
break;
case 157:
-#line 694 "parser.y" /* yacc.c:1646 */
+#line 699 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_unary_expression(ctx, EXPR_POSTINC, (yyvsp[-1].expr)); }
-#line 2821 "parser.tab.c" /* yacc.c:1646 */
+#line 2860 "parser.tab.c" /* yacc.c:1646 */
break;
case 158:
-#line 696 "parser.y" /* yacc.c:1646 */
+#line 701 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_unary_expression(ctx, EXPR_POSTDEC, (yyvsp[-1].expr)); }
-#line 2827 "parser.tab.c" /* yacc.c:1646 */
+#line 2866 "parser.tab.c" /* yacc.c:1646 */
break;
case 159:
-#line 701 "parser.y" /* yacc.c:1646 */
+#line 706 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2833 "parser.tab.c" /* yacc.c:1646 */
+#line 2872 "parser.tab.c" /* yacc.c:1646 */
break;
case 160:
-#line 702 "parser.y" /* yacc.c:1646 */
+#line 707 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2839 "parser.tab.c" /* yacc.c:1646 */
+#line 2878 "parser.tab.c" /* yacc.c:1646 */
break;
case 161:
-#line 706 "parser.y" /* yacc.c:1646 */
+#line 711 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2845 "parser.tab.c" /* yacc.c:1646 */
+#line 2884 "parser.tab.c" /* yacc.c:1646 */
break;
case 162:
-#line 707 "parser.y" /* yacc.c:1646 */
+#line 712 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_new_expression(ctx, (yyvsp[0].expr), NULL); }
-#line 2851 "parser.tab.c" /* yacc.c:1646 */
+#line 2890 "parser.tab.c" /* yacc.c:1646 */
break;
case 163:
-#line 711 "parser.y" /* yacc.c:1646 */
+#line 716 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2857 "parser.tab.c" /* yacc.c:1646 */
+#line 2896 "parser.tab.c" /* yacc.c:1646 */
break;
case 164:
-#line 712 "parser.y" /* yacc.c:1646 */
+#line 717 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2863 "parser.tab.c" /* yacc.c:1646 */
+#line 2902 "parser.tab.c" /* yacc.c:1646 */
break;
case 165:
-#line 714 "parser.y" /* yacc.c:1646 */
+#line 719 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_ARRAY, (yyvsp[-3].expr),
(yyvsp[-1].expr)); }
-#line 2869 "parser.tab.c" /* yacc.c:1646 */
+#line 2908 "parser.tab.c" /* yacc.c:1646 */
break;
case 166:
-#line 716 "parser.y" /* yacc.c:1646 */
+#line 721 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_member_expression(ctx, (yyvsp[-2].expr), (yyvsp[0].identifier));
}
-#line 2875 "parser.tab.c" /* yacc.c:1646 */
+#line 2914 "parser.tab.c" /* yacc.c:1646 */
break;
case 167:
-#line 718 "parser.y" /* yacc.c:1646 */
+#line 723 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_new_expression(ctx, (yyvsp[-1].expr), (yyvsp[0].argument_list));
}
-#line 2881 "parser.tab.c" /* yacc.c:1646 */
+#line 2920 "parser.tab.c" /* yacc.c:1646 */
break;
case 168:
-#line 723 "parser.y" /* yacc.c:1646 */
+#line 728 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_call_expression(ctx, (yyvsp[-1].expr),
(yyvsp[0].argument_list)); }
-#line 2887 "parser.tab.c" /* yacc.c:1646 */
+#line 2926 "parser.tab.c" /* yacc.c:1646 */
break;
case 169:
-#line 725 "parser.y" /* yacc.c:1646 */
+#line 730 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_call_expression(ctx, (yyvsp[-1].expr),
(yyvsp[0].argument_list)); }
-#line 2893 "parser.tab.c" /* yacc.c:1646 */
+#line 2932 "parser.tab.c" /* yacc.c:1646 */
break;
case 170:
-#line 727 "parser.y" /* yacc.c:1646 */
+#line 732 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_ARRAY, (yyvsp[-3].expr),
(yyvsp[-1].expr)); }
-#line 2899 "parser.tab.c" /* yacc.c:1646 */
+#line 2938 "parser.tab.c" /* yacc.c:1646 */
break;
case 171:
-#line 729 "parser.y" /* yacc.c:1646 */
+#line 734 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_member_expression(ctx, (yyvsp[-2].expr), (yyvsp[0].identifier));
}
-#line 2905 "parser.tab.c" /* yacc.c:1646 */
+#line 2944 "parser.tab.c" /* yacc.c:1646 */
break;
case 172:
-#line 733 "parser.y" /* yacc.c:1646 */
+#line 738 "parser.y" /* yacc.c:1646 */
{ (yyval.argument_list) = NULL; }
-#line 2911 "parser.tab.c" /* yacc.c:1646 */
+#line 2950 "parser.tab.c" /* yacc.c:1646 */
break;
case 173:
-#line 734 "parser.y" /* yacc.c:1646 */
+#line 739 "parser.y" /* yacc.c:1646 */
{ (yyval.argument_list) = (yyvsp[-1].argument_list); }
-#line 2917 "parser.tab.c" /* yacc.c:1646 */
+#line 2956 "parser.tab.c" /* yacc.c:1646 */
break;
case 174:
-#line 738 "parser.y" /* yacc.c:1646 */
+#line 743 "parser.y" /* yacc.c:1646 */
{ (yyval.argument_list) = new_argument_list(ctx, (yyvsp[0].expr)); }
-#line 2923 "parser.tab.c" /* yacc.c:1646 */
+#line 2962 "parser.tab.c" /* yacc.c:1646 */
break;
case 175:
-#line 740 "parser.y" /* yacc.c:1646 */
+#line 745 "parser.y" /* yacc.c:1646 */
{ (yyval.argument_list) = argument_list_add(ctx, (yyvsp[-2].argument_list),
(yyvsp[0].expr)); }
-#line 2929 "parser.tab.c" /* yacc.c:1646 */
+#line 2968 "parser.tab.c" /* yacc.c:1646 */
break;
case 176:
-#line 744 "parser.y" /* yacc.c:1646 */
+#line 749 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_expression(ctx, EXPR_THIS, 0); }
-#line 2935 "parser.tab.c" /* yacc.c:1646 */
+#line 2974 "parser.tab.c" /* yacc.c:1646 */
break;
case 177:
-#line 745 "parser.y" /* yacc.c:1646 */
+#line 750 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_identifier_expression(ctx, (yyvsp[0].identifier)); }
-#line 2941 "parser.tab.c" /* yacc.c:1646 */
+#line 2980 "parser.tab.c" /* yacc.c:1646 */
break;
case 178:
-#line 746 "parser.y" /* yacc.c:1646 */
+#line 751 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_literal_expression(ctx, (yyvsp[0].literal)); }
-#line 2947 "parser.tab.c" /* yacc.c:1646 */
+#line 2986 "parser.tab.c" /* yacc.c:1646 */
break;
case 179:
-#line 747 "parser.y" /* yacc.c:1646 */
+#line 752 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2953 "parser.tab.c" /* yacc.c:1646 */
+#line 2992 "parser.tab.c" /* yacc.c:1646 */
break;
case 180:
-#line 748 "parser.y" /* yacc.c:1646 */
+#line 753 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2959 "parser.tab.c" /* yacc.c:1646 */
+#line 2998 "parser.tab.c" /* yacc.c:1646 */
break;
case 181:
-#line 749 "parser.y" /* yacc.c:1646 */
+#line 754 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[-1].expr); }
-#line 2965 "parser.tab.c" /* yacc.c:1646 */
+#line 3004 "parser.tab.c" /* yacc.c:1646 */
break;
case 182:
-#line 753 "parser.y" /* yacc.c:1646 */
+#line 758 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_array_literal_expression(ctx, NULL, 0); }
-#line 2971 "parser.tab.c" /* yacc.c:1646 */
+#line 3010 "parser.tab.c" /* yacc.c:1646 */
break;
case 183:
-#line 754 "parser.y" /* yacc.c:1646 */
+#line 759 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_array_literal_expression(ctx, NULL, (yyvsp[-1].ival)+1); }
-#line 2977 "parser.tab.c" /* yacc.c:1646 */
+#line 3016 "parser.tab.c" /* yacc.c:1646 */
break;
case 184:
-#line 755 "parser.y" /* yacc.c:1646 */
+#line 760 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_array_literal_expression(ctx, (yyvsp[-1].element_list), 0); }
-#line 2983 "parser.tab.c" /* yacc.c:1646 */
+#line 3022 "parser.tab.c" /* yacc.c:1646 */
break;
case 185:
-#line 757 "parser.y" /* yacc.c:1646 */
+#line 762 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_array_literal_expression(ctx, (yyvsp[-3].element_list),
(yyvsp[-1].ival)+1); }
-#line 2989 "parser.tab.c" /* yacc.c:1646 */
+#line 3028 "parser.tab.c" /* yacc.c:1646 */
break;
case 186:
-#line 762 "parser.y" /* yacc.c:1646 */
+#line 767 "parser.y" /* yacc.c:1646 */
{ (yyval.element_list) = new_element_list(ctx, (yyvsp[-1].ival), (yyvsp[0].expr)); }
-#line 2995 "parser.tab.c" /* yacc.c:1646 */
+#line 3034 "parser.tab.c" /* yacc.c:1646 */
break;
case 187:
-#line 764 "parser.y" /* yacc.c:1646 */
+#line 769 "parser.y" /* yacc.c:1646 */
{ (yyval.element_list) = element_list_add(ctx, (yyvsp[-3].element_list),
(yyvsp[-1].ival), (yyvsp[0].expr)); }
-#line 3001 "parser.tab.c" /* yacc.c:1646 */
+#line 3040 "parser.tab.c" /* yacc.c:1646 */
break;
case 188:
-#line 768 "parser.y" /* yacc.c:1646 */
+#line 773 "parser.y" /* yacc.c:1646 */
{ (yyval.ival) = 1; }
-#line 3007 "parser.tab.c" /* yacc.c:1646 */
+#line 3046 "parser.tab.c" /* yacc.c:1646 */
break;
case 189:
-#line 769 "parser.y" /* yacc.c:1646 */
+#line 774 "parser.y" /* yacc.c:1646 */
{ (yyval.ival) = (yyvsp[-1].ival) + 1; }
-#line 3013 "parser.tab.c" /* yacc.c:1646 */
+#line 3052 "parser.tab.c" /* yacc.c:1646 */
break;
case 190:
-#line 773 "parser.y" /* yacc.c:1646 */
+#line 778 "parser.y" /* yacc.c:1646 */
{ (yyval.ival) = 0; }
-#line 3019 "parser.tab.c" /* yacc.c:1646 */
+#line 3058 "parser.tab.c" /* yacc.c:1646 */
break;
case 191:
-#line 774 "parser.y" /* yacc.c:1646 */
+#line 779 "parser.y" /* yacc.c:1646 */
{ (yyval.ival) = (yyvsp[0].ival); }
-#line 3025 "parser.tab.c" /* yacc.c:1646 */
+#line 3064 "parser.tab.c" /* yacc.c:1646 */
break;
case 192:
-#line 778 "parser.y" /* yacc.c:1646 */
+#line 783 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_prop_and_value_expression(ctx, NULL); }
-#line 3031 "parser.tab.c" /* yacc.c:1646 */
+#line 3070 "parser.tab.c" /* yacc.c:1646 */
break;
case 193:
-#line 780 "parser.y" /* yacc.c:1646 */
+#line 785 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_prop_and_value_expression(ctx, (yyvsp[-1].property_list)); }
-#line 3037 "parser.tab.c" /* yacc.c:1646 */
+#line 3076 "parser.tab.c" /* yacc.c:1646 */
break;
case 194:
-#line 785 "parser.y" /* yacc.c:1646 */
- { (yyval.property_list) = new_property_list(ctx, (yyvsp[-2].literal),
(yyvsp[0].expr)); }
-#line 3043 "parser.tab.c" /* yacc.c:1646 */
+#line 787 "parser.y" /* yacc.c:1646 */
+ {
+ if(ctx->script->version < 2) {
+ WARN("Trailing comma in object literal is illegal in legacy
mode.\n");
+ YYABORT;
+ }
+ (yyval.expr) = new_prop_and_value_expression(ctx,
(yyvsp[-2].property_list));
+ }
+#line 3088 "parser.tab.c" /* yacc.c:1646 */
break;
case 195:
-#line 787 "parser.y" /* yacc.c:1646 */
- { (yyval.property_list) = property_list_add(ctx, (yyvsp[-4].property_list),
(yyvsp[-2].literal), (yyvsp[0].expr)); }
-#line 3049 "parser.tab.c" /* yacc.c:1646 */
+#line 797 "parser.y" /* yacc.c:1646 */
+ { (yyval.property_list) = new_property_list(ctx, (yyvsp[0].property_definition)); }
+#line 3094 "parser.tab.c" /* yacc.c:1646 */
break;
case 196:
-#line 791 "parser.y" /* yacc.c:1646 */
- { (yyval.literal) = new_string_literal(ctx, (yyvsp[0].identifier)); }
-#line 3055 "parser.tab.c" /* yacc.c:1646 */
+#line 799 "parser.y" /* yacc.c:1646 */
+ { (yyval.property_list) = property_list_add(ctx, (yyvsp[-2].property_list),
(yyvsp[0].property_definition)); }
+#line 3100 "parser.tab.c" /* yacc.c:1646 */
break;
case 197:
-#line 792 "parser.y" /* yacc.c:1646 */
- { (yyval.literal) = new_string_literal(ctx, (yyvsp[0].wstr)); }
-#line 3061 "parser.tab.c" /* yacc.c:1646 */
+#line 804 "parser.y" /* yacc.c:1646 */
+ { (yyval.property_definition) = new_property_definition(ctx,
PROPERTY_DEFINITION_VALUE, (yyvsp[-2].literal), (yyvsp[0].expr)); }
+#line 3106 "parser.tab.c" /* yacc.c:1646 */
break;
case 198:
-#line 793 "parser.y" /* yacc.c:1646 */
- { (yyval.literal) = (yyvsp[0].literal); }
-#line 3067 "parser.tab.c" /* yacc.c:1646 */
+#line 806 "parser.y" /* yacc.c:1646 */
+ { (yyval.property_definition) = new_property_definition(ctx,
PROPERTY_DEFINITION_GETTER, (yyvsp[-1].literal), (yyvsp[0].expr)); }
+#line 3112 "parser.tab.c" /* yacc.c:1646 */
break;
case 199:
-#line 797 "parser.y" /* yacc.c:1646 */
- { (yyval.identifier) = NULL; }
-#line 3073 "parser.tab.c" /* yacc.c:1646 */
+#line 808 "parser.y" /* yacc.c:1646 */
+ { (yyval.property_definition) = new_property_definition(ctx,
PROPERTY_DEFINITION_SETTER, (yyvsp[-1].literal), (yyvsp[0].expr)); }
+#line 3118 "parser.tab.c" /* yacc.c:1646 */
break;
case 200:
-#line 798 "parser.y" /* yacc.c:1646 */
- { (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3079 "parser.tab.c" /* yacc.c:1646 */
+#line 812 "parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = new_function_expression(ctx, NULL, (yyvsp[-4].parameter_list),
(yyvsp[-1].source_elements), NULL, (yyvsp[-5].srcptr),
(yyvsp[0].srcptr)-(yyvsp[-5].srcptr)); }
+#line 3124 "parser.tab.c" /* yacc.c:1646 */
break;
case 201:
-#line 802 "parser.y" /* yacc.c:1646 */
- { (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3085 "parser.tab.c" /* yacc.c:1646 */
+#line 816 "parser.y" /* yacc.c:1646 */
+ { (yyval.literal) = new_string_literal(ctx, (yyvsp[0].identifier)); }
+#line 3130 "parser.tab.c" /* yacc.c:1646 */
break;
case 202:
-#line 804 "parser.y" /* yacc.c:1646 */
- {
- if(ctx->script->version < SCRIPTLANGUAGEVERSION_ES5) {
- WARN("%s keyword used as an identifier in legacy mode.\n",
- debugstr_w((yyvsp[0].identifier)));
- YYABORT;
- }
- (yyval.identifier) = (yyvsp[0].identifier);
- }
-#line 3098 "parser.tab.c" /* yacc.c:1646 */
+#line 817 "parser.y" /* yacc.c:1646 */
+ { (yyval.literal) = new_string_literal(ctx, (yyvsp[0].wstr)); }
+#line 3136 "parser.tab.c" /* yacc.c:1646 */
break;
case 203:
-#line 814 "parser.y" /* yacc.c:1646 */
- { (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3104 "parser.tab.c" /* yacc.c:1646 */
+#line 818 "parser.y" /* yacc.c:1646 */
+ { (yyval.literal) = (yyvsp[0].literal); }
+#line 3142 "parser.tab.c" /* yacc.c:1646 */
break;
case 204:
-#line 815 "parser.y" /* yacc.c:1646 */
- { (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3110 "parser.tab.c" /* yacc.c:1646 */
+#line 822 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = NULL; }
+#line 3148 "parser.tab.c" /* yacc.c:1646 */
break;
case 205:
-#line 816 "parser.y" /* yacc.c:1646 */
+#line 823 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3116 "parser.tab.c" /* yacc.c:1646 */
+#line 3154 "parser.tab.c" /* yacc.c:1646 */
break;
case 206:
-#line 817 "parser.y" /* yacc.c:1646 */
+#line 827 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3122 "parser.tab.c" /* yacc.c:1646 */
+#line 3160 "parser.tab.c" /* yacc.c:1646 */
break;
case 207:
-#line 818 "parser.y" /* yacc.c:1646 */
- { (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3128 "parser.tab.c" /* yacc.c:1646 */
+#line 829 "parser.y" /* yacc.c:1646 */
+ {
+ if(ctx->script->version < SCRIPTLANGUAGEVERSION_ES5) {
+ WARN("%s keyword used as an identifier in legacy mode.\n",
+ debugstr_w((yyvsp[0].identifier)));
+ YYABORT;
+ }
+ (yyval.identifier) = (yyvsp[0].identifier);
+ }
+#line 3173 "parser.tab.c" /* yacc.c:1646 */
break;
case 208:
-#line 819 "parser.y" /* yacc.c:1646 */
+#line 839 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3134 "parser.tab.c" /* yacc.c:1646 */
+#line 3179 "parser.tab.c" /* yacc.c:1646 */
break;
case 209:
-#line 820 "parser.y" /* yacc.c:1646 */
+#line 840 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3140 "parser.tab.c" /* yacc.c:1646 */
+#line 3185 "parser.tab.c" /* yacc.c:1646 */
break;
case 210:
-#line 821 "parser.y" /* yacc.c:1646 */
+#line 841 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3146 "parser.tab.c" /* yacc.c:1646 */
+#line 3191 "parser.tab.c" /* yacc.c:1646 */
break;
case 211:
-#line 822 "parser.y" /* yacc.c:1646 */
+#line 842 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3152 "parser.tab.c" /* yacc.c:1646 */
+#line 3197 "parser.tab.c" /* yacc.c:1646 */
break;
case 212:
-#line 823 "parser.y" /* yacc.c:1646 */
+#line 843 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3158 "parser.tab.c" /* yacc.c:1646 */
+#line 3203 "parser.tab.c" /* yacc.c:1646 */
break;
case 213:
-#line 824 "parser.y" /* yacc.c:1646 */
+#line 844 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3164 "parser.tab.c" /* yacc.c:1646 */
+#line 3209 "parser.tab.c" /* yacc.c:1646 */
break;
case 214:
-#line 825 "parser.y" /* yacc.c:1646 */
+#line 845 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3170 "parser.tab.c" /* yacc.c:1646 */
+#line 3215 "parser.tab.c" /* yacc.c:1646 */
break;
case 215:
-#line 826 "parser.y" /* yacc.c:1646 */
+#line 846 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3176 "parser.tab.c" /* yacc.c:1646 */
+#line 3221 "parser.tab.c" /* yacc.c:1646 */
break;
case 216:
-#line 827 "parser.y" /* yacc.c:1646 */
+#line 847 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3182 "parser.tab.c" /* yacc.c:1646 */
+#line 3227 "parser.tab.c" /* yacc.c:1646 */
break;
case 217:
-#line 828 "parser.y" /* yacc.c:1646 */
+#line 848 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3188 "parser.tab.c" /* yacc.c:1646 */
+#line 3233 "parser.tab.c" /* yacc.c:1646 */
break;
case 218:
-#line 829 "parser.y" /* yacc.c:1646 */
+#line 849 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3194 "parser.tab.c" /* yacc.c:1646 */
+#line 3239 "parser.tab.c" /* yacc.c:1646 */
break;
case 219:
-#line 830 "parser.y" /* yacc.c:1646 */
+#line 850 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3200 "parser.tab.c" /* yacc.c:1646 */
+#line 3245 "parser.tab.c" /* yacc.c:1646 */
break;
case 220:
-#line 831 "parser.y" /* yacc.c:1646 */
+#line 851 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3206 "parser.tab.c" /* yacc.c:1646 */
+#line 3251 "parser.tab.c" /* yacc.c:1646 */
break;
case 221:
-#line 832 "parser.y" /* yacc.c:1646 */
+#line 852 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3212 "parser.tab.c" /* yacc.c:1646 */
+#line 3257 "parser.tab.c" /* yacc.c:1646 */
break;
case 222:
-#line 833 "parser.y" /* yacc.c:1646 */
+#line 853 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3218 "parser.tab.c" /* yacc.c:1646 */
+#line 3263 "parser.tab.c" /* yacc.c:1646 */
break;
case 223:
-#line 834 "parser.y" /* yacc.c:1646 */
+#line 854 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3224 "parser.tab.c" /* yacc.c:1646 */
+#line 3269 "parser.tab.c" /* yacc.c:1646 */
break;
case 224:
-#line 835 "parser.y" /* yacc.c:1646 */
+#line 855 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3230 "parser.tab.c" /* yacc.c:1646 */
+#line 3275 "parser.tab.c" /* yacc.c:1646 */
break;
case 225:
-#line 836 "parser.y" /* yacc.c:1646 */
+#line 856 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3236 "parser.tab.c" /* yacc.c:1646 */
+#line 3281 "parser.tab.c" /* yacc.c:1646 */
break;
case 226:
-#line 837 "parser.y" /* yacc.c:1646 */
+#line 857 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3242 "parser.tab.c" /* yacc.c:1646 */
+#line 3287 "parser.tab.c" /* yacc.c:1646 */
break;
case 227:
-#line 838 "parser.y" /* yacc.c:1646 */
+#line 858 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3248 "parser.tab.c" /* yacc.c:1646 */
+#line 3293 "parser.tab.c" /* yacc.c:1646 */
break;
case 228:
-#line 839 "parser.y" /* yacc.c:1646 */
+#line 859 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3254 "parser.tab.c" /* yacc.c:1646 */
+#line 3299 "parser.tab.c" /* yacc.c:1646 */
break;
case 229:
-#line 840 "parser.y" /* yacc.c:1646 */
+#line 860 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3260 "parser.tab.c" /* yacc.c:1646 */
+#line 3305 "parser.tab.c" /* yacc.c:1646 */
break;
case 230:
-#line 841 "parser.y" /* yacc.c:1646 */
+#line 861 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3266 "parser.tab.c" /* yacc.c:1646 */
+#line 3311 "parser.tab.c" /* yacc.c:1646 */
break;
case 231:
-#line 845 "parser.y" /* yacc.c:1646 */
- { (yyval.literal) = new_null_literal(ctx); }
-#line 3272 "parser.tab.c" /* yacc.c:1646 */
+#line 862 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3317 "parser.tab.c" /* yacc.c:1646 */
break;
case 232:
-#line 846 "parser.y" /* yacc.c:1646 */
- { (yyval.literal) = (yyvsp[0].literal); }
-#line 3278 "parser.tab.c" /* yacc.c:1646 */
+#line 863 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3323 "parser.tab.c" /* yacc.c:1646 */
break;
case 233:
-#line 847 "parser.y" /* yacc.c:1646 */
- { (yyval.literal) = (yyvsp[0].literal); }
-#line 3284 "parser.tab.c" /* yacc.c:1646 */
+#line 864 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3329 "parser.tab.c" /* yacc.c:1646 */
break;
case 234:
-#line 848 "parser.y" /* yacc.c:1646 */
- { (yyval.literal) = new_string_literal(ctx, (yyvsp[0].wstr)); }
-#line 3290 "parser.tab.c" /* yacc.c:1646 */
+#line 865 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3335 "parser.tab.c" /* yacc.c:1646 */
break;
case 235:
-#line 849 "parser.y" /* yacc.c:1646 */
+#line 866 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3341 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 236:
+#line 867 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3347 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 237:
+#line 868 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3353 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 238:
+#line 872 "parser.y" /* yacc.c:1646 */
+ { (yyval.literal) = new_null_literal(ctx); }
+#line 3359 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 239:
+#line 873 "parser.y" /* yacc.c:1646 */
+ { (yyval.literal) = (yyvsp[0].literal); }
+#line 3365 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 240:
+#line 874 "parser.y" /* yacc.c:1646 */
+ { (yyval.literal) = (yyvsp[0].literal); }
+#line 3371 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 241:
+#line 875 "parser.y" /* yacc.c:1646 */
+ { (yyval.literal) = new_string_literal(ctx, (yyvsp[0].wstr)); }
+#line 3377 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 242:
+#line 876 "parser.y" /* yacc.c:1646 */
{ (yyval.literal) = parse_regexp(ctx);
if(!(yyval.literal)) YYABORT; }
-#line 3297 "parser.tab.c" /* yacc.c:1646 */
+#line 3384 "parser.tab.c" /* yacc.c:1646 */
break;
- case 236:
-#line 851 "parser.y" /* yacc.c:1646 */
+ case 243:
+#line 878 "parser.y" /* yacc.c:1646 */
{ (yyval.literal) = parse_regexp(ctx);
if(!(yyval.literal)) YYABORT; }
-#line 3304 "parser.tab.c" /* yacc.c:1646 */
+#line 3391 "parser.tab.c" /* yacc.c:1646 */
break;
- case 237:
-#line 856 "parser.y" /* yacc.c:1646 */
+ case 244:
+#line 883 "parser.y" /* yacc.c:1646 */
{ (yyval.literal) = new_boolean_literal(ctx, VARIANT_TRUE); }
-#line 3310 "parser.tab.c" /* yacc.c:1646 */
+#line 3397 "parser.tab.c" /* yacc.c:1646 */
break;
- case 238:
-#line 857 "parser.y" /* yacc.c:1646 */
+ case 245:
+#line 884 "parser.y" /* yacc.c:1646 */
{ (yyval.literal) = new_boolean_literal(ctx, VARIANT_FALSE); }
-#line 3316 "parser.tab.c" /* yacc.c:1646 */
+#line 3403 "parser.tab.c" /* yacc.c:1646 */
break;
- case 239:
-#line 858 "parser.y" /* yacc.c:1646 */
+ case 246:
+#line 885 "parser.y" /* yacc.c:1646 */
{ (yyval.literal) = (yyvsp[0].literal); }
-#line 3322 "parser.tab.c" /* yacc.c:1646 */
+#line 3409 "parser.tab.c" /* yacc.c:1646 */
break;
- case 241:
-#line 862 "parser.y" /* yacc.c:1646 */
+ case 248:
+#line 889 "parser.y" /* yacc.c:1646 */
{ if(!allow_auto_semicolon(ctx)) {YYABORT;} }
-#line 3328 "parser.tab.c" /* yacc.c:1646 */
+#line 3415 "parser.tab.c" /* yacc.c:1646 */
break;
- case 243:
-#line 866 "parser.y" /* yacc.c:1646 */
+ case 249:
+#line 892 "parser.y" /* yacc.c:1646 */
+ { (yyval.srcptr) = ctx->ptr; }
+#line 3421 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 250:
+#line 893 "parser.y" /* yacc.c:1646 */
{ set_error(ctx, JS_E_MISSING_LBRACKET); YYABORT; }
-#line 3334 "parser.tab.c" /* yacc.c:1646 */
+#line 3427 "parser.tab.c" /* yacc.c:1646 */
break;
- case 245:
-#line 870 "parser.y" /* yacc.c:1646 */
+ case 252:
+#line 897 "parser.y" /* yacc.c:1646 */
{ set_error(ctx, JS_E_MISSING_RBRACKET); YYABORT; }
-#line 3340 "parser.tab.c" /* yacc.c:1646 */
+#line 3433 "parser.tab.c" /* yacc.c:1646 */
break;
- case 247:
-#line 874 "parser.y" /* yacc.c:1646 */
+ case 254:
+#line 901 "parser.y" /* yacc.c:1646 */
{ set_error(ctx, JS_E_MISSING_SEMICOLON); YYABORT; }
-#line 3346 "parser.tab.c" /* yacc.c:1646 */
+#line 3439 "parser.tab.c" /* yacc.c:1646 */
break;
-#line 3350 "parser.tab.c" /* yacc.c:1646 */
+#line 3443 "parser.tab.c" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -3574,7 +3667,7 @@ yyreturn:
#endif
return yyresult;
}
-#line 876 "parser.y" /* yacc.c:1906 */
+#line 903 "parser.y" /* yacc.c:1906 */
static BOOL allow_auto_semicolon(parser_ctx_t *ctx)
@@ -3615,10 +3708,12 @@ static literal_t *new_null_literal(parser_ctx_t *ctx)
return ret;
}
-static prop_val_t *new_prop_val(parser_ctx_t *ctx, literal_t *name, expression_t *value)
+static property_definition_t *new_property_definition(parser_ctx_t *ctx,
property_definition_type_t type,
+ literal_t *name, expression_t
*value)
{
- prop_val_t *ret = parser_alloc(ctx, sizeof(prop_val_t));
+ property_definition_t *ret = parser_alloc(ctx, sizeof(property_definition_t));
+ ret->type = type;
ret->name = name;
ret->value = value;
ret->next = NULL;
@@ -3626,19 +3721,16 @@ static prop_val_t *new_prop_val(parser_ctx_t *ctx, literal_t
*name, expression_t
return ret;
}
-static property_list_t *new_property_list(parser_ctx_t *ctx, literal_t *name,
expression_t *value)
+static property_list_t *new_property_list(parser_ctx_t *ctx, property_definition_t
*prop)
{
property_list_t *ret = parser_alloc_tmp(ctx, sizeof(property_list_t));
-
- ret->head = ret->tail = new_prop_val(ctx, name, value);
-
+ ret->head = ret->tail = prop;
return ret;
}
-static property_list_t *property_list_add(parser_ctx_t *ctx, property_list_t *list,
literal_t *name, expression_t *value)
+static property_list_t *property_list_add(parser_ctx_t *ctx, property_list_t *list,
property_definition_t *prop)
{
- list->tail = list->tail->next = new_prop_val(ctx, name, value);
-
+ list->tail = list->tail->next = prop;
return list;
}
diff --git a/dll/win32/jscript/parser.tab.h b/dll/win32/jscript/parser.tab.h
index 181c030c8b..ff45ac8b89 100644
--- a/dll/win32/jscript/parser.tab.h
+++ b/dll/win32/jscript/parser.tab.h
@@ -57,39 +57,41 @@ extern int parser_debug;
kIF = 267,
kFINALLY = 268,
kFOR = 269,
- kIN = 270,
- kINSTANCEOF = 271,
- kNEW = 272,
- kNULL = 273,
- kRETURN = 274,
- kSWITCH = 275,
- kTHIS = 276,
- kTHROW = 277,
- kTRUE = 278,
- kFALSE = 279,
- kTRY = 280,
- kTYPEOF = 281,
- kVAR = 282,
- kVOID = 283,
- kWHILE = 284,
- kWITH = 285,
- tANDAND = 286,
- tOROR = 287,
- tINC = 288,
- tDEC = 289,
- tHTMLCOMMENT = 290,
- kDIVEQ = 291,
- kDCOL = 292,
- tIdentifier = 293,
- tAssignOper = 294,
- tEqOper = 295,
- tShiftOper = 296,
- tRelOper = 297,
- tNumericLiteral = 298,
- tBooleanLiteral = 299,
- tStringLiteral = 300,
- tEOF = 301,
- LOWER_THAN_ELSE = 302
+ kGET = 270,
+ kIN = 271,
+ kSET = 272,
+ kINSTANCEOF = 273,
+ kNEW = 274,
+ kNULL = 275,
+ kRETURN = 276,
+ kSWITCH = 277,
+ kTHIS = 278,
+ kTHROW = 279,
+ kTRUE = 280,
+ kFALSE = 281,
+ kTRY = 282,
+ kTYPEOF = 283,
+ kVAR = 284,
+ kVOID = 285,
+ kWHILE = 286,
+ kWITH = 287,
+ tANDAND = 288,
+ tOROR = 289,
+ tINC = 290,
+ tDEC = 291,
+ tHTMLCOMMENT = 292,
+ kDIVEQ = 293,
+ kDCOL = 294,
+ tIdentifier = 295,
+ tAssignOper = 296,
+ tEqOper = 297,
+ tShiftOper = 298,
+ tRelOper = 299,
+ tNumericLiteral = 300,
+ tBooleanLiteral = 301,
+ tStringLiteral = 302,
+ tEOF = 303,
+ LOWER_THAN_ELSE = 304
};
#endif
@@ -98,7 +100,7 @@ extern int parser_debug;
typedef union YYSTYPE YYSTYPE;
union YYSTYPE
{
-#line 145 "parser.y" /* yacc.c:1909 */
+#line 147 "parser.y" /* yacc.c:1909 */
int ival;
const WCHAR *srcptr;
@@ -113,13 +115,14 @@ union YYSTYPE
const WCHAR *identifier;
struct _parameter_list_t *parameter_list;
struct _property_list_t *property_list;
+ property_definition_t *property_definition;
source_elements_t *source_elements;
statement_t *statement;
struct _statement_list_t *statement_list;
struct _variable_list_t *variable_list;
variable_declaration_t *variable_declaration;
-#line 123 "parser.tab.h" /* yacc.c:1909 */
+#line 126 "parser.tab.h" /* yacc.c:1909 */
};
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
diff --git a/dll/win32/jscript/parser.y b/dll/win32/jscript/parser.y
index a40b813de1..157bc187b1 100644
--- a/dll/win32/jscript/parser.y
+++ b/dll/win32/jscript/parser.y
@@ -41,12 +41,14 @@ static literal_t *new_string_literal(parser_ctx_t*,const WCHAR*);
static literal_t *new_null_literal(parser_ctx_t*);
typedef struct _property_list_t {
- prop_val_t *head;
- prop_val_t *tail;
+ property_definition_t *head;
+ property_definition_t *tail;
} property_list_t;
-static property_list_t *new_property_list(parser_ctx_t*,literal_t*,expression_t*);
-static property_list_t
*property_list_add(parser_ctx_t*,property_list_t*,literal_t*,expression_t*);
+static property_definition_t *new_property_definition(parser_ctx_t *ctx,
property_definition_type_t,
+ literal_t *name, expression_t
*value);
+static property_list_t *new_property_list(parser_ctx_t*,property_definition_t*);
+static property_list_t
*property_list_add(parser_ctx_t*,property_list_t*,property_definition_t*);
typedef struct _element_list_t {
array_element_t *head;
@@ -156,6 +158,7 @@ static source_elements_t
*source_elements_add_statement(source_elements_t*,state
const WCHAR *identifier;
struct _parameter_list_t *parameter_list;
struct _property_list_t *property_list;
+ property_definition_t *property_definition;
source_elements_t *source_elements;
statement_t *statement;
struct _statement_list_t *statement_list;
@@ -164,7 +167,7 @@ static source_elements_t
*source_elements_add_statement(source_elements_t*,state
}
/* keywords */
-%token <identifier> kBREAK kCASE kCATCH kCONTINUE kDEFAULT kDELETE kDO kELSE
kFUNCTION kIF kFINALLY kFOR kIN
+%token <identifier> kBREAK kCASE kCATCH kCONTINUE kDEFAULT kDELETE kDO kELSE
kFUNCTION kIF kFINALLY kFOR kGET kIN kSET
%token <identifier> kINSTANCEOF kNEW kNULL kRETURN kSWITCH kTHIS kTHROW kTRUE
kFALSE kTRY kTYPEOF kVAR kVOID kWHILE kWITH
%token tANDAND tOROR tINC tDEC tHTMLCOMMENT kDIVEQ kDCOL
@@ -221,6 +224,7 @@ static source_elements_t
*source_elements_add_statement(source_elements_t*,state
%type <expr> CallExpression
%type <expr> MemberExpression
%type <expr> PrimaryExpression
+%type <expr> GetterSetterMethod
%type <identifier> Identifier_opt
%type <variable_list> VariableDeclarationList
%type <variable_list> VariableDeclarationListNoIn
@@ -237,9 +241,10 @@ static source_elements_t
*source_elements_add_statement(source_elements_t*,state
%type <ival> Elision Elision_opt
%type <element_list> ElementList
%type <property_list> PropertyNameAndValueList
+%type <property_definition> PropertyDefinition
%type <literal> PropertyName
%type <literal> BooleanLiteral
-%type <srcptr> KFunction
+%type <srcptr> KFunction left_bracket
%type <ival> AssignOper
%type <identifier> IdentifierName ReservedAsIdentifier
@@ -778,15 +783,35 @@ ObjectLiteral
: '{' '}' { $$ = new_prop_and_value_expression(ctx,
NULL); }
| '{' PropertyNameAndValueList '}'
{ $$ = new_prop_and_value_expression(ctx, $2); }
+ | '{' PropertyNameAndValueList ',' '}'
+ {
+ if(ctx->script->version < 2) {
+ WARN("Trailing comma in object literal is illegal in legacy
mode.\n");
+ YYABORT;
+ }
+ $$ = new_prop_and_value_expression(ctx, $2);
+ }
/* ECMA-262 3rd Edition 11.1.5 */
PropertyNameAndValueList
+ : PropertyDefinition { $$ = new_property_list(ctx, $1); }
+ | PropertyNameAndValueList ',' PropertyDefinition
+ { $$ = property_list_add(ctx, $1, $3); }
+
+/* ECMA-262 5.1 Edition 12.2.6 */
+PropertyDefinition
: PropertyName ':' AssignmentExpression
- { $$ = new_property_list(ctx, $1, $3); }
- | PropertyNameAndValueList ',' PropertyName ':'
AssignmentExpression
- { $$ = property_list_add(ctx, $1, $3, $5); }
+ { $$ = new_property_definition(ctx,
PROPERTY_DEFINITION_VALUE, $1, $3); }
+ | kGET PropertyName GetterSetterMethod
+ { $$ = new_property_definition(ctx,
PROPERTY_DEFINITION_GETTER, $2, $3); }
+ | kSET PropertyName GetterSetterMethod
+ { $$ = new_property_definition(ctx,
PROPERTY_DEFINITION_SETTER, $2, $3); }
-/* ECMA-262 3rd Edition 11.1.5 */
+GetterSetterMethod
+ : left_bracket FormalParameterList_opt right_bracket '{' FunctionBody
'}'
+ { $$ = new_function_expression(ctx, NULL, $2, $5, NULL,
$1, $6-$1); }
+
+/* Ecma-262 3rd Edition 11.1.5 */
PropertyName
: IdentifierName { $$ = new_string_literal(ctx, $1); }
| tStringLiteral { $$ = new_string_literal(ctx, $1); }
@@ -823,12 +848,14 @@ ReservedAsIdentifier
| kFINALLY { $$ = $1; }
| kFOR { $$ = $1; }
| kFUNCTION { $$ = $1; }
+ | kGET { $$ = $1; }
| kIF { $$ = $1; }
| kIN { $$ = $1; }
| kINSTANCEOF { $$ = $1; }
| kNEW { $$ = $1; }
| kNULL { $$ = $1; }
| kRETURN { $$ = $1; }
+ | kSET { $$ = $1; }
| kSWITCH { $$ = $1; }
| kTHIS { $$ = $1; }
| kTHROW { $$ = $1; }
@@ -862,7 +889,7 @@ semicolon_opt
| error { if(!allow_auto_semicolon(ctx)) {YYABORT;} }
left_bracket
- : '('
+ : '(' { $$ = ctx->ptr; }
| error { set_error(ctx, JS_E_MISSING_LBRACKET); YYABORT; }
right_bracket
@@ -913,10 +940,12 @@ static literal_t *new_null_literal(parser_ctx_t *ctx)
return ret;
}
-static prop_val_t *new_prop_val(parser_ctx_t *ctx, literal_t *name, expression_t *value)
+static property_definition_t *new_property_definition(parser_ctx_t *ctx,
property_definition_type_t type,
+ literal_t *name, expression_t
*value)
{
- prop_val_t *ret = parser_alloc(ctx, sizeof(prop_val_t));
+ property_definition_t *ret = parser_alloc(ctx, sizeof(property_definition_t));
+ ret->type = type;
ret->name = name;
ret->value = value;
ret->next = NULL;
@@ -924,19 +953,16 @@ static prop_val_t *new_prop_val(parser_ctx_t *ctx, literal_t *name,
expression_t
return ret;
}
-static property_list_t *new_property_list(parser_ctx_t *ctx, literal_t *name,
expression_t *value)
+static property_list_t *new_property_list(parser_ctx_t *ctx, property_definition_t
*prop)
{
property_list_t *ret = parser_alloc_tmp(ctx, sizeof(property_list_t));
-
- ret->head = ret->tail = new_prop_val(ctx, name, value);
-
+ ret->head = ret->tail = prop;
return ret;
... 126 lines suppressed ...