Kouhei Sutou 2019-01-21 15:42:42 +0900 (Mon, 21 Jan 2019) Revision: ee0b5b5b42d1897098b370db85cff6404b6ffc19 https://github.com/groonga/groonga/commit/ee0b5b5b42d1897098b370db85cff6404b6ffc19 Message: Stop using ctx->errbuf in ERR() Modified files: lib/db.c lib/expr.c lib/expr_executor.c lib/grn_ecmascript.c lib/grn_ecmascript.lemon lib/highlighter.c lib/ii.c lib/proc.c lib/window_function.c Modified: lib/db.c (+12 -4) =================================================================== --- lib/db.c 2019-01-21 15:26:19 +0900 (56e5b88b3) +++ lib/db.c 2019-01-21 15:42:42 +0900 (ad4aec22b) @@ -9179,6 +9179,8 @@ grn_obj_set_info_table_module_raw(grn_ctx *ctx, GRN_OP_AND, GRN_EXPR_SYNTAX_SCRIPT); if (ctx->rc != GRN_SUCCESS) { + char errbuf[GRN_CTX_MSGSIZE]; + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); ERR(GRN_INVALID_ARGUMENT, "%s[%.*s] failed to parse %s options: <%.*s>: %s", context_tag, @@ -9187,7 +9189,7 @@ grn_obj_set_info_table_module_raw(grn_ctx *ctx, module_name, (int)GRN_TEXT_LEN(module), GRN_TEXT_VALUE(module), - ctx->errbuf); + errbuf); goto exit; } if (!grn_expr_is_simple_function_call(ctx, expression)) { @@ -9420,6 +9422,8 @@ grn_obj_set_info_table_modules(grn_ctx *ctx, GRN_OP_AND, GRN_EXPR_SYNTAX_SCRIPT); if (ctx->rc != GRN_SUCCESS) { + char errbuf[GRN_CTX_MSGSIZE]; + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); ERR(GRN_INVALID_ARGUMENT, "%s[%.*s] failed to parse %s: <%.*s>: %s", context_tag, @@ -9428,7 +9432,7 @@ grn_obj_set_info_table_modules(grn_ctx *ctx, module_name, (int)GRN_TEXT_LEN(modules), GRN_TEXT_VALUE(modules), - ctx->errbuf); + errbuf); goto exit; } if (!grn_expr_is_module_list(ctx, expression)) { @@ -9887,10 +9891,12 @@ remove_columns(grn_ctx *ctx, grn_obj *obj) "[object][remove] column is broken: <%.*s>", name_size, name); } else { + char errbuf[GRN_CTX_MSGSIZE]; + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); ERR(ctx->rc, "[object][remove] column is broken: <%.*s>: %s", name_size, name, - ctx->errbuf); + errbuf); } rc = ctx->rc; break; @@ -10908,15 +10914,17 @@ grn_obj_register(grn_ctx *ctx, grn_obj *db, const char *name, unsigned int name_ int added; if (!(id = grn_table_add(ctx, s->keys, name, name_size, &added))) { grn_rc rc; + char errbuf[GRN_CTX_MSGSIZE]; rc = ctx->rc; if (rc == GRN_SUCCESS) { rc = GRN_NO_MEMORY_AVAILABLE; } + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); ERR(rc, "[object][register] failed to register a name: <%.*s>%s%s%s", name_size, name, ctx->rc == GRN_SUCCESS ? "" : ": <", - ctx->rc == GRN_SUCCESS ? "" : ctx->errbuf, + ctx->rc == GRN_SUCCESS ? "" : errbuf, ctx->rc == GRN_SUCCESS ? "" : ">"); } else if (!added) { ERR(GRN_INVALID_ARGUMENT, Modified: lib/expr.c (+9 -3) =================================================================== --- lib/expr.c 2019-01-21 15:26:19 +0900 (ab78db362) +++ lib/expr.c 2019-01-21 15:42:42 +0900 (4c5953bd0) @@ -6749,33 +6749,39 @@ grn_expr_syntax_expand_term_by_table(grn_ctx *ctx, GRN_EXPR_CREATE_FOR_QUERY(ctx, table, expression, variable); if (ctx->rc != GRN_SUCCESS) { + char errbuf[GRN_CTX_MSGSIZE]; + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); ERR(ctx->rc, "[query][expand][table] " "failed to create expression: <%s>", - ctx->errbuf); + errbuf); return ctx->rc; } grn_expr_append_const(ctx, expression, term_column, GRN_OP_GET_VALUE, 1); grn_expr_append_const_str(ctx, expression, term, term_len, GRN_OP_PUSH, 1); grn_expr_append_op(ctx, expression, GRN_OP_EQUAL, 2); if (ctx->rc != GRN_SUCCESS) { + char errbuf[GRN_CTX_MSGSIZE]; + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); grn_obj_close(ctx, expression); ERR(ctx->rc, "[query][expand][table] " "failed to build expression: <%s>", - ctx->errbuf); + errbuf); return ctx->rc; } found_terms = grn_table_select(ctx, table, expression, NULL, GRN_OP_OR); grn_obj_close(ctx, expression); if (!found_terms) { + char errbuf[GRN_CTX_MSGSIZE]; + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); ERR(ctx->rc, "[query][expand][table] " "failed to find term: <%.*s>: <%s>", (int)term_len, term, - ctx->errbuf); + errbuf); return ctx->rc; } Modified: lib/expr_executor.c (+3 -1) =================================================================== --- lib/expr_executor.c 2019-01-21 15:26:19 +0900 (7595574e7) +++ lib/expr_executor.c 2019-01-21 15:42:42 +0900 (2a06f832d) @@ -3439,9 +3439,11 @@ grn_expr_executor_open(grn_ctx *ctx, grn_obj *expr) executor = GRN_CALLOC(sizeof(grn_expr_executor)); if (!executor) { + char errbuf[GRN_CTX_MSGSIZE]; + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); ERR(ctx->rc, "[expr-executor][open] failed to allocate: %s", - ctx->errbuf); + errbuf); GRN_API_RETURN(NULL); } Modified: lib/grn_ecmascript.c (+1049 -852) =================================================================== --- lib/grn_ecmascript.c 2019-01-21 15:26:19 +0900 (f5dc50cb6) +++ lib/grn_ecmascript.c 2019-01-21 15:42:42 +0900 (afd1373a4) @@ -23,14 +23,15 @@ ** input grammar file: */ #include <stdio.h> +#include <assert.h> /************ Begin %include sections from the grammar ************************/ -#line 4 "grn_ecmascript.lemon" +#line 4 "../../groonga/lib/grn_ecmascript.lemon" #ifdef assert # undef assert #endif #define assert GRN_ASSERT -#line 34 "grn_ecmascript.c" +#line 35 "../../groonga/lib/grn_ecmascript.c" /**************** End of %include directives **********************************/ /* These constants specify the various numeric values for terminal symbols ** in a format understandable to "makeheaders". This section is blank unless @@ -71,52 +72,63 @@ ** zero the stack is dynamically sized using realloc() ** grn_expr_parserARG_SDECL A static variable declaration for the %extra_argument ** grn_expr_parserARG_PDECL A parameter declaration for the %extra_argument +** grn_expr_parserARG_PARAM Code to pass %extra_argument as a subroutine parameter ** grn_expr_parserARG_STORE Code to store %extra_argument into yypParser ** grn_expr_parserARG_FETCH Code to extract %extra_argument from yypParser +** grn_expr_parserCTX_* As grn_expr_parserARG_ except for %extra_context ** YYERRORSYMBOL is the code number of the error symbol. If not ** defined, then do no error processing. ** YYNSTATE the combined number of states. ** YYNRULE the number of rules in the grammar +** YYNTOKEN Number of terminal symbols ** YY_MAX_SHIFT Maximum value for shift actions ** YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions ** YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions -** YY_MIN_REDUCE Minimum value for reduce actions -** YY_MAX_REDUCE Maximum value for reduce actions ** YY_ERROR_ACTION The yy_action[] code for syntax error ** YY_ACCEPT_ACTION The yy_action[] code for accept ** YY_NO_ACTION The yy_action[] code for no-op +** YY_MIN_REDUCE Minimum value for reduce actions +** YY_MAX_REDUCE Maximum value for reduce actions */ #ifndef INTERFACE # define INTERFACE 1 #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned char -#define YYNOCODE 116 +#define YYNOCODE 114 #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 #endif #define grn_expr_parserARG_SDECL efs_info *efsi ; #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 grn_expr_parserARG_PARAM ,efsi +#define grn_expr_parserARG_FETCH efs_info *efsi =yypParser->efsi ; +#define grn_expr_parserARG_STORE yypParser->efsi =efsi ; +#define grn_expr_parserCTX_SDECL +#define grn_expr_parserCTX_PDECL +#define grn_expr_parserCTX_PARAM +#define grn_expr_parserCTX_FETCH +#define grn_expr_parserCTX_STORE #define YYNSTATE 147 #define YYNRULE 137 +#define YYNTOKEN 76 #define YY_MAX_SHIFT 146 #define YY_MIN_SHIFTREDUCE 234 #define YY_MAX_SHIFTREDUCE 370 -#define YY_MIN_REDUCE 371 -#define YY_MAX_REDUCE 507 -#define YY_ERROR_ACTION 508 -#define YY_ACCEPT_ACTION 509 -#define YY_NO_ACTION 510 +#define YY_ERROR_ACTION 371 +#define YY_ACCEPT_ACTION 372 +#define YY_NO_ACTION 373 +#define YY_MIN_REDUCE 374 +#define YY_MAX_REDUCE 510 /************* End control #defines *******************************************/ +#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) /* Define the yytestcase() macro to be a no-op if is not already defined ** otherwise. @@ -145,9 +157,6 @@ typedef union { ** N between YY_MIN_SHIFTREDUCE Shift to an arbitrary state then ** and YY_MAX_SHIFTREDUCE reduce by rule N-YY_MIN_SHIFTREDUCE. ** -** N between YY_MIN_REDUCE Reduce by rule N-YY_MIN_REDUCE -** and YY_MAX_REDUCE -** ** N == YY_ERROR_ACTION A syntax error has occurred. ** ** N == YY_ACCEPT_ACTION The parser accepts its input. @@ -155,25 +164,22 @@ typedef union { ** N == YY_NO_ACTION No such action. Denotes unused ** slots in the yy_action[] table. ** +** N between YY_MIN_REDUCE Reduce by rule N-YY_MIN_REDUCE +** and YY_MAX_REDUCE +** ** The action table is constructed as a single large table named yy_action[]. ** Given state S and lookahead X, the action is computed as either: ** ** (A) N = yy_action[ yy_shift_ofst[S] + X ] ** (B) N = yy_default[S] ** -** The (A) formula is preferred. The B formula is used instead if: -** (1) The yy_shift_ofst[S]+X value is out of range, or -** (2) yy_lookahead[yy_shift_ofst[S]+X] is not equal to X, or -** (3) yy_shift_ofst[S] equal YY_SHIFT_USE_DFLT. -** (Implementation note: YY_SHIFT_USE_DFLT is chosen so that -** YY_SHIFT_USE_DFLT+X will be out of range for all possible lookaheads X. -** Hence only tests (1) and (2) need to be evaluated.) +** The (A) formula is preferred. The B formula is used instead if +** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X. ** ** The formulas above are for computing the action when the lookahead is ** a terminal symbol. If the lookahead is a non-terminal (as occurs after ** a reduce action) then the yy_reduce_ofst[] array is used in place of -** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of -** YY_SHIFT_USE_DFLT. +** the yy_shift_ofst[] array. ** ** The following are the tables generated in this section: ** @@ -187,425 +193,425 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (1807) +#define YY_ACTTAB_COUNT (1820) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 3, 73, 117, 117, 138, 133, 326, 2, 366, 55, - /* 10 */ 84, 131, 1, 371, 72, 509, 80, 114, 10, 380, - /* 20 */ 80, 76, 114, 114, 92, 128, 127, 141, 140, 139, - /* 30 */ 122, 89, 105, 118, 106, 106, 106, 92, 76, 380, - /* 40 */ 380, 76, 76, 326, 75, 461, 85, 84, 146, 9, - /* 50 */ 375, 72, 374, 67, 66, 54, 53, 52, 70, 69, - /* 60 */ 68, 65, 64, 62, 61, 60, 351, 352, 353, 354, - /* 70 */ 355, 4, 129, 71, 59, 58, 76, 129, 129, 92, - /* 80 */ 128, 127, 141, 140, 139, 122, 89, 105, 118, 106, - /* 90 */ 106, 106, 92, 76, 79, 460, 76, 76, 79, 77, - /* 100 */ 117, 117, 138, 378, 326, 2, 503, 55, 84, 131, - /* 110 */ 1, 5, 72, 79, 120, 112, 83, 79, 76, 120, - /* 120 */ 120, 92, 128, 127, 141, 140, 139, 122, 89, 105, - /* 130 */ 118, 106, 106, 106, 92, 76, 455, 135, 76, 76, - /* 140 */ 7, 303, 63, 78, 349, 74, 112, 135, 307, 439, - /* 150 */ 483, 67, 66, 502, 138, 23, 70, 69, 68, 65, - /* 160 */ 64, 62, 61, 60, 351, 352, 353, 354, 355, 4, - /* 170 */ 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, - /* 180 */ 41, 40, 39, 38, 37, 377, 67, 66, 315, 57, - /* 190 */ 56, 70, 69, 68, 65, 64, 62, 61, 60, 351, - /* 200 */ 352, 353, 354, 355, 4, 113, 376, 316, 76, 454, - /* 210 */ 454, 92, 128, 127, 141, 140, 139, 122, 89, 105, - /* 220 */ 118, 106, 106, 106, 92, 76, 31, 30, 76, 76, - /* 230 */ 6, 373, 359, 36, 35, 372, 449, 76, 88, 88, - /* 240 */ 92, 128, 127, 141, 140, 139, 122, 89, 105, 118, - /* 250 */ 106, 106, 106, 92, 76, 348, 132, 76, 76, 11, - /* 260 */ 88, 7, 28, 63, 320, 349, 74, 319, 242, 360, - /* 270 */ 28, 76, 454, 454, 92, 128, 127, 141, 140, 139, - /* 280 */ 122, 89, 105, 118, 106, 106, 106, 92, 76, 358, - /* 290 */ 459, 76, 76, 134, 8, 32, 137, 28, 367, 451, - /* 300 */ 300, 301, 24, 34, 25, 33, 28, 67, 66, 373, - /* 310 */ 373, 373, 70, 69, 68, 65, 64, 62, 61, 60, - /* 320 */ 351, 352, 353, 354, 355, 4, 357, 7, 373, 63, - /* 330 */ 373, 349, 74, 373, 373, 360, 76, 446, 446, 92, - /* 340 */ 128, 127, 141, 140, 139, 122, 89, 105, 118, 106, - /* 350 */ 106, 106, 92, 76, 306, 373, 76, 76, 373, 373, - /* 360 */ 373, 373, 373, 116, 373, 373, 373, 373, 373, 373, - /* 370 */ 373, 373, 7, 67, 66, 373, 349, 74, 70, 69, - /* 380 */ 68, 65, 64, 62, 61, 60, 351, 352, 353, 354, - /* 390 */ 355, 4, 356, 7, 373, 63, 373, 349, 74, 29, - /* 400 */ 120, 359, 373, 373, 76, 120, 120, 92, 128, 127, - /* 410 */ 141, 140, 139, 122, 89, 105, 118, 106, 106, 106, - /* 420 */ 92, 76, 373, 26, 76, 76, 373, 373, 373, 373, - /* 430 */ 373, 351, 352, 353, 354, 355, 4, 373, 373, 67, - /* 440 */ 66, 373, 373, 373, 70, 69, 68, 65, 64, 62, - /* 450 */ 61, 60, 351, 352, 353, 354, 355, 4, 373, 123, - /* 460 */ 373, 373, 373, 76, 123, 123, 92, 128, 127, 141, - /* 470 */ 140, 139, 122, 89, 105, 118, 106, 106, 106, 92, - /* 480 */ 76, 129, 373, 76, 76, 76, 129, 129, 92, 128, - /* 490 */ 127, 141, 140, 139, 122, 89, 105, 118, 106, 106, - /* 500 */ 106, 92, 76, 373, 373, 76, 76, 7, 373, 63, - /* 510 */ 373, 349, 74, 373, 373, 373, 373, 373, 373, 373, - /* 520 */ 373, 373, 373, 373, 76, 500, 500, 92, 128, 127, - /* 530 */ 141, 140, 139, 122, 89, 105, 118, 106, 106, 106, - /* 540 */ 92, 76, 373, 373, 76, 76, 373, 373, 373, 373, - /* 550 */ 373, 373, 373, 67, 66, 373, 373, 373, 70, 69, - /* 560 */ 68, 65, 64, 62, 61, 60, 351, 352, 130, 354, - /* 570 */ 355, 4, 7, 373, 63, 373, 349, 74, 76, 499, - /* 580 */ 499, 92, 128, 127, 141, 140, 139, 122, 89, 105, - /* 590 */ 118, 106, 106, 106, 92, 76, 373, 373, 76, 76, - /* 600 */ 373, 373, 373, 87, 86, 82, 81, 326, 75, 327, - /* 610 */ 85, 84, 146, 9, 373, 72, 373, 373, 67, 66, - /* 620 */ 373, 373, 373, 70, 69, 68, 65, 64, 62, 61, - /* 630 */ 60, 351, 352, 353, 354, 355, 4, 373, 76, 393, - /* 640 */ 393, 92, 128, 127, 141, 140, 139, 122, 89, 105, - /* 650 */ 118, 106, 106, 106, 92, 76, 373, 373, 76, 76, - /* 660 */ 373, 76, 392, 392, 92, 128, 127, 141, 140, 139, - /* 670 */ 122, 89, 105, 118, 106, 106, 106, 92, 76, 373, - /* 680 */ 373, 76, 76, 76, 391, 391, 92, 128, 127, 141, - /* 690 */ 140, 139, 122, 89, 105, 118, 106, 106, 106, 92, - /* 700 */ 76, 373, 373, 76, 76, 373, 373, 373, 76, 390, - /* 710 */ 390, 92, 128, 127, 141, 140, 139, 122, 89, 105, - /* 720 */ 118, 106, 106, 106, 92, 76, 373, 373, 76, 76, - /* 730 */ 76, 389, 389, 92, 128, 127, 141, 140, 139, 122, - /* 740 */ 89, 105, 118, 106, 106, 106, 92, 76, 373, 373, - /* 750 */ 76, 76, 76, 388, 388, 92, 128, 127, 141, 140, - /* 760 */ 139, 122, 89, 105, 118, 106, 106, 106, 92, 76, - /* 770 */ 373, 373, 76, 76, 76, 387, 387, 92, 128, 127, - /* 780 */ 141, 140, 139, 122, 89, 105, 118, 106, 106, 106, - /* 790 */ 92, 76, 373, 373, 76, 76, 76, 386, 386, 92, - /* 800 */ 128, 127, 141, 140, 139, 122, 89, 105, 118, 106, - /* 810 */ 106, 106, 92, 76, 373, 373, 76, 76, 76, 385, - /* 820 */ 385, 92, 128, 127, 141, 140, 139, 122, 89, 105, - /* 830 */ 118, 106, 106, 106, 92, 76, 373, 373, 76, 76, - /* 840 */ 76, 384, 384, 92, 128, 127, 141, 140, 139, 122, - /* 850 */ 89, 105, 118, 106, 106, 106, 92, 76, 373, 373, - /* 860 */ 76, 76, 76, 383, 383, 92, 128, 127, 141, 140, - /* 870 */ 139, 122, 89, 105, 118, 106, 106, 106, 92, 76, - /* 880 */ 373, 373, 76, 76, 76, 447, 447, 92, 128, 127, - /* 890 */ 141, 140, 139, 122, 89, 105, 118, 106, 106, 106, - /* 900 */ 92, 76, 373, 373, 76, 76, 76, 442, 442, 92, - /* 910 */ 128, 127, 141, 140, 139, 122, 89, 105, 118, 106, - /* 920 */ 106, 106, 92, 76, 373, 373, 76, 76, 76, 394, - /* 930 */ 394, 92, 128, 127, 141, 140, 139, 122, 89, 105, - /* 940 */ 118, 106, 106, 106, 92, 76, 373, 373, 76, 76, - /* 950 */ 76, 145, 145, 92, 128, 127, 141, 140, 139, 122, - /* 960 */ 89, 105, 118, 106, 106, 106, 92, 76, 373, 373, - /* 970 */ 76, 76, 76, 382, 382, 92, 128, 127, 141, 140, - /* 980 */ 139, 122, 89, 105, 118, 106, 106, 106, 92, 76, - /* 990 */ 373, 373, 76, 76, 76, 381, 381, 92, 128, 127, - /* 1000 */ 141, 140, 139, 122, 89, 105, 118, 106, 106, 106, - /* 1010 */ 92, 76, 373, 76, 76, 76, 124, 373, 115, 141, - /* 1020 */ 140, 139, 122, 89, 105, 118, 106, 106, 106, 124, - /* 1030 */ 76, 373, 373, 76, 76, 76, 373, 373, 124, 373, - /* 1040 */ 373, 136, 140, 139, 122, 89, 105, 118, 106, 106, - /* 1050 */ 106, 124, 76, 373, 373, 76, 76, 76, 373, 373, - /* 1060 */ 124, 373, 373, 144, 140, 139, 122, 89, 105, 118, - /* 1070 */ 106, 106, 106, 124, 76, 373, 373, 76, 76, 76, - /* 1080 */ 373, 373, 124, 373, 373, 373, 143, 139, 122, 89, - /* 1090 */ 105, 118, 106, 106, 106, 124, 76, 373, 76, 76, - /* 1100 */ 76, 124, 373, 373, 373, 373, 142, 122, 89, 105, - /* 1110 */ 118, 106, 106, 106, 124, 76, 373, 373, 76, 76, - /* 1120 */ 373, 373, 373, 373, 27, 22, 21, 20, 19, 18, - /* 1130 */ 17, 16, 15, 14, 13, 12, 76, 373, 373, 124, - /* 1140 */ 373, 373, 373, 373, 373, 126, 89, 105, 118, 106, - /* 1150 */ 106, 106, 124, 76, 373, 373, 76, 76, 373, 76, - /* 1160 */ 373, 373, 124, 373, 373, 373, 373, 300, 301, 90, - /* 1170 */ 105, 118, 106, 106, 106, 124, 76, 373, 76, 76, - /* 1180 */ 76, 124, 373, 373, 373, 373, 373, 373, 91, 105, - /* 1190 */ 118, 106, 106, 106, 124, 76, 373, 373, 76, 76, - /* 1200 */ 458, 373, 373, 87, 86, 82, 81, 326, 75, 373, - /* 1210 */ 85, 84, 146, 9, 76, 72, 373, 124, 373, 373, - /* 1220 */ 373, 373, 373, 373, 373, 93, 118, 106, 106, 106, - /* 1230 */ 124, 76, 373, 76, 76, 76, 124, 373, 373, 373, - /* 1240 */ 373, 373, 373, 373, 94, 118, 106, 106, 106, 124, - /* 1250 */ 76, 373, 76, 76, 76, 124, 373, 373, 373, 373, - /* 1260 */ 373, 373, 373, 95, 118, 106, 106, 106, 124, 76, - /* 1270 */ 373, 373, 76, 76, 76, 373, 373, 124, 373, 373, - /* 1280 */ 373, 373, 373, 373, 373, 96, 118, 106, 106, 106, - /* 1290 */ 124, 76, 373, 76, 76, 76, 124, 373, 373, 373, - /* 1300 */ 373, 373, 373, 373, 97, 118, 106, 106, 106, 124, - /* 1310 */ 76, 373, 76, 76, 76, 124, 373, 373, 373, 373, - /* 1320 */ 373, 373, 373, 98, 118, 106, 106, 106, 124, 76, - /* 1330 */ 373, 76, 76, 76, 124, 373, 373, 373, 373, 373, - /* 1340 */ 373, 373, 99, 118, 106, 106, 106, 124, 76, 373, - /* 1350 */ 76, 76, 76, 124, 373, 373, 373, 373, 373, 373, - /* 1360 */ 373, 100, 118, 106, 106, 106, 124, 76, 373, 373, - /* 1370 */ 76, 76, 76, 373, 373, 124, 373, 373, 373, 373, - /* 1380 */ 373, 373, 373, 101, 118, 106, 106, 106, 124, 76, - /* 1390 */ 373, 76, 76, 76, 124, 373, 373, 373, 373, 373, - /* 1400 */ 373, 373, 102, 118, 106, 106, 106, 124, 76, 373, - /* 1410 */ 76, 76, 76, 124, 373, 373, 373, 373, 373, 373, - /* 1420 */ 373, 103, 118, 106, 106, 106, 124, 76, 373, 76, - /* 1430 */ 76, 76, 124, 373, 373, 373, 373, 373, 373, 373, - /* 1440 */ 104, 118, 106, 106, 106, 124, 76, 373, 76, 76, - /* 1450 */ 76, 124, 373, 373, 373, 373, 373, 373, 373, 107, - /* 1460 */ 118, 106, 106, 106, 124, 76, 373, 373, 76, 76, - /* 1470 */ 76, 373, 373, 124, 373, 373, 373, 373, 373, 373, - /* 1480 */ 373, 109, 118, 106, 106, 106, 124, 76, 373, 76, - /* 1490 */ 76, 76, 124, 373, 373, 373, 373, 373, 373, 373, - /* 1500 */ 111, 118, 106, 106, 106, 124, 76, 373, 76, 76, - /* 1510 */ 76, 124, 373, 373, 373, 373, 373, 373, 373, 373, - /* 1520 */ 119, 106, 106, 106, 124, 76, 373, 76, 76, 76, - /* 1530 */ 124, 373, 373, 373, 373, 373, 373, 373, 373, 121, - /* 1540 */ 106, 106, 106, 124, 76, 373, 76, 76, 76, 124, - /* 1550 */ 373, 373, 373, 376, 76, 373, 373, 124, 125, 106, - /* 1560 */ 106, 106, 124, 76, 373, 373, 76, 76, 433, 433, - /* 1570 */ 124, 76, 373, 373, 76, 76, 76, 373, 373, 124, - /* 1580 */ 373, 373, 373, 373, 373, 76, 373, 373, 124, 108, - /* 1590 */ 108, 108, 124, 76, 373, 373, 76, 76, 110, 110, - /* 1600 */ 110, 124, 76, 373, 373, 76, 76, 76, 373, 373, - /* 1610 */ 124, 373, 373, 373, 373, 76, 373, 373, 124, 373, - /* 1620 */ 373, 425, 425, 124, 76, 373, 373, 76, 76, 424, - /* 1630 */ 424, 124, 76, 373, 76, 76, 76, 124, 373, 373, - /* 1640 */ 373, 373, 76, 373, 373, 124, 373, 373, 436, 436, - /* 1650 */ 124, 76, 373, 373, 76, 76, 435, 435, 124, 76, - /* 1660 */ 373, 76, 76, 76, 124, 373, 373, 373, 373, 373, - /* 1670 */ 76, 373, 373, 124, 373, 434, 434, 124, 76, 373, - /* 1680 */ 373, 76, 76, 373, 433, 433, 124, 76, 373, 373, - /* 1690 */ 76, 76, 76, 373, 373, 124, 373, 373, 373, 373, - /* 1700 */ 76, 373, 373, 124, 373, 373, 432, 432, 124, 76, - /* 1710 */ 373, 373, 76, 76, 431, 431, 124, 76, 373, 76, - /* 1720 */ 76, 76, 124, 373, 373, 373, 373, 76, 373, 373, - /* 1730 */ 124, 373, 373, 430, 430, 124, 76, 373, 373, 76, - /* 1740 */ 76, 429, 429, 124, 76, 373, 76, 76, 76, 124, - /* 1750 */ 373, 373, 373, 373, 373, 76, 373, 373, 124, 373, - /* 1760 */ 428, 428, 124, 76, 373, 373, 76, 76, 373, 427, - /* 1770 */ 427, 124, 76, 373, 373, 76, 76, 76, 373, 373, - /* 1780 */ 124, 373, 373, 373, 373, 76, 373, 373, 124, 373, - /* 1790 */ 373, 426, 426, 124, 76, 373, 373, 76, 76, 423, - /* 1800 */ 423, 124, 76, 373, 373, 76, 76, + /* 0 */ 374, 3, 73, 117, 117, 138, 378, 326, 2, 377, + /* 10 */ 55, 84, 131, 1, 133, 72, 372, 80, 114, 10, + /* 20 */ 383, 80, 76, 114, 114, 92, 128, 127, 141, 140, + /* 30 */ 139, 122, 89, 105, 118, 106, 106, 106, 92, 76, + /* 40 */ 383, 383, 76, 76, 326, 75, 381, 85, 84, 146, + /* 50 */ 9, 380, 72, 464, 67, 66, 54, 53, 52, 70, + /* 60 */ 69, 68, 65, 64, 62, 61, 60, 351, 352, 353, + /* 70 */ 354, 355, 4, 129, 71, 59, 58, 76, 129, 129, + /* 80 */ 92, 128, 127, 141, 140, 139, 122, 89, 105, 118, + /* 90 */ 106, 106, 106, 92, 76, 79, 463, 76, 76, 79, + /* 100 */ 366, 117, 117, 138, 379, 326, 2, 77, 55, 84, + /* 110 */ 131, 1, 5, 72, 79, 120, 112, 506, 79, 76, + /* 120 */ 120, 120, 92, 128, 127, 141, 140, 139, 122, 89, + /* 130 */ 105, 118, 106, 106, 106, 92, 76, 458, 135, 76, + /* 140 */ 76, 7, 303, 63, 78, 349, 74, 112, 135, 442, + /* 150 */ 486, 376, 67, 66, 505, 138, 375, 70, 69, 68, + /* 160 */ 65, 64, 62, 61, 60, 351, 352, 353, 354, 355, + /* 170 */ 4, 51, 50, 49, 48, 47, 46, 45, 44, 43, + /* 180 */ 42, 41, 40, 39, 38, 37, 83, 67, 66, 315, + /* 190 */ 57, 56, 70, 69, 68, 65, 64, 62, 61, 60, + /* 200 */ 351, 352, 353, 354, 355, 4, 113, 320, 316, 76, + /* 210 */ 457, 457, 92, 128, 127, 141, 140, 139, 122, 89, + /* 220 */ 105, 118, 106, 106, 106, 92, 76, 31, 30, 76, + /* 230 */ 76, 7, 132, 63, 6, 349, 74, 452, 319, 360, + /* 240 */ 134, 76, 88, 88, 92, 128, 127, 141, 140, 139, + /* 250 */ 122, 89, 105, 118, 106, 106, 106, 92, 76, 462, + /* 260 */ 32, 76, 76, 11, 88, 7, 242, 63, 28, 349, + /* 270 */ 74, 24, 307, 360, 359, 28, 7, 67, 66, 23, + /* 280 */ 349, 74, 70, 69, 68, 65, 64, 62, 61, 60, + /* 290 */ 351, 352, 353, 354, 355, 4, 357, 7, 8, 63, + /* 300 */ 137, 349, 74, 348, 367, 359, 33, 36, 35, 29, + /* 310 */ 28, 67, 66, 300, 301, 34, 70, 69, 68, 65, + /* 320 */ 64, 62, 61, 60, 351, 352, 353, 354, 355, 4, + /* 330 */ 356, 358, 25, 26, 28, 351, 352, 353, 354, 355, + /* 340 */ 4, 373, 373, 67, 66, 373, 373, 373, 70, 69, + /* 350 */ 68, 65, 64, 62, 61, 60, 351, 352, 353, 354, + /* 360 */ 355, 4, 76, 457, 457, 92, 128, 127, 141, 140, + /* 370 */ 139, 122, 89, 105, 118, 106, 106, 106, 92, 76, + /* 380 */ 373, 373, 76, 76, 373, 373, 373, 373, 373, 373, + /* 390 */ 454, 306, 373, 373, 373, 76, 449, 449, 92, 128, + /* 400 */ 127, 141, 140, 139, 122, 89, 105, 118, 106, 106, + /* 410 */ 106, 92, 76, 373, 373, 76, 76, 373, 373, 373, + /* 420 */ 373, 373, 116, 120, 373, 373, 373, 76, 120, 120, + /* 430 */ 92, 128, 127, 141, 140, 139, 122, 89, 105, 118, + /* 440 */ 106, 106, 106, 92, 76, 123, 373, 76, 76, 76, + /* 450 */ 123, 123, 92, 128, 127, 141, 140, 139, 122, 89, + /* 460 */ 105, 118, 106, 106, 106, 92, 76, 373, 373, 76, + /* 470 */ 76, 373, 7, 373, 63, 129, 349, 74, 373, 76, + /* 480 */ 129, 129, 92, 128, 127, 141, 140, 139, 122, 89, + /* 490 */ 105, 118, 106, 106, 106, 92, 76, 373, 373, 76, + /* 500 */ 76, 7, 373, 63, 373, 349, 74, 373, 373, 373, + /* 510 */ 373, 373, 373, 373, 373, 373, 373, 373, 67, 66, + /* 520 */ 373, 373, 373, 70, 69, 68, 65, 64, 62, 61, + /* 530 */ 60, 351, 352, 130, 354, 355, 4, 373, 373, 373, + /* 540 */ 373, 373, 373, 373, 373, 373, 373, 67, 66, 373, + /* 550 */ 373, 373, 70, 69, 68, 65, 64, 62, 61, 60, + /* 560 */ 351, 352, 353, 354, 355, 4, 76, 503, 503, 92, + /* 570 */ 128, 127, 141, 140, 139, 122, 89, 105, 118, 106, + /* 580 */ 106, 106, 92, 76, 373, 373, 76, 76, 373, 76, + /* 590 */ 502, 502, 92, 128, 127, 141, 140, 139, 122, 89, + /* 600 */ 105, 118, 106, 106, 106, 92, 76, 373, 373, 76, + /* 610 */ 76, 76, 396, 396, 92, 128, 127, 141, 140, 139, + /* 620 */ 122, 89, 105, 118, 106, 106, 106, 92, 76, 373, + /* 630 */ 373, 76, 76, 373, 373, 373, 76, 395, 395, 92, + /* 640 */ 128, 127, 141, 140, 139, 122, 89, 105, 118, 106, + /* 650 */ 106, 106, 92, 76, 373, 373, 76, 76, 76, 394, + /* 660 */ 394, 92, 128, 127, 141, 140, 139, 122, 89, 105, + /* 670 */ 118, 106, 106, 106, 92, 76, 373, 373, 76, 76, + /* 680 */ 76, 393, 393, 92, 128, 127, 141, 140, 139, 122, + /* 690 */ 89, 105, 118, 106, 106, 106, 92, 76, 373, 373, + /* 700 */ 76, 76, 76, 392, 392, 92, 128, 127, 141, 140, + /* 710 */ 139, 122, 89, 105, 118, 106, 106, 106, 92, 76, + /* 720 */ 373, 373, 76, 76, 76, 391, 391, 92, 128, 127, + /* 730 */ 141, 140, 139, 122, 89, 105, 118, 106, 106, 106, + /* 740 */ 92, 76, 373, 373, 76, 76, 76, 390, 390, 92, + /* 750 */ 128, 127, 141, 140, 139, 122, 89, 105, 118, 106, + /* 760 */ 106, 106, 92, 76, 373, 373, 76, 76, 76, 389, + /* 770 */ 389, 92, 128, 127, 141, 140, 139, 122, 89, 105, + /* 780 */ 118, 106, 106, 106, 92, 76, 373, 373, 76, 76, + /* 790 */ 76, 388, 388, 92, 128, 127, 141, 140, 139, 122, + /* 800 */ 89, 105, 118, 106, 106, 106, 92, 76, 373, 373, + /* 810 */ 76, 76, 76, 387, 387, 92, 128, 127, 141, 140, + /* 820 */ 139, 122, 89, 105, 118, 106, 106, 106, 92, 76, + /* 830 */ 373, 373, 76, 76, 76, 386, 386, 92, 128, 127, + /* 840 */ 141, 140, 139, 122, 89, 105, 118, 106, 106, 106, + /* 850 */ 92, 76, 373, 373, 76, 76, 76, 450, 450, 92, + /* 860 */ 128, 127, 141, 140, 139, 122, 89, 105, 118, 106, + /* 870 */ 106, 106, 92, 76, 373, 373, 76, 76, 76, 445, + /* 880 */ 445, 92, 128, 127, 141, 140, 139, 122, 89, 105, + /* 890 */ 118, 106, 106, 106, 92, 76, 373, 373, 76, 76, + /* 900 */ 76, 397, 397, 92, 128, 127, 141, 140, 139, 122, + /* 910 */ 89, 105, 118, 106, 106, 106, 92, 76, 373, 373, + /* 920 */ 76, 76, 76, 145, 145, 92, 128, 127, 141, 140, + /* 930 */ 139, 122, 89, 105, 118, 106, 106, 106, 92, 76, + /* 940 */ 373, 373, 76, 76, 76, 385, 385, 92, 128, 127, + /* 950 */ 141, 140, 139, 122, 89, 105, 118, 106, 106, 106, + /* 960 */ 92, 76, 373, 373, 76, 76, 76, 384, 384, 92, + /* 970 */ 128, 127, 141, 140, 139, 122, 89, 105, 118, 106, + /* 980 */ 106, 106, 92, 76, 373, 76, 76, 76, 124, 373, + /* 990 */ 115, 141, 140, 139, 122, 89, 105, 118, 106, 106, + /* 1000 */ 106, 124, 76, 373, 76, 76, 76, 124, 373, 373, + /* 1010 */ 136, 140, 139, 122, 89, 105, 118, 106, 106, 106, + /* 1020 */ 124, 76, 373, 76, 76, 76, 124, 373, 373, 144, + /* 1030 */ 140, 139, 122, 89, 105, 118, 106, 106, 106, 124, + /* 1040 */ 76, 373, 76, 76, 76, 124, 373, 373, 373, 143, + /* 1050 */ 139, 122, 89, 105, 118, 106, 106, 106, 124, 76, + /* 1060 */ 373, 76, 76, 76, 124, 373, 373, 373, 373, 142, + /* 1070 */ 122, 89, 105, 118, 106, 106, 106, 124, 76, 373, + /* 1080 */ 373, 76, 76, 373, 373, 373, 373, 27, 22, 21, + /* 1090 */ 20, 19, 18, 17, 16, 15, 14, 13, 12, 76, + /* 1100 */ 373, 373, 124, 373, 373, 373, 373, 373, 126, 89, + /* 1110 */ 105, 118, 106, 106, 106, 124, 76, 373, 373, 76, + /* 1120 */ 76, 373, 76, 373, 373, 124, 373, 373, 373, 373, + /* 1130 */ 300, 301, 90, 105, 118, 106, 106, 106, 124, 76, + /* 1140 */ 373, 76, 76, 76, 124, 373, 373, 373, 373, 373, + /* 1150 */ 373, 91, 105, 118, 106, 106, 106, 124, 76, 373, + /* 1160 */ 373, 76, 76, 373, 373, 87, 86, 82, 81, 326, + /* 1170 */ 75, 327, 85, 84, 146, 9, 461, 72, 373, 87, + /* 1180 */ 86, 82, 81, 326, 75, 373, 85, 84, 146, 9, + /* 1190 */ 373, 72, 76, 373, 373, 124, 373, 373, 373, 373, + /* 1200 */ 373, 373, 373, 93, 118, 106, 106, 106, 124, 76, + /* 1210 */ 373, 373, 76, 76, 76, 373, 373, 124, 373, 373, + /* 1220 */ 373, 373, 373, 373, 373, 94, 118, 106, 106, 106, + /* 1230 */ 124, 76, 373, 373, 76, 76, 76, 373, 373, 124, + /* 1240 */ 373, 373, 373, 373, 373, 373, 373, 95, 118, 106, + /* 1250 */ 106, 106, 124, 76, 373, 76, 76, 76, 124, 373, + /* 1260 */ 373, 373, 373, 373, 373, 373, 96, 118, 106, 106, + /* 1270 */ 106, 124, 76, 373, 373, 76, 76, 373, 373, 76, + /* 1280 */ 373, 373, 124, 373, 373, 373, 373, 373, 373, 373, + /* 1290 */ 97, 118, 106, 106, 106, 124, 76, 373, 76, 76, + /* 1300 */ 76, 124, 373, 373, 373, 373, 373, 373, 373, 98, + /* 1310 */ 118, 106, 106, 106, 124, 76, 373, 373, 76, 76, + /* 1320 */ 76, 373, 373, 124, 373, 373, 373, 373, 373, 373, + /* 1330 */ 373, 99, 118, 106, 106, 106, 124, 76, 373, 76, + /* 1340 */ 76, 76, 124, 373, 373, 373, 373, 373, 373, 373, + /* 1350 */ 100, 118, 106, 106, 106, 124, 76, 373, 373, 76, + /* 1360 */ 76, 373, 373, 76, 373, 373, 124, 373, 373, 373, + /* 1370 */ 373, 373, 373, 373, 101, 118, 106, 106, 106, 124, + /* 1380 */ 76, 373, 76, 76, 76, 124, 373, 373, 373, 373, + /* 1390 */ 373, 373, 373, 102, 118, 106, 106, 106, 124, 76, + /* 1400 */ 373, 373, 76, 76, 76, 373, 373, 124, 373, 373, + /* 1410 */ 373, 373, 373, 373, 373, 103, 118, 106, 106, 106, + /* 1420 */ 124, 76, 373, 76, 76, 76, 124, 373, 373, 373, + /* 1430 */ 373, 373, 373, 373, 104, 118, 106, 106, 106, 124, + /* 1440 */ 76, 373, 373, 76, 76, 373, 373, 76, 373, 373, + /* 1450 */ 124, 373, 373, 373, 373, 373, 373, 373, 107, 118, + /* 1460 */ 106, 106, 106, 124, 76, 373, 76, 76, 76, 124, + /* 1470 */ 373, 373, 373, 373, 373, 373, 373, 109, 118, 106, + /* 1480 */ 106, 106, 124, 76, 373, 373, 76, 76, 76, 373, + /* 1490 */ 373, 124, 373, 373, 373, 373, 373, 373, 373, 111, + /* 1500 */ 118, 106, 106, 106, 124, 76, 373, 76, 76, 76, + /* 1510 */ 124, 373, 373, 373, 373, 373, 373, 373, 373, 119, + /* 1520 */ 106, 106, 106, 124, 76, 373, 373, 76, 76, 373, + /* 1530 */ 373, 76, 373, 373, 124, 373, 373, 373, 373, 373, + /* 1540 */ 373, 373, 373, 121, 106, 106, 106, 124, 76, 373, + /* 1550 */ 76, 76, 76, 124, 373, 373, 373, 373, 373, 373, + /* 1560 */ 373, 373, 125, 106, 106, 106, 124, 76, 373, 373, + /* 1570 */ 76, 76, 373, 373, 379, 76, 373, 373, 124, 373, + /* 1580 */ 373, 373, 373, 373, 76, 373, 373, 124, 373, 436, + /* 1590 */ 436, 124, 76, 373, 373, 76, 76, 108, 108, 108, + /* 1600 */ 124, 76, 373, 76, 76, 76, 124, 373, 373, 373, + /* 1610 */ 373, 76, 373, 373, 124, 373, 110, 110, 110, 124, + /* 1620 */ 76, 373, 373, 76, 76, 428, 428, 124, 76, 373, + /* 1630 */ 76, 76, 76, 124, 373, 373, 373, 373, 373, 373, + /* 1640 */ 373, 373, 373, 373, 427, 427, 124, 76, 373, 76, + /* 1650 */ 76, 76, 124, 373, 373, 373, 373, 373, 76, 373, + /* 1660 */ 373, 124, 373, 439, 439, 124, 76, 373, 76, 76, + /* 1670 */ 76, 124, 438, 438, 124, 76, 373, 373, 76, 76, + /* 1680 */ 373, 373, 437, 437, 124, 76, 373, 76, 76, 76, + /* 1690 */ 124, 373, 373, 373, 373, 76, 373, 373, 124, 373, + /* 1700 */ 373, 436, 436, 124, 76, 373, 373, 76, 76, 435, + /* 1710 */ 435, 124, 76, 373, 76, 76, 76, 124, 373, 373, + /* 1720 */ 373, 373, 373, 373, 373, 373, 373, 373, 434, 434, + /* 1730 */ 124, 76, 373, 76, 76, 76, 124, 373, 373, 373, + /* 1740 */ 373, 373, 76, 373, 373, 124, 373, 433, 433, 124, + /* 1750 */ 76, 373, 76, 76, 76, 124, 432, 432, 124, 76, + /* 1760 */ 373, 373, 76, 76, 373, 373, 431, 431, 124, 76, + /* 1770 */ 373, 76, 76, 76, 124, 373, 373, 373, 373, 76, + /* 1780 */ 373, 373, 124, 373, 373, 430, 430, 124, 76, 373, + /* 1790 */ 373, 76, 76, 429, 429, 124, 76, 373, 76, 76, + /* 1800 */ 76, 124, 373, 373, 373, 373, 373, 373, 373, 373, + /* 1810 */ 373, 373, 426, 426, 124, 76, 373, 373, 76, 76, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 1, 2, 108, 109, 110, 12, 7, 8, 69, 10, - /* 10 */ 11, 12, 13, 83, 15, 78, 79, 80, 106, 84, - /* 20 */ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - /* 30 */ 93, 94, 95, 96, 97, 98, 99, 100, 101, 104, - /* 40 */ 105, 104, 105, 7, 8, 0, 10, 11, 12, 13, - /* 50 */ 83, 15, 83, 54, 55, 51, 52, 53, 59, 60, - /* 60 */ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - /* 70 */ 71, 72, 80, 56, 57, 58, 84, 85, 86, 87, - /* 80 */ 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - /* 90 */ 98, 99, 100, 101, 79, 0, 104, 105, 83, 54, - /* 100 */ 108, 109, 110, 83, 7, 8, 30, 10, 11, 12, - /* 110 */ 13, 16, 15, 79, 80, 82, 11, 83, 84, 85, - /* 120 */ 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - /* 130 */ 96, 97, 98, 99, 100, 101, 113, 114, 104, 105, - /* 140 */ 8, 14, 10, 16, 12, 13, 113, 114, 9, 102, - /* 150 */ 103, 54, 55, 109, 110, 16, 59, 60, 61, 62, - /* 160 */ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - /* 170 */ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - /* 180 */ 46, 47, 48, 49, 50, 83, 54, 55, 56, 54, - /* 190 */ 55, 59, 60, 61, 62, 63, 64, 65, 66, 67, - /* 200 */ 68, 69, 70, 71, 72, 81, 83, 75, 84, 85, - /* 210 */ 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - /* 220 */ 96, 97, 98, 99, 100, 101, 3, 4, 104, 105, - /* 230 */ 8, 83, 16, 34, 35, 83, 112, 84, 85, 86, - /* 240 */ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - /* 250 */ 97, 98, 99, 100, 101, 9, 41, 104, 105, 106, - /* 260 */ 107, 8, 16, 10, 69, 12, 13, 67, 14, 16, - /* 270 */ 16, 84, 85, 86, 87, 88, 89, 90, 91, 92, - /* 280 */ 93, 94, 95, 96, 97, 98, 99, 100, 101, 73, - /* 290 */ 0, 104, 105, 56, 72, 31, 74, 16, 12, 112, - /* 300 */ 60, 61, 30, 33, 30, 32, 16, 54, 55, 115, - /* 310 */ 115, 115, 59, 60, 61, 62, 63, 64, 65, 66, - /* 320 */ 67, 68, 69, 70, 71, 72, 73, 8, 115, 10, - /* 330 */ 115, 12, 13, 115, 115, 16, 84, 85, 86, 87, - /* 340 */ 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - /* 350 */ 98, 99, 100, 101, 73, 115, 104, 105, 115, 115, - /* 360 */ 115, 115, 115, 111, 115, 115, 115, 115, 115, 115, - /* 370 */ 115, 115, 8, 54, 55, 115, 12, 13, 59, 60, - /* 380 */ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - /* 390 */ 71, 72, 73, 8, 115, 10, 115, 12, 13, 5, - /* 400 */ 80, 16, 115, 115, 84, 85, 86, 87, 88, 89, - /* 410 */ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - /* 420 */ 100, 101, 115, 29, 104, 105, 115, 115, 115, 115, - /* 430 */ 115, 67, 68, 69, 70, 71, 72, 115, 115, 54, - /* 440 */ 55, 115, 115, 115, 59, 60, 61, 62, 63, 64, - /* 450 */ 65, 66, 67, 68, 69, 70, 71, 72, 115, 80, - /* 460 */ 115, 115, 115, 84, 85, 86, 87, 88, 89, 90, - /* 470 */ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - /* 480 */ 101, 80, 115, 104, 105, 84, 85, 86, 87, 88, - /* 490 */ 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - /* 500 */ 99, 100, 101, 115, 115, 104, 105, 8, 115, 10, - /* 510 */ 115, 12, 13, 115, 115, 115, 115, 115, 115, 115, - /* 520 */ 115, 115, 115, 115, 84, 85, 86, 87, 88, 89, - /* 530 */ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - /* 540 */ 100, 101, 115, 115, 104, 105, 115, 115, 115, 115, - /* 550 */ 115, 115, 115, 54, 55, 115, 115, 115, 59, 60, - /* 560 */ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - /* 570 */ 71, 72, 8, 115, 10, 115, 12, 13, 84, 85, - /* 580 */ 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - /* 590 */ 96, 97, 98, 99, 100, 101, 115, 115, 104, 105, - /* 600 */ 115, 115, 115, 3, 4, 5, 6, 7, 8, 9, - /* 610 */ 10, 11, 12, 13, 115, 15, 115, 115, 54, 55, - /* 620 */ 115, 115, 115, 59, 60, 61, 62, 63, 64, 65, - /* 630 */ 66, 67, 68, 69, 70, 71, 72, 115, 84, 85, - /* 640 */ 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - /* 650 */ 96, 97, 98, 99, 100, 101, 115, 115, 104, 105, - /* 660 */ 115, 84, 85, 86, 87, 88, 89, 90, 91, 92, - /* 670 */ 93, 94, 95, 96, 97, 98, 99, 100, 101, 115, - /* 680 */ 115, 104, 105, 84, 85, 86, 87, 88, 89, 90, - /* 690 */ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - /* 700 */ 101, 115, 115, 104, 105, 115, 115, 115, 84, 85, - /* 710 */ 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - /* 720 */ 96, 97, 98, 99, 100, 101, 115, 115, 104, 105, - /* 730 */ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - /* 740 */ 94, 95, 96, 97, 98, 99, 100, 101, 115, 115, - /* 750 */ 104, 105, 84, 85, 86, 87, 88, 89, 90, 91, - /* 760 */ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - /* 770 */ 115, 115, 104, 105, 84, 85, 86, 87, 88, 89, - /* 780 */ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - /* 790 */ 100, 101, 115, 115, 104, 105, 84, 85, 86, 87, - /* 800 */ 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - /* 810 */ 98, 99, 100, 101, 115, 115, 104, 105, 84, 85, - /* 820 */ 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - /* 830 */ 96, 97, 98, 99, 100, 101, 115, 115, 104, 105, - /* 840 */ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - /* 850 */ 94, 95, 96, 97, 98, 99, 100, 101, 115, 115, - /* 860 */ 104, 105, 84, 85, 86, 87, 88, 89, 90, 91, - /* 870 */ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - /* 880 */ 115, 115, 104, 105, 84, 85, 86, 87, 88, 89, - /* 890 */ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - /* 900 */ 100, 101, 115, 115, 104, 105, 84, 85, 86, 87, - /* 910 */ 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - /* 920 */ 98, 99, 100, 101, 115, 115, 104, 105, 84, 85, - /* 930 */ 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - /* 940 */ 96, 97, 98, 99, 100, 101, 115, 115, 104, 105, - /* 950 */ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - /* 960 */ 94, 95, 96, 97, 98, 99, 100, 101, 115, 115, - /* 970 */ 104, 105, 84, 85, 86, 87, 88, 89, 90, 91, - /* 980 */ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - /* 990 */ 115, 115, 104, 105, 84, 85, 86, 87, 88, 89, - /* 1000 */ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - /* 1010 */ 100, 101, 115, 84, 104, 105, 87, 115, 89, 90, - /* 1020 */ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - /* 1030 */ 101, 115, 115, 104, 105, 84, 115, 115, 87, 115, - /* 1040 */ 115, 90, 91, 92, 93, 94, 95, 96, 97, 98, - /* 1050 */ 99, 100, 101, 115, 115, 104, 105, 84, 115, 115, - /* 1060 */ 87, 115, 115, 90, 91, 92, 93, 94, 95, 96, - /* 1070 */ 97, 98, 99, 100, 101, 115, 115, 104, 105, 84, - /* 1080 */ 115, 115, 87, 115, 115, 115, 91, 92, 93, 94, - /* 1090 */ 95, 96, 97, 98, 99, 100, 101, 115, 84, 104, - /* 1100 */ 105, 87, 115, 115, 115, 115, 92, 93, 94, 95, - /* 1110 */ 96, 97, 98, 99, 100, 101, 115, 115, 104, 105, - /* 1120 */ 115, 115, 115, 115, 17, 18, 19, 20, 21, 22, - /* 1130 */ 23, 24, 25, 26, 27, 28, 84, 115, 115, 87, - /* 1140 */ 115, 115, 115, 115, 115, 93, 94, 95, 96, 97, - /* 1150 */ 98, 99, 100, 101, 115, 115, 104, 105, 115, 84, - /* 1160 */ 115, 115, 87, 115, 115, 115, 115, 60, 61, 94, - /* 1170 */ 95, 96, 97, 98, 99, 100, 101, 115, 84, 104, - /* 1180 */ 105, 87, 115, 115, 115, 115, 115, 115, 94, 95, - /* 1190 */ 96, 97, 98, 99, 100, 101, 115, 115, 104, 105, - /* 1200 */ 0, 115, 115, 3, 4, 5, 6, 7, 8, 115, - /* 1210 */ 10, 11, 12, 13, 84, 15, 115, 87, 115, 115, - /* 1220 */ 115, 115, 115, 115, 115, 95, 96, 97, 98, 99, - /* 1230 */ 100, 101, 115, 84, 104, 105, 87, 115, 115, 115, - /* 1240 */ 115, 115, 115, 115, 95, 96, 97, 98, 99, 100, - /* 1250 */ 101, 115, 84, 104, 105, 87, 115, 115, 115, 115, - /* 1260 */ 115, 115, 115, 95, 96, 97, 98, 99, 100, 101, - /* 1270 */ 115, 115, 104, 105, 84, 115, 115, 87, 115, 115, - /* 1280 */ 115, 115, 115, 115, 115, 95, 96, 97, 98, 99, - /* 1290 */ 100, 101, 115, 84, 104, 105, 87, 115, 115, 115, - /* 1300 */ 115, 115, 115, 115, 95, 96, 97, 98, 99, 100, - /* 1310 */ 101, 115, 84, 104, 105, 87, 115, 115, 115, 115, - /* 1320 */ 115, 115, 115, 95, 96, 97, 98, 99, 100, 101, - /* 1330 */ 115, 84, 104, 105, 87, 115, 115, 115, 115, 115, - /* 1340 */ 115, 115, 95, 96, 97, 98, 99, 100, 101, 115, - /* 1350 */ 84, 104, 105, 87, 115, 115, 115, 115, 115, 115, - /* 1360 */ 115, 95, 96, 97, 98, 99, 100, 101, 115, 115, - /* 1370 */ 104, 105, 84, 115, 115, 87, 115, 115, 115, 115, - /* 1380 */ 115, 115, 115, 95, 96, 97, 98, 99, 100, 101, - /* 1390 */ 115, 84, 104, 105, 87, 115, 115, 115, 115, 115, - /* 1400 */ 115, 115, 95, 96, 97, 98, 99, 100, 101, 115, - /* 1410 */ 84, 104, 105, 87, 115, 115, 115, 115, 115, 115, - /* 1420 */ 115, 95, 96, 97, 98, 99, 100, 101, 115, 84, - /* 1430 */ 104, 105, 87, 115, 115, 115, 115, 115, 115, 115, - /* 1440 */ 95, 96, 97, 98, 99, 100, 101, 115, 84, 104, - /* 1450 */ 105, 87, 115, 115, 115, 115, 115, 115, 115, 95, - /* 1460 */ 96, 97, 98, 99, 100, 101, 115, 115, 104, 105, - /* 1470 */ 84, 115, 115, 87, 115, 115, 115, 115, 115, 115, - /* 1480 */ 115, 95, 96, 97, 98, 99, 100, 101, 115, 84, - /* 1490 */ 104, 105, 87, 115, 115, 115, 115, 115, 115, 115, - /* 1500 */ 95, 96, 97, 98, 99, 100, 101, 115, 84, 104, - /* 1510 */ 105, 87, 115, 115, 115, 115, 115, 115, 115, 115, - /* 1520 */ 96, 97, 98, 99, 100, 101, 115, 84, 104, 105, - /* 1530 */ 87, 115, 115, 115, 115, 115, 115, 115, 115, 96, - /* 1540 */ 97, 98, 99, 100, 101, 115, 84, 104, 105, 87, - /* 1550 */ 115, 115, 115, 83, 84, 115, 115, 87, 96, 97, - /* 1560 */ 98, 99, 100, 101, 115, 115, 104, 105, 98, 99, - /* 1570 */ 100, 101, 115, 115, 104, 105, 84, 115, 115, 87, - /* 1580 */ 115, 115, 115, 115, 115, 84, 115, 115, 87, 97, - /* 1590 */ 98, 99, 100, 101, 115, 115, 104, 105, 97, 98, - /* 1600 */ 99, 100, 101, 115, 115, 104, 105, 84, 115, 115, - /* 1610 */ 87, 115, 115, 115, 115, 84, 115, 115, 87, 115, - /* 1620 */ 115, 98, 99, 100, 101, 115, 115, 104, 105, 98, - /* 1630 */ 99, 100, 101, 115, 84, 104, 105, 87, 115, 115, - /* 1640 */ 115, 115, 84, 115, 115, 87, 115, 115, 98, 99, - /* 1650 */ 100, 101, 115, 115, 104, 105, 98, 99, 100, 101, - /* 1660 */ 115, 84, 104, 105, 87, 115, 115, 115, 115, 115, - /* 1670 */ 84, 115, 115, 87, 115, 98, 99, 100, 101, 115, - /* 1680 */ 115, 104, 105, 115, 98, 99, 100, 101, 115, 115, - /* 1690 */ 104, 105, 84, 115, 115, 87, 115, 115, 115, 115, - /* 1700 */ 84, 115, 115, 87, 115, 115, 98, 99, 100, 101, - /* 1710 */ 115, 115, 104, 105, 98, 99, 100, 101, 115, 84, - /* 1720 */ 104, 105, 87, 115, 115, 115, 115, 84, 115, 115, - /* 1730 */ 87, 115, 115, 98, 99, 100, 101, 115, 115, 104, - /* 1740 */ 105, 98, 99, 100, 101, 115, 84, 104, 105, 87, - /* 1750 */ 115, 115, 115, 115, 115, 84, 115, 115, 87, 115, - /* 1760 */ 98, 99, 100, 101, 115, 115, 104, 105, 115, 98, - /* 1770 */ 99, 100, 101, 115, 115, 104, 105, 84, 115, 115, - /* 1780 */ 87, 115, 115, 115, 115, 84, 115, 115, 87, 115, - /* 1790 */ 115, 98, 99, 100, 101, 115, 115, 104, 105, 98, - /* 1800 */ 99, 100, 101, 115, 115, 104, 105, + /* 0 */ 82, 1, 2, 107, 108, 109, 82, 7, 8, 82, + /* 10 */ 10, 11, 12, 13, 12, 15, 77, 78, 79, 105, + /* 20 */ 83, 82, 83, 84, 85, 86, 87, 88, 89, 90, + /* 30 */ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + /* 40 */ 103, 104, 103, 104, 7, 8, 82, 10, 11, 12, + /* 50 */ 13, 82, 15, 0, 54, 55, 51, 52, 53, 59, + /* 60 */ 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + /* 70 */ 70, 71, 72, 79, 56, 57, 58, 83, 84, 85, + /* 80 */ 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + /* 90 */ 96, 97, 98, 99, 100, 78, 0, 103, 104, 82, + /* 100 */ 69, 107, 108, 109, 82, 7, 8, 54, 10, 11, + /* 110 */ 12, 13, 16, 15, 78, 79, 81, 30, 82, 83, + /* 120 */ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + /* 130 */ 94, 95, 96, 97, 98, 99, 100, 112, 113, 103, + /* 140 */ 104, 8, 14, 10, 16, 12, 13, 112, 113, 101, + /* 150 */ 102, 82, 54, 55, 108, 109, 82, 59, 60, 61, + /* 160 */ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + /* 170 */ 72, 36, 37, 38, 39, 40, 41, 42, 43, 44, + /* 180 */ 45, 46, 47, 48, 49, 50, 11, 54, 55, 56, + /* 190 */ 54, 55, 59, 60, 61, 62, 63, 64, 65, 66, + /* 200 */ 67, 68, 69, 70, 71, 72, 80, 69, 75, 83, + /* 210 */ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + /* 220 */ 94, 95, 96, 97, 98, 99, 100, 3, 4, 103, + /* 230 */ 104, 8, 41, 10, 8, 12, 13, 111, 67, 16, + /* 240 */ 56, 83, 84, 85, 86, 87, 88, 89, 90, 91, + /* 250 */ 92, 93, 94, 95, 96, 97, 98, 99, 100, 0, + /* 260 */ 31, 103, 104, 105, 106, 8, 14, 10, 16, 12, + /* 270 */ 13, 30, 9, 16, 16, 16, 8, 54, 55, 16, + /* 280 */ 12, 13, 59, 60, 61, 62, 63, 64, 65, 66, + /* 290 */ 67, 68, 69, 70, 71, 72, 73, 8, 72, 10, + /* 300 */ 74, 12, 13, 9, 12, 16, 32, 34, 35, 5, + /* 310 */ 16, 54, 55, 60, 61, 33, 59, 60, 61, 62, + /* 320 */ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + /* 330 */ 73, 73, 30, 29, 16, 67, 68, 69, 70, 71, + /* 340 */ 72, 114, 114, 54, 55, 114, 114, 114, 59, 60, + /* 350 */ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + /* 360 */ 71, 72, 83, 84, 85, 86, 87, 88, 89, 90, + /* 370 */ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + /* 380 */ 114, 114, 103, 104, 114, 114, 114, 114, 114, 114, + /* 390 */ 111, 73, 114, 114, 114, 83, 84, 85, 86, 87, + /* 400 */ 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + /* 410 */ 98, 99, 100, 114, 114, 103, 104, 114, 114, 114, + /* 420 */ 114, 114, 110, 79, 114, 114, 114, 83, 84, 85, + /* 430 */ 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + /* 440 */ 96, 97, 98, 99, 100, 79, 114, 103, 104, 83, + /* 450 */ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + /* 460 */ 94, 95, 96, 97, 98, 99, 100, 114, 114, 103, + /* 470 */ 104, 114, 8, 114, 10, 79, 12, 13, 114, 83, + /* 480 */ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + /* 490 */ 94, 95, 96, 97, 98, 99, 100, 114, 114, 103, + /* 500 */ 104, 8, 114, 10, 114, 12, 13, 114, 114, 114, + /* 510 */ 114, 114, 114, 114, 114, 114, 114, 114, 54, 55, + /* 520 */ 114, 114, 114, 59, 60, 61, 62, 63, 64, 65, + /* 530 */ 66, 67, 68, 69, 70, 71, 72, 114, 114, 114, + /* 540 */ 114, 114, 114, 114, 114, 114, 114, 54, 55, 114, + /* 550 */ 114, 114, 59, 60, 61, 62, 63, 64, 65, 66, + /* 560 */ 67, 68, 69, 70, 71, 72, 83, 84, 85, 86, + /* 570 */ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + /* 580 */ 97, 98, 99, 100, 114, 114, 103, 104, 114, 83, + /* 590 */ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + /* 600 */ 94, 95, 96, 97, 98, 99, 100, 114, 114, 103, + /* 610 */ 104, 83, 84, 85, 86, 87, 88, 89, 90, 91, + /* 620 */ 92, 93, 94, 95, 96, 97, 98, 99, 100, 114, + /* 630 */ 114, 103, 104, 114, 114, 114, 83, 84, 85, 86, + /* 640 */ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + /* 650 */ 97, 98, 99, 100, 114, 114, 103, 104, 83, 84, + /* 660 */ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + /* 670 */ 95, 96, 97, 98, 99, 100, 114, 114, 103, 104, + /* 680 */ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + /* 690 */ 93, 94, 95, 96, 97, 98, 99, 100, 114, 114, + /* 700 */ 103, 104, 83, 84, 85, 86, 87, 88, 89, 90, + /* 710 */ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + /* 720 */ 114, 114, 103, 104, 83, 84, 85, 86, 87, 88, + /* 730 */ 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + /* 740 */ 99, 100, 114, 114, 103, 104, 83, 84, 85, 86, + /* 750 */ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + /* 760 */ 97, 98, 99, 100, 114, 114, 103, 104, 83, 84, + /* 770 */ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + /* 780 */ 95, 96, 97, 98, 99, 100, 114, 114, 103, 104, + /* 790 */ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + /* 800 */ 93, 94, 95, 96, 97, 98, 99, 100, 114, 114, + /* 810 */ 103, 104, 83, 84, 85, 86, 87, 88, 89, 90, + /* 820 */ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + /* 830 */ 114, 114, 103, 104, 83, 84, 85, 86, 87, 88, + /* 840 */ 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + /* 850 */ 99, 100, 114, 114, 103, 104, 83, 84, 85, 86, + /* 860 */ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + /* 870 */ 97, 98, 99, 100, 114, 114, 103, 104, 83, 84, + /* 880 */ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + /* 890 */ 95, 96, 97, 98, 99, 100, 114, 114, 103, 104, + /* 900 */ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + /* 910 */ 93, 94, 95, 96, 97, 98, 99, 100, 114, 114, + /* 920 */ 103, 104, 83, 84, 85, 86, 87, 88, 89, 90, + /* 930 */ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + /* 940 */ 114, 114, 103, 104, 83, 84, 85, 86, 87, 88, + /* 950 */ 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + /* 960 */ 99, 100, 114, 114, 103, 104, 83, 84, 85, 86, + /* 970 */ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + /* 980 */ 97, 98, 99, 100, 114, 83, 103, 104, 86, 114, + /* 990 */ 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + /* 1000 */ 98, 99, 100, 114, 83, 103, 104, 86, 114, 114, + /* 1010 */ 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + /* 1020 */ 99, 100, 114, 83, 103, 104, 86, 114, 114, 89, + /* 1030 */ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + /* 1040 */ 100, 114, 83, 103, 104, 86, 114, 114, 114, 90, + /* 1050 */ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + /* 1060 */ 114, 83, 103, 104, 86, 114, 114, 114, 114, 91, + /* 1070 */ 92, 93, 94, 95, 96, 97, 98, 99, 100, 114, + /* 1080 */ 114, 103, 104, 114, 114, 114, 114, 17, 18, 19, + /* 1090 */ 20, 21, 22, 23, 24, 25, 26, 27, 28, 83, + /* 1100 */ 114, 114, 86, 114, 114, 114, 114, 114, 92, 93, + /* 1110 */ 94, 95, 96, 97, 98, 99, 100, 114, 114, 103, + /* 1120 */ 104, 114, 83, 114, 114, 86, 114, 114, 114, 114, + /* 1130 */ 60, 61, 93, 94, 95, 96, 97, 98, 99, 100, + /* 1140 */ 114, 83, 103, 104, 86, 114, 114, 114, 114, 114, + /* 1150 */ 114, 93, 94, 95, 96, 97, 98, 99, 100, 114, + /* 1160 */ 114, 103, 104, 114, 114, 3, 4, 5, 6, 7, + /* 1170 */ 8, 9, 10, 11, 12, 13, 0, 15, 114, 3, + /* 1180 */ 4, 5, 6, 7, 8, 114, 10, 11, 12, 13, + /* 1190 */ 114, 15, 83, 114, 114, 86, 114, 114, 114, 114, + /* 1200 */ 114, 114, 114, 94, 95, 96, 97, 98, 99, 100, + /* 1210 */ 114, 114, 103, 104, 83, 114, 114, 86, 114, 114, + /* 1220 */ 114, 114, 114, 114, 114, 94, 95, 96, 97, 98, + /* 1230 */ 99, 100, 114, 114, 103, 104, 83, 114, 114, 86, + /* 1240 */ 114, 114, 114, 114, 114, 114, 114, 94, 95, 96, + /* 1250 */ 97, 98, 99, 100, 114, 83, 103, 104, 86, 114, + /* 1260 */ 114, 114, 114, 114, 114, 114, 94, 95, 96, 97, + /* 1270 */ 98, 99, 100, 114, 114, 103, 104, 114, 114, 83, + /* 1280 */ 114, 114, 86, 114, 114, 114, 114, 114, 114, 114, + /* 1290 */ 94, 95, 96, 97, 98, 99, 100, 114, 83, 103, + /* 1300 */ 104, 86, 114, 114, 114, 114, 114, 114, 114, 94, + /* 1310 */ 95, 96, 97, 98, 99, 100, 114, 114, 103, 104, + /* 1320 */ 83, 114, 114, 86, 114, 114, 114, 114, 114, 114, + /* 1330 */ 114, 94, 95, 96, 97, 98, 99, 100, 114, 83, + /* 1340 */ 103, 104, 86, 114, 114, 114, 114, 114, 114, 114, + /* 1350 */ 94, 95, 96, 97, 98, 99, 100, 114, 114, 103, + /* 1360 */ 104, 114, 114, 83, 114, 114, 86, 114, 114, 114, + /* 1370 */ 114, 114, 114, 114, 94, 95, 96, 97, 98, 99, + /* 1380 */ 100, 114, 83, 103, 104, 86, 114, 114, 114, 114, + /* 1390 */ 114, 114, 114, 94, 95, 96, 97, 98, 99, 100, + /* 1400 */ 114, 114, 103, 104, 83, 114, 114, 86, 114, 114, + /* 1410 */ 114, 114, 114, 114, 114, 94, 95, 96, 97, 98, + /* 1420 */ 99, 100, 114, 83, 103, 104, 86, 114, 114, 114, + /* 1430 */ 114, 114, 114, 114, 94, 95, 96, 97, 98, 99, + /* 1440 */ 100, 114, 114, 103, 104, 114, 114, 83, 114, 114, + /* 1450 */ 86, 114, 114, 114, 114, 114, 114, 114, 94, 95, + /* 1460 */ 96, 97, 98, 99, 100, 114, 83, 103, 104, 86, + /* 1470 */ 114, 114, 114, 114, 114, 114, 114, 94, 95, 96, + /* 1480 */ 97, 98, 99, 100, 114, 114, 103, 104, 83, 114, + /* 1490 */ 114, 86, 114, 114, 114, 114, 114, 114, 114, 94, + /* 1500 */ 95, 96, 97, 98, 99, 100, 114, 83, 103, 104, + /* 1510 */ 86, 114, 114, 114, 114, 114, 114, 114, 114, 95, + /* 1520 */ 96, 97, 98, 99, 100, 114, 114, 103, 104, 114, + /* 1530 */ 114, 83, 114, 114, 86, 114, 114, 114, 114, 114, + /* 1540 */ 114, 114, 114, 95, 96, 97, 98, 99, 100, 114, + /* 1550 */ 83, 103, 104, 86, 114, 114, 114, 114, 114, 114, + /* 1560 */ 114, 114, 95, 96, 97, 98, 99, 100, 114, 114, + /* 1570 */ 103, 104, 114, 114, 82, 83, 114, 114, 86, 114, + /* 1580 */ 114, 114, 114, 114, 83, 114, 114, 86, 114, 97, + /* 1590 */ 98, 99, 100, 114, 114, 103, 104, 96, 97, 98, + /* 1600 */ 99, 100, 114, 83, 103, 104, 86, 114, 114, 114, + /* 1610 */ 114, 83, 114, 114, 86, 114, 96, 97, 98, 99, + /* 1620 */ 100, 114, 114, 103, 104, 97, 98, 99, 100, 114, + /* 1630 */ 83, 103, 104, 86, 114, 114, 114, 114, 114, 114, + /* 1640 */ 114, 114, 114, 114, 97, 98, 99, 100, 114, 83, + /* 1650 */ 103, 104, 86, 114, 114, 114, 114, 114, 83, 114, + /* 1660 */ 114, 86, 114, 97, 98, 99, 100, 114, 83, 103, + /* 1670 */ 104, 86, 97, 98, 99, 100, 114, 114, 103, 104, + /* 1680 */ 114, 114, 97, 98, 99, 100, 114, 83, 103, 104, + /* 1690 */ 86, 114, 114, 114, 114, 83, 114, 114, 86, 114, + /* 1700 */ 114, 97, 98, 99, 100, 114, 114, 103, 104, 97, + /* 1710 */ 98, 99, 100, 114, 83, 103, 104, 86, 114, 114, + /* 1720 */ 114, 114, 114, 114, 114, 114, 114, 114, 97, 98, + /* 1730 */ 99, 100, 114, 83, 103, 104, 86, 114, 114, 114, + /* 1740 */ 114, 114, 83, 114, 114, 86, 114, 97, 98, 99, + /* 1750 */ 100, 114, 83, 103, 104, 86, 97, 98, 99, 100, + /* 1760 */ 114, 114, 103, 104, 114, 114, 97, 98, 99, 100, + /* 1770 */ 114, 83, 103, 104, 86, 114, 114, 114, 114, 83, + /* 1780 */ 114, 114, 86, 114, 114, 97, 98, 99, 100, 114, + /* 1790 */ 114, 103, 104, 97, 98, 99, 100, 114, 83, 103, + /* 1800 */ 104, 86, 114, 114, 114, 114, 114, 114, 114, 114, + /* 1810 */ 114, 114, 97, 98, 99, 100, 114, 114, 103, 104, }; -#define YY_SHIFT_USE_DFLT (1807) #define YY_SHIFT_COUNT (146) -#define YY_SHIFT_MIN (-61) -#define YY_SHIFT_MAX (1200) -static const short yy_shift_ofst[] = { - /* 0 */ -1, 499, 97, 132, 385, 132, 564, 564, 564, 564, - /* 10 */ 253, 319, 564, 564, 564, 564, 564, 564, 564, 564, - /* 20 */ 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, - /* 30 */ 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, - /* 40 */ 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, - /* 50 */ 564, 564, 564, 564, 564, 97, 564, 564, 564, 564, - /* 60 */ 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, - /* 70 */ 564, 564, 364, -7, -61, 36, 222, -7, -61, 600, - /* 80 */ 1200, 36, 36, 36, 36, 36, 36, 36, 216, 134, - /* 90 */ 134, 134, 1107, 4, 4, 4, 4, 4, 4, 4, - /* 100 */ 4, 4, 4, 4, 4, 4, 17, 4, 17, 4, - /* 110 */ 17, 4, 45, 95, 290, 223, 139, 127, 135, 135, - /* 120 */ 246, 135, 199, 281, 240, 135, 199, 223, 394, 254, - /* 130 */ 76, 105, 195, 215, 200, 237, 264, 286, 272, 270, - /* 140 */ 273, 264, 270, 273, 264, 274, 105, +#define YY_SHIFT_MIN (0) +#define YY_SHIFT_MAX (1176) +static const unsigned short int yy_shift_ofst[] = { + /* 0 */ 0, 464, 98, 133, 289, 133, 493, 493, 493, 493, + /* 10 */ 223, 257, 493, 493, 493, 493, 493, 493, 493, 493, + /* 20 */ 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, + /* 30 */ 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, + /* 40 */ 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, + /* 50 */ 493, 493, 493, 493, 493, 98, 493, 493, 493, 493, + /* 60 */ 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, + /* 70 */ 493, 493, 268, 2, 31, 37, 226, 2, 31, 1162, + /* 80 */ 1176, 37, 37, 37, 37, 37, 37, 37, 258, 135, + /* 90 */ 135, 135, 1070, 5, 5, 5, 5, 5, 5, 5, + /* 100 */ 5, 5, 5, 5, 5, 5, 18, 5, 18, 5, + /* 110 */ 18, 5, 53, 96, 259, 224, 263, 128, 136, 136, + /* 120 */ 294, 136, 273, 318, 253, 136, 273, 224, 304, 252, + /* 130 */ 87, 175, 138, 191, 171, 184, 229, 292, 241, 282, + /* 140 */ 274, 229, 282, 274, 229, 302, 175, }; -#define YY_REDUCE_USE_DFLT (-107) #define YY_REDUCE_COUNT (88) -#define YY_REDUCE_MIN (-106) -#define YY_REDUCE_MAX (1701) +#define YY_REDUCE_MIN (-104) +#define YY_REDUCE_MAX (1715) static const short yy_reduce_ofst[] = { - /* 0 */ -63, -8, 34, 124, 153, 187, 252, 320, 379, 401, - /* 10 */ 440, 494, 554, 577, 599, 624, 646, 668, 690, 712, - /* 20 */ 734, 756, 778, 800, 822, 844, 866, 888, 910, 929, - /* 30 */ 951, 973, 995, 1014, 1052, 1075, 1094, 1130, 1149, 1168, - /* 40 */ 1190, 1209, 1228, 1247, 1266, 1288, 1307, 1326, 1345, 1364, - /* 50 */ 1386, 1405, 1424, 1443, 1462, 1470, 1492, 1501, 1523, 1531, - /* 60 */ 1550, 1558, 1577, 1586, 1608, 1616, 1635, 1643, 1662, 1671, - /* 70 */ 1693, 1701, -65, 33, -106, 15, 47, 23, 44, -70, - /* 80 */ -70, -33, -31, 20, 102, 123, 148, 152, -88, + /* 0 */ -61, -6, 36, 126, 158, 279, 312, 344, 366, 396, + /* 10 */ 483, 506, 528, 553, 575, 597, 619, 641, 663, 685, + /* 20 */ 707, 729, 751, 773, 795, 817, 839, 861, 883, 902, + /* 30 */ 921, 940, 959, 978, 1016, 1039, 1058, 1109, 1131, 1153, + /* 40 */ 1172, 1196, 1215, 1237, 1256, 1280, 1299, 1321, 1340, 1364, + /* 50 */ 1383, 1405, 1424, 1448, 1467, 1492, 1501, 1520, 1528, 1547, + /* 60 */ 1566, 1575, 1585, 1604, 1612, 1631, 1650, 1659, 1669, 1688, + /* 70 */ 1696, 1715, -63, 35, -104, 17, 48, 25, 46, -82, + /* 80 */ -82, -76, -73, -36, -31, 22, 69, 74, -86, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 508, 441, 508, 448, 508, 450, 445, 508, 508, 508, - /* 10 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 20 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 30 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 40 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 50 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 60 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - /* 70 */ 508, 508, 508, 505, 441, 508, 481, 508, 508, 508, - /* 80 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 473, - /* 90 */ 402, 401, 479, 417, 416, 415, 414, 413, 412, 411, - /* 100 */ 410, 409, 408, 407, 406, 474, 476, 405, 422, 404, - /* 110 */ 421, 403, 508, 508, 508, 395, 508, 508, 475, 420, - /* 120 */ 508, 419, 472, 508, 479, 418, 400, 468, 467, 508, - /* 130 */ 490, 486, 508, 508, 508, 507, 397, 508, 508, 471, - /* 140 */ 470, 469, 399, 398, 396, 508, 508, + /* 0 */ 371, 444, 371, 451, 371, 453, 448, 371, 371, 371, + /* 10 */ 371, 371, 371, 371, 371, 371, 371, 371, 371, 371, + /* 20 */ 371, 371, 371, 371, 371, 371, 371, 371, 371, 371, + /* 30 */ 371, 371, 371, 371, 371, 371, 371, 371, 371, 371, + /* 40 */ 371, 371, 371, 371, 371, 371, 371, 371, 371, 371, + /* 50 */ 371, 371, 371, 371, 371, 371, 371, 371, 371, 371, + /* 60 */ 371, 371, 371, 371, 371, 371, 371, 371, 371, 371, + /* 70 */ 371, 371, 371, 508, 444, 371, 484, 371, 371, 371, + /* 80 */ 371, 371, 371, 371, 371, 371, 371, 371, 371, 476, + /* 90 */ 405, 404, 482, 420, 419, 418, 417, 416, 415, 414, + /* 100 */ 413, 412, 411, 410, 409, 477, 479, 408, 425, 407, + /* 110 */ 424, 406, 371, 371, 371, 398, 371, 371, 478, 423, + /* 120 */ 371, 422, 475, 371, 482, 421, 403, 471, 470, 371, + /* 130 */ 493, 489, 371, 371, 371, 510, 400, 371, 371, 474, + /* 140 */ 473, 472, 402, 401, 399, 371, 371, }; /********** End of lemon-generated parsing tables *****************************/ @@ -664,6 +670,7 @@ struct yyParser { int yyerrcnt; /* Shifts left before out of the error */ #endif grn_expr_parserARG_SDECL /* A place to hold %extra_argument */ + grn_expr_parserCTX_SDECL /* A place to hold %extra_context */ #if YYSTACKDEPTH<=0 int yystksz; /* Current side of the stack */ yyStackEntry *yystack; /* The parser's stack */ @@ -707,41 +714,126 @@ void grn_expr_parserTrace(FILE *TraceFILE, char *zTracePrompt){ } #endif /* NDEBUG */ -#ifndef NDEBUG +#if defined(YYCOVERAGE) || !defined(NDEBUG) /* For tracing shifts, the names of all terminals and nonterminals ** 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", "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", "QUORUM", "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", + /* 0 */ "$", + /* 1 */ "START_OUTPUT_COLUMNS", + /* 2 */ "START_ADJUSTER", + /* 3 */ "LOGICAL_AND", + /* 4 */ "LOGICAL_AND_NOT", + /* 5 */ "LOGICAL_OR", + /* 6 */ "NEGATIVE", + /* 7 */ "QSTRING", + /* 8 */ "PARENL", + /* 9 */ "PARENR", + /* 10 */ "ADJUST", + /* 11 */ "RELATIVE_OP", + /* 12 */ "IDENTIFIER", + /* 13 */ "BRACEL", + /* 14 */ "BRACER", + /* 15 */ "EVAL", + /* 16 */ "COMMA", + /* 17 */ "ASSIGN", + /* 18 */ "STAR_ASSIGN", + /* 19 */ "SLASH_ASSIGN", + /* 20 */ "MOD_ASSIGN", + /* 21 */ "PLUS_ASSIGN", + /* 22 */ "MINUS_ASSIGN", + /* 23 */ "SHIFTL_ASSIGN", + /* 24 */ "SHIFTR_ASSIGN", + /* 25 */ "SHIFTRR_ASSIGN", + /* 26 */ "AND_ASSIGN", + /* 27 */ "XOR_ASSIGN", + /* 28 */ "OR_ASSIGN", + /* 29 */ "QUESTION", + /* 30 */ "COLON", + /* 31 */ "BITWISE_OR", + /* 32 */ "BITWISE_XOR", + /* 33 */ "BITWISE_AND", + /* 34 */ "EQUAL", + /* 35 */ "NOT_EQUAL", + /* 36 */ "LESS", + /* 37 */ "GREATER", + /* 38 */ "LESS_EQUAL", + /* 39 */ "GREATER_EQUAL", + /* 40 */ "IN", + /* 41 */ "MATCH", + /* 42 */ "NEAR", + /* 43 */ "NEAR2", + /* 44 */ "SIMILAR", + /* 45 */ "TERM_EXTRACT", + /* 46 */ "QUORUM", + /* 47 */ "LCP", + /* 48 */ "PREFIX", + /* 49 */ "SUFFIX", + /* 50 */ "REGEXP", + /* 51 */ "SHIFTL", + /* 52 */ "SHIFTR", + /* 53 */ "SHIFTRR", + /* 54 */ "PLUS", + /* 55 */ "MINUS", + /* 56 */ "STAR", + /* 57 */ "SLASH", + /* 58 */ "MOD", + /* 59 */ "DELETE", + /* 60 */ "INCR", + /* 61 */ "DECR", + /* 62 */ "NOT", + /* 63 */ "BITWISE_NOT", + /* 64 */ "EXACT", + /* 65 */ "PARTIAL", + /* 66 */ "UNSPLIT", + /* 67 */ "DECIMAL", + /* 68 */ "HEX_INTEGER", + /* 69 */ "STRING", + /* 70 */ "BOOLEAN", + /* 71 */ "NULL", + /* 72 */ "BRACKETL", + /* 73 */ "BRACKETR", + /* 74 */ "DOT", + /* 75 */ "NONEXISTENT_COLUMN", + /* 76 */ "suppress_unused_variable_warning", + /* 77 */ "input", + /* 78 */ "query", + /* 79 */ "expression", + /* 80 */ "output_columns", + /* 81 */ "adjuster", + /* 82 */ "query_element", + /* 83 */ "primary_expression", + /* 84 */ "assignment_expression", + /* 85 */ "conditional_expression", + /* 86 */ "lefthand_side_expression", + /* 87 */ "logical_or_expression", + /* 88 */ "logical_and_expression", + /* 89 */ "bitwise_or_expression", + /* 90 */ "bitwise_xor_expression", + /* 91 */ "bitwise_and_expression", + /* 92 */ "equality_expression", + /* 93 */ "relational_expression", + /* 94 */ "shift_expression", + /* 95 */ "additive_expression", + /* 96 */ "multiplicative_expression", + /* 97 */ "unary_expression", + /* 98 */ "postfix_expression", + /* 99 */ "call_expression", + /* 100 */ "member_expression", + /* 101 */ "arguments", + /* 102 */ "member_expression_part", + /* 103 */ "object_literal", + /* 104 */ "array_literal", + /* 105 */ "elision", + /* 106 */ "element_list", + /* 107 */ "property_name_and_value_list", + /* 108 */ "property_name_and_value", + /* 109 */ "property_name", + /* 110 */ "argument_list", + /* 111 */ "output_column", + /* 112 */ "adjust_expression", + /* 113 */ "adjust_match_expression", }; -#endif /* NDEBUG */ +#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ #ifndef NDEBUG /* For tracing reduce actions, the names of all rules are required. @@ -932,28 +1024,29 @@ static int yyGrowStack(yyParser *p){ /* Initialize a new parser that has already been allocated. */ -void grn_expr_parserInit(void *yypParser){ - yyParser *pParser = (yyParser*)yypParser; +void grn_expr_parserInit(void *yypRawParser grn_expr_parserCTX_PDECL){ + yyParser *yypParser = (yyParser*)yypRawParser; + grn_expr_parserCTX_STORE #ifdef YYTRACKMAXSTACKDEPTH - pParser->yyhwm = 0; + yypParser->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; + yypParser->yytos = NULL; + yypParser->yystack = NULL; + yypParser->yystksz = 0; + if( yyGrowStack(yypParser) ){ + yypParser->yystack = &yypParser->yystk0; + yypParser->yystksz = 1; } #endif #ifndef YYNOERRORRECOVERY - pParser->yyerrcnt = -1; + yypParser->yyerrcnt = -1; #endif - pParser->yytos = pParser->yystack; - pParser->yystack[0].stateno = 0; - pParser->yystack[0].major = 0; + yypParser->yytos = yypParser->yystack; + yypParser->yystack[0].stateno = 0; + yypParser->yystack[0].major = 0; #if YYSTACKDEPTH>0 - pParser->yystackEnd = &pParser->yystack[YYSTACKDEPTH-1]; + yypParser->yystackEnd = &yypParser->yystack[YYSTACKDEPTH-1]; #endif } @@ -970,11 +1063,14 @@ void grn_expr_parserInit(void *yypParser){ ** A pointer to a parser. This pointer is used in subsequent calls ** to grn_expr_parser and grn_expr_parserFree. */ -void *grn_expr_parserAlloc(void *(*mallocProc)(YYMALLOCARGTYPE)){ - yyParser *pParser; - pParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) ); - if( pParser ) grn_expr_parserInit(pParser); - return pParser; +void *grn_expr_parserAlloc(void *(*mallocProc)(YYMALLOCARGTYPE) grn_expr_parserCTX_PDECL){ + yyParser *yypParser; + yypParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) ); + if( yypParser ){ + grn_expr_parserCTX_STORE + grn_expr_parserInit(yypParser grn_expr_parserCTX_PARAM); + } + return (void*)yypParser; } #endif /* grn_expr_parser_ENGINEALWAYSONSTACK */ @@ -991,7 +1087,8 @@ static void yy_destructor( YYCODETYPE yymajor, /* Type code for object to destroy */ YYMINORTYPE *yypminor /* The object to be destroyed */ ){ - grn_expr_parserARG_FETCH; + grn_expr_parserARG_FETCH + grn_expr_parserCTX_FETCH switch( yymajor ){ /* Here is inserted the actions which take place when a ** terminal or non-terminal is destroyed. This can happen @@ -1004,13 +1101,13 @@ static void yy_destructor( ** inside the C code. */ /********* Begin destructor definitions ***************************************/ - case 77: /* suppress_unused_variable_warning */ + case 76: /* suppress_unused_variable_warning */ { -#line 14 "grn_ecmascript.lemon" +#line 14 "../../groonga/lib/grn_ecmascript.lemon" (void)efsi; -#line 1014 "grn_ecmascript.c" +#line 1111 "../../groonga/lib/grn_ecmascript.c" } break; /********* End destructor definitions *****************************************/ @@ -1081,24 +1178,66 @@ int grn_expr_parserStackPeak(void *p){ } #endif +/* This array of booleans keeps track of the parser statement +** coverage. The element yycoverage[X][Y] is set when the parser +** is in state X and has a lookahead token Y. In a well-tested +** systems, every element of this matrix should end up being set. +*/ +#if defined(YYCOVERAGE) +static unsigned char yycoverage[YYNSTATE][YYNTOKEN]; +#endif + +/* +** Write into out a description of every state/lookahead combination that +** +** (1) has not been used by the parser, and +** (2) is not a syntax error. +** +** Return the number of missed state/lookahead combinations. +*/ +#if defined(YYCOVERAGE) +int grn_expr_parserCoverage(FILE *out){ + int stateno, iLookAhead, i; + int nMissed = 0; + for(stateno=0; stateno<YYNSTATE; stateno++){ + i = yy_shift_ofst[stateno]; + for(iLookAhead=0; iLookAhead<YYNTOKEN; iLookAhead++){ + if( yy_lookahead[i+iLookAhead]!=iLookAhead ) continue; + if( yycoverage[stateno][iLookAhead]==0 ) nMissed++; + if( out ){ + fprintf(out,"State %d lookahead %s %s\n", stateno, + yyTokenName[iLookAhead], + yycoverage[stateno][iLookAhead] ? "ok" : "missed"); + } + } + } + return nMissed; +} +#endif + /* ** Find the appropriate action for a parser given the terminal ** look-ahead token iLookAhead. */ -static unsigned int yy_find_shift_action( - yyParser *pParser, /* The parser */ - YYCODETYPE iLookAhead /* The look-ahead token */ +static YYACTIONTYPE yy_find_shift_action( + YYCODETYPE iLookAhead, /* The look-ahead token */ + YYACTIONTYPE stateno /* Current state number */ ){ int i; - int stateno = pParser->yytos->stateno; - - if( stateno>=YY_MIN_REDUCE ) return stateno; + + if( stateno>YY_MAX_SHIFT ) return stateno; assert( stateno <= YY_SHIFT_COUNT ); +#if defined(YYCOVERAGE) + yycoverage[stateno][iLookAhead] = 1; +#endif do{ i = yy_shift_ofst[stateno]; + assert( i>=0 ); + /* assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD ); */ assert( iLookAhead!=YYNOCODE ); + assert( iLookAhead < YYNTOKEN ); i += iLookAhead; - if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){ + if( i>=YY_NLOOKAHEAD || yy_lookahead[i]!=iLookAhead ){ #ifdef YYFALLBACK YYCODETYPE iFallback; /* Fallback token */ if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0]) @@ -1124,6 +1263,7 @@ static unsigned int yy_find_shift_action( #if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT j<YY_ACTTAB_COUNT && #endif + j<(int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])) && yy_lookahead[j]==YYWILDCARD && iLookAhead>0 ){ #ifndef NDEBUG @@ -1148,8 +1288,8 @@ static unsigned int yy_find_shift_action( ** Find the appropriate action for a parser given the non-terminal ** look-ahead token iLookAhead. */ -static int yy_find_reduce_action( - int stateno, /* Current state number */ +static YYACTIONTYPE yy_find_reduce_action( + YYACTIONTYPE stateno, /* Current state number */ YYCODETYPE iLookAhead /* The look-ahead token */ ){ int i; @@ -1161,7 +1301,6 @@ static int yy_find_reduce_action( assert( stateno<=YY_REDUCE_COUNT ); #endif i = yy_reduce_ofst[stateno]; - assert( i!=YY_REDUCE_USE_DFLT ); assert( iLookAhead!=YYNOCODE ); i += iLookAhead; #ifdef YYERRORSYMBOL @@ -1179,7 +1318,8 @@ static int yy_find_reduce_action( ** The following routine is called if the stack overflows. */ static void yyStackOverflow(yyParser *yypParser){ - grn_expr_parserARG_FETCH; + grn_expr_parserARG_FETCH + grn_expr_parserCTX_FETCH #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt); @@ -1190,27 +1330,29 @@ static void yyStackOverflow(yyParser *yypParser){ ** stack every overflows */ /******** Begin %stack_overflow code ******************************************/ /******** End %stack_overflow code ********************************************/ - grn_expr_parserARG_STORE; /* Suppress warning about unused %extra_argument var */ + grn_expr_parserARG_STORE /* Suppress warning about unused %extra_argument var */ + grn_expr_parserCTX_STORE } /* ** Print tracing information for a SHIFT action */ #ifndef NDEBUG -static void yyTraceShift(yyParser *yypParser, int yyNewState){ +static void yyTraceShift(yyParser *yypParser, int yyNewState, const char *zTag){ if( yyTraceFILE ){ if( yyNewState<YYNSTATE ){ - fprintf(yyTraceFILE,"%sShift '%s', go to state %d\n", - yyTracePrompt,yyTokenName[yypParser->yytos->major], + fprintf(yyTraceFILE,"%s%s '%s', go to state %d\n", + yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major], yyNewState); }else{ - fprintf(yyTraceFILE,"%sShift '%s'\n", - yyTracePrompt,yyTokenName[yypParser->yytos->major]); + fprintf(yyTraceFILE,"%s%s '%s', pending reduce %d\n", + yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major], + yyNewState - YY_MIN_REDUCE); } } } #else -# define yyTraceShift(X,Y) +# define yyTraceShift(X,Y,Z) #endif /* @@ -1218,8 +1360,8 @@ static void yyTraceShift(yyParser *yypParser, int yyNewState){ */ static void yy_shift( yyParser *yypParser, /* The parser to be shifted */ - int yyNewState, /* The new state to shift in */ - int yyMajor, /* The major token to shift in */ + YYACTIONTYPE yyNewState, /* The new state to shift in */ + YYCODETYPE yyMajor, /* The major token to shift in */ grn_expr_parserTOKENTYPE yyMinor /* The minor token to shift in */ ){ yyStackEntry *yytos; @@ -1249,10 +1391,10 @@ static void yy_shift( yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE; } yytos = yypParser->yytos; - yytos->stateno = (YYACTIONTYPE)yyNewState; - yytos->major = (YYCODETYPE)yyMajor; + yytos->stateno = yyNewState; + yytos->major = yyMajor; yytos->minor.yy0 = yyMinor; - yyTraceShift(yypParser, yyNewState); + yyTraceShift(yypParser, yyNewState, "Shift"); } /* The following table contains information about every rule that @@ -1262,143 +1404,143 @@ static const struct { YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */ signed char nrhs; /* Negative of the number of RHS symbols in the rule */ } yyRuleInfo[] = { - { 79, -2 }, - { 79, -3 }, - { 79, -3 }, - { 79, -3 }, - { 79, -3 }, - { 83, -2 }, - { 83, -2 }, - { 83, -3 }, - { 83, -3 }, - { 83, -2 }, - { 80, -3 }, - { 85, -3 }, - { 85, -3 }, - { 85, -3 }, - { 85, -3 }, - { 85, -3 }, - { 85, -3 }, - { 85, -3 }, - { 85, -3 }, - { 85, -3 }, - { 85, -3 }, - { 85, -3 }, - { 85, -3 }, - { 86, -5 }, - { 88, -3 }, - { 89, -3 }, - { 89, -3 }, - { 90, -3 }, - { 91, -3 }, - { 92, -3 }, - { 93, -3 }, - { 93, -3 }, - { 94, -3 }, - { 94, -3 }, - { 94, -3 }, - { 94, -3 }, - { 94, -3 }, - { 94, -3 }, - { 94, -3 }, - { 94, -3 }, - { 94, -3 }, - { 94, -3 }, - { 94, -3 }, - { 94, -3 }, - { 94, -3 }, - { 94, -3 }, - { 94, -3 }, - { 95, -3 }, - { 95, -3 }, - { 95, -3 }, - { 96, -3 }, - { 96, -3 }, - { 97, -3 }, - { 97, -3 }, - { 97, -3 }, - { 98, -2 }, - { 98, -2 }, - { 98, -2 }, - { 98, -2 }, - { 98, -2 }, - { 98, -2 }, - { 98, -2 }, - { 98, -2 }, - { 98, -2 }, - { 98, -2 }, - { 98, -2 }, - { 99, -2 }, - { 99, -2 }, - { 100, -2 }, - { 104, -3 }, - { 108, 0 }, - { 109, -3 }, - { 103, -3 }, - { 102, -3 }, - { 111, 0 }, - { 111, -1 }, - { 111, -3 }, - { 81, 0 }, - { 81, -1 }, - { 81, -2 }, - { 81, -3 }, - { 112, -1 }, - { 112, -1 }, - { 112, -1 }, - { 82, -3 }, - { 113, -3 }, - { 114, -3 }, - { 78, -1 }, - { 78, -1 }, - { 78, -2 }, - { 78, -2 }, - { 79, -1 }, - { 83, -1 }, - { 83, -3 }, - { 80, -1 }, - { 85, -1 }, - { 86, -1 }, - { 88, -1 }, - { 89, -1 }, - { 90, -1 }, - { 91, -1 }, - { 92, -1 }, - { 93, -1 }, - { 94, -1 }, - { 95, -1 }, - { 96, -1 }, - { 97, -1 }, - { 98, -1 }, - { 99, -1 }, - { 87, -1 }, - { 87, -1 }, - { 101, -1 }, - { 101, -2 }, - { 84, -1 }, - { 84, -3 }, - { 84, -1 }, - { 84, -1 }, - { 84, -1 }, - { 84, -1 }, - { 84, -1 }, - { 84, -1 }, - { 84, -1 }, - { 105, -3 }, - { 105, -4 }, - { 105, -3 }, - { 106, -1 }, - { 106, -2 }, - { 107, -1 }, - { 107, -2 }, - { 107, -3 }, - { 108, -1 }, - { 108, -3 }, - { 110, -1 }, - { 103, -2 }, - { 82, 0 }, - { 82, -1 }, - { 113, -1 }, + { 78, -2 }, /* (0) query ::= query query_element */ + { 78, -3 }, /* (1) query ::= query LOGICAL_AND query_element */ + { 78, -3 }, /* (2) query ::= query LOGICAL_AND_NOT query_element */ + { 78, -3 }, /* (3) query ::= query LOGICAL_OR query_element */ + { 78, -3 }, /* (4) query ::= query NEGATIVE query_element */ + { 82, -2 }, /* (5) query_element ::= ADJUST query_element */ + { 82, -2 }, /* (6) query_element ::= RELATIVE_OP query_element */ + { 82, -3 }, /* (7) query_element ::= IDENTIFIER RELATIVE_OP query_element */ + { 82, -3 }, /* (8) query_element ::= BRACEL expression BRACER */ + { 82, -2 }, /* (9) query_element ::= EVAL primary_expression */ + { 79, -3 }, /* (10) expression ::= expression COMMA assignment_expression */ + { 84, -3 }, /* (11) assignment_expression ::= lefthand_side_expression ASSIGN assignment_expression */ + { 84, -3 }, /* (12) assignment_expression ::= lefthand_side_expression STAR_ASSIGN assignment_expression */ + { 84, -3 }, /* (13) assignment_expression ::= lefthand_side_expression SLASH_ASSIGN assignment_expression */ + { 84, -3 }, /* (14) assignment_expression ::= lefthand_side_expression MOD_ASSIGN assignment_expression */ + { 84, -3 }, /* (15) assignment_expression ::= lefthand_side_expression PLUS_ASSIGN assignment_expression */ + { 84, -3 }, /* (16) assignment_expression ::= lefthand_side_expression MINUS_ASSIGN assignment_expression */ + { 84, -3 }, /* (17) assignment_expression ::= lefthand_side_expression SHIFTL_ASSIGN assignment_expression */ + { 84, -3 }, /* (18) assignment_expression ::= lefthand_side_expression SHIFTR_ASSIGN assignment_expression */ + { 84, -3 }, /* (19) assignment_expression ::= lefthand_side_expression SHIFTRR_ASSIGN assignment_expression */ + { 84, -3 }, /* (20) assignment_expression ::= lefthand_side_expression AND_ASSIGN assignment_expression */ + { 84, -3 }, /* (21) assignment_expression ::= lefthand_side_expression XOR_ASSIGN assignment_expression */ + { 84, -3 }, /* (22) assignment_expression ::= lefthand_side_expression OR_ASSIGN assignment_expression */ + { 85, -5 }, /* (23) conditional_expression ::= logical_or_expression QUESTION assignment_expression COLON assignment_expression */ + { 87, -3 }, /* (24) logical_or_expression ::= logical_or_expression LOGICAL_OR logical_and_expression */ + { 88, -3 }, /* (25) logical_and_expression ::= logical_and_expression LOGICAL_AND bitwise_or_expression */ + { 88, -3 }, /* (26) logical_and_expression ::= logical_and_expression LOGICAL_AND_NOT bitwise_or_expression */ + { 89, -3 }, /* (27) bitwise_or_expression ::= bitwise_or_expression BITWISE_OR bitwise_xor_expression */ + { 90, -3 }, /* (28) bitwise_xor_expression ::= bitwise_xor_expression BITWISE_XOR bitwise_and_expression */ + { 91, -3 }, /* (29) bitwise_and_expression ::= bitwise_and_expression BITWISE_AND equality_expression */ + { 92, -3 }, /* (30) equality_expression ::= equality_expression EQUAL relational_expression */ + { 92, -3 }, /* (31) equality_expression ::= equality_expression NOT_EQUAL relational_expression */ + { 93, -3 }, /* (32) relational_expression ::= relational_expression LESS shift_expression */ + { 93, -3 }, /* (33) relational_expression ::= relational_expression GREATER shift_expression */ + { 93, -3 }, /* (34) relational_expression ::= relational_expression LESS_EQUAL shift_expression */ + { 93, -3 }, /* (35) relational_expression ::= relational_expression GREATER_EQUAL shift_expression */ + { 93, -3 }, /* (36) relational_expression ::= relational_expression IN shift_expression */ + { 93, -3 }, /* (37) relational_expression ::= relational_expression MATCH shift_expression */ + { 93, -3 }, /* (38) relational_expression ::= relational_expression NEAR shift_expression */ + { 93, -3 }, /* (39) relational_expression ::= relational_expression NEAR2 shift_expression */ + { 93, -3 }, /* (40) relational_expression ::= relational_expression SIMILAR shift_expression */ + { 93, -3 }, /* (41) relational_expression ::= relational_expression TERM_EXTRACT shift_expression */ + { 93, -3 }, /* (42) relational_expression ::= relational_expression QUORUM shift_expression */ + { 93, -3 }, /* (43) relational_expression ::= relational_expression LCP shift_expression */ + { 93, -3 }, /* (44) relational_expression ::= relational_expression PREFIX shift_expression */ + { 93, -3 }, /* (45) relational_expression ::= relational_expression SUFFIX shift_expression */ + { 93, -3 }, /* (46) relational_expression ::= relational_expression REGEXP shift_expression */ + { 94, -3 }, /* (47) shift_expression ::= shift_expression SHIFTL additive_expression */ + { 94, -3 }, /* (48) shift_expression ::= shift_expression SHIFTR additive_expression */ + { 94, -3 }, /* (49) shift_expression ::= shift_expression SHIFTRR additive_expression */ + { 95, -3 }, /* (50) additive_expression ::= additive_expression PLUS multiplicative_expression */ + { 95, -3 }, /* (51) additive_expression ::= additive_expression MINUS multiplicative_expression */ + { 96, -3 }, /* (52) multiplicative_expression ::= multiplicative_expression STAR unary_expression */ + { 96, -3 }, /* (53) multiplicative_expression ::= multiplicative_expression SLASH unary_expression */ + { 96, -3 }, /* (54) multiplicative_expression ::= multiplicative_expression MOD unary_expression */ + { 97, -2 }, /* (55) unary_expression ::= DELETE unary_expression */ + { 97, -2 }, /* (56) unary_expression ::= INCR unary_expression */ + { 97, -2 }, /* (57) unary_expression ::= DECR unary_expression */ + { 97, -2 }, /* (58) unary_expression ::= PLUS unary_expression */ + { 97, -2 }, /* (59) unary_expression ::= MINUS unary_expression */ + { 97, -2 }, /* (60) unary_expression ::= NOT unary_expression */ + { 97, -2 }, /* (61) unary_expression ::= BITWISE_NOT unary_expression */ + { 97, -2 }, /* (62) unary_expression ::= ADJUST unary_expression */ + { 97, -2 }, /* (63) unary_expression ::= EXACT unary_expression */ + { 97, -2 }, /* (64) unary_expression ::= PARTIAL unary_expression */ + { 97, -2 }, /* (65) unary_expression ::= UNSPLIT unary_expression */ + { 98, -2 }, /* (66) postfix_expression ::= lefthand_side_expression INCR */ + { 98, -2 }, /* (67) postfix_expression ::= lefthand_side_expression DECR */ + { 99, -2 }, /* (68) call_expression ::= member_expression arguments */ + { 103, -3 }, /* (69) object_literal ::= BRACEL property_name_and_value_list BRACER */ + { 107, 0 }, /* (70) property_name_and_value_list ::= */ + { 108, -3 }, /* (71) property_name_and_value ::= property_name COLON assignment_expression */ + { 102, -3 }, /* (72) member_expression_part ::= BRACKETL expression BRACKETR */ + { 101, -3 }, /* (73) arguments ::= PARENL argument_list PARENR */ + { 110, 0 }, /* (74) argument_list ::= */ + { 110, -1 }, /* (75) argument_list ::= assignment_expression */ + { 110, -3 }, /* (76) argument_list ::= argument_list COMMA assignment_expression */ + { 80, 0 }, /* (77) output_columns ::= */ + { 80, -1 }, /* (78) output_columns ::= output_column */ + { 80, -2 }, /* (79) output_columns ::= output_columns COMMA */ + { 80, -3 }, /* (80) output_columns ::= output_columns COMMA output_column */ + { 111, -1 }, /* (81) output_column ::= STAR */ + { 111, -1 }, /* (82) output_column ::= NONEXISTENT_COLUMN */ + { 111, -1 }, /* (83) output_column ::= assignment_expression */ + { 81, -3 }, /* (84) adjuster ::= adjuster PLUS adjust_expression */ + { 112, -3 }, /* (85) adjust_expression ::= adjust_match_expression STAR DECIMAL */ + { 113, -3 }, /* (86) adjust_match_expression ::= IDENTIFIER MATCH STRING */ + { 77, -1 }, /* (87) input ::= query */ + { 77, -1 }, /* (88) input ::= expression */ + { 77, -2 }, /* (89) input ::= START_OUTPUT_COLUMNS output_columns */ + { 77, -2 }, /* (90) input ::= START_ADJUSTER adjuster */ + { 78, -1 }, /* (91) query ::= query_element */ + { 82, -1 }, /* (92) query_element ::= QSTRING */ + { 82, -3 }, /* (93) query_element ::= PARENL query PARENR */ + { 79, -1 }, /* (94) expression ::= assignment_expression */ + { 84, -1 }, /* (95) assignment_expression ::= conditional_expression */ + { 85, -1 }, /* (96) conditional_expression ::= logical_or_expression */ + { 87, -1 }, /* (97) logical_or_expression ::= logical_and_expression */ + { 88, -1 }, /* (98) logical_and_expression ::= bitwise_or_expression */ + { 89, -1 }, /* (99) bitwise_or_expression ::= bitwise_xor_expression */ + { 90, -1 }, /* (100) bitwise_xor_expression ::= bitwise_and_expression */ + { 91, -1 }, /* (101) bitwise_and_expression ::= equality_expression */ + { 92, -1 }, /* (102) equality_expression ::= relational_expression */ + { 93, -1 }, /* (103) relational_expression ::= shift_expression */ + { 94, -1 }, /* (104) shift_expression ::= additive_expression */ + { 95, -1 }, /* (105) additive_expression ::= multiplicative_expression */ + { 96, -1 }, /* (106) multiplicative_expression ::= unary_expression */ + { 97, -1 }, /* (107) unary_expression ::= postfix_expression */ + { 98, -1 }, /* (108) postfix_expression ::= lefthand_side_expression */ + { 86, -1 }, /* (109) lefthand_side_expression ::= call_expression */ + { 86, -1 }, /* (110) lefthand_side_expression ::= member_expression */ + { 100, -1 }, /* (111) member_expression ::= primary_expression */ + { 100, -2 }, /* (112) member_expression ::= member_expression member_expression_part */ + { 83, -1 }, /* (113) primary_expression ::= object_literal */ + { 83, -3 }, /* (114) primary_expression ::= PARENL expression PARENR */ + { 83, -1 }, /* (115) primary_expression ::= IDENTIFIER */ + { 83, -1 }, /* (116) primary_expression ::= array_literal */ + { 83, -1 }, /* (117) primary_expression ::= DECIMAL */ + { 83, -1 }, /* (118) primary_expression ::= HEX_INTEGER */ + { 83, -1 }, /* (119) primary_expression ::= STRING */ + { 83, -1 }, /* (120) primary_expression ::= BOOLEAN */ + { 83, -1 }, /* (121) primary_expression ::= NULL */ + { 104, -3 }, /* (122) array_literal ::= BRACKETL elision BRACKETR */ + { 104, -4 }, /* (123) array_literal ::= BRACKETL element_list elision BRACKETR */ + { 104, -3 }, /* (124) array_literal ::= BRACKETL element_list BRACKETR */ + { 105, -1 }, /* (125) elision ::= COMMA */ + { 105, -2 }, /* (126) elision ::= elision COMMA */ + { 106, -1 }, /* (127) element_list ::= assignment_expression */ + { 106, -2 }, /* (128) element_list ::= elision assignment_expression */ + { 106, -3 }, /* (129) element_list ::= element_list elision assignment_expression */ + { 107, -1 }, /* (130) property_name_and_value_list ::= property_name_and_value */ + { 107, -3 }, /* (131) property_name_and_value_list ::= property_name_and_value_list COMMA property_name_and_value */ + { 109, -1 }, /* (132) property_name ::= STRING */ + { 102, -2 }, /* (133) member_expression_part ::= DOT IDENTIFIER */ + { 81, 0 }, /* (134) adjuster ::= */ + { 81, -1 }, /* (135) adjuster ::= adjust_expression */ + { 112, -1 }, /* (136) adjust_expression ::= adjust_match_expression */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -1406,22 +1548,39 @@ static void yy_accept(yyParser*); /* Forward Declaration */ /* ** Perform a reduce action and the shift that must immediately ** follow the reduce. +** +** The yyLookahead and yyLookaheadToken parameters provide reduce actions +** access to the lookahead token (if any). The yyLookahead will be YYNOCODE +** if the lookahead token has already been consumed. As this procedure is +** only called from one place, optimizing compilers will in-line it, which +** means that the extra parameters have no performance impact. */ -static void yy_reduce( +static YYACTIONTYPE yy_reduce( yyParser *yypParser, /* The parser */ - unsigned int yyruleno /* Number of the rule by which to reduce */ + unsigned int yyruleno, /* Number of the rule by which to reduce */ + int yyLookahead, /* Lookahead token, or YYNOCODE if none */ + grn_expr_parserTOKENTYPE yyLookaheadToken /* Value of the lookahead token */ + grn_expr_parserCTX_PDECL /* %extra_context */ ){ int yygoto; /* The next state */ - int yyact; /* The next action */ + YYACTIONTYPE yyact; /* The next action */ yyStackEntry *yymsp; /* The top of the parser's stack */ int yysize; /* Amount to pop the stack */ - grn_expr_parserARG_FETCH; + grn_expr_parserARG_FETCH + (void)yyLookahead; + (void)yyLookaheadToken; yymsp = yypParser->yytos; #ifndef NDEBUG if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){ yysize = yyRuleInfo[yyruleno].nrhs; - fprintf(yyTraceFILE, "%sReduce [%s], go to state %d.\n", yyTracePrompt, - yyRuleName[yyruleno], yymsp[yysize].stateno); + if( yysize ){ + fprintf(yyTraceFILE, "%sReduce %d [%s], go to state %d.\n", + yyTracePrompt, + yyruleno, yyRuleName[yyruleno], yymsp[yysize].stateno); + }else{ + fprintf(yyTraceFILE, "%sReduce %d [%s].\n", + yyTracePrompt, yyruleno, yyRuleName[yyruleno]); + } } #endif /* NDEBUG */ @@ -1438,13 +1597,19 @@ static void yy_reduce( #if YYSTACKDEPTH>0 if( yypParser->yytos>=yypParser->yystackEnd ){ yyStackOverflow(yypParser); - return; + /* The call to yyStackOverflow() above pops the stack until it is + ** empty, causing the main parser loop to exit. So the return value + ** is never used and does not matter. */ + return 0; } #else if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){ if( yyGrowStack(yypParser) ){ yyStackOverflow(yypParser); - return; + /* The call to yyStackOverflow() above pops the stack until it is + ** empty, causing the main parser loop to exit. So the return value + ** is never used and does not matter. */ + return 0; } yymsp = yypParser->yytos; } @@ -1463,63 +1628,63 @@ static void yy_reduce( /********** Begin reduce actions **********************************************/ YYMINORTYPE yylhsminor; case 0: /* query ::= query query_element */ -#line 53 "grn_ecmascript.lemon" +#line 55 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, grn_int32_value_at(&efsi->op_stack, -1), 2); } -#line 1471 "grn_ecmascript.c" +#line 1636 "../../groonga/lib/grn_ecmascript.c" break; case 1: /* query ::= query LOGICAL_AND query_element */ case 25: /* logical_and_expression ::= logical_and_expression LOGICAL_AND bitwise_or_expression */ yytestcase(yyruleno==25); -#line 56 "grn_ecmascript.lemon" +#line 58 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_AND, 2); } -#line 1479 "grn_ecmascript.c" +#line 1644 "../../groonga/lib/grn_ecmascript.c" break; case 2: /* query ::= query LOGICAL_AND_NOT query_element */ case 26: /* logical_and_expression ::= logical_and_expression LOGICAL_AND_NOT bitwise_or_expression */ yytestcase(yyruleno==26); -#line 59 "grn_ecmascript.lemon" +#line 61 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_AND_NOT, 2); } -#line 1487 "grn_ecmascript.c" +#line 1652 "../../groonga/lib/grn_ecmascript.c" break; case 3: /* query ::= query LOGICAL_OR query_element */ case 24: /* logical_or_expression ::= logical_or_expression LOGICAL_OR logical_and_expression */ yytestcase(yyruleno==24); -#line 62 "grn_ecmascript.lemon" +#line 64 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_OR, 2); } -#line 1495 "grn_ecmascript.c" +#line 1660 "../../groonga/lib/grn_ecmascript.c" break; case 4: /* query ::= query NEGATIVE query_element */ -#line 65 "grn_ecmascript.lemon" +#line 67 "../../groonga/lib/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 1504 "grn_ecmascript.c" +#line 1669 "../../groonga/lib/grn_ecmascript.c" break; case 5: /* query_element ::= ADJUST query_element */ -#line 74 "grn_ecmascript.lemon" +#line 76 "../../groonga/lib/grn_ecmascript.lemon" { int weight; GRN_INT32_POP(&efsi->weight_stack, weight); } -#line 1512 "grn_ecmascript.c" +#line 1677 "../../groonga/lib/grn_ecmascript.c" break; case 6: /* query_element ::= RELATIVE_OP query_element */ -#line 78 "grn_ecmascript.lemon" +#line 80 "../../groonga/lib/grn_ecmascript.lemon" { int mode; GRN_INT32_POP(&efsi->mode_stack, mode); } -#line 1520 "grn_ecmascript.c" +#line 1685 "../../groonga/lib/grn_ecmascript.c" break; case 7: /* query_element ::= IDENTIFIER RELATIVE_OP query_element */ -#line 82 "grn_ecmascript.lemon" +#line 84 "../../groonga/lib/grn_ecmascript.lemon" { int mode; grn_obj *c; @@ -1549,196 +1714,196 @@ static void yy_reduce( break; } } -#line 1553 "grn_ecmascript.c" +#line 1718 "../../groonga/lib/grn_ecmascript.c" break; case 8: /* query_element ::= BRACEL expression BRACER */ case 9: /* query_element ::= EVAL primary_expression */ yytestcase(yyruleno==9); -#line 111 "grn_ecmascript.lemon" +#line 113 "../../groonga/lib/grn_ecmascript.lemon" { efsi->flags = efsi->default_flags; } -#line 1561 "grn_ecmascript.c" +#line 1726 "../../groonga/lib/grn_ecmascript.c" break; case 10: /* expression ::= expression COMMA assignment_expression */ -#line 119 "grn_ecmascript.lemon" +#line 121 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_COMMA, 2); } -#line 1568 "grn_ecmascript.c" +#line 1733 "../../groonga/lib/grn_ecmascript.c" break; case 11: /* assignment_expression ::= lefthand_side_expression ASSIGN assignment_expression */ -#line 124 "grn_ecmascript.lemon" +#line 126 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_ASSIGN, 2); } -#line 1575 "grn_ecmascript.c" +#line 1740 "../../groonga/lib/grn_ecmascript.c" break; case 12: /* assignment_expression ::= lefthand_side_expression STAR_ASSIGN assignment_expression */ -#line 127 "grn_ecmascript.lemon" +#line 129 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_STAR_ASSIGN, 2); } -#line 1582 "grn_ecmascript.c" +#line 1747 "../../groonga/lib/grn_ecmascript.c" break; case 13: /* assignment_expression ::= lefthand_side_expression SLASH_ASSIGN assignment_expression */ -#line 130 "grn_ecmascript.lemon" +#line 132 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_SLASH_ASSIGN, 2); } -#line 1589 "grn_ecmascript.c" +#line 1754 "../../groonga/lib/grn_ecmascript.c" break; case 14: /* assignment_expression ::= lefthand_side_expression MOD_ASSIGN assignment_expression */ -#line 133 "grn_ecmascript.lemon" +#line 135 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_MOD_ASSIGN, 2); } -#line 1596 "grn_ecmascript.c" +#line 1761 "../../groonga/lib/grn_ecmascript.c" break; case 15: /* assignment_expression ::= lefthand_side_expression PLUS_ASSIGN assignment_expression */ -#line 136 "grn_ecmascript.lemon" +#line 138 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_PLUS_ASSIGN, 2); } -#line 1603 "grn_ecmascript.c" +#line 1768 "../../groonga/lib/grn_ecmascript.c" break; case 16: /* assignment_expression ::= lefthand_side_expression MINUS_ASSIGN assignment_expression */ -#line 139 "grn_ecmascript.lemon" +#line 141 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_MINUS_ASSIGN, 2); } -#line 1610 "grn_ecmascript.c" +#line 1775 "../../groonga/lib/grn_ecmascript.c" break; case 17: /* assignment_expression ::= lefthand_side_expression SHIFTL_ASSIGN assignment_expression */ -#line 142 "grn_ecmascript.lemon" +#line 144 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_SHIFTL_ASSIGN, 2); } -#line 1617 "grn_ecmascript.c" +#line 1782 "../../groonga/lib/grn_ecmascript.c" break; case 18: /* assignment_expression ::= lefthand_side_expression SHIFTR_ASSIGN assignment_expression */ -#line 145 "grn_ecmascript.lemon" +#line 147 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_SHIFTR_ASSIGN, 2); } -#line 1624 "grn_ecmascript.c" +#line 1789 "../../groonga/lib/grn_ecmascript.c" break; case 19: /* assignment_expression ::= lefthand_side_expression SHIFTRR_ASSIGN assignment_expression */ -#line 148 "grn_ecmascript.lemon" +#line 150 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_SHIFTRR_ASSIGN, 2); } -#line 1631 "grn_ecmascript.c" +#line 1796 "../../groonga/lib/grn_ecmascript.c" break; case 20: /* assignment_expression ::= lefthand_side_expression AND_ASSIGN assignment_expression */ -#line 151 "grn_ecmascript.lemon" +#line 153 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_AND_ASSIGN, 2); } -#line 1638 "grn_ecmascript.c" +#line 1803 "../../groonga/lib/grn_ecmascript.c" break; case 21: /* assignment_expression ::= lefthand_side_expression XOR_ASSIGN assignment_expression */ -#line 154 "grn_ecmascript.lemon" +#line 156 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_XOR_ASSIGN, 2); } -#line 1645 "grn_ecmascript.c" +#line 1810 "../../groonga/lib/grn_ecmascript.c" break; case 22: /* assignment_expression ::= lefthand_side_expression OR_ASSIGN assignment_expression */ -#line 157 "grn_ecmascript.lemon" +#line 159 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_OR_ASSIGN, 2); } -#line 1652 "grn_ecmascript.c" +#line 1817 "../../groonga/lib/grn_ecmascript.c" break; case 23: /* conditional_expression ::= logical_or_expression QUESTION assignment_expression COLON assignment_expression */ -#line 162 "grn_ecmascript.lemon" +#line 164 "../../groonga/lib/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 1661 "grn_ecmascript.c" +#line 1826 "../../groonga/lib/grn_ecmascript.c" break; case 27: /* bitwise_or_expression ::= bitwise_or_expression BITWISE_OR bitwise_xor_expression */ -#line 182 "grn_ecmascript.lemon" +#line 184 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_BITWISE_OR, 2); } -#line 1668 "grn_ecmascript.c" +#line 1833 "../../groonga/lib/grn_ecmascript.c" break; case 28: /* bitwise_xor_expression ::= bitwise_xor_expression BITWISE_XOR bitwise_and_expression */ -#line 187 "grn_ecmascript.lemon" +#line 189 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_BITWISE_XOR, 2); } -#line 1675 "grn_ecmascript.c" +#line 1840 "../../groonga/lib/grn_ecmascript.c" break; case 29: /* bitwise_and_expression ::= bitwise_and_expression BITWISE_AND equality_expression */ -#line 192 "grn_ecmascript.lemon" +#line 194 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_BITWISE_AND, 2); } -#line 1682 "grn_ecmascript.c" +#line 1847 "../../groonga/lib/grn_ecmascript.c" break; case 30: /* equality_expression ::= equality_expression EQUAL relational_expression */ -#line 197 "grn_ecmascript.lemon" +#line 199 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_EQUAL, 2); } -#line 1689 "grn_ecmascript.c" +#line 1854 "../../groonga/lib/grn_ecmascript.c" break; case 31: /* equality_expression ::= equality_expression NOT_EQUAL relational_expression */ -#line 200 "grn_ecmascript.lemon" +#line 202 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_NOT_EQUAL, 2); } -#line 1696 "grn_ecmascript.c" +#line 1861 "../../groonga/lib/grn_ecmascript.c" break; case 32: /* relational_expression ::= relational_expression LESS shift_expression */ -#line 205 "grn_ecmascript.lemon" +#line 207 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_LESS, 2); } -#line 1703 "grn_ecmascript.c" +#line 1868 "../../groonga/lib/grn_ecmascript.c" break; case 33: /* relational_expression ::= relational_expression GREATER shift_expression */ -#line 208 "grn_ecmascript.lemon" +#line 210 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_GREATER, 2); } -#line 1710 "grn_ecmascript.c" +#line 1875 "../../groonga/lib/grn_ecmascript.c" break; case 34: /* relational_expression ::= relational_expression LESS_EQUAL shift_expression */ -#line 211 "grn_ecmascript.lemon" +#line 213 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_LESS_EQUAL, 2); } -#line 1717 "grn_ecmascript.c" +#line 1882 "../../groonga/lib/grn_ecmascript.c" break; case 35: /* relational_expression ::= relational_expression GREATER_EQUAL shift_expression */ -#line 214 "grn_ecmascript.lemon" +#line 216 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_GREATER_EQUAL, 2); } -#line 1724 "grn_ecmascript.c" +#line 1889 "../../groonga/lib/grn_ecmascript.c" break; case 36: /* relational_expression ::= relational_expression IN shift_expression */ -#line 217 "grn_ecmascript.lemon" +#line 219 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_IN, 2); } -#line 1731 "grn_ecmascript.c" +#line 1896 "../../groonga/lib/grn_ecmascript.c" break; case 37: /* relational_expression ::= relational_expression MATCH shift_expression */ case 86: /* adjust_match_expression ::= IDENTIFIER MATCH STRING */ yytestcase(yyruleno==86); -#line 220 "grn_ecmascript.lemon" +#line 222 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_MATCH, 2); } -#line 1739 "grn_ecmascript.c" +#line 1904 "../../groonga/lib/grn_ecmascript.c" break; case 38: /* relational_expression ::= relational_expression NEAR shift_expression */ -#line 223 "grn_ecmascript.lemon" +#line 225 "../../groonga/lib/grn_ecmascript.lemon" { { int max_interval; @@ -1748,17 +1913,17 @@ static void yy_reduce( } grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_NEAR, 3); } -#line 1752 "grn_ecmascript.c" +#line 1917 "../../groonga/lib/grn_ecmascript.c" break; case 39: /* relational_expression ::= relational_expression NEAR2 shift_expression */ -#line 232 "grn_ecmascript.lemon" +#line 234 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_NEAR2, 2); } -#line 1759 "grn_ecmascript.c" +#line 1924 "../../groonga/lib/grn_ecmascript.c" break; case 40: /* relational_expression ::= relational_expression SIMILAR shift_expression */ -#line 235 "grn_ecmascript.lemon" +#line 237 "../../groonga/lib/grn_ecmascript.lemon" { { int similarity_threshold; @@ -1768,17 +1933,17 @@ static void yy_reduce( } grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_SIMILAR, 3); } -#line 1772 "grn_ecmascript.c" +#line 1937 "../../groonga/lib/grn_ecmascript.c" break; case 41: /* relational_expression ::= relational_expression TERM_EXTRACT shift_expression */ -#line 244 "grn_ecmascript.lemon" +#line 246 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_TERM_EXTRACT, 2); } -#line 1779 "grn_ecmascript.c" +#line 1944 "../../groonga/lib/grn_ecmascript.c" break; case 42: /* relational_expression ::= relational_expression QUORUM shift_expression */ -#line 247 "grn_ecmascript.lemon" +#line 249 "../../groonga/lib/grn_ecmascript.lemon" { { int quorum_threshold; @@ -1788,103 +1953,103 @@ static void yy_reduce( } grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_QUORUM, 3); } -#line 1792 "grn_ecmascript.c" +#line 1957 "../../groonga/lib/grn_ecmascript.c" break; case 43: /* relational_expression ::= relational_expression LCP shift_expression */ -#line 256 "grn_ecmascript.lemon" +#line 258 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_LCP, 2); } -#line 1799 "grn_ecmascript.c" +#line 1964 "../../groonga/lib/grn_ecmascript.c" break; case 44: /* relational_expression ::= relational_expression PREFIX shift_expression */ -#line 259 "grn_ecmascript.lemon" +#line 261 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_PREFIX, 2); } -#line 1806 "grn_ecmascript.c" +#line 1971 "../../groonga/lib/grn_ecmascript.c" break; case 45: /* relational_expression ::= relational_expression SUFFIX shift_expression */ -#line 262 "grn_ecmascript.lemon" +#line 264 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_SUFFIX, 2); } -#line 1813 "grn_ecmascript.c" +#line 1978 "../../groonga/lib/grn_ecmascript.c" break; case 46: /* relational_expression ::= relational_expression REGEXP shift_expression */ -#line 265 "grn_ecmascript.lemon" +#line 267 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_REGEXP, 2); } -#line 1820 "grn_ecmascript.c" +#line 1985 "../../groonga/lib/grn_ecmascript.c" break; case 47: /* shift_expression ::= shift_expression SHIFTL additive_expression */ -#line 270 "grn_ecmascript.lemon" +#line 272 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_SHIFTL, 2); } -#line 1827 "grn_ecmascript.c" +#line 1992 "../../groonga/lib/grn_ecmascript.c" break; case 48: /* shift_expression ::= shift_expression SHIFTR additive_expression */ -#line 273 "grn_ecmascript.lemon" +#line 275 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_SHIFTR, 2); } -#line 1834 "grn_ecmascript.c" +#line 1999 "../../groonga/lib/grn_ecmascript.c" break; case 49: /* shift_expression ::= shift_expression SHIFTRR additive_expression */ -#line 276 "grn_ecmascript.lemon" +#line 278 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_SHIFTRR, 2); } -#line 1841 "grn_ecmascript.c" +#line 2006 "../../groonga/lib/grn_ecmascript.c" break; case 50: /* additive_expression ::= additive_expression PLUS multiplicative_expression */ case 84: /* adjuster ::= adjuster PLUS adjust_expression */ yytestcase(yyruleno==84); -#line 281 "grn_ecmascript.lemon" +#line 283 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_PLUS, 2); } -#line 1849 "grn_ecmascript.c" +#line 2014 "../../groonga/lib/grn_ecmascript.c" break; case 51: /* additive_expression ::= additive_expression MINUS multiplicative_expression */ -#line 284 "grn_ecmascript.lemon" +#line 286 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_MINUS, 2); } -#line 1856 "grn_ecmascript.c" +#line 2021 "../../groonga/lib/grn_ecmascript.c" break; case 52: /* multiplicative_expression ::= multiplicative_expression STAR unary_expression */ case 85: /* adjust_expression ::= adjust_match_expression STAR DECIMAL */ yytestcase(yyruleno==85); -#line 289 "grn_ecmascript.lemon" +#line 291 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_STAR, 2); } -#line 1864 "grn_ecmascript.c" +#line 2029 "../../groonga/lib/grn_ecmascript.c" break; case 53: /* multiplicative_expression ::= multiplicative_expression SLASH unary_expression */ -#line 292 "grn_ecmascript.lemon" +#line 294 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_SLASH, 2); } -#line 1871 "grn_ecmascript.c" +#line 2036 "../../groonga/lib/grn_ecmascript.c" break; case 54: /* multiplicative_expression ::= multiplicative_expression MOD unary_expression */ -#line 295 "grn_ecmascript.lemon" +#line 297 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_MOD, 2); } -#line 1878 "grn_ecmascript.c" +#line 2043 "../../groonga/lib/grn_ecmascript.c" break; case 55: /* unary_expression ::= DELETE unary_expression */ -#line 300 "grn_ecmascript.lemon" +#line 302 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_DELETE, 1); } -#line 1885 "grn_ecmascript.c" +#line 2050 "../../groonga/lib/grn_ecmascript.c" break; case 56: /* unary_expression ::= INCR unary_expression */ -#line 303 "grn_ecmascript.lemon" +#line 305 "../../groonga/lib/grn_ecmascript.lemon" { grn_ctx *ctx = efsi->ctx; grn_expr *e = (grn_expr *)(efsi->e); @@ -1902,10 +2067,10 @@ static void yy_reduce( grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_INCR, 1); } } -#line 1906 "grn_ecmascript.c" +#line 2071 "../../groonga/lib/grn_ecmascript.c" break; case 57: /* unary_expression ::= DECR unary_expression */ -#line 320 "grn_ecmascript.lemon" +#line 322 "../../groonga/lib/grn_ecmascript.lemon" { grn_ctx *ctx = efsi->ctx; grn_expr *e = (grn_expr *)(efsi->e); @@ -1923,66 +2088,66 @@ static void yy_reduce( grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_DECR, 1); } } -#line 1927 "grn_ecmascript.c" +#line 2092 "../../groonga/lib/grn_ecmascript.c" break; case 58: /* unary_expression ::= PLUS unary_expression */ -#line 337 "grn_ecmascript.lemon" +#line 339 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_PLUS, 1); } -#line 1934 "grn_ecmascript.c" +#line 2099 "../../groonga/lib/grn_ecmascript.c" break; case 59: /* unary_expression ::= MINUS unary_expression */ -#line 340 "grn_ecmascript.lemon" +#line 342 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_MINUS, 1); } -#line 1941 "grn_ecmascript.c" +#line 2106 "../../groonga/lib/grn_ecmascript.c" break; case 60: /* unary_expression ::= NOT unary_expression */ -#line 343 "grn_ecmascript.lemon" +#line 345 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_NOT, 1); } -#line 1948 "grn_ecmascript.c" +#line 2113 "../../groonga/lib/grn_ecmascript.c" break; case 61: /* unary_expression ::= BITWISE_NOT unary_expression */ -#line 346 "grn_ecmascript.lemon" +#line 348 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_BITWISE_NOT, 1); } -#line 1955 "grn_ecmascript.c" +#line 2120 "../../groonga/lib/grn_ecmascript.c" break; case 62: /* unary_expression ::= ADJUST unary_expression */ -#line 349 "grn_ecmascript.lemon" +#line 351 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_ADJUST, 1); } -#line 1962 "grn_ecmascript.c" +#line 2127 "../../groonga/lib/grn_ecmascript.c" break; case 63: /* unary_expression ::= EXACT unary_expression */ -#line 352 "grn_ecmascript.lemon" +#line 354 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_EXACT, 1); } -#line 1969 "grn_ecmascript.c" +#line 2134 "../../groonga/lib/grn_ecmascript.c" break; case 64: /* unary_expression ::= PARTIAL unary_expression */ -#line 355 "grn_ecmascript.lemon" +#line 357 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_PARTIAL, 1); } -#line 1976 "grn_ecmascript.c" +#line 2141 "../../groonga/lib/grn_ecmascript.c" break; case 65: /* unary_expression ::= UNSPLIT unary_expression */ -#line 358 "grn_ecmascript.lemon" +#line 360 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_UNSPLIT, 1); } -#line 1983 "grn_ecmascript.c" +#line 2148 "../../groonga/lib/grn_ecmascript.c" break; case 66: /* postfix_expression ::= lefthand_side_expression INCR */ -#line 363 "grn_ecmascript.lemon" +#line 365 "../../groonga/lib/grn_ecmascript.lemon" { grn_ctx *ctx = efsi->ctx; grn_expr *e = (grn_expr *)(efsi->e); @@ -2000,10 +2165,10 @@ static void yy_reduce( grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_INCR_POST, 1); } } -#line 2004 "grn_ecmascript.c" +#line 2169 "../../groonga/lib/grn_ecmascript.c" break; case 67: /* postfix_expression ::= lefthand_side_expression DECR */ -#line 380 "grn_ecmascript.lemon" +#line 382 "../../groonga/lib/grn_ecmascript.lemon" { grn_ctx *ctx = efsi->ctx; grn_expr *e = (grn_expr *)(efsi->e); @@ -2021,17 +2186,17 @@ static void yy_reduce( grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_DECR_POST, 1); } } -#line 2025 "grn_ecmascript.c" +#line 2190 "../../groonga/lib/grn_ecmascript.c" break; case 68: /* call_expression ::= member_expression arguments */ -#line 401 "grn_ecmascript.lemon" +#line 403 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_CALL, yymsp[0].minor.yy0); } -#line 2032 "grn_ecmascript.c" +#line 2197 "../../groonga/lib/grn_ecmascript.c" break; case 69: /* object_literal ::= BRACEL property_name_and_value_list BRACER */ -#line 429 "grn_ecmascript.lemon" +#line 431 "../../groonga/lib/grn_ecmascript.lemon" { grn_ctx *ctx = efsi->ctx; grn_expr_take_obj(ctx, efsi->e, (grn_obj *)(efsi->object_literal)); @@ -2039,10 +2204,10 @@ static void yy_reduce( GRN_OP_PUSH, 1); efsi->object_literal = NULL; } -#line 2043 "grn_ecmascript.c" +#line 2208 "../../groonga/lib/grn_ecmascript.c" break; case 70: /* property_name_and_value_list ::= */ -#line 437 "grn_ecmascript.lemon" +#line 439 "../../groonga/lib/grn_ecmascript.lemon" { grn_ctx *ctx = efsi->ctx; @@ -2055,10 +2220,10 @@ static void yy_reduce( (int)(efsi->str_end - efsi->str), efsi->str); } } -#line 2059 "grn_ecmascript.c" +#line 2224 "../../groonga/lib/grn_ecmascript.c" break; case 71: /* property_name_and_value ::= property_name COLON assignment_expression */ -#line 452 "grn_ecmascript.lemon" +#line 454 "../../groonga/lib/grn_ecmascript.lemon" { grn_ctx *ctx = efsi->ctx; grn_expr *e = (grn_expr *)(efsi->e); @@ -2100,61 +2265,61 @@ static void yy_reduce( } } } -#line 2104 "grn_ecmascript.c" +#line 2269 "../../groonga/lib/grn_ecmascript.c" break; case 72: /* member_expression_part ::= BRACKETL expression BRACKETR */ -#line 496 "grn_ecmascript.lemon" +#line 498 "../../groonga/lib/grn_ecmascript.lemon" { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_GET_MEMBER, 2); } -#line 2111 "grn_ecmascript.c" +#line 2276 "../../groonga/lib/grn_ecmascript.c" break; case 73: /* arguments ::= PARENL argument_list PARENR */ -#line 501 "grn_ecmascript.lemon" +#line 503 "../../groonga/lib/grn_ecmascript.lemon" { yymsp[-2].minor.yy0 = yymsp[-1].minor.yy0; } -#line 2116 "grn_ecmascript.c" +#line 2281 "../../groonga/lib/grn_ecmascript.c" break; case 74: /* argument_list ::= */ -#line 502 "grn_ecmascript.lemon" +#line 504 "../../groonga/lib/grn_ecmascript.lemon" { yymsp[1].minor.yy0 = 0; } -#line 2121 "grn_ecmascript.c" +#line 2286 "../../groonga/lib/grn_ecmascript.c" break; case 75: /* argument_list ::= assignment_expression */ -#line 503 "grn_ecmascript.lemon" +#line 505 "../../groonga/lib/grn_ecmascript.lemon" { yymsp[0].minor.yy0 = 1; } -#line 2126 "grn_ecmascript.c" +#line 2291 "../../groonga/lib/grn_ecmascript.c" break; case 76: /* argument_list ::= argument_list COMMA assignment_expression */ -#line 504 "grn_ecmascript.lemon" +#line 506 "../../groonga/lib/grn_ecmascript.lemon" { yylhsminor.yy0 = yymsp[-2].minor.yy0 + 1; } -#line 2131 "grn_ecmascript.c" +#line 2296 "../../groonga/lib/grn_ecmascript.c" yymsp[-2].minor.yy0 = yylhsminor.yy0; break; case 77: /* output_columns ::= */ -#line 506 "grn_ecmascript.lemon" +#line 508 "../../groonga/lib/grn_ecmascript.lemon" { yymsp[1].minor.yy0 = 0; } -#line 2139 "grn_ecmascript.c" +#line 2304 "../../groonga/lib/grn_ecmascript.c" break; case 78: /* output_columns ::= output_column */ -#line 509 "grn_ecmascript.lemon" +#line 511 "../../groonga/lib/grn_ecmascript.lemon" { yylhsminor.yy0 = yymsp[0].minor.yy0; } -#line 2146 "grn_ecmascript.c" +#line 2311 "../../groonga/lib/grn_ecmascript.c" yymsp[0].minor.yy0 = yylhsminor.yy0; break; case 79: /* output_columns ::= output_columns COMMA */ -#line 514 "grn_ecmascript.lemon" +#line 516 "../../groonga/lib/grn_ecmascript.lemon" { yylhsminor.yy0 = yymsp[-1].minor.yy0; } -#line 2154 "grn_ecmascript.c" +#line 2319 "../../groonga/lib/grn_ecmascript.c" yymsp[-1].minor.yy0 = yylhsminor.yy0; break; case 80: /* output_columns ::= output_columns COMMA output_column */ -#line 519 "grn_ecmascript.lemon" +#line 521 "../../groonga/lib/grn_ecmascript.lemon" { if (yymsp[-2].minor.yy0 == 0) { yylhsminor.yy0 = yymsp[0].minor.yy0; @@ -2167,11 +2332,11 @@ static void yy_reduce( yylhsminor.yy0 = 1; } } -#line 2171 "grn_ecmascript.c" +#line 2336 "../../groonga/lib/grn_ecmascript.c" yymsp[-2].minor.yy0 = yylhsminor.yy0; break; case 81: /* output_column ::= STAR */ -#line 532 "grn_ecmascript.lemon" +#line 534 "../../groonga/lib/grn_ecmascript.lemon" { grn_ctx *ctx = efsi->ctx; grn_obj *expr = efsi->e; @@ -2222,21 +2387,21 @@ static void yy_reduce( yymsp[0].minor.yy0 = 0; } } -#line 2226 "grn_ecmascript.c" +#line 2391 "../../groonga/lib/grn_ecmascript.c" break; case 82: /* output_column ::= NONEXISTENT_COLUMN */ -#line 582 "grn_ecmascript.lemon" +#line 584 "../../groonga/lib/grn_ecmascript.lemon" { yymsp[0].minor.yy0 = 0; } -#line 2233 "grn_ecmascript.c" +#line 2398 "../../groonga/lib/grn_ecmascript.c" break; case 83: /* output_column ::= assignment_expression */ -#line 585 "grn_ecmascript.lemon" +#line 587 "../../groonga/lib/grn_ecmascript.lemon" { yymsp[0].minor.yy0 = 1; } -#line 2240 "grn_ecmascript.c" +#line 2405 "../../groonga/lib/grn_ecmascript.c" break; default: /* (87) input ::= query */ yytestcase(yyruleno==87); @@ -2304,16 +2469,12 @@ static void yy_reduce( /* It is not possible for a REDUCE to be followed by an error */ assert( yyact!=YY_ERROR_ACTION ); - if( yyact==YY_ACCEPT_ACTION ){ - yypParser->yytos += yysize; - yy_accept(yypParser); - }else{ - yymsp += yysize+1; - yypParser->yytos = yymsp; - yymsp->stateno = (YYACTIONTYPE)yyact; - yymsp->major = (YYCODETYPE)yygoto; - yyTraceShift(yypParser, yyact); - } + yymsp += yysize+1; + yypParser->yytos = yymsp; + yymsp->stateno = (YYACTIONTYPE)yyact; + yymsp->major = (YYCODETYPE)yygoto; + yyTraceShift(yypParser, yyact, "... then shift"); + return yyact; } /* @@ -2323,7 +2484,8 @@ static void yy_reduce( static void yy_parse_failed( yyParser *yypParser /* The parser */ ){ - grn_expr_parserARG_FETCH; + grn_expr_parserARG_FETCH + grn_expr_parserCTX_FETCH #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt); @@ -2334,7 +2496,8 @@ static void yy_parse_failed( ** parser fails */ /************ Begin %parse_failure code ***************************************/ /************ End %parse_failure code *****************************************/ - grn_expr_parserARG_STORE; /* Suppress warning about unused %extra_argument variable */ + grn_expr_parserARG_STORE /* Suppress warning about unused %extra_argument variable */ + grn_expr_parserCTX_STORE } #endif /* YYNOERRORRECOVERY */ @@ -2346,10 +2509,11 @@ static void yy_syntax_error( int yymajor, /* The major type of the error token */ grn_expr_parserTOKENTYPE yyminor /* The minor type of the error token */ ){ - grn_expr_parserARG_FETCH; + grn_expr_parserARG_FETCH + grn_expr_parserCTX_FETCH #define TOKEN yyminor /************ Begin %syntax_error code ****************************************/ -#line 20 "grn_ecmascript.lemon" +#line 20 "../../groonga/lib/grn_ecmascript.lemon" { grn_ctx *ctx = efsi->ctx; @@ -2369,15 +2533,18 @@ static void yy_syntax_error( ERR(GRN_SYNTAX_ERROR, "Syntax error: <%.*s>", (int)GRN_TEXT_LEN(&message), GRN_TEXT_VALUE(&message)); } else { + char errbuf[GRN_CTX_MSGSIZE]; + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); ERR(ctx->rc, "Syntax error: <%.*s>: %s", (int)GRN_TEXT_LEN(&message), GRN_TEXT_VALUE(&message), - ctx->errbuf); + errbuf); } GRN_OBJ_FIN(ctx, &message); } -#line 2379 "grn_ecmascript.c" +#line 2545 "../../groonga/lib/grn_ecmascript.c" /************ End %syntax_error code ******************************************/ - grn_expr_parserARG_STORE; /* Suppress warning about unused %extra_argument variable */ + grn_expr_parserARG_STORE /* Suppress warning about unused %extra_argument variable */ + grn_expr_parserCTX_STORE } /* @@ -2386,7 +2553,8 @@ static void yy_syntax_error( static void yy_accept( yyParser *yypParser /* The parser */ ){ - grn_expr_parserARG_FETCH; + grn_expr_parserARG_FETCH + grn_expr_parserCTX_FETCH #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt); @@ -2400,7 +2568,8 @@ static void yy_accept( ** parser accepts */ /*********** Begin %parse_accept code *****************************************/ /*********** End %parse_accept code *******************************************/ - grn_expr_parserARG_STORE; /* Suppress warning about unused %extra_argument variable */ + grn_expr_parserARG_STORE /* Suppress warning about unused %extra_argument variable */ + grn_expr_parserCTX_STORE } /* The main parser program. @@ -2429,38 +2598,51 @@ void grn_expr_parser( grn_expr_parserARG_PDECL /* Optional %extra_argument parameter */ ){ YYMINORTYPE yyminorunion; - unsigned int yyact; /* The parser action. */ + YYACTIONTYPE yyact; /* The parser action. */ #if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY) int yyendofinput; /* True if we are at the end of input */ #endif #ifdef YYERRORSYMBOL int yyerrorhit = 0; /* True if yymajor has invoked an error */ #endif - yyParser *yypParser; /* The parser */ + yyParser *yypParser = (yyParser*)yyp; /* The parser */ + grn_expr_parserCTX_FETCH + grn_expr_parserARG_STORE - yypParser = (yyParser*)yyp; assert( yypParser->yytos!=0 ); #if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY) yyendofinput = (yymajor==0); #endif - grn_expr_parserARG_STORE; + yyact = yypParser->yytos->stateno; #ifndef NDEBUG if( yyTraceFILE ){ - fprintf(yyTraceFILE,"%sInput '%s'\n",yyTracePrompt,yyTokenName[yymajor]); + if( yyact < YY_MIN_REDUCE ){ + fprintf(yyTraceFILE,"%sInput '%s' in state %d\n", + yyTracePrompt,yyTokenName[yymajor],yyact); + }else{ + fprintf(yyTraceFILE,"%sInput '%s' with pending reduce %d\n", + yyTracePrompt,yyTokenName[yymajor],yyact-YY_MIN_REDUCE); + } } #endif do{ - yyact = yy_find_shift_action(yypParser,(YYCODETYPE)yymajor); - if( yyact <= YY_MAX_SHIFTREDUCE ){ - yy_shift(yypParser,yyact,yymajor,yyminor); + assert( yyact==yypParser->yytos->stateno ); + yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact); + if( yyact >= YY_MIN_REDUCE ){ + yyact = yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor, + yyminor grn_expr_parserCTX_PARAM); + }else if( yyact <= YY_MAX_SHIFTREDUCE ){ + yy_shift(yypParser,yyact,(YYCODETYPE)yymajor,yyminor); #ifndef YYNOERRORRECOVERY yypParser->yyerrcnt--; #endif - yymajor = YYNOCODE; - }else if( yyact <= YY_MAX_REDUCE ){ - yy_reduce(yypParser,yyact-YY_MIN_REDUCE); + break; + }else if( yyact==YY_ACCEPT_ACTION ){ + yypParser->yytos--; + yy_accept(yypParser); + return; }else{ assert( yyact == YY_ERROR_ACTION ); yyminorunion.yy0 = yyminor; @@ -2507,10 +2689,9 @@ void grn_expr_parser( yymajor = YYNOCODE; }else{ while( yypParser->yytos >= yypParser->yystack - && yymx != YYERRORSYMBOL && (yyact = yy_find_reduce_action( yypParser->yytos->stateno, - YYERRORSYMBOL)) >= YY_MIN_REDUCE + YYERRORSYMBOL)) > YY_MAX_SHIFTREDUCE ){ yy_pop_parser_stack(yypParser); } @@ -2527,6 +2708,8 @@ void grn_expr_parser( } yypParser->yyerrcnt = 3; yyerrorhit = 1; + if( yymajor==YYNOCODE ) break; + yyact = yypParser->yytos->stateno; #elif defined(YYNOERRORRECOVERY) /* If the YYNOERRORRECOVERY macro is defined, then do not attempt to ** do any kind of error recovery. Instead, simply invoke the syntax @@ -2537,8 +2720,7 @@ void grn_expr_parser( */ yy_syntax_error(yypParser,yymajor, yyminor); yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); - yymajor = YYNOCODE; - + break; #else /* YYERRORSYMBOL is not defined */ /* This is what we do if the grammar does not define ERROR: ** @@ -2560,10 +2742,10 @@ void grn_expr_parser( yypParser->yyerrcnt = -1; #endif } - yymajor = YYNOCODE; + break; #endif } - }while( yymajor!=YYNOCODE && yypParser->yytos>yypParser->yystack ); + }while( yypParser->yytos>yypParser->yystack ); #ifndef NDEBUG if( yyTraceFILE ){ yyStackEntry *i; @@ -2578,3 +2760,18 @@ void grn_expr_parser( #endif return; } + +/* +** Return the fallback token corresponding to canonical token iToken, or +** 0 if iToken has no fallback. +*/ +int grn_expr_parserFallback(int iToken){ +#ifdef YYFALLBACK + if( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) ){ + return yyFallback[iToken]; + } +#else + (void)iToken; +#endif + return 0; +} Modified: lib/grn_ecmascript.lemon (+3 -1) =================================================================== --- lib/grn_ecmascript.lemon 2019-01-21 15:26:19 +0900 (d9a09d923) +++ lib/grn_ecmascript.lemon 2019-01-21 15:42:42 +0900 (eff060ace) @@ -36,9 +36,11 @@ ERR(GRN_SYNTAX_ERROR, "Syntax error: <%.*s>", (int)GRN_TEXT_LEN(&message), GRN_TEXT_VALUE(&message)); } else { + char errbuf[GRN_CTX_MSGSIZE]; + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); ERR(ctx->rc, "Syntax error: <%.*s>: %s", (int)GRN_TEXT_LEN(&message), GRN_TEXT_VALUE(&message), - ctx->errbuf); + errbuf); } GRN_OBJ_FIN(ctx, &message); } Modified: lib/highlighter.c (+15 -5) =================================================================== --- lib/highlighter.c 2019-01-21 15:26:19 +0900 (d7940cae8) +++ lib/highlighter.c 2019-01-21 15:42:42 +0900 (3d2035d4e) @@ -92,9 +92,11 @@ grn_highlighter_open(grn_ctx *ctx) highlighter = GRN_MALLOCN(grn_highlighter, 1); if (!highlighter) { + char errbuf[GRN_CTX_MSGSIZE]; + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); ERR(ctx->rc, "[highlighter][open] failed to allocate memory: %s", - ctx->errbuf); + errbuf); GRN_API_RETURN(NULL); } @@ -182,14 +184,16 @@ grn_highlighter_remove_unused_ids(grn_ctx *ctx, 0, -1, 0); if (!cursor) { grn_rc rc = ctx->rc; + char errbuf[GRN_CTX_MSGSIZE]; if (rc == GRN_SUCCESS) { rc = GRN_UNKNOWN_ERROR; } + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); ERR(rc, "[highlighter][prepare]%s " "failed to create a cursor for internal patricia trie: %s", tag, - ctx->errbuf); + errbuf); return; } @@ -254,13 +258,15 @@ grn_highlighter_prepare_lexicon(grn_ctx *ctx, NULL); if (!highlighter->lexicon.token_id_chunks) { grn_rc rc = ctx->rc; + char errbuf[GRN_CTX_MSGSIZE]; if (rc == GRN_SUCCESS) { rc = GRN_UNKNOWN_ERROR; } + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); ERR(rc, "[highlighter][prepare][lexicon] " "failed to create an internal patricia trie: %s", - ctx->errbuf); + errbuf); return; } token_id_chunk_ids->header.domain = @@ -378,13 +384,15 @@ grn_highlighter_prepare_patricia_trie(grn_ctx *ctx, NULL); if (!highlighter->pat.keywords) { grn_rc rc = ctx->rc; + char errbuf[GRN_CTX_MSGSIZE]; if (rc == GRN_SUCCESS) { rc = GRN_UNKNOWN_ERROR; } + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); ERR(rc, "[highlighter][prepare][no-lexicon] " "failed to create an internal patricia trie: %s", - ctx->errbuf); + errbuf); return; } keyword_ids->header.domain = grn_obj_id(ctx, highlighter->pat.keywords); @@ -544,10 +552,12 @@ grn_highlighter_highlight_lexicon(grn_ctx *ctx, GRN_TOKENIZE_ADD, 0); if (!cursor) { + char errbuf[GRN_CTX_MSGSIZE]; + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); ERR(ctx->rc, "%s failed to start tokenizing: %s", tag, - ctx->errbuf); + errbuf); return; } Modified: lib/ii.c (+29 -11) =================================================================== --- lib/ii.c 2019-01-21 15:26:19 +0900 (66bed9a88) +++ lib/ii.c 2019-01-21 15:42:42 +0900 (1e0fdcd00) @@ -5206,9 +5206,11 @@ grn_ii_update_one(grn_ctx *ctx, grn_ii *ii, grn_id tid, grn_ii_updspec *u, grn_h buffer_split(ctx, ii, LSEG(pos), h); if (ctx->rc != GRN_SUCCESS) { grn_obj term; + char errbuf[GRN_CTX_MSGSIZE]; DEFINE_NAME(ii); GRN_TEXT_INIT(&term, 0); grn_ii_get_term(ctx, ii, tid, &term); + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); ERR(ctx->rc, "[ii][update][one] failed to split a buffer: " "<%.*s>: " @@ -5225,7 +5227,7 @@ grn_ii_update_one(grn_ctx *ctx, grn_ii *ii, grn_id tid, grn_ii_updspec *u, grn_h pos, b->header.buffer_free, size, - ctx->errbuf); + errbuf); GRN_OBJ_FIN(ctx, &term); goto exit; } @@ -5234,9 +5236,11 @@ grn_ii_update_one(grn_ctx *ctx, grn_ii *ii, grn_id tid, grn_ii_updspec *u, grn_h buffer_flush(ctx, ii, LSEG(pos), h); if (ctx->rc != GRN_SUCCESS) { grn_obj term; + char errbuf[GRN_CTX_MSGSIZE]; DEFINE_NAME(ii); GRN_TEXT_INIT(&term, 0); grn_ii_get_term(ctx, ii, tid, &term); + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); ERR(ctx->rc, "[ii][update][one] failed to flush a buffer: " "<%.*s>: " @@ -5252,7 +5256,7 @@ grn_ii_update_one(grn_ctx *ctx, grn_ii *ii, grn_id tid, grn_ii_updspec *u, grn_h pos, b->header.buffer_free, size, - ctx->errbuf); + errbuf); GRN_OBJ_FIN(ctx, &term); goto exit; } @@ -5386,9 +5390,11 @@ grn_ii_update_one(grn_ctx *ctx, grn_ii *ii, grn_id tid, grn_ii_updspec *u, grn_h buffer_close(ctx, ii, pseg); { grn_obj term; + char errbuf[GRN_CTX_MSGSIZE]; DEFINE_NAME(ii); GRN_TEXT_INIT(&term, 0); grn_ii_get_term(ctx, ii, tid, &term); + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); MERR("[ii][update][one] failed to put to buffer: " "<%.*s>: " "<%.*s>(%u): " @@ -5398,7 +5404,7 @@ grn_ii_update_one(grn_ctx *ctx, grn_ii *ii, grn_id tid, grn_ii_updspec *u, grn_h (int)GRN_TEXT_LEN(&term), GRN_TEXT_VALUE(&term), tid, u2.rid, u2.sid, - ctx->errbuf); + errbuf); GRN_OBJ_FIN(ctx, &term); } goto exit; @@ -5569,9 +5575,11 @@ grn_ii_delete_one(grn_ctx *ctx, grn_ii *ii, grn_id tid, grn_ii_updspec *u, grn_h buffer_flush(ctx, ii, LSEG(a[0]), h); if (ctx->rc != GRN_SUCCESS) { grn_obj term; + char errbuf[GRN_CTX_MSGSIZE]; DEFINE_NAME(ii); GRN_TEXT_INIT(&term, 0); grn_ii_get_term(ctx, ii, tid, &term); + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); ERR(ctx->rc, "[ii][delete][one] failed to flush a buffer: " "<%.*s>: " @@ -5584,7 +5592,7 @@ grn_ii_delete_one(grn_ctx *ctx, grn_ii *ii, grn_id tid, grn_ii_updspec *u, grn_h tid, u->rid, u->sid, a[0], - ctx->errbuf); + errbuf); GRN_OBJ_FIN(ctx, &term); goto exit; } @@ -8731,9 +8739,11 @@ grn_ii_select_cursor_open(grn_ctx *ctx, cursor = GRN_CALLOC(sizeof(grn_ii_select_cursor)); if (!cursor) { + char errbuf[GRN_CTX_MSGSIZE]; + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); ERR(ctx->rc, "[ii][select][cursor][open] failed to allocate cursor: %s", - ctx->errbuf); + errbuf); return NULL; } @@ -8741,9 +8751,11 @@ grn_ii_select_cursor_open(grn_ctx *ctx, cursor->mode = mode; if (!(cursor->tis = GRN_MALLOC(sizeof(token_info *) * string_len * 2))) { + char errbuf[GRN_CTX_MSGSIZE]; + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); ERR(ctx->rc, "[ii][select][cursor][open] failed to allocate token info container: %s", - ctx->errbuf); + errbuf); GRN_FREE(cursor); return NULL; } @@ -8781,9 +8793,11 @@ grn_ii_select_cursor_open(grn_ctx *ctx, /* fallthru */ case GRN_OP_NEAR : if (!(cursor->bt = bt_open(ctx, cursor->n_tis))) { + char errbuf[GRN_CTX_MSGSIZE]; + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); ERR(ctx->rc, "[ii][select][cursor][open] failed to allocate btree: %s", - ctx->errbuf); + errbuf); grn_ii_select_cursor_close(ctx, cursor); return NULL; } @@ -9254,6 +9268,7 @@ grn_ii_quorum_match(grn_ctx *ctx, grn_ii *ii, grn_ii_select_data *data) grn_rc rc = ctx->rc; char ii_name[GRN_TABLE_MAX_KEY_SIZE]; int ii_name_len; + char errbuf[GRN_CTX_MSGSIZE]; if (rc == GRN_SUCCESS) { rc = GRN_UNKNOWN_ERROR; @@ -9261,12 +9276,13 @@ grn_ii_quorum_match(grn_ctx *ctx, grn_ii *ii, grn_ii_select_data *data) ii_name_len = grn_obj_name(ctx, (grn_obj *)ii, ii_name, GRN_TABLE_MAX_KEY_SIZE); + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); ERR(rc, "[ii][quorum-match] failed to create token cursor: <%.*s>: <%.*s>%s%s", ii_name_len, ii_name, data->query_len, data->query, - ctx->errbuf[0] ? ": " : "", - ctx->errbuf[0] ? ctx->errbuf : ""); + errbuf[0] ? ": " : "", + errbuf[0] ? errbuf : ""); grn_hash_close(ctx, n_occurs); return rc; } @@ -9315,6 +9331,7 @@ grn_ii_quorum_match(grn_ctx *ctx, grn_ii *ii, grn_ii_select_data *data) grn_rc rc = ctx->rc; char ii_name[GRN_TABLE_MAX_KEY_SIZE]; int ii_name_len; + char errbuf[GRN_CTX_MSGSIZE]; if (rc == GRN_SUCCESS) { rc = GRN_UNKNOWN_ERROR; @@ -9322,12 +9339,13 @@ grn_ii_quorum_match(grn_ctx *ctx, grn_ii *ii, grn_ii_select_data *data) ii_name_len = grn_obj_name(ctx, (grn_obj *)ii, ii_name, GRN_TABLE_MAX_KEY_SIZE); + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); ERR(rc, "[ii][quorum-match] failed to create count cursor: <%.*s>: <%.*s>%s%s", ii_name_len, ii_name, data->query_len, data->query, - ctx->errbuf[0] ? ": " : "", - ctx->errbuf[0] ? ctx->errbuf : ""); + errbuf[0] ? ": " : "", + errbuf[0] ? errbuf : ""); grn_hash_close(ctx, n_occurs); return rc; } Modified: lib/proc.c (+6 -2) =================================================================== --- lib/proc.c 2019-01-21 15:26:19 +0900 (9d3f31e47) +++ lib/proc.c 2019-01-21 15:42:42 +0900 (7c618c708) @@ -687,13 +687,15 @@ proc_delete(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_data) NULL, GRN_OP_MATCH, GRN_OP_AND, GRN_EXPR_SYNTAX_SCRIPT); if (ctx->rc) { + char errbuf[GRN_CTX_MSGSIZE]; + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); rc = ctx->rc; ERR(rc, "[table][record][delete] failed to parse filter: " "table: <%.*s>, filter: <%.*s>, detail: <%s>", (int)GRN_TEXT_LEN(table_name), GRN_TEXT_VALUE(table_name), (int)GRN_TEXT_LEN(filter), GRN_TEXT_VALUE(filter), - ctx->errbuf); + errbuf); } else { grn_obj *records; @@ -3738,7 +3740,9 @@ proc_io_flush(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_data) rc = grn_obj_lock(ctx, db, GRN_ID_NIL, grn_lock_timeout); if (rc != GRN_SUCCESS) { - ERR(rc, "[io_flush] failed to lock DB: %s", ctx->errbuf); + char errbuf[GRN_CTX_MSGSIZE]; + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); + ERR(rc, "[io_flush] failed to lock DB: %s", errbuf); GRN_OUTPUT_BOOL(GRN_FALSE); return NULL; } Modified: lib/window_function.c (+9 -3) =================================================================== --- lib/window_function.c 2019-01-21 15:26:19 +0900 (d16c373a5) +++ lib/window_function.c 2019-01-21 15:42:42 +0900 (f62164958) @@ -214,10 +214,12 @@ grn_window_function_create(grn_ctx *ctx, GRN_PROC_WINDOW_FUNCTION, NULL, NULL, NULL, 0, NULL); if (!window_function) { + char errbuf[GRN_CTX_MSGSIZE]; + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); ERR(GRN_WINDOW_FUNCTION_ERROR, "[window-function][%.*s] failed to create proc: %s", name_size, name, - ctx->errbuf); + errbuf); GRN_API_RETURN(NULL); } @@ -330,13 +332,15 @@ grn_table_apply_window_function(grn_ctx *ctx, sort_keys = GRN_MALLOCN(grn_table_sort_key, n_sort_keys); if (!sort_keys) { grn_rc rc = ctx->rc; + char errbuf[GRN_CTX_MSGSIZE]; if (rc == GRN_SUCCESS) { rc = GRN_NO_MEMORY_AVAILABLE; } + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); ERR(rc, "[table][apply][window-function] " "failed to allocate internal sort keys: %s", - ctx->errbuf); + errbuf); GRN_API_RETURN(ctx->rc); } { @@ -355,14 +359,16 @@ grn_table_apply_window_function(grn_ctx *ctx, table); if (!sorted) { grn_rc rc = ctx->rc; + char errbuf[GRN_CTX_MSGSIZE]; if (rc == GRN_SUCCESS) { rc = GRN_NO_MEMORY_AVAILABLE; } + grn_strcpy(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf); GRN_FREE(sort_keys); ERR(rc, "[table][apply][window-function] " "failed to allocate table to store sorted result: %s", - ctx->errbuf); + errbuf); GRN_API_RETURN(ctx->rc); } grn_table_sort(ctx,