github.com/ader1990/go@v0.0.0-20140630135419-8c24447fa791/src/cmd/cc/y.tab.c (about) 1 /* A Bison parser, made by GNU Bison 2.7.12-4996. */ 2 3 /* Bison implementation for Yacc-like parsers in C 4 5 Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. 6 7 This program is free software: you can redistribute it and/or modify 8 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation, either version 3 of the License, or 10 (at your option) any later version. 11 12 This program is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 19 20 /* As a special exception, you may create a larger work that contains 21 part or all of the Bison parser skeleton and distribute that work 22 under terms of your choice, so long as that work isn't itself a 23 parser generator using the skeleton or a modified version thereof 24 as a parser skeleton. Alternatively, if you modify or redistribute 25 the parser skeleton itself, you may (at your option) remove this 26 special exception, which will cause the skeleton and the resulting 27 Bison output files to be licensed under the GNU General Public 28 License without this special exception. 29 30 This special exception was added by the Free Software Foundation in 31 version 2.2 of Bison. */ 32 33 /* C LALR(1) parser skeleton written by Richard Stallman, by 34 simplifying the original so-called "semantic" parser. */ 35 36 /* All symbols defined below should begin with yy or YY, to avoid 37 infringing on user name space. This should be done even for local 38 variables, as they might otherwise be expanded by user macros. 39 There are some unavoidable exceptions within include files to 40 define necessary library symbols; they are noted "INFRINGES ON 41 USER NAME SPACE" below. */ 42 43 /* Identify Bison output. */ 44 #define YYBISON 1 45 46 /* Bison version. */ 47 #define YYBISON_VERSION "2.7.12-4996" 48 49 /* Skeleton name. */ 50 #define YYSKELETON_NAME "yacc.c" 51 52 /* Pure parsers. */ 53 #define YYPURE 0 54 55 /* Push parsers. */ 56 #define YYPUSH 0 57 58 /* Pull parsers. */ 59 #define YYPULL 1 60 61 62 63 64 /* Copy the first part of user declarations. */ 65 /* Line 371 of yacc.c */ 66 #line 31 "cc.y" 67 68 #include <u.h> 69 #include <stdio.h> /* if we don't, bison will, and cc.h re-#defines getc */ 70 #include "cc.h" 71 72 /* Line 371 of yacc.c */ 73 #line 74 "y.tab.c" 74 75 # ifndef YY_NULL 76 # if defined __cplusplus && 201103L <= __cplusplus 77 # define YY_NULL nullptr 78 # else 79 # define YY_NULL 0 80 # endif 81 # endif 82 83 /* Enabling verbose error messages. */ 84 #ifdef YYERROR_VERBOSE 85 # undef YYERROR_VERBOSE 86 # define YYERROR_VERBOSE 1 87 #else 88 # define YYERROR_VERBOSE 0 89 #endif 90 91 /* In a future release of Bison, this section will be replaced 92 by #include "y.tab.h". */ 93 #ifndef YY_YY_Y_TAB_H_INCLUDED 94 # define YY_YY_Y_TAB_H_INCLUDED 95 /* Enabling traces. */ 96 #ifndef YYDEBUG 97 # define YYDEBUG 0 98 #endif 99 #if YYDEBUG 100 extern int yydebug; 101 #endif 102 103 /* Tokens. */ 104 #ifndef YYTOKENTYPE 105 # define YYTOKENTYPE 106 /* Put the tokens into the symbol table, so that GDB and other debuggers 107 know about them. */ 108 enum yytokentype { 109 LORE = 258, 110 LXORE = 259, 111 LANDE = 260, 112 LLSHE = 261, 113 LRSHE = 262, 114 LMDE = 263, 115 LDVE = 264, 116 LMLE = 265, 117 LME = 266, 118 LPE = 267, 119 LOROR = 268, 120 LANDAND = 269, 121 LNE = 270, 122 LEQ = 271, 123 LGE = 272, 124 LLE = 273, 125 LRSH = 274, 126 LLSH = 275, 127 LMG = 276, 128 LPP = 277, 129 LMM = 278, 130 LNAME = 279, 131 LTYPE = 280, 132 LFCONST = 281, 133 LDCONST = 282, 134 LCONST = 283, 135 LLCONST = 284, 136 LUCONST = 285, 137 LULCONST = 286, 138 LVLCONST = 287, 139 LUVLCONST = 288, 140 LSTRING = 289, 141 LLSTRING = 290, 142 LAUTO = 291, 143 LBREAK = 292, 144 LCASE = 293, 145 LCHAR = 294, 146 LCONTINUE = 295, 147 LDEFAULT = 296, 148 LDO = 297, 149 LDOUBLE = 298, 150 LELSE = 299, 151 LEXTERN = 300, 152 LFLOAT = 301, 153 LFOR = 302, 154 LGOTO = 303, 155 LIF = 304, 156 LINT = 305, 157 LLONG = 306, 158 LPREFETCH = 307, 159 LREGISTER = 308, 160 LRETURN = 309, 161 LSHORT = 310, 162 LSIZEOF = 311, 163 LUSED = 312, 164 LSTATIC = 313, 165 LSTRUCT = 314, 166 LSWITCH = 315, 167 LTYPEDEF = 316, 168 LTYPESTR = 317, 169 LUNION = 318, 170 LUNSIGNED = 319, 171 LWHILE = 320, 172 LVOID = 321, 173 LENUM = 322, 174 LSIGNED = 323, 175 LCONSTNT = 324, 176 LVOLATILE = 325, 177 LSET = 326, 178 LSIGNOF = 327, 179 LRESTRICT = 328, 180 LINLINE = 329 181 }; 182 #endif 183 /* Tokens. */ 184 #define LORE 258 185 #define LXORE 259 186 #define LANDE 260 187 #define LLSHE 261 188 #define LRSHE 262 189 #define LMDE 263 190 #define LDVE 264 191 #define LMLE 265 192 #define LME 266 193 #define LPE 267 194 #define LOROR 268 195 #define LANDAND 269 196 #define LNE 270 197 #define LEQ 271 198 #define LGE 272 199 #define LLE 273 200 #define LRSH 274 201 #define LLSH 275 202 #define LMG 276 203 #define LPP 277 204 #define LMM 278 205 #define LNAME 279 206 #define LTYPE 280 207 #define LFCONST 281 208 #define LDCONST 282 209 #define LCONST 283 210 #define LLCONST 284 211 #define LUCONST 285 212 #define LULCONST 286 213 #define LVLCONST 287 214 #define LUVLCONST 288 215 #define LSTRING 289 216 #define LLSTRING 290 217 #define LAUTO 291 218 #define LBREAK 292 219 #define LCASE 293 220 #define LCHAR 294 221 #define LCONTINUE 295 222 #define LDEFAULT 296 223 #define LDO 297 224 #define LDOUBLE 298 225 #define LELSE 299 226 #define LEXTERN 300 227 #define LFLOAT 301 228 #define LFOR 302 229 #define LGOTO 303 230 #define LIF 304 231 #define LINT 305 232 #define LLONG 306 233 #define LPREFETCH 307 234 #define LREGISTER 308 235 #define LRETURN 309 236 #define LSHORT 310 237 #define LSIZEOF 311 238 #define LUSED 312 239 #define LSTATIC 313 240 #define LSTRUCT 314 241 #define LSWITCH 315 242 #define LTYPEDEF 316 243 #define LTYPESTR 317 244 #define LUNION 318 245 #define LUNSIGNED 319 246 #define LWHILE 320 247 #define LVOID 321 248 #define LENUM 322 249 #define LSIGNED 323 250 #define LCONSTNT 324 251 #define LVOLATILE 325 252 #define LSET 326 253 #define LSIGNOF 327 254 #define LRESTRICT 328 255 #define LINLINE 329 256 257 258 259 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 260 typedef union YYSTYPE 261 { 262 /* Line 387 of yacc.c */ 263 #line 36 "cc.y" 264 265 Node* node; 266 Sym* sym; 267 Type* type; 268 struct 269 { 270 Type* t; 271 uchar c; 272 } tycl; 273 struct 274 { 275 Type* t1; 276 Type* t2; 277 Type* t3; 278 uchar c; 279 } tyty; 280 struct 281 { 282 char* s; 283 int32 l; 284 } sval; 285 int32 lval; 286 double dval; 287 vlong vval; 288 289 290 /* Line 387 of yacc.c */ 291 #line 292 "y.tab.c" 292 } YYSTYPE; 293 # define YYSTYPE_IS_TRIVIAL 1 294 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 295 # define YYSTYPE_IS_DECLARED 1 296 #endif 297 298 extern YYSTYPE yylval; 299 300 #ifdef YYPARSE_PARAM 301 #if defined __STDC__ || defined __cplusplus 302 int yyparse (void *YYPARSE_PARAM); 303 #else 304 int yyparse (); 305 #endif 306 #else /* ! YYPARSE_PARAM */ 307 #if defined __STDC__ || defined __cplusplus 308 int yyparse (void); 309 #else 310 int yyparse (); 311 #endif 312 #endif /* ! YYPARSE_PARAM */ 313 314 #endif /* !YY_YY_Y_TAB_H_INCLUDED */ 315 316 /* Copy the second part of user declarations. */ 317 318 /* Line 390 of yacc.c */ 319 #line 320 "y.tab.c" 320 321 #ifdef short 322 # undef short 323 #endif 324 325 #ifdef YYTYPE_UINT8 326 typedef YYTYPE_UINT8 yytype_uint8; 327 #else 328 typedef unsigned char yytype_uint8; 329 #endif 330 331 #ifdef YYTYPE_INT8 332 typedef YYTYPE_INT8 yytype_int8; 333 #elif (defined __STDC__ || defined __C99__FUNC__ \ 334 || defined __cplusplus || defined _MSC_VER) 335 typedef signed char yytype_int8; 336 #else 337 typedef short int yytype_int8; 338 #endif 339 340 #ifdef YYTYPE_UINT16 341 typedef YYTYPE_UINT16 yytype_uint16; 342 #else 343 typedef unsigned short int yytype_uint16; 344 #endif 345 346 #ifdef YYTYPE_INT16 347 typedef YYTYPE_INT16 yytype_int16; 348 #else 349 typedef short int yytype_int16; 350 #endif 351 352 #ifndef YYSIZE_T 353 # ifdef __SIZE_TYPE__ 354 # define YYSIZE_T __SIZE_TYPE__ 355 # elif defined size_t 356 # define YYSIZE_T size_t 357 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 358 || defined __cplusplus || defined _MSC_VER) 359 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 360 # define YYSIZE_T size_t 361 # else 362 # define YYSIZE_T unsigned int 363 # endif 364 #endif 365 366 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 367 368 #ifndef YY_ 369 # if defined YYENABLE_NLS && YYENABLE_NLS 370 # if ENABLE_NLS 371 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 372 # define YY_(Msgid) dgettext ("bison-runtime", Msgid) 373 # endif 374 # endif 375 # ifndef YY_ 376 # define YY_(Msgid) Msgid 377 # endif 378 #endif 379 380 #ifndef __attribute__ 381 /* This feature is available in gcc versions 2.5 and later. */ 382 # if (! defined __GNUC__ || __GNUC__ < 2 \ 383 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)) 384 # define __attribute__(Spec) /* empty */ 385 # endif 386 #endif 387 388 /* Suppress unused-variable warnings by "using" E. */ 389 #if ! defined lint || defined __GNUC__ 390 # define YYUSE(E) ((void) (E)) 391 #else 392 # define YYUSE(E) /* empty */ 393 #endif 394 395 396 /* Identity function, used to suppress warnings about constant conditions. */ 397 #ifndef lint 398 # define YYID(N) (N) 399 #else 400 #if (defined __STDC__ || defined __C99__FUNC__ \ 401 || defined __cplusplus || defined _MSC_VER) 402 static int 403 YYID (int yyi) 404 #else 405 static int 406 YYID (yyi) 407 int yyi; 408 #endif 409 { 410 return yyi; 411 } 412 #endif 413 414 #if ! defined yyoverflow || YYERROR_VERBOSE 415 416 /* The parser invokes alloca or malloc; define the necessary symbols. */ 417 418 # ifdef YYSTACK_USE_ALLOCA 419 # if YYSTACK_USE_ALLOCA 420 # ifdef __GNUC__ 421 # define YYSTACK_ALLOC __builtin_alloca 422 # elif defined __BUILTIN_VA_ARG_INCR 423 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 424 # elif defined _AIX 425 # define YYSTACK_ALLOC __alloca 426 # elif defined _MSC_VER 427 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 428 # define alloca _alloca 429 # else 430 # define YYSTACK_ALLOC alloca 431 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 432 || defined __cplusplus || defined _MSC_VER) 433 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 434 /* Use EXIT_SUCCESS as a witness for stdlib.h. */ 435 # ifndef EXIT_SUCCESS 436 # define EXIT_SUCCESS 0 437 # endif 438 # endif 439 # endif 440 # endif 441 # endif 442 443 # ifdef YYSTACK_ALLOC 444 /* Pacify GCC's `empty if-body' warning. */ 445 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 446 # ifndef YYSTACK_ALLOC_MAXIMUM 447 /* The OS might guarantee only one guard page at the bottom of the stack, 448 and a page size can be as small as 4096 bytes. So we cannot safely 449 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 450 to allow for a few compiler-allocated temporary stack slots. */ 451 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 452 # endif 453 # else 454 # define YYSTACK_ALLOC YYMALLOC 455 # define YYSTACK_FREE YYFREE 456 # ifndef YYSTACK_ALLOC_MAXIMUM 457 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 458 # endif 459 # if (defined __cplusplus && ! defined EXIT_SUCCESS \ 460 && ! ((defined YYMALLOC || defined malloc) \ 461 && (defined YYFREE || defined free))) 462 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 463 # ifndef EXIT_SUCCESS 464 # define EXIT_SUCCESS 0 465 # endif 466 # endif 467 # ifndef YYMALLOC 468 # define YYMALLOC malloc 469 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 470 || defined __cplusplus || defined _MSC_VER) 471 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 472 # endif 473 # endif 474 # ifndef YYFREE 475 # define YYFREE free 476 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 477 || defined __cplusplus || defined _MSC_VER) 478 void free (void *); /* INFRINGES ON USER NAME SPACE */ 479 # endif 480 # endif 481 # endif 482 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 483 484 485 #if (! defined yyoverflow \ 486 && (! defined __cplusplus \ 487 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 488 489 /* A type that is properly aligned for any stack member. */ 490 union yyalloc 491 { 492 yytype_int16 yyss_alloc; 493 YYSTYPE yyvs_alloc; 494 }; 495 496 /* The size of the maximum gap between one aligned stack and the next. */ 497 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 498 499 /* The size of an array large to enough to hold all stacks, each with 500 N elements. */ 501 # define YYSTACK_BYTES(N) \ 502 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 503 + YYSTACK_GAP_MAXIMUM) 504 505 # define YYCOPY_NEEDED 1 506 507 /* Relocate STACK from its old location to the new one. The 508 local variables YYSIZE and YYSTACKSIZE give the old and new number of 509 elements in the stack, and YYPTR gives the new location of the 510 stack. Advance YYPTR to a properly aligned location for the next 511 stack. */ 512 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 513 do \ 514 { \ 515 YYSIZE_T yynewbytes; \ 516 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 517 Stack = &yyptr->Stack_alloc; \ 518 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 519 yyptr += yynewbytes / sizeof (*yyptr); \ 520 } \ 521 while (YYID (0)) 522 523 #endif 524 525 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED 526 /* Copy COUNT objects from SRC to DST. The source and destination do 527 not overlap. */ 528 # ifndef YYCOPY 529 # if defined __GNUC__ && 1 < __GNUC__ 530 # define YYCOPY(Dst, Src, Count) \ 531 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) 532 # else 533 # define YYCOPY(Dst, Src, Count) \ 534 do \ 535 { \ 536 YYSIZE_T yyi; \ 537 for (yyi = 0; yyi < (Count); yyi++) \ 538 (Dst)[yyi] = (Src)[yyi]; \ 539 } \ 540 while (YYID (0)) 541 # endif 542 # endif 543 #endif /* !YYCOPY_NEEDED */ 544 545 /* YYFINAL -- State number of the termination state. */ 546 #define YYFINAL 2 547 /* YYLAST -- Last index in YYTABLE. */ 548 #define YYLAST 1188 549 550 /* YYNTOKENS -- Number of terminals. */ 551 #define YYNTOKENS 99 552 /* YYNNTS -- Number of nonterminals. */ 553 #define YYNNTS 75 554 /* YYNRULES -- Number of rules. */ 555 #define YYNRULES 247 556 /* YYNRULES -- Number of states. */ 557 #define YYNSTATES 417 558 559 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 560 #define YYUNDEFTOK 2 561 #define YYMAXUTOK 329 562 563 #define YYTRANSLATE(YYX) \ 564 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 565 566 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 567 static const yytype_uint8 yytranslate[] = 568 { 569 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 570 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 571 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 572 2, 2, 2, 97, 2, 2, 2, 35, 22, 2, 573 38, 93, 33, 31, 4, 32, 36, 34, 2, 2, 574 2, 2, 2, 2, 2, 2, 2, 2, 17, 3, 575 25, 5, 26, 16, 2, 2, 2, 2, 2, 2, 576 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 577 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 578 2, 37, 2, 94, 21, 2, 2, 2, 2, 2, 579 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 580 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 581 2, 2, 2, 95, 20, 96, 98, 2, 2, 2, 582 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 583 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 584 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 585 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 586 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 587 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 588 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 589 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 590 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 591 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 592 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 593 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 594 2, 2, 2, 2, 2, 2, 1, 2, 6, 7, 595 8, 9, 10, 11, 12, 13, 14, 15, 18, 19, 596 23, 24, 27, 28, 29, 30, 39, 40, 41, 42, 597 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 598 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 599 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 600 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 601 83, 84, 85, 86, 87, 88, 89, 90, 91, 92 602 }; 603 604 #if YYDEBUG 605 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 606 YYRHS. */ 607 static const yytype_uint16 yyprhs[] = 608 { 609 0, 0, 3, 4, 7, 10, 14, 15, 16, 23, 610 25, 26, 31, 35, 37, 41, 43, 47, 52, 57, 611 60, 64, 66, 67, 72, 76, 77, 82, 84, 88, 612 89, 94, 95, 101, 102, 104, 106, 110, 112, 116, 613 119, 120, 122, 125, 129, 131, 133, 138, 143, 146, 614 150, 154, 156, 160, 164, 167, 170, 173, 177, 179, 615 182, 184, 186, 189, 190, 192, 194, 197, 200, 204, 616 208, 212, 213, 216, 219, 221, 224, 228, 231, 234, 617 237, 239, 242, 244, 247, 250, 251, 254, 260, 268, 618 269, 280, 286, 294, 298, 304, 307, 310, 314, 320, 619 326, 332, 333, 335, 336, 338, 340, 342, 346, 348, 620 352, 356, 360, 364, 368, 372, 376, 380, 384, 388, 621 392, 396, 400, 404, 408, 412, 416, 420, 426, 430, 622 434, 438, 442, 446, 450, 454, 458, 462, 466, 470, 623 472, 478, 486, 488, 491, 494, 497, 500, 503, 506, 624 509, 512, 515, 518, 522, 528, 534, 539, 544, 548, 625 552, 555, 558, 560, 562, 564, 566, 568, 570, 572, 626 574, 576, 578, 580, 582, 585, 587, 590, 591, 593, 627 595, 599, 600, 605, 606, 608, 610, 612, 614, 617, 628 620, 624, 627, 631, 633, 635, 638, 639, 644, 647, 629 650, 651, 656, 659, 662, 663, 664, 672, 673, 679, 630 681, 683, 686, 687, 690, 692, 694, 696, 698, 701, 631 703, 705, 707, 711, 714, 718, 720, 722, 724, 726, 632 728, 730, 732, 734, 736, 738, 740, 742, 744, 746, 633 748, 750, 752, 754, 756, 758, 760, 762 634 }; 635 636 /* YYRHS -- A `-1'-separated list of the rules' RHS. */ 637 static const yytype_int16 yyrhs[] = 638 { 639 100, 0, -1, -1, 100, 101, -1, 152, 3, -1, 640 152, 104, 3, -1, -1, -1, 152, 106, 102, 111, 641 103, 129, -1, 106, -1, -1, 106, 105, 5, 123, 642 -1, 104, 4, 104, -1, 107, -1, 33, 163, 106, 643 -1, 172, -1, 38, 106, 93, -1, 107, 38, 127, 644 93, -1, 107, 37, 139, 94, -1, 155, 3, -1, 645 155, 109, 3, -1, 106, -1, -1, 106, 110, 5, 646 123, -1, 109, 4, 109, -1, -1, 111, 155, 112, 647 3, -1, 106, -1, 112, 4, 112, -1, -1, 154, 648 114, 116, 3, -1, -1, 113, 154, 115, 116, 3, 649 -1, -1, 117, -1, 118, -1, 117, 4, 117, -1, 650 106, -1, 172, 17, 140, -1, 17, 140, -1, -1, 651 120, -1, 33, 163, -1, 33, 163, 120, -1, 121, 652 -1, 122, -1, 121, 38, 127, 93, -1, 121, 37, 653 139, 94, -1, 38, 93, -1, 37, 139, 94, -1, 654 38, 120, 93, -1, 142, -1, 95, 126, 96, -1, 655 37, 140, 94, -1, 36, 173, -1, 124, 5, -1, 656 123, 4, -1, 125, 123, 4, -1, 124, -1, 125, 657 124, -1, 125, -1, 123, -1, 125, 123, -1, -1, 658 128, -1, 171, -1, 154, 119, -1, 154, 106, -1, 659 36, 36, 36, -1, 128, 4, 128, -1, 95, 130, 660 96, -1, -1, 130, 108, -1, 130, 133, -1, 132, 661 -1, 131, 132, -1, 56, 142, 17, -1, 59, 17, 662 -1, 42, 17, -1, 1, 3, -1, 135, -1, 131, 663 135, -1, 138, -1, 155, 109, -1, 138, 3, -1, 664 -1, 136, 129, -1, 67, 38, 141, 93, 133, -1, 665 67, 38, 141, 93, 133, 62, 133, -1, -1, 137, 666 65, 38, 134, 3, 138, 3, 138, 93, 133, -1, 667 83, 38, 141, 93, 133, -1, 60, 133, 83, 38, 668 141, 93, 3, -1, 72, 138, 3, -1, 78, 38, 669 141, 93, 133, -1, 55, 3, -1, 58, 3, -1, 670 66, 173, 3, -1, 75, 38, 148, 93, 3, -1, 671 70, 38, 148, 93, 3, -1, 89, 38, 148, 93, 672 3, -1, -1, 141, -1, -1, 140, -1, 142, -1, 673 142, -1, 141, 4, 141, -1, 143, -1, 142, 33, 674 142, -1, 142, 34, 142, -1, 142, 35, 142, -1, 675 142, 31, 142, -1, 142, 32, 142, -1, 142, 29, 676 142, -1, 142, 30, 142, -1, 142, 25, 142, -1, 677 142, 26, 142, -1, 142, 28, 142, -1, 142, 27, 678 142, -1, 142, 24, 142, -1, 142, 23, 142, -1, 679 142, 22, 142, -1, 142, 21, 142, -1, 142, 20, 680 142, -1, 142, 19, 142, -1, 142, 18, 142, -1, 681 142, 16, 141, 17, 142, -1, 142, 5, 142, -1, 682 142, 15, 142, -1, 142, 14, 142, -1, 142, 13, 683 142, -1, 142, 12, 142, -1, 142, 11, 142, -1, 684 142, 9, 142, -1, 142, 10, 142, -1, 142, 8, 685 142, -1, 142, 7, 142, -1, 142, 6, 142, -1, 686 144, -1, 38, 154, 119, 93, 143, -1, 38, 154, 687 119, 93, 95, 126, 96, -1, 145, -1, 33, 143, 688 -1, 22, 143, -1, 31, 143, -1, 32, 143, -1, 689 97, 143, -1, 98, 143, -1, 40, 143, -1, 41, 690 143, -1, 74, 144, -1, 90, 144, -1, 38, 141, 691 93, -1, 74, 38, 154, 119, 93, -1, 90, 38, 692 154, 119, 93, -1, 145, 38, 148, 93, -1, 145, 693 37, 141, 94, -1, 145, 39, 173, -1, 145, 36, 694 173, -1, 145, 40, -1, 145, 41, -1, 171, -1, 695 46, -1, 47, -1, 48, -1, 49, -1, 45, -1, 696 44, -1, 50, -1, 51, -1, 146, -1, 147, -1, 697 52, -1, 146, 52, -1, 53, -1, 147, 53, -1, 698 -1, 149, -1, 142, -1, 149, 4, 149, -1, -1, 699 95, 151, 113, 96, -1, -1, 155, -1, 156, -1, 700 168, -1, 165, -1, 156, 162, -1, 168, 162, -1, 701 165, 156, 163, -1, 165, 168, -1, 165, 168, 162, 702 -1, 153, -1, 153, -1, 77, 173, -1, -1, 77, 703 173, 157, 150, -1, 77, 150, -1, 81, 173, -1, 704 -1, 81, 173, 158, 150, -1, 81, 150, -1, 85, 705 173, -1, -1, -1, 85, 173, 159, 95, 160, 167, 706 96, -1, -1, 85, 95, 161, 167, 96, -1, 43, 707 -1, 164, -1, 162, 164, -1, -1, 163, 170, -1, 708 168, -1, 170, -1, 169, -1, 166, -1, 165, 166, 709 -1, 170, -1, 169, -1, 42, -1, 42, 5, 142, 710 -1, 167, 4, -1, 167, 4, 167, -1, 57, -1, 711 73, -1, 68, -1, 69, -1, 86, -1, 82, -1, 712 64, -1, 61, -1, 84, -1, 54, -1, 76, -1, 713 63, -1, 79, -1, 80, -1, 71, -1, 92, -1, 714 87, -1, 88, -1, 91, -1, 42, -1, 173, -1, 715 42, -1, 43, -1 716 }; 717 718 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 719 static const yytype_uint16 yyrline[] = 720 { 721 0, 101, 101, 102, 108, 112, 114, 128, 113, 143, 722 148, 147, 155, 158, 159, 166, 167, 171, 175, 184, 723 188, 194, 200, 199, 211, 224, 225, 228, 232, 239, 724 238, 244, 243, 250, 254, 257, 261, 264, 269, 273, 725 282, 285, 288, 293, 298, 301, 302, 306, 312, 316, 726 320, 326, 327, 333, 337, 342, 345, 346, 350, 351, 727 357, 358, 359, 365, 368, 375, 376, 381, 386, 390, 728 396, 406, 409, 413, 419, 420, 426, 430, 434, 440, 729 444, 445, 451, 452, 458, 459, 459, 470, 476, 484, 730 484, 495, 499, 503, 508, 522, 526, 530, 534, 538, 731 542, 548, 551, 554, 557, 560, 567, 568, 574, 575, 732 579, 583, 587, 591, 595, 599, 603, 607, 611, 615, 733 619, 623, 627, 631, 635, 639, 643, 647, 651, 655, 734 659, 663, 667, 671, 675, 679, 683, 687, 691, 697, 735 698, 705, 713, 714, 718, 722, 726, 730, 734, 738, 736 742, 746, 750, 756, 760, 766, 772, 780, 784, 789, 737 794, 798, 802, 803, 810, 817, 824, 831, 838, 845, 738 852, 859, 860, 863, 873, 891, 901, 919, 922, 925, 739 926, 933, 932, 955, 959, 962, 967, 972, 978, 986, 740 992, 998, 1004, 1012, 1020, 1027, 1033, 1032, 1044, 1052, 741 1058, 1057, 1069, 1077, 1086, 1090, 1085, 1107, 1106, 1115, 742 1121, 1122, 1128, 1131, 1137, 1138, 1139, 1142, 1143, 1149, 743 1150, 1153, 1157, 1161, 1162, 1165, 1166, 1167, 1168, 1169, 744 1170, 1171, 1172, 1173, 1176, 1177, 1178, 1179, 1180, 1181, 745 1182, 1185, 1186, 1187, 1190, 1205, 1217, 1218 746 }; 747 #endif 748 749 #if YYDEBUG || YYERROR_VERBOSE || 0 750 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 751 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 752 static const char *const yytname[] = 753 { 754 "$end", "error", "$undefined", "';'", "','", "'='", "LORE", "LXORE", 755 "LANDE", "LLSHE", "LRSHE", "LMDE", "LDVE", "LMLE", "LME", "LPE", "'?'", 756 "':'", "LOROR", "LANDAND", "'|'", "'^'", "'&'", "LNE", "LEQ", "'<'", 757 "'>'", "LGE", "LLE", "LRSH", "LLSH", "'+'", "'-'", "'*'", "'/'", "'%'", 758 "'.'", "'['", "'('", "LMG", "LPP", "LMM", "LNAME", "LTYPE", "LFCONST", 759 "LDCONST", "LCONST", "LLCONST", "LUCONST", "LULCONST", "LVLCONST", 760 "LUVLCONST", "LSTRING", "LLSTRING", "LAUTO", "LBREAK", "LCASE", "LCHAR", 761 "LCONTINUE", "LDEFAULT", "LDO", "LDOUBLE", "LELSE", "LEXTERN", "LFLOAT", 762 "LFOR", "LGOTO", "LIF", "LINT", "LLONG", "LPREFETCH", "LREGISTER", 763 "LRETURN", "LSHORT", "LSIZEOF", "LUSED", "LSTATIC", "LSTRUCT", "LSWITCH", 764 "LTYPEDEF", "LTYPESTR", "LUNION", "LUNSIGNED", "LWHILE", "LVOID", 765 "LENUM", "LSIGNED", "LCONSTNT", "LVOLATILE", "LSET", "LSIGNOF", 766 "LRESTRICT", "LINLINE", "')'", "']'", "'{'", "'}'", "'!'", "'~'", 767 "$accept", "prog", "xdecl", "$@1", "$@2", "xdlist", "$@3", "xdecor", 768 "xdecor2", "adecl", "adlist", "$@4", "pdecl", "pdlist", "edecl", "$@5", 769 "$@6", "zedlist", "edlist", "edecor", "abdecor", "abdecor1", "abdecor2", 770 "abdecor3", "init", "qual", "qlist", "ilist", "zarglist", "arglist", 771 "block", "slist", "labels", "label", "stmnt", "forexpr", "ulstmnt", 772 "$@7", "$@8", "zcexpr", "zexpr", "lexpr", "cexpr", "expr", "xuexpr", 773 "uexpr", "pexpr", "string", "lstring", "zelist", "elist", "sbody", "@9", 774 "zctlist", "types", "tlist", "ctlist", "complex", "$@10", "$@11", "$@12", 775 "$@13", "$@14", "gctnlist", "zgnlist", "gctname", "gcnlist", "gcname", 776 "enum", "tname", "cname", "gname", "name", "tag", "ltag", YY_NULL 777 }; 778 #endif 779 780 # ifdef YYPRINT 781 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 782 token YYLEX-NUM. */ 783 static const yytype_uint16 yytoknum[] = 784 { 785 0, 256, 257, 59, 44, 61, 258, 259, 260, 261, 786 262, 263, 264, 265, 266, 267, 63, 58, 268, 269, 787 124, 94, 38, 270, 271, 60, 62, 272, 273, 274, 788 275, 43, 45, 42, 47, 37, 46, 91, 40, 276, 789 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 790 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 791 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 792 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 793 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 794 327, 328, 329, 41, 93, 123, 125, 33, 126 795 }; 796 # endif 797 798 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 799 static const yytype_uint8 yyr1[] = 800 { 801 0, 99, 100, 100, 101, 101, 102, 103, 101, 104, 802 105, 104, 104, 106, 106, 107, 107, 107, 107, 108, 803 108, 109, 110, 109, 109, 111, 111, 112, 112, 114, 804 113, 115, 113, 116, 116, 117, 117, 118, 118, 118, 805 119, 119, 120, 120, 120, 121, 121, 121, 122, 122, 806 122, 123, 123, 124, 124, 124, 125, 125, 125, 125, 807 126, 126, 126, 127, 127, 128, 128, 128, 128, 128, 808 129, 130, 130, 130, 131, 131, 132, 132, 132, 133, 809 133, 133, 134, 134, 135, 136, 135, 135, 135, 137, 810 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 811 135, 138, 138, 139, 139, 140, 141, 141, 142, 142, 812 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 813 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 814 142, 142, 142, 142, 142, 142, 142, 142, 142, 143, 815 143, 143, 144, 144, 144, 144, 144, 144, 144, 144, 816 144, 144, 144, 145, 145, 145, 145, 145, 145, 145, 817 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 818 145, 145, 145, 146, 146, 147, 147, 148, 148, 149, 819 149, 151, 150, 152, 152, 153, 153, 153, 153, 153, 820 153, 153, 153, 154, 155, 156, 157, 156, 156, 156, 821 158, 156, 156, 156, 159, 160, 156, 161, 156, 156, 822 162, 162, 163, 163, 164, 164, 164, 165, 165, 166, 823 166, 167, 167, 167, 167, 168, 168, 168, 168, 168, 824 168, 168, 168, 168, 169, 169, 169, 169, 169, 169, 825 169, 170, 170, 170, 171, 172, 173, 173 826 }; 827 828 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 829 static const yytype_uint8 yyr2[] = 830 { 831 0, 2, 0, 2, 2, 3, 0, 0, 6, 1, 832 0, 4, 3, 1, 3, 1, 3, 4, 4, 2, 833 3, 1, 0, 4, 3, 0, 4, 1, 3, 0, 834 4, 0, 5, 0, 1, 1, 3, 1, 3, 2, 835 0, 1, 2, 3, 1, 1, 4, 4, 2, 3, 836 3, 1, 3, 3, 2, 2, 2, 3, 1, 2, 837 1, 1, 2, 0, 1, 1, 2, 2, 3, 3, 838 3, 0, 2, 2, 1, 2, 3, 2, 2, 2, 839 1, 2, 1, 2, 2, 0, 2, 5, 7, 0, 840 10, 5, 7, 3, 5, 2, 2, 3, 5, 5, 841 5, 0, 1, 0, 1, 1, 1, 3, 1, 3, 842 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 843 3, 3, 3, 3, 3, 3, 3, 5, 3, 3, 844 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 845 5, 7, 1, 2, 2, 2, 2, 2, 2, 2, 846 2, 2, 2, 3, 5, 5, 4, 4, 3, 3, 847 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 848 1, 1, 1, 1, 2, 1, 2, 0, 1, 1, 849 3, 0, 4, 0, 1, 1, 1, 1, 2, 2, 850 3, 2, 3, 1, 1, 2, 0, 4, 2, 2, 851 0, 4, 2, 2, 0, 0, 7, 0, 5, 1, 852 1, 2, 0, 2, 1, 1, 1, 1, 2, 1, 853 1, 1, 3, 2, 3, 1, 1, 1, 1, 1, 854 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 855 1, 1, 1, 1, 1, 1, 1, 1 856 }; 857 858 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. 859 Performed when YYTABLE doesn't specify something else to do. Zero 860 means the default is an error. */ 861 static const yytype_uint8 yydefact[] = 862 { 863 2, 183, 1, 209, 234, 225, 232, 236, 231, 227, 864 228, 239, 226, 235, 0, 237, 238, 0, 230, 233, 865 0, 229, 241, 242, 243, 240, 3, 0, 194, 184, 866 185, 187, 217, 186, 220, 219, 246, 247, 181, 198, 867 195, 202, 199, 207, 203, 4, 212, 0, 0, 6, 868 13, 15, 245, 188, 210, 214, 216, 215, 212, 218, 869 191, 189, 0, 0, 0, 0, 0, 0, 0, 5, 870 0, 25, 0, 103, 63, 211, 190, 192, 0, 193, 871 29, 197, 201, 221, 0, 205, 14, 213, 16, 12, 872 9, 7, 0, 0, 0, 0, 0, 0, 0, 0, 873 244, 168, 167, 163, 164, 165, 166, 169, 170, 173, 874 175, 0, 0, 0, 0, 0, 104, 105, 108, 139, 875 142, 171, 172, 162, 0, 0, 64, 40, 65, 182, 876 31, 33, 0, 223, 208, 0, 0, 0, 0, 11, 877 51, 144, 145, 146, 143, 0, 106, 40, 149, 150, 878 0, 151, 0, 152, 147, 148, 18, 0, 0, 0, 879 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 880 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 881 0, 0, 0, 0, 0, 0, 0, 0, 0, 177, 882 0, 160, 161, 174, 176, 0, 17, 0, 212, 103, 883 0, 67, 66, 41, 44, 45, 33, 0, 37, 0, 884 34, 35, 15, 222, 224, 0, 71, 8, 27, 0, 885 0, 0, 61, 58, 60, 0, 0, 153, 212, 0, 886 0, 40, 40, 128, 138, 137, 136, 134, 135, 133, 887 132, 131, 130, 129, 0, 126, 125, 124, 123, 122, 888 121, 120, 116, 117, 119, 118, 114, 115, 112, 113, 889 109, 110, 111, 159, 0, 179, 0, 178, 158, 68, 890 69, 42, 0, 48, 0, 103, 63, 0, 39, 30, 891 0, 0, 206, 0, 26, 0, 54, 0, 56, 55, 892 62, 59, 52, 107, 42, 0, 0, 0, 0, 157, 893 156, 0, 43, 49, 50, 0, 0, 32, 36, 38, 894 0, 244, 0, 0, 0, 0, 0, 0, 0, 0, 895 101, 0, 0, 0, 0, 70, 72, 85, 74, 73, 896 80, 0, 0, 0, 102, 0, 28, 53, 57, 0, 897 140, 154, 155, 127, 180, 47, 46, 79, 78, 95, 898 0, 96, 77, 0, 0, 0, 177, 0, 177, 0, 899 0, 177, 75, 81, 86, 0, 84, 19, 21, 0, 900 0, 76, 0, 97, 0, 0, 93, 0, 0, 0, 901 0, 101, 0, 20, 0, 141, 0, 0, 0, 0, 902 0, 0, 0, 0, 82, 0, 0, 24, 0, 87, 903 99, 98, 94, 91, 100, 101, 83, 23, 0, 0, 904 0, 92, 88, 101, 0, 0, 90 905 }; 906 907 /* YYDEFGOTO[NTERM-NUM]. */ 908 static const yytype_int16 yydefgoto[] = 909 { 910 -1, 1, 26, 71, 136, 48, 72, 208, 50, 326, 911 369, 382, 91, 219, 78, 131, 206, 209, 210, 211, 912 202, 203, 204, 205, 222, 223, 224, 225, 125, 126, 913 217, 283, 327, 328, 329, 393, 330, 331, 332, 333, 914 115, 116, 334, 146, 118, 119, 120, 121, 122, 266, 915 267, 39, 62, 27, 79, 127, 29, 30, 63, 64, 916 66, 135, 65, 53, 67, 54, 31, 32, 84, 33, 917 34, 35, 123, 51, 52 918 }; 919 920 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 921 STATE-NUM. */ 922 #define YYPACT_NINF -331 923 static const yytype_int16 yypact[] = 924 { 925 -331, 548, -331, -331, -331, -331, -331, -331, -331, -331, 926 -331, -331, -331, -331, -3, -331, -331, -3, -331, -331, 927 149, -331, -331, -331, -331, -331, -331, 264, -331, -331, 928 965, 929, -331, 965, -331, -331, -331, -331, -331, -331, 929 -75, -331, -72, -331, -60, -331, -331, 307, 60, 270, 930 156, -331, -331, 965, -331, -331, -331, -331, -331, -331, 931 965, 965, 929, -44, -44, 29, -15, 199, -10, -331, 932 307, -331, 83, 756, 849, -331, 140, 965, 889, -331, 933 -331, -331, -331, 86, 12, -331, -331, -331, -331, -331, 934 90, 929, 686, 756, 756, 756, 756, 615, 756, 756, 935 -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, 936 -331, 791, 826, 756, 756, 9, -331, 1084, -331, -331, 937 708, 54, 57, -331, 110, 56, 152, 310, -331, -331, 938 -331, 279, 756, 29, -331, 29, 63, 307, 165, -331, 939 1084, -331, -331, -331, -331, 30, 1084, 44, -331, -331, 940 615, -331, 615, -331, -331, -331, -331, 756, 756, 756, 941 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 942 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 943 756, 756, 756, 756, 756, 756, 756, 157, 756, 756, 944 157, -331, -331, -331, -331, 115, -331, 849, -331, 756, 945 128, -331, -331, -331, 182, -331, 279, 756, -331, 164, 946 200, -331, 208, 1084, -331, 13, -331, -331, -331, 262, 947 157, 756, 225, 228, 165, 73, 756, -331, -331, -7, 948 150, 44, 44, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 949 1084, 1084, 1084, 1084, 28, 304, 1100, 1115, 1129, 1142, 950 1153, 1153, 433, 433, 433, 433, 333, 333, 265, 265, 951 -331, -331, -331, -331, 8, 1084, 153, 236, -331, -331, 952 -331, 147, 158, -331, 161, 756, 849, 247, -331, -331, 953 279, 756, -331, 341, -331, 307, -331, 175, -331, -331, 954 254, 228, -331, -331, 135, 721, 188, 190, 756, -331, 955 -331, 756, -331, -331, -331, 191, 211, -331, -331, -331, 956 298, 301, 338, 756, 343, 339, 439, 157, 319, 321, 957 756, 322, 323, 324, 332, -331, -331, 509, -331, -331, 958 -331, 63, 306, 372, 373, 277, -331, -331, -331, 165, 959 -331, -331, -331, 425, -331, -331, -331, -331, -331, -331, 960 1053, -331, -331, 293, 375, 756, 756, 400, 756, 756, 961 756, 756, -331, -331, -331, 396, -331, -331, 430, 285, 962 377, -331, 431, -331, 55, 381, -331, 382, 62, 64, 963 383, 615, 473, -331, 307, -331, 756, 439, 479, 490, 964 439, 439, 493, 497, -331, 307, 686, -331, 66, 440, 965 -331, -331, -331, -331, -331, 756, 499, -331, 498, 439, 966 504, -331, -331, 756, 415, 439, -331 967 }; 968 969 /* YYPGOTO[NTERM-NUM]. */ 970 static const yytype_int16 yypgoto[] = 971 { 972 -331, -331, -331, -331, -331, 445, -331, -26, -331, -331, 973 -330, -331, -331, 233, -331, -331, -331, 313, 230, -331, 974 -132, -187, -331, -331, -82, 292, -331, 181, 245, 326, 975 193, -331, -331, 198, -227, -331, 203, -331, -331, -309, 976 -181, -183, -83, -45, -38, 243, -331, -331, -331, -175, 977 226, 10, -331, -331, -1, 0, -88, 495, -331, -331, 978 -331, -331, -331, -14, -51, -28, -331, 501, -85, 218, 979 231, -24, -52, -127, -12 980 }; 981 982 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 983 positive, shift that token. If negative, reduce the rule which 984 number is the opposite. If YYTABLE_NINF, syntax error. */ 985 #define YYTABLE_NINF -205 986 static const yytype_int16 yytable[] = 987 { 988 28, 49, 40, 137, 212, 42, 57, 76, 44, 57, 989 139, 357, 226, 274, 145, 230, 133, 133, 272, 61, 990 -196, 68, 128, -200, 278, 75, 228, 41, 117, 57, 991 199, 229, 226, 75, 226, -204, 57, 57, 287, 36, 992 37, 86, 274, 87, 90, 298, 77, 140, 214, 75, 993 215, 38, 87, 57, 397, 141, 142, 143, 144, 226, 994 148, 149, 80, 69, 70, 406, 226, 145, 226, 145, 995 226, 83, 394, 81, 82, 154, 155, 228, 130, 212, 996 85, 199, 229, 88, 302, 244, 273, 213, 92, 353, 997 28, 132, 38, 140, 305, -10, 410, 147, 309, 296, 998 297, 201, 299, 156, 414, 264, 193, 302, 134, 282, 999 194, 218, 233, 234, 235, 236, 237, 238, 239, 240, 1000 241, 242, 243, 227, 245, 246, 247, 248, 249, 250, 1001 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 1002 261, 262, 290, 293, 265, 128, 195, 271, 387, 196, 1003 231, 269, 232, 212, 117, 390, 197, 391, 216, 408, 1004 399, 198, 117, 402, 403, 199, 200, 279, 228, 292, 1005 36, 37, 199, 229, 68, 263, 117, 294, 268, 140, 1006 198, 375, 412, 377, 199, 200, 380, 93, 416, 36, 1007 37, 36, 37, 73, 74, 335, 94, 95, 96, 36, 1008 37, 220, 221, 97, 280, 98, 99, 100, 286, 101, 1009 102, 103, 104, 105, 106, 107, 108, 109, 110, 275, 1010 276, 273, 22, 23, 128, 281, 24, 22, 23, 288, 1011 117, 24, 46, 289, 22, 23, 117, 47, 24, 111, 1012 301, 36, 37, 295, 43, 86, 300, 87, 55, 60, 1013 307, 55, 303, 343, 304, 112, 265, 340, 338, 218, 1014 138, 56, 113, 114, 56, 284, 285, 45, 350, 337, 1015 87, 55, 374, -9, -9, -10, 378, 379, 55, 55, 1016 367, 341, 28, 342, 56, 345, 22, 23, 383, 384, 1017 24, 56, 56, 395, 140, 55, 207, 46, 184, 185, 1018 186, 347, 47, 398, 346, 354, 36, 37, 56, 368, 1019 46, 265, 46, 265, 407, 47, 265, 47, 348, 36, 1020 37, 36, 37, 170, 171, 172, 173, 174, 175, 176, 1021 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 1022 46, 349, 310, 198, -101, 47, 351, 199, 200, 36, 1023 37, 140, 36, 37, 151, 153, 352, 355, 368, 356, 1024 358, 359, 360, 93, 182, 183, 184, 185, 186, 368, 1025 361, 365, 94, 95, 96, 366, 372, 226, 373, 97, 1026 28, 98, 99, 311, 3, 101, 102, 103, 104, 105, 1027 106, 107, 108, 109, 110, 4, 312, 313, 5, 314, 1028 315, 316, 6, 376, 7, 8, -89, 317, 318, 9, 1029 10, 319, 11, 320, 12, 111, 321, 13, 14, 322, 1030 15, 16, 17, 18, 323, 19, 20, 21, 22, 23, 1031 324, 112, 24, 25, 381, -22, -85, 325, 113, 114, 1032 310, 168, -101, 169, 170, 171, 172, 173, 174, 175, 1033 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 1034 186, 93, 180, 181, 182, 183, 184, 185, 186, 386, 1035 94, 95, 96, 385, 388, 389, 392, 97, 396, 98, 1036 99, 311, 400, 101, 102, 103, 104, 105, 106, 107, 1037 108, 109, 110, 401, 312, 313, 404, 314, 315, 316, 1038 405, 411, 409, 384, -89, 317, 318, 413, 415, 319, 1039 308, 320, -101, 111, 321, 89, 291, 322, 336, 277, 1040 370, 306, 323, 270, 364, 362, 58, 344, 324, 112, 1041 363, 93, 59, 0, -85, 0, 113, 114, 0, 0, 1042 94, 95, 96, 0, 0, 0, 0, 97, 2, 98, 1043 99, 311, 0, 101, 102, 103, 104, 105, 106, 107, 1044 108, 109, 110, 0, 312, 313, 0, 314, 315, 316, 1045 0, 0, 0, 0, -89, 317, 318, 0, 0, 319, 1046 0, 320, 0, 111, 321, 0, 0, 322, 0, 0, 1047 0, 3, 323, 0, 0, 0, 0, 0, 324, 112, 1048 0, 0, 4, 0, 0, 5, 113, 114, 0, 6, 1049 0, 7, 8, 0, 0, 0, 9, 10, 0, 11, 1050 0, 12, 0, 0, 13, 14, 0, 15, 16, 17, 1051 18, 0, 19, 20, 21, 22, 23, 93, 0, 24, 1052 25, 0, 0, 0, 0, 0, 94, 95, 96, 0, 1053 0, 0, 0, 97, 0, 98, 99, 100, 3, 101, 1054 102, 103, 104, 105, 106, 107, 108, 109, 110, 4, 1055 0, 0, 5, 0, 0, 0, 6, 0, 7, 8, 1056 0, 0, 0, 9, 10, 0, 11, 0, 12, 111, 1057 0, 13, 14, 0, 15, 16, 17, 18, 0, 19, 1058 20, 21, 22, 23, 0, 112, 24, 25, 93, 0, 1059 0, 0, 113, 114, 0, 0, 0, 94, 95, 96, 1060 0, 0, 0, 0, 97, 0, 98, 99, 100, 0, 1061 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 1062 0, 0, 0, 93, 187, 188, 189, 190, 191, 192, 1063 0, 0, 94, 95, 96, 0, 0, 0, 0, 97, 1064 111, 98, 99, 100, 0, 101, 102, 103, 104, 105, 1065 106, 107, 108, 109, 110, 0, 112, 0, 93, 0, 1066 0, 138, 0, 113, 114, 0, 0, 94, 95, 96, 1067 0, 0, 0, 0, 97, 111, 98, 99, 100, 0, 1068 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 1069 0, 112, 0, 93, 0, 0, 339, 0, 113, 114, 1070 0, 0, 94, 95, 96, 0, 0, 0, 0, 150, 1071 111, 98, 99, 100, 0, 101, 102, 103, 104, 105, 1072 106, 107, 108, 109, 110, 0, 112, 0, 93, 0, 1073 0, 0, 0, 113, 114, 0, 0, 94, 95, 96, 1074 0, 0, 0, 0, 152, 111, 98, 99, 100, 0, 1075 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 1076 0, 112, 0, 0, 0, 124, 0, 0, 113, 114, 1077 0, 100, 3, 0, 0, 0, 0, 0, 0, 0, 1078 111, 0, 0, 4, 0, 0, 5, 0, 0, 0, 1079 6, 0, 7, 8, 0, 0, 112, 9, 10, 0, 1080 11, 0, 12, 113, 114, 13, 14, 0, 15, 16, 1081 17, 18, 3, 19, 20, 21, 22, 23, 0, 0, 1082 24, 25, 0, 4, 0, 0, 5, 0, 0, 0, 1083 6, 0, 7, 8, 0, 0, 0, 9, 10, 0, 1084 11, 0, 12, 0, 0, 13, 14, 0, 15, 16, 1085 17, 18, 3, 19, 20, 21, 22, 23, 0, 0, 1086 24, 25, 0, 4, 0, 129, 5, 0, 0, 0, 1087 6, 0, 7, 8, 0, 0, 0, 9, 10, 0, 1088 11, 0, 12, 0, 0, 13, 14, 0, 15, 16, 1089 17, 18, 0, 19, 20, 21, 22, 23, 0, 4, 1090 24, 25, 5, 0, 0, 0, 6, 0, 7, 8, 1091 0, 0, 0, 9, 10, 0, 11, 0, 12, 0, 1092 0, 13, 0, 0, 15, 16, 0, 18, 0, 19, 1093 0, 21, 22, 23, 0, 0, 24, 25, 157, 158, 1094 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 1095 371, 169, 170, 171, 172, 173, 174, 175, 176, 177, 1096 178, 179, 180, 181, 182, 183, 184, 185, 186, 157, 1097 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 1098 168, 0, 169, 170, 171, 172, 173, 174, 175, 176, 1099 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 1100 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 1101 181, 182, 183, 184, 185, 186, 172, 173, 174, 175, 1102 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 1103 186, 173, 174, 175, 176, 177, 178, 179, 180, 181, 1104 182, 183, 184, 185, 186, 174, 175, 176, 177, 178, 1105 179, 180, 181, 182, 183, 184, 185, 186, 176, 177, 1106 178, 179, 180, 181, 182, 183, 184, 185, 186 1107 }; 1108 1109 #define yypact_value_is_default(Yystate) \ 1110 (!!((Yystate) == (-331))) 1111 1112 #define yytable_value_is_error(Yytable_value) \ 1113 YYID (0) 1114 1115 static const yytype_int16 yycheck[] = 1116 { 1117 1, 27, 14, 91, 131, 17, 30, 58, 20, 33, 1118 92, 320, 4, 200, 97, 147, 4, 4, 199, 33, 1119 95, 47, 74, 95, 207, 53, 33, 17, 73, 53, 1120 37, 38, 4, 61, 4, 95, 60, 61, 221, 42, 1121 43, 67, 229, 67, 70, 17, 60, 92, 133, 77, 1122 135, 95, 76, 77, 384, 93, 94, 95, 96, 4, 1123 98, 99, 62, 3, 4, 395, 4, 150, 4, 152, 1124 4, 42, 381, 63, 64, 113, 114, 33, 78, 206, 1125 95, 37, 38, 93, 271, 168, 93, 132, 5, 316, 1126 91, 5, 95, 138, 275, 5, 405, 97, 281, 231, 1127 232, 127, 94, 94, 413, 188, 52, 294, 96, 96, 1128 53, 137, 157, 158, 159, 160, 161, 162, 163, 164, 1129 165, 166, 167, 93, 169, 170, 171, 172, 173, 174, 1130 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 1131 185, 186, 224, 226, 189, 197, 36, 198, 93, 93, 1132 150, 36, 152, 280, 199, 93, 4, 93, 95, 93, 1133 387, 33, 207, 390, 391, 37, 38, 3, 33, 96, 1134 42, 43, 37, 38, 200, 187, 221, 228, 190, 224, 1135 33, 356, 409, 358, 37, 38, 361, 22, 415, 42, 1136 43, 42, 43, 37, 38, 283, 31, 32, 33, 42, 1137 43, 36, 37, 38, 4, 40, 41, 42, 220, 44, 1138 45, 46, 47, 48, 49, 50, 51, 52, 53, 37, 1139 38, 93, 87, 88, 276, 17, 91, 87, 88, 4, 1140 275, 91, 33, 5, 87, 88, 281, 38, 91, 74, 1141 4, 42, 43, 93, 95, 271, 93, 271, 30, 31, 1142 3, 33, 94, 298, 93, 90, 301, 295, 4, 285, 1143 95, 30, 97, 98, 33, 3, 4, 3, 313, 94, 1144 294, 53, 355, 3, 4, 5, 359, 360, 60, 61, 1145 3, 93, 283, 93, 53, 94, 87, 88, 3, 4, 1146 91, 60, 61, 381, 339, 77, 17, 33, 33, 34, 1147 35, 3, 38, 386, 93, 317, 42, 43, 77, 335, 1148 33, 356, 33, 358, 396, 38, 361, 38, 17, 42, 1149 43, 42, 43, 19, 20, 21, 22, 23, 24, 25, 1150 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 1151 33, 3, 1, 33, 3, 38, 3, 37, 38, 42, 1152 43, 396, 42, 43, 111, 112, 17, 38, 384, 38, 1153 38, 38, 38, 22, 31, 32, 33, 34, 35, 395, 1154 38, 65, 31, 32, 33, 3, 83, 4, 3, 38, 1155 381, 40, 41, 42, 43, 44, 45, 46, 47, 48, 1156 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 1157 59, 60, 61, 3, 63, 64, 65, 66, 67, 68, 1158 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 1159 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 1160 89, 90, 91, 92, 38, 5, 95, 96, 97, 98, 1161 1, 16, 3, 18, 19, 20, 21, 22, 23, 24, 1162 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 1163 35, 22, 29, 30, 31, 32, 33, 34, 35, 38, 1164 31, 32, 33, 96, 93, 93, 93, 38, 5, 40, 1165 41, 42, 3, 44, 45, 46, 47, 48, 49, 50, 1166 51, 52, 53, 3, 55, 56, 3, 58, 59, 60, 1167 3, 3, 62, 4, 65, 66, 67, 3, 93, 70, 1168 280, 72, 3, 74, 75, 70, 224, 78, 285, 206, 1169 339, 276, 83, 197, 331, 327, 31, 301, 89, 90, 1170 327, 22, 31, -1, 95, -1, 97, 98, -1, -1, 1171 31, 32, 33, -1, -1, -1, -1, 38, 0, 40, 1172 41, 42, -1, 44, 45, 46, 47, 48, 49, 50, 1173 51, 52, 53, -1, 55, 56, -1, 58, 59, 60, 1174 -1, -1, -1, -1, 65, 66, 67, -1, -1, 70, 1175 -1, 72, -1, 74, 75, -1, -1, 78, -1, -1, 1176 -1, 43, 83, -1, -1, -1, -1, -1, 89, 90, 1177 -1, -1, 54, -1, -1, 57, 97, 98, -1, 61, 1178 -1, 63, 64, -1, -1, -1, 68, 69, -1, 71, 1179 -1, 73, -1, -1, 76, 77, -1, 79, 80, 81, 1180 82, -1, 84, 85, 86, 87, 88, 22, -1, 91, 1181 92, -1, -1, -1, -1, -1, 31, 32, 33, -1, 1182 -1, -1, -1, 38, -1, 40, 41, 42, 43, 44, 1183 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 1184 -1, -1, 57, -1, -1, -1, 61, -1, 63, 64, 1185 -1, -1, -1, 68, 69, -1, 71, -1, 73, 74, 1186 -1, 76, 77, -1, 79, 80, 81, 82, -1, 84, 1187 85, 86, 87, 88, -1, 90, 91, 92, 22, -1, 1188 -1, -1, 97, 98, -1, -1, -1, 31, 32, 33, 1189 -1, -1, -1, -1, 38, -1, 40, 41, 42, -1, 1190 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 1191 -1, -1, -1, 22, 36, 37, 38, 39, 40, 41, 1192 -1, -1, 31, 32, 33, -1, -1, -1, -1, 38, 1193 74, 40, 41, 42, -1, 44, 45, 46, 47, 48, 1194 49, 50, 51, 52, 53, -1, 90, -1, 22, -1, 1195 -1, 95, -1, 97, 98, -1, -1, 31, 32, 33, 1196 -1, -1, -1, -1, 38, 74, 40, 41, 42, -1, 1197 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 1198 -1, 90, -1, 22, -1, -1, 95, -1, 97, 98, 1199 -1, -1, 31, 32, 33, -1, -1, -1, -1, 38, 1200 74, 40, 41, 42, -1, 44, 45, 46, 47, 48, 1201 49, 50, 51, 52, 53, -1, 90, -1, 22, -1, 1202 -1, -1, -1, 97, 98, -1, -1, 31, 32, 33, 1203 -1, -1, -1, -1, 38, 74, 40, 41, 42, -1, 1204 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 1205 -1, 90, -1, -1, -1, 36, -1, -1, 97, 98, 1206 -1, 42, 43, -1, -1, -1, -1, -1, -1, -1, 1207 74, -1, -1, 54, -1, -1, 57, -1, -1, -1, 1208 61, -1, 63, 64, -1, -1, 90, 68, 69, -1, 1209 71, -1, 73, 97, 98, 76, 77, -1, 79, 80, 1210 81, 82, 43, 84, 85, 86, 87, 88, -1, -1, 1211 91, 92, -1, 54, -1, -1, 57, -1, -1, -1, 1212 61, -1, 63, 64, -1, -1, -1, 68, 69, -1, 1213 71, -1, 73, -1, -1, 76, 77, -1, 79, 80, 1214 81, 82, 43, 84, 85, 86, 87, 88, -1, -1, 1215 91, 92, -1, 54, -1, 96, 57, -1, -1, -1, 1216 61, -1, 63, 64, -1, -1, -1, 68, 69, -1, 1217 71, -1, 73, -1, -1, 76, 77, -1, 79, 80, 1218 81, 82, -1, 84, 85, 86, 87, 88, -1, 54, 1219 91, 92, 57, -1, -1, -1, 61, -1, 63, 64, 1220 -1, -1, -1, 68, 69, -1, 71, -1, 73, -1, 1221 -1, 76, -1, -1, 79, 80, -1, 82, -1, 84, 1222 -1, 86, 87, 88, -1, -1, 91, 92, 5, 6, 1223 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 1224 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 1225 27, 28, 29, 30, 31, 32, 33, 34, 35, 5, 1226 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1227 16, -1, 18, 19, 20, 21, 22, 23, 24, 25, 1228 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 1229 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 1230 30, 31, 32, 33, 34, 35, 21, 22, 23, 24, 1231 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 1232 35, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1233 31, 32, 33, 34, 35, 23, 24, 25, 26, 27, 1234 28, 29, 30, 31, 32, 33, 34, 35, 25, 26, 1235 27, 28, 29, 30, 31, 32, 33, 34, 35 1236 }; 1237 1238 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 1239 symbol of state STATE-NUM. */ 1240 static const yytype_uint8 yystos[] = 1241 { 1242 0, 100, 0, 43, 54, 57, 61, 63, 64, 68, 1243 69, 71, 73, 76, 77, 79, 80, 81, 82, 84, 1244 85, 86, 87, 88, 91, 92, 101, 152, 153, 155, 1245 156, 165, 166, 168, 169, 170, 42, 43, 95, 150, 1246 173, 150, 173, 95, 173, 3, 33, 38, 104, 106, 1247 107, 172, 173, 162, 164, 168, 169, 170, 156, 166, 1248 168, 162, 151, 157, 158, 161, 159, 163, 106, 3, 1249 4, 102, 105, 37, 38, 164, 163, 162, 113, 153, 1250 154, 150, 150, 42, 167, 95, 106, 170, 93, 104, 1251 106, 111, 5, 22, 31, 32, 33, 38, 40, 41, 1252 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 1253 53, 74, 90, 97, 98, 139, 140, 142, 143, 144, 1254 145, 146, 147, 171, 36, 127, 128, 154, 171, 96, 1255 154, 114, 5, 4, 96, 160, 103, 155, 95, 123, 1256 142, 143, 143, 143, 143, 141, 142, 154, 143, 143, 1257 38, 144, 38, 144, 143, 143, 94, 5, 6, 7, 1258 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 1259 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 1260 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 1261 39, 40, 41, 52, 53, 36, 93, 4, 33, 37, 1262 38, 106, 119, 120, 121, 122, 115, 17, 106, 116, 1263 117, 118, 172, 142, 167, 167, 95, 129, 106, 112, 1264 36, 37, 123, 124, 125, 126, 4, 93, 33, 38, 1265 119, 154, 154, 142, 142, 142, 142, 142, 142, 142, 1266 142, 142, 142, 142, 141, 142, 142, 142, 142, 142, 1267 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 1268 142, 142, 142, 173, 141, 142, 148, 149, 173, 36, 1269 128, 163, 139, 93, 120, 37, 38, 116, 140, 3, 1270 4, 17, 96, 130, 3, 4, 173, 140, 4, 5, 1271 123, 124, 96, 141, 163, 93, 119, 119, 17, 94, 1272 93, 4, 120, 94, 93, 139, 127, 3, 117, 140, 1273 1, 42, 55, 56, 58, 59, 60, 66, 67, 70, 1274 72, 75, 78, 83, 89, 96, 108, 131, 132, 133, 1275 135, 136, 137, 138, 141, 155, 112, 94, 4, 95, 1276 143, 93, 93, 142, 149, 94, 93, 3, 17, 3, 1277 142, 3, 17, 133, 173, 38, 38, 138, 38, 38, 1278 38, 38, 132, 135, 129, 65, 3, 3, 106, 109, 1279 126, 17, 83, 3, 141, 148, 3, 148, 141, 141, 1280 148, 38, 110, 3, 4, 96, 38, 93, 93, 93, 1281 93, 93, 93, 134, 138, 155, 5, 109, 141, 133, 1282 3, 3, 133, 133, 3, 3, 109, 123, 93, 62, 1283 138, 3, 133, 3, 138, 93, 133 1284 }; 1285 1286 #define yyerrok (yyerrstatus = 0) 1287 #define yyclearin (yychar = YYEMPTY) 1288 #define YYEMPTY (-2) 1289 #define YYEOF 0 1290 1291 #define YYACCEPT goto yyacceptlab 1292 #define YYABORT goto yyabortlab 1293 #define YYERROR goto yyerrorlab 1294 1295 1296 /* Like YYERROR except do call yyerror. This remains here temporarily 1297 to ease the transition to the new meaning of YYERROR, for GCC. 1298 Once GCC version 2 has supplanted version 1, this can go. However, 1299 YYFAIL appears to be in use. Nevertheless, it is formally deprecated 1300 in Bison 2.4.2's NEWS entry, where a plan to phase it out is 1301 discussed. */ 1302 1303 #define YYFAIL goto yyerrlab 1304 #if defined YYFAIL 1305 /* This is here to suppress warnings from the GCC cpp's 1306 -Wunused-macros. Normally we don't worry about that warning, but 1307 some users do, and we want to make it easy for users to remove 1308 YYFAIL uses, which will produce warnings from Bison 2.5. */ 1309 #endif 1310 1311 #define YYRECOVERING() (!!yyerrstatus) 1312 1313 #define YYBACKUP(Token, Value) \ 1314 do \ 1315 if (yychar == YYEMPTY) \ 1316 { \ 1317 yychar = (Token); \ 1318 yylval = (Value); \ 1319 YYPOPSTACK (yylen); \ 1320 yystate = *yyssp; \ 1321 goto yybackup; \ 1322 } \ 1323 else \ 1324 { \ 1325 yyerror (YY_("syntax error: cannot back up")); \ 1326 YYERROR; \ 1327 } \ 1328 while (YYID (0)) 1329 1330 /* Error token number */ 1331 #define YYTERROR 1 1332 #define YYERRCODE 256 1333 1334 1335 /* This macro is provided for backward compatibility. */ 1336 #ifndef YY_LOCATION_PRINT 1337 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 1338 #endif 1339 1340 1341 /* YYLEX -- calling `yylex' with the right arguments. */ 1342 #ifdef YYLEX_PARAM 1343 # define YYLEX yylex (YYLEX_PARAM) 1344 #else 1345 # define YYLEX yylex () 1346 #endif 1347 1348 /* Enable debugging if requested. */ 1349 #if YYDEBUG 1350 1351 # ifndef YYFPRINTF 1352 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 1353 # define YYFPRINTF fprintf 1354 # endif 1355 1356 # define YYDPRINTF(Args) \ 1357 do { \ 1358 if (yydebug) \ 1359 YYFPRINTF Args; \ 1360 } while (YYID (0)) 1361 1362 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 1363 do { \ 1364 if (yydebug) \ 1365 { \ 1366 YYFPRINTF (stderr, "%s ", Title); \ 1367 yy_symbol_print (stderr, \ 1368 Type, Value); \ 1369 YYFPRINTF (stderr, "\n"); \ 1370 } \ 1371 } while (YYID (0)) 1372 1373 1374 /*--------------------------------. 1375 | Print this symbol on YYOUTPUT. | 1376 `--------------------------------*/ 1377 1378 /*ARGSUSED*/ 1379 #if (defined __STDC__ || defined __C99__FUNC__ \ 1380 || defined __cplusplus || defined _MSC_VER) 1381 static void 1382 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 1383 #else 1384 static void 1385 yy_symbol_value_print (yyoutput, yytype, yyvaluep) 1386 FILE *yyoutput; 1387 int yytype; 1388 YYSTYPE const * const yyvaluep; 1389 #endif 1390 { 1391 FILE *yyo = yyoutput; 1392 YYUSE (yyo); 1393 if (!yyvaluep) 1394 return; 1395 # ifdef YYPRINT 1396 if (yytype < YYNTOKENS) 1397 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 1398 # else 1399 YYUSE (yyoutput); 1400 # endif 1401 YYUSE (yytype); 1402 } 1403 1404 1405 /*--------------------------------. 1406 | Print this symbol on YYOUTPUT. | 1407 `--------------------------------*/ 1408 1409 #if (defined __STDC__ || defined __C99__FUNC__ \ 1410 || defined __cplusplus || defined _MSC_VER) 1411 static void 1412 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 1413 #else 1414 static void 1415 yy_symbol_print (yyoutput, yytype, yyvaluep) 1416 FILE *yyoutput; 1417 int yytype; 1418 YYSTYPE const * const yyvaluep; 1419 #endif 1420 { 1421 if (yytype < YYNTOKENS) 1422 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 1423 else 1424 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 1425 1426 yy_symbol_value_print (yyoutput, yytype, yyvaluep); 1427 YYFPRINTF (yyoutput, ")"); 1428 } 1429 1430 /*------------------------------------------------------------------. 1431 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 1432 | TOP (included). | 1433 `------------------------------------------------------------------*/ 1434 1435 #if (defined __STDC__ || defined __C99__FUNC__ \ 1436 || defined __cplusplus || defined _MSC_VER) 1437 static void 1438 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 1439 #else 1440 static void 1441 yy_stack_print (yybottom, yytop) 1442 yytype_int16 *yybottom; 1443 yytype_int16 *yytop; 1444 #endif 1445 { 1446 YYFPRINTF (stderr, "Stack now"); 1447 for (; yybottom <= yytop; yybottom++) 1448 { 1449 int yybot = *yybottom; 1450 YYFPRINTF (stderr, " %d", yybot); 1451 } 1452 YYFPRINTF (stderr, "\n"); 1453 } 1454 1455 # define YY_STACK_PRINT(Bottom, Top) \ 1456 do { \ 1457 if (yydebug) \ 1458 yy_stack_print ((Bottom), (Top)); \ 1459 } while (YYID (0)) 1460 1461 1462 /*------------------------------------------------. 1463 | Report that the YYRULE is going to be reduced. | 1464 `------------------------------------------------*/ 1465 1466 #if (defined __STDC__ || defined __C99__FUNC__ \ 1467 || defined __cplusplus || defined _MSC_VER) 1468 static void 1469 yy_reduce_print (YYSTYPE *yyvsp, int yyrule) 1470 #else 1471 static void 1472 yy_reduce_print (yyvsp, yyrule) 1473 YYSTYPE *yyvsp; 1474 int yyrule; 1475 #endif 1476 { 1477 int yynrhs = yyr2[yyrule]; 1478 int yyi; 1479 unsigned long int yylno = yyrline[yyrule]; 1480 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 1481 yyrule - 1, yylno); 1482 /* The symbols being reduced. */ 1483 for (yyi = 0; yyi < yynrhs; yyi++) 1484 { 1485 YYFPRINTF (stderr, " $%d = ", yyi + 1); 1486 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 1487 &(yyvsp[(yyi + 1) - (yynrhs)]) 1488 ); 1489 YYFPRINTF (stderr, "\n"); 1490 } 1491 } 1492 1493 # define YY_REDUCE_PRINT(Rule) \ 1494 do { \ 1495 if (yydebug) \ 1496 yy_reduce_print (yyvsp, Rule); \ 1497 } while (YYID (0)) 1498 1499 /* Nonzero means print parse trace. It is left uninitialized so that 1500 multiple parsers can coexist. */ 1501 int yydebug; 1502 #else /* !YYDEBUG */ 1503 # define YYDPRINTF(Args) 1504 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 1505 # define YY_STACK_PRINT(Bottom, Top) 1506 # define YY_REDUCE_PRINT(Rule) 1507 #endif /* !YYDEBUG */ 1508 1509 1510 /* YYINITDEPTH -- initial size of the parser's stacks. */ 1511 #ifndef YYINITDEPTH 1512 # define YYINITDEPTH 200 1513 #endif 1514 1515 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 1516 if the built-in stack extension method is used). 1517 1518 Do not make this value too large; the results are undefined if 1519 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 1520 evaluated with infinite-precision integer arithmetic. */ 1521 1522 #ifndef YYMAXDEPTH 1523 # define YYMAXDEPTH 10000 1524 #endif 1525 1526 1527 #if YYERROR_VERBOSE 1528 1529 # ifndef yystrlen 1530 # if defined __GLIBC__ && defined _STRING_H 1531 # define yystrlen strlen 1532 # else 1533 /* Return the length of YYSTR. */ 1534 #if (defined __STDC__ || defined __C99__FUNC__ \ 1535 || defined __cplusplus || defined _MSC_VER) 1536 static YYSIZE_T 1537 yystrlen (const char *yystr) 1538 #else 1539 static YYSIZE_T 1540 yystrlen (yystr) 1541 const char *yystr; 1542 #endif 1543 { 1544 YYSIZE_T yylen; 1545 for (yylen = 0; yystr[yylen]; yylen++) 1546 continue; 1547 return yylen; 1548 } 1549 # endif 1550 # endif 1551 1552 # ifndef yystpcpy 1553 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 1554 # define yystpcpy stpcpy 1555 # else 1556 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 1557 YYDEST. */ 1558 #if (defined __STDC__ || defined __C99__FUNC__ \ 1559 || defined __cplusplus || defined _MSC_VER) 1560 static char * 1561 yystpcpy (char *yydest, const char *yysrc) 1562 #else 1563 static char * 1564 yystpcpy (yydest, yysrc) 1565 char *yydest; 1566 const char *yysrc; 1567 #endif 1568 { 1569 char *yyd = yydest; 1570 const char *yys = yysrc; 1571 1572 while ((*yyd++ = *yys++) != '\0') 1573 continue; 1574 1575 return yyd - 1; 1576 } 1577 # endif 1578 # endif 1579 1580 # ifndef yytnamerr 1581 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary 1582 quotes and backslashes, so that it's suitable for yyerror. The 1583 heuristic is that double-quoting is unnecessary unless the string 1584 contains an apostrophe, a comma, or backslash (other than 1585 backslash-backslash). YYSTR is taken from yytname. If YYRES is 1586 null, do not copy; instead, return the length of what the result 1587 would have been. */ 1588 static YYSIZE_T 1589 yytnamerr (char *yyres, const char *yystr) 1590 { 1591 if (*yystr == '"') 1592 { 1593 YYSIZE_T yyn = 0; 1594 char const *yyp = yystr; 1595 1596 for (;;) 1597 switch (*++yyp) 1598 { 1599 case '\'': 1600 case ',': 1601 goto do_not_strip_quotes; 1602 1603 case '\\': 1604 if (*++yyp != '\\') 1605 goto do_not_strip_quotes; 1606 /* Fall through. */ 1607 default: 1608 if (yyres) 1609 yyres[yyn] = *yyp; 1610 yyn++; 1611 break; 1612 1613 case '"': 1614 if (yyres) 1615 yyres[yyn] = '\0'; 1616 return yyn; 1617 } 1618 do_not_strip_quotes: ; 1619 } 1620 1621 if (! yyres) 1622 return yystrlen (yystr); 1623 1624 return yystpcpy (yyres, yystr) - yyres; 1625 } 1626 # endif 1627 1628 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message 1629 about the unexpected token YYTOKEN for the state stack whose top is 1630 YYSSP. 1631 1632 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is 1633 not large enough to hold the message. In that case, also set 1634 *YYMSG_ALLOC to the required number of bytes. Return 2 if the 1635 required number of bytes is too large to store. */ 1636 static int 1637 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, 1638 yytype_int16 *yyssp, int yytoken) 1639 { 1640 YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); 1641 YYSIZE_T yysize = yysize0; 1642 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 1643 /* Internationalized format string. */ 1644 const char *yyformat = YY_NULL; 1645 /* Arguments of yyformat. */ 1646 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 1647 /* Number of reported tokens (one for the "unexpected", one per 1648 "expected"). */ 1649 int yycount = 0; 1650 1651 /* There are many possibilities here to consider: 1652 - Assume YYFAIL is not used. It's too flawed to consider. See 1653 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> 1654 for details. YYERROR is fine as it does not invoke this 1655 function. 1656 - If this state is a consistent state with a default action, then 1657 the only way this function was invoked is if the default action 1658 is an error action. In that case, don't check for expected 1659 tokens because there are none. 1660 - The only way there can be no lookahead present (in yychar) is if 1661 this state is a consistent state with a default action. Thus, 1662 detecting the absence of a lookahead is sufficient to determine 1663 that there is no unexpected or expected token to report. In that 1664 case, just report a simple "syntax error". 1665 - Don't assume there isn't a lookahead just because this state is a 1666 consistent state with a default action. There might have been a 1667 previous inconsistent state, consistent state with a non-default 1668 action, or user semantic action that manipulated yychar. 1669 - Of course, the expected token list depends on states to have 1670 correct lookahead information, and it depends on the parser not 1671 to perform extra reductions after fetching a lookahead from the 1672 scanner and before detecting a syntax error. Thus, state merging 1673 (from LALR or IELR) and default reductions corrupt the expected 1674 token list. However, the list is correct for canonical LR with 1675 one exception: it will still contain any token that will not be 1676 accepted due to an error action in a later state. 1677 */ 1678 if (yytoken != YYEMPTY) 1679 { 1680 int yyn = yypact[*yyssp]; 1681 yyarg[yycount++] = yytname[yytoken]; 1682 if (!yypact_value_is_default (yyn)) 1683 { 1684 /* Start YYX at -YYN if negative to avoid negative indexes in 1685 YYCHECK. In other words, skip the first -YYN actions for 1686 this state because they are default actions. */ 1687 int yyxbegin = yyn < 0 ? -yyn : 0; 1688 /* Stay within bounds of both yycheck and yytname. */ 1689 int yychecklim = YYLAST - yyn + 1; 1690 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 1691 int yyx; 1692 1693 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 1694 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR 1695 && !yytable_value_is_error (yytable[yyx + yyn])) 1696 { 1697 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 1698 { 1699 yycount = 1; 1700 yysize = yysize0; 1701 break; 1702 } 1703 yyarg[yycount++] = yytname[yyx]; 1704 { 1705 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); 1706 if (! (yysize <= yysize1 1707 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 1708 return 2; 1709 yysize = yysize1; 1710 } 1711 } 1712 } 1713 } 1714 1715 switch (yycount) 1716 { 1717 # define YYCASE_(N, S) \ 1718 case N: \ 1719 yyformat = S; \ 1720 break 1721 YYCASE_(0, YY_("syntax error")); 1722 YYCASE_(1, YY_("syntax error, unexpected %s")); 1723 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); 1724 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); 1725 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); 1726 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); 1727 # undef YYCASE_ 1728 } 1729 1730 { 1731 YYSIZE_T yysize1 = yysize + yystrlen (yyformat); 1732 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 1733 return 2; 1734 yysize = yysize1; 1735 } 1736 1737 if (*yymsg_alloc < yysize) 1738 { 1739 *yymsg_alloc = 2 * yysize; 1740 if (! (yysize <= *yymsg_alloc 1741 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) 1742 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; 1743 return 1; 1744 } 1745 1746 /* Avoid sprintf, as that infringes on the user's name space. 1747 Don't have undefined behavior even if the translation 1748 produced a string with the wrong number of "%s"s. */ 1749 { 1750 char *yyp = *yymsg; 1751 int yyi = 0; 1752 while ((*yyp = *yyformat) != '\0') 1753 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) 1754 { 1755 yyp += yytnamerr (yyp, yyarg[yyi++]); 1756 yyformat += 2; 1757 } 1758 else 1759 { 1760 yyp++; 1761 yyformat++; 1762 } 1763 } 1764 return 0; 1765 } 1766 #endif /* YYERROR_VERBOSE */ 1767 1768 /*-----------------------------------------------. 1769 | Release the memory associated to this symbol. | 1770 `-----------------------------------------------*/ 1771 1772 /*ARGSUSED*/ 1773 #if (defined __STDC__ || defined __C99__FUNC__ \ 1774 || defined __cplusplus || defined _MSC_VER) 1775 static void 1776 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) 1777 #else 1778 static void 1779 yydestruct (yymsg, yytype, yyvaluep) 1780 const char *yymsg; 1781 int yytype; 1782 YYSTYPE *yyvaluep; 1783 #endif 1784 { 1785 YYUSE (yyvaluep); 1786 1787 if (!yymsg) 1788 yymsg = "Deleting"; 1789 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 1790 1791 YYUSE (yytype); 1792 } 1793 1794 1795 1796 1797 /* The lookahead symbol. */ 1798 int yychar; 1799 1800 1801 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1802 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1803 # define YY_IGNORE_MAYBE_UNINITIALIZED_END 1804 #endif 1805 #ifndef YY_INITIAL_VALUE 1806 # define YY_INITIAL_VALUE(Value) /* Nothing. */ 1807 #endif 1808 1809 /* The semantic value of the lookahead symbol. */ 1810 YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); 1811 1812 /* Number of syntax errors so far. */ 1813 int yynerrs; 1814 1815 1816 /*----------. 1817 | yyparse. | 1818 `----------*/ 1819 1820 #ifdef YYPARSE_PARAM 1821 #if (defined __STDC__ || defined __C99__FUNC__ \ 1822 || defined __cplusplus || defined _MSC_VER) 1823 int 1824 yyparse (void *YYPARSE_PARAM) 1825 #else 1826 int 1827 yyparse (YYPARSE_PARAM) 1828 void *YYPARSE_PARAM; 1829 #endif 1830 #else /* ! YYPARSE_PARAM */ 1831 #if (defined __STDC__ || defined __C99__FUNC__ \ 1832 || defined __cplusplus || defined _MSC_VER) 1833 int 1834 yyparse (void) 1835 #else 1836 int 1837 yyparse () 1838 1839 #endif 1840 #endif 1841 { 1842 int yystate; 1843 /* Number of tokens to shift before error messages enabled. */ 1844 int yyerrstatus; 1845 1846 /* The stacks and their tools: 1847 `yyss': related to states. 1848 `yyvs': related to semantic values. 1849 1850 Refer to the stacks through separate pointers, to allow yyoverflow 1851 to reallocate them elsewhere. */ 1852 1853 /* The state stack. */ 1854 yytype_int16 yyssa[YYINITDEPTH]; 1855 yytype_int16 *yyss; 1856 yytype_int16 *yyssp; 1857 1858 /* The semantic value stack. */ 1859 YYSTYPE yyvsa[YYINITDEPTH]; 1860 YYSTYPE *yyvs; 1861 YYSTYPE *yyvsp; 1862 1863 YYSIZE_T yystacksize; 1864 1865 int yyn; 1866 int yyresult; 1867 /* Lookahead token as an internal (translated) token number. */ 1868 int yytoken = 0; 1869 /* The variables used to return semantic value and location from the 1870 action routines. */ 1871 YYSTYPE yyval; 1872 1873 #if YYERROR_VERBOSE 1874 /* Buffer for error messages, and its allocated size. */ 1875 char yymsgbuf[128]; 1876 char *yymsg = yymsgbuf; 1877 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 1878 #endif 1879 1880 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 1881 1882 /* The number of symbols on the RHS of the reduced rule. 1883 Keep to zero when no symbol should be popped. */ 1884 int yylen = 0; 1885 1886 yyssp = yyss = yyssa; 1887 yyvsp = yyvs = yyvsa; 1888 yystacksize = YYINITDEPTH; 1889 1890 YYDPRINTF ((stderr, "Starting parse\n")); 1891 1892 yystate = 0; 1893 yyerrstatus = 0; 1894 yynerrs = 0; 1895 yychar = YYEMPTY; /* Cause a token to be read. */ 1896 goto yysetstate; 1897 1898 /*------------------------------------------------------------. 1899 | yynewstate -- Push a new state, which is found in yystate. | 1900 `------------------------------------------------------------*/ 1901 yynewstate: 1902 /* In all cases, when you get here, the value and location stacks 1903 have just been pushed. So pushing a state here evens the stacks. */ 1904 yyssp++; 1905 1906 yysetstate: 1907 *yyssp = yystate; 1908 1909 if (yyss + yystacksize - 1 <= yyssp) 1910 { 1911 /* Get the current used size of the three stacks, in elements. */ 1912 YYSIZE_T yysize = yyssp - yyss + 1; 1913 1914 #ifdef yyoverflow 1915 { 1916 /* Give user a chance to reallocate the stack. Use copies of 1917 these so that the &'s don't force the real ones into 1918 memory. */ 1919 YYSTYPE *yyvs1 = yyvs; 1920 yytype_int16 *yyss1 = yyss; 1921 1922 /* Each stack pointer address is followed by the size of the 1923 data in use in that stack, in bytes. This used to be a 1924 conditional around just the two extra args, but that might 1925 be undefined if yyoverflow is a macro. */ 1926 yyoverflow (YY_("memory exhausted"), 1927 &yyss1, yysize * sizeof (*yyssp), 1928 &yyvs1, yysize * sizeof (*yyvsp), 1929 &yystacksize); 1930 1931 yyss = yyss1; 1932 yyvs = yyvs1; 1933 } 1934 #else /* no yyoverflow */ 1935 # ifndef YYSTACK_RELOCATE 1936 goto yyexhaustedlab; 1937 # else 1938 /* Extend the stack our own way. */ 1939 if (YYMAXDEPTH <= yystacksize) 1940 goto yyexhaustedlab; 1941 yystacksize *= 2; 1942 if (YYMAXDEPTH < yystacksize) 1943 yystacksize = YYMAXDEPTH; 1944 1945 { 1946 yytype_int16 *yyss1 = yyss; 1947 union yyalloc *yyptr = 1948 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 1949 if (! yyptr) 1950 goto yyexhaustedlab; 1951 YYSTACK_RELOCATE (yyss_alloc, yyss); 1952 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 1953 # undef YYSTACK_RELOCATE 1954 if (yyss1 != yyssa) 1955 YYSTACK_FREE (yyss1); 1956 } 1957 # endif 1958 #endif /* no yyoverflow */ 1959 1960 yyssp = yyss + yysize - 1; 1961 yyvsp = yyvs + yysize - 1; 1962 1963 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 1964 (unsigned long int) yystacksize)); 1965 1966 if (yyss + yystacksize - 1 <= yyssp) 1967 YYABORT; 1968 } 1969 1970 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 1971 1972 if (yystate == YYFINAL) 1973 YYACCEPT; 1974 1975 goto yybackup; 1976 1977 /*-----------. 1978 | yybackup. | 1979 `-----------*/ 1980 yybackup: 1981 1982 /* Do appropriate processing given the current state. Read a 1983 lookahead token if we need one and don't already have one. */ 1984 1985 /* First try to decide what to do without reference to lookahead token. */ 1986 yyn = yypact[yystate]; 1987 if (yypact_value_is_default (yyn)) 1988 goto yydefault; 1989 1990 /* Not known => get a lookahead token if don't already have one. */ 1991 1992 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 1993 if (yychar == YYEMPTY) 1994 { 1995 YYDPRINTF ((stderr, "Reading a token: ")); 1996 yychar = YYLEX; 1997 } 1998 1999 if (yychar <= YYEOF) 2000 { 2001 yychar = yytoken = YYEOF; 2002 YYDPRINTF ((stderr, "Now at end of input.\n")); 2003 } 2004 else 2005 { 2006 yytoken = YYTRANSLATE (yychar); 2007 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 2008 } 2009 2010 /* If the proper action on seeing token YYTOKEN is to reduce or to 2011 detect an error, take that action. */ 2012 yyn += yytoken; 2013 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 2014 goto yydefault; 2015 yyn = yytable[yyn]; 2016 if (yyn <= 0) 2017 { 2018 if (yytable_value_is_error (yyn)) 2019 goto yyerrlab; 2020 yyn = -yyn; 2021 goto yyreduce; 2022 } 2023 2024 /* Count tokens shifted since error; after three, turn off error 2025 status. */ 2026 if (yyerrstatus) 2027 yyerrstatus--; 2028 2029 /* Shift the lookahead token. */ 2030 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 2031 2032 /* Discard the shifted token. */ 2033 yychar = YYEMPTY; 2034 2035 yystate = yyn; 2036 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 2037 *++yyvsp = yylval; 2038 YY_IGNORE_MAYBE_UNINITIALIZED_END 2039 2040 goto yynewstate; 2041 2042 2043 /*-----------------------------------------------------------. 2044 | yydefault -- do the default action for the current state. | 2045 `-----------------------------------------------------------*/ 2046 yydefault: 2047 yyn = yydefact[yystate]; 2048 if (yyn == 0) 2049 goto yyerrlab; 2050 goto yyreduce; 2051 2052 2053 /*-----------------------------. 2054 | yyreduce -- Do a reduction. | 2055 `-----------------------------*/ 2056 yyreduce: 2057 /* yyn is the number of a rule to reduce with. */ 2058 yylen = yyr2[yyn]; 2059 2060 /* If YYLEN is nonzero, implement the default value of the action: 2061 `$$ = $1'. 2062 2063 Otherwise, the following line sets YYVAL to garbage. 2064 This behavior is undocumented and Bison 2065 users should not rely upon it. Assigning to YYVAL 2066 unconditionally makes the parser a bit smaller, and it avoids a 2067 GCC warning that YYVAL may be used uninitialized. */ 2068 yyval = yyvsp[1-yylen]; 2069 2070 2071 YY_REDUCE_PRINT (yyn); 2072 switch (yyn) 2073 { 2074 case 4: 2075 /* Line 1787 of yacc.c */ 2076 #line 109 "cc.y" 2077 { 2078 dodecl(xdecl, lastclass, lasttype, Z); 2079 } 2080 break; 2081 2082 case 6: 2083 /* Line 1787 of yacc.c */ 2084 #line 114 "cc.y" 2085 { 2086 lastdcl = T; 2087 firstarg = S; 2088 dodecl(xdecl, lastclass, lasttype, (yyvsp[(2) - (2)].node)); 2089 if(lastdcl == T || lastdcl->etype != TFUNC) { 2090 diag((yyvsp[(2) - (2)].node), "not a function"); 2091 lastdcl = types[TFUNC]; 2092 } 2093 thisfn = lastdcl; 2094 markdcl(); 2095 firstdcl = dclstack; 2096 argmark((yyvsp[(2) - (2)].node), 0); 2097 } 2098 break; 2099 2100 case 7: 2101 /* Line 1787 of yacc.c */ 2102 #line 128 "cc.y" 2103 { 2104 argmark((yyvsp[(2) - (4)].node), 1); 2105 } 2106 break; 2107 2108 case 8: 2109 /* Line 1787 of yacc.c */ 2110 #line 132 "cc.y" 2111 { 2112 Node *n; 2113 2114 n = revertdcl(); 2115 if(n) 2116 (yyvsp[(6) - (6)].node) = new(OLIST, n, (yyvsp[(6) - (6)].node)); 2117 if(!debug['a'] && !debug['Z']) 2118 codgen((yyvsp[(6) - (6)].node), (yyvsp[(2) - (6)].node)); 2119 } 2120 break; 2121 2122 case 9: 2123 /* Line 1787 of yacc.c */ 2124 #line 144 "cc.y" 2125 { 2126 dodecl(xdecl, lastclass, lasttype, (yyvsp[(1) - (1)].node)); 2127 } 2128 break; 2129 2130 case 10: 2131 /* Line 1787 of yacc.c */ 2132 #line 148 "cc.y" 2133 { 2134 (yyvsp[(1) - (1)].node) = dodecl(xdecl, lastclass, lasttype, (yyvsp[(1) - (1)].node)); 2135 } 2136 break; 2137 2138 case 11: 2139 /* Line 1787 of yacc.c */ 2140 #line 152 "cc.y" 2141 { 2142 doinit((yyvsp[(1) - (4)].node)->sym, (yyvsp[(1) - (4)].node)->type, 0L, (yyvsp[(4) - (4)].node)); 2143 } 2144 break; 2145 2146 case 14: 2147 /* Line 1787 of yacc.c */ 2148 #line 160 "cc.y" 2149 { 2150 (yyval.node) = new(OIND, (yyvsp[(3) - (3)].node), Z); 2151 (yyval.node)->garb = simpleg((yyvsp[(2) - (3)].lval)); 2152 } 2153 break; 2154 2155 case 16: 2156 /* Line 1787 of yacc.c */ 2157 #line 168 "cc.y" 2158 { 2159 (yyval.node) = (yyvsp[(2) - (3)].node); 2160 } 2161 break; 2162 2163 case 17: 2164 /* Line 1787 of yacc.c */ 2165 #line 172 "cc.y" 2166 { 2167 (yyval.node) = new(OFUNC, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); 2168 } 2169 break; 2170 2171 case 18: 2172 /* Line 1787 of yacc.c */ 2173 #line 176 "cc.y" 2174 { 2175 (yyval.node) = new(OARRAY, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); 2176 } 2177 break; 2178 2179 case 19: 2180 /* Line 1787 of yacc.c */ 2181 #line 185 "cc.y" 2182 { 2183 (yyval.node) = dodecl(adecl, lastclass, lasttype, Z); 2184 } 2185 break; 2186 2187 case 20: 2188 /* Line 1787 of yacc.c */ 2189 #line 189 "cc.y" 2190 { 2191 (yyval.node) = (yyvsp[(2) - (3)].node); 2192 } 2193 break; 2194 2195 case 21: 2196 /* Line 1787 of yacc.c */ 2197 #line 195 "cc.y" 2198 { 2199 dodecl(adecl, lastclass, lasttype, (yyvsp[(1) - (1)].node)); 2200 (yyval.node) = Z; 2201 } 2202 break; 2203 2204 case 22: 2205 /* Line 1787 of yacc.c */ 2206 #line 200 "cc.y" 2207 { 2208 (yyvsp[(1) - (1)].node) = dodecl(adecl, lastclass, lasttype, (yyvsp[(1) - (1)].node)); 2209 } 2210 break; 2211 2212 case 23: 2213 /* Line 1787 of yacc.c */ 2214 #line 204 "cc.y" 2215 { 2216 int32 w; 2217 2218 w = (yyvsp[(1) - (4)].node)->sym->type->width; 2219 (yyval.node) = doinit((yyvsp[(1) - (4)].node)->sym, (yyvsp[(1) - (4)].node)->type, 0L, (yyvsp[(4) - (4)].node)); 2220 (yyval.node) = contig((yyvsp[(1) - (4)].node)->sym, (yyval.node), w); 2221 } 2222 break; 2223 2224 case 24: 2225 /* Line 1787 of yacc.c */ 2226 #line 212 "cc.y" 2227 { 2228 (yyval.node) = (yyvsp[(1) - (3)].node); 2229 if((yyvsp[(3) - (3)].node) != Z) { 2230 (yyval.node) = (yyvsp[(3) - (3)].node); 2231 if((yyvsp[(1) - (3)].node) != Z) 2232 (yyval.node) = new(OLIST, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2233 } 2234 } 2235 break; 2236 2237 case 27: 2238 /* Line 1787 of yacc.c */ 2239 #line 229 "cc.y" 2240 { 2241 dodecl(pdecl, lastclass, lasttype, (yyvsp[(1) - (1)].node)); 2242 } 2243 break; 2244 2245 case 29: 2246 /* Line 1787 of yacc.c */ 2247 #line 239 "cc.y" 2248 { 2249 lasttype = (yyvsp[(1) - (1)].type); 2250 } 2251 break; 2252 2253 case 31: 2254 /* Line 1787 of yacc.c */ 2255 #line 244 "cc.y" 2256 { 2257 lasttype = (yyvsp[(2) - (2)].type); 2258 } 2259 break; 2260 2261 case 33: 2262 /* Line 1787 of yacc.c */ 2263 #line 250 "cc.y" 2264 { 2265 lastfield = 0; 2266 edecl(CXXX, lasttype, S); 2267 } 2268 break; 2269 2270 case 35: 2271 /* Line 1787 of yacc.c */ 2272 #line 258 "cc.y" 2273 { 2274 dodecl(edecl, CXXX, lasttype, (yyvsp[(1) - (1)].node)); 2275 } 2276 break; 2277 2278 case 37: 2279 /* Line 1787 of yacc.c */ 2280 #line 265 "cc.y" 2281 { 2282 lastbit = 0; 2283 firstbit = 1; 2284 } 2285 break; 2286 2287 case 38: 2288 /* Line 1787 of yacc.c */ 2289 #line 270 "cc.y" 2290 { 2291 (yyval.node) = new(OBIT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2292 } 2293 break; 2294 2295 case 39: 2296 /* Line 1787 of yacc.c */ 2297 #line 274 "cc.y" 2298 { 2299 (yyval.node) = new(OBIT, Z, (yyvsp[(2) - (2)].node)); 2300 } 2301 break; 2302 2303 case 40: 2304 /* Line 1787 of yacc.c */ 2305 #line 282 "cc.y" 2306 { 2307 (yyval.node) = (Z); 2308 } 2309 break; 2310 2311 case 42: 2312 /* Line 1787 of yacc.c */ 2313 #line 289 "cc.y" 2314 { 2315 (yyval.node) = new(OIND, (Z), Z); 2316 (yyval.node)->garb = simpleg((yyvsp[(2) - (2)].lval)); 2317 } 2318 break; 2319 2320 case 43: 2321 /* Line 1787 of yacc.c */ 2322 #line 294 "cc.y" 2323 { 2324 (yyval.node) = new(OIND, (yyvsp[(3) - (3)].node), Z); 2325 (yyval.node)->garb = simpleg((yyvsp[(2) - (3)].lval)); 2326 } 2327 break; 2328 2329 case 46: 2330 /* Line 1787 of yacc.c */ 2331 #line 303 "cc.y" 2332 { 2333 (yyval.node) = new(OFUNC, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); 2334 } 2335 break; 2336 2337 case 47: 2338 /* Line 1787 of yacc.c */ 2339 #line 307 "cc.y" 2340 { 2341 (yyval.node) = new(OARRAY, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); 2342 } 2343 break; 2344 2345 case 48: 2346 /* Line 1787 of yacc.c */ 2347 #line 313 "cc.y" 2348 { 2349 (yyval.node) = new(OFUNC, (Z), Z); 2350 } 2351 break; 2352 2353 case 49: 2354 /* Line 1787 of yacc.c */ 2355 #line 317 "cc.y" 2356 { 2357 (yyval.node) = new(OARRAY, (Z), (yyvsp[(2) - (3)].node)); 2358 } 2359 break; 2360 2361 case 50: 2362 /* Line 1787 of yacc.c */ 2363 #line 321 "cc.y" 2364 { 2365 (yyval.node) = (yyvsp[(2) - (3)].node); 2366 } 2367 break; 2368 2369 case 52: 2370 /* Line 1787 of yacc.c */ 2371 #line 328 "cc.y" 2372 { 2373 (yyval.node) = new(OINIT, invert((yyvsp[(2) - (3)].node)), Z); 2374 } 2375 break; 2376 2377 case 53: 2378 /* Line 1787 of yacc.c */ 2379 #line 334 "cc.y" 2380 { 2381 (yyval.node) = new(OARRAY, (yyvsp[(2) - (3)].node), Z); 2382 } 2383 break; 2384 2385 case 54: 2386 /* Line 1787 of yacc.c */ 2387 #line 338 "cc.y" 2388 { 2389 (yyval.node) = new(OELEM, Z, Z); 2390 (yyval.node)->sym = (yyvsp[(2) - (2)].sym); 2391 } 2392 break; 2393 2394 case 57: 2395 /* Line 1787 of yacc.c */ 2396 #line 347 "cc.y" 2397 { 2398 (yyval.node) = new(OLIST, (yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node)); 2399 } 2400 break; 2401 2402 case 59: 2403 /* Line 1787 of yacc.c */ 2404 #line 352 "cc.y" 2405 { 2406 (yyval.node) = new(OLIST, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 2407 } 2408 break; 2409 2410 case 62: 2411 /* Line 1787 of yacc.c */ 2412 #line 360 "cc.y" 2413 { 2414 (yyval.node) = new(OLIST, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 2415 } 2416 break; 2417 2418 case 63: 2419 /* Line 1787 of yacc.c */ 2420 #line 365 "cc.y" 2421 { 2422 (yyval.node) = Z; 2423 } 2424 break; 2425 2426 case 64: 2427 /* Line 1787 of yacc.c */ 2428 #line 369 "cc.y" 2429 { 2430 (yyval.node) = invert((yyvsp[(1) - (1)].node)); 2431 } 2432 break; 2433 2434 case 66: 2435 /* Line 1787 of yacc.c */ 2436 #line 377 "cc.y" 2437 { 2438 (yyval.node) = new(OPROTO, (yyvsp[(2) - (2)].node), Z); 2439 (yyval.node)->type = (yyvsp[(1) - (2)].type); 2440 } 2441 break; 2442 2443 case 67: 2444 /* Line 1787 of yacc.c */ 2445 #line 382 "cc.y" 2446 { 2447 (yyval.node) = new(OPROTO, (yyvsp[(2) - (2)].node), Z); 2448 (yyval.node)->type = (yyvsp[(1) - (2)].type); 2449 } 2450 break; 2451 2452 case 68: 2453 /* Line 1787 of yacc.c */ 2454 #line 387 "cc.y" 2455 { 2456 (yyval.node) = new(ODOTDOT, Z, Z); 2457 } 2458 break; 2459 2460 case 69: 2461 /* Line 1787 of yacc.c */ 2462 #line 391 "cc.y" 2463 { 2464 (yyval.node) = new(OLIST, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2465 } 2466 break; 2467 2468 case 70: 2469 /* Line 1787 of yacc.c */ 2470 #line 397 "cc.y" 2471 { 2472 (yyval.node) = invert((yyvsp[(2) - (3)].node)); 2473 // if($2 != Z) 2474 // $$ = new(OLIST, $2, $$); 2475 if((yyval.node) == Z) 2476 (yyval.node) = new(OLIST, Z, Z); 2477 } 2478 break; 2479 2480 case 71: 2481 /* Line 1787 of yacc.c */ 2482 #line 406 "cc.y" 2483 { 2484 (yyval.node) = Z; 2485 } 2486 break; 2487 2488 case 72: 2489 /* Line 1787 of yacc.c */ 2490 #line 410 "cc.y" 2491 { 2492 (yyval.node) = new(OLIST, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 2493 } 2494 break; 2495 2496 case 73: 2497 /* Line 1787 of yacc.c */ 2498 #line 414 "cc.y" 2499 { 2500 (yyval.node) = new(OLIST, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 2501 } 2502 break; 2503 2504 case 75: 2505 /* Line 1787 of yacc.c */ 2506 #line 421 "cc.y" 2507 { 2508 (yyval.node) = new(OLIST, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 2509 } 2510 break; 2511 2512 case 76: 2513 /* Line 1787 of yacc.c */ 2514 #line 427 "cc.y" 2515 { 2516 (yyval.node) = new(OCASE, (yyvsp[(2) - (3)].node), Z); 2517 } 2518 break; 2519 2520 case 77: 2521 /* Line 1787 of yacc.c */ 2522 #line 431 "cc.y" 2523 { 2524 (yyval.node) = new(OCASE, Z, Z); 2525 } 2526 break; 2527 2528 case 78: 2529 /* Line 1787 of yacc.c */ 2530 #line 435 "cc.y" 2531 { 2532 (yyval.node) = new(OLABEL, dcllabel((yyvsp[(1) - (2)].sym), 1), Z); 2533 } 2534 break; 2535 2536 case 79: 2537 /* Line 1787 of yacc.c */ 2538 #line 441 "cc.y" 2539 { 2540 (yyval.node) = Z; 2541 } 2542 break; 2543 2544 case 81: 2545 /* Line 1787 of yacc.c */ 2546 #line 446 "cc.y" 2547 { 2548 (yyval.node) = new(OLIST, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 2549 } 2550 break; 2551 2552 case 83: 2553 /* Line 1787 of yacc.c */ 2554 #line 453 "cc.y" 2555 { 2556 (yyval.node) = (yyvsp[(2) - (2)].node); 2557 } 2558 break; 2559 2560 case 85: 2561 /* Line 1787 of yacc.c */ 2562 #line 459 "cc.y" 2563 { 2564 markdcl(); 2565 } 2566 break; 2567 2568 case 86: 2569 /* Line 1787 of yacc.c */ 2570 #line 463 "cc.y" 2571 { 2572 (yyval.node) = revertdcl(); 2573 if((yyval.node)) 2574 (yyval.node) = new(OLIST, (yyval.node), (yyvsp[(2) - (2)].node)); 2575 else 2576 (yyval.node) = (yyvsp[(2) - (2)].node); 2577 } 2578 break; 2579 2580 case 87: 2581 /* Line 1787 of yacc.c */ 2582 #line 471 "cc.y" 2583 { 2584 (yyval.node) = new(OIF, (yyvsp[(3) - (5)].node), new(OLIST, (yyvsp[(5) - (5)].node), Z)); 2585 if((yyvsp[(5) - (5)].node) == Z) 2586 warn((yyvsp[(3) - (5)].node), "empty if body"); 2587 } 2588 break; 2589 2590 case 88: 2591 /* Line 1787 of yacc.c */ 2592 #line 477 "cc.y" 2593 { 2594 (yyval.node) = new(OIF, (yyvsp[(3) - (7)].node), new(OLIST, (yyvsp[(5) - (7)].node), (yyvsp[(7) - (7)].node))); 2595 if((yyvsp[(5) - (7)].node) == Z) 2596 warn((yyvsp[(3) - (7)].node), "empty if body"); 2597 if((yyvsp[(7) - (7)].node) == Z) 2598 warn((yyvsp[(3) - (7)].node), "empty else body"); 2599 } 2600 break; 2601 2602 case 89: 2603 /* Line 1787 of yacc.c */ 2604 #line 484 "cc.y" 2605 { markdcl(); } 2606 break; 2607 2608 case 90: 2609 /* Line 1787 of yacc.c */ 2610 #line 485 "cc.y" 2611 { 2612 (yyval.node) = revertdcl(); 2613 if((yyval.node)){ 2614 if((yyvsp[(4) - (10)].node)) 2615 (yyvsp[(4) - (10)].node) = new(OLIST, (yyval.node), (yyvsp[(4) - (10)].node)); 2616 else 2617 (yyvsp[(4) - (10)].node) = (yyval.node); 2618 } 2619 (yyval.node) = new(OFOR, new(OLIST, (yyvsp[(6) - (10)].node), new(OLIST, (yyvsp[(4) - (10)].node), (yyvsp[(8) - (10)].node))), (yyvsp[(10) - (10)].node)); 2620 } 2621 break; 2622 2623 case 91: 2624 /* Line 1787 of yacc.c */ 2625 #line 496 "cc.y" 2626 { 2627 (yyval.node) = new(OWHILE, (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node)); 2628 } 2629 break; 2630 2631 case 92: 2632 /* Line 1787 of yacc.c */ 2633 #line 500 "cc.y" 2634 { 2635 (yyval.node) = new(ODWHILE, (yyvsp[(5) - (7)].node), (yyvsp[(2) - (7)].node)); 2636 } 2637 break; 2638 2639 case 93: 2640 /* Line 1787 of yacc.c */ 2641 #line 504 "cc.y" 2642 { 2643 (yyval.node) = new(ORETURN, (yyvsp[(2) - (3)].node), Z); 2644 (yyval.node)->type = thisfn->link; 2645 } 2646 break; 2647 2648 case 94: 2649 /* Line 1787 of yacc.c */ 2650 #line 509 "cc.y" 2651 { 2652 (yyval.node) = new(OCONST, Z, Z); 2653 (yyval.node)->vconst = 0; 2654 (yyval.node)->type = types[TINT]; 2655 (yyvsp[(3) - (5)].node) = new(OSUB, (yyval.node), (yyvsp[(3) - (5)].node)); 2656 2657 (yyval.node) = new(OCONST, Z, Z); 2658 (yyval.node)->vconst = 0; 2659 (yyval.node)->type = types[TINT]; 2660 (yyvsp[(3) - (5)].node) = new(OSUB, (yyval.node), (yyvsp[(3) - (5)].node)); 2661 2662 (yyval.node) = new(OSWITCH, (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node)); 2663 } 2664 break; 2665 2666 case 95: 2667 /* Line 1787 of yacc.c */ 2668 #line 523 "cc.y" 2669 { 2670 (yyval.node) = new(OBREAK, Z, Z); 2671 } 2672 break; 2673 2674 case 96: 2675 /* Line 1787 of yacc.c */ 2676 #line 527 "cc.y" 2677 { 2678 (yyval.node) = new(OCONTINUE, Z, Z); 2679 } 2680 break; 2681 2682 case 97: 2683 /* Line 1787 of yacc.c */ 2684 #line 531 "cc.y" 2685 { 2686 (yyval.node) = new(OGOTO, dcllabel((yyvsp[(2) - (3)].sym), 0), Z); 2687 } 2688 break; 2689 2690 case 98: 2691 /* Line 1787 of yacc.c */ 2692 #line 535 "cc.y" 2693 { 2694 (yyval.node) = new(OUSED, (yyvsp[(3) - (5)].node), Z); 2695 } 2696 break; 2697 2698 case 99: 2699 /* Line 1787 of yacc.c */ 2700 #line 539 "cc.y" 2701 { 2702 (yyval.node) = new(OPREFETCH, (yyvsp[(3) - (5)].node), Z); 2703 } 2704 break; 2705 2706 case 100: 2707 /* Line 1787 of yacc.c */ 2708 #line 543 "cc.y" 2709 { 2710 (yyval.node) = new(OSET, (yyvsp[(3) - (5)].node), Z); 2711 } 2712 break; 2713 2714 case 101: 2715 /* Line 1787 of yacc.c */ 2716 #line 548 "cc.y" 2717 { 2718 (yyval.node) = Z; 2719 } 2720 break; 2721 2722 case 103: 2723 /* Line 1787 of yacc.c */ 2724 #line 554 "cc.y" 2725 { 2726 (yyval.node) = Z; 2727 } 2728 break; 2729 2730 case 105: 2731 /* Line 1787 of yacc.c */ 2732 #line 561 "cc.y" 2733 { 2734 (yyval.node) = new(OCAST, (yyvsp[(1) - (1)].node), Z); 2735 (yyval.node)->type = types[TLONG]; 2736 } 2737 break; 2738 2739 case 107: 2740 /* Line 1787 of yacc.c */ 2741 #line 569 "cc.y" 2742 { 2743 (yyval.node) = new(OCOMMA, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2744 } 2745 break; 2746 2747 case 109: 2748 /* Line 1787 of yacc.c */ 2749 #line 576 "cc.y" 2750 { 2751 (yyval.node) = new(OMUL, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2752 } 2753 break; 2754 2755 case 110: 2756 /* Line 1787 of yacc.c */ 2757 #line 580 "cc.y" 2758 { 2759 (yyval.node) = new(ODIV, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2760 } 2761 break; 2762 2763 case 111: 2764 /* Line 1787 of yacc.c */ 2765 #line 584 "cc.y" 2766 { 2767 (yyval.node) = new(OMOD, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2768 } 2769 break; 2770 2771 case 112: 2772 /* Line 1787 of yacc.c */ 2773 #line 588 "cc.y" 2774 { 2775 (yyval.node) = new(OADD, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2776 } 2777 break; 2778 2779 case 113: 2780 /* Line 1787 of yacc.c */ 2781 #line 592 "cc.y" 2782 { 2783 (yyval.node) = new(OSUB, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2784 } 2785 break; 2786 2787 case 114: 2788 /* Line 1787 of yacc.c */ 2789 #line 596 "cc.y" 2790 { 2791 (yyval.node) = new(OASHR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2792 } 2793 break; 2794 2795 case 115: 2796 /* Line 1787 of yacc.c */ 2797 #line 600 "cc.y" 2798 { 2799 (yyval.node) = new(OASHL, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2800 } 2801 break; 2802 2803 case 116: 2804 /* Line 1787 of yacc.c */ 2805 #line 604 "cc.y" 2806 { 2807 (yyval.node) = new(OLT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2808 } 2809 break; 2810 2811 case 117: 2812 /* Line 1787 of yacc.c */ 2813 #line 608 "cc.y" 2814 { 2815 (yyval.node) = new(OGT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2816 } 2817 break; 2818 2819 case 118: 2820 /* Line 1787 of yacc.c */ 2821 #line 612 "cc.y" 2822 { 2823 (yyval.node) = new(OLE, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2824 } 2825 break; 2826 2827 case 119: 2828 /* Line 1787 of yacc.c */ 2829 #line 616 "cc.y" 2830 { 2831 (yyval.node) = new(OGE, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2832 } 2833 break; 2834 2835 case 120: 2836 /* Line 1787 of yacc.c */ 2837 #line 620 "cc.y" 2838 { 2839 (yyval.node) = new(OEQ, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2840 } 2841 break; 2842 2843 case 121: 2844 /* Line 1787 of yacc.c */ 2845 #line 624 "cc.y" 2846 { 2847 (yyval.node) = new(ONE, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2848 } 2849 break; 2850 2851 case 122: 2852 /* Line 1787 of yacc.c */ 2853 #line 628 "cc.y" 2854 { 2855 (yyval.node) = new(OAND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2856 } 2857 break; 2858 2859 case 123: 2860 /* Line 1787 of yacc.c */ 2861 #line 632 "cc.y" 2862 { 2863 (yyval.node) = new(OXOR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2864 } 2865 break; 2866 2867 case 124: 2868 /* Line 1787 of yacc.c */ 2869 #line 636 "cc.y" 2870 { 2871 (yyval.node) = new(OOR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2872 } 2873 break; 2874 2875 case 125: 2876 /* Line 1787 of yacc.c */ 2877 #line 640 "cc.y" 2878 { 2879 (yyval.node) = new(OANDAND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2880 } 2881 break; 2882 2883 case 126: 2884 /* Line 1787 of yacc.c */ 2885 #line 644 "cc.y" 2886 { 2887 (yyval.node) = new(OOROR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2888 } 2889 break; 2890 2891 case 127: 2892 /* Line 1787 of yacc.c */ 2893 #line 648 "cc.y" 2894 { 2895 (yyval.node) = new(OCOND, (yyvsp[(1) - (5)].node), new(OLIST, (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node))); 2896 } 2897 break; 2898 2899 case 128: 2900 /* Line 1787 of yacc.c */ 2901 #line 652 "cc.y" 2902 { 2903 (yyval.node) = new(OAS, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2904 } 2905 break; 2906 2907 case 129: 2908 /* Line 1787 of yacc.c */ 2909 #line 656 "cc.y" 2910 { 2911 (yyval.node) = new(OASADD, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2912 } 2913 break; 2914 2915 case 130: 2916 /* Line 1787 of yacc.c */ 2917 #line 660 "cc.y" 2918 { 2919 (yyval.node) = new(OASSUB, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2920 } 2921 break; 2922 2923 case 131: 2924 /* Line 1787 of yacc.c */ 2925 #line 664 "cc.y" 2926 { 2927 (yyval.node) = new(OASMUL, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2928 } 2929 break; 2930 2931 case 132: 2932 /* Line 1787 of yacc.c */ 2933 #line 668 "cc.y" 2934 { 2935 (yyval.node) = new(OASDIV, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2936 } 2937 break; 2938 2939 case 133: 2940 /* Line 1787 of yacc.c */ 2941 #line 672 "cc.y" 2942 { 2943 (yyval.node) = new(OASMOD, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2944 } 2945 break; 2946 2947 case 134: 2948 /* Line 1787 of yacc.c */ 2949 #line 676 "cc.y" 2950 { 2951 (yyval.node) = new(OASASHL, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2952 } 2953 break; 2954 2955 case 135: 2956 /* Line 1787 of yacc.c */ 2957 #line 680 "cc.y" 2958 { 2959 (yyval.node) = new(OASASHR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2960 } 2961 break; 2962 2963 case 136: 2964 /* Line 1787 of yacc.c */ 2965 #line 684 "cc.y" 2966 { 2967 (yyval.node) = new(OASAND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2968 } 2969 break; 2970 2971 case 137: 2972 /* Line 1787 of yacc.c */ 2973 #line 688 "cc.y" 2974 { 2975 (yyval.node) = new(OASXOR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2976 } 2977 break; 2978 2979 case 138: 2980 /* Line 1787 of yacc.c */ 2981 #line 692 "cc.y" 2982 { 2983 (yyval.node) = new(OASOR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2984 } 2985 break; 2986 2987 case 140: 2988 /* Line 1787 of yacc.c */ 2989 #line 699 "cc.y" 2990 { 2991 (yyval.node) = new(OCAST, (yyvsp[(5) - (5)].node), Z); 2992 dodecl(NODECL, CXXX, (yyvsp[(2) - (5)].type), (yyvsp[(3) - (5)].node)); 2993 (yyval.node)->type = lastdcl; 2994 (yyval.node)->xcast = 1; 2995 } 2996 break; 2997 2998 case 141: 2999 /* Line 1787 of yacc.c */ 3000 #line 706 "cc.y" 3001 { 3002 (yyval.node) = new(OSTRUCT, (yyvsp[(6) - (7)].node), Z); 3003 dodecl(NODECL, CXXX, (yyvsp[(2) - (7)].type), (yyvsp[(3) - (7)].node)); 3004 (yyval.node)->type = lastdcl; 3005 } 3006 break; 3007 3008 case 143: 3009 /* Line 1787 of yacc.c */ 3010 #line 715 "cc.y" 3011 { 3012 (yyval.node) = new(OIND, (yyvsp[(2) - (2)].node), Z); 3013 } 3014 break; 3015 3016 case 144: 3017 /* Line 1787 of yacc.c */ 3018 #line 719 "cc.y" 3019 { 3020 (yyval.node) = new(OADDR, (yyvsp[(2) - (2)].node), Z); 3021 } 3022 break; 3023 3024 case 145: 3025 /* Line 1787 of yacc.c */ 3026 #line 723 "cc.y" 3027 { 3028 (yyval.node) = new(OPOS, (yyvsp[(2) - (2)].node), Z); 3029 } 3030 break; 3031 3032 case 146: 3033 /* Line 1787 of yacc.c */ 3034 #line 727 "cc.y" 3035 { 3036 (yyval.node) = new(ONEG, (yyvsp[(2) - (2)].node), Z); 3037 } 3038 break; 3039 3040 case 147: 3041 /* Line 1787 of yacc.c */ 3042 #line 731 "cc.y" 3043 { 3044 (yyval.node) = new(ONOT, (yyvsp[(2) - (2)].node), Z); 3045 } 3046 break; 3047 3048 case 148: 3049 /* Line 1787 of yacc.c */ 3050 #line 735 "cc.y" 3051 { 3052 (yyval.node) = new(OCOM, (yyvsp[(2) - (2)].node), Z); 3053 } 3054 break; 3055 3056 case 149: 3057 /* Line 1787 of yacc.c */ 3058 #line 739 "cc.y" 3059 { 3060 (yyval.node) = new(OPREINC, (yyvsp[(2) - (2)].node), Z); 3061 } 3062 break; 3063 3064 case 150: 3065 /* Line 1787 of yacc.c */ 3066 #line 743 "cc.y" 3067 { 3068 (yyval.node) = new(OPREDEC, (yyvsp[(2) - (2)].node), Z); 3069 } 3070 break; 3071 3072 case 151: 3073 /* Line 1787 of yacc.c */ 3074 #line 747 "cc.y" 3075 { 3076 (yyval.node) = new(OSIZE, (yyvsp[(2) - (2)].node), Z); 3077 } 3078 break; 3079 3080 case 152: 3081 /* Line 1787 of yacc.c */ 3082 #line 751 "cc.y" 3083 { 3084 (yyval.node) = new(OSIGN, (yyvsp[(2) - (2)].node), Z); 3085 } 3086 break; 3087 3088 case 153: 3089 /* Line 1787 of yacc.c */ 3090 #line 757 "cc.y" 3091 { 3092 (yyval.node) = (yyvsp[(2) - (3)].node); 3093 } 3094 break; 3095 3096 case 154: 3097 /* Line 1787 of yacc.c */ 3098 #line 761 "cc.y" 3099 { 3100 (yyval.node) = new(OSIZE, Z, Z); 3101 dodecl(NODECL, CXXX, (yyvsp[(3) - (5)].type), (yyvsp[(4) - (5)].node)); 3102 (yyval.node)->type = lastdcl; 3103 } 3104 break; 3105 3106 case 155: 3107 /* Line 1787 of yacc.c */ 3108 #line 767 "cc.y" 3109 { 3110 (yyval.node) = new(OSIGN, Z, Z); 3111 dodecl(NODECL, CXXX, (yyvsp[(3) - (5)].type), (yyvsp[(4) - (5)].node)); 3112 (yyval.node)->type = lastdcl; 3113 } 3114 break; 3115 3116 case 156: 3117 /* Line 1787 of yacc.c */ 3118 #line 773 "cc.y" 3119 { 3120 (yyval.node) = new(OFUNC, (yyvsp[(1) - (4)].node), Z); 3121 if((yyvsp[(1) - (4)].node)->op == ONAME) 3122 if((yyvsp[(1) - (4)].node)->type == T) 3123 dodecl(xdecl, CXXX, types[TINT], (yyval.node)); 3124 (yyval.node)->right = invert((yyvsp[(3) - (4)].node)); 3125 } 3126 break; 3127 3128 case 157: 3129 /* Line 1787 of yacc.c */ 3130 #line 781 "cc.y" 3131 { 3132 (yyval.node) = new(OIND, new(OADD, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)), Z); 3133 } 3134 break; 3135 3136 case 158: 3137 /* Line 1787 of yacc.c */ 3138 #line 785 "cc.y" 3139 { 3140 (yyval.node) = new(ODOT, new(OIND, (yyvsp[(1) - (3)].node), Z), Z); 3141 (yyval.node)->sym = (yyvsp[(3) - (3)].sym); 3142 } 3143 break; 3144 3145 case 159: 3146 /* Line 1787 of yacc.c */ 3147 #line 790 "cc.y" 3148 { 3149 (yyval.node) = new(ODOT, (yyvsp[(1) - (3)].node), Z); 3150 (yyval.node)->sym = (yyvsp[(3) - (3)].sym); 3151 } 3152 break; 3153 3154 case 160: 3155 /* Line 1787 of yacc.c */ 3156 #line 795 "cc.y" 3157 { 3158 (yyval.node) = new(OPOSTINC, (yyvsp[(1) - (2)].node), Z); 3159 } 3160 break; 3161 3162 case 161: 3163 /* Line 1787 of yacc.c */ 3164 #line 799 "cc.y" 3165 { 3166 (yyval.node) = new(OPOSTDEC, (yyvsp[(1) - (2)].node), Z); 3167 } 3168 break; 3169 3170 case 163: 3171 /* Line 1787 of yacc.c */ 3172 #line 804 "cc.y" 3173 { 3174 (yyval.node) = new(OCONST, Z, Z); 3175 (yyval.node)->type = types[TINT]; 3176 (yyval.node)->vconst = (yyvsp[(1) - (1)].vval); 3177 (yyval.node)->cstring = strdup(symb); 3178 } 3179 break; 3180 3181 case 164: 3182 /* Line 1787 of yacc.c */ 3183 #line 811 "cc.y" 3184 { 3185 (yyval.node) = new(OCONST, Z, Z); 3186 (yyval.node)->type = types[TLONG]; 3187 (yyval.node)->vconst = (yyvsp[(1) - (1)].vval); 3188 (yyval.node)->cstring = strdup(symb); 3189 } 3190 break; 3191 3192 case 165: 3193 /* Line 1787 of yacc.c */ 3194 #line 818 "cc.y" 3195 { 3196 (yyval.node) = new(OCONST, Z, Z); 3197 (yyval.node)->type = types[TUINT]; 3198 (yyval.node)->vconst = (yyvsp[(1) - (1)].vval); 3199 (yyval.node)->cstring = strdup(symb); 3200 } 3201 break; 3202 3203 case 166: 3204 /* Line 1787 of yacc.c */ 3205 #line 825 "cc.y" 3206 { 3207 (yyval.node) = new(OCONST, Z, Z); 3208 (yyval.node)->type = types[TULONG]; 3209 (yyval.node)->vconst = (yyvsp[(1) - (1)].vval); 3210 (yyval.node)->cstring = strdup(symb); 3211 } 3212 break; 3213 3214 case 167: 3215 /* Line 1787 of yacc.c */ 3216 #line 832 "cc.y" 3217 { 3218 (yyval.node) = new(OCONST, Z, Z); 3219 (yyval.node)->type = types[TDOUBLE]; 3220 (yyval.node)->fconst = (yyvsp[(1) - (1)].dval); 3221 (yyval.node)->cstring = strdup(symb); 3222 } 3223 break; 3224 3225 case 168: 3226 /* Line 1787 of yacc.c */ 3227 #line 839 "cc.y" 3228 { 3229 (yyval.node) = new(OCONST, Z, Z); 3230 (yyval.node)->type = types[TFLOAT]; 3231 (yyval.node)->fconst = (yyvsp[(1) - (1)].dval); 3232 (yyval.node)->cstring = strdup(symb); 3233 } 3234 break; 3235 3236 case 169: 3237 /* Line 1787 of yacc.c */ 3238 #line 846 "cc.y" 3239 { 3240 (yyval.node) = new(OCONST, Z, Z); 3241 (yyval.node)->type = types[TVLONG]; 3242 (yyval.node)->vconst = (yyvsp[(1) - (1)].vval); 3243 (yyval.node)->cstring = strdup(symb); 3244 } 3245 break; 3246 3247 case 170: 3248 /* Line 1787 of yacc.c */ 3249 #line 853 "cc.y" 3250 { 3251 (yyval.node) = new(OCONST, Z, Z); 3252 (yyval.node)->type = types[TUVLONG]; 3253 (yyval.node)->vconst = (yyvsp[(1) - (1)].vval); 3254 (yyval.node)->cstring = strdup(symb); 3255 } 3256 break; 3257 3258 case 173: 3259 /* Line 1787 of yacc.c */ 3260 #line 864 "cc.y" 3261 { 3262 (yyval.node) = new(OSTRING, Z, Z); 3263 (yyval.node)->type = typ(TARRAY, types[TCHAR]); 3264 (yyval.node)->type->width = (yyvsp[(1) - (1)].sval).l + 1; 3265 (yyval.node)->cstring = (yyvsp[(1) - (1)].sval).s; 3266 (yyval.node)->sym = symstring; 3267 (yyval.node)->etype = TARRAY; 3268 (yyval.node)->class = CSTATIC; 3269 } 3270 break; 3271 3272 case 174: 3273 /* Line 1787 of yacc.c */ 3274 #line 874 "cc.y" 3275 { 3276 char *s; 3277 int n; 3278 3279 n = (yyvsp[(1) - (2)].node)->type->width - 1; 3280 s = alloc(n+(yyvsp[(2) - (2)].sval).l+MAXALIGN); 3281 3282 memcpy(s, (yyvsp[(1) - (2)].node)->cstring, n); 3283 memcpy(s+n, (yyvsp[(2) - (2)].sval).s, (yyvsp[(2) - (2)].sval).l); 3284 s[n+(yyvsp[(2) - (2)].sval).l] = 0; 3285 3286 (yyval.node) = (yyvsp[(1) - (2)].node); 3287 (yyval.node)->type->width += (yyvsp[(2) - (2)].sval).l; 3288 (yyval.node)->cstring = s; 3289 } 3290 break; 3291 3292 case 175: 3293 /* Line 1787 of yacc.c */ 3294 #line 892 "cc.y" 3295 { 3296 (yyval.node) = new(OLSTRING, Z, Z); 3297 (yyval.node)->type = typ(TARRAY, types[TRUNE]); 3298 (yyval.node)->type->width = (yyvsp[(1) - (1)].sval).l + sizeof(TRune); 3299 (yyval.node)->rstring = (TRune*)(yyvsp[(1) - (1)].sval).s; 3300 (yyval.node)->sym = symstring; 3301 (yyval.node)->etype = TARRAY; 3302 (yyval.node)->class = CSTATIC; 3303 } 3304 break; 3305 3306 case 176: 3307 /* Line 1787 of yacc.c */ 3308 #line 902 "cc.y" 3309 { 3310 char *s; 3311 int n; 3312 3313 n = (yyvsp[(1) - (2)].node)->type->width - sizeof(TRune); 3314 s = alloc(n+(yyvsp[(2) - (2)].sval).l+MAXALIGN); 3315 3316 memcpy(s, (yyvsp[(1) - (2)].node)->rstring, n); 3317 memcpy(s+n, (yyvsp[(2) - (2)].sval).s, (yyvsp[(2) - (2)].sval).l); 3318 *(TRune*)(s+n+(yyvsp[(2) - (2)].sval).l) = 0; 3319 3320 (yyval.node) = (yyvsp[(1) - (2)].node); 3321 (yyval.node)->type->width += (yyvsp[(2) - (2)].sval).l; 3322 (yyval.node)->rstring = (TRune*)s; 3323 } 3324 break; 3325 3326 case 177: 3327 /* Line 1787 of yacc.c */ 3328 #line 919 "cc.y" 3329 { 3330 (yyval.node) = Z; 3331 } 3332 break; 3333 3334 case 180: 3335 /* Line 1787 of yacc.c */ 3336 #line 927 "cc.y" 3337 { 3338 (yyval.node) = new(OLIST, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 3339 } 3340 break; 3341 3342 case 181: 3343 /* Line 1787 of yacc.c */ 3344 #line 933 "cc.y" 3345 { 3346 (yyval.tyty).t1 = strf; 3347 (yyval.tyty).t2 = strl; 3348 (yyval.tyty).t3 = lasttype; 3349 (yyval.tyty).c = lastclass; 3350 strf = T; 3351 strl = T; 3352 lastbit = 0; 3353 firstbit = 1; 3354 lastclass = CXXX; 3355 lasttype = T; 3356 } 3357 break; 3358 3359 case 182: 3360 /* Line 1787 of yacc.c */ 3361 #line 946 "cc.y" 3362 { 3363 (yyval.type) = strf; 3364 strf = (yyvsp[(2) - (4)].tyty).t1; 3365 strl = (yyvsp[(2) - (4)].tyty).t2; 3366 lasttype = (yyvsp[(2) - (4)].tyty).t3; 3367 lastclass = (yyvsp[(2) - (4)].tyty).c; 3368 } 3369 break; 3370 3371 case 183: 3372 /* Line 1787 of yacc.c */ 3373 #line 955 "cc.y" 3374 { 3375 lastclass = CXXX; 3376 lasttype = types[TINT]; 3377 } 3378 break; 3379 3380 case 185: 3381 /* Line 1787 of yacc.c */ 3382 #line 963 "cc.y" 3383 { 3384 (yyval.tycl).t = (yyvsp[(1) - (1)].type); 3385 (yyval.tycl).c = CXXX; 3386 } 3387 break; 3388 3389 case 186: 3390 /* Line 1787 of yacc.c */ 3391 #line 968 "cc.y" 3392 { 3393 (yyval.tycl).t = simplet((yyvsp[(1) - (1)].lval)); 3394 (yyval.tycl).c = CXXX; 3395 } 3396 break; 3397 3398 case 187: 3399 /* Line 1787 of yacc.c */ 3400 #line 973 "cc.y" 3401 { 3402 (yyval.tycl).t = simplet((yyvsp[(1) - (1)].lval)); 3403 (yyval.tycl).c = simplec((yyvsp[(1) - (1)].lval)); 3404 (yyval.tycl).t = garbt((yyval.tycl).t, (yyvsp[(1) - (1)].lval)); 3405 } 3406 break; 3407 3408 case 188: 3409 /* Line 1787 of yacc.c */ 3410 #line 979 "cc.y" 3411 { 3412 (yyval.tycl).t = (yyvsp[(1) - (2)].type); 3413 (yyval.tycl).c = simplec((yyvsp[(2) - (2)].lval)); 3414 (yyval.tycl).t = garbt((yyval.tycl).t, (yyvsp[(2) - (2)].lval)); 3415 if((yyvsp[(2) - (2)].lval) & ~BCLASS & ~BGARB) 3416 diag(Z, "duplicate types given: %T and %Q", (yyvsp[(1) - (2)].type), (yyvsp[(2) - (2)].lval)); 3417 } 3418 break; 3419 3420 case 189: 3421 /* Line 1787 of yacc.c */ 3422 #line 987 "cc.y" 3423 { 3424 (yyval.tycl).t = simplet(typebitor((yyvsp[(1) - (2)].lval), (yyvsp[(2) - (2)].lval))); 3425 (yyval.tycl).c = simplec((yyvsp[(2) - (2)].lval)); 3426 (yyval.tycl).t = garbt((yyval.tycl).t, (yyvsp[(2) - (2)].lval)); 3427 } 3428 break; 3429 3430 case 190: 3431 /* Line 1787 of yacc.c */ 3432 #line 993 "cc.y" 3433 { 3434 (yyval.tycl).t = (yyvsp[(2) - (3)].type); 3435 (yyval.tycl).c = simplec((yyvsp[(1) - (3)].lval)); 3436 (yyval.tycl).t = garbt((yyval.tycl).t, (yyvsp[(1) - (3)].lval)|(yyvsp[(3) - (3)].lval)); 3437 } 3438 break; 3439 3440 case 191: 3441 /* Line 1787 of yacc.c */ 3442 #line 999 "cc.y" 3443 { 3444 (yyval.tycl).t = simplet((yyvsp[(2) - (2)].lval)); 3445 (yyval.tycl).c = simplec((yyvsp[(1) - (2)].lval)); 3446 (yyval.tycl).t = garbt((yyval.tycl).t, (yyvsp[(1) - (2)].lval)); 3447 } 3448 break; 3449 3450 case 192: 3451 /* Line 1787 of yacc.c */ 3452 #line 1005 "cc.y" 3453 { 3454 (yyval.tycl).t = simplet(typebitor((yyvsp[(2) - (3)].lval), (yyvsp[(3) - (3)].lval))); 3455 (yyval.tycl).c = simplec((yyvsp[(1) - (3)].lval)|(yyvsp[(3) - (3)].lval)); 3456 (yyval.tycl).t = garbt((yyval.tycl).t, (yyvsp[(1) - (3)].lval)|(yyvsp[(3) - (3)].lval)); 3457 } 3458 break; 3459 3460 case 193: 3461 /* Line 1787 of yacc.c */ 3462 #line 1013 "cc.y" 3463 { 3464 (yyval.type) = (yyvsp[(1) - (1)].tycl).t; 3465 if((yyvsp[(1) - (1)].tycl).c != CXXX) 3466 diag(Z, "illegal combination of class 4: %s", cnames[(yyvsp[(1) - (1)].tycl).c]); 3467 } 3468 break; 3469 3470 case 194: 3471 /* Line 1787 of yacc.c */ 3472 #line 1021 "cc.y" 3473 { 3474 lasttype = (yyvsp[(1) - (1)].tycl).t; 3475 lastclass = (yyvsp[(1) - (1)].tycl).c; 3476 } 3477 break; 3478 3479 case 195: 3480 /* Line 1787 of yacc.c */ 3481 #line 1028 "cc.y" 3482 { 3483 dotag((yyvsp[(2) - (2)].sym), TSTRUCT, 0); 3484 (yyval.type) = (yyvsp[(2) - (2)].sym)->suetag; 3485 } 3486 break; 3487 3488 case 196: 3489 /* Line 1787 of yacc.c */ 3490 #line 1033 "cc.y" 3491 { 3492 dotag((yyvsp[(2) - (2)].sym), TSTRUCT, autobn); 3493 } 3494 break; 3495 3496 case 197: 3497 /* Line 1787 of yacc.c */ 3498 #line 1037 "cc.y" 3499 { 3500 (yyval.type) = (yyvsp[(2) - (4)].sym)->suetag; 3501 if((yyval.type)->link != T) 3502 diag(Z, "redeclare tag: %s", (yyvsp[(2) - (4)].sym)->name); 3503 (yyval.type)->link = (yyvsp[(4) - (4)].type); 3504 sualign((yyval.type)); 3505 } 3506 break; 3507 3508 case 198: 3509 /* Line 1787 of yacc.c */ 3510 #line 1045 "cc.y" 3511 { 3512 taggen++; 3513 sprint(symb, "_%d_", taggen); 3514 (yyval.type) = dotag(lookup(), TSTRUCT, autobn); 3515 (yyval.type)->link = (yyvsp[(2) - (2)].type); 3516 sualign((yyval.type)); 3517 } 3518 break; 3519 3520 case 199: 3521 /* Line 1787 of yacc.c */ 3522 #line 1053 "cc.y" 3523 { 3524 dotag((yyvsp[(2) - (2)].sym), TUNION, 0); 3525 (yyval.type) = (yyvsp[(2) - (2)].sym)->suetag; 3526 } 3527 break; 3528 3529 case 200: 3530 /* Line 1787 of yacc.c */ 3531 #line 1058 "cc.y" 3532 { 3533 dotag((yyvsp[(2) - (2)].sym), TUNION, autobn); 3534 } 3535 break; 3536 3537 case 201: 3538 /* Line 1787 of yacc.c */ 3539 #line 1062 "cc.y" 3540 { 3541 (yyval.type) = (yyvsp[(2) - (4)].sym)->suetag; 3542 if((yyval.type)->link != T) 3543 diag(Z, "redeclare tag: %s", (yyvsp[(2) - (4)].sym)->name); 3544 (yyval.type)->link = (yyvsp[(4) - (4)].type); 3545 sualign((yyval.type)); 3546 } 3547 break; 3548 3549 case 202: 3550 /* Line 1787 of yacc.c */ 3551 #line 1070 "cc.y" 3552 { 3553 taggen++; 3554 sprint(symb, "_%d_", taggen); 3555 (yyval.type) = dotag(lookup(), TUNION, autobn); 3556 (yyval.type)->link = (yyvsp[(2) - (2)].type); 3557 sualign((yyval.type)); 3558 } 3559 break; 3560 3561 case 203: 3562 /* Line 1787 of yacc.c */ 3563 #line 1078 "cc.y" 3564 { 3565 dotag((yyvsp[(2) - (2)].sym), TENUM, 0); 3566 (yyval.type) = (yyvsp[(2) - (2)].sym)->suetag; 3567 if((yyval.type)->link == T) 3568 (yyval.type)->link = types[TINT]; 3569 (yyval.type) = (yyval.type)->link; 3570 } 3571 break; 3572 3573 case 204: 3574 /* Line 1787 of yacc.c */ 3575 #line 1086 "cc.y" 3576 { 3577 dotag((yyvsp[(2) - (2)].sym), TENUM, autobn); 3578 } 3579 break; 3580 3581 case 205: 3582 /* Line 1787 of yacc.c */ 3583 #line 1090 "cc.y" 3584 { 3585 en.tenum = T; 3586 en.cenum = T; 3587 } 3588 break; 3589 3590 case 206: 3591 /* Line 1787 of yacc.c */ 3592 #line 1095 "cc.y" 3593 { 3594 (yyval.type) = (yyvsp[(2) - (7)].sym)->suetag; 3595 if((yyval.type)->link != T) 3596 diag(Z, "redeclare tag: %s", (yyvsp[(2) - (7)].sym)->name); 3597 if(en.tenum == T) { 3598 diag(Z, "enum type ambiguous: %s", (yyvsp[(2) - (7)].sym)->name); 3599 en.tenum = types[TINT]; 3600 } 3601 (yyval.type)->link = en.tenum; 3602 (yyval.type) = en.tenum; 3603 } 3604 break; 3605 3606 case 207: 3607 /* Line 1787 of yacc.c */ 3608 #line 1107 "cc.y" 3609 { 3610 en.tenum = T; 3611 en.cenum = T; 3612 } 3613 break; 3614 3615 case 208: 3616 /* Line 1787 of yacc.c */ 3617 #line 1112 "cc.y" 3618 { 3619 (yyval.type) = en.tenum; 3620 } 3621 break; 3622 3623 case 209: 3624 /* Line 1787 of yacc.c */ 3625 #line 1116 "cc.y" 3626 { 3627 (yyval.type) = tcopy((yyvsp[(1) - (1)].sym)->type); 3628 } 3629 break; 3630 3631 case 211: 3632 /* Line 1787 of yacc.c */ 3633 #line 1123 "cc.y" 3634 { 3635 (yyval.lval) = typebitor((yyvsp[(1) - (2)].lval), (yyvsp[(2) - (2)].lval)); 3636 } 3637 break; 3638 3639 case 212: 3640 /* Line 1787 of yacc.c */ 3641 #line 1128 "cc.y" 3642 { 3643 (yyval.lval) = 0; 3644 } 3645 break; 3646 3647 case 213: 3648 /* Line 1787 of yacc.c */ 3649 #line 1132 "cc.y" 3650 { 3651 (yyval.lval) = typebitor((yyvsp[(1) - (2)].lval), (yyvsp[(2) - (2)].lval)); 3652 } 3653 break; 3654 3655 case 218: 3656 /* Line 1787 of yacc.c */ 3657 #line 1144 "cc.y" 3658 { 3659 (yyval.lval) = typebitor((yyvsp[(1) - (2)].lval), (yyvsp[(2) - (2)].lval)); 3660 } 3661 break; 3662 3663 case 221: 3664 /* Line 1787 of yacc.c */ 3665 #line 1154 "cc.y" 3666 { 3667 doenum((yyvsp[(1) - (1)].sym), Z); 3668 } 3669 break; 3670 3671 case 222: 3672 /* Line 1787 of yacc.c */ 3673 #line 1158 "cc.y" 3674 { 3675 doenum((yyvsp[(1) - (3)].sym), (yyvsp[(3) - (3)].node)); 3676 } 3677 break; 3678 3679 case 225: 3680 /* Line 1787 of yacc.c */ 3681 #line 1165 "cc.y" 3682 { (yyval.lval) = BCHAR; } 3683 break; 3684 3685 case 226: 3686 /* Line 1787 of yacc.c */ 3687 #line 1166 "cc.y" 3688 { (yyval.lval) = BSHORT; } 3689 break; 3690 3691 case 227: 3692 /* Line 1787 of yacc.c */ 3693 #line 1167 "cc.y" 3694 { (yyval.lval) = BINT; } 3695 break; 3696 3697 case 228: 3698 /* Line 1787 of yacc.c */ 3699 #line 1168 "cc.y" 3700 { (yyval.lval) = BLONG; } 3701 break; 3702 3703 case 229: 3704 /* Line 1787 of yacc.c */ 3705 #line 1169 "cc.y" 3706 { (yyval.lval) = BSIGNED; } 3707 break; 3708 3709 case 230: 3710 /* Line 1787 of yacc.c */ 3711 #line 1170 "cc.y" 3712 { (yyval.lval) = BUNSIGNED; } 3713 break; 3714 3715 case 231: 3716 /* Line 1787 of yacc.c */ 3717 #line 1171 "cc.y" 3718 { (yyval.lval) = BFLOAT; } 3719 break; 3720 3721 case 232: 3722 /* Line 1787 of yacc.c */ 3723 #line 1172 "cc.y" 3724 { (yyval.lval) = BDOUBLE; } 3725 break; 3726 3727 case 233: 3728 /* Line 1787 of yacc.c */ 3729 #line 1173 "cc.y" 3730 { (yyval.lval) = BVOID; } 3731 break; 3732 3733 case 234: 3734 /* Line 1787 of yacc.c */ 3735 #line 1176 "cc.y" 3736 { (yyval.lval) = BAUTO; } 3737 break; 3738 3739 case 235: 3740 /* Line 1787 of yacc.c */ 3741 #line 1177 "cc.y" 3742 { (yyval.lval) = BSTATIC; } 3743 break; 3744 3745 case 236: 3746 /* Line 1787 of yacc.c */ 3747 #line 1178 "cc.y" 3748 { (yyval.lval) = BEXTERN; } 3749 break; 3750 3751 case 237: 3752 /* Line 1787 of yacc.c */ 3753 #line 1179 "cc.y" 3754 { (yyval.lval) = BTYPEDEF; } 3755 break; 3756 3757 case 238: 3758 /* Line 1787 of yacc.c */ 3759 #line 1180 "cc.y" 3760 { (yyval.lval) = BTYPESTR; } 3761 break; 3762 3763 case 239: 3764 /* Line 1787 of yacc.c */ 3765 #line 1181 "cc.y" 3766 { (yyval.lval) = BREGISTER; } 3767 break; 3768 3769 case 240: 3770 /* Line 1787 of yacc.c */ 3771 #line 1182 "cc.y" 3772 { (yyval.lval) = 0; } 3773 break; 3774 3775 case 241: 3776 /* Line 1787 of yacc.c */ 3777 #line 1185 "cc.y" 3778 { (yyval.lval) = BCONSTNT; } 3779 break; 3780 3781 case 242: 3782 /* Line 1787 of yacc.c */ 3783 #line 1186 "cc.y" 3784 { (yyval.lval) = BVOLATILE; } 3785 break; 3786 3787 case 243: 3788 /* Line 1787 of yacc.c */ 3789 #line 1187 "cc.y" 3790 { (yyval.lval) = 0; } 3791 break; 3792 3793 case 244: 3794 /* Line 1787 of yacc.c */ 3795 #line 1191 "cc.y" 3796 { 3797 (yyval.node) = new(ONAME, Z, Z); 3798 if((yyvsp[(1) - (1)].sym)->class == CLOCAL) 3799 (yyvsp[(1) - (1)].sym) = mkstatic((yyvsp[(1) - (1)].sym)); 3800 (yyval.node)->sym = (yyvsp[(1) - (1)].sym); 3801 (yyval.node)->type = (yyvsp[(1) - (1)].sym)->type; 3802 (yyval.node)->etype = TVOID; 3803 if((yyval.node)->type != T) 3804 (yyval.node)->etype = (yyval.node)->type->etype; 3805 (yyval.node)->xoffset = (yyvsp[(1) - (1)].sym)->offset; 3806 (yyval.node)->class = (yyvsp[(1) - (1)].sym)->class; 3807 (yyvsp[(1) - (1)].sym)->aused = 1; 3808 } 3809 break; 3810 3811 case 245: 3812 /* Line 1787 of yacc.c */ 3813 #line 1206 "cc.y" 3814 { 3815 (yyval.node) = new(ONAME, Z, Z); 3816 (yyval.node)->sym = (yyvsp[(1) - (1)].sym); 3817 (yyval.node)->type = (yyvsp[(1) - (1)].sym)->type; 3818 (yyval.node)->etype = TVOID; 3819 if((yyval.node)->type != T) 3820 (yyval.node)->etype = (yyval.node)->type->etype; 3821 (yyval.node)->xoffset = (yyvsp[(1) - (1)].sym)->offset; 3822 (yyval.node)->class = (yyvsp[(1) - (1)].sym)->class; 3823 } 3824 break; 3825 3826 3827 /* Line 1787 of yacc.c */ 3828 #line 3829 "y.tab.c" 3829 default: break; 3830 } 3831 /* User semantic actions sometimes alter yychar, and that requires 3832 that yytoken be updated with the new translation. We take the 3833 approach of translating immediately before every use of yytoken. 3834 One alternative is translating here after every semantic action, 3835 but that translation would be missed if the semantic action invokes 3836 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or 3837 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an 3838 incorrect destructor might then be invoked immediately. In the 3839 case of YYERROR or YYBACKUP, subsequent parser actions might lead 3840 to an incorrect destructor call or verbose syntax error message 3841 before the lookahead is translated. */ 3842 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 3843 3844 YYPOPSTACK (yylen); 3845 yylen = 0; 3846 YY_STACK_PRINT (yyss, yyssp); 3847 3848 *++yyvsp = yyval; 3849 3850 /* Now `shift' the result of the reduction. Determine what state 3851 that goes to, based on the state we popped back to and the rule 3852 number reduced by. */ 3853 3854 yyn = yyr1[yyn]; 3855 3856 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 3857 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 3858 yystate = yytable[yystate]; 3859 else 3860 yystate = yydefgoto[yyn - YYNTOKENS]; 3861 3862 goto yynewstate; 3863 3864 3865 /*------------------------------------. 3866 | yyerrlab -- here on detecting error | 3867 `------------------------------------*/ 3868 yyerrlab: 3869 /* Make sure we have latest lookahead translation. See comments at 3870 user semantic actions for why this is necessary. */ 3871 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); 3872 3873 /* If not already recovering from an error, report this error. */ 3874 if (!yyerrstatus) 3875 { 3876 ++yynerrs; 3877 #if ! YYERROR_VERBOSE 3878 yyerror (YY_("syntax error")); 3879 #else 3880 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 3881 yyssp, yytoken) 3882 { 3883 char const *yymsgp = YY_("syntax error"); 3884 int yysyntax_error_status; 3885 yysyntax_error_status = YYSYNTAX_ERROR; 3886 if (yysyntax_error_status == 0) 3887 yymsgp = yymsg; 3888 else if (yysyntax_error_status == 1) 3889 { 3890 if (yymsg != yymsgbuf) 3891 YYSTACK_FREE (yymsg); 3892 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); 3893 if (!yymsg) 3894 { 3895 yymsg = yymsgbuf; 3896 yymsg_alloc = sizeof yymsgbuf; 3897 yysyntax_error_status = 2; 3898 } 3899 else 3900 { 3901 yysyntax_error_status = YYSYNTAX_ERROR; 3902 yymsgp = yymsg; 3903 } 3904 } 3905 yyerror (yymsgp); 3906 if (yysyntax_error_status == 2) 3907 goto yyexhaustedlab; 3908 } 3909 # undef YYSYNTAX_ERROR 3910 #endif 3911 } 3912 3913 3914 3915 if (yyerrstatus == 3) 3916 { 3917 /* If just tried and failed to reuse lookahead token after an 3918 error, discard it. */ 3919 3920 if (yychar <= YYEOF) 3921 { 3922 /* Return failure if at end of input. */ 3923 if (yychar == YYEOF) 3924 YYABORT; 3925 } 3926 else 3927 { 3928 yydestruct ("Error: discarding", 3929 yytoken, &yylval); 3930 yychar = YYEMPTY; 3931 } 3932 } 3933 3934 /* Else will try to reuse lookahead token after shifting the error 3935 token. */ 3936 goto yyerrlab1; 3937 3938 3939 /*---------------------------------------------------. 3940 | yyerrorlab -- error raised explicitly by YYERROR. | 3941 `---------------------------------------------------*/ 3942 yyerrorlab: 3943 3944 /* Pacify compilers like GCC when the user code never invokes 3945 YYERROR and the label yyerrorlab therefore never appears in user 3946 code. */ 3947 if (/*CONSTCOND*/ 0) 3948 goto yyerrorlab; 3949 3950 /* Do not reclaim the symbols of the rule which action triggered 3951 this YYERROR. */ 3952 YYPOPSTACK (yylen); 3953 yylen = 0; 3954 YY_STACK_PRINT (yyss, yyssp); 3955 yystate = *yyssp; 3956 goto yyerrlab1; 3957 3958 3959 /*-------------------------------------------------------------. 3960 | yyerrlab1 -- common code for both syntax error and YYERROR. | 3961 `-------------------------------------------------------------*/ 3962 yyerrlab1: 3963 yyerrstatus = 3; /* Each real token shifted decrements this. */ 3964 3965 for (;;) 3966 { 3967 yyn = yypact[yystate]; 3968 if (!yypact_value_is_default (yyn)) 3969 { 3970 yyn += YYTERROR; 3971 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 3972 { 3973 yyn = yytable[yyn]; 3974 if (0 < yyn) 3975 break; 3976 } 3977 } 3978 3979 /* Pop the current state because it cannot handle the error token. */ 3980 if (yyssp == yyss) 3981 YYABORT; 3982 3983 3984 yydestruct ("Error: popping", 3985 yystos[yystate], yyvsp); 3986 YYPOPSTACK (1); 3987 yystate = *yyssp; 3988 YY_STACK_PRINT (yyss, yyssp); 3989 } 3990 3991 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 3992 *++yyvsp = yylval; 3993 YY_IGNORE_MAYBE_UNINITIALIZED_END 3994 3995 3996 /* Shift the error token. */ 3997 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 3998 3999 yystate = yyn; 4000 goto yynewstate; 4001 4002 4003 /*-------------------------------------. 4004 | yyacceptlab -- YYACCEPT comes here. | 4005 `-------------------------------------*/ 4006 yyacceptlab: 4007 yyresult = 0; 4008 goto yyreturn; 4009 4010 /*-----------------------------------. 4011 | yyabortlab -- YYABORT comes here. | 4012 `-----------------------------------*/ 4013 yyabortlab: 4014 yyresult = 1; 4015 goto yyreturn; 4016 4017 #if !defined yyoverflow || YYERROR_VERBOSE 4018 /*-------------------------------------------------. 4019 | yyexhaustedlab -- memory exhaustion comes here. | 4020 `-------------------------------------------------*/ 4021 yyexhaustedlab: 4022 yyerror (YY_("memory exhausted")); 4023 yyresult = 2; 4024 /* Fall through. */ 4025 #endif 4026 4027 yyreturn: 4028 if (yychar != YYEMPTY) 4029 { 4030 /* Make sure we have latest lookahead translation. See comments at 4031 user semantic actions for why this is necessary. */ 4032 yytoken = YYTRANSLATE (yychar); 4033 yydestruct ("Cleanup: discarding lookahead", 4034 yytoken, &yylval); 4035 } 4036 /* Do not reclaim the symbols of the rule which action triggered 4037 this YYABORT or YYACCEPT. */ 4038 YYPOPSTACK (yylen); 4039 YY_STACK_PRINT (yyss, yyssp); 4040 while (yyssp != yyss) 4041 { 4042 yydestruct ("Cleanup: popping", 4043 yystos[*yyssp], yyvsp); 4044 YYPOPSTACK (1); 4045 } 4046 #ifndef yyoverflow 4047 if (yyss != yyssa) 4048 YYSTACK_FREE (yyss); 4049 #endif 4050 #if YYERROR_VERBOSE 4051 if (yymsg != yymsgbuf) 4052 YYSTACK_FREE (yymsg); 4053 #endif 4054 /* Make sure YYID is used. */ 4055 return YYID (yyresult); 4056 } 4057 4058 4059 /* Line 2050 of yacc.c */ 4060 #line 1219 "cc.y" 4061