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 YYSKELETON_NAME "yacc.c"
00041
00042
00043 #define YYPURE 1
00044
00045
00046 #define YYLSP_NEEDED 0
00047
00048
00049
00050
00051 #ifndef YYTOKENTYPE
00052 # define YYTOKENTYPE
00053
00054
00055 enum yytokentype {
00056 EVAL_INT = 258,
00057 EVAL_STR = 259,
00058 EVAL_FLOAT = 260,
00059 EVAL_IDENT = 261,
00060 EVAL_LAND = 262,
00061 EVAL_LXOR = 263,
00062 EVAL_LOR = 264,
00063 EVAL_EQ = 265,
00064 EVAL_NE = 266,
00065 EVAL_STR_EQ = 267,
00066 EVAL_STR_NE = 268,
00067 EVAL_LT = 269,
00068 EVAL_LE = 270,
00069 EVAL_GT = 271,
00070 EVAL_GE = 272,
00071 EVAL_STR_LT = 273,
00072 EVAL_STR_LE = 274,
00073 EVAL_STR_GT = 275,
00074 EVAL_STR_GE = 276,
00075 EVAL_SHL = 277,
00076 EVAL_SHR = 278,
00077 NEG = 279,
00078 EVAL_POW = 280
00079 };
00080 #endif
00081 #define EVAL_INT 258
00082 #define EVAL_STR 259
00083 #define EVAL_FLOAT 260
00084 #define EVAL_IDENT 261
00085 #define EVAL_LAND 262
00086 #define EVAL_LXOR 263
00087 #define EVAL_LOR 264
00088 #define EVAL_EQ 265
00089 #define EVAL_NE 266
00090 #define EVAL_STR_EQ 267
00091 #define EVAL_STR_NE 268
00092 #define EVAL_LT 269
00093 #define EVAL_LE 270
00094 #define EVAL_GT 271
00095 #define EVAL_GE 272
00096 #define EVAL_STR_LT 273
00097 #define EVAL_STR_LE 274
00098 #define EVAL_STR_GT 275
00099 #define EVAL_STR_GE 276
00100 #define EVAL_SHL 277
00101 #define EVAL_SHR 278
00102 #define NEG 279
00103 #define EVAL_POW 280
00104
00105
00106
00107
00108
00109 #line 4 "evalparse.y"
00110
00111
00112 #define YYPARSE_PARAM resultptr
00113
00114 #include "evaltype.h"
00115 #include "eval.h"
00116
00117 void yyerror (char *s)
00118 {
00119 set_eval_error(s);
00120 }
00121
00122
00123
00124
00125 #ifndef YYDEBUG
00126 # define YYDEBUG 0
00127 #endif
00128
00129
00130 #ifdef YYERROR_VERBOSE
00131 # undef YYERROR_VERBOSE
00132 # define YYERROR_VERBOSE 1
00133 #else
00134 # define YYERROR_VERBOSE 0
00135 #endif
00136
00137 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
00138 #line 18 "evalparse.y"
00139 typedef union YYSTYPE {
00140 eval_scalar scalar;
00141 char *ident;
00142 eval_scalarlist scalars;
00143 } YYSTYPE;
00144
00145 #line 145 "y.tab.c"
00146 # define yystype YYSTYPE
00147 # define YYSTYPE_IS_DECLARED 1
00148 # define YYSTYPE_IS_TRIVIAL 1
00149 #endif
00150
00151
00152
00153
00154
00155
00156
00157 #line 157 "y.tab.c"
00158
00159 #if ! defined (yyoverflow) || YYERROR_VERBOSE
00160
00161
00162
00163 # if YYSTACK_USE_ALLOCA
00164 # define YYSTACK_ALLOC alloca
00165 # else
00166 # ifndef YYSTACK_USE_ALLOCA
00167 # if defined (alloca) || defined (_ALLOCA_H)
00168 # define YYSTACK_ALLOC alloca
00169 # else
00170 # ifdef __GNUC__
00171 # define YYSTACK_ALLOC __builtin_alloca
00172 # endif
00173 # endif
00174 # endif
00175 # endif
00176
00177 # ifdef YYSTACK_ALLOC
00178
00179 # define YYSTACK_FREE(Ptr) do { ; } while (0)
00180 # else
00181 # if defined (__STDC__) || defined (__cplusplus)
00182 # include <stdlib.h>
00183 # define YYSIZE_T size_t
00184 # endif
00185 # define YYSTACK_ALLOC malloc
00186 # define YYSTACK_FREE free
00187 # endif
00188 #endif
00189
00190
00191 #if (! defined (yyoverflow) \
00192 && (! defined (__cplusplus) \
00193 || (YYSTYPE_IS_TRIVIAL)))
00194
00195
00196 union yyalloc
00197 {
00198 short yyss;
00199 YYSTYPE yyvs;
00200 };
00201
00202
00203 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
00204
00205
00206
00207 # define YYSTACK_BYTES(N) \
00208 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
00209 + YYSTACK_GAP_MAXIMUM)
00210
00211
00212
00213 # ifndef YYCOPY
00214 # if 1 < __GNUC__
00215 # define YYCOPY(To, From, Count) \
00216 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
00217 # else
00218 # define YYCOPY(To, From, Count) \
00219 do \
00220 { \
00221 register YYSIZE_T yyi; \
00222 for (yyi = 0; yyi < (Count); yyi++) \
00223 (To)[yyi] = (From)[yyi]; \
00224 } \
00225 while (0)
00226 # endif
00227 # endif
00228
00229
00230
00231
00232
00233
00234 # define YYSTACK_RELOCATE(Stack) \
00235 do \
00236 { \
00237 YYSIZE_T yynewbytes; \
00238 YYCOPY (&yyptr->Stack, Stack, yysize); \
00239 Stack = &yyptr->Stack; \
00240 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
00241 yyptr += yynewbytes / sizeof (*yyptr); \
00242 } \
00243 while (0)
00244
00245 #endif
00246
00247 #if defined (__STDC__) || defined (__cplusplus)
00248 typedef signed char yysigned_char;
00249 #else
00250 typedef short yysigned_char;
00251 #endif
00252
00253
00254 #define YYFINAL 16
00255
00256 #define YYLAST 562
00257
00258
00259 #define YYNTOKENS 42
00260
00261 #define YYNNTS 6
00262
00263 #define YYNRULES 44
00264
00265 #define YYNSTATES 83
00266
00267
00268 #define YYUNDEFTOK 2
00269 #define YYMAXUTOK 280
00270
00271 #define YYTRANSLATE(YYX) \
00272 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
00273
00274
00275 static const unsigned char yytranslate[] =
00276 {
00277 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00278 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00279 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00280 2, 2, 2, 37, 2, 2, 2, 35, 16, 2,
00281 40, 41, 33, 32, 7, 31, 10, 34, 2, 2,
00282 2, 2, 2, 2, 2, 2, 2, 2, 9, 2,
00283 2, 2, 2, 8, 2, 2, 2, 2, 2, 2,
00284 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00285 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00286 2, 2, 2, 2, 15, 2, 2, 2, 2, 2,
00287 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00288 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00289 2, 2, 2, 2, 14, 2, 36, 2, 2, 2,
00290 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00291 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00292 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00293 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00294 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00295 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00296 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00297 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00298 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00299 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00300 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00301 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00302 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
00303 5, 6, 11, 12, 13, 17, 18, 19, 20, 21,
00304 22, 23, 24, 25, 26, 27, 28, 29, 30, 38,
00305 39
00306 };
00307
00308 #if YYDEBUG
00309
00310
00311 static const unsigned char yyprhs[] =
00312 {
00313 0, 0, 3, 5, 7, 9, 11, 15, 19, 23,
00314 27, 31, 35, 39, 43, 47, 51, 55, 59, 63,
00315 67, 71, 75, 79, 83, 87, 91, 95, 99, 103,
00316 107, 111, 115, 118, 121, 124, 128, 134, 138, 143,
00317 145, 146, 148, 150, 154
00318 };
00319
00320
00321 static const yysigned_char yyrhs[] =
00322 {
00323 43, 0, -1, 44, -1, 3, -1, 4, -1, 5,
00324 -1, 44, 33, 44, -1, 44, 34, 44, -1, 44,
00325 35, 44, -1, 44, 32, 44, -1, 44, 31, 44,
00326 -1, 44, 16, 44, -1, 44, 14, 44, -1, 44,
00327 15, 44, -1, 44, 39, 44, -1, 44, 29, 44,
00328 -1, 44, 30, 44, -1, 44, 17, 44, -1, 44,
00329 18, 44, -1, 44, 23, 44, -1, 44, 24, 44,
00330 -1, 44, 21, 44, -1, 44, 22, 44, -1, 44,
00331 11, 44, -1, 44, 12, 44, -1, 44, 13, 44,
00332 -1, 44, 19, 44, -1, 44, 20, 44, -1, 44,
00333 27, 44, -1, 44, 28, 44, -1, 44, 25, 44,
00334 -1, 44, 26, 44, -1, 31, 44, -1, 36, 44,
00335 -1, 37, 44, -1, 40, 44, 41, -1, 44, 8,
00336 44, 9, 44, -1, 44, 10, 44, -1, 47, 40,
00337 45, 41, -1, 47, -1, -1, 46, -1, 44, -1,
00338 46, 7, 46, -1, 6, -1
00339 };
00340
00341
00342 static const unsigned char yyrline[] =
00343 {
00344 0, 65, 65, 68, 69, 70, 71, 72, 73, 74,
00345 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
00346 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
00347 95, 96, 97, 98, 99, 100, 101, 102, 108, 115,
00348 124, 130, 133, 134, 142
00349 };
00350 #endif
00351
00352 #if YYDEBUG || YYERROR_VERBOSE
00353
00354
00355 static const char *const yytname[] =
00356 {
00357 "$end", "error", "$undefined", "EVAL_INT", "EVAL_STR", "EVAL_FLOAT",
00358 "EVAL_IDENT", "','", "'?'", "':'", "'.'", "EVAL_LAND", "EVAL_LXOR",
00359 "EVAL_LOR", "'|'", "'^'", "'&'", "EVAL_EQ", "EVAL_NE", "EVAL_STR_EQ",
00360 "EVAL_STR_NE", "EVAL_LT", "EVAL_LE", "EVAL_GT", "EVAL_GE",
00361 "EVAL_STR_LT", "EVAL_STR_LE", "EVAL_STR_GT", "EVAL_STR_GE", "EVAL_SHL",
00362 "EVAL_SHR", "'-'", "'+'", "'*'", "'/'", "'%'", "'~'", "'!'", "NEG",
00363 "EVAL_POW", "'('", "')'", "$accept", "input", "scalar",
00364 "scalarlist_or_null", "scalarlist", "identifier", 0
00365 };
00366 #endif
00367
00368 # ifdef YYPRINT
00369
00370
00371 static const unsigned short yytoknum[] =
00372 {
00373 0, 256, 257, 258, 259, 260, 261, 44, 63, 58,
00374 46, 262, 263, 264, 124, 94, 38, 265, 266, 267,
00375 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
00376 278, 45, 43, 42, 47, 37, 126, 33, 279, 280,
00377 40, 41
00378 };
00379 # endif
00380
00381
00382 static const unsigned char yyr1[] =
00383 {
00384 0, 42, 43, 44, 44, 44, 44, 44, 44, 44,
00385 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
00386 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
00387 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
00388 45, 45, 46, 46, 47
00389 };
00390
00391
00392 static const unsigned char yyr2[] =
00393 {
00394 0, 2, 1, 1, 1, 1, 3, 3, 3, 3,
00395 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00396 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00397 3, 3, 2, 2, 2, 3, 5, 3, 4, 1,
00398 0, 1, 1, 3, 1
00399 };
00400
00401
00402
00403
00404 static const unsigned char yydefact[] =
00405 {
00406 0, 3, 4, 5, 44, 0, 0, 0, 0, 0,
00407 2, 39, 32, 33, 34, 0, 1, 0, 0, 0,
00408 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00409 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00410 0, 0, 0, 0, 0, 40, 35, 0, 37, 23,
00411 24, 25, 12, 13, 11, 17, 18, 26, 27, 21,
00412 22, 19, 20, 30, 31, 28, 29, 15, 16, 10,
00413 9, 6, 7, 8, 14, 42, 0, 41, 0, 38,
00414 0, 36, 43
00415 };
00416
00417
00418 static const yysigned_char yydefgoto[] =
00419 {
00420 -1, 9, 75, 76, 77, 11
00421 };
00422
00423
00424
00425 #define YYPACT_NINF -68
00426 static const short yypact[] =
00427 {
00428 43, -68, -68, -68, -68, 43, 43, 43, 43, 1,
00429 138, -38, -36, -36, -36, 74, -68, 43, 43, 43,
00430 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
00431 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
00432 43, 43, 43, 43, 43, 43, -68, 108, 167, 38,
00433 194, 220, 245, 269, 292, 315, 337, 358, 378, 397,
00434 415, 432, 448, 463, 477, 490, 502, 513, 523, -24,
00435 -24, -36, -36, -36, -68, 138, -37, 5, 43, -68,
00436 43, 138, -68
00437 };
00438
00439
00440 static const yysigned_char yypgoto[] =
00441 {
00442 -68, -68, 0, -68, -67, -68
00443 };
00444
00445
00446
00447
00448
00449 #define YYTABLE_NINF -1
00450 static const yysigned_char yytable[] =
00451 {
00452 10, 16, 45, 44, 79, 12, 13, 14, 15, 41,
00453 42, 43, 80, 82, 0, 44, 0, 47, 48, 49,
00454 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
00455 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
00456 70, 71, 72, 73, 74, 0, 1, 2, 3, 4,
00457 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
00458 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
00459 40, 41, 42, 43, 5, 0, 0, 44, 81, 6,
00460 7, 0, 17, 8, 18, 19, 20, 21, 22, 23,
00461 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
00462 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
00463 0, 0, 0, 44, 0, 46, 17, 78, 18, 19,
00464 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
00465 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
00466 40, 41, 42, 43, 0, 0, 17, 44, 18, 19,
00467 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
00468 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
00469 40, 41, 42, 43, 0, 0, 0, 44, 19, 20,
00470 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
00471 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
00472 41, 42, 43, 0, 0, 0, 44, 21, 22, 23,
00473 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
00474 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
00475 0, 0, 0, 44, 22, 23, 24, 25, 26, 27,
00476 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
00477 38, 39, 40, 41, 42, 43, 0, 0, 0, 44,
00478 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
00479 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
00480 43, 0, 0, 0, 44, 24, 25, 26, 27, 28,
00481 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
00482 39, 40, 41, 42, 43, 0, 0, 0, 44, 25,
00483 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
00484 36, 37, 38, 39, 40, 41, 42, 43, 0, 0,
00485 0, 44, -1, 26, 27, 28, 29, 30, 31, 32,
00486 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
00487 43, 0, 0, 0, 44, -1, 27, 28, 29, 30,
00488 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
00489 41, 42, 43, 0, 0, 0, 44, -1, 28, 29,
00490 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
00491 40, 41, 42, 43, 0, 0, 0, 44, -1, 29,
00492 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
00493 40, 41, 42, 43, 0, 0, 0, 44, -1, 30,
00494 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
00495 41, 42, 43, 0, 0, 0, 44, -1, 31, 32,
00496 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
00497 43, 0, 0, 0, 44, -1, 32, 33, 34, 35,
00498 36, 37, 38, 39, 40, 41, 42, 43, 0, 0,
00499 0, 44, -1, 33, 34, 35, 36, 37, 38, 39,
00500 40, 41, 42, 43, 0, 0, 0, 44, -1, 34,
00501 35, 36, 37, 38, 39, 40, 41, 42, 43, 0,
00502 0, 0, 44, -1, 35, 36, 37, 38, 39, 40,
00503 41, 42, 43, 0, 0, 0, 44, -1, 36, 37,
00504 38, 39, 40, 41, 42, 43, 0, 0, 0, 44,
00505 -1, 37, 38, 39, 40, 41, 42, 43, 0, 0,
00506 0, 44, -1, 38, 39, 40, 41, 42, 43, 0,
00507 0, 0, 44, -1, 39, 40, 41, 42, 43, 0,
00508 0, 0, 44
00509 };
00510
00511 static const yysigned_char yycheck[] =
00512 {
00513 0, 0, 40, 39, 41, 5, 6, 7, 8, 33,
00514 34, 35, 7, 80, -1, 39, -1, 17, 18, 19,
00515 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
00516 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
00517 40, 41, 42, 43, 44, -1, 3, 4, 5, 6,
00518 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
00519 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
00520 32, 33, 34, 35, 31, -1, -1, 39, 78, 36,
00521 37, -1, 8, 40, 10, 11, 12, 13, 14, 15,
00522 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
00523 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
00524 -1, -1, -1, 39, -1, 41, 8, 9, 10, 11,
00525 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
00526 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
00527 32, 33, 34, 35, -1, -1, 8, 39, 10, 11,
00528 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
00529 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
00530 32, 33, 34, 35, -1, -1, -1, 39, 11, 12,
00531 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
00532 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
00533 33, 34, 35, -1, -1, -1, 39, 13, 14, 15,
00534 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
00535 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
00536 -1, -1, -1, 39, 14, 15, 16, 17, 18, 19,
00537 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
00538 30, 31, 32, 33, 34, 35, -1, -1, -1, 39,
00539 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
00540 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
00541 35, -1, -1, -1, 39, 16, 17, 18, 19, 20,
00542 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
00543 31, 32, 33, 34, 35, -1, -1, -1, 39, 17,
00544 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
00545 28, 29, 30, 31, 32, 33, 34, 35, -1, -1,
00546 -1, 39, 17, 18, 19, 20, 21, 22, 23, 24,
00547 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
00548 35, -1, -1, -1, 39, 18, 19, 20, 21, 22,
00549 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
00550 33, 34, 35, -1, -1, -1, 39, 19, 20, 21,
00551 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
00552 32, 33, 34, 35, -1, -1, -1, 39, 20, 21,
00553 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
00554 32, 33, 34, 35, -1, -1, -1, 39, 21, 22,
00555 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
00556 33, 34, 35, -1, -1, -1, 39, 22, 23, 24,
00557 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
00558 35, -1, -1, -1, 39, 23, 24, 25, 26, 27,
00559 28, 29, 30, 31, 32, 33, 34, 35, -1, -1,
00560 -1, 39, 24, 25, 26, 27, 28, 29, 30, 31,
00561 32, 33, 34, 35, -1, -1, -1, 39, 25, 26,
00562 27, 28, 29, 30, 31, 32, 33, 34, 35, -1,
00563 -1, -1, 39, 26, 27, 28, 29, 30, 31, 32,
00564 33, 34, 35, -1, -1, -1, 39, 27, 28, 29,
00565 30, 31, 32, 33, 34, 35, -1, -1, -1, 39,
00566 28, 29, 30, 31, 32, 33, 34, 35, -1, -1,
00567 -1, 39, 29, 30, 31, 32, 33, 34, 35, -1,
00568 -1, -1, 39, 30, 31, 32, 33, 34, 35, -1,
00569 -1, -1, 39
00570 };
00571
00572
00573
00574 static const unsigned char yystos[] =
00575 {
00576 0, 3, 4, 5, 6, 31, 36, 37, 40, 43,
00577 44, 47, 44, 44, 44, 44, 0, 8, 10, 11,
00578 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
00579 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
00580 32, 33, 34, 35, 39, 40, 41, 44, 44, 44,
00581 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
00582 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
00583 44, 44, 44, 44, 44, 44, 45, 46, 9, 41,
00584 7, 44, 46
00585 };
00586
00587 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
00588 # define YYSIZE_T __SIZE_TYPE__
00589 #endif
00590 #if ! defined (YYSIZE_T) && defined (size_t)
00591 # define YYSIZE_T size_t
00592 #endif
00593 #if ! defined (YYSIZE_T)
00594 # if defined (__STDC__) || defined (__cplusplus)
00595 # include <stddef.h>
00596 # define YYSIZE_T size_t
00597 # endif
00598 #endif
00599 #if ! defined (YYSIZE_T)
00600 # define YYSIZE_T unsigned int
00601 #endif
00602
00603 #define yyerrok (yyerrstatus = 0)
00604 #define yyclearin (yychar = YYEMPTY)
00605 #define YYEMPTY (-2)
00606 #define YYEOF 0
00607
00608 #define YYACCEPT goto yyacceptlab
00609 #define YYABORT goto yyabortlab
00610 #define YYERROR goto yyerrlab1
00611
00612
00613
00614
00615
00616
00617 #define YYFAIL goto yyerrlab
00618
00619 #define YYRECOVERING() (!!yyerrstatus)
00620
00621 #define YYBACKUP(Token, Value) \
00622 do \
00623 if (yychar == YYEMPTY && yylen == 1) \
00624 { \
00625 yychar = (Token); \
00626 yylval = (Value); \
00627 yytoken = YYTRANSLATE (yychar); \
00628 YYPOPSTACK; \
00629 goto yybackup; \
00630 } \
00631 else \
00632 { \
00633 yyerror ("syntax error: cannot back up");\
00634 YYERROR; \
00635 } \
00636 while (0)
00637
00638 #define YYTERROR 1
00639 #define YYERRCODE 256
00640
00641
00642
00643
00644 #ifndef YYLLOC_DEFAULT
00645 # define YYLLOC_DEFAULT(Current, Rhs, N) \
00646 Current.first_line = Rhs[1].first_line; \
00647 Current.first_column = Rhs[1].first_column; \
00648 Current.last_line = Rhs[N].last_line; \
00649 Current.last_column = Rhs[N].last_column;
00650 #endif
00651
00652
00653
00654 #ifdef YYLEX_PARAM
00655 # define YYLEX yylex (&yylval, YYLEX_PARAM)
00656 #else
00657 # define YYLEX yylex (&yylval)
00658 #endif
00659
00660
00661 #if YYDEBUG
00662
00663 # ifndef YYFPRINTF
00664 # include <stdio.h>
00665 # define YYFPRINTF fprintf
00666 # endif
00667
00668 # define YYDPRINTF(Args) \
00669 do { \
00670 if (yydebug) \
00671 YYFPRINTF Args; \
00672 } while (0)
00673
00674 # define YYDSYMPRINT(Args) \
00675 do { \
00676 if (yydebug) \
00677 yysymprint Args; \
00678 } while (0)
00679
00680 # define YYDSYMPRINTF(Title, Token, Value, Location) \
00681 do { \
00682 if (yydebug) \
00683 { \
00684 YYFPRINTF (stderr, "%s ", Title); \
00685 yysymprint (stderr, \
00686 Token, Value); \
00687 YYFPRINTF (stderr, "\n"); \
00688 } \
00689 } while (0)
00690
00691
00692
00693
00694
00695
00696 #if defined (__STDC__) || defined (__cplusplus)
00697 static void
00698 yy_stack_print (short *bottom, short *top)
00699 #else
00700 static void
00701 yy_stack_print (bottom, top)
00702 short *bottom;
00703 short *top;
00704 #endif
00705 {
00706 YYFPRINTF (stderr, "Stack now");
00707 for (; bottom <= top; ++bottom)
00708 YYFPRINTF (stderr, " %d", *bottom);
00709 YYFPRINTF (stderr, "\n");
00710 }
00711
00712 # define YY_STACK_PRINT(Bottom, Top) \
00713 do { \
00714 if (yydebug) \
00715 yy_stack_print ((Bottom), (Top)); \
00716 } while (0)
00717
00718
00719
00720
00721
00722
00723 #if defined (__STDC__) || defined (__cplusplus)
00724 static void
00725 yy_reduce_print (int yyrule)
00726 #else
00727 static void
00728 yy_reduce_print (yyrule)
00729 int yyrule;
00730 #endif
00731 {
00732 int yyi;
00733 unsigned int yylineno = yyrline[yyrule];
00734 YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
00735 yyrule - 1, yylineno);
00736
00737 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
00738 YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
00739 YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
00740 }
00741
00742 # define YY_REDUCE_PRINT(Rule) \
00743 do { \
00744 if (yydebug) \
00745 yy_reduce_print (Rule); \
00746 } while (0)
00747
00748
00749
00750 int yydebug;
00751 #else
00752 # define YYDPRINTF(Args)
00753 # define YYDSYMPRINT(Args)
00754 # define YYDSYMPRINTF(Title, Token, Value, Location)
00755 # define YY_STACK_PRINT(Bottom, Top)
00756 # define YY_REDUCE_PRINT(Rule)
00757 #endif
00758
00759
00760
00761 #ifndef YYINITDEPTH
00762 # define YYINITDEPTH 200
00763 #endif
00764
00765
00766
00767
00768
00769
00770
00771
00772 #if YYMAXDEPTH == 0
00773 # undef YYMAXDEPTH
00774 #endif
00775
00776 #ifndef YYMAXDEPTH
00777 # define YYMAXDEPTH 10000
00778 #endif
00779
00780
00781
00782 #if YYERROR_VERBOSE
00783
00784 # ifndef yystrlen
00785 # if defined (__GLIBC__) && defined (_STRING_H)
00786 # define yystrlen strlen
00787 # else
00788
00789 static YYSIZE_T
00790 # if defined (__STDC__) || defined (__cplusplus)
00791 yystrlen (const char *yystr)
00792 # else
00793 yystrlen (yystr)
00794 const char *yystr;
00795 # endif
00796 {
00797 register const char *yys = yystr;
00798
00799 while (*yys++ != '\0')
00800 continue;
00801
00802 return yys - yystr - 1;
00803 }
00804 # endif
00805 # endif
00806
00807 # ifndef yystpcpy
00808 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
00809 # define yystpcpy stpcpy
00810 # else
00811
00812
00813 static char *
00814 # if defined (__STDC__) || defined (__cplusplus)
00815 yystpcpy (char *yydest, const char *yysrc)
00816 # else
00817 yystpcpy (yydest, yysrc)
00818 char *yydest;
00819 const char *yysrc;
00820 # endif
00821 {
00822 register char *yyd = yydest;
00823 register const char *yys = yysrc;
00824
00825 while ((*yyd++ = *yys++) != '\0')
00826 continue;
00827
00828 return yyd - 1;
00829 }
00830 # endif
00831 # endif
00832
00833 #endif
00834
00835
00836
00837 #if YYDEBUG
00838
00839
00840
00841
00842 #if defined (__STDC__) || defined (__cplusplus)
00843 static void
00844 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
00845 #else
00846 static void
00847 yysymprint (yyoutput, yytype, yyvaluep)
00848 FILE *yyoutput;
00849 int yytype;
00850 YYSTYPE *yyvaluep;
00851 #endif
00852 {
00853
00854 (void) yyvaluep;
00855
00856 if (yytype < YYNTOKENS)
00857 {
00858 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
00859 # ifdef YYPRINT
00860 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
00861 # endif
00862 }
00863 else
00864 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
00865
00866 switch (yytype)
00867 {
00868 default:
00869 break;
00870 }
00871 YYFPRINTF (yyoutput, ")");
00872 }
00873
00874 #endif
00875
00876
00877
00878
00879 #if defined (__STDC__) || defined (__cplusplus)
00880 static void
00881 yydestruct (int yytype, YYSTYPE *yyvaluep)
00882 #else
00883 static void
00884 yydestruct (yytype, yyvaluep)
00885 int yytype;
00886 YYSTYPE *yyvaluep;
00887 #endif
00888 {
00889
00890 (void) yyvaluep;
00891
00892 switch (yytype)
00893 {
00894
00895 default:
00896 break;
00897 }
00898 }
00899
00900
00901
00902
00903 #ifdef YYPARSE_PARAM
00904 # if defined (__STDC__) || defined (__cplusplus)
00905 int yyparse (void *YYPARSE_PARAM);
00906 # else
00907 int yyparse ();
00908 # endif
00909 #else
00910 #if defined (__STDC__) || defined (__cplusplus)
00911 int yyparse (void);
00912 #else
00913 int yyparse ();
00914 #endif
00915 #endif
00916
00917
00918
00919
00920
00921
00922
00923
00924
00925
00926 #ifdef YYPARSE_PARAM
00927 # if defined (__STDC__) || defined (__cplusplus)
00928 int yyparse (void *YYPARSE_PARAM)
00929 # else
00930 int yyparse (YYPARSE_PARAM)
00931 void *YYPARSE_PARAM;
00932 # endif
00933 #else
00934 #if defined (__STDC__) || defined (__cplusplus)
00935 int
00936 yyparse (void)
00937 #else
00938 int
00939 yyparse ()
00940
00941 #endif
00942 #endif
00943 {
00944
00945 int yychar;
00946
00947
00948 YYSTYPE yylval;
00949
00950
00951 int yynerrs;
00952
00953 register int yystate;
00954 register int yyn;
00955 int yyresult;
00956
00957 int yyerrstatus;
00958
00959 int yytoken = 0;
00960
00961
00962
00963
00964
00965
00966
00967
00968
00969
00970 short yyssa[YYINITDEPTH];
00971 short *yyss = yyssa;
00972 register short *yyssp;
00973
00974
00975 YYSTYPE yyvsa[YYINITDEPTH];
00976 YYSTYPE *yyvs = yyvsa;
00977 register YYSTYPE *yyvsp;
00978
00979
00980
00981 #define YYPOPSTACK (yyvsp--, yyssp--)
00982
00983 YYSIZE_T yystacksize = YYINITDEPTH;
00984
00985
00986
00987 YYSTYPE yyval;
00988
00989
00990
00991
00992 int yylen;
00993
00994 YYDPRINTF ((stderr, "Starting parse\n"));
00995
00996 yystate = 0;
00997 yyerrstatus = 0;
00998 yynerrs = 0;
00999 yychar = YYEMPTY;
01000
01001
01002
01003
01004
01005
01006 yyssp = yyss;
01007 yyvsp = yyvs;
01008
01009 goto yysetstate;
01010
01011
01012
01013
01014 yynewstate:
01015
01016
01017
01018 yyssp++;
01019
01020 yysetstate:
01021 *yyssp = yystate;
01022
01023 if (yyss + yystacksize - 1 <= yyssp)
01024 {
01025
01026 YYSIZE_T yysize = yyssp - yyss + 1;
01027
01028 #ifdef yyoverflow
01029 {
01030
01031
01032
01033 YYSTYPE *yyvs1 = yyvs;
01034 short *yyss1 = yyss;
01035
01036
01037
01038
01039
01040
01041 yyoverflow ("parser stack overflow",
01042 &yyss1, yysize * sizeof (*yyssp),
01043 &yyvs1, yysize * sizeof (*yyvsp),
01044
01045 &yystacksize);
01046
01047 yyss = yyss1;
01048 yyvs = yyvs1;
01049 }
01050 #else
01051 # ifndef YYSTACK_RELOCATE
01052 goto yyoverflowlab;
01053 # else
01054
01055 if (YYMAXDEPTH <= yystacksize)
01056 goto yyoverflowlab;
01057 yystacksize *= 2;
01058 if (YYMAXDEPTH < yystacksize)
01059 yystacksize = YYMAXDEPTH;
01060
01061 {
01062 short *yyss1 = yyss;
01063 union yyalloc *yyptr =
01064 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
01065 if (! yyptr)
01066 goto yyoverflowlab;
01067 YYSTACK_RELOCATE (yyss);
01068 YYSTACK_RELOCATE (yyvs);
01069
01070 # undef YYSTACK_RELOCATE
01071 if (yyss1 != yyssa)
01072 YYSTACK_FREE (yyss1);
01073 }
01074 # endif
01075 #endif
01076
01077 yyssp = yyss + yysize - 1;
01078 yyvsp = yyvs + yysize - 1;
01079
01080
01081 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
01082 (unsigned long int) yystacksize));
01083
01084 if (yyss + yystacksize - 1 <= yyssp)
01085 YYABORT;
01086 }
01087
01088 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
01089
01090 goto yybackup;
01091
01092
01093
01094
01095 yybackup:
01096
01097
01098
01099
01100
01101
01102
01103 yyn = yypact[yystate];
01104 if (yyn == YYPACT_NINF)
01105 goto yydefault;
01106
01107
01108
01109
01110 if (yychar == YYEMPTY)
01111 {
01112 YYDPRINTF ((stderr, "Reading a token: "));
01113 yychar = YYLEX;
01114 }
01115
01116 if (yychar <= YYEOF)
01117 {
01118 yychar = yytoken = YYEOF;
01119 YYDPRINTF ((stderr, "Now at end of input.\n"));
01120 }
01121 else
01122 {
01123 yytoken = YYTRANSLATE (yychar);
01124 YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
01125 }
01126
01127
01128
01129 yyn += yytoken;
01130 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
01131 goto yydefault;
01132 yyn = yytable[yyn];
01133 if (yyn <= 0)
01134 {
01135 if (yyn == 0 || yyn == YYTABLE_NINF)
01136 goto yyerrlab;
01137 yyn = -yyn;
01138 goto yyreduce;
01139 }
01140
01141 if (yyn == YYFINAL)
01142 YYACCEPT;
01143
01144
01145 YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
01146
01147
01148 if (yychar != YYEOF)
01149 yychar = YYEMPTY;
01150
01151 *++yyvsp = yylval;
01152
01153
01154
01155
01156 if (yyerrstatus)
01157 yyerrstatus--;
01158
01159 yystate = yyn;
01160 goto yynewstate;
01161
01162
01163
01164
01165
01166 yydefault:
01167 yyn = yydefact[yystate];
01168 if (yyn == 0)
01169 goto yyerrlab;
01170 goto yyreduce;
01171
01172
01173
01174
01175
01176 yyreduce:
01177
01178 yylen = yyr2[yyn];
01179
01180
01181
01182
01183
01184
01185
01186
01187
01188 yyval = yyvsp[1-yylen];
01189
01190
01191 YY_REDUCE_PRINT (yyn);
01192 switch (yyn)
01193 {
01194 case 2:
01195 #line 65 "evalparse.y"
01196 { *(eval_scalar*)resultptr=yyvsp[0].scalar; }
01197 break;
01198
01199 case 3:
01200 #line 68 "evalparse.y"
01201 { yyval.scalar = yyvsp[0].scalar; }
01202 break;
01203
01204 case 4:
01205 #line 69 "evalparse.y"
01206 { yyval.scalar = yyvsp[0].scalar; }
01207 break;
01208
01209 case 5:
01210 #line 70 "evalparse.y"
01211 { yyval.scalar = yyvsp[0].scalar; }
01212 break;
01213
01214 case 6:
01215 #line 71 "evalparse.y"
01216 { if (!scalar_op(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar, '*')) YYERROR; }
01217 break;
01218
01219 case 7:
01220 #line 72 "evalparse.y"
01221 { if (!scalar_op(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar, '/')) YYERROR; }
01222 break;
01223
01224 case 8:
01225 #line 73 "evalparse.y"
01226 { if (!scalar_op(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar, '%')) YYERROR; }
01227 break;
01228
01229 case 9:
01230 #line 74 "evalparse.y"
01231 { if (!scalar_op(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar, '+')) YYERROR; }
01232 break;
01233
01234 case 10:
01235 #line 75 "evalparse.y"
01236 { if (!scalar_op(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar, '-')) YYERROR; }
01237 break;
01238
01239 case 11:
01240 #line 76 "evalparse.y"
01241 { if (!scalar_op(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar, '&')) YYERROR; }
01242 break;
01243
01244 case 12:
01245 #line 77 "evalparse.y"
01246 { if (!scalar_op(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar, '|')) YYERROR; }
01247 break;
01248
01249 case 13:
01250 #line 78 "evalparse.y"
01251 { if (!scalar_op(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar, '^')) YYERROR; }
01252 break;
01253
01254 case 14:
01255 #line 79 "evalparse.y"
01256 { if (!scalar_op(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar, EVAL_POW)) YYERROR; }
01257 break;
01258
01259 case 15:
01260 #line 80 "evalparse.y"
01261 { if (!scalar_op(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar, EVAL_SHL)) YYERROR; }
01262 break;
01263
01264 case 16:
01265 #line 81 "evalparse.y"
01266 { if (!scalar_op(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar, EVAL_SHR)) YYERROR; }
01267 break;
01268
01269 case 17:
01270 #line 82 "evalparse.y"
01271 { if (!scalar_op(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar, EVAL_EQ)) YYERROR; }
01272 break;
01273
01274 case 18:
01275 #line 83 "evalparse.y"
01276 { if (!scalar_op(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar, EVAL_NE)) YYERROR; }
01277 break;
01278
01279 case 19:
01280 #line 84 "evalparse.y"
01281 { if (!scalar_op(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar, EVAL_GT)) YYERROR; }
01282 break;
01283
01284 case 20:
01285 #line 85 "evalparse.y"
01286 { if (!scalar_op(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar, EVAL_GE)) YYERROR; }
01287 break;
01288
01289 case 21:
01290 #line 86 "evalparse.y"
01291 { if (!scalar_op(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar, EVAL_LT)) YYERROR; }
01292 break;
01293
01294 case 22:
01295 #line 87 "evalparse.y"
01296 { if (!scalar_op(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar, EVAL_LE)) YYERROR; }
01297 break;
01298
01299 case 23:
01300 #line 88 "evalparse.y"
01301 { if (!scalar_op(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar, EVAL_LAND)) YYERROR; }
01302 break;
01303
01304 case 24:
01305 #line 89 "evalparse.y"
01306 { if (!scalar_op(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar, EVAL_LXOR)) YYERROR; }
01307 break;
01308
01309 case 25:
01310 #line 90 "evalparse.y"
01311 { if (!scalar_op(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar, EVAL_LOR)) YYERROR; }
01312 break;
01313
01314 case 26:
01315 #line 91 "evalparse.y"
01316 { scalar_strop(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar, EVAL_STR_EQ); }
01317 break;
01318
01319 case 27:
01320 #line 92 "evalparse.y"
01321 { scalar_strop(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar, EVAL_STR_NE); }
01322 break;
01323
01324 case 28:
01325 #line 93 "evalparse.y"
01326 { scalar_strop(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar, EVAL_STR_GT); }
01327 break;
01328
01329 case 29:
01330 #line 94 "evalparse.y"
01331 { scalar_strop(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar, EVAL_STR_GE); }
01332 break;
01333
01334 case 30:
01335 #line 95 "evalparse.y"
01336 { scalar_strop(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar, EVAL_STR_LT); }
01337 break;
01338
01339 case 31:
01340 #line 96 "evalparse.y"
01341 { scalar_strop(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar, EVAL_STR_LE); }
01342 break;
01343
01344 case 32:
01345 #line 97 "evalparse.y"
01346 { scalar_negset(&yyval.scalar, &yyvsp[0].scalar); }
01347 break;
01348
01349 case 33:
01350 #line 98 "evalparse.y"
01351 { scalar_notset(&yyval.scalar, &yyvsp[0].scalar); }
01352 break;
01353
01354 case 34:
01355 #line 99 "evalparse.y"
01356 { scalar_lnotset(&yyval.scalar, &yyvsp[0].scalar); }
01357 break;
01358
01359 case 35:
01360 #line 100 "evalparse.y"
01361 { yyval.scalar = yyvsp[-1].scalar; }
01362 break;
01363
01364 case 36:
01365 #line 101 "evalparse.y"
01366 { scalar_miniif(&yyval.scalar, &yyvsp[-4].scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar); }
01367 break;
01368
01369 case 37:
01370 #line 103 "evalparse.y"
01371 {
01372 scalar_concat(&yyval.scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar);
01373 scalar_destroy(&yyvsp[-2].scalar);
01374 scalar_destroy(&yyvsp[0].scalar);
01375 }
01376 break;
01377
01378 case 38:
01379 #line 109 "evalparse.y"
01380 {
01381 int r=evalfunc(&yyval.scalar, yyvsp[-3].ident, &yyvsp[-1].scalars);
01382 scalarlist_destroy(&yyvsp[-1].scalars);
01383 free(yyvsp[-3].ident);
01384 if (!r) YYERROR;
01385 }
01386 break;
01387
01388 case 39:
01389 #line 116 "evalparse.y"
01390 {
01391 int r=evalsymbol(&yyval.scalar, yyvsp[0].ident);
01392 free(yyvsp[0].ident);
01393 if (!r) YYERROR;
01394 }
01395 break;
01396
01397 case 40:
01398 #line 124 "evalparse.y"
01399 {
01400 eval_scalarlist s;
01401 s.count=0;
01402 s.scalars=NULL;
01403 yyval.scalars = s;
01404 }
01405 break;
01406
01407 case 41:
01408 #line 130 "evalparse.y"
01409 { yyval.scalars = yyvsp[0].scalars; }
01410 break;
01411
01412 case 42:
01413 #line 133 "evalparse.y"
01414 { scalarlist_set(&yyval.scalars, &yyvsp[0].scalar); }
01415 break;
01416
01417 case 43:
01418 #line 135 "evalparse.y"
01419 {
01420 scalarlist_concat(&yyval.scalars, &yyvsp[-2].scalars, &yyvsp[0].scalars);
01421 scalarlist_destroy_gentle(&yyvsp[-2].scalars);
01422 scalarlist_destroy_gentle(&yyvsp[0].scalars);
01423 }
01424 break;
01425
01426 case 44:
01427 #line 142 "evalparse.y"
01428 { yyval.ident = yyvsp[0].ident; }
01429 break;
01430
01431
01432 }
01433
01434
01435 #line 1435 "y.tab.c"
01436
01437 yyvsp -= yylen;
01438 yyssp -= yylen;
01439
01440
01441 YY_STACK_PRINT (yyss, yyssp);
01442
01443 *++yyvsp = yyval;
01444
01445
01446
01447
01448
01449
01450 yyn = yyr1[yyn];
01451
01452 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
01453 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
01454 yystate = yytable[yystate];
01455 else
01456 yystate = yydefgoto[yyn - YYNTOKENS];
01457
01458 goto yynewstate;
01459
01460
01461
01462
01463
01464 yyerrlab:
01465
01466 if (!yyerrstatus)
01467 {
01468 ++yynerrs;
01469 #if YYERROR_VERBOSE
01470 yyn = yypact[yystate];
01471
01472 if (YYPACT_NINF < yyn && yyn < YYLAST)
01473 {
01474 YYSIZE_T yysize = 0;
01475 int yytype = YYTRANSLATE (yychar);
01476 char *yymsg;
01477 int yyx, yycount;
01478
01479 yycount = 0;
01480
01481
01482 for (yyx = yyn < 0 ? -yyn : 0;
01483 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
01484 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
01485 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
01486 yysize += yystrlen ("syntax error, unexpected ") + 1;
01487 yysize += yystrlen (yytname[yytype]);
01488 yymsg = (char *) YYSTACK_ALLOC (yysize);
01489 if (yymsg != 0)
01490 {
01491 char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
01492 yyp = yystpcpy (yyp, yytname[yytype]);
01493
01494 if (yycount < 5)
01495 {
01496 yycount = 0;
01497 for (yyx = yyn < 0 ? -yyn : 0;
01498 yyx < (int) (sizeof (yytname) / sizeof (char *));
01499 yyx++)
01500 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
01501 {
01502 const char *yyq = ! yycount ? ", expecting " : " or ";
01503 yyp = yystpcpy (yyp, yyq);
01504 yyp = yystpcpy (yyp, yytname[yyx]);
01505 yycount++;
01506 }
01507 }
01508 yyerror (yymsg);
01509 YYSTACK_FREE (yymsg);
01510 }
01511 else
01512 yyerror ("syntax error; also virtual memory exhausted");
01513 }
01514 else
01515 #endif
01516 yyerror ("syntax error");
01517 }
01518
01519
01520
01521 if (yyerrstatus == 3)
01522 {
01523
01524
01525
01526
01527 if (yychar == YYEOF)
01528 {
01529
01530 YYPOPSTACK;
01531
01532 while (yyss < yyssp)
01533 {
01534 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
01535 yydestruct (yystos[*yyssp], yyvsp);
01536 YYPOPSTACK;
01537 }
01538 YYABORT;
01539 }
01540
01541 YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
01542 yydestruct (yytoken, &yylval);
01543 yychar = YYEMPTY;
01544
01545 }
01546
01547
01548
01549 goto yyerrlab1;
01550
01551
01552
01553
01554
01555 yyerrlab1:
01556 yyerrstatus = 3;
01557
01558 for (;;)
01559 {
01560 yyn = yypact[yystate];
01561 if (yyn != YYPACT_NINF)
01562 {
01563 yyn += YYTERROR;
01564 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
01565 {
01566 yyn = yytable[yyn];
01567 if (0 < yyn)
01568 break;
01569 }
01570 }
01571
01572
01573 if (yyssp == yyss)
01574 YYABORT;
01575
01576 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
01577 yydestruct (yystos[yystate], yyvsp);
01578 yyvsp--;
01579 yystate = *--yyssp;
01580
01581 YY_STACK_PRINT (yyss, yyssp);
01582 }
01583
01584 if (yyn == YYFINAL)
01585 YYACCEPT;
01586
01587 YYDPRINTF ((stderr, "Shifting error token, "));
01588
01589 *++yyvsp = yylval;
01590
01591
01592 yystate = yyn;
01593 goto yynewstate;
01594
01595
01596
01597
01598
01599 yyacceptlab:
01600 yyresult = 0;
01601 goto yyreturn;
01602
01603
01604
01605
01606 yyabortlab:
01607 yyresult = 1;
01608 goto yyreturn;
01609
01610 #ifndef yyoverflow
01611
01612
01613
01614 yyoverflowlab:
01615 yyerror ("parser stack overflow");
01616 yyresult = 2;
01617
01618 #endif
01619
01620 yyreturn:
01621 #ifndef yyoverflow
01622 if (yyss != yyssa)
01623 YYSTACK_FREE (yyss);
01624 #endif
01625 return yyresult;
01626 }
01627
01628
01629 #line 145 "evalparse.y"
01630
01631