Kouhei Sutou
null+****@clear*****
Tue Aug 22 12:30:04 JST 2017
Kouhei Sutou 2017-08-22 12:30:04 +0900 (Tue, 22 Aug 2017) New Revision: 734b7a39607795dafc2b65c2e8cda364e090ec8e https://github.com/groonga/groonga/commit/734b7a39607795dafc2b65c2e8cda364e090ec8e Message: Support adjust in query Supported operators: * ">": increments score of a term * "<": decrements score of a term (decremented score is lower than incremented score but higher than normal score) * "~": doesn't change search result but decreases score of matched document in the current search result Notable changes: * grn_ii_sel(), grn_ii_select(): accept negative weight * ">" and "<" aren't logical operator such as "+" and "-". * "~" is a logical operator * ">", "<" and "~" put weight as GRN_DB_INT32 bulk to grn_expr_code::value of search operator * Before: grn_expr_code::value of GRN_OP_MATCH is NULL * After: grn_expr_code::value of GRN_OP_MATCH is GRN_BULK of weight Modified files: lib/expr.c lib/grn_ecmascript.c lib/grn_ecmascript.h lib/grn_ecmascript.lemon lib/ii.c lib/mrb/scripts/scan_info_builder.rb lib/mrb/scripts/scan_info_data.rb Modified: lib/expr.c (+98 -30) =================================================================== --- lib/expr.c 2017-08-21 09:28:54 +0900 (f724bf880) +++ lib/expr.c 2017-08-22 12:30:04 +0900 (b7880cb9b) @@ -4408,8 +4408,11 @@ scan_info_build_match_expr_codes_find_index(grn_ctx *ctx, scan_info *si, } static uint32_t -scan_info_build_match_expr_codes(grn_ctx *ctx, scan_info *si, - grn_expr *expr, uint32_t i) +scan_info_build_match_expr_codes(grn_ctx *ctx, + scan_info *si, + grn_expr *expr, + uint32_t i, + int32_t weight) { grn_expr_code *ec; grn_obj *index = NULL; @@ -4434,7 +4437,7 @@ scan_info_build_match_expr_codes(grn_ctx *ctx, scan_info *si, si->flags |= SCAN_ACCESSOR; } scan_info_put_index(ctx, si, index, sid, - get_weight(ctx, &(expr->codes[i]), &offset), + get_weight(ctx, &(expr->codes[i]), &offset) + weight, NULL, NULL, 0); i += offset; } @@ -4464,7 +4467,7 @@ scan_info_build_match_expr_codes(grn_ctx *ctx, scan_info *si, i++; } scan_info_put_index(ctx, si, index, sid, - get_weight(ctx, &(expr->codes[i]), &offset), + get_weight(ctx, &(expr->codes[i]), &offset) + weight, ec->value, (grn_obj *)expr, scorer_args_expr_offset); @@ -4488,12 +4491,15 @@ scan_info_build_match_expr_codes(grn_ctx *ctx, scan_info *si, } static void -scan_info_build_match_expr(grn_ctx *ctx, scan_info *si, grn_expr *expr) +scan_info_build_match_expr(grn_ctx *ctx, + scan_info *si, + grn_expr *expr, + int32_t weight) { uint32_t i; i = 0; while (i < expr->codes_curr) { - i = scan_info_build_match_expr_codes(ctx, si, expr, i); + i = scan_info_build_match_expr_codes(ctx, si, expr, i, weight); } } @@ -4611,7 +4617,7 @@ is_index_searchable_regexp(grn_ctx *ctx, grn_obj *regexp) } static void -scan_info_build_match(grn_ctx *ctx, scan_info *si) +scan_info_build_match(grn_ctx *ctx, scan_info *si, int32_t weight) { grn_obj **p, **pe; @@ -4630,9 +4636,9 @@ scan_info_build_match(grn_ctx *ctx, scan_info *si) pe = si->args + si->nargs; for (; p < pe; p++) { if ((*p)->header.type == GRN_EXPR) { - scan_info_build_match_expr(ctx, si, (grn_expr *)(*p)); + scan_info_build_match_expr(ctx, si, (grn_expr *)(*p), weight); } else if ((*p)->header.type == GRN_COLUMN_INDEX) { - scan_info_put_index(ctx, si, *p, 0, 1, NULL, NULL, 0); + scan_info_put_index(ctx, si, *p, 0, 1 + weight, NULL, NULL, 0); } else if (grn_obj_is_proc(ctx, *p)) { break; } else if (GRN_DB_OBJP(*p)) { @@ -4642,7 +4648,7 @@ scan_info_build_match(grn_ctx *ctx, scan_info *si) &index_datum, 1); if (n_index_data > 0) { scan_info_put_index(ctx, si, - index_datum.index, index_datum.section, 1, + index_datum.index, index_datum.section, 1 + weight, NULL, NULL, 0); } } else if (GRN_ACCESSORP(*p)) { @@ -4659,7 +4665,7 @@ scan_info_build_match(grn_ctx *ctx, scan_info *si) index = index_datum.index; } scan_info_put_index(ctx, si, - index, index_datum.section, 1, + index, index_datum.section, 1 + weight, NULL, NULL, 0); } } else { @@ -4982,7 +4988,13 @@ grn_scan_info_build_full(grn_ctx *ctx, grn_obj *expr, int *n, si->op = code_op; si->end = c - e->codes; sis[i++] = si; - scan_info_build_match(ctx, si); + { + int32_t weight = 0; + if (c->value && c->value->header.domain == GRN_DB_INT32) { + weight = GRN_INT32_VALUE(c->value); + } + scan_info_build_match(ctx, si, weight); + } if (ctx->rc != GRN_SUCCESS) { int j; for (j = 0; j < i; j++) { SI_FREE(sis[j]); } @@ -5327,7 +5339,13 @@ grn_scan_info_build_simple_operation(grn_ctx *ctx, si->op = operator->op; si->args[si->nargs++] = target->value; si->args[si->nargs++] = constant->value; - scan_info_build_match(ctx, si); + { + int32_t weight = 0; + if (operator->value && operator->value->header.domain == GRN_DB_INT32) { + weight = GRN_INT32_VALUE(operator->value); + } + scan_info_build_match(ctx, si, weight); + } return sis; } @@ -5432,7 +5450,13 @@ grn_scan_info_build_simple_and_operations(grn_ctx *ctx, } else { si->logical_op = GRN_OP_AND; } - scan_info_build_match(ctx, si); + { + int32_t weight = 0; + if (operator->value && operator->value->header.domain == GRN_DB_INT32) { + weight = GRN_INT32_VALUE(operator->value); + } + scan_info_build_match(ctx, si, weight); + } if (nth_sis > 0) { i++; @@ -6889,6 +6913,7 @@ typedef struct { grn_obj mode_stack; grn_obj max_interval_stack; grn_obj similarity_threshold_stack; + grn_obj weight_stack; grn_operator default_op; grn_select_optarg opt; grn_operator default_mode; @@ -6905,6 +6930,7 @@ typedef struct { const char *string; size_t string_length; int token; + int weight; } pending_token; } efs_info; @@ -7109,6 +7135,7 @@ parse_query_accept_string(grn_ctx *ctx, efs_info *efsi, { grn_obj *column, *token; grn_operator mode; + int32_t weight; GRN_PTR_PUT(ctx, &efsi->token_stack, grn_expr_add_str(ctx, efsi->e, str, str_size)); @@ -7123,7 +7150,11 @@ parse_query_accept_string(grn_ctx *ctx, efs_info *efsi, grn_expr_append_obj(efsi->ctx, efsi->e, token, GRN_OP_PUSH, 1); mode = grn_int32_value_at(&efsi->mode_stack, -1); + weight = grn_int32_value_at(&efsi->weight_stack, -1); switch (mode) { + case GRN_OP_ASSIGN : + grn_expr_append_op(efsi->ctx, efsi->e, mode, 2); + break; case GRN_OP_NEAR : case GRN_OP_NEAR2 : { @@ -7131,7 +7162,7 @@ parse_query_accept_string(grn_ctx *ctx, efs_info *efsi, max_interval = grn_int32_value_at(&efsi->max_interval_stack, -1); grn_expr_append_const_int(efsi->ctx, efsi->e, max_interval, GRN_OP_PUSH, 1); - grn_expr_append_op(efsi->ctx, efsi->e, mode, 3); + grn_expr_append_const_int(efsi->ctx, efsi->e, weight, mode, 3); } break; case GRN_OP_SIMILAR : @@ -7141,11 +7172,11 @@ parse_query_accept_string(grn_ctx *ctx, efs_info *efsi, grn_int32_value_at(&efsi->similarity_threshold_stack, -1); grn_expr_append_const_int(efsi->ctx, efsi->e, similarity_threshold, GRN_OP_PUSH, 1); - grn_expr_append_op(efsi->ctx, efsi->e, mode, 3); + grn_expr_append_const_int(efsi->ctx, efsi->e, weight, mode, 3); } break; default : - grn_expr_append_op(efsi->ctx, efsi->e, mode, 2); + grn_expr_append_const_int(efsi->ctx, efsi->e, weight, mode, 2); break; } } @@ -7165,12 +7196,17 @@ parse_query_flush_pending_token(grn_ctx *ctx, efs_info *q) cur_keep = q->cur; q->cur = q->pending_token.string; + if (q->pending_token.token == GRN_EXPR_TOKEN_ADJUST || + q->pending_token.token == GRN_EXPR_TOKEN_NEGATIVE) { + GRN_INT32_PUT(ctx, &q->weight_stack, q->pending_token.weight); + } PARSE(q->pending_token.token); q->cur = cur_keep; q->pending_token.string = NULL; q->pending_token.string_length = 0; q->pending_token.token = 0; + q->pending_token.weight = 0; } static void @@ -7197,6 +7233,33 @@ parse_query_accept_logical_op(grn_ctx *ctx, q->pending_token.token = token; } +static void +parse_query_accept_adjust(grn_ctx *ctx, + efs_info *q, + const char *string, + unsigned int string_length, + int token, + int weight) +{ + if (!(q->flags & GRN_EXPR_QUERY_NO_SYNTAX_ERROR)) { + GRN_INT32_PUT(ctx, &q->weight_stack, weight); + PARSE(token); + return; + } + + if (q->pending_token.string_length > 0) { + parse_query_accept_string(ctx, + q, + q->pending_token.string, + q->pending_token.string_length); + } + + q->pending_token.string = string; + q->pending_token.string_length = string_length; + q->pending_token.token = token; + q->pending_token.weight = weight; +} + static grn_rc parse_query_word(grn_ctx *ctx, efs_info *q) { @@ -7447,28 +7510,30 @@ parse_query(grn_ctx *ctx, efs_info *q) case GRN_QUERY_ADJ_INC : if (op->weight < 127) { op->weight++; } op->op = GRN_OP_ADJUST; - parse_query_accept_logical_op(ctx, - q, - q->cur, 1, - GRN_EXPR_TOKEN_ADJUST); + parse_query_accept_adjust(ctx, + q, + q->cur, 1, + GRN_EXPR_TOKEN_ADJUST, + op->weight); q->cur++; break; case GRN_QUERY_ADJ_DEC : if (op->weight > -128) { op->weight--; } op->op = GRN_OP_ADJUST; - parse_query_accept_logical_op(ctx, - q, - q->cur, 1, - GRN_EXPR_TOKEN_ADJUST); + parse_query_accept_adjust(ctx, + q, + q->cur, 1, + GRN_EXPR_TOKEN_ADJUST, + op->weight); q->cur++; break; case GRN_QUERY_ADJ_NEG : op->op = GRN_OP_ADJUST; - op->weight = -1; - parse_query_accept_logical_op(ctx, - q, - q->cur, 1, - GRN_EXPR_TOKEN_ADJUST); + parse_query_accept_adjust(ctx, + q, + q->cur, 1, + GRN_EXPR_TOKEN_NEGATIVE, + -DEFAULT_WEIGHT); q->cur++; break; case GRN_QUERY_PARENL : @@ -8235,6 +8300,7 @@ grn_expr_parse(grn_ctx *ctx, grn_obj *expr, GRN_INT32_INIT(&efsi.mode_stack, GRN_OBJ_VECTOR); GRN_INT32_INIT(&efsi.max_interval_stack, GRN_OBJ_VECTOR); GRN_INT32_INIT(&efsi.similarity_threshold_stack, GRN_OBJ_VECTOR); + GRN_INT32_INIT(&efsi.weight_stack, GRN_OBJ_VECTOR); GRN_PTR_INIT(&efsi.column_stack, GRN_OBJ_VECTOR, GRN_ID_NIL); GRN_PTR_INIT(&efsi.token_stack, GRN_OBJ_VECTOR, GRN_ID_NIL); efsi.e = expr; @@ -8245,6 +8311,7 @@ grn_expr_parse(grn_ctx *ctx, grn_obj *expr, GRN_PTR_PUT(ctx, &efsi.column_stack, default_column); GRN_INT32_PUT(ctx, &efsi.op_stack, default_op); GRN_INT32_PUT(ctx, &efsi.mode_stack, default_mode); + GRN_INT32_PUT(ctx, &efsi.weight_stack, 0); efsi.default_flags = efsi.flags = flags; efsi.escalation_threshold = GRN_DEFAULT_MATCH_ESCALATION_THRESHOLD; efsi.escalation_decaystep = DEFAULT_DECAYSTEP; @@ -8291,6 +8358,7 @@ grn_expr_parse(grn_ctx *ctx, grn_obj *expr, GRN_OBJ_FIN(ctx, &efsi.mode_stack); GRN_OBJ_FIN(ctx, &efsi.max_interval_stack); GRN_OBJ_FIN(ctx, &efsi.similarity_threshold_stack); + GRN_OBJ_FIN(ctx, &efsi.weight_stack); GRN_OBJ_FIN(ctx, &efsi.column_stack); GRN_OBJ_FIN(ctx, &efsi.token_stack); GRN_OBJ_FIN(ctx, &efsi.buf); Modified: lib/grn_ecmascript.c (+1017 -971) =================================================================== --- lib/grn_ecmascript.c 2017-08-21 09:28:54 +0900 (30cea9ed9) +++ lib/grn_ecmascript.c 2017-08-22 12:30:04 +0900 (cfabcc919) @@ -90,13 +90,13 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned char -#define YYNOCODE 114 +#define YYNOCODE 115 #define YYACTIONTYPE unsigned short int #define grn_expr_parserTOKENTYPE int typedef union { int yyinit; grn_expr_parserTOKENTYPE yy0; - void * yy165; + void * yy217; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -105,16 +105,16 @@ typedef union { #define grn_expr_parserARG_PDECL , efs_info *efsi #define grn_expr_parserARG_FETCH efs_info *efsi = yypParser->efsi #define grn_expr_parserARG_STORE yypParser->efsi = efsi -#define YYNSTATE 142 -#define YYNRULE 134 -#define YY_MAX_SHIFT 141 -#define YY_MIN_SHIFTREDUCE 227 -#define YY_MAX_SHIFTREDUCE 360 -#define YY_MIN_REDUCE 361 -#define YY_MAX_REDUCE 494 -#define YY_ERROR_ACTION 495 -#define YY_ACCEPT_ACTION 496 -#define YY_NO_ACTION 497 +#define YYNSTATE 145 +#define YYNRULE 136 +#define YY_MAX_SHIFT 144 +#define YY_MIN_SHIFTREDUCE 232 +#define YY_MAX_SHIFTREDUCE 367 +#define YY_MIN_REDUCE 368 +#define YY_MAX_REDUCE 503 +#define YY_ERROR_ACTION 504 +#define YY_ACCEPT_ACTION 505 +#define YY_NO_ACTION 506 /************* End control #defines *******************************************/ /* Define the yytestcase() macro to be a no-op if is not already defined @@ -186,415 +186,423 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (1759) +#define YY_ACTTAB_COUNT (1794) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 3, 71, 112, 112, 133, 316, 2, 77, 81, 126, - /* 10 */ 1, 77, 70, 496, 78, 109, 128, 234, 78, 74, - /* 20 */ 109, 109, 88, 123, 122, 136, 135, 134, 117, 85, - /* 30 */ 100, 113, 101, 101, 101, 88, 74, 234, 234, 74, - /* 40 */ 74, 316, 73, 356, 81, 141, 9, 227, 70, 230, - /* 50 */ 65, 64, 53, 52, 51, 68, 67, 66, 63, 62, - /* 60 */ 61, 60, 59, 58, 341, 342, 343, 344, 345, 4, - /* 70 */ 124, 69, 57, 56, 74, 124, 124, 88, 123, 122, - /* 80 */ 136, 135, 134, 117, 85, 100, 113, 101, 101, 101, - /* 90 */ 88, 74, 308, 130, 74, 74, 292, 336, 112, 112, - /* 100 */ 133, 316, 2, 232, 81, 126, 1, 107, 70, 77, - /* 110 */ 115, 31, 30, 77, 74, 115, 115, 88, 123, 122, - /* 120 */ 136, 135, 134, 117, 85, 100, 113, 101, 101, 101, - /* 130 */ 88, 74, 231, 7, 74, 74, 339, 72, 107, 130, - /* 140 */ 355, 133, 297, 293, 229, 76, 65, 64, 23, 55, - /* 150 */ 54, 68, 67, 66, 63, 62, 61, 60, 59, 58, - /* 160 */ 341, 342, 343, 344, 345, 4, 83, 82, 79, 316, - /* 170 */ 73, 317, 81, 141, 9, 338, 70, 65, 64, 305, - /* 180 */ 228, 28, 68, 67, 66, 63, 62, 61, 60, 59, - /* 190 */ 58, 341, 342, 343, 344, 345, 4, 108, 349, 306, - /* 200 */ 74, 307, 307, 88, 123, 122, 136, 135, 134, 117, - /* 210 */ 85, 100, 113, 101, 101, 101, 88, 74, 10, 7, - /* 220 */ 74, 74, 339, 72, 36, 35, 350, 6, 302, 74, - /* 230 */ 84, 84, 88, 123, 122, 136, 135, 134, 117, 85, - /* 240 */ 100, 113, 101, 101, 101, 88, 74, 447, 446, 74, - /* 250 */ 74, 11, 84, 7, 490, 348, 339, 72, 290, 291, - /* 260 */ 350, 5, 28, 65, 64, 28, 80, 29, 68, 67, - /* 270 */ 66, 63, 62, 61, 60, 59, 58, 341, 342, 343, - /* 280 */ 344, 345, 4, 347, 7, 310, 309, 339, 72, 26, - /* 290 */ 8, 349, 132, 233, 127, 28, 129, 65, 64, 448, - /* 300 */ 32, 357, 68, 67, 66, 63, 62, 61, 60, 59, - /* 310 */ 58, 341, 342, 343, 344, 345, 4, 346, 24, 34, - /* 320 */ 25, 363, 296, 33, 363, 363, 363, 363, 65, 64, - /* 330 */ 363, 363, 363, 68, 67, 66, 63, 62, 61, 60, - /* 340 */ 59, 58, 341, 342, 343, 344, 345, 4, 363, 363, - /* 350 */ 75, 74, 307, 307, 88, 123, 122, 136, 135, 134, - /* 360 */ 117, 85, 100, 113, 101, 101, 101, 88, 74, 363, - /* 370 */ 363, 74, 74, 363, 363, 363, 363, 363, 363, 304, - /* 380 */ 74, 299, 299, 88, 123, 122, 136, 135, 134, 117, - /* 390 */ 85, 100, 113, 101, 101, 101, 88, 74, 363, 363, - /* 400 */ 74, 74, 363, 363, 363, 363, 363, 111, 115, 363, - /* 410 */ 363, 363, 74, 115, 115, 88, 123, 122, 136, 135, - /* 420 */ 134, 117, 85, 100, 113, 101, 101, 101, 88, 74, - /* 430 */ 118, 363, 74, 74, 74, 118, 118, 88, 123, 122, - /* 440 */ 136, 135, 134, 117, 85, 100, 113, 101, 101, 101, - /* 450 */ 88, 74, 363, 7, 74, 74, 339, 72, 124, 363, - /* 460 */ 363, 363, 74, 124, 124, 88, 123, 122, 136, 135, - /* 470 */ 134, 117, 85, 100, 113, 101, 101, 101, 88, 74, - /* 480 */ 363, 7, 74, 74, 339, 72, 363, 363, 363, 363, - /* 490 */ 363, 363, 363, 363, 363, 363, 363, 65, 64, 363, - /* 500 */ 363, 363, 68, 67, 66, 63, 62, 61, 60, 59, - /* 510 */ 58, 341, 342, 125, 344, 345, 4, 363, 363, 363, - /* 520 */ 363, 363, 363, 363, 363, 65, 64, 363, 363, 363, - /* 530 */ 68, 67, 66, 63, 62, 61, 60, 59, 58, 341, - /* 540 */ 342, 343, 344, 345, 4, 74, 353, 353, 88, 123, - /* 550 */ 122, 136, 135, 134, 117, 85, 100, 113, 101, 101, - /* 560 */ 101, 88, 74, 363, 363, 74, 74, 74, 352, 352, - /* 570 */ 88, 123, 122, 136, 135, 134, 117, 85, 100, 113, - /* 580 */ 101, 101, 101, 88, 74, 363, 363, 74, 74, 74, - /* 590 */ 247, 247, 88, 123, 122, 136, 135, 134, 117, 85, - /* 600 */ 100, 113, 101, 101, 101, 88, 74, 363, 363, 74, - /* 610 */ 74, 363, 363, 74, 246, 246, 88, 123, 122, 136, - /* 620 */ 135, 134, 117, 85, 100, 113, 101, 101, 101, 88, - /* 630 */ 74, 363, 363, 74, 74, 74, 245, 245, 88, 123, - /* 640 */ 122, 136, 135, 134, 117, 85, 100, 113, 101, 101, - /* 650 */ 101, 88, 74, 363, 363, 74, 74, 74, 244, 244, - /* 660 */ 88, 123, 122, 136, 135, 134, 117, 85, 100, 113, - /* 670 */ 101, 101, 101, 88, 74, 363, 363, 74, 74, 74, - /* 680 */ 243, 243, 88, 123, 122, 136, 135, 134, 117, 85, - /* 690 */ 100, 113, 101, 101, 101, 88, 74, 363, 363, 74, - /* 700 */ 74, 74, 242, 242, 88, 123, 122, 136, 135, 134, - /* 710 */ 117, 85, 100, 113, 101, 101, 101, 88, 74, 363, - /* 720 */ 363, 74, 74, 74, 241, 241, 88, 123, 122, 136, - /* 730 */ 135, 134, 117, 85, 100, 113, 101, 101, 101, 88, - /* 740 */ 74, 363, 363, 74, 74, 74, 240, 240, 88, 123, - /* 750 */ 122, 136, 135, 134, 117, 85, 100, 113, 101, 101, - /* 760 */ 101, 88, 74, 363, 363, 74, 74, 74, 239, 239, - /* 770 */ 88, 123, 122, 136, 135, 134, 117, 85, 100, 113, - /* 780 */ 101, 101, 101, 88, 74, 363, 363, 74, 74, 74, - /* 790 */ 238, 238, 88, 123, 122, 136, 135, 134, 117, 85, - /* 800 */ 100, 113, 101, 101, 101, 88, 74, 363, 363, 74, - /* 810 */ 74, 74, 237, 237, 88, 123, 122, 136, 135, 134, - /* 820 */ 117, 85, 100, 113, 101, 101, 101, 88, 74, 363, - /* 830 */ 363, 74, 74, 74, 300, 300, 88, 123, 122, 136, - /* 840 */ 135, 134, 117, 85, 100, 113, 101, 101, 101, 88, - /* 850 */ 74, 363, 363, 74, 74, 74, 295, 295, 88, 123, - /* 860 */ 122, 136, 135, 134, 117, 85, 100, 113, 101, 101, - /* 870 */ 101, 88, 74, 363, 363, 74, 74, 74, 248, 248, - /* 880 */ 88, 123, 122, 136, 135, 134, 117, 85, 100, 113, - /* 890 */ 101, 101, 101, 88, 74, 363, 363, 74, 74, 74, - /* 900 */ 140, 140, 88, 123, 122, 136, 135, 134, 117, 85, - /* 910 */ 100, 113, 101, 101, 101, 88, 74, 363, 363, 74, - /* 920 */ 74, 74, 236, 236, 88, 123, 122, 136, 135, 134, - /* 930 */ 117, 85, 100, 113, 101, 101, 101, 88, 74, 363, - /* 940 */ 363, 74, 74, 74, 235, 235, 88, 123, 122, 136, - /* 950 */ 135, 134, 117, 85, 100, 113, 101, 101, 101, 88, - /* 960 */ 74, 363, 74, 74, 74, 119, 363, 110, 136, 135, - /* 970 */ 134, 117, 85, 100, 113, 101, 101, 101, 119, 74, - /* 980 */ 363, 74, 74, 74, 119, 363, 363, 131, 135, 134, - /* 990 */ 117, 85, 100, 113, 101, 101, 101, 119, 74, 363, - /* 1000 */ 363, 74, 74, 74, 363, 363, 119, 363, 363, 139, - /* 1010 */ 135, 134, 117, 85, 100, 113, 101, 101, 101, 119, - /* 1020 */ 74, 363, 363, 74, 74, 74, 363, 363, 119, 363, - /* 1030 */ 363, 363, 138, 134, 117, 85, 100, 113, 101, 101, - /* 1040 */ 101, 119, 74, 363, 363, 74, 74, 74, 363, 363, - /* 1050 */ 119, 363, 363, 363, 363, 137, 117, 85, 100, 113, - /* 1060 */ 101, 101, 101, 119, 74, 363, 363, 74, 74, 50, - /* 1070 */ 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, - /* 1080 */ 39, 38, 37, 27, 22, 21, 20, 19, 18, 17, - /* 1090 */ 16, 15, 14, 13, 12, 74, 363, 363, 119, 363, - /* 1100 */ 363, 363, 363, 363, 121, 85, 100, 113, 101, 101, - /* 1110 */ 101, 119, 74, 363, 363, 74, 74, 363, 74, 363, - /* 1120 */ 363, 119, 363, 363, 363, 290, 291, 363, 86, 100, - /* 1130 */ 113, 101, 101, 101, 119, 74, 363, 363, 74, 74, - /* 1140 */ 74, 363, 363, 119, 363, 363, 363, 363, 363, 363, - /* 1150 */ 87, 100, 113, 101, 101, 101, 119, 74, 363, 74, - /* 1160 */ 74, 74, 119, 363, 363, 363, 363, 363, 363, 363, - /* 1170 */ 89, 113, 101, 101, 101, 119, 74, 363, 74, 74, - /* 1180 */ 74, 119, 363, 363, 363, 363, 363, 363, 363, 90, - /* 1190 */ 113, 101, 101, 101, 119, 74, 363, 363, 74, 74, - /* 1200 */ 363, 74, 363, 363, 119, 363, 363, 7, 363, 363, - /* 1210 */ 339, 72, 91, 113, 101, 101, 101, 119, 74, 363, - /* 1220 */ 363, 74, 74, 74, 363, 363, 119, 363, 363, 363, - /* 1230 */ 363, 363, 363, 363, 92, 113, 101, 101, 101, 119, - /* 1240 */ 74, 363, 74, 74, 74, 119, 363, 363, 363, 363, - /* 1250 */ 363, 363, 363, 93, 113, 101, 101, 101, 119, 74, - /* 1260 */ 363, 74, 74, 74, 119, 341, 342, 343, 344, 345, - /* 1270 */ 4, 363, 94, 113, 101, 101, 101, 119, 74, 363, - /* 1280 */ 363, 74, 74, 363, 74, 363, 363, 119, 363, 363, - /* 1290 */ 363, 363, 363, 363, 363, 95, 113, 101, 101, 101, - /* 1300 */ 119, 74, 363, 363, 74, 74, 74, 363, 363, 119, - /* 1310 */ 363, 363, 363, 363, 363, 363, 363, 96, 113, 101, - /* 1320 */ 101, 101, 119, 74, 363, 74, 74, 74, 119, 363, - /* 1330 */ 363, 363, 363, 363, 363, 363, 97, 113, 101, 101, - /* 1340 */ 101, 119, 74, 363, 74, 74, 74, 119, 363, 363, - /* 1350 */ 363, 363, 363, 363, 363, 98, 113, 101, 101, 101, - /* 1360 */ 119, 74, 363, 363, 74, 74, 363, 74, 363, 363, - /* 1370 */ 119, 363, 363, 363, 363, 363, 363, 363, 99, 113, - /* 1380 */ 101, 101, 101, 119, 74, 363, 363, 74, 74, 74, - /* 1390 */ 363, 363, 119, 363, 363, 363, 363, 363, 363, 363, - /* 1400 */ 102, 113, 101, 101, 101, 119, 74, 363, 74, 74, - /* 1410 */ 74, 119, 363, 363, 363, 363, 363, 363, 363, 104, - /* 1420 */ 113, 101, 101, 101, 119, 74, 363, 74, 74, 74, - /* 1430 */ 119, 363, 363, 363, 363, 363, 363, 363, 106, 113, - /* 1440 */ 101, 101, 101, 119, 74, 363, 363, 74, 74, 363, - /* 1450 */ 74, 363, 363, 119, 363, 363, 363, 363, 363, 363, - /* 1460 */ 363, 363, 114, 101, 101, 101, 119, 74, 363, 363, - /* 1470 */ 74, 74, 74, 363, 363, 119, 363, 363, 363, 363, - /* 1480 */ 363, 363, 363, 363, 116, 101, 101, 101, 119, 74, - /* 1490 */ 363, 74, 74, 74, 119, 363, 363, 363, 363, 363, - /* 1500 */ 363, 363, 363, 120, 101, 101, 101, 119, 74, 363, - /* 1510 */ 363, 74, 74, 445, 363, 363, 83, 82, 79, 316, - /* 1520 */ 73, 363, 81, 141, 9, 74, 70, 363, 119, 363, - /* 1530 */ 363, 363, 363, 363, 363, 363, 363, 363, 103, 103, - /* 1540 */ 103, 119, 74, 363, 363, 74, 74, 74, 363, 363, - /* 1550 */ 119, 363, 363, 363, 363, 74, 363, 363, 119, 363, - /* 1560 */ 105, 105, 105, 119, 74, 363, 363, 74, 74, 278, - /* 1570 */ 278, 119, 74, 363, 74, 74, 74, 119, 363, 363, - /* 1580 */ 363, 363, 363, 363, 363, 363, 363, 363, 277, 277, - /* 1590 */ 119, 74, 363, 363, 74, 74, 74, 363, 363, 119, - /* 1600 */ 363, 363, 363, 363, 363, 74, 363, 363, 119, 363, - /* 1610 */ 289, 289, 119, 74, 363, 363, 74, 74, 363, 288, - /* 1620 */ 288, 119, 74, 363, 74, 74, 74, 119, 363, 363, - /* 1630 */ 363, 363, 363, 74, 363, 363, 119, 363, 287, 287, - /* 1640 */ 119, 74, 363, 74, 74, 74, 119, 286, 286, 119, - /* 1650 */ 74, 363, 74, 74, 74, 119, 363, 285, 285, 119, - /* 1660 */ 74, 363, 363, 74, 74, 363, 284, 284, 119, 74, - /* 1670 */ 363, 74, 74, 74, 119, 363, 363, 363, 363, 74, - /* 1680 */ 363, 363, 119, 363, 363, 283, 283, 119, 74, 363, - /* 1690 */ 363, 74, 74, 282, 282, 119, 74, 363, 363, 74, - /* 1700 */ 74, 363, 74, 363, 363, 119, 363, 363, 363, 363, - /* 1710 */ 74, 363, 363, 119, 363, 363, 281, 281, 119, 74, - /* 1720 */ 363, 363, 74, 74, 280, 280, 119, 74, 363, 74, - /* 1730 */ 74, 74, 119, 363, 363, 363, 363, 74, 363, 363, - /* 1740 */ 119, 363, 363, 279, 279, 119, 74, 363, 363, 74, - /* 1750 */ 74, 276, 276, 119, 74, 363, 363, 74, 74, + /* 0 */ 3, 72, 115, 115, 136, 131, 323, 2, 363, 54, + /* 10 */ 83, 129, 1, 232, 71, 505, 79, 112, 10, 241, + /* 20 */ 79, 75, 112, 112, 91, 126, 125, 139, 138, 137, + /* 30 */ 120, 88, 103, 116, 104, 104, 104, 91, 75, 241, + /* 40 */ 241, 75, 75, 323, 74, 457, 84, 83, 144, 9, + /* 50 */ 236, 71, 66, 65, 53, 52, 51, 69, 68, 67, + /* 60 */ 64, 63, 61, 60, 59, 348, 349, 350, 351, 352, + /* 70 */ 4, 127, 70, 58, 57, 75, 127, 127, 91, 126, + /* 80 */ 125, 139, 138, 137, 120, 88, 103, 116, 104, 104, + /* 90 */ 104, 91, 75, 78, 456, 75, 75, 78, 76, 115, + /* 100 */ 115, 136, 235, 323, 2, 499, 54, 83, 129, 1, + /* 110 */ 5, 71, 78, 118, 110, 82, 78, 75, 118, 118, + /* 120 */ 91, 126, 125, 139, 138, 137, 120, 88, 103, 116, + /* 130 */ 104, 104, 104, 91, 75, 315, 133, 75, 75, 7, + /* 140 */ 300, 62, 77, 346, 73, 110, 133, 362, 136, 66, + /* 150 */ 65, 299, 343, 239, 69, 68, 67, 64, 63, 61, + /* 160 */ 60, 59, 348, 349, 350, 351, 352, 4, 50, 49, + /* 170 */ 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, + /* 180 */ 38, 37, 31, 30, 66, 65, 312, 56, 55, 69, + /* 190 */ 68, 67, 64, 63, 61, 60, 59, 348, 349, 350, + /* 200 */ 351, 352, 4, 111, 238, 313, 75, 314, 314, 91, + /* 210 */ 126, 125, 139, 138, 137, 120, 88, 103, 116, 104, + /* 220 */ 104, 104, 91, 75, 36, 35, 75, 75, 7, 237, + /* 230 */ 62, 6, 346, 73, 309, 240, 357, 28, 75, 87, + /* 240 */ 87, 91, 126, 125, 139, 138, 137, 120, 88, 103, + /* 250 */ 116, 104, 104, 104, 91, 75, 304, 234, 75, 75, + /* 260 */ 11, 87, 7, 23, 62, 233, 346, 73, 297, 298, + /* 270 */ 357, 7, 356, 66, 65, 346, 73, 130, 69, 68, + /* 280 */ 67, 64, 63, 61, 60, 59, 348, 349, 350, 351, + /* 290 */ 352, 4, 354, 7, 8, 62, 135, 346, 73, 345, + /* 300 */ 317, 356, 32, 29, 316, 132, 28, 66, 65, 364, + /* 310 */ 24, 34, 69, 68, 67, 64, 63, 61, 60, 59, + /* 320 */ 348, 349, 350, 351, 352, 4, 353, 26, 355, 348, + /* 330 */ 349, 350, 351, 352, 4, 33, 25, 370, 66, 65, + /* 340 */ 370, 370, 370, 69, 68, 67, 64, 63, 61, 60, + /* 350 */ 59, 348, 349, 350, 351, 352, 4, 75, 314, 314, + /* 360 */ 91, 126, 125, 139, 138, 137, 120, 88, 103, 116, + /* 370 */ 104, 104, 104, 91, 75, 370, 370, 75, 75, 370, + /* 380 */ 370, 370, 370, 370, 370, 311, 28, 370, 370, 370, + /* 390 */ 370, 75, 306, 306, 91, 126, 125, 139, 138, 137, + /* 400 */ 120, 88, 103, 116, 104, 104, 104, 91, 75, 370, + /* 410 */ 370, 75, 75, 370, 370, 370, 370, 370, 114, 118, + /* 420 */ 370, 370, 370, 75, 118, 118, 91, 126, 125, 139, + /* 430 */ 138, 137, 120, 88, 103, 116, 104, 104, 104, 91, + /* 440 */ 75, 121, 303, 75, 75, 75, 121, 121, 91, 126, + /* 450 */ 125, 139, 138, 137, 120, 88, 103, 116, 104, 104, + /* 460 */ 104, 91, 75, 370, 370, 75, 75, 370, 7, 370, + /* 470 */ 62, 127, 346, 73, 370, 75, 127, 127, 91, 126, + /* 480 */ 125, 139, 138, 137, 120, 88, 103, 116, 104, 104, + /* 490 */ 104, 91, 75, 455, 370, 75, 75, 7, 370, 62, + /* 500 */ 370, 346, 73, 370, 370, 370, 370, 370, 370, 28, + /* 510 */ 370, 370, 370, 66, 65, 370, 370, 370, 69, 68, + /* 520 */ 67, 64, 63, 61, 60, 59, 348, 349, 128, 351, + /* 530 */ 352, 4, 370, 370, 370, 370, 370, 370, 370, 370, + /* 540 */ 370, 370, 66, 65, 370, 370, 370, 69, 68, 67, + /* 550 */ 64, 63, 61, 60, 59, 348, 349, 350, 351, 352, + /* 560 */ 4, 75, 360, 360, 91, 126, 125, 139, 138, 137, + /* 570 */ 120, 88, 103, 116, 104, 104, 104, 91, 75, 370, + /* 580 */ 370, 75, 75, 75, 359, 359, 91, 126, 125, 139, + /* 590 */ 138, 137, 120, 88, 103, 116, 104, 104, 104, 91, + /* 600 */ 75, 370, 370, 75, 75, 75, 254, 254, 91, 126, + /* 610 */ 125, 139, 138, 137, 120, 88, 103, 116, 104, 104, + /* 620 */ 104, 91, 75, 370, 370, 75, 75, 75, 253, 253, + /* 630 */ 91, 126, 125, 139, 138, 137, 120, 88, 103, 116, + /* 640 */ 104, 104, 104, 91, 75, 370, 370, 75, 75, 75, + /* 650 */ 252, 252, 91, 126, 125, 139, 138, 137, 120, 88, + /* 660 */ 103, 116, 104, 104, 104, 91, 75, 370, 370, 75, + /* 670 */ 75, 75, 251, 251, 91, 126, 125, 139, 138, 137, + /* 680 */ 120, 88, 103, 116, 104, 104, 104, 91, 75, 370, + /* 690 */ 370, 75, 75, 75, 250, 250, 91, 126, 125, 139, + /* 700 */ 138, 137, 120, 88, 103, 116, 104, 104, 104, 91, + /* 710 */ 75, 370, 370, 75, 75, 75, 249, 249, 91, 126, + /* 720 */ 125, 139, 138, 137, 120, 88, 103, 116, 104, 104, + /* 730 */ 104, 91, 75, 370, 370, 75, 75, 75, 248, 248, + /* 740 */ 91, 126, 125, 139, 138, 137, 120, 88, 103, 116, + /* 750 */ 104, 104, 104, 91, 75, 370, 370, 75, 75, 75, + /* 760 */ 247, 247, 91, 126, 125, 139, 138, 137, 120, 88, + /* 770 */ 103, 116, 104, 104, 104, 91, 75, 370, 370, 75, + /* 780 */ 75, 75, 246, 246, 91, 126, 125, 139, 138, 137, + /* 790 */ 120, 88, 103, 116, 104, 104, 104, 91, 75, 370, + /* 800 */ 370, 75, 75, 75, 245, 245, 91, 126, 125, 139, + /* 810 */ 138, 137, 120, 88, 103, 116, 104, 104, 104, 91, + /* 820 */ 75, 370, 370, 75, 75, 75, 244, 244, 91, 126, + /* 830 */ 125, 139, 138, 137, 120, 88, 103, 116, 104, 104, + /* 840 */ 104, 91, 75, 370, 370, 75, 75, 75, 307, 307, + /* 850 */ 91, 126, 125, 139, 138, 137, 120, 88, 103, 116, + /* 860 */ 104, 104, 104, 91, 75, 370, 370, 75, 75, 75, + /* 870 */ 302, 302, 91, 126, 125, 139, 138, 137, 120, 88, + /* 880 */ 103, 116, 104, 104, 104, 91, 75, 370, 370, 75, + /* 890 */ 75, 75, 255, 255, 91, 126, 125, 139, 138, 137, + /* 900 */ 120, 88, 103, 116, 104, 104, 104, 91, 75, 370, + /* 910 */ 370, 75, 75, 75, 143, 143, 91, 126, 125, 139, + /* 920 */ 138, 137, 120, 88, 103, 116, 104, 104, 104, 91, + /* 930 */ 75, 370, 370, 75, 75, 75, 243, 243, 91, 126, + /* 940 */ 125, 139, 138, 137, 120, 88, 103, 116, 104, 104, + /* 950 */ 104, 91, 75, 370, 370, 75, 75, 75, 242, 242, + /* 960 */ 91, 126, 125, 139, 138, 137, 120, 88, 103, 116, + /* 970 */ 104, 104, 104, 91, 75, 370, 75, 75, 75, 122, + /* 980 */ 370, 113, 139, 138, 137, 120, 88, 103, 116, 104, + /* 990 */ 104, 104, 122, 75, 370, 75, 75, 75, 122, 370, + /* 1000 */ 370, 134, 138, 137, 120, 88, 103, 116, 104, 104, + /* 1010 */ 104, 122, 75, 370, 75, 75, 75, 122, 370, 370, + /* 1020 */ 142, 138, 137, 120, 88, 103, 116, 104, 104, 104, + /* 1030 */ 122, 75, 370, 75, 75, 75, 122, 370, 370, 370, + /* 1040 */ 141, 137, 120, 88, 103, 116, 104, 104, 104, 122, + /* 1050 */ 75, 370, 75, 75, 75, 122, 370, 370, 370, 370, + /* 1060 */ 140, 120, 88, 103, 116, 104, 104, 104, 122, 75, + /* 1070 */ 370, 370, 75, 75, 370, 370, 370, 370, 27, 22, + /* 1080 */ 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, + /* 1090 */ 75, 370, 370, 122, 370, 370, 370, 370, 370, 124, + /* 1100 */ 88, 103, 116, 104, 104, 104, 122, 75, 370, 370, + /* 1110 */ 75, 75, 75, 370, 370, 122, 370, 370, 370, 370, + /* 1120 */ 297, 298, 89, 103, 116, 104, 104, 104, 122, 75, + /* 1130 */ 370, 75, 75, 75, 122, 370, 370, 370, 370, 370, + /* 1140 */ 370, 90, 103, 116, 104, 104, 104, 122, 75, 370, + /* 1150 */ 370, 75, 75, 370, 370, 86, 85, 81, 80, 323, + /* 1160 */ 74, 324, 84, 83, 144, 9, 454, 71, 370, 86, + /* 1170 */ 85, 81, 80, 323, 74, 370, 84, 83, 144, 9, + /* 1180 */ 370, 71, 370, 75, 370, 370, 122, 370, 370, 370, + /* 1190 */ 370, 370, 370, 370, 92, 116, 104, 104, 104, 122, + /* 1200 */ 75, 370, 370, 75, 75, 75, 370, 370, 122, 370, + /* 1210 */ 370, 370, 370, 370, 370, 370, 93, 116, 104, 104, + /* 1220 */ 104, 122, 75, 370, 370, 75, 75, 75, 370, 370, + /* 1230 */ 122, 370, 370, 370, 370, 370, 370, 370, 94, 116, + /* 1240 */ 104, 104, 104, 122, 75, 370, 75, 75, 75, 122, + /* 1250 */ 370, 370, 370, 370, 370, 370, 370, 95, 116, 104, + /* 1260 */ 104, 104, 122, 75, 370, 75, 75, 75, 122, 370, + /* 1270 */ 370, 370, 370, 370, 370, 370, 96, 116, 104, 104, + /* 1280 */ 104, 122, 75, 370, 75, 75, 75, 122, 370, 370, + /* 1290 */ 370, 370, 370, 370, 370, 97, 116, 104, 104, 104, + /* 1300 */ 122, 75, 370, 75, 75, 75, 122, 370, 370, 370, + /* 1310 */ 370, 370, 370, 370, 98, 116, 104, 104, 104, 122, + /* 1320 */ 75, 370, 75, 75, 75, 122, 370, 370, 370, 370, + /* 1330 */ 370, 370, 370, 99, 116, 104, 104, 104, 122, 75, + /* 1340 */ 370, 75, 75, 75, 122, 370, 370, 370, 370, 370, + /* 1350 */ 370, 370, 100, 116, 104, 104, 104, 122, 75, 370, + /* 1360 */ 75, 75, 75, 122, 370, 370, 370, 370, 370, 370, + /* 1370 */ 370, 101, 116, 104, 104, 104, 122, 75, 370, 75, + /* 1380 */ 75, 75, 122, 370, 370, 370, 370, 370, 370, 370, + /* 1390 */ 102, 116, 104, 104, 104, 122, 75, 370, 75, 75, + /* 1400 */ 75, 122, 370, 370, 370, 370, 370, 370, 370, 105, + /* 1410 */ 116, 104, 104, 104, 122, 75, 370, 75, 75, 75, + /* 1420 */ 122, 370, 370, 370, 370, 370, 370, 370, 107, 116, + /* 1430 */ 104, 104, 104, 122, 75, 370, 75, 75, 75, 122, + /* 1440 */ 370, 370, 370, 370, 370, 370, 370, 109, 116, 104, + /* 1450 */ 104, 104, 122, 75, 370, 75, 75, 75, 122, 370, + /* 1460 */ 370, 370, 370, 370, 370, 370, 370, 117, 104, 104, + /* 1470 */ 104, 122, 75, 370, 75, 75, 75, 122, 370, 370, + /* 1480 */ 370, 370, 370, 370, 370, 370, 119, 104, 104, 104, + /* 1490 */ 122, 75, 370, 75, 75, 75, 122, 370, 370, 370, + /* 1500 */ 237, 75, 370, 370, 122, 123, 104, 104, 104, 122, + /* 1510 */ 75, 370, 370, 75, 75, 293, 293, 122, 75, 370, + /* 1520 */ 75, 75, 75, 122, 370, 370, 370, 370, 370, 370, + /* 1530 */ 370, 370, 370, 106, 106, 106, 122, 75, 370, 75, + /* 1540 */ 75, 75, 122, 370, 370, 370, 370, 370, 370, 370, + /* 1550 */ 370, 370, 108, 108, 108, 122, 75, 370, 75, 75, + /* 1560 */ 75, 122, 370, 370, 370, 370, 370, 370, 370, 370, + /* 1570 */ 370, 370, 285, 285, 122, 75, 370, 75, 75, 75, + /* 1580 */ 122, 370, 370, 370, 370, 75, 370, 370, 122, 370, + /* 1590 */ 370, 284, 284, 122, 75, 370, 370, 75, 75, 296, + /* 1600 */ 296, 122, 75, 370, 75, 75, 75, 122, 370, 370, + /* 1610 */ 370, 370, 370, 370, 370, 370, 370, 370, 295, 295, + /* 1620 */ 122, 75, 370, 75, 75, 75, 122, 370, 370, 370, + /* 1630 */ 370, 370, 370, 370, 370, 370, 370, 294, 294, 122, + /* 1640 */ 75, 370, 75, 75, 75, 122, 370, 370, 370, 370, + /* 1650 */ 370, 370, 370, 370, 370, 370, 293, 293, 122, 75, + /* 1660 */ 370, 75, 75, 75, 122, 370, 370, 370, 370, 75, + /* 1670 */ 370, 370, 122, 370, 370, 292, 292, 122, 75, 370, + /* 1680 */ 370, 75, 75, 291, 291, 122, 75, 370, 75, 75, + /* 1690 */ 75, 122, 370, 370, 370, 370, 370, 370, 370, 370, + /* 1700 */ 370, 370, 290, 290, 122, 75, 370, 75, 75, 75, + /* 1710 */ 122, 370, 370, 370, 370, 370, 370, 370, 370, 370, + /* 1720 */ 370, 289, 289, 122, 75, 370, 75, 75, 75, 122, + /* 1730 */ 370, 370, 370, 370, 370, 370, 370, 370, 370, 370, + /* 1740 */ 288, 288, 122, 75, 370, 75, 75, 75, 122, 370, + /* 1750 */ 370, 370, 370, 75, 370, 370, 122, 370, 370, 287, + /* 1760 */ 287, 122, 75, 370, 370, 75, 75, 286, 286, 122, + /* 1770 */ 75, 370, 75, 75, 75, 122, 370, 370, 370, 370, + /* 1780 */ 370, 370, 370, 370, 370, 370, 283, 283, 122, 75, + /* 1790 */ 370, 370, 75, 75, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 1, 2, 106, 107, 108, 6, 7, 77, 9, 10, - /* 10 */ 11, 81, 13, 76, 77, 78, 10, 82, 81, 82, - /* 20 */ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - /* 30 */ 93, 94, 95, 96, 97, 98, 99, 102, 103, 102, - /* 40 */ 103, 6, 7, 67, 9, 10, 11, 81, 13, 81, - /* 50 */ 51, 52, 48, 49, 50, 56, 57, 58, 59, 60, + /* 0 */ 1, 2, 107, 108, 109, 12, 7, 8, 68, 10, + /* 10 */ 11, 12, 13, 82, 15, 77, 78, 79, 105, 83, + /* 20 */ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + /* 30 */ 92, 93, 94, 95, 96, 97, 98, 99, 100, 103, + /* 40 */ 104, 103, 104, 7, 8, 0, 10, 11, 12, 13, + /* 50 */ 82, 15, 53, 54, 50, 51, 52, 58, 59, 60, /* 60 */ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - /* 70 */ 78, 53, 54, 55, 82, 83, 84, 85, 86, 87, + /* 70 */ 71, 79, 55, 56, 57, 83, 84, 85, 86, 87, /* 80 */ 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - /* 90 */ 98, 99, 111, 112, 102, 103, 100, 101, 106, 107, - /* 100 */ 108, 6, 7, 81, 9, 10, 11, 80, 13, 77, - /* 110 */ 78, 3, 4, 81, 82, 83, 84, 85, 86, 87, - /* 120 */ 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - /* 130 */ 98, 99, 81, 7, 102, 103, 10, 11, 111, 112, - /* 140 */ 107, 108, 8, 12, 81, 14, 51, 52, 14, 51, - /* 150 */ 52, 56, 57, 58, 59, 60, 61, 62, 63, 64, - /* 160 */ 65, 66, 67, 68, 69, 70, 3, 4, 5, 6, - /* 170 */ 7, 8, 9, 10, 11, 8, 13, 51, 52, 53, - /* 180 */ 81, 14, 56, 57, 58, 59, 60, 61, 62, 63, - /* 190 */ 64, 65, 66, 67, 68, 69, 70, 79, 14, 73, - /* 200 */ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - /* 210 */ 92, 93, 94, 95, 96, 97, 98, 99, 104, 7, - /* 220 */ 102, 103, 10, 11, 32, 33, 14, 7, 110, 82, - /* 230 */ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - /* 240 */ 93, 94, 95, 96, 97, 98, 99, 0, 0, 102, - /* 250 */ 103, 104, 105, 7, 28, 71, 10, 11, 57, 58, - /* 260 */ 14, 14, 14, 51, 52, 14, 9, 5, 56, 57, - /* 270 */ 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - /* 280 */ 68, 69, 70, 71, 7, 67, 65, 10, 11, 27, - /* 290 */ 70, 14, 72, 12, 39, 14, 53, 51, 52, 0, - /* 300 */ 29, 10, 56, 57, 58, 59, 60, 61, 62, 63, - /* 310 */ 64, 65, 66, 67, 68, 69, 70, 71, 28, 31, - /* 320 */ 28, 113, 71, 30, 113, 113, 113, 113, 51, 52, - /* 330 */ 113, 113, 113, 56, 57, 58, 59, 60, 61, 62, - /* 340 */ 63, 64, 65, 66, 67, 68, 69, 70, 113, 113, - /* 350 */ 51, 82, 83, 84, 85, 86, 87, 88, 89, 90, - /* 360 */ 91, 92, 93, 94, 95, 96, 97, 98, 99, 113, - /* 370 */ 113, 102, 103, 113, 113, 113, 113, 113, 113, 110, - /* 380 */ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - /* 390 */ 92, 93, 94, 95, 96, 97, 98, 99, 113, 113, - /* 400 */ 102, 103, 113, 113, 113, 113, 113, 109, 78, 113, - /* 410 */ 113, 113, 82, 83, 84, 85, 86, 87, 88, 89, - /* 420 */ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - /* 430 */ 78, 113, 102, 103, 82, 83, 84, 85, 86, 87, - /* 440 */ 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - /* 450 */ 98, 99, 113, 7, 102, 103, 10, 11, 78, 113, - /* 460 */ 113, 113, 82, 83, 84, 85, 86, 87, 88, 89, - /* 470 */ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - /* 480 */ 113, 7, 102, 103, 10, 11, 113, 113, 113, 113, - /* 490 */ 113, 113, 113, 113, 113, 113, 113, 51, 52, 113, - /* 500 */ 113, 113, 56, 57, 58, 59, 60, 61, 62, 63, - /* 510 */ 64, 65, 66, 67, 68, 69, 70, 113, 113, 113, - /* 520 */ 113, 113, 113, 113, 113, 51, 52, 113, 113, 113, - /* 530 */ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - /* 540 */ 66, 67, 68, 69, 70, 82, 83, 84, 85, 86, - /* 550 */ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - /* 560 */ 97, 98, 99, 113, 113, 102, 103, 82, 83, 84, - /* 570 */ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - /* 580 */ 95, 96, 97, 98, 99, 113, 113, 102, 103, 82, - /* 590 */ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - /* 600 */ 93, 94, 95, 96, 97, 98, 99, 113, 113, 102, - /* 610 */ 103, 113, 113, 82, 83, 84, 85, 86, 87, 88, - /* 620 */ 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - /* 630 */ 99, 113, 113, 102, 103, 82, 83, 84, 85, 86, - /* 640 */ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - /* 650 */ 97, 98, 99, 113, 113, 102, 103, 82, 83, 84, - /* 660 */ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - /* 670 */ 95, 96, 97, 98, 99, 113, 113, 102, 103, 82, - /* 680 */ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - /* 690 */ 93, 94, 95, 96, 97, 98, 99, 113, 113, 102, - /* 700 */ 103, 82, 83, 84, 85, 86, 87, 88, 89, 90, - /* 710 */ 91, 92, 93, 94, 95, 96, 97, 98, 99, 113, - /* 720 */ 113, 102, 103, 82, 83, 84, 85, 86, 87, 88, - /* 730 */ 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - /* 740 */ 99, 113, 113, 102, 103, 82, 83, 84, 85, 86, - /* 750 */ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - /* 760 */ 97, 98, 99, 113, 113, 102, 103, 82, 83, 84, - /* 770 */ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - /* 780 */ 95, 96, 97, 98, 99, 113, 113, 102, 103, 82, - /* 790 */ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - /* 800 */ 93, 94, 95, 96, 97, 98, 99, 113, 113, 102, - /* 810 */ 103, 82, 83, 84, 85, 86, 87, 88, 89, 90, - /* 820 */ 91, 92, 93, 94, 95, 96, 97, 98, 99, 113, - /* 830 */ 113, 102, 103, 82, 83, 84, 85, 86, 87, 88, - /* 840 */ 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - /* 850 */ 99, 113, 113, 102, 103, 82, 83, 84, 85, 86, - /* 860 */ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - /* 870 */ 97, 98, 99, 113, 113, 102, 103, 82, 83, 84, - /* 880 */ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - /* 890 */ 95, 96, 97, 98, 99, 113, 113, 102, 103, 82, - /* 900 */ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - /* 910 */ 93, 94, 95, 96, 97, 98, 99, 113, 113, 102, - /* 920 */ 103, 82, 83, 84, 85, 86, 87, 88, 89, 90, - /* 930 */ 91, 92, 93, 94, 95, 96, 97, 98, 99, 113, - /* 940 */ 113, 102, 103, 82, 83, 84, 85, 86, 87, 88, - /* 950 */ 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - /* 960 */ 99, 113, 82, 102, 103, 85, 113, 87, 88, 89, - /* 970 */ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - /* 980 */ 113, 82, 102, 103, 85, 113, 113, 88, 89, 90, - /* 990 */ 91, 92, 93, 94, 95, 96, 97, 98, 99, 113, - /* 1000 */ 113, 102, 103, 82, 113, 113, 85, 113, 113, 88, - /* 1010 */ 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - /* 1020 */ 99, 113, 113, 102, 103, 82, 113, 113, 85, 113, - /* 1030 */ 113, 113, 89, 90, 91, 92, 93, 94, 95, 96, - /* 1040 */ 97, 98, 99, 113, 113, 102, 103, 82, 113, 113, - /* 1050 */ 85, 113, 113, 113, 113, 90, 91, 92, 93, 94, - /* 1060 */ 95, 96, 97, 98, 99, 113, 113, 102, 103, 34, - /* 1070 */ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - /* 1080 */ 45, 46, 47, 15, 16, 17, 18, 19, 20, 21, - /* 1090 */ 22, 23, 24, 25, 26, 82, 113, 113, 85, 113, - /* 1100 */ 113, 113, 113, 113, 91, 92, 93, 94, 95, 96, - /* 1110 */ 97, 98, 99, 113, 113, 102, 103, 113, 82, 113, - /* 1120 */ 113, 85, 113, 113, 113, 57, 58, 113, 92, 93, - /* 1130 */ 94, 95, 96, 97, 98, 99, 113, 113, 102, 103, - /* 1140 */ 82, 113, 113, 85, 113, 113, 113, 113, 113, 113, - /* 1150 */ 92, 93, 94, 95, 96, 97, 98, 99, 113, 82, - /* 1160 */ 102, 103, 85, 113, 113, 113, 113, 113, 113, 113, - /* 1170 */ 93, 94, 95, 96, 97, 98, 99, 113, 82, 102, - /* 1180 */ 103, 85, 113, 113, 113, 113, 113, 113, 113, 93, - /* 1190 */ 94, 95, 96, 97, 98, 99, 113, 113, 102, 103, - /* 1200 */ 113, 82, 113, 113, 85, 113, 113, 7, 113, 113, - /* 1210 */ 10, 11, 93, 94, 95, 96, 97, 98, 99, 113, - /* 1220 */ 113, 102, 103, 82, 113, 113, 85, 113, 113, 113, - /* 1230 */ 113, 113, 113, 113, 93, 94, 95, 96, 97, 98, - /* 1240 */ 99, 113, 82, 102, 103, 85, 113, 113, 113, 113, - /* 1250 */ 113, 113, 113, 93, 94, 95, 96, 97, 98, 99, - /* 1260 */ 113, 82, 102, 103, 85, 65, 66, 67, 68, 69, - /* 1270 */ 70, 113, 93, 94, 95, 96, 97, 98, 99, 113, - /* 1280 */ 113, 102, 103, 113, 82, 113, 113, 85, 113, 113, - /* 1290 */ 113, 113, 113, 113, 113, 93, 94, 95, 96, 97, - /* 1300 */ 98, 99, 113, 113, 102, 103, 82, 113, 113, 85, - /* 1310 */ 113, 113, 113, 113, 113, 113, 113, 93, 94, 95, - /* 1320 */ 96, 97, 98, 99, 113, 82, 102, 103, 85, 113, - /* 1330 */ 113, 113, 113, 113, 113, 113, 93, 94, 95, 96, - /* 1340 */ 97, 98, 99, 113, 82, 102, 103, 85, 113, 113, - /* 1350 */ 113, 113, 113, 113, 113, 93, 94, 95, 96, 97, - /* 1360 */ 98, 99, 113, 113, 102, 103, 113, 82, 113, 113, - /* 1370 */ 85, 113, 113, 113, 113, 113, 113, 113, 93, 94, - /* 1380 */ 95, 96, 97, 98, 99, 113, 113, 102, 103, 82, - /* 1390 */ 113, 113, 85, 113, 113, 113, 113, 113, 113, 113, - /* 1400 */ 93, 94, 95, 96, 97, 98, 99, 113, 82, 102, - /* 1410 */ 103, 85, 113, 113, 113, 113, 113, 113, 113, 93, - /* 1420 */ 94, 95, 96, 97, 98, 99, 113, 82, 102, 103, - /* 1430 */ 85, 113, 113, 113, 113, 113, 113, 113, 93, 94, - /* 1440 */ 95, 96, 97, 98, 99, 113, 113, 102, 103, 113, - /* 1450 */ 82, 113, 113, 85, 113, 113, 113, 113, 113, 113, - /* 1460 */ 113, 113, 94, 95, 96, 97, 98, 99, 113, 113, - /* 1470 */ 102, 103, 82, 113, 113, 85, 113, 113, 113, 113, - /* 1480 */ 113, 113, 113, 113, 94, 95, 96, 97, 98, 99, - /* 1490 */ 113, 82, 102, 103, 85, 113, 113, 113, 113, 113, - /* 1500 */ 113, 113, 113, 94, 95, 96, 97, 98, 99, 113, - /* 1510 */ 113, 102, 103, 0, 113, 113, 3, 4, 5, 6, - /* 1520 */ 7, 113, 9, 10, 11, 82, 13, 113, 85, 113, - /* 1530 */ 113, 113, 113, 113, 113, 113, 113, 113, 95, 96, - /* 1540 */ 97, 98, 99, 113, 113, 102, 103, 82, 113, 113, - /* 1550 */ 85, 113, 113, 113, 113, 82, 113, 113, 85, 113, - /* 1560 */ 95, 96, 97, 98, 99, 113, 113, 102, 103, 96, - /* 1570 */ 97, 98, 99, 113, 82, 102, 103, 85, 113, 113, - /* 1580 */ 113, 113, 113, 113, 113, 113, 113, 113, 96, 97, - /* 1590 */ 98, 99, 113, 113, 102, 103, 82, 113, 113, 85, - /* 1600 */ 113, 113, 113, 113, 113, 82, 113, 113, 85, 113, - /* 1610 */ 96, 97, 98, 99, 113, 113, 102, 103, 113, 96, - /* 1620 */ 97, 98, 99, 113, 82, 102, 103, 85, 113, 113, - /* 1630 */ 113, 113, 113, 82, 113, 113, 85, 113, 96, 97, - /* 1640 */ 98, 99, 113, 82, 102, 103, 85, 96, 97, 98, - /* 1650 */ 99, 113, 82, 102, 103, 85, 113, 96, 97, 98, - /* 1660 */ 99, 113, 113, 102, 103, 113, 96, 97, 98, 99, - /* 1670 */ 113, 82, 102, 103, 85, 113, 113, 113, 113, 82, - /* 1680 */ 113, 113, 85, 113, 113, 96, 97, 98, 99, 113, - /* 1690 */ 113, 102, 103, 96, 97, 98, 99, 113, 113, 102, - /* 1700 */ 103, 113, 82, 113, 113, 85, 113, 113, 113, 113, - /* 1710 */ 82, 113, 113, 85, 113, 113, 96, 97, 98, 99, - /* 1720 */ 113, 113, 102, 103, 96, 97, 98, 99, 113, 82, - /* 1730 */ 102, 103, 85, 113, 113, 113, 113, 82, 113, 113, - /* 1740 */ 85, 113, 113, 96, 97, 98, 99, 113, 113, 102, - /* 1750 */ 103, 96, 97, 98, 99, 113, 113, 102, 103, + /* 90 */ 98, 99, 100, 78, 0, 103, 104, 82, 53, 107, + /* 100 */ 108, 109, 82, 7, 8, 30, 10, 11, 12, 13, + /* 110 */ 16, 15, 78, 79, 81, 11, 82, 83, 84, 85, + /* 120 */ 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + /* 130 */ 96, 97, 98, 99, 100, 112, 113, 103, 104, 8, + /* 140 */ 14, 10, 16, 12, 13, 112, 113, 108, 109, 53, + /* 150 */ 54, 101, 102, 82, 58, 59, 60, 61, 62, 63, + /* 160 */ 64, 65, 66, 67, 68, 69, 70, 71, 36, 37, + /* 170 */ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + /* 180 */ 48, 49, 3, 4, 53, 54, 55, 53, 54, 58, + /* 190 */ 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + /* 200 */ 69, 70, 71, 80, 82, 74, 83, 84, 85, 86, + /* 210 */ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + /* 220 */ 97, 98, 99, 100, 34, 35, 103, 104, 8, 82, + /* 230 */ 10, 8, 12, 13, 111, 14, 16, 16, 83, 84, + /* 240 */ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + /* 250 */ 95, 96, 97, 98, 99, 100, 9, 82, 103, 104, + /* 260 */ 105, 106, 8, 16, 10, 82, 12, 13, 59, 60, + /* 270 */ 16, 8, 16, 53, 54, 12, 13, 41, 58, 59, + /* 280 */ 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + /* 290 */ 70, 71, 72, 8, 71, 10, 73, 12, 13, 9, + /* 300 */ 68, 16, 31, 5, 66, 55, 16, 53, 54, 12, + /* 310 */ 30, 33, 58, 59, 60, 61, 62, 63, 64, 65, + /* 320 */ 66, 67, 68, 69, 70, 71, 72, 29, 72, 66, + /* 330 */ 67, 68, 69, 70, 71, 32, 30, 114, 53, 54, + /* 340 */ 114, 114, 114, 58, 59, 60, 61, 62, 63, 64, + /* 350 */ 65, 66, 67, 68, 69, 70, 71, 83, 84, 85, + /* 360 */ 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + /* 370 */ 96, 97, 98, 99, 100, 114, 114, 103, 104, 114, + /* 380 */ 114, 114, 114, 114, 114, 111, 16, 114, 114, 114, + /* 390 */ 114, 83, 84, 85, 86, 87, 88, 89, 90, 91, + /* 400 */ 92, 93, 94, 95, 96, 97, 98, 99, 100, 114, + /* 410 */ 114, 103, 104, 114, 114, 114, 114, 114, 110, 79, + /* 420 */ 114, 114, 114, 83, 84, 85, 86, 87, 88, 89, + /* 430 */ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + /* 440 */ 100, 79, 72, 103, 104, 83, 84, 85, 86, 87, + /* 450 */ 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + /* 460 */ 98, 99, 100, 114, 114, 103, 104, 114, 8, 114, + /* 470 */ 10, 79, 12, 13, 114, 83, 84, 85, 86, 87, + /* 480 */ 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + /* 490 */ 98, 99, 100, 0, 114, 103, 104, 8, 114, 10, + /* 500 */ 114, 12, 13, 114, 114, 114, 114, 114, 114, 16, + /* 510 */ 114, 114, 114, 53, 54, 114, 114, 114, 58, 59, + /* 520 */ 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + /* 530 */ 70, 71, 114, 114, 114, 114, 114, 114, 114, 114, + /* 540 */ 114, 114, 53, 54, 114, 114, 114, 58, 59, 60, + /* 550 */ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + /* 560 */ 71, 83, 84, 85, 86, 87, 88, 89, 90, 91, + /* 570 */ 92, 93, 94, 95, 96, 97, 98, 99, 100, 114, + /* 580 */ 114, 103, 104, 83, 84, 85, 86, 87, 88, 89, + /* 590 */ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + /* 600 */ 100, 114, 114, 103, 104, 83, 84, 85, 86, 87, + /* 610 */ 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + /* 620 */ 98, 99, 100, 114, 114, 103, 104, 83, 84, 85, + /* 630 */ 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + /* 640 */ 96, 97, 98, 99, 100, 114, 114, 103, 104, 83, + /* 650 */ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + /* 660 */ 94, 95, 96, 97, 98, 99, 100, 114, 114, 103, + /* 670 */ 104, 83, 84, 85, 86, 87, 88, 89, 90, 91, + /* 680 */ 92, 93, 94, 95, 96, 97, 98, 99, 100, 114, + /* 690 */ 114, 103, 104, 83, 84, 85, 86, 87, 88, 89, + /* 700 */ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + /* 710 */ 100, 114, 114, 103, 104, 83, 84, 85, 86, 87, + /* 720 */ 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + /* 730 */ 98, 99, 100, 114, 114, 103, 104, 83, 84, 85, + /* 740 */ 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + /* 750 */ 96, 97, 98, 99, 100, 114, 114, 103, 104, 83, + /* 760 */ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + /* 770 */ 94, 95, 96, 97, 98, 99, 100, 114, 114, 103, + /* 780 */ 104, 83, 84, 85, 86, 87, 88, 89, 90, 91, + /* 790 */ 92, 93, 94, 95, 96, 97, 98, 99, 100, 114, + /* 800 */ 114, 103, 104, 83, 84, 85, 86, 87, 88, 89, + /* 810 */ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + /* 820 */ 100, 114, 114, 103, 104, 83, 84, 85, 86, 87, + /* 830 */ 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + /* 840 */ 98, 99, 100, 114, 114, 103, 104, 83, 84, 85, + /* 850 */ 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + /* 860 */ 96, 97, 98, 99, 100, 114, 114, 103, 104, 83, + /* 870 */ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + /* 880 */ 94, 95, 96, 97, 98, 99, 100, 114, 114, 103, + /* 890 */ 104, 83, 84, 85, 86, 87, 88, 89, 90, 91, + /* 900 */ 92, 93, 94, 95, 96, 97, 98, 99, 100, 114, + /* 910 */ 114, 103, 104, 83, 84, 85, 86, 87, 88, 89, + /* 920 */ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + /* 930 */ 100, 114, 114, 103, 104, 83, 84, 85, 86, 87, + /* 940 */ 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + /* 950 */ 98, 99, 100, 114, 114, 103, 104, 83, 84, 85, + /* 960 */ 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + /* 970 */ 96, 97, 98, 99, 100, 114, 83, 103, 104, 86, + /* 980 */ 114, 88, 89, 90, 91, 92, 93, 94, 95, 96, + /* 990 */ 97, 98, 99, 100, 114, 83, 103, 104, 86, 114, + /* 1000 */ 114, 89, 90, 91, 92, 93, 94, 95, 96, 97, + /* 1010 */ 98, 99, 100, 114, 83, 103, 104, 86, 114, 114, + /* 1020 */ 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + /* 1030 */ 99, 100, 114, 83, 103, 104, 86, 114, 114, 114, + /* 1040 */ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + /* 1050 */ 100, 114, 83, 103, 104, 86, 114, 114, 114, 114, + /* 1060 */ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + /* 1070 */ 114, 114, 103, 104, 114, 114, 114, 114, 17, 18, + /* 1080 */ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + /* 1090 */ 83, 114, 114, 86, 114, 114, 114, 114, 114, 92, + /* 1100 */ 93, 94, 95, 96, 97, 98, 99, 100, 114, 114, + /* 1110 */ 103, 104, 83, 114, 114, 86, 114, 114, 114, 114, + /* 1120 */ 59, 60, 93, 94, 95, 96, 97, 98, 99, 100, + /* 1130 */ 114, 83, 103, 104, 86, 114, 114, 114, 114, 114, + /* 1140 */ 114, 93, 94, 95, 96, 97, 98, 99, 100, 114, + /* 1150 */ 114, 103, 104, 114, 114, 3, 4, 5, 6, 7, + /* 1160 */ 8, 9, 10, 11, 12, 13, 0, 15, 114, 3, + /* 1170 */ 4, 5, 6, 7, 8, 114, 10, 11, 12, 13, + /* 1180 */ 114, 15, 114, 83, 114, 114, 86, 114, 114, 114, + /* 1190 */ 114, 114, 114, 114, 94, 95, 96, 97, 98, 99, + /* 1200 */ 100, 114, 114, 103, 104, 83, 114, 114, 86, 114, + /* 1210 */ 114, 114, 114, 114, 114, 114, 94, 95, 96, 97, + /* 1220 */ 98, 99, 100, 114, 114, 103, 104, 83, 114, 114, + /* 1230 */ 86, 114, 114, 114, 114, 114, 114, 114, 94, 95, + /* 1240 */ 96, 97, 98, 99, 100, 114, 83, 103, 104, 86, + /* 1250 */ 114, 114, 114, 114, 114, 114, 114, 94, 95, 96, + /* 1260 */ 97, 98, 99, 100, 114, 83, 103, 104, 86, 114, + /* 1270 */ 114, 114, 114, 114, 114, 114, 94, 95, 96, 97, + /* 1280 */ 98, 99, 100, 114, 83, 103, 104, 86, 114, 114, + /* 1290 */ 114, 114, 114, 114, 114, 94, 95, 96, 97, 98, + /* 1300 */ 99, 100, 114, 83, 103, 104, 86, 114, 114, 114, + /* 1310 */ 114, 114, 114, 114, 94, 95, 96, 97, 98, 99, + /* 1320 */ 100, 114, 83, 103, 104, 86, 114, 114, 114, 114, + /* 1330 */ 114, 114, 114, 94, 95, 96, 97, 98, 99, 100, + /* 1340 */ 114, 83, 103, 104, 86, 114, 114, 114, 114, 114, + /* 1350 */ 114, 114, 94, 95, 96, 97, 98, 99, 100, 114, + /* 1360 */ 83, 103, 104, 86, 114, 114, 114, 114, 114, 114, + /* 1370 */ 114, 94, 95, 96, 97, 98, 99, 100, 114, 83, + /* 1380 */ 103, 104, 86, 114, 114, 114, 114, 114, 114, 114, + /* 1390 */ 94, 95, 96, 97, 98, 99, 100, 114, 83, 103, + /* 1400 */ 104, 86, 114, 114, 114, 114, 114, 114, 114, 94, + /* 1410 */ 95, 96, 97, 98, 99, 100, 114, 83, 103, 104, + /* 1420 */ 86, 114, 114, 114, 114, 114, 114, 114, 94, 95, + /* 1430 */ 96, 97, 98, 99, 100, 114, 83, 103, 104, 86, + /* 1440 */ 114, 114, 114, 114, 114, 114, 114, 94, 95, 96, + /* 1450 */ 97, 98, 99, 100, 114, 83, 103, 104, 86, 114, + /* 1460 */ 114, 114, 114, 114, 114, 114, 114, 95, 96, 97, + /* 1470 */ 98, 99, 100, 114, 83, 103, 104, 86, 114, 114, + /* 1480 */ 114, 114, 114, 114, 114, 114, 95, 96, 97, 98, + /* 1490 */ 99, 100, 114, 83, 103, 104, 86, 114, 114, 114, + /* 1500 */ 82, 83, 114, 114, 86, 95, 96, 97, 98, 99, + /* 1510 */ 100, 114, 114, 103, 104, 97, 98, 99, 100, 114, + /* 1520 */ 83, 103, 104, 86, 114, 114, 114, 114, 114, 114, + /* 1530 */ 114, 114, 114, 96, 97, 98, 99, 100, 114, 83, + /* 1540 */ 103, 104, 86, 114, 114, 114, 114, 114, 114, 114, + /* 1550 */ 114, 114, 96, 97, 98, 99, 100, 114, 83, 103, + /* 1560 */ 104, 86, 114, 114, 114, 114, 114, 114, 114, 114, + /* 1570 */ 114, 114, 97, 98, 99, 100, 114, 83, 103, 104, + /* 1580 */ 86, 114, 114, 114, 114, 83, 114, 114, 86, 114, + /* 1590 */ 114, 97, 98, 99, 100, 114, 114, 103, 104, 97, + /* 1600 */ 98, 99, 100, 114, 83, 103, 104, 86, 114, 114, + /* 1610 */ 114, 114, 114, 114, 114, 114, 114, 114, 97, 98, + /* 1620 */ 99, 100, 114, 83, 103, 104, 86, 114, 114, 114, + /* 1630 */ 114, 114, 114, 114, 114, 114, 114, 97, 98, 99, + /* 1640 */ 100, 114, 83, 103, 104, 86, 114, 114, 114, 114, + /* 1650 */ 114, 114, 114, 114, 114, 114, 97, 98, 99, 100, + /* 1660 */ 114, 83, 103, 104, 86, 114, 114, 114, 114, 83, + /* 1670 */ 114, 114, 86, 114, 114, 97, 98, 99, 100, 114, + /* 1680 */ 114, 103, 104, 97, 98, 99, 100, 114, 83, 103, + /* 1690 */ 104, 86, 114, 114, 114, 114, 114, 114, 114, 114, + /* 1700 */ 114, 114, 97, 98, 99, 100, 114, 83, 103, 104, + /* 1710 */ 86, 114, 114, 114, 114, 114, 114, 114, 114, 114, + /* 1720 */ 114, 97, 98, 99, 100, 114, 83, 103, 104, 86, + /* 1730 */ 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, + /* 1740 */ 97, 98, 99, 100, 114, 83, 103, 104, 86, 114, + /* 1750 */ 114, 114, 114, 83, 114, 114, 86, 114, 114, 97, + /* 1760 */ 98, 99, 100, 114, 114, 103, 104, 97, 98, 99, + /* 1770 */ 100, 114, 83, 103, 104, 86, 114, 114, 114, 114, + /* 1780 */ 114, 114, 114, 114, 114, 114, 97, 98, 99, 100, + /* 1790 */ 114, 114, 103, 104, }; -#define YY_SHIFT_USE_DFLT (1759) -#define YY_SHIFT_COUNT (141) -#define YY_SHIFT_MIN (-24) -#define YY_SHIFT_MAX (1513) +#define YY_SHIFT_USE_DFLT (1794) +#define YY_SHIFT_COUNT (144) +#define YY_SHIFT_MIN (-60) +#define YY_SHIFT_MAX (1166) static const short yy_shift_ofst[] = { - /* 0 */ -1, 446, 95, 126, 277, 126, 474, 474, 474, 474, - /* 10 */ 212, 246, 474, 474, 474, 474, 474, 474, 474, 474, - /* 20 */ 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, - /* 30 */ 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, - /* 40 */ 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, - /* 50 */ 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, - /* 60 */ 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, - /* 70 */ 1200, 6, -24, 35, 220, 6, -24, 163, 1513, 35, - /* 80 */ 35, 35, 35, 35, 184, 1035, 1035, 1035, 1068, 4, - /* 90 */ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - /* 100 */ 4, 18, 4, 18, 4, 18, 4, 299, 247, 248, - /* 110 */ 108, 134, 131, 98, 98, 167, 98, 192, 251, 201, - /* 120 */ 98, 192, 108, 262, 281, 226, 257, 218, 255, 221, - /* 130 */ 243, 271, 291, 290, 288, 293, 271, 288, 293, 271, - /* 140 */ 292, 257, + /* 0 */ -1, 460, 96, 131, 285, 131, 489, 489, 489, 489, + /* 10 */ 220, 254, 489, 489, 489, 489, 489, 489, 489, 489, + /* 20 */ 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, + /* 30 */ 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, + /* 40 */ 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, + /* 50 */ 489, 489, 489, 489, 96, 489, 489, 489, 489, 489, + /* 60 */ 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, + /* 70 */ 489, 263, -7, -60, 36, 223, -7, -60, 1152, 1166, + /* 80 */ 36, 36, 36, 36, 36, 36, 36, 256, 132, 132, + /* 90 */ 132, 1061, 4, 4, 4, 4, 4, 4, 4, 4, + /* 100 */ 4, 4, 4, 4, 17, 4, 17, 4, 17, 4, + /* 110 */ 45, 94, 493, 179, 247, 126, 134, 134, 290, 134, + /* 120 */ 190, 370, 209, 134, 190, 179, 298, 221, 75, 104, + /* 130 */ 232, 236, 238, 250, 271, 297, 280, 278, 303, 271, + /* 140 */ 278, 303, 271, 306, 104, }; -#define YY_REDUCE_USE_DFLT (-105) -#define YY_REDUCE_COUNT (84) -#define YY_REDUCE_MIN (-104) -#define YY_REDUCE_MAX (1655) +#define YY_REDUCE_USE_DFLT (-106) +#define YY_REDUCE_COUNT (87) +#define YY_REDUCE_MIN (-105) +#define YY_REDUCE_MAX (1689) static const short yy_reduce_ofst[] = { - /* 0 */ -63, -8, 32, 118, 147, 269, 298, 330, 352, 380, - /* 10 */ 463, 485, 507, 531, 553, 575, 597, 619, 641, 663, - /* 20 */ 685, 707, 729, 751, 773, 795, 817, 839, 861, 880, - /* 30 */ 899, 921, 943, 965, 1013, 1036, 1058, 1077, 1096, 1119, - /* 40 */ 1141, 1160, 1179, 1202, 1224, 1243, 1262, 1285, 1307, 1326, - /* 50 */ 1345, 1368, 1390, 1409, 1443, 1465, 1473, 1492, 1514, 1523, - /* 60 */ 1542, 1551, 1561, 1570, 1589, 1597, 1620, 1628, 1647, 1655, - /* 70 */ -65, 27, -104, -70, -4, -19, 33, -34, -34, -32, - /* 80 */ 22, 51, 63, 99, 114, + /* 0 */ -62, -8, 34, 123, 155, 274, 308, 340, 362, 392, + /* 10 */ 478, 500, 522, 544, 566, 588, 610, 632, 654, 676, + /* 20 */ 698, 720, 742, 764, 786, 808, 830, 852, 874, 893, + /* 30 */ 912, 931, 950, 969, 1007, 1029, 1048, 1100, 1122, 1144, + /* 40 */ 1163, 1182, 1201, 1220, 1239, 1258, 1277, 1296, 1315, 1334, + /* 50 */ 1353, 1372, 1391, 1410, 1418, 1437, 1456, 1475, 1494, 1502, + /* 60 */ 1521, 1540, 1559, 1578, 1586, 1605, 1624, 1643, 1662, 1670, + /* 70 */ 1689, -64, 33, -105, 15, 50, 23, 39, -69, -69, + /* 80 */ -32, 20, 71, 122, 147, 175, 183, -87, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 495, 428, 495, 435, 495, 437, 432, 495, 495, 495, - /* 10 */ 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, - /* 20 */ 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, - /* 30 */ 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, - /* 40 */ 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, - /* 50 */ 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, - /* 60 */ 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, - /* 70 */ 495, 492, 428, 495, 468, 495, 495, 495, 495, 495, - /* 80 */ 495, 495, 495, 495, 495, 460, 390, 389, 466, 404, - /* 90 */ 403, 402, 401, 400, 399, 398, 397, 396, 395, 394, - /* 100 */ 461, 463, 393, 409, 392, 408, 391, 495, 495, 495, - /* 110 */ 383, 495, 495, 462, 407, 495, 406, 459, 495, 466, - /* 120 */ 405, 388, 455, 454, 495, 477, 473, 495, 495, 495, - /* 130 */ 494, 385, 495, 495, 458, 457, 456, 387, 386, 384, - /* 140 */ 495, 495, + /* 0 */ 504, 437, 504, 444, 504, 446, 441, 504, 504, 504, + /* 10 */ 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, + /* 20 */ 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, + /* 30 */ 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, + /* 40 */ 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, + /* 50 */ 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, + /* 60 */ 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, + /* 70 */ 504, 504, 501, 437, 504, 477, 504, 504, 504, 504, + /* 80 */ 504, 504, 504, 504, 504, 504, 504, 504, 469, 399, + /* 90 */ 398, 475, 413, 412, 411, 410, 409, 408, 407, 406, + /* 100 */ 405, 404, 403, 470, 472, 402, 418, 401, 417, 400, + /* 110 */ 504, 504, 504, 392, 504, 504, 471, 416, 504, 415, + /* 120 */ 468, 504, 475, 414, 397, 464, 463, 504, 486, 482, + /* 130 */ 504, 504, 504, 503, 394, 504, 504, 467, 466, 465, + /* 140 */ 396, 395, 393, 504, 504, }; /********** End of lemon-generated parsing tables *****************************/ @@ -700,34 +708,34 @@ void grn_expr_parserTrace(FILE *TraceFILE, char *zTracePrompt){ ** are required. The following table supplies these names */ static const char *const yyTokenName[] = { "$", "START_OUTPUT_COLUMNS", "START_ADJUSTER", "LOGICAL_AND", - "LOGICAL_AND_NOT", "LOGICAL_OR", "QSTRING", "PARENL", - "PARENR", "RELATIVE_OP", "IDENTIFIER", "BRACEL", - "BRACER", "EVAL", "COMMA", "ASSIGN", - "STAR_ASSIGN", "SLASH_ASSIGN", "MOD_ASSIGN", "PLUS_ASSIGN", - "MINUS_ASSIGN", "SHIFTL_ASSIGN", "SHIFTR_ASSIGN", "SHIFTRR_ASSIGN", - "AND_ASSIGN", "XOR_ASSIGN", "OR_ASSIGN", "QUESTION", - "COLON", "BITWISE_OR", "BITWISE_XOR", "BITWISE_AND", - "EQUAL", "NOT_EQUAL", "LESS", "GREATER", - "LESS_EQUAL", "GREATER_EQUAL", "IN", "MATCH", - "NEAR", "NEAR2", "SIMILAR", "TERM_EXTRACT", - "LCP", "PREFIX", "SUFFIX", "REGEXP", - "SHIFTL", "SHIFTR", "SHIFTRR", "PLUS", - "MINUS", "STAR", "SLASH", "MOD", - "DELETE", "INCR", "DECR", "NOT", - "BITWISE_NOT", "ADJUST", "EXACT", "PARTIAL", - "UNSPLIT", "DECIMAL", "HEX_INTEGER", "STRING", - "BOOLEAN", "NULL", "BRACKETL", "BRACKETR", - "DOT", "NONEXISTENT_COLUMN", "error", "suppress_unused_variable_warning", - "input", "query", "expression", "output_columns", - "adjuster", "query_element", "primary_expression", "assignment_expression", - "conditional_expression", "lefthand_side_expression", "logical_or_expression", "logical_and_expression", - "bitwise_or_expression", "bitwise_xor_expression", "bitwise_and_expression", "equality_expression", - "relational_expression", "shift_expression", "additive_expression", "multiplicative_expression", - "unary_expression", "postfix_expression", "call_expression", "member_expression", - "arguments", "member_expression_part", "object_literal", "array_literal", - "elision", "element_list", "property_name_and_value_list", "property_name_and_value", - "property_name", "argument_list", "output_column", "adjust_expression", - "adjust_match_expression", + "LOGICAL_AND_NOT", "LOGICAL_OR", "NEGATIVE", "QSTRING", + "PARENL", "PARENR", "ADJUST", "RELATIVE_OP", + "IDENTIFIER", "BRACEL", "BRACER", "EVAL", + "COMMA", "ASSIGN", "STAR_ASSIGN", "SLASH_ASSIGN", + "MOD_ASSIGN", "PLUS_ASSIGN", "MINUS_ASSIGN", "SHIFTL_ASSIGN", + "SHIFTR_ASSIGN", "SHIFTRR_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN", + "OR_ASSIGN", "QUESTION", "COLON", "BITWISE_OR", + "BITWISE_XOR", "BITWISE_AND", "EQUAL", "NOT_EQUAL", + "LESS", "GREATER", "LESS_EQUAL", "GREATER_EQUAL", + "IN", "MATCH", "NEAR", "NEAR2", + "SIMILAR", "TERM_EXTRACT", "LCP", "PREFIX", + "SUFFIX", "REGEXP", "SHIFTL", "SHIFTR", + "SHIFTRR", "PLUS", "MINUS", "STAR", + "SLASH", "MOD", "DELETE", "INCR", + "DECR", "NOT", "BITWISE_NOT", "EXACT", + "PARTIAL", "UNSPLIT", "DECIMAL", "HEX_INTEGER", + "STRING", "BOOLEAN", "NULL", "BRACKETL", + "BRACKETR", "DOT", "NONEXISTENT_COLUMN", "error", + "suppress_unused_variable_warning", "input", "query", "expression", + "output_columns", "adjuster", "query_element", "primary_expression", + "assignment_expression", "conditional_expression", "lefthand_side_expression", "logical_or_expression", + "logical_and_expression", "bitwise_or_expression", "bitwise_xor_expression", "bitwise_and_expression", + "equality_expression", "relational_expression", "shift_expression", "additive_expression", + "multiplicative_expression", "unary_expression", "postfix_expression", "call_expression", + "member_expression", "arguments", "member_expression_part", "object_literal", + "array_literal", "elision", "element_list", "property_name_and_value_list", + "property_name_and_value", "property_name", "argument_list", "output_column", + "adjust_expression", "adjust_match_expression", }; #endif /* NDEBUG */ @@ -739,136 +747,138 @@ static const char *const yyRuleName[] = { /* 1 */ "query ::= query LOGICAL_AND query_element", /* 2 */ "query ::= query LOGICAL_AND_NOT query_element", /* 3 */ "query ::= query LOGICAL_OR query_element", - /* 4 */ "query_element ::= RELATIVE_OP query_element", - /* 5 */ "query_element ::= IDENTIFIER RELATIVE_OP query_element", - /* 6 */ "query_element ::= BRACEL expression BRACER", - /* 7 */ "query_element ::= EVAL primary_expression", - /* 8 */ "expression ::= expression COMMA assignment_expression", - /* 9 */ "assignment_expression ::= lefthand_side_expression ASSIGN assignment_expression", - /* 10 */ "assignment_expression ::= lefthand_side_expression STAR_ASSIGN assignment_expression", - /* 11 */ "assignment_expression ::= lefthand_side_expression SLASH_ASSIGN assignment_expression", - /* 12 */ "assignment_expression ::= lefthand_side_expression MOD_ASSIGN assignment_expression", - /* 13 */ "assignment_expression ::= lefthand_side_expression PLUS_ASSIGN assignment_expression", - /* 14 */ "assignment_expression ::= lefthand_side_expression MINUS_ASSIGN assignment_expression", - /* 15 */ "assignment_expression ::= lefthand_side_expression SHIFTL_ASSIGN assignment_expression", - /* 16 */ "assignment_expression ::= lefthand_side_expression SHIFTR_ASSIGN assignment_expression", - /* 17 */ "assignment_expression ::= lefthand_side_expression SHIFTRR_ASSIGN assignment_expression", - /* 18 */ "assignment_expression ::= lefthand_side_expression AND_ASSIGN assignment_expression", - /* 19 */ "assignment_expression ::= lefthand_side_expression XOR_ASSIGN assignment_expression", - /* 20 */ "assignment_expression ::= lefthand_side_expression OR_ASSIGN assignment_expression", - /* 21 */ "conditional_expression ::= logical_or_expression QUESTION assignment_expression COLON assignment_expression", - /* 22 */ "logical_or_expression ::= logical_or_expression LOGICAL_OR logical_and_expression", - /* 23 */ "logical_and_expression ::= logical_and_expression LOGICAL_AND bitwise_or_expression", - /* 24 */ "logical_and_expression ::= logical_and_expression LOGICAL_AND_NOT bitwise_or_expression", - /* 25 */ "bitwise_or_expression ::= bitwise_or_expression BITWISE_OR bitwise_xor_expression", - /* 26 */ "bitwise_xor_expression ::= bitwise_xor_expression BITWISE_XOR bitwise_and_expression", - /* 27 */ "bitwise_and_expression ::= bitwise_and_expression BITWISE_AND equality_expression", - /* 28 */ "equality_expression ::= equality_expression EQUAL relational_expression", - /* 29 */ "equality_expression ::= equality_expression NOT_EQUAL relational_expression", - /* 30 */ "relational_expression ::= relational_expression LESS shift_expression", - /* 31 */ "relational_expression ::= relational_expression GREATER shift_expression", - /* 32 */ "relational_expression ::= relational_expression LESS_EQUAL shift_expression", - /* 33 */ "relational_expression ::= relational_expression GREATER_EQUAL shift_expression", - /* 34 */ "relational_expression ::= relational_expression IN shift_expression", - /* 35 */ "relational_expression ::= relational_expression MATCH shift_expression", - /* 36 */ "relational_expression ::= relational_expression NEAR shift_expression", - /* 37 */ "relational_expression ::= relational_expression NEAR2 shift_expression", - /* 38 */ "relational_expression ::= relational_expression SIMILAR shift_expression", - /* 39 */ "relational_expression ::= relational_expression TERM_EXTRACT shift_expression", - /* 40 */ "relational_expression ::= relational_expression LCP shift_expression", - /* 41 */ "relational_expression ::= relational_expression PREFIX shift_expression", - /* 42 */ "relational_expression ::= relational_expression SUFFIX shift_expression", - /* 43 */ "relational_expression ::= relational_expression REGEXP shift_expression", - /* 44 */ "shift_expression ::= shift_expression SHIFTL additive_expression", - /* 45 */ "shift_expression ::= shift_expression SHIFTR additive_expression", - /* 46 */ "shift_expression ::= shift_expression SHIFTRR additive_expression", - /* 47 */ "additive_expression ::= additive_expression PLUS multiplicative_expression", - /* 48 */ "additive_expression ::= additive_expression MINUS multiplicative_expression", - /* 49 */ "multiplicative_expression ::= multiplicative_expression STAR unary_expression", - /* 50 */ "multiplicative_expression ::= multiplicative_expression SLASH unary_expression", - /* 51 */ "multiplicative_expression ::= multiplicative_expression MOD unary_expression", - /* 52 */ "unary_expression ::= DELETE unary_expression", - /* 53 */ "unary_expression ::= INCR unary_expression", - /* 54 */ "unary_expression ::= DECR unary_expression", - /* 55 */ "unary_expression ::= PLUS unary_expression", - /* 56 */ "unary_expression ::= MINUS unary_expression", - /* 57 */ "unary_expression ::= NOT unary_expression", - /* 58 */ "unary_expression ::= BITWISE_NOT unary_expression", - /* 59 */ "unary_expression ::= ADJUST unary_expression", - /* 60 */ "unary_expression ::= EXACT unary_expression", - /* 61 */ "unary_expression ::= PARTIAL unary_expression", - /* 62 */ "unary_expression ::= UNSPLIT unary_expression", - /* 63 */ "postfix_expression ::= lefthand_side_expression INCR", - /* 64 */ "postfix_expression ::= lefthand_side_expression DECR", - /* 65 */ "call_expression ::= member_expression arguments", - /* 66 */ "object_literal ::= BRACEL property_name_and_value_list BRACER", - /* 67 */ "property_name_and_value_list ::=", - /* 68 */ "property_name_and_value ::= property_name COLON assignment_expression", - /* 69 */ "member_expression_part ::= BRACKETL expression BRACKETR", - /* 70 */ "arguments ::= PARENL argument_list PARENR", - /* 71 */ "argument_list ::=", - /* 72 */ "argument_list ::= assignment_expression", - /* 73 */ "argument_list ::= argument_list COMMA assignment_expression", - /* 74 */ "output_columns ::=", - /* 75 */ "output_columns ::= output_column", - /* 76 */ "output_columns ::= output_columns COMMA", - /* 77 */ "output_columns ::= output_columns COMMA output_column", - /* 78 */ "output_column ::= STAR", - /* 79 */ "output_column ::= NONEXISTENT_COLUMN", - /* 80 */ "output_column ::= assignment_expression", - /* 81 */ "adjuster ::= adjuster PLUS adjust_expression", - /* 82 */ "adjust_expression ::= adjust_match_expression STAR DECIMAL", - /* 83 */ "adjust_match_expression ::= IDENTIFIER MATCH STRING", - /* 84 */ "input ::= query", - /* 85 */ "input ::= expression", - /* 86 */ "input ::= START_OUTPUT_COLUMNS output_columns", - /* 87 */ "input ::= START_ADJUSTER adjuster", - /* 88 */ "query ::= query_element", - /* 89 */ "query_element ::= QSTRING", - /* 90 */ "query_element ::= PARENL query PARENR", - /* 91 */ "expression ::= assignment_expression", - /* 92 */ "assignment_expression ::= conditional_expression", - /* 93 */ "conditional_expression ::= logical_or_expression", - /* 94 */ "logical_or_expression ::= logical_and_expression", - /* 95 */ "logical_and_expression ::= bitwise_or_expression", - /* 96 */ "bitwise_or_expression ::= bitwise_xor_expression", - /* 97 */ "bitwise_xor_expression ::= bitwise_and_expression", - /* 98 */ "bitwise_and_expression ::= equality_expression", - /* 99 */ "equality_expression ::= relational_expression", - /* 100 */ "relational_expression ::= shift_expression", - /* 101 */ "shift_expression ::= additive_expression", - /* 102 */ "additive_expression ::= multiplicative_expression", - /* 103 */ "multiplicative_expression ::= unary_expression", - /* 104 */ "unary_expression ::= postfix_expression", - /* 105 */ "postfix_expression ::= lefthand_side_expression", - /* 106 */ "lefthand_side_expression ::= call_expression", - /* 107 */ "lefthand_side_expression ::= member_expression", - /* 108 */ "member_expression ::= primary_expression", - /* 109 */ "member_expression ::= member_expression member_expression_part", - /* 110 */ "primary_expression ::= object_literal", - /* 111 */ "primary_expression ::= PARENL expression PARENR", - /* 112 */ "primary_expression ::= IDENTIFIER", - /* 113 */ "primary_expression ::= array_literal", - /* 114 */ "primary_expression ::= DECIMAL", - /* 115 */ "primary_expression ::= HEX_INTEGER", - /* 116 */ "primary_expression ::= STRING", - /* 117 */ "primary_expression ::= BOOLEAN", - /* 118 */ "primary_expression ::= NULL", - /* 119 */ "array_literal ::= BRACKETL elision BRACKETR", - /* 120 */ "array_literal ::= BRACKETL element_list elision BRACKETR", - /* 121 */ "array_literal ::= BRACKETL element_list BRACKETR", - /* 122 */ "elision ::= COMMA", - /* 123 */ "elision ::= elision COMMA", - /* 124 */ "element_list ::= assignment_expression", - /* 125 */ "element_list ::= elision assignment_expression", - /* 126 */ "element_list ::= element_list elision assignment_expression", - /* 127 */ "property_name_and_value_list ::= property_name_and_value", - /* 128 */ "property_name_and_value_list ::= property_name_and_value_list COMMA property_name_and_value", - /* 129 */ "property_name ::= STRING", - /* 130 */ "member_expression_part ::= DOT IDENTIFIER", - /* 131 */ "adjuster ::=", - /* 132 */ "adjuster ::= adjust_expression", - /* 133 */ "adjust_expression ::= adjust_match_expression", + /* 4 */ "query ::= query NEGATIVE query_element", + /* 5 */ "query_element ::= ADJUST query_element", + /* 6 */ "query_element ::= RELATIVE_OP query_element", + /* 7 */ "query_element ::= IDENTIFIER RELATIVE_OP query_element", + /* 8 */ "query_element ::= BRACEL expression BRACER", + /* 9 */ "query_element ::= EVAL primary_expression", + /* 10 */ "expression ::= expression COMMA assignment_expression", + /* 11 */ "assignment_expression ::= lefthand_side_expression ASSIGN assignment_expression", + /* 12 */ "assignment_expression ::= lefthand_side_expression STAR_ASSIGN assignment_expression", + /* 13 */ "assignment_expression ::= lefthand_side_expression SLASH_ASSIGN assignment_expression", + /* 14 */ "assignment_expression ::= lefthand_side_expression MOD_ASSIGN assignment_expression", + /* 15 */ "assignment_expression ::= lefthand_side_expression PLUS_ASSIGN assignment_expression", + /* 16 */ "assignment_expression ::= lefthand_side_expression MINUS_ASSIGN assignment_expression", + /* 17 */ "assignment_expression ::= lefthand_side_expression SHIFTL_ASSIGN assignment_expression", + /* 18 */ "assignment_expression ::= lefthand_side_expression SHIFTR_ASSIGN assignment_expression", + /* 19 */ "assignment_expression ::= lefthand_side_expression SHIFTRR_ASSIGN assignment_expression", + /* 20 */ "assignment_expression ::= lefthand_side_expression AND_ASSIGN assignment_expression", + /* 21 */ "assignment_expression ::= lefthand_side_expression XOR_ASSIGN assignment_expression", + /* 22 */ "assignment_expression ::= lefthand_side_expression OR_ASSIGN assignment_expression", + /* 23 */ "conditional_expression ::= logical_or_expression QUESTION assignment_expression COLON assignment_expression", + /* 24 */ "logical_or_expression ::= logical_or_expression LOGICAL_OR logical_and_expression", + /* 25 */ "logical_and_expression ::= logical_and_expression LOGICAL_AND bitwise_or_expression", + /* 26 */ "logical_and_expression ::= logical_and_expression LOGICAL_AND_NOT bitwise_or_expression", + /* 27 */ "bitwise_or_expression ::= bitwise_or_expression BITWISE_OR bitwise_xor_expression", + /* 28 */ "bitwise_xor_expression ::= bitwise_xor_expression BITWISE_XOR bitwise_and_expression", + /* 29 */ "bitwise_and_expression ::= bitwise_and_expression BITWISE_AND equality_expression", + /* 30 */ "equality_expression ::= equality_expression EQUAL relational_expression", + /* 31 */ "equality_expression ::= equality_expression NOT_EQUAL relational_expression", + /* 32 */ "relational_expression ::= relational_expression LESS shift_expression", + /* 33 */ "relational_expression ::= relational_expression GREATER shift_expression", + /* 34 */ "relational_expression ::= relational_expression LESS_EQUAL shift_expression", + /* 35 */ "relational_expression ::= relational_expression GREATER_EQUAL shift_expression", + /* 36 */ "relational_expression ::= relational_expression IN shift_expression", + /* 37 */ "relational_expression ::= relational_expression MATCH shift_expression", + /* 38 */ "relational_expression ::= relational_expression NEAR shift_expression", + /* 39 */ "relational_expression ::= relational_expression NEAR2 shift_expression", + /* 40 */ "relational_expression ::= relational_expression SIMILAR shift_expression", + /* 41 */ "relational_expression ::= relational_expression TERM_EXTRACT shift_expression", + /* 42 */ "relational_expression ::= relational_expression LCP shift_expression", + /* 43 */ "relational_expression ::= relational_expression PREFIX shift_expression", + /* 44 */ "relational_expression ::= relational_expression SUFFIX shift_expression", + /* 45 */ "relational_expression ::= relational_expression REGEXP shift_expression", + /* 46 */ "shift_expression ::= shift_expression SHIFTL additive_expression", + /* 47 */ "shift_expression ::= shift_expression SHIFTR additive_expression", + /* 48 */ "shift_expression ::= shift_expression SHIFTRR additive_expression", + /* 49 */ "additive_expression ::= additive_expression PLUS multiplicative_expression", + /* 50 */ "additive_expression ::= additive_expression MINUS multiplicative_expression", + /* 51 */ "multiplicative_expression ::= multiplicative_expression STAR unary_expression", + /* 52 */ "multiplicative_expression ::= multiplicative_expression SLASH unary_expression", + /* 53 */ "multiplicative_expression ::= multiplicative_expression MOD unary_expression", + /* 54 */ "unary_expression ::= DELETE unary_expression", + /* 55 */ "unary_expression ::= INCR unary_expression", + /* 56 */ "unary_expression ::= DECR unary_expression", + /* 57 */ "unary_expression ::= PLUS unary_expression", + /* 58 */ "unary_expression ::= MINUS unary_expression", + /* 59 */ "unary_expression ::= NOT unary_expression", + /* 60 */ "unary_expression ::= BITWISE_NOT unary_expression", + /* 61 */ "unary_expression ::= ADJUST unary_expression", + /* 62 */ "unary_expression ::= EXACT unary_expression", + /* 63 */ "unary_expression ::= PARTIAL unary_expression", + /* 64 */ "unary_expression ::= UNSPLIT unary_expression", + /* 65 */ "postfix_expression ::= lefthand_side_expression INCR", + /* 66 */ "postfix_expression ::= lefthand_side_expression DECR", + /* 67 */ "call_expression ::= member_expression arguments", + /* 68 */ "object_literal ::= BRACEL property_name_and_value_list BRACER", + /* 69 */ "property_name_and_value_list ::=", + /* 70 */ "property_name_and_value ::= property_name COLON assignment_expression", + /* 71 */ "member_expression_part ::= BRACKETL expression BRACKETR", + /* 72 */ "arguments ::= PARENL argument_list PARENR", + /* 73 */ "argument_list ::=", + /* 74 */ "argument_list ::= assignment_expression", + /* 75 */ "argument_list ::= argument_list COMMA assignment_expression", + /* 76 */ "output_columns ::=", + /* 77 */ "output_columns ::= output_column", + /* 78 */ "output_columns ::= output_columns COMMA", + /* 79 */ "output_columns ::= output_columns COMMA output_column", + /* 80 */ "output_column ::= STAR", + /* 81 */ "output_column ::= NONEXISTENT_COLUMN", + /* 82 */ "output_column ::= assignment_expression", + /* 83 */ "adjuster ::= adjuster PLUS adjust_expression", + /* 84 */ "adjust_expression ::= adjust_match_expression STAR DECIMAL", + /* 85 */ "adjust_match_expression ::= IDENTIFIER MATCH STRING", + /* 86 */ "input ::= query", + /* 87 */ "input ::= expression", + /* 88 */ "input ::= START_OUTPUT_COLUMNS output_columns", + /* 89 */ "input ::= START_ADJUSTER adjuster", + /* 90 */ "query ::= query_element", + /* 91 */ "query_element ::= QSTRING", + /* 92 */ "query_element ::= PARENL query PARENR", + /* 93 */ "expression ::= assignment_expression", + /* 94 */ "assignment_expression ::= conditional_expression", + /* 95 */ "conditional_expression ::= logical_or_expression", + /* 96 */ "logical_or_expression ::= logical_and_expression", + /* 97 */ "logical_and_expression ::= bitwise_or_expression", + /* 98 */ "bitwise_or_expression ::= bitwise_xor_expression", + /* 99 */ "bitwise_xor_expression ::= bitwise_and_expression", + /* 100 */ "bitwise_and_expression ::= equality_expression", + /* 101 */ "equality_expression ::= relational_expression", + /* 102 */ "relational_expression ::= shift_expression", + /* 103 */ "shift_expression ::= additive_expression", + /* 104 */ "additive_expression ::= multiplicative_expression", + /* 105 */ "multiplicative_expression ::= unary_expression", + /* 106 */ "unary_expression ::= postfix_expression", + /* 107 */ "postfix_expression ::= lefthand_side_expression", + /* 108 */ "lefthand_side_expression ::= call_expression", + /* 109 */ "lefthand_side_expression ::= member_expression", + /* 110 */ "member_expression ::= primary_expression", + /* 111 */ "member_expression ::= member_expression member_expression_part", + /* 112 */ "primary_expression ::= object_literal", + /* 113 */ "primary_expression ::= PARENL expression PARENR", + /* 114 */ "primary_expression ::= IDENTIFIER", + /* 115 */ "primary_expression ::= array_literal", + /* 116 */ "primary_expression ::= DECIMAL", + /* 117 */ "primary_expression ::= HEX_INTEGER", + /* 118 */ "primary_expression ::= STRING", + /* 119 */ "primary_expression ::= BOOLEAN", + /* 120 */ "primary_expression ::= NULL", + /* 121 */ "array_literal ::= BRACKETL elision BRACKETR", + /* 122 */ "array_literal ::= BRACKETL element_list elision BRACKETR", + /* 123 */ "array_literal ::= BRACKETL element_list BRACKETR", + /* 124 */ "elision ::= COMMA", + /* 125 */ "elision ::= elision COMMA", + /* 126 */ "element_list ::= assignment_expression", + /* 127 */ "element_list ::= elision assignment_expression", + /* 128 */ "element_list ::= element_list elision assignment_expression", + /* 129 */ "property_name_and_value_list ::= property_name_and_value", + /* 130 */ "property_name_and_value_list ::= property_name_and_value_list COMMA property_name_and_value", + /* 131 */ "property_name ::= STRING", + /* 132 */ "member_expression_part ::= DOT IDENTIFIER", + /* 133 */ "adjuster ::=", + /* 134 */ "adjuster ::= adjust_expression", + /* 135 */ "adjust_expression ::= adjust_match_expression", }; #endif /* NDEBUG */ @@ -915,6 +925,31 @@ static int yyGrowStack(yyParser *p){ # define YYMALLOCARGTYPE size_t #endif +/* Initialize a new parser that has already been allocated. +*/ +void grn_expr_parserInit(void *yypParser){ + yyParser *pParser = (yyParser*)yypParser; +#ifdef YYTRACKMAXSTACKDEPTH + pParser->yyhwm = 0; +#endif +#if YYSTACKDEPTH<=0 + pParser->yytos = NULL; + pParser->yystack = NULL; + pParser->yystksz = 0; + if( yyGrowStack(pParser) ){ + pParser->yystack = &pParser->yystk0; + pParser->yystksz = 1; + } +#endif +#ifndef YYNOERRORRECOVERY + pParser->yyerrcnt = -1; +#endif + pParser->yytos = pParser->yystack; + pParser->yystack[0].stateno = 0; + pParser->yystack[0].major = 0; +} + +#ifndef grn_expr_parser_ENGINEALWAYSONSTACK /* ** This function allocates a new parser. ** The only argument is a pointer to a function which works like @@ -930,28 +965,11 @@ static int yyGrowStack(yyParser *p){ void *grn_expr_parserAlloc(void *(*mallocProc)(YYMALLOCARGTYPE)){ yyParser *pParser; pParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) ); - if( pParser ){ -#ifdef YYTRACKMAXSTACKDEPTH - pParser->yyhwm = 0; -#endif -#if YYSTACKDEPTH<=0 - pParser->yytos = NULL; - pParser->yystack = NULL; - pParser->yystksz = 0; - if( yyGrowStack(pParser) ){ - pParser->yystack = &pParser->yystk0; - pParser->yystksz = 1; - } -#endif -#ifndef YYNOERRORRECOVERY - pParser->yyerrcnt = -1; -#endif - pParser->yytos = pParser->yystack; - pParser->yystack[0].stateno = 0; - pParser->yystack[0].major = 0; - } + if( pParser ) grn_expr_parserInit(pParser); return pParser; } +#endif /* grn_expr_parser_ENGINEALWAYSONSTACK */ + /* The following function deletes the "minor type" or semantic value ** associated with a symbol. The symbol can be either a terminal @@ -978,13 +996,13 @@ static void yy_destructor( ** inside the C code. */ /********* Begin destructor definitions ***************************************/ - case 75: /* suppress_unused_variable_warning */ + case 76: /* suppress_unused_variable_warning */ { #line 14 "grn_ecmascript.lemon" (void)efsi; -#line 988 "grn_ecmascript.c" +#line 1006 "grn_ecmascript.c" } break; /********* End destructor definitions *****************************************/ @@ -1013,6 +1031,18 @@ static void yy_pop_parser_stack(yyParser *pParser){ yy_destructor(pParser, yytos->major, &yytos->minor); } +/* +** Clear all secondary memory allocations from the parser +*/ +void grn_expr_parserFinalize(void *p){ + yyParser *pParser = (yyParser*)p; + while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser); +#if YYSTACKDEPTH<=0 + if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack); +#endif +} + +#ifndef grn_expr_parser_ENGINEALWAYSONSTACK /* ** Deallocate and destroy a parser. Destructors are called for ** all stack elements before shutting the parser down. @@ -1025,16 +1055,13 @@ void grn_expr_parserFree( void *p, /* The parser to be deleted */ void (*freeProc)(void*) /* Function used to reclaim memory */ ){ - yyParser *pParser = (yyParser*)p; #ifndef YYPARSEFREENEVERNULL - if( pParser==0 ) return; + if( p==0 ) return; #endif - while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser); -#if YYSTACKDEPTH<=0 - if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack); -#endif - (*freeProc)((void*)pParser); + grn_expr_parserFinalize(p); + (*freeProc)(p); } +#endif /* grn_expr_parser_ENGINEALWAYSONSTACK */ /* ** Return the peak depth of the stack for a parser. @@ -1227,101 +1254,102 @@ static const struct { YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */ unsigned char nrhs; /* Number of right-hand side symbols in the rule */ } yyRuleInfo[] = { - { 77, 2 }, - { 77, 3 }, - { 77, 3 }, - { 77, 3 }, - { 81, 2 }, - { 81, 3 }, - { 81, 3 }, - { 81, 2 }, + { 78, 2 }, { 78, 3 }, - { 83, 3 }, - { 83, 3 }, - { 83, 3 }, - { 83, 3 }, - { 83, 3 }, - { 83, 3 }, - { 83, 3 }, - { 83, 3 }, - { 83, 3 }, - { 83, 3 }, - { 83, 3 }, - { 83, 3 }, - { 84, 5 }, - { 86, 3 }, - { 87, 3 }, + { 78, 3 }, + { 78, 3 }, + { 78, 3 }, + { 82, 2 }, + { 82, 2 }, + { 82, 3 }, + { 82, 3 }, + { 82, 2 }, + { 79, 3 }, + { 84, 3 }, + { 84, 3 }, + { 84, 3 }, + { 84, 3 }, + { 84, 3 }, + { 84, 3 }, + { 84, 3 }, + { 84, 3 }, + { 84, 3 }, + { 84, 3 }, + { 84, 3 }, + { 84, 3 }, + { 85, 5 }, { 87, 3 }, { 88, 3 }, + { 88, 3 }, { 89, 3 }, { 90, 3 }, { 91, 3 }, - { 91, 3 }, - { 92, 3 }, - { 92, 3 }, - { 92, 3 }, - { 92, 3 }, - { 92, 3 }, - { 92, 3 }, - { 92, 3 }, - { 92, 3 }, - { 92, 3 }, - { 92, 3 }, - { 92, 3 }, - { 92, 3 }, { 92, 3 }, { 92, 3 }, { 93, 3 }, { 93, 3 }, { 93, 3 }, + { 93, 3 }, + { 93, 3 }, + { 93, 3 }, + { 93, 3 }, + { 93, 3 }, + { 93, 3 }, + { 93, 3 }, + { 93, 3 }, + { 93, 3 }, + { 93, 3 }, + { 93, 3 }, + { 94, 3 }, { 94, 3 }, { 94, 3 }, { 95, 3 }, { 95, 3 }, - { 95, 3 }, - { 96, 2 }, - { 96, 2 }, - { 96, 2 }, - { 96, 2 }, - { 96, 2 }, - { 96, 2 }, - { 96, 2 }, - { 96, 2 }, - { 96, 2 }, - { 96, 2 }, - { 96, 2 }, + { 96, 3 }, + { 96, 3 }, + { 96, 3 }, + { 97, 2 }, + { 97, 2 }, + { 97, 2 }, + { 97, 2 }, + { 97, 2 }, + { 97, 2 }, + { 97, 2 }, + { 97, 2 }, + { 97, 2 }, { 97, 2 }, { 97, 2 }, { 98, 2 }, + { 98, 2 }, + { 99, 2 }, + { 103, 3 }, + { 107, 0 }, + { 108, 3 }, { 102, 3 }, - { 106, 0 }, - { 107, 3 }, { 101, 3 }, - { 100, 3 }, - { 109, 0 }, - { 109, 1 }, - { 109, 3 }, - { 79, 0 }, - { 79, 1 }, - { 79, 2 }, - { 79, 3 }, - { 110, 1 }, - { 110, 1 }, + { 110, 0 }, { 110, 1 }, + { 110, 3 }, + { 80, 0 }, + { 80, 1 }, + { 80, 2 }, { 80, 3 }, - { 111, 3 }, + { 111, 1 }, + { 111, 1 }, + { 111, 1 }, + { 81, 3 }, { 112, 3 }, - { 76, 1 }, - { 76, 1 }, - { 76, 2 }, - { 76, 2 }, + { 113, 3 }, { 77, 1 }, - { 81, 1 }, - { 81, 3 }, + { 77, 1 }, + { 77, 2 }, + { 77, 2 }, { 78, 1 }, - { 83, 1 }, + { 82, 1 }, + { 82, 3 }, + { 79, 1 }, { 84, 1 }, - { 86, 1 }, + { 85, 1 }, { 87, 1 }, { 88, 1 }, { 89, 1 }, @@ -1333,34 +1361,35 @@ static const struct { { 95, 1 }, { 96, 1 }, { 97, 1 }, - { 85, 1 }, - { 85, 1 }, - { 99, 1 }, - { 99, 2 }, - { 82, 1 }, - { 82, 3 }, - { 82, 1 }, - { 82, 1 }, - { 82, 1 }, - { 82, 1 }, - { 82, 1 }, - { 82, 1 }, - { 82, 1 }, - { 103, 3 }, - { 103, 4 }, - { 103, 3 }, - { 104, 1 }, - { 104, 2 }, + { 98, 1 }, + { 86, 1 }, + { 86, 1 }, + { 100, 1 }, + { 100, 2 }, + { 83, 1 }, + { 83, 3 }, + { 83, 1 }, + { 83, 1 }, + { 83, 1 }, + { 83, 1 }, + { 83, 1 }, + { 83, 1 }, + { 83, 1 }, + { 104, 3 }, + { 104, 4 }, + { 104, 3 }, { 105, 1 }, { 105, 2 }, - { 105, 3 }, { 106, 1 }, + { 106, 2 }, { 106, 3 }, - { 108, 1 }, - { 101, 2 }, - { 80, 0 }, - { 80, 1 }, - { 111, 1 }, + { 107, 1 }, + { 107, 3 }, + { 109, 1 }, + { 102, 2 }, + { 81, 0 }, + { 81, 1 }, + { 112, 1 }, }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -1429,42 +1458,59 @@ static void yy_reduce( { grn_expr_append_op(efsi->ctx, efsi->e, grn_int32_value_at(&efsi->op_stack, -1), 2); } -#line 1433 "grn_ecmascript.c" +#line 1462 "grn_ecmascript.c" break; case 1: /* query ::= query LOGICAL_AND query_element */ - case 23: /* logical_and_expression ::= logical_and_expression LOGICAL_AND bitwise_or_expression */ yytestcase(yyruleno==23); + case 25: /* logical_and_expression ::= logical_and_expression LOGICAL_AND bitwise_or_expression */ yytestcase(yyruleno==25); #line 56 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_AND, 2); } -#line 1441 "grn_ecmascript.c" +#line 1470 "grn_ecmascript.c" break; case 2: /* query ::= query LOGICAL_AND_NOT query_element */ - case 24: /* logical_and_expression ::= logical_and_expression LOGICAL_AND_NOT bitwise_or_expression */ yytestcase(yyruleno==24); + case 26: /* logical_and_expression ::= logical_and_expression LOGICAL_AND_NOT bitwise_or_expression */ yytestcase(yyruleno==26); #line 59 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_AND_NOT, 2); } -#line 1449 "grn_ecmascript.c" +#line 1478 "grn_ecmascript.c" break; case 3: /* query ::= query LOGICAL_OR query_element */ - case 22: /* logical_or_expression ::= logical_or_expression LOGICAL_OR logical_and_expression */ yytestcase(yyruleno==22); + case 24: /* logical_or_expression ::= logical_or_expression LOGICAL_OR logical_and_expression */ yytestcase(yyruleno==24); #line 62 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_OR, 2); } -#line 1457 "grn_ecmascript.c" +#line 1486 "grn_ecmascript.c" + break; + case 4: /* query ::= query NEGATIVE query_element */ +#line 65 "grn_ecmascript.lemon" +{ + int weight; + GRN_INT32_POP(&efsi->weight_stack, weight); + grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_ADJUST, 2); +} +#line 1495 "grn_ecmascript.c" + break; + case 5: /* query_element ::= ADJUST query_element */ +#line 74 "grn_ecmascript.lemon" +{ + int weight; + GRN_INT32_POP(&efsi->weight_stack, weight); +} +#line 1503 "grn_ecmascript.c" break; - case 4: /* query_element ::= RELATIVE_OP query_element */ -#line 69 "grn_ecmascript.lemon" + case 6: /* query_element ::= RELATIVE_OP query_element */ +#line 78 "grn_ecmascript.lemon" { int mode; GRN_INT32_POP(&efsi->mode_stack, mode); } -#line 1465 "grn_ecmascript.c" +#line 1511 "grn_ecmascript.c" break; - case 5: /* query_element ::= IDENTIFIER RELATIVE_OP query_element */ -#line 73 "grn_ecmascript.lemon" + case 7: /* query_element ::= IDENTIFIER RELATIVE_OP query_element */ +#line 82 "grn_ecmascript.lemon" { int mode; grn_obj *c; @@ -1488,196 +1534,196 @@ static void yy_reduce( break; } } -#line 1492 "grn_ecmascript.c" +#line 1538 "grn_ecmascript.c" break; - case 6: /* query_element ::= BRACEL expression BRACER */ - case 7: /* query_element ::= EVAL primary_expression */ yytestcase(yyruleno==7); -#line 96 "grn_ecmascript.lemon" + case 8: /* query_element ::= BRACEL expression BRACER */ + case 9: /* query_element ::= EVAL primary_expression */ yytestcase(yyruleno==9); +#line 105 "grn_ecmascript.lemon" { efsi->flags = efsi->default_flags; } -#line 1500 "grn_ecmascript.c" +#line 1546 "grn_ecmascript.c" break; - case 8: /* expression ::= expression COMMA assignment_expression */ -#line 104 "grn_ecmascript.lemon" + case 10: /* expression ::= expression COMMA assignment_expression */ +#line 113 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_COMMA, 2); } -#line 1507 "grn_ecmascript.c" +#line 1553 "grn_ecmascript.c" break; - case 9: /* assignment_expression ::= lefthand_side_expression ASSIGN assignment_expression */ -#line 109 "grn_ecmascript.lemon" + case 11: /* assignment_expression ::= lefthand_side_expression ASSIGN assignment_expression */ +#line 118 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_ASSIGN, 2); } -#line 1514 "grn_ecmascript.c" +#line 1560 "grn_ecmascript.c" break; - case 10: /* assignment_expression ::= lefthand_side_expression STAR_ASSIGN assignment_expression */ -#line 112 "grn_ecmascript.lemon" + case 12: /* assignment_expression ::= lefthand_side_expression STAR_ASSIGN assignment_expression */ +#line 121 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_STAR_ASSIGN, 2); } -#line 1521 "grn_ecmascript.c" +#line 1567 "grn_ecmascript.c" break; - case 11: /* assignment_expression ::= lefthand_side_expression SLASH_ASSIGN assignment_expression */ -#line 115 "grn_ecmascript.lemon" + case 13: /* assignment_expression ::= lefthand_side_expression SLASH_ASSIGN assignment_expression */ +#line 124 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_SLASH_ASSIGN, 2); } -#line 1528 "grn_ecmascript.c" +#line 1574 "grn_ecmascript.c" break; - case 12: /* assignment_expression ::= lefthand_side_expression MOD_ASSIGN assignment_expression */ -#line 118 "grn_ecmascript.lemon" + case 14: /* assignment_expression ::= lefthand_side_expression MOD_ASSIGN assignment_expression */ +#line 127 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_MOD_ASSIGN, 2); } -#line 1535 "grn_ecmascript.c" +#line 1581 "grn_ecmascript.c" break; - case 13: /* assignment_expression ::= lefthand_side_expression PLUS_ASSIGN assignment_expression */ -#line 121 "grn_ecmascript.lemon" + case 15: /* assignment_expression ::= lefthand_side_expression PLUS_ASSIGN assignment_expression */ +#line 130 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_PLUS_ASSIGN, 2); } -#line 1542 "grn_ecmascript.c" +#line 1588 "grn_ecmascript.c" break; - case 14: /* assignment_expression ::= lefthand_side_expression MINUS_ASSIGN assignment_expression */ -#line 124 "grn_ecmascript.lemon" + case 16: /* assignment_expression ::= lefthand_side_expression MINUS_ASSIGN assignment_expression */ +#line 133 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_MINUS_ASSIGN, 2); } -#line 1549 "grn_ecmascript.c" +#line 1595 "grn_ecmascript.c" break; - case 15: /* assignment_expression ::= lefthand_side_expression SHIFTL_ASSIGN assignment_expression */ -#line 127 "grn_ecmascript.lemon" + case 17: /* assignment_expression ::= lefthand_side_expression SHIFTL_ASSIGN assignment_expression */ +#line 136 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_SHIFTL_ASSIGN, 2); } -#line 1556 "grn_ecmascript.c" +#line 1602 "grn_ecmascript.c" break; - case 16: /* assignment_expression ::= lefthand_side_expression SHIFTR_ASSIGN assignment_expression */ -#line 130 "grn_ecmascript.lemon" + case 18: /* assignment_expression ::= lefthand_side_expression SHIFTR_ASSIGN assignment_expression */ +#line 139 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_SHIFTR_ASSIGN, 2); } -#line 1563 "grn_ecmascript.c" +#line 1609 "grn_ecmascript.c" break; - case 17: /* assignment_expression ::= lefthand_side_expression SHIFTRR_ASSIGN assignment_expression */ -#line 133 "grn_ecmascript.lemon" + case 19: /* assignment_expression ::= lefthand_side_expression SHIFTRR_ASSIGN assignment_expression */ +#line 142 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_SHIFTRR_ASSIGN, 2); } -#line 1570 "grn_ecmascript.c" +#line 1616 "grn_ecmascript.c" break; - case 18: /* assignment_expression ::= lefthand_side_expression AND_ASSIGN assignment_expression */ -#line 136 "grn_ecmascript.lemon" + case 20: /* assignment_expression ::= lefthand_side_expression AND_ASSIGN assignment_expression */ +#line 145 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_AND_ASSIGN, 2); } -#line 1577 "grn_ecmascript.c" +#line 1623 "grn_ecmascript.c" break; - case 19: /* assignment_expression ::= lefthand_side_expression XOR_ASSIGN assignment_expression */ -#line 139 "grn_ecmascript.lemon" + case 21: /* assignment_expression ::= lefthand_side_expression XOR_ASSIGN assignment_expression */ +#line 148 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_XOR_ASSIGN, 2); } -#line 1584 "grn_ecmascript.c" +#line 1630 "grn_ecmascript.c" break; - case 20: /* assignment_expression ::= lefthand_side_expression OR_ASSIGN assignment_expression */ -#line 142 "grn_ecmascript.lemon" + case 22: /* assignment_expression ::= lefthand_side_expression OR_ASSIGN assignment_expression */ +#line 151 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_OR_ASSIGN, 2); } -#line 1591 "grn_ecmascript.c" +#line 1637 "grn_ecmascript.c" break; - case 21: /* conditional_expression ::= logical_or_expression QUESTION assignment_expression COLON assignment_expression */ -#line 147 "grn_ecmascript.lemon" + case 23: /* conditional_expression ::= logical_or_expression QUESTION assignment_expression COLON assignment_expression */ +#line 156 "grn_ecmascript.lemon" { grn_expr *e = (grn_expr *)efsi->e; e->codes[yymsp[-3].minor.yy0].nargs = yymsp[-1].minor.yy0 - yymsp[-3].minor.yy0; e->codes[yymsp[-1].minor.yy0].nargs = e->codes_curr - yymsp[-1].minor.yy0 - 1; } -#line 1600 "grn_ecmascript.c" +#line 1646 "grn_ecmascript.c" break; - case 25: /* bitwise_or_expression ::= bitwise_or_expression BITWISE_OR bitwise_xor_expression */ -#line 167 "grn_ecmascript.lemon" + case 27: /* bitwise_or_expression ::= bitwise_or_expression BITWISE_OR bitwise_xor_expression */ +#line 176 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_BITWISE_OR, 2); } -#line 1607 "grn_ecmascript.c" +#line 1653 "grn_ecmascript.c" break; - case 26: /* bitwise_xor_expression ::= bitwise_xor_expression BITWISE_XOR bitwise_and_expression */ -#line 172 "grn_ecmascript.lemon" + case 28: /* bitwise_xor_expression ::= bitwise_xor_expression BITWISE_XOR bitwise_and_expression */ +#line 181 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_BITWISE_XOR, 2); } -#line 1614 "grn_ecmascript.c" +#line 1660 "grn_ecmascript.c" break; - case 27: /* bitwise_and_expression ::= bitwise_and_expression BITWISE_AND equality_expression */ -#line 177 "grn_ecmascript.lemon" + case 29: /* bitwise_and_expression ::= bitwise_and_expression BITWISE_AND equality_expression */ +#line 186 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_BITWISE_AND, 2); } -#line 1621 "grn_ecmascript.c" +#line 1667 "grn_ecmascript.c" break; - case 28: /* equality_expression ::= equality_expression EQUAL relational_expression */ -#line 182 "grn_ecmascript.lemon" + case 30: /* equality_expression ::= equality_expression EQUAL relational_expression */ +#line 191 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_EQUAL, 2); } -#line 1628 "grn_ecmascript.c" +#line 1674 "grn_ecmascript.c" break; - case 29: /* equality_expression ::= equality_expression NOT_EQUAL relational_expression */ -#line 185 "grn_ecmascript.lemon" + case 31: /* equality_expression ::= equality_expression NOT_EQUAL relational_expression */ +#line 194 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_NOT_EQUAL, 2); } -#line 1635 "grn_ecmascript.c" +#line 1681 "grn_ecmascript.c" break; - case 30: /* relational_expression ::= relational_expression LESS shift_expression */ -#line 190 "grn_ecmascript.lemon" + case 32: /* relational_expression ::= relational_expression LESS shift_expression */ +#line 199 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_LESS, 2); } -#line 1642 "grn_ecmascript.c" +#line 1688 "grn_ecmascript.c" break; - case 31: /* relational_expression ::= relational_expression GREATER shift_expression */ -#line 193 "grn_ecmascript.lemon" + case 33: /* relational_expression ::= relational_expression GREATER shift_expression */ +#line 202 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_GREATER, 2); } -#line 1649 "grn_ecmascript.c" +#line 1695 "grn_ecmascript.c" break; - case 32: /* relational_expression ::= relational_expression LESS_EQUAL shift_expression */ -#line 196 "grn_ecmascript.lemon" + case 34: /* relational_expression ::= relational_expression LESS_EQUAL shift_expression */ +#line 205 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_LESS_EQUAL, 2); } -#line 1656 "grn_ecmascript.c" +#line 1702 "grn_ecmascript.c" break; - case 33: /* relational_expression ::= relational_expression GREATER_EQUAL shift_expression */ -#line 199 "grn_ecmascript.lemon" + case 35: /* relational_expression ::= relational_expression GREATER_EQUAL shift_expression */ +#line 208 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_GREATER_EQUAL, 2); } -#line 1663 "grn_ecmascript.c" +#line 1709 "grn_ecmascript.c" break; - case 34: /* relational_expression ::= relational_expression IN shift_expression */ -#line 202 "grn_ecmascript.lemon" + case 36: /* relational_expression ::= relational_expression IN shift_expression */ +#line 211 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_IN, 2); } -#line 1670 "grn_ecmascript.c" +#line 1716 "grn_ecmascript.c" break; - case 35: /* relational_expression ::= relational_expression MATCH shift_expression */ - case 83: /* adjust_match_expression ::= IDENTIFIER MATCH STRING */ yytestcase(yyruleno==83); -#line 205 "grn_ecmascript.lemon" + case 37: /* relational_expression ::= relational_expression MATCH shift_expression */ + case 85: /* adjust_match_expression ::= IDENTIFIER MATCH STRING */ yytestcase(yyruleno==85); +#line 214 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_MATCH, 2); } -#line 1678 "grn_ecmascript.c" +#line 1724 "grn_ecmascript.c" break; - case 36: /* relational_expression ::= relational_expression NEAR shift_expression */ -#line 208 "grn_ecmascript.lemon" + case 38: /* relational_expression ::= relational_expression NEAR shift_expression */ +#line 217 "grn_ecmascript.lemon" { { int max_interval; @@ -1687,124 +1733,124 @@ static void yy_reduce( } grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_NEAR, 3); } -#line 1691 "grn_ecmascript.c" +#line 1737 "grn_ecmascript.c" break; - case 37: /* relational_expression ::= relational_expression NEAR2 shift_expression */ -#line 217 "grn_ecmascript.lemon" + case 39: /* relational_expression ::= relational_expression NEAR2 shift_expression */ +#line 226 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_NEAR2, 2); } -#line 1698 "grn_ecmascript.c" +#line 1744 "grn_ecmascript.c" break; - case 38: /* relational_expression ::= relational_expression SIMILAR shift_expression */ -#line 220 "grn_ecmascript.lemon" + case 40: /* relational_expression ::= relational_expression SIMILAR shift_expression */ +#line 229 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_SIMILAR, 2); } -#line 1705 "grn_ecmascript.c" +#line 1751 "grn_ecmascript.c" break; - case 39: /* relational_expression ::= relational_expression TERM_EXTRACT shift_expression */ -#line 223 "grn_ecmascript.lemon" + case 41: /* relational_expression ::= relational_expression TERM_EXTRACT shift_expression */ +#line 232 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_TERM_EXTRACT, 2); } -#line 1712 "grn_ecmascript.c" +#line 1758 "grn_ecmascript.c" break; - case 40: /* relational_expression ::= relational_expression LCP shift_expression */ -#line 226 "grn_ecmascript.lemon" + case 42: /* relational_expression ::= relational_expression LCP shift_expression */ +#line 235 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_LCP, 2); } -#line 1719 "grn_ecmascript.c" +#line 1765 "grn_ecmascript.c" break; - case 41: /* relational_expression ::= relational_expression PREFIX shift_expression */ -#line 229 "grn_ecmascript.lemon" + case 43: /* relational_expression ::= relational_expression PREFIX shift_expression */ +#line 238 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_PREFIX, 2); } -#line 1726 "grn_ecmascript.c" +#line 1772 "grn_ecmascript.c" break; - case 42: /* relational_expression ::= relational_expression SUFFIX shift_expression */ -#line 232 "grn_ecmascript.lemon" + case 44: /* relational_expression ::= relational_expression SUFFIX shift_expression */ +#line 241 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_SUFFIX, 2); } -#line 1733 "grn_ecmascript.c" +#line 1779 "grn_ecmascript.c" break; - case 43: /* relational_expression ::= relational_expression REGEXP shift_expression */ -#line 235 "grn_ecmascript.lemon" + case 45: /* relational_expression ::= relational_expression REGEXP shift_expression */ +#line 244 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_REGEXP, 2); } -#line 1740 "grn_ecmascript.c" +#line 1786 "grn_ecmascript.c" break; - case 44: /* shift_expression ::= shift_expression SHIFTL additive_expression */ -#line 240 "grn_ecmascript.lemon" + case 46: /* shift_expression ::= shift_expression SHIFTL additive_expression */ +#line 249 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_SHIFTL, 2); } -#line 1747 "grn_ecmascript.c" +#line 1793 "grn_ecmascript.c" break; - case 45: /* shift_expression ::= shift_expression SHIFTR additive_expression */ -#line 243 "grn_ecmascript.lemon" + case 47: /* shift_expression ::= shift_expression SHIFTR additive_expression */ +#line 252 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_SHIFTR, 2); } -#line 1754 "grn_ecmascript.c" +#line 1800 "grn_ecmascript.c" break; - case 46: /* shift_expression ::= shift_expression SHIFTRR additive_expression */ -#line 246 "grn_ecmascript.lemon" + case 48: /* shift_expression ::= shift_expression SHIFTRR additive_expression */ +#line 255 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_SHIFTRR, 2); } -#line 1761 "grn_ecmascript.c" +#line 1807 "grn_ecmascript.c" break; - case 47: /* additive_expression ::= additive_expression PLUS multiplicative_expression */ - case 81: /* adjuster ::= adjuster PLUS adjust_expression */ yytestcase(yyruleno==81); -#line 251 "grn_ecmascript.lemon" + case 49: /* additive_expression ::= additive_expression PLUS multiplicative_expression */ + case 83: /* adjuster ::= adjuster PLUS adjust_expression */ yytestcase(yyruleno==83); +#line 260 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_PLUS, 2); } -#line 1769 "grn_ecmascript.c" +#line 1815 "grn_ecmascript.c" break; - case 48: /* additive_expression ::= additive_expression MINUS multiplicative_expression */ -#line 254 "grn_ecmascript.lemon" + case 50: /* additive_expression ::= additive_expression MINUS multiplicative_expression */ +#line 263 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_MINUS, 2); } -#line 1776 "grn_ecmascript.c" +#line 1822 "grn_ecmascript.c" break; - case 49: /* multiplicative_expression ::= multiplicative_expression STAR unary_expression */ - case 82: /* adjust_expression ::= adjust_match_expression STAR DECIMAL */ yytestcase(yyruleno==82); -#line 259 "grn_ecmascript.lemon" + case 51: /* multiplicative_expression ::= multiplicative_expression STAR unary_expression */ + case 84: /* adjust_expression ::= adjust_match_expression STAR DECIMAL */ yytestcase(yyruleno==84); +#line 268 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_STAR, 2); } -#line 1784 "grn_ecmascript.c" +#line 1830 "grn_ecmascript.c" break; - case 50: /* multiplicative_expression ::= multiplicative_expression SLASH unary_expression */ -#line 262 "grn_ecmascript.lemon" + case 52: /* multiplicative_expression ::= multiplicative_expression SLASH unary_expression */ +#line 271 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_SLASH, 2); } -#line 1791 "grn_ecmascript.c" +#line 1837 "grn_ecmascript.c" break; - case 51: /* multiplicative_expression ::= multiplicative_expression MOD unary_expression */ -#line 265 "grn_ecmascript.lemon" + case 53: /* multiplicative_expression ::= multiplicative_expression MOD unary_expression */ +#line 274 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_MOD, 2); } -#line 1798 "grn_ecmascript.c" +#line 1844 "grn_ecmascript.c" break; - case 52: /* unary_expression ::= DELETE unary_expression */ -#line 270 "grn_ecmascript.lemon" + case 54: /* unary_expression ::= DELETE unary_expression */ +#line 279 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_DELETE, 1); } -#line 1805 "grn_ecmascript.c" +#line 1851 "grn_ecmascript.c" break; - case 53: /* unary_expression ::= INCR unary_expression */ -#line 273 "grn_ecmascript.lemon" + case 55: /* unary_expression ::= INCR unary_expression */ +#line 282 "grn_ecmascript.lemon" { grn_ctx *ctx = efsi->ctx; grn_expr *e = (grn_expr *)(efsi->e); @@ -1822,10 +1868,10 @@ static void yy_reduce( grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_INCR, 1); } } -#line 1826 "grn_ecmascript.c" +#line 1872 "grn_ecmascript.c" break; - case 54: /* unary_expression ::= DECR unary_expression */ -#line 290 "grn_ecmascript.lemon" + case 56: /* unary_expression ::= DECR unary_expression */ +#line 299 "grn_ecmascript.lemon" { grn_ctx *ctx = efsi->ctx; grn_expr *e = (grn_expr *)(efsi->e); @@ -1843,66 +1889,66 @@ static void yy_reduce( grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_DECR, 1); } } -#line 1847 "grn_ecmascript.c" +#line 1893 "grn_ecmascript.c" break; - case 55: /* unary_expression ::= PLUS unary_expression */ -#line 307 "grn_ecmascript.lemon" + case 57: /* unary_expression ::= PLUS unary_expression */ +#line 316 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_PLUS, 1); } -#line 1854 "grn_ecmascript.c" +#line 1900 "grn_ecmascript.c" break; - case 56: /* unary_expression ::= MINUS unary_expression */ -#line 310 "grn_ecmascript.lemon" + case 58: /* unary_expression ::= MINUS unary_expression */ +#line 319 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_MINUS, 1); } -#line 1861 "grn_ecmascript.c" +#line 1907 "grn_ecmascript.c" break; - case 57: /* unary_expression ::= NOT unary_expression */ -#line 313 "grn_ecmascript.lemon" + case 59: /* unary_expression ::= NOT unary_expression */ +#line 322 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_NOT, 1); } -#line 1868 "grn_ecmascript.c" +#line 1914 "grn_ecmascript.c" break; - case 58: /* unary_expression ::= BITWISE_NOT unary_expression */ -#line 316 "grn_ecmascript.lemon" + case 60: /* unary_expression ::= BITWISE_NOT unary_expression */ +#line 325 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_BITWISE_NOT, 1); } -#line 1875 "grn_ecmascript.c" +#line 1921 "grn_ecmascript.c" break; - case 59: /* unary_expression ::= ADJUST unary_expression */ -#line 319 "grn_ecmascript.lemon" + case 61: /* unary_expression ::= ADJUST unary_expression */ +#line 328 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_ADJUST, 1); } -#line 1882 "grn_ecmascript.c" +#line 1928 "grn_ecmascript.c" break; - case 60: /* unary_expression ::= EXACT unary_expression */ -#line 322 "grn_ecmascript.lemon" + case 62: /* unary_expression ::= EXACT unary_expression */ +#line 331 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_EXACT, 1); } -#line 1889 "grn_ecmascript.c" +#line 1935 "grn_ecmascript.c" break; - case 61: /* unary_expression ::= PARTIAL unary_expression */ -#line 325 "grn_ecmascript.lemon" + case 63: /* unary_expression ::= PARTIAL unary_expression */ +#line 334 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_PARTIAL, 1); } -#line 1896 "grn_ecmascript.c" +#line 1942 "grn_ecmascript.c" break; - case 62: /* unary_expression ::= UNSPLIT unary_expression */ -#line 328 "grn_ecmascript.lemon" + case 64: /* unary_expression ::= UNSPLIT unary_expression */ +#line 337 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_UNSPLIT, 1); } -#line 1903 "grn_ecmascript.c" +#line 1949 "grn_ecmascript.c" break; - case 63: /* postfix_expression ::= lefthand_side_expression INCR */ -#line 333 "grn_ecmascript.lemon" + case 65: /* postfix_expression ::= lefthand_side_expression INCR */ +#line 342 "grn_ecmascript.lemon" { grn_ctx *ctx = efsi->ctx; grn_expr *e = (grn_expr *)(efsi->e); @@ -1920,10 +1966,10 @@ static void yy_reduce( grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_INCR_POST, 1); } } -#line 1924 "grn_ecmascript.c" +#line 1970 "grn_ecmascript.c" break; - case 64: /* postfix_expression ::= lefthand_side_expression DECR */ -#line 350 "grn_ecmascript.lemon" + case 66: /* postfix_expression ::= lefthand_side_expression DECR */ +#line 359 "grn_ecmascript.lemon" { grn_ctx *ctx = efsi->ctx; grn_expr *e = (grn_expr *)(efsi->e); @@ -1941,17 +1987,17 @@ static void yy_reduce( grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_DECR_POST, 1); } } -#line 1945 "grn_ecmascript.c" +#line 1991 "grn_ecmascript.c" break; - case 65: /* call_expression ::= member_expression arguments */ -#line 371 "grn_ecmascript.lemon" + case 67: /* call_expression ::= member_expression arguments */ +#line 380 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_CALL, yymsp[0].minor.yy0); } -#line 1952 "grn_ecmascript.c" +#line 1998 "grn_ecmascript.c" break; - case 66: /* object_literal ::= BRACEL property_name_and_value_list BRACER */ -#line 399 "grn_ecmascript.lemon" + case 68: /* object_literal ::= BRACEL property_name_and_value_list BRACER */ +#line 408 "grn_ecmascript.lemon" { grn_ctx *ctx = efsi->ctx; grn_expr_take_obj(ctx, efsi->e, (grn_obj *)(efsi->object_literal)); @@ -1959,10 +2005,10 @@ static void yy_reduce( GRN_OP_PUSH, 1); efsi->object_literal = NULL; } -#line 1963 "grn_ecmascript.c" +#line 2009 "grn_ecmascript.c" break; - case 67: /* property_name_and_value_list ::= */ -#line 407 "grn_ecmascript.lemon" + case 69: /* property_name_and_value_list ::= */ +#line 416 "grn_ecmascript.lemon" { grn_ctx *ctx = efsi->ctx; @@ -1975,10 +2021,10 @@ static void yy_reduce( (int)(efsi->str_end - efsi->str), efsi->str); } } -#line 1979 "grn_ecmascript.c" +#line 2025 "grn_ecmascript.c" break; - case 68: /* property_name_and_value ::= property_name COLON assignment_expression */ -#line 422 "grn_ecmascript.lemon" + case 70: /* property_name_and_value ::= property_name COLON assignment_expression */ +#line 431 "grn_ecmascript.lemon" { grn_ctx *ctx = efsi->ctx; grn_expr *e = (grn_expr *)(efsi->e); @@ -2020,61 +2066,61 @@ static void yy_reduce( } } } -#line 2024 "grn_ecmascript.c" +#line 2070 "grn_ecmascript.c" break; - case 69: /* member_expression_part ::= BRACKETL expression BRACKETR */ -#line 466 "grn_ecmascript.lemon" + case 71: /* member_expression_part ::= BRACKETL expression BRACKETR */ +#line 475 "grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_GET_MEMBER, 2); } -#line 2031 "grn_ecmascript.c" +#line 2077 "grn_ecmascript.c" break; - case 70: /* arguments ::= PARENL argument_list PARENR */ -#line 471 "grn_ecmascript.lemon" + case 72: /* arguments ::= PARENL argument_list PARENR */ +#line 480 "grn_ecmascript.lemon" { yymsp[-2].minor.yy0 = yymsp[-1].minor.yy0; } -#line 2036 "grn_ecmascript.c" +#line 2082 "grn_ecmascript.c" break; - case 71: /* argument_list ::= */ -#line 472 "grn_ecmascript.lemon" + case 73: /* argument_list ::= */ +#line 481 "grn_ecmascript.lemon" { yymsp[1].minor.yy0 = 0; } -#line 2041 "grn_ecmascript.c" +#line 2087 "grn_ecmascript.c" break; - case 72: /* argument_list ::= assignment_expression */ -#line 473 "grn_ecmascript.lemon" + case 74: /* argument_list ::= assignment_expression */ +#line 482 "grn_ecmascript.lemon" { yymsp[0].minor.yy0 = 1; } -#line 2046 "grn_ecmascript.c" +#line 2092 "grn_ecmascript.c" break; - case 73: /* argument_list ::= argument_list COMMA assignment_expression */ -#line 474 "grn_ecmascript.lemon" + case 75: /* argument_list ::= argument_list COMMA assignment_expression */ +#line 483 "grn_ecmascript.lemon" { yylhsminor.yy0 = yymsp[-2].minor.yy0 + 1; } -#line 2051 "grn_ecmascript.c" +#line 2097 "grn_ecmascript.c" yymsp[-2].minor.yy0 = yylhsminor.yy0; break; - case 74: /* output_columns ::= */ -#line 476 "grn_ecmascript.lemon" + case 76: /* output_columns ::= */ +#line 485 "grn_ecmascript.lemon" { yymsp[1].minor.yy0 = 0; } -#line 2059 "grn_ecmascript.c" +#line 2105 "grn_ecmascript.c" break; - case 75: /* output_columns ::= output_column */ -#line 479 "grn_ecmascript.lemon" + case 77: /* output_columns ::= output_column */ +#line 488 "grn_ecmascript.lemon" { yylhsminor.yy0 = yymsp[0].minor.yy0; } -#line 2066 "grn_ecmascript.c" +#line 2112 "grn_ecmascript.c" yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 76: /* output_columns ::= output_columns COMMA */ -#line 484 "grn_ecmascript.lemon" + case 78: /* output_columns ::= output_columns COMMA */ +#line 493 "grn_ecmascript.lemon" { yylhsminor.yy0 = yymsp[-1].minor.yy0; } -#line 2074 "grn_ecmascript.c" +#line 2120 "grn_ecmascript.c" yymsp[-1].minor.yy0 = yylhsminor.yy0; break; - case 77: /* output_columns ::= output_columns COMMA output_column */ -#line 489 "grn_ecmascript.lemon" + case 79: /* output_columns ::= output_columns COMMA output_column */ +#line 498 "grn_ecmascript.lemon" { if (yymsp[-2].minor.yy0 == 0) { yylhsminor.yy0 = yymsp[0].minor.yy0; @@ -2087,11 +2133,11 @@ static void yy_reduce( yylhsminor.yy0 = 1; } } -#line 2091 "grn_ecmascript.c" +#line 2137 "grn_ecmascript.c" yymsp[-2].minor.yy0 = yylhsminor.yy0; break; - case 78: /* output_column ::= STAR */ -#line 502 "grn_ecmascript.lemon" + case 80: /* output_column ::= STAR */ +#line 511 "grn_ecmascript.lemon" { grn_ctx *ctx = efsi->ctx; grn_obj *expr = efsi->e; @@ -2142,73 +2188,73 @@ static void yy_reduce( yymsp[0].minor.yy0 = 0; } } -#line 2146 "grn_ecmascript.c" +#line 2192 "grn_ecmascript.c" break; - case 79: /* output_column ::= NONEXISTENT_COLUMN */ -#line 552 "grn_ecmascript.lemon" + case 81: /* output_column ::= NONEXISTENT_COLUMN */ +#line 561 "grn_ecmascript.lemon" { yymsp[0].minor.yy0 = 0; } -#line 2153 "grn_ecmascript.c" +#line 2199 "grn_ecmascript.c" break; - case 80: /* output_column ::= assignment_expression */ -#line 555 "grn_ecmascript.lemon" + case 82: /* output_column ::= assignment_expression */ +#line 564 "grn_ecmascript.lemon" { yymsp[0].minor.yy0 = 1; } -#line 2160 "grn_ecmascript.c" +#line 2206 "grn_ecmascript.c" break; default: - /* (84) input ::= query */ yytestcase(yyruleno==84); - /* (85) input ::= expression */ yytestcase(yyruleno==85); - /* (86) input ::= START_OUTPUT_COLUMNS output_columns */ yytestcase(yyruleno==86); - /* (87) input ::= START_ADJUSTER adjuster */ yytestcase(yyruleno==87); - /* (88) query ::= query_element (OPTIMIZED OUT) */ assert(yyruleno!=88); - /* (89) query_element ::= QSTRING */ yytestcase(yyruleno==89); - /* (90) query_element ::= PARENL query PARENR */ yytestcase(yyruleno==90); - /* (91) expression ::= assignment_expression (OPTIMIZED OUT) */ assert(yyruleno!=91); - /* (92) assignment_expression ::= conditional_expression (OPTIMIZED OUT) */ assert(yyruleno!=92); - /* (93) conditional_expression ::= logical_or_expression */ yytestcase(yyruleno==93); - /* (94) logical_or_expression ::= logical_and_expression */ yytestcase(yyruleno==94); - /* (95) logical_and_expression ::= bitwise_or_expression */ yytestcase(yyruleno==95); - /* (96) bitwise_or_expression ::= bitwise_xor_expression */ yytestcase(yyruleno==96); - /* (97) bitwise_xor_expression ::= bitwise_and_expression */ yytestcase(yyruleno==97); - /* (98) bitwise_and_expression ::= equality_expression */ yytestcase(yyruleno==98); - /* (99) equality_expression ::= relational_expression */ yytestcase(yyruleno==99); - /* (100) relational_expression ::= shift_expression */ yytestcase(yyruleno==100); - /* (101) shift_expression ::= additive_expression */ yytestcase(yyruleno==101); - /* (102) additive_expression ::= multiplicative_expression */ yytestcase(yyruleno==102); - /* (103) multiplicative_expression ::= unary_expression (OPTIMIZED OUT) */ assert(yyruleno!=103); - /* (104) unary_expression ::= postfix_expression (OPTIMIZED OUT) */ assert(yyruleno!=104); - /* (105) postfix_expression ::= lefthand_side_expression */ yytestcase(yyruleno==105); - /* (106) lefthand_side_expression ::= call_expression (OPTIMIZED OUT) */ assert(yyruleno!=106); - /* (107) lefthand_side_expression ::= member_expression */ yytestcase(yyruleno==107); - /* (108) member_expression ::= primary_expression (OPTIMIZED OUT) */ assert(yyruleno!=108); - /* (109) member_expression ::= member_expression member_expression_part */ yytestcase(yyruleno==109); - /* (110) primary_expression ::= object_literal (OPTIMIZED OUT) */ assert(yyruleno!=110); - /* (111) primary_expression ::= PARENL expression PARENR */ yytestcase(yyruleno==111); - /* (112) primary_expression ::= IDENTIFIER */ yytestcase(yyruleno==112); - /* (113) primary_expression ::= array_literal (OPTIMIZED OUT) */ assert(yyruleno!=113); - /* (114) primary_expression ::= DECIMAL */ yytestcase(yyruleno==114); - /* (115) primary_expression ::= HEX_INTEGER */ yytestcase(yyruleno==115); - /* (116) primary_expression ::= STRING */ yytestcase(yyruleno==116); - /* (117) primary_expression ::= BOOLEAN */ yytestcase(yyruleno==117); - /* (118) primary_expression ::= NULL */ yytestcase(yyruleno==118); - /* (119) array_literal ::= BRACKETL elision BRACKETR */ yytestcase(yyruleno==119); - /* (120) array_literal ::= BRACKETL element_list elision BRACKETR */ yytestcase(yyruleno==120); - /* (121) array_literal ::= BRACKETL element_list BRACKETR */ yytestcase(yyruleno==121); - /* (122) elision ::= COMMA */ yytestcase(yyruleno==122); - /* (123) elision ::= elision COMMA */ yytestcase(yyruleno==123); - /* (124) element_list ::= assignment_expression (OPTIMIZED OUT) */ assert(yyruleno!=124); - /* (125) element_list ::= elision assignment_expression */ yytestcase(yyruleno==125); - /* (126) element_list ::= element_list elision assignment_expression */ yytestcase(yyruleno==126); - /* (127) property_name_and_value_list ::= property_name_and_value (OPTIMIZED OUT) */ assert(yyruleno!=127); - /* (128) property_name_and_value_list ::= property_name_and_value_list COMMA property_name_and_value */ yytestcase(yyruleno==128); - /* (129) property_name ::= STRING */ yytestcase(yyruleno==129); - /* (130) member_expression_part ::= DOT IDENTIFIER */ yytestcase(yyruleno==130); - /* (131) adjuster ::= */ yytestcase(yyruleno==131); - /* (132) adjuster ::= adjust_expression (OPTIMIZED OUT) */ assert(yyruleno!=132); - /* (133) adjust_expression ::= adjust_match_expression */ yytestcase(yyruleno==133); + /* (86) input ::= query */ yytestcase(yyruleno==86); + /* (87) input ::= expression */ yytestcase(yyruleno==87); + /* (88) input ::= START_OUTPUT_COLUMNS output_columns */ yytestcase(yyruleno==88); + /* (89) input ::= START_ADJUSTER adjuster */ yytestcase(yyruleno==89); + /* (90) query ::= query_element (OPTIMIZED OUT) */ assert(yyruleno!=90); + /* (91) query_element ::= QSTRING */ yytestcase(yyruleno==91); + /* (92) query_element ::= PARENL query PARENR */ yytestcase(yyruleno==92); + /* (93) expression ::= assignment_expression (OPTIMIZED OUT) */ assert(yyruleno!=93); + /* (94) assignment_expression ::= conditional_expression (OPTIMIZED OUT) */ assert(yyruleno!=94); + /* (95) conditional_expression ::= logical_or_expression */ yytestcase(yyruleno==95); + /* (96) logical_or_expression ::= logical_and_expression */ yytestcase(yyruleno==96); + /* (97) logical_and_expression ::= bitwise_or_expression */ yytestcase(yyruleno==97); + /* (98) bitwise_or_expression ::= bitwise_xor_expression */ yytestcase(yyruleno==98); + /* (99) bitwise_xor_expression ::= bitwise_and_expression */ yytestcase(yyruleno==99); + /* (100) bitwise_and_expression ::= equality_expression */ yytestcase(yyruleno==100); + /* (101) equality_expression ::= relational_expression */ yytestcase(yyruleno==101); + /* (102) relational_expression ::= shift_expression */ yytestcase(yyruleno==102); + /* (103) shift_expression ::= additive_expression */ yytestcase(yyruleno==103); + /* (104) additive_expression ::= multiplicative_expression */ yytestcase(yyruleno==104); + /* (105) multiplicative_expression ::= unary_expression (OPTIMIZED OUT) */ assert(yyruleno!=105); + /* (106) unary_expression ::= postfix_expression (OPTIMIZED OUT) */ assert(yyruleno!=106); + /* (107) postfix_expression ::= lefthand_side_expression */ yytestcase(yyruleno==107); + /* (108) lefthand_side_expression ::= call_expression (OPTIMIZED OUT) */ assert(yyruleno!=108); + /* (109) lefthand_side_expression ::= member_expression */ yytestcase(yyruleno==109); + /* (110) member_expression ::= primary_expression (OPTIMIZED OUT) */ assert(yyruleno!=110); + /* (111) member_expression ::= member_expression member_expression_part */ yytestcase(yyruleno==111); + /* (112) primary_expression ::= object_literal (OPTIMIZED OUT) */ assert(yyruleno!=112); + /* (113) primary_expression ::= PARENL expression PARENR */ yytestcase(yyruleno==113); + /* (114) primary_expression ::= IDENTIFIER */ yytestcase(yyruleno==114); + /* (115) primary_expression ::= array_literal (OPTIMIZED OUT) */ assert(yyruleno!=115); + /* (116) primary_expression ::= DECIMAL */ yytestcase(yyruleno==116); + /* (117) primary_expression ::= HEX_INTEGER */ yytestcase(yyruleno==117); + /* (118) primary_expression ::= STRING */ yytestcase(yyruleno==118); + /* (119) primary_expression ::= BOOLEAN */ yytestcase(yyruleno==119); + /* (120) primary_expression ::= NULL */ yytestcase(yyruleno==120); + /* (121) array_literal ::= BRACKETL elision BRACKETR */ yytestcase(yyruleno==121); + /* (122) array_literal ::= BRACKETL element_list elision BRACKETR */ yytestcase(yyruleno==122); + /* (123) array_literal ::= BRACKETL element_list BRACKETR */ yytestcase(yyruleno==123); + /* (124) elision ::= COMMA */ yytestcase(yyruleno==124); + /* (125) elision ::= elision COMMA */ yytestcase(yyruleno==125); + /* (126) element_list ::= assignment_expression (OPTIMIZED OUT) */ assert(yyruleno!=126); + /* (127) element_list ::= elision assignment_expression */ yytestcase(yyruleno==127); + /* (128) element_list ::= element_list elision assignment_expression */ yytestcase(yyruleno==128); + /* (129) property_name_and_value_list ::= property_name_and_value (OPTIMIZED OUT) */ assert(yyruleno!=129); + /* (130) property_name_and_value_list ::= property_name_and_value_list COMMA property_name_and_value */ yytestcase(yyruleno==130); + /* (131) property_name ::= STRING */ yytestcase(yyruleno==131); + /* (132) member_expression_part ::= DOT IDENTIFIER */ yytestcase(yyruleno==132); + /* (133) adjuster ::= */ yytestcase(yyruleno==133); + /* (134) adjuster ::= adjust_expression (OPTIMIZED OUT) */ assert(yyruleno!=134); + /* (135) adjust_expression ::= adjust_match_expression */ yytestcase(yyruleno==135); break; /********** End reduce actions ************************************************/ }; @@ -2291,7 +2337,7 @@ static void yy_syntax_error( } GRN_OBJ_FIN(ctx, &message); } -#line 2295 "grn_ecmascript.c" +#line 2341 "grn_ecmascript.c" /************ End %syntax_error code ******************************************/ grn_expr_parserARG_STORE; /* Suppress warning about unused %extra_argument variable */ } Modified: lib/grn_ecmascript.h (+69 -68) =================================================================== --- lib/grn_ecmascript.h 2017-08-21 09:28:54 +0900 (628069048) +++ lib/grn_ecmascript.h 2017-08-22 12:30:04 +0900 (15272b0aa) @@ -3,71 +3,72 @@ #define GRN_EXPR_TOKEN_LOGICAL_AND 3 #define GRN_EXPR_TOKEN_LOGICAL_AND_NOT 4 #define GRN_EXPR_TOKEN_LOGICAL_OR 5 -#define GRN_EXPR_TOKEN_QSTRING 6 -#define GRN_EXPR_TOKEN_PARENL 7 -#define GRN_EXPR_TOKEN_PARENR 8 -#define GRN_EXPR_TOKEN_RELATIVE_OP 9 -#define GRN_EXPR_TOKEN_IDENTIFIER 10 -#define GRN_EXPR_TOKEN_BRACEL 11 -#define GRN_EXPR_TOKEN_BRACER 12 -#define GRN_EXPR_TOKEN_EVAL 13 -#define GRN_EXPR_TOKEN_COMMA 14 -#define GRN_EXPR_TOKEN_ASSIGN 15 -#define GRN_EXPR_TOKEN_STAR_ASSIGN 16 -#define GRN_EXPR_TOKEN_SLASH_ASSIGN 17 -#define GRN_EXPR_TOKEN_MOD_ASSIGN 18 -#define GRN_EXPR_TOKEN_PLUS_ASSIGN 19 -#define GRN_EXPR_TOKEN_MINUS_ASSIGN 20 -#define GRN_EXPR_TOKEN_SHIFTL_ASSIGN 21 -#define GRN_EXPR_TOKEN_SHIFTR_ASSIGN 22 -#define GRN_EXPR_TOKEN_SHIFTRR_ASSIGN 23 -#define GRN_EXPR_TOKEN_AND_ASSIGN 24 -#define GRN_EXPR_TOKEN_XOR_ASSIGN 25 -#define GRN_EXPR_TOKEN_OR_ASSIGN 26 -#define GRN_EXPR_TOKEN_QUESTION 27 -#define GRN_EXPR_TOKEN_COLON 28 -#define GRN_EXPR_TOKEN_BITWISE_OR 29 -#define GRN_EXPR_TOKEN_BITWISE_XOR 30 -#define GRN_EXPR_TOKEN_BITWISE_AND 31 -#define GRN_EXPR_TOKEN_EQUAL 32 -#define GRN_EXPR_TOKEN_NOT_EQUAL 33 -#define GRN_EXPR_TOKEN_LESS 34 -#define GRN_EXPR_TOKEN_GREATER 35 -#define GRN_EXPR_TOKEN_LESS_EQUAL 36 -#define GRN_EXPR_TOKEN_GREATER_EQUAL 37 -#define GRN_EXPR_TOKEN_IN 38 -#define GRN_EXPR_TOKEN_MATCH 39 -#define GRN_EXPR_TOKEN_NEAR 40 -#define GRN_EXPR_TOKEN_NEAR2 41 -#define GRN_EXPR_TOKEN_SIMILAR 42 -#define GRN_EXPR_TOKEN_TERM_EXTRACT 43 -#define GRN_EXPR_TOKEN_LCP 44 -#define GRN_EXPR_TOKEN_PREFIX 45 -#define GRN_EXPR_TOKEN_SUFFIX 46 -#define GRN_EXPR_TOKEN_REGEXP 47 -#define GRN_EXPR_TOKEN_SHIFTL 48 -#define GRN_EXPR_TOKEN_SHIFTR 49 -#define GRN_EXPR_TOKEN_SHIFTRR 50 -#define GRN_EXPR_TOKEN_PLUS 51 -#define GRN_EXPR_TOKEN_MINUS 52 -#define GRN_EXPR_TOKEN_STAR 53 -#define GRN_EXPR_TOKEN_SLASH 54 -#define GRN_EXPR_TOKEN_MOD 55 -#define GRN_EXPR_TOKEN_DELETE 56 -#define GRN_EXPR_TOKEN_INCR 57 -#define GRN_EXPR_TOKEN_DECR 58 -#define GRN_EXPR_TOKEN_NOT 59 -#define GRN_EXPR_TOKEN_BITWISE_NOT 60 -#define GRN_EXPR_TOKEN_ADJUST 61 -#define GRN_EXPR_TOKEN_EXACT 62 -#define GRN_EXPR_TOKEN_PARTIAL 63 -#define GRN_EXPR_TOKEN_UNSPLIT 64 -#define GRN_EXPR_TOKEN_DECIMAL 65 -#define GRN_EXPR_TOKEN_HEX_INTEGER 66 -#define GRN_EXPR_TOKEN_STRING 67 -#define GRN_EXPR_TOKEN_BOOLEAN 68 -#define GRN_EXPR_TOKEN_NULL 69 -#define GRN_EXPR_TOKEN_BRACKETL 70 -#define GRN_EXPR_TOKEN_BRACKETR 71 -#define GRN_EXPR_TOKEN_DOT 72 -#define GRN_EXPR_TOKEN_NONEXISTENT_COLUMN 73 +#define GRN_EXPR_TOKEN_NEGATIVE 6 +#define GRN_EXPR_TOKEN_QSTRING 7 +#define GRN_EXPR_TOKEN_PARENL 8 +#define GRN_EXPR_TOKEN_PARENR 9 +#define GRN_EXPR_TOKEN_ADJUST 10 +#define GRN_EXPR_TOKEN_RELATIVE_OP 11 +#define GRN_EXPR_TOKEN_IDENTIFIER 12 +#define GRN_EXPR_TOKEN_BRACEL 13 +#define GRN_EXPR_TOKEN_BRACER 14 +#define GRN_EXPR_TOKEN_EVAL 15 +#define GRN_EXPR_TOKEN_COMMA 16 +#define GRN_EXPR_TOKEN_ASSIGN 17 +#define GRN_EXPR_TOKEN_STAR_ASSIGN 18 +#define GRN_EXPR_TOKEN_SLASH_ASSIGN 19 +#define GRN_EXPR_TOKEN_MOD_ASSIGN 20 +#define GRN_EXPR_TOKEN_PLUS_ASSIGN 21 +#define GRN_EXPR_TOKEN_MINUS_ASSIGN 22 +#define GRN_EXPR_TOKEN_SHIFTL_ASSIGN 23 +#define GRN_EXPR_TOKEN_SHIFTR_ASSIGN 24 +#define GRN_EXPR_TOKEN_SHIFTRR_ASSIGN 25 +#define GRN_EXPR_TOKEN_AND_ASSIGN 26 +#define GRN_EXPR_TOKEN_XOR_ASSIGN 27 +#define GRN_EXPR_TOKEN_OR_ASSIGN 28 +#define GRN_EXPR_TOKEN_QUESTION 29 +#define GRN_EXPR_TOKEN_COLON 30 +#define GRN_EXPR_TOKEN_BITWISE_OR 31 +#define GRN_EXPR_TOKEN_BITWISE_XOR 32 +#define GRN_EXPR_TOKEN_BITWISE_AND 33 +#define GRN_EXPR_TOKEN_EQUAL 34 +#define GRN_EXPR_TOKEN_NOT_EQUAL 35 +#define GRN_EXPR_TOKEN_LESS 36 +#define GRN_EXPR_TOKEN_GREATER 37 +#define GRN_EXPR_TOKEN_LESS_EQUAL 38 +#define GRN_EXPR_TOKEN_GREATER_EQUAL 39 +#define GRN_EXPR_TOKEN_IN 40 +#define GRN_EXPR_TOKEN_MATCH 41 +#define GRN_EXPR_TOKEN_NEAR 42 +#define GRN_EXPR_TOKEN_NEAR2 43 +#define GRN_EXPR_TOKEN_SIMILAR 44 +#define GRN_EXPR_TOKEN_TERM_EXTRACT 45 +#define GRN_EXPR_TOKEN_LCP 46 +#define GRN_EXPR_TOKEN_PREFIX 47 +#define GRN_EXPR_TOKEN_SUFFIX 48 +#define GRN_EXPR_TOKEN_REGEXP 49 +#define GRN_EXPR_TOKEN_SHIFTL 50 +#define GRN_EXPR_TOKEN_SHIFTR 51 +#define GRN_EXPR_TOKEN_SHIFTRR 52 +#define GRN_EXPR_TOKEN_PLUS 53 +#define GRN_EXPR_TOKEN_MINUS 54 +#define GRN_EXPR_TOKEN_STAR 55 +#define GRN_EXPR_TOKEN_SLASH 56 +#define GRN_EXPR_TOKEN_MOD 57 +#define GRN_EXPR_TOKEN_DELETE 58 +#define GRN_EXPR_TOKEN_INCR 59 +#define GRN_EXPR_TOKEN_DECR 60 +#define GRN_EXPR_TOKEN_NOT 61 +#define GRN_EXPR_TOKEN_BITWISE_NOT 62 +#define GRN_EXPR_TOKEN_EXACT 63 +#define GRN_EXPR_TOKEN_PARTIAL 64 +#define GRN_EXPR_TOKEN_UNSPLIT 65 +#define GRN_EXPR_TOKEN_DECIMAL 66 +#define GRN_EXPR_TOKEN_HEX_INTEGER 67 +#define GRN_EXPR_TOKEN_STRING 68 +#define GRN_EXPR_TOKEN_BOOLEAN 69 +#define GRN_EXPR_TOKEN_NULL 70 +#define GRN_EXPR_TOKEN_BRACKETL 71 +#define GRN_EXPR_TOKEN_BRACKETR 72 +#define GRN_EXPR_TOKEN_DOT 73 +#define GRN_EXPR_TOKEN_NONEXISTENT_COLUMN 74 Modified: lib/grn_ecmascript.lemon (+9 -0) =================================================================== --- lib/grn_ecmascript.lemon 2017-08-21 09:28:54 +0900 (24305ae6e) +++ lib/grn_ecmascript.lemon 2017-08-22 12:30:04 +0900 (234ea41c0) @@ -62,10 +62,19 @@ query ::= query LOGICAL_AND_NOT query_element.{ query ::= query LOGICAL_OR query_element.{ grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_OR, 2); } +query ::= query NEGATIVE query_element.{ + int weight; + GRN_INT32_POP(&efsi->weight_stack, weight); + grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_ADJUST, 2); +} query_element ::= QSTRING. query_element ::= PARENL query PARENR. +query_element ::= ADJUST query_element.{ + int weight; + GRN_INT32_POP(&efsi->weight_stack, weight); +} query_element ::= RELATIVE_OP query_element.{ int mode; GRN_INT32_POP(&efsi->mode_stack, mode); Modified: lib/ii.c (+2 -2) =================================================================== --- lib/ii.c 2017-08-21 09:28:54 +0900 (519466841) +++ lib/ii.c 2017-08-22 12:30:04 +0900 (5c445b5e8) @@ -8677,7 +8677,7 @@ grn_ii_select(grn_ctx *ctx, grn_ii *ii, } } weight = get_weight(ctx, s, rid, sid, wvm, optarg); - if (tip == tie && weight > 0) { + if (tip == tie && weight != 0) { grn_rset_posinfo pi = {rid, sid, 0}; if (orp || grn_hash_get(ctx, s, &pi, s->key_size, NULL)) { int count = 0, noccur = 0, pos = 0, score = 0, tscore = 0, min, max; @@ -9020,7 +9020,7 @@ grn_ii_sel(grn_ctx *ctx, grn_ii *ii, const char *string, unsigned int string_len default : break; } - if (optarg->vector_size > 0) { + if (optarg->vector_size != 0) { arg.weight_vector = optarg->weight_vector; arg.vector_size = optarg->vector_size; } Modified: lib/mrb/scripts/scan_info_builder.rb (+1 -0) =================================================================== --- lib/mrb/scripts/scan_info_builder.rb 2017-08-21 09:28:54 +0900 (d5a72bcc8) +++ lib/mrb/scripts/scan_info_builder.rb 2017-08-22 12:30:04 +0900 (66dad9ea4) @@ -69,6 +69,7 @@ module Groonga data = context.data data.op = code_op data.end = i + data.weight = code.value.value if code.value data.match_resolve_index @data_list << data context.data = nil Modified: lib/mrb/scripts/scan_info_data.rb (+13 -9) =================================================================== --- lib/mrb/scripts/scan_info_data.rb 2017-08-21 09:28:54 +0900 (0a572e9a1) +++ lib/mrb/scripts/scan_info_data.rb 2017-08-22 12:30:04 +0900 (342f7a7a6) @@ -13,6 +13,7 @@ module Groonga attr_accessor :max_interval attr_accessor :similarity_threshold attr_accessor :start_position + attr_accessor :weight def initialize(start) @start = start @end = 0 @@ -25,6 +26,7 @@ module Groonga @max_interval = nil @similarity_threshold = nil @start_position = nil + @weight = 0 end def match_resolve_index @@ -197,13 +199,12 @@ module Groonga end weight, offset = codes[i].weight i += offset - search_index = ScanInfoSearchIndex.new(index_info.index, - index_info.section_id, - weight, - scorer, - expression, - scorer_args_expr_offset) - @search_indexes << search_index + put_search_index(index_info.index, + index_info.section_id, + weight, + scorer, + expression, + scorer_args_expr_offset) end when Table raise ErrorMessage, "invalid match target: <#{value.name}>" @@ -312,8 +313,11 @@ module Groonga put_search_index(index_info.index, index_info.section_id, 1) end - def put_search_index(index, section_id, weight) - search_index = ScanInfoSearchIndex.new(index, section_id, weight) + def put_search_index(index, section_id, weight, *args) + search_index = ScanInfoSearchIndex.new(index, + section_id, + weight + @weight, + *args) @search_indexes << search_index end end