00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #define YYBISON 1
00038
00039
00040 #define YYBISON_VERSION "2.1a"
00041
00042
00043 #define YYSKELETON_NAME "yacc.c"
00044
00045
00046 #define YYPURE 1
00047
00048
00049 #define YYLSP_NEEDED 1
00050
00051
00052 #define yyparse ast_yyparse
00053 #define yylex ast_yylex
00054 #define yyerror ast_yyerror
00055 #define yylval ast_yylval
00056 #define yychar ast_yychar
00057 #define yydebug ast_yydebug
00058 #define yynerrs ast_yynerrs
00059 #define yylloc ast_yylloc
00060
00061
00062 #ifndef YYTOKENTYPE
00063 # define YYTOKENTYPE
00064
00065
00066 enum yytokentype {
00067 TOK_COLONCOLON = 258,
00068 TOK_COND = 259,
00069 TOK_OR = 260,
00070 TOK_AND = 261,
00071 TOK_NE = 262,
00072 TOK_LE = 263,
00073 TOK_GE = 264,
00074 TOK_LT = 265,
00075 TOK_GT = 266,
00076 TOK_EQ = 267,
00077 TOK_MINUS = 268,
00078 TOK_PLUS = 269,
00079 TOK_MOD = 270,
00080 TOK_DIV = 271,
00081 TOK_MULT = 272,
00082 TOK_COMPL = 273,
00083 TOK_EQTILDE = 274,
00084 TOK_COLON = 275,
00085 TOK_LP = 276,
00086 TOK_RP = 277,
00087 TOKEN = 278
00088 };
00089 #endif
00090
00091 #define TOK_COLONCOLON 258
00092 #define TOK_COND 259
00093 #define TOK_OR 260
00094 #define TOK_AND 261
00095 #define TOK_NE 262
00096 #define TOK_LE 263
00097 #define TOK_GE 264
00098 #define TOK_LT 265
00099 #define TOK_GT 266
00100 #define TOK_EQ 267
00101 #define TOK_MINUS 268
00102 #define TOK_PLUS 269
00103 #define TOK_MOD 270
00104 #define TOK_DIV 271
00105 #define TOK_MULT 272
00106 #define TOK_COMPL 273
00107 #define TOK_EQTILDE 274
00108 #define TOK_COLON 275
00109 #define TOK_LP 276
00110 #define TOK_RP 277
00111 #define TOKEN 278
00112
00113
00114
00115
00116
00117 #line 1 "ast_expr2.y"
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132 #include "asterisk.h"
00133
00134 #if !defined(STANDALONE_AEL)
00135 ASTERISK_FILE_VERSION(__FILE__, "$Revision: 144924 $")
00136 #endif
00137
00138 #include <sys/types.h>
00139 #include <stdio.h>
00140 #include <stdlib.h>
00141 #include <string.h>
00142 #include <locale.h>
00143 #include <unistd.h>
00144 #include <ctype.h>
00145 #if !defined(SOLARIS) && !defined(__CYGWIN__)
00146
00147 #else
00148 #define quad_t int64_t
00149 #endif
00150 #include <errno.h>
00151 #include <regex.h>
00152 #include <limits.h>
00153
00154 #include "asterisk/ast_expr.h"
00155 #include "asterisk/logger.h"
00156
00157 #if defined(LONG_LONG_MIN) && !defined(QUAD_MIN)
00158 #define QUAD_MIN LONG_LONG_MIN
00159 #endif
00160 #if defined(LONG_LONG_MAX) && !defined(QUAD_MAX)
00161 #define QUAD_MAX LONG_LONG_MAX
00162 #endif
00163
00164 # if ! defined(QUAD_MIN)
00165 # define QUAD_MIN (-0x7fffffffffffffffLL-1)
00166 # endif
00167 # if ! defined(QUAD_MAX)
00168 # define QUAD_MAX (0x7fffffffffffffffLL)
00169 # endif
00170
00171 #define YYPARSE_PARAM parseio
00172 #define YYLEX_PARAM ((struct parse_io *)parseio)->scanner
00173 #define YYERROR_VERBOSE 1
00174 extern char extra_error_message[4095];
00175 extern int extra_error_message_supplied;
00176
00177 enum valtype {
00178 AST_EXPR_integer, AST_EXPR_numeric_string, AST_EXPR_string
00179 } ;
00180
00181 #ifdef STANDALONE
00182 void ast_log(int level, const char *file, int line, const char *function, const char *fmt, ...) __attribute__ ((format (printf,5,6)));
00183 #endif
00184
00185 struct val {
00186 enum valtype type;
00187 union {
00188 char *s;
00189 quad_t i;
00190 } u;
00191 } ;
00192
00193 typedef void *yyscan_t;
00194
00195 struct parse_io
00196 {
00197 char *string;
00198 struct val *val;
00199 yyscan_t scanner;
00200 };
00201
00202 static int chk_div __P((quad_t, quad_t));
00203 static int chk_minus __P((quad_t, quad_t, quad_t));
00204 static int chk_plus __P((quad_t, quad_t, quad_t));
00205 static int chk_times __P((quad_t, quad_t, quad_t));
00206 static void free_value __P((struct val *));
00207 static int is_zero_or_null __P((struct val *));
00208 static int isstring __P((struct val *));
00209 static struct val *make_integer __P((quad_t));
00210 static struct val *make_str __P((const char *));
00211 static struct val *op_and __P((struct val *, struct val *));
00212 static struct val *op_colon __P((struct val *, struct val *));
00213 static struct val *op_eqtilde __P((struct val *, struct val *));
00214 static struct val *op_div __P((struct val *, struct val *));
00215 static struct val *op_eq __P((struct val *, struct val *));
00216 static struct val *op_ge __P((struct val *, struct val *));
00217 static struct val *op_gt __P((struct val *, struct val *));
00218 static struct val *op_le __P((struct val *, struct val *));
00219 static struct val *op_lt __P((struct val *, struct val *));
00220 static struct val *op_cond __P((struct val *, struct val *, struct val *));
00221 static struct val *op_minus __P((struct val *, struct val *));
00222 static struct val *op_negate __P((struct val *));
00223 static struct val *op_compl __P((struct val *));
00224 static struct val *op_ne __P((struct val *, struct val *));
00225 static struct val *op_or __P((struct val *, struct val *));
00226 static struct val *op_plus __P((struct val *, struct val *));
00227 static struct val *op_rem __P((struct val *, struct val *));
00228 static struct val *op_times __P((struct val *, struct val *));
00229 static quad_t to_integer __P((struct val *));
00230 static void to_string __P((struct val *));
00231
00232
00233 typedef struct yyltype
00234 {
00235 int first_line;
00236 int first_column;
00237
00238 int last_line;
00239 int last_column;
00240 } yyltype;
00241
00242 # define YYLTYPE yyltype
00243 # define YYLTYPE_IS_TRIVIAL 1
00244
00245
00246
00247
00248 int ast_yyerror(const char *,YYLTYPE *, struct parse_io *);
00249
00250
00251
00252
00253 #define ast_yyerror(x) ast_yyerror(x,&yyloc,parseio)
00254 #define DESTROY(x) {if((x)->type == AST_EXPR_numeric_string || (x)->type == AST_EXPR_string) free((x)->u.s); (x)->u.s = 0; free(x);}
00255
00256
00257
00258 #ifndef YYDEBUG
00259 # define YYDEBUG 0
00260 #endif
00261
00262
00263 #ifdef YYERROR_VERBOSE
00264 # undef YYERROR_VERBOSE
00265 # define YYERROR_VERBOSE 1
00266 #else
00267 # define YYERROR_VERBOSE 0
00268 #endif
00269
00270
00271 #ifndef YYTOKEN_TABLE
00272 # define YYTOKEN_TABLE 0
00273 #endif
00274
00275 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
00276 typedef union YYSTYPE
00277 #line 147 "ast_expr2.y"
00278 {
00279 struct val *val;
00280 }
00281
00282 #line 283 "ast_expr2.c"
00283 YYSTYPE;
00284 # define yystype YYSTYPE
00285 # define YYSTYPE_IS_DECLARED 1
00286 # define YYSTYPE_IS_TRIVIAL 1
00287 #endif
00288
00289 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
00290 typedef struct YYLTYPE
00291 {
00292 int first_line;
00293 int first_column;
00294 int last_line;
00295 int last_column;
00296 } YYLTYPE;
00297 # define yyltype YYLTYPE
00298 # define YYLTYPE_IS_DECLARED 1
00299 # define YYLTYPE_IS_TRIVIAL 1
00300 #endif
00301
00302
00303
00304 #line 151 "ast_expr2.y"
00305
00306 extern int ast_yylex __P((YYSTYPE *, YYLTYPE *, yyscan_t));
00307
00308
00309
00310 #line 311 "ast_expr2.c"
00311
00312 #ifdef short
00313 # undef short
00314 #endif
00315
00316 #ifdef YYTYPE_UINT8
00317 typedef YYTYPE_UINT8 yytype_uint8;
00318 #else
00319 typedef unsigned char yytype_uint8;
00320 #endif
00321
00322 #ifdef YYTYPE_INT8
00323 typedef YYTYPE_INT8 yytype_int8;
00324 #elif (defined __STDC__ || defined __C99__FUNC__ \
00325 || defined __cplusplus || defined _MSC_VER)
00326 typedef signed char yytype_int8;
00327 #else
00328 typedef short int yytype_int8;
00329 #endif
00330
00331 #ifdef YYTYPE_UINT16
00332 typedef YYTYPE_UINT16 yytype_uint16;
00333 #else
00334 typedef unsigned short int yytype_uint16;
00335 #endif
00336
00337 #ifdef YYTYPE_INT16
00338 typedef YYTYPE_INT16 yytype_int16;
00339 #else
00340 typedef short int yytype_int16;
00341 #endif
00342
00343 #ifndef YYSIZE_T
00344 # ifdef __SIZE_TYPE__
00345 # define YYSIZE_T __SIZE_TYPE__
00346 # elif defined size_t
00347 # define YYSIZE_T size_t
00348 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
00349 || defined __cplusplus || defined _MSC_VER)
00350 # include <stddef.h>
00351 # define YYSIZE_T size_t
00352 # else
00353 # define YYSIZE_T unsigned int
00354 # endif
00355 #endif
00356
00357 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
00358
00359 #ifndef YY_
00360 # if YYENABLE_NLS
00361 # if ENABLE_NLS
00362 # include <libintl.h>
00363 # define YY_(msgid) dgettext ("bison-runtime", msgid)
00364 # endif
00365 # endif
00366 # ifndef YY_
00367 # define YY_(msgid) msgid
00368 # endif
00369 #endif
00370
00371
00372 #if ! defined lint || defined __GNUC__
00373 # define YYUSE(e) ((void) (e))
00374 #else
00375 # define YYUSE(e)
00376 #endif
00377
00378
00379 #ifndef lint
00380 # define YYID(n) (n)
00381 #else
00382 #if (defined __STDC__ || defined __C99__FUNC__ \
00383 || defined __cplusplus || defined _MSC_VER)
00384 static int
00385 YYID (int i)
00386 #else
00387 static int
00388 YYID (i)
00389 int i;
00390 #endif
00391 {
00392 return i;
00393 }
00394 #endif
00395
00396 #if ! defined yyoverflow || YYERROR_VERBOSE
00397
00398
00399
00400 # ifdef YYSTACK_USE_ALLOCA
00401 # if YYSTACK_USE_ALLOCA
00402 # ifdef __GNUC__
00403 # define YYSTACK_ALLOC __builtin_alloca
00404 # elif defined __BUILTIN_VA_ARG_INCR
00405 # include <alloca.h>
00406 # elif defined _AIX
00407 # define YYSTACK_ALLOC __alloca
00408 # elif defined _MSC_VER
00409 # include <malloc.h>
00410 # define alloca _alloca
00411 # else
00412 # define YYSTACK_ALLOC alloca
00413 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
00414 || defined __cplusplus || defined _MSC_VER)
00415 # include <stdlib.h>
00416 # ifndef _STDLIB_H
00417 # define _STDLIB_H 1
00418 # endif
00419 # endif
00420 # endif
00421 # endif
00422 # endif
00423
00424 # ifdef YYSTACK_ALLOC
00425
00426 # define YYSTACK_FREE(Ptr) do { ; } while (YYID (0))
00427 # ifndef YYSTACK_ALLOC_MAXIMUM
00428
00429
00430
00431
00432 # define YYSTACK_ALLOC_MAXIMUM 4032
00433 # endif
00434 # else
00435 # define YYSTACK_ALLOC YYMALLOC
00436 # define YYSTACK_FREE YYFREE
00437 # ifndef YYSTACK_ALLOC_MAXIMUM
00438 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
00439 # endif
00440 # ifdef __cplusplus
00441 extern "C" {
00442 # endif
00443 # ifndef YYMALLOC
00444 # define YYMALLOC malloc
00445 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
00446 || defined __cplusplus || defined _MSC_VER)
00447 void *malloc (YYSIZE_T);
00448 # endif
00449 # endif
00450 # ifndef YYFREE
00451 # define YYFREE free
00452 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
00453 || defined __cplusplus || defined _MSC_VER)
00454 void free (void *);
00455 # endif
00456 # endif
00457 # ifdef __cplusplus
00458 }
00459 # endif
00460 # endif
00461 #endif
00462
00463
00464 #if (! defined yyoverflow \
00465 && (! defined __cplusplus \
00466 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
00467 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
00468
00469
00470 union yyalloc
00471 {
00472 yytype_int16 yyss;
00473 YYSTYPE yyvs;
00474 YYLTYPE yyls;
00475 };
00476
00477
00478 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
00479
00480
00481
00482 # define YYSTACK_BYTES(N) \
00483 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
00484 + 2 * YYSTACK_GAP_MAXIMUM)
00485
00486
00487
00488 # ifndef YYCOPY
00489 # if defined __GNUC__ && 1 < __GNUC__
00490 # define YYCOPY(To, From, Count) \
00491 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
00492 # else
00493 # define YYCOPY(To, From, Count) \
00494 do \
00495 { \
00496 YYSIZE_T yyi; \
00497 for (yyi = 0; yyi < (Count); yyi++) \
00498 (To)[yyi] = (From)[yyi]; \
00499 } \
00500 while (YYID (0))
00501 # endif
00502 # endif
00503
00504
00505
00506
00507
00508
00509 # define YYSTACK_RELOCATE(Stack) \
00510 do \
00511 { \
00512 YYSIZE_T yynewbytes; \
00513 YYCOPY (&yyptr->Stack, Stack, yysize); \
00514 Stack = &yyptr->Stack; \
00515 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
00516 yyptr += yynewbytes / sizeof (*yyptr); \
00517 } \
00518 while (YYID (0))
00519
00520 #endif
00521
00522
00523 #define YYFINAL 10
00524
00525 #define YYLAST 140
00526
00527
00528 #define YYNTOKENS 24
00529
00530 #define YYNNTS 3
00531
00532 #define YYNRULES 23
00533
00534 #define YYNSTATES 46
00535
00536
00537 #define YYUNDEFTOK 2
00538 #define YYMAXUTOK 278
00539
00540 #define YYTRANSLATE(YYX) \
00541 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
00542
00543
00544 static const yytype_uint8 yytranslate[] =
00545 {
00546 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00547 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00548 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00549 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00550 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00551 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00552 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00553 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00554 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00555 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00556 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00557 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00558 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00559 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00560 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00561 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00562 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00563 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00564 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00565 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00566 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00567 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00568 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00569 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00570 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00571 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
00572 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
00573 15, 16, 17, 18, 19, 20, 21, 22, 23
00574 };
00575
00576 #if YYDEBUG
00577
00578
00579 static const yytype_uint8 yyprhs[] =
00580 {
00581 0, 0, 3, 5, 6, 8, 12, 16, 20, 24,
00582 28, 32, 36, 40, 44, 48, 52, 55, 58, 62,
00583 66, 70, 74, 78
00584 };
00585
00586
00587 static const yytype_int8 yyrhs[] =
00588 {
00589 25, 0, -1, 26, -1, -1, 23, -1, 21, 26,
00590 22, -1, 26, 5, 26, -1, 26, 6, 26, -1,
00591 26, 12, 26, -1, 26, 11, 26, -1, 26, 10,
00592 26, -1, 26, 9, 26, -1, 26, 8, 26, -1,
00593 26, 7, 26, -1, 26, 14, 26, -1, 26, 13,
00594 26, -1, 13, 26, -1, 18, 26, -1, 26, 17,
00595 26, -1, 26, 16, 26, -1, 26, 15, 26, -1,
00596 26, 20, 26, -1, 26, 19, 26, -1, 26, 4,
00597 26, 3, 26, -1
00598 };
00599
00600
00601 static const yytype_uint16 yyrline[] =
00602 {
00603 0, 175, 175, 183, 190, 191, 195, 199, 203, 207,
00604 211, 215, 219, 223, 227, 231, 235, 239, 243, 247,
00605 251, 255, 259, 263
00606 };
00607 #endif
00608
00609 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
00610
00611
00612 static const char *const yytname[] =
00613 {
00614 "$end", "error", "$undefined", "TOK_COLONCOLON", "TOK_COND", "TOK_OR",
00615 "TOK_AND", "TOK_NE", "TOK_LE", "TOK_GE", "TOK_LT", "TOK_GT", "TOK_EQ",
00616 "TOK_MINUS", "TOK_PLUS", "TOK_MOD", "TOK_DIV", "TOK_MULT", "TOK_COMPL",
00617 "TOK_EQTILDE", "TOK_COLON", "TOK_LP", "TOK_RP", "TOKEN", "$accept",
00618 "start", "expr", 0
00619 };
00620 #endif
00621
00622 # ifdef YYPRINT
00623
00624
00625 static const yytype_uint16 yytoknum[] =
00626 {
00627 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
00628 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
00629 275, 276, 277, 278
00630 };
00631 # endif
00632
00633
00634 static const yytype_uint8 yyr1[] =
00635 {
00636 0, 24, 25, 25, 26, 26, 26, 26, 26, 26,
00637 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
00638 26, 26, 26, 26
00639 };
00640
00641
00642 static const yytype_uint8 yyr2[] =
00643 {
00644 0, 2, 1, 0, 1, 3, 3, 3, 3, 3,
00645 3, 3, 3, 3, 3, 3, 2, 2, 3, 3,
00646 3, 3, 3, 5
00647 };
00648
00649
00650
00651
00652 static const yytype_uint8 yydefact[] =
00653 {
00654 3, 0, 0, 0, 4, 0, 2, 16, 17, 0,
00655 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00656 0, 0, 0, 0, 0, 0, 0, 5, 0, 6,
00657 7, 13, 12, 11, 10, 9, 8, 15, 14, 20,
00658 19, 18, 22, 21, 0, 23
00659 };
00660
00661
00662 static const yytype_int8 yydefgoto[] =
00663 {
00664 -1, 5, 6
00665 };
00666
00667
00668
00669 #define YYPACT_NINF -13
00670 static const yytype_int8 yypact[] =
00671 {
00672 109, 109, 109, 109, -13, 6, 59, 106, 106, 22,
00673 -13, 109, 109, 109, 109, 109, 109, 109, 109, 109,
00674 109, 109, 109, 109, 109, 109, 109, -13, 42, 90,
00675 104, 120, 120, 120, 120, 120, 120, -12, -12, 106,
00676 106, 106, -13, -13, 109, 75
00677 };
00678
00679
00680 static const yytype_int8 yypgoto[] =
00681 {
00682 -13, -13, -1
00683 };
00684
00685
00686
00687
00688
00689 #define YYTABLE_NINF -1
00690 static const yytype_uint8 yytable[] =
00691 {
00692 7, 8, 9, 22, 23, 24, 10, 25, 26, 0,
00693 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
00694 38, 39, 40, 41, 42, 43, 11, 12, 13, 14,
00695 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
00696 0, 25, 26, 45, 27, 44, 11, 12, 13, 14,
00697 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
00698 0, 25, 26, 11, 12, 13, 14, 15, 16, 17,
00699 18, 19, 20, 21, 22, 23, 24, 0, 25, 26,
00700 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
00701 22, 23, 24, 0, 25, 26, 13, 14, 15, 16,
00702 17, 18, 19, 20, 21, 22, 23, 24, 0, 25,
00703 26, 14, 15, 16, 17, 18, 19, 20, 21, 22,
00704 23, 24, 1, 25, 26, 25, 26, 2, 0, 0,
00705 3, 0, 4, 20, 21, 22, 23, 24, 0, 25,
00706 26
00707 };
00708
00709 static const yytype_int8 yycheck[] =
00710 {
00711 1, 2, 3, 15, 16, 17, 0, 19, 20, -1,
00712 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
00713 21, 22, 23, 24, 25, 26, 4, 5, 6, 7,
00714 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
00715 -1, 19, 20, 44, 22, 3, 4, 5, 6, 7,
00716 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
00717 -1, 19, 20, 4, 5, 6, 7, 8, 9, 10,
00718 11, 12, 13, 14, 15, 16, 17, -1, 19, 20,
00719 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
00720 15, 16, 17, -1, 19, 20, 6, 7, 8, 9,
00721 10, 11, 12, 13, 14, 15, 16, 17, -1, 19,
00722 20, 7, 8, 9, 10, 11, 12, 13, 14, 15,
00723 16, 17, 13, 19, 20, 19, 20, 18, -1, -1,
00724 21, -1, 23, 13, 14, 15, 16, 17, -1, 19,
00725 20
00726 };
00727
00728
00729
00730 static const yytype_uint8 yystos[] =
00731 {
00732 0, 13, 18, 21, 23, 25, 26, 26, 26, 26,
00733 0, 4, 5, 6, 7, 8, 9, 10, 11, 12,
00734 13, 14, 15, 16, 17, 19, 20, 22, 26, 26,
00735 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
00736 26, 26, 26, 26, 3, 26
00737 };
00738
00739 #define yyerrok (yyerrstatus = 0)
00740 #define yyclearin (yychar = YYEMPTY)
00741 #define YYEMPTY (-2)
00742 #define YYEOF 0
00743
00744 #define YYACCEPT goto yyacceptlab
00745 #define YYABORT goto yyabortlab
00746 #define YYERROR goto yyerrorlab
00747
00748
00749
00750
00751
00752
00753 #define YYFAIL goto yyerrlab
00754
00755 #define YYRECOVERING() (!!yyerrstatus)
00756
00757 #define YYBACKUP(Token, Value) \
00758 do \
00759 if (yychar == YYEMPTY && yylen == 1) \
00760 { \
00761 yychar = (Token); \
00762 yylval = (Value); \
00763 yytoken = YYTRANSLATE (yychar); \
00764 YYPOPSTACK (1); \
00765 goto yybackup; \
00766 } \
00767 else \
00768 { \
00769 yyerror (YY_("syntax error: cannot back up")); \
00770 YYERROR; \
00771 } \
00772 while (YYID (0))
00773
00774
00775 #define YYTERROR 1
00776 #define YYERRCODE 256
00777
00778
00779
00780
00781
00782
00783 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
00784 #ifndef YYLLOC_DEFAULT
00785 # define YYLLOC_DEFAULT(Current, Rhs, N) \
00786 do \
00787 if (YYID (N)) \
00788 { \
00789 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
00790 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
00791 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
00792 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
00793 } \
00794 else \
00795 { \
00796 (Current).first_line = (Current).last_line = \
00797 YYRHSLOC (Rhs, 0).last_line; \
00798 (Current).first_column = (Current).last_column = \
00799 YYRHSLOC (Rhs, 0).last_column; \
00800 } \
00801 while (YYID (0))
00802 #endif
00803
00804
00805
00806
00807
00808
00809 #ifndef YY_LOCATION_PRINT
00810 # if YYLTYPE_IS_TRIVIAL
00811 # define YY_LOCATION_PRINT(File, Loc) \
00812 fprintf (File, "%d.%d-%d.%d", \
00813 (Loc).first_line, (Loc).first_column, \
00814 (Loc).last_line, (Loc).last_column)
00815 # else
00816 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
00817 # endif
00818 #endif
00819
00820
00821
00822
00823 #ifdef YYLEX_PARAM
00824 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
00825 #else
00826 # define YYLEX yylex (&yylval, &yylloc)
00827 #endif
00828
00829
00830 #if YYDEBUG
00831
00832 # ifndef YYFPRINTF
00833 # include <stdio.h>
00834 # define YYFPRINTF fprintf
00835 # endif
00836
00837 # define YYDPRINTF(Args) \
00838 do { \
00839 if (yydebug) \
00840 YYFPRINTF Args; \
00841 } while (YYID (0))
00842
00843 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
00844 do { \
00845 if (yydebug) \
00846 { \
00847 YYFPRINTF (stderr, "%s ", Title); \
00848 yy_symbol_print (stderr, \
00849 Type, Value, Location); \
00850 YYFPRINTF (stderr, "\n"); \
00851 } \
00852 } while (YYID (0))
00853
00854
00855
00856
00857
00858
00859
00860 #if (defined __STDC__ || defined __C99__FUNC__ \
00861 || defined __cplusplus || defined _MSC_VER)
00862 static void
00863 yy_symbol_value_print (FILE *yyoutput, int yytype, const YYSTYPE * const yyvaluep, const YYLTYPE * const yylocationp)
00864 #else
00865 static void
00866 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp)
00867 FILE *yyoutput;
00868 int yytype;
00869 const YYSTYPE * const yyvaluep;
00870 const YYLTYPE * const yylocationp;
00871 #endif
00872 {
00873 if (!yyvaluep)
00874 return;
00875 YYUSE (yylocationp);
00876 # ifdef YYPRINT
00877 if (yytype < YYNTOKENS)
00878 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
00879 # else
00880 YYUSE (yyoutput);
00881 # endif
00882 switch (yytype)
00883 {
00884 default:
00885 break;
00886 }
00887 }
00888
00889
00890
00891
00892
00893
00894 #if (defined __STDC__ || defined __C99__FUNC__ \
00895 || defined __cplusplus || defined _MSC_VER)
00896 static void
00897 yy_symbol_print (FILE *yyoutput, int yytype, const YYSTYPE * const yyvaluep, const YYLTYPE * const yylocationp)
00898 #else
00899 static void
00900 yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp)
00901 FILE *yyoutput;
00902 int yytype;
00903 const YYSTYPE * const yyvaluep;
00904 const YYLTYPE * const yylocationp;
00905 #endif
00906 {
00907 if (yytype < YYNTOKENS)
00908 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
00909 else
00910 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
00911
00912 YY_LOCATION_PRINT (yyoutput, *yylocationp);
00913 YYFPRINTF (yyoutput, ": ");
00914 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp);
00915 YYFPRINTF (yyoutput, ")");
00916 }
00917
00918
00919
00920
00921
00922
00923 #if (defined __STDC__ || defined __C99__FUNC__ \
00924 || defined __cplusplus || defined _MSC_VER)
00925 static void
00926 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
00927 #else
00928 static void
00929 yy_stack_print (bottom, top)
00930 yytype_int16 *bottom;
00931 yytype_int16 *top;
00932 #endif
00933 {
00934 YYFPRINTF (stderr, "Stack now");
00935 for (; bottom <= top; ++bottom)
00936 YYFPRINTF (stderr, " %d", *bottom);
00937 YYFPRINTF (stderr, "\n");
00938 }
00939
00940 # define YY_STACK_PRINT(Bottom, Top) \
00941 do { \
00942 if (yydebug) \
00943 yy_stack_print ((Bottom), (Top)); \
00944 } while (YYID (0))
00945
00946
00947
00948
00949
00950
00951 #if (defined __STDC__ || defined __C99__FUNC__ \
00952 || defined __cplusplus || defined _MSC_VER)
00953 static void
00954 yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
00955 #else
00956 static void
00957 yy_reduce_print (yyvsp, yylsp, yyrule
00958 )
00959 YYSTYPE *yyvsp;
00960 YYLTYPE *yylsp;
00961 int yyrule;
00962 #endif
00963 {
00964 int yynrhs = yyr2[yyrule];
00965 int yyi;
00966 unsigned long int yylno = yyrline[yyrule];
00967 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
00968 yyrule - 1, yylno);
00969
00970 for (yyi = 0; yyi < yynrhs; yyi++)
00971 {
00972 fprintf (stderr, " $%d = ", yyi + 1);
00973 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
00974 &(yyvsp[(yyi + 1) - (yynrhs)])
00975 , &(yylsp[(yyi + 1) - (yynrhs)]) );
00976 fprintf (stderr, "\n");
00977 }
00978 }
00979
00980 # define YY_REDUCE_PRINT(Rule) \
00981 do { \
00982 if (yydebug) \
00983 yy_reduce_print (yyvsp, yylsp, Rule); \
00984 } while (YYID (0))
00985
00986
00987
00988 int yydebug;
00989 #else
00990 # define YYDPRINTF(Args)
00991 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
00992 # define YY_STACK_PRINT(Bottom, Top)
00993 # define YY_REDUCE_PRINT(Rule)
00994 #endif
00995
00996
00997
00998 #ifndef YYINITDEPTH
00999 # define YYINITDEPTH 200
01000 #endif
01001
01002
01003
01004
01005
01006
01007
01008
01009 #ifndef YYMAXDEPTH
01010 # define YYMAXDEPTH 10000
01011 #endif
01012
01013
01014
01015 #if YYERROR_VERBOSE
01016
01017 # ifndef yystrlen
01018 # if defined __GLIBC__ && defined _STRING_H
01019 # define yystrlen strlen
01020 # else
01021
01022 #if (defined __STDC__ || defined __C99__FUNC__ \
01023 || defined __cplusplus || defined _MSC_VER)
01024 static YYSIZE_T
01025 yystrlen (const char *yystr)
01026 #else
01027 static YYSIZE_T
01028 yystrlen (yystr)
01029 const char *yystr;
01030 #endif
01031 {
01032 YYSIZE_T yylen;
01033 for (yylen = 0; yystr[yylen]; yylen++)
01034 continue;
01035 return yylen;
01036 }
01037 # endif
01038 # endif
01039
01040 # ifndef yystpcpy
01041 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
01042 # define yystpcpy stpcpy
01043 # else
01044
01045
01046 #if (defined __STDC__ || defined __C99__FUNC__ \
01047 || defined __cplusplus || defined _MSC_VER)
01048 static char *
01049 yystpcpy (char *yydest, const char *yysrc)
01050 #else
01051 static char *
01052 yystpcpy (yydest, yysrc)
01053 char *yydest;
01054 const char *yysrc;
01055 #endif
01056 {
01057 char *yyd = yydest;
01058 const char *yys = yysrc;
01059
01060 while ((*yyd++ = *yys++) != '\0')
01061 continue;
01062
01063 return yyd - 1;
01064 }
01065 # endif
01066 # endif
01067
01068 # ifndef yytnamerr
01069
01070
01071
01072
01073
01074
01075
01076 static YYSIZE_T
01077 yytnamerr (char *yyres, const char *yystr)
01078 {
01079 if (*yystr == '"')
01080 {
01081 size_t yyn = 0;
01082 char const *yyp = yystr;
01083
01084 for (;;)
01085 switch (*++yyp)
01086 {
01087 case '\'':
01088 case ',':
01089 goto do_not_strip_quotes;
01090
01091 case '\\':
01092 if (*++yyp != '\\')
01093 goto do_not_strip_quotes;
01094
01095 default:
01096 if (yyres)
01097 yyres[yyn] = *yyp;
01098 yyn++;
01099 break;
01100
01101 case '"':
01102 if (yyres)
01103 yyres[yyn] =