github.com/xushiwei/go@v0.0.0-20130601165731-2b9d83f45bc9/src/cmd/6a/y.tab.c (about) 1 /* A Bison parser, made by GNU Bison 2.3. */ 2 3 /* Skeleton implementation for Bison's Yacc-like parsers in C 4 5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 6 Free Software Foundation, Inc. 7 8 This program is free software; you can redistribute it and/or modify 9 it under the terms of the GNU General Public License as published by 10 the Free Software Foundation; either version 2, or (at your option) 11 any later version. 12 13 This program is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNU General Public License for more details. 17 18 You should have received a copy of the GNU General Public License 19 along with this program; if not, write to the Free Software 20 Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 Boston, MA 02110-1301, USA. */ 22 23 /* As a special exception, you may create a larger work that contains 24 part or all of the Bison parser skeleton and distribute that work 25 under terms of your choice, so long as that work isn't itself a 26 parser generator using the skeleton or a modified version thereof 27 as a parser skeleton. Alternatively, if you modify or redistribute 28 the parser skeleton itself, you may (at your option) remove this 29 special exception, which will cause the skeleton and the resulting 30 Bison output files to be licensed under the GNU General Public 31 License without this special exception. 32 33 This special exception was added by the Free Software Foundation in 34 version 2.2 of Bison. */ 35 36 /* C LALR(1) parser skeleton written by Richard Stallman, by 37 simplifying the original so-called "semantic" parser. */ 38 39 /* All symbols defined below should begin with yy or YY, to avoid 40 infringing on user name space. This should be done even for local 41 variables, as they might otherwise be expanded by user macros. 42 There are some unavoidable exceptions within include files to 43 define necessary library symbols; they are noted "INFRINGES ON 44 USER NAME SPACE" below. */ 45 46 /* Identify Bison output. */ 47 #define YYBISON 1 48 49 /* Bison version. */ 50 #define YYBISON_VERSION "2.3" 51 52 /* Skeleton name. */ 53 #define YYSKELETON_NAME "yacc.c" 54 55 /* Pure parsers. */ 56 #define YYPURE 0 57 58 /* Using locations. */ 59 #define YYLSP_NEEDED 0 60 61 62 63 /* Tokens. */ 64 #ifndef YYTOKENTYPE 65 # define YYTOKENTYPE 66 /* Put the tokens into the symbol table, so that GDB and other debuggers 67 know about them. */ 68 enum yytokentype { 69 LTYPE0 = 258, 70 LTYPE1 = 259, 71 LTYPE2 = 260, 72 LTYPE3 = 261, 73 LTYPE4 = 262, 74 LTYPEC = 263, 75 LTYPED = 264, 76 LTYPEN = 265, 77 LTYPER = 266, 78 LTYPET = 267, 79 LTYPEG = 268, 80 LTYPES = 269, 81 LTYPEM = 270, 82 LTYPEI = 271, 83 LTYPEXC = 272, 84 LTYPEX = 273, 85 LTYPERT = 274, 86 LCONST = 275, 87 LFP = 276, 88 LPC = 277, 89 LSB = 278, 90 LBREG = 279, 91 LLREG = 280, 92 LSREG = 281, 93 LFREG = 282, 94 LMREG = 283, 95 LXREG = 284, 96 LFCONST = 285, 97 LSCONST = 286, 98 LSP = 287, 99 LNAME = 288, 100 LLAB = 289, 101 LVAR = 290 102 }; 103 #endif 104 /* Tokens. */ 105 #define LTYPE0 258 106 #define LTYPE1 259 107 #define LTYPE2 260 108 #define LTYPE3 261 109 #define LTYPE4 262 110 #define LTYPEC 263 111 #define LTYPED 264 112 #define LTYPEN 265 113 #define LTYPER 266 114 #define LTYPET 267 115 #define LTYPEG 268 116 #define LTYPES 269 117 #define LTYPEM 270 118 #define LTYPEI 271 119 #define LTYPEXC 272 120 #define LTYPEX 273 121 #define LTYPERT 274 122 #define LCONST 275 123 #define LFP 276 124 #define LPC 277 125 #define LSB 278 126 #define LBREG 279 127 #define LLREG 280 128 #define LSREG 281 129 #define LFREG 282 130 #define LMREG 283 131 #define LXREG 284 132 #define LFCONST 285 133 #define LSCONST 286 134 #define LSP 287 135 #define LNAME 288 136 #define LLAB 289 137 #define LVAR 290 138 139 140 141 142 /* Copy the first part of user declarations. */ 143 #line 31 "a.y" 144 145 #include <u.h> 146 #include <stdio.h> /* if we don't, bison will, and a.h re-#defines getc */ 147 #include <libc.h> 148 #include "a.h" 149 150 151 /* Enabling traces. */ 152 #ifndef YYDEBUG 153 # define YYDEBUG 0 154 #endif 155 156 /* Enabling verbose error messages. */ 157 #ifdef YYERROR_VERBOSE 158 # undef YYERROR_VERBOSE 159 # define YYERROR_VERBOSE 1 160 #else 161 # define YYERROR_VERBOSE 0 162 #endif 163 164 /* Enabling the token table. */ 165 #ifndef YYTOKEN_TABLE 166 # define YYTOKEN_TABLE 0 167 #endif 168 169 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 170 typedef union YYSTYPE 171 #line 37 "a.y" 172 { 173 Sym *sym; 174 vlong lval; 175 double dval; 176 char sval[8]; 177 Gen gen; 178 Gen2 gen2; 179 } 180 /* Line 193 of yacc.c. */ 181 #line 182 "y.tab.c" 182 YYSTYPE; 183 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 184 # define YYSTYPE_IS_DECLARED 1 185 # define YYSTYPE_IS_TRIVIAL 1 186 #endif 187 188 189 190 /* Copy the second part of user declarations. */ 191 192 193 /* Line 216 of yacc.c. */ 194 #line 195 "y.tab.c" 195 196 #ifdef short 197 # undef short 198 #endif 199 200 #ifdef YYTYPE_UINT8 201 typedef YYTYPE_UINT8 yytype_uint8; 202 #else 203 typedef unsigned char yytype_uint8; 204 #endif 205 206 #ifdef YYTYPE_INT8 207 typedef YYTYPE_INT8 yytype_int8; 208 #elif (defined __STDC__ || defined __C99__FUNC__ \ 209 || defined __cplusplus || defined _MSC_VER) 210 typedef signed char yytype_int8; 211 #else 212 typedef short int yytype_int8; 213 #endif 214 215 #ifdef YYTYPE_UINT16 216 typedef YYTYPE_UINT16 yytype_uint16; 217 #else 218 typedef unsigned short int yytype_uint16; 219 #endif 220 221 #ifdef YYTYPE_INT16 222 typedef YYTYPE_INT16 yytype_int16; 223 #else 224 typedef short int yytype_int16; 225 #endif 226 227 #ifndef YYSIZE_T 228 # ifdef __SIZE_TYPE__ 229 # define YYSIZE_T __SIZE_TYPE__ 230 # elif defined size_t 231 # define YYSIZE_T size_t 232 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 233 || defined __cplusplus || defined _MSC_VER) 234 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 235 # define YYSIZE_T size_t 236 # else 237 # define YYSIZE_T unsigned int 238 # endif 239 #endif 240 241 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 242 243 #ifndef YY_ 244 # if defined YYENABLE_NLS && YYENABLE_NLS 245 # if ENABLE_NLS 246 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 247 # define YY_(msgid) dgettext ("bison-runtime", msgid) 248 # endif 249 # endif 250 # ifndef YY_ 251 # define YY_(msgid) msgid 252 # endif 253 #endif 254 255 /* Suppress unused-variable warnings by "using" E. */ 256 #if ! defined lint || defined __GNUC__ 257 # define YYUSE(e) ((void) (e)) 258 #else 259 # define YYUSE(e) /* empty */ 260 #endif 261 262 /* Identity function, used to suppress warnings about constant conditions. */ 263 #ifndef lint 264 # define YYID(n) (n) 265 #else 266 #if (defined __STDC__ || defined __C99__FUNC__ \ 267 || defined __cplusplus || defined _MSC_VER) 268 static int 269 YYID (int i) 270 #else 271 static int 272 YYID (i) 273 int i; 274 #endif 275 { 276 return i; 277 } 278 #endif 279 280 #if ! defined yyoverflow || YYERROR_VERBOSE 281 282 /* The parser invokes alloca or malloc; define the necessary symbols. */ 283 284 # ifdef YYSTACK_USE_ALLOCA 285 # if YYSTACK_USE_ALLOCA 286 # ifdef __GNUC__ 287 # define YYSTACK_ALLOC __builtin_alloca 288 # elif defined __BUILTIN_VA_ARG_INCR 289 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 290 # elif defined _AIX 291 # define YYSTACK_ALLOC __alloca 292 # elif defined _MSC_VER 293 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 294 # define alloca _alloca 295 # else 296 # define YYSTACK_ALLOC alloca 297 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 298 || defined __cplusplus || defined _MSC_VER) 299 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 300 # ifndef _STDLIB_H 301 # define _STDLIB_H 1 302 # endif 303 # endif 304 # endif 305 # endif 306 # endif 307 308 # ifdef YYSTACK_ALLOC 309 /* Pacify GCC's `empty if-body' warning. */ 310 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 311 # ifndef YYSTACK_ALLOC_MAXIMUM 312 /* The OS might guarantee only one guard page at the bottom of the stack, 313 and a page size can be as small as 4096 bytes. So we cannot safely 314 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 315 to allow for a few compiler-allocated temporary stack slots. */ 316 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 317 # endif 318 # else 319 # define YYSTACK_ALLOC YYMALLOC 320 # define YYSTACK_FREE YYFREE 321 # ifndef YYSTACK_ALLOC_MAXIMUM 322 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 323 # endif 324 # if (defined __cplusplus && ! defined _STDLIB_H \ 325 && ! ((defined YYMALLOC || defined malloc) \ 326 && (defined YYFREE || defined free))) 327 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 328 # ifndef _STDLIB_H 329 # define _STDLIB_H 1 330 # endif 331 # endif 332 # ifndef YYMALLOC 333 # define YYMALLOC malloc 334 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 335 || defined __cplusplus || defined _MSC_VER) 336 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 337 # endif 338 # endif 339 # ifndef YYFREE 340 # define YYFREE free 341 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 342 || defined __cplusplus || defined _MSC_VER) 343 void free (void *); /* INFRINGES ON USER NAME SPACE */ 344 # endif 345 # endif 346 # endif 347 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 348 349 350 #if (! defined yyoverflow \ 351 && (! defined __cplusplus \ 352 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 353 354 /* A type that is properly aligned for any stack member. */ 355 union yyalloc 356 { 357 yytype_int16 yyss; 358 YYSTYPE yyvs; 359 }; 360 361 /* The size of the maximum gap between one aligned stack and the next. */ 362 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 363 364 /* The size of an array large to enough to hold all stacks, each with 365 N elements. */ 366 # define YYSTACK_BYTES(N) \ 367 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 368 + YYSTACK_GAP_MAXIMUM) 369 370 /* Copy COUNT objects from FROM to TO. The source and destination do 371 not overlap. */ 372 # ifndef YYCOPY 373 # if defined __GNUC__ && 1 < __GNUC__ 374 # define YYCOPY(To, From, Count) \ 375 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 376 # else 377 # define YYCOPY(To, From, Count) \ 378 do \ 379 { \ 380 YYSIZE_T yyi; \ 381 for (yyi = 0; yyi < (Count); yyi++) \ 382 (To)[yyi] = (From)[yyi]; \ 383 } \ 384 while (YYID (0)) 385 # endif 386 # endif 387 388 /* Relocate STACK from its old location to the new one. The 389 local variables YYSIZE and YYSTACKSIZE give the old and new number of 390 elements in the stack, and YYPTR gives the new location of the 391 stack. Advance YYPTR to a properly aligned location for the next 392 stack. */ 393 # define YYSTACK_RELOCATE(Stack) \ 394 do \ 395 { \ 396 YYSIZE_T yynewbytes; \ 397 YYCOPY (&yyptr->Stack, Stack, yysize); \ 398 Stack = &yyptr->Stack; \ 399 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 400 yyptr += yynewbytes / sizeof (*yyptr); \ 401 } \ 402 while (YYID (0)) 403 404 #endif 405 406 /* YYFINAL -- State number of the termination state. */ 407 #define YYFINAL 2 408 /* YYLAST -- Last index in YYTABLE. */ 409 #define YYLAST 554 410 411 /* YYNTOKENS -- Number of terminals. */ 412 #define YYNTOKENS 54 413 /* YYNNTS -- Number of nonterminals. */ 414 #define YYNNTS 40 415 /* YYNRULES -- Number of rules. */ 416 #define YYNRULES 132 417 /* YYNRULES -- Number of states. */ 418 #define YYNSTATES 263 419 420 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 421 #define YYUNDEFTOK 2 422 #define YYMAXUTOK 290 423 424 #define YYTRANSLATE(YYX) \ 425 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 426 427 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 428 static const yytype_uint8 yytranslate[] = 429 { 430 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 431 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 432 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 433 2, 2, 2, 2, 2, 2, 52, 12, 5, 2, 434 50, 51, 10, 8, 49, 9, 2, 11, 2, 2, 435 2, 2, 2, 2, 2, 2, 2, 2, 46, 47, 436 6, 48, 7, 2, 2, 2, 2, 2, 2, 2, 437 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 438 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 439 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 440 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 441 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 442 2, 2, 2, 2, 3, 2, 53, 2, 2, 2, 443 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 444 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 445 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 446 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 447 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 448 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 449 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 450 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 451 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 452 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 453 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 454 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 455 2, 2, 2, 2, 2, 2, 1, 2, 13, 14, 456 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 457 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 458 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 459 45 460 }; 461 462 #if YYDEBUG 463 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 464 YYRHS. */ 465 static const yytype_uint16 yyprhs[] = 466 { 467 0, 0, 3, 4, 5, 9, 10, 15, 16, 21, 468 23, 26, 29, 33, 37, 40, 43, 46, 49, 52, 469 55, 58, 61, 64, 67, 70, 73, 76, 79, 82, 470 85, 88, 89, 91, 95, 99, 102, 104, 107, 109, 471 112, 114, 118, 124, 128, 134, 137, 139, 141, 143, 472 147, 153, 157, 163, 166, 168, 172, 178, 184, 185, 473 187, 191, 197, 199, 201, 203, 205, 208, 211, 213, 474 215, 217, 219, 224, 227, 230, 232, 234, 236, 238, 475 240, 242, 244, 247, 250, 253, 256, 259, 264, 270, 476 274, 276, 278, 280, 285, 290, 295, 302, 312, 316, 477 320, 326, 335, 337, 344, 350, 358, 359, 362, 365, 478 367, 369, 371, 373, 375, 378, 381, 384, 388, 390, 479 393, 397, 402, 404, 408, 412, 416, 420, 424, 429, 480 434, 438, 442 481 }; 482 483 /* YYRHS -- A `-1'-separated list of the rules' RHS. */ 484 static const yytype_int8 yyrhs[] = 485 { 486 55, 0, -1, -1, -1, 55, 56, 57, -1, -1, 487 44, 46, 58, 57, -1, -1, 43, 46, 59, 57, 488 -1, 47, -1, 60, 47, -1, 1, 47, -1, 43, 489 48, 93, -1, 45, 48, 93, -1, 13, 61, -1, 490 14, 65, -1, 15, 64, -1, 16, 62, -1, 17, 491 63, -1, 21, 66, -1, 19, 67, -1, 22, 68, 492 -1, 18, 69, -1, 20, 70, -1, 24, 71, -1, 493 25, 72, -1, 26, 73, -1, 27, 74, -1, 28, 494 75, -1, 29, 76, -1, 23, 77, -1, -1, 49, 495 -1, 80, 49, 78, -1, 78, 49, 80, -1, 80, 496 49, -1, 80, -1, 49, 78, -1, 78, -1, 49, 497 81, -1, 81, -1, 84, 49, 81, -1, 88, 11, 498 91, 49, 84, -1, 85, 49, 83, -1, 85, 49, 499 91, 49, 83, -1, 49, 79, -1, 79, -1, 61, 500 -1, 65, -1, 80, 49, 78, -1, 80, 49, 78, 501 46, 35, -1, 80, 49, 78, -1, 80, 49, 78, 502 46, 36, -1, 80, 49, -1, 80, -1, 80, 49, 503 78, -1, 82, 49, 78, 49, 91, -1, 84, 49, 504 78, 49, 82, -1, -1, 84, -1, 85, 49, 84, 505 -1, 85, 49, 91, 49, 84, -1, 82, -1, 85, 506 -1, 81, -1, 87, -1, 10, 82, -1, 10, 86, 507 -1, 82, -1, 86, -1, 78, -1, 84, -1, 91, 508 50, 32, 51, -1, 43, 89, -1, 44, 89, -1, 509 34, -1, 37, -1, 35, -1, 38, -1, 42, -1, 510 36, -1, 39, -1, 52, 92, -1, 52, 91, -1, 511 52, 88, -1, 52, 41, -1, 52, 40, -1, 52, 512 50, 40, 51, -1, 52, 50, 9, 40, 51, -1, 513 52, 9, 40, -1, 86, -1, 87, -1, 91, -1, 514 91, 50, 35, 51, -1, 91, 50, 42, 51, -1, 515 91, 50, 36, 51, -1, 91, 50, 35, 10, 91, 516 51, -1, 91, 50, 35, 51, 50, 35, 10, 91, 517 51, -1, 50, 35, 51, -1, 50, 42, 51, -1, 518 50, 35, 10, 91, 51, -1, 50, 35, 51, 50, 519 35, 10, 91, 51, -1, 88, -1, 88, 50, 35, 520 10, 91, 51, -1, 43, 89, 50, 90, 51, -1, 521 43, 6, 7, 89, 50, 33, 51, -1, -1, 8, 522 91, -1, 9, 91, -1, 33, -1, 42, -1, 31, 523 -1, 30, -1, 45, -1, 9, 91, -1, 8, 91, 524 -1, 53, 91, -1, 50, 93, 51, -1, 30, -1, 525 9, 30, -1, 30, 9, 30, -1, 9, 30, 9, 526 30, -1, 91, -1, 93, 8, 93, -1, 93, 9, 527 93, -1, 93, 10, 93, -1, 93, 11, 93, -1, 528 93, 12, 93, -1, 93, 6, 6, 93, -1, 93, 529 7, 7, 93, -1, 93, 5, 93, -1, 93, 4, 530 93, -1, 93, 3, 93, -1 531 }; 532 533 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 534 static const yytype_uint16 yyrline[] = 535 { 536 0, 64, 64, 66, 65, 73, 72, 80, 79, 85, 537 86, 87, 90, 95, 101, 102, 103, 104, 105, 106, 538 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 539 117, 120, 124, 131, 138, 145, 150, 157, 162, 169, 540 174, 179, 186, 194, 199, 207, 212, 219, 220, 223, 541 228, 238, 243, 253, 258, 263, 270, 278, 288, 292, 542 299, 304, 312, 313, 316, 317, 318, 322, 326, 327, 543 330, 331, 334, 340, 349, 358, 363, 368, 373, 378, 544 383, 388, 394, 402, 408, 419, 425, 431, 437, 443, 545 451, 452, 455, 461, 467, 473, 479, 488, 497, 502, 546 507, 515, 525, 529, 538, 545, 554, 557, 561, 567, 547 568, 572, 575, 576, 580, 584, 588, 592, 598, 602, 548 606, 611, 618, 619, 623, 627, 631, 635, 639, 643, 549 647, 651, 655 550 }; 551 #endif 552 553 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 554 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 555 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 556 static const char *const yytname[] = 557 { 558 "$end", "error", "$undefined", "'|'", "'^'", "'&'", "'<'", "'>'", "'+'", 559 "'-'", "'*'", "'/'", "'%'", "LTYPE0", "LTYPE1", "LTYPE2", "LTYPE3", 560 "LTYPE4", "LTYPEC", "LTYPED", "LTYPEN", "LTYPER", "LTYPET", "LTYPEG", 561 "LTYPES", "LTYPEM", "LTYPEI", "LTYPEXC", "LTYPEX", "LTYPERT", "LCONST", 562 "LFP", "LPC", "LSB", "LBREG", "LLREG", "LSREG", "LFREG", "LMREG", 563 "LXREG", "LFCONST", "LSCONST", "LSP", "LNAME", "LLAB", "LVAR", "':'", 564 "';'", "'='", "','", "'('", "')'", "'$'", "'~'", "$accept", "prog", "@1", 565 "line", "@2", "@3", "inst", "nonnon", "rimrem", "remrim", "rimnon", 566 "nonrem", "nonrel", "spec1", "spec2", "spec3", "spec4", "spec5", "spec6", 567 "spec7", "spec8", "spec9", "spec10", "spec11", "rem", "rom", "rim", 568 "rel", "reg", "imm2", "imm", "mem", "omem", "nmem", "nam", "offset", 569 "pointer", "con", "con2", "expr", 0 570 }; 571 #endif 572 573 # ifdef YYPRINT 574 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 575 token YYLEX-NUM. */ 576 static const yytype_uint16 yytoknum[] = 577 { 578 0, 256, 257, 124, 94, 38, 60, 62, 43, 45, 579 42, 47, 37, 258, 259, 260, 261, 262, 263, 264, 580 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 581 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 582 285, 286, 287, 288, 289, 290, 58, 59, 61, 44, 583 40, 41, 36, 126 584 }; 585 # endif 586 587 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 588 static const yytype_uint8 yyr1[] = 589 { 590 0, 54, 55, 56, 55, 58, 57, 59, 57, 57, 591 57, 57, 60, 60, 60, 60, 60, 60, 60, 60, 592 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 593 60, 61, 61, 62, 63, 64, 64, 65, 65, 66, 594 66, 66, 67, 68, 68, 69, 69, 70, 70, 71, 595 71, 72, 72, 73, 73, 73, 74, 75, 76, 76, 596 77, 77, 78, 78, 79, 79, 79, 79, 79, 79, 597 80, 80, 81, 81, 81, 82, 82, 82, 82, 82, 598 82, 82, 83, 84, 84, 84, 84, 84, 84, 84, 599 85, 85, 86, 86, 86, 86, 86, 86, 86, 86, 600 86, 86, 87, 87, 88, 88, 89, 89, 89, 90, 601 90, 90, 91, 91, 91, 91, 91, 91, 92, 92, 602 92, 92, 93, 93, 93, 93, 93, 93, 93, 93, 603 93, 93, 93 604 }; 605 606 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 607 static const yytype_uint8 yyr2[] = 608 { 609 0, 2, 0, 0, 3, 0, 4, 0, 4, 1, 610 2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 611 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 612 2, 0, 1, 3, 3, 2, 1, 2, 1, 2, 613 1, 3, 5, 3, 5, 2, 1, 1, 1, 3, 614 5, 3, 5, 2, 1, 3, 5, 5, 0, 1, 615 3, 5, 1, 1, 1, 1, 2, 2, 1, 1, 616 1, 1, 4, 2, 2, 1, 1, 1, 1, 1, 617 1, 1, 2, 2, 2, 2, 2, 4, 5, 3, 618 1, 1, 1, 4, 4, 4, 6, 9, 3, 3, 619 5, 8, 1, 6, 5, 7, 0, 2, 2, 1, 620 1, 1, 1, 1, 2, 2, 2, 3, 1, 2, 621 3, 4, 1, 3, 3, 3, 3, 3, 4, 4, 622 3, 3, 3 623 }; 624 625 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 626 STATE-NUM when YYTABLE doesn't specify something else to do. Zero 627 means the default is an error. */ 628 static const yytype_uint8 yydefact[] = 629 { 630 2, 3, 1, 0, 0, 31, 0, 0, 0, 0, 631 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 632 0, 58, 0, 0, 0, 9, 4, 0, 11, 32, 633 14, 0, 0, 112, 75, 77, 80, 76, 78, 81, 634 79, 106, 113, 0, 0, 0, 15, 38, 62, 63, 635 90, 91, 102, 92, 0, 16, 70, 36, 71, 17, 636 0, 18, 0, 0, 106, 106, 0, 22, 46, 64, 637 68, 69, 65, 92, 20, 0, 32, 47, 48, 23, 638 106, 0, 0, 19, 40, 0, 0, 21, 0, 30, 639 0, 24, 0, 25, 0, 26, 54, 27, 0, 28, 640 0, 29, 59, 7, 0, 5, 0, 10, 115, 114, 641 0, 0, 0, 0, 37, 0, 0, 122, 0, 116, 642 0, 0, 0, 86, 85, 0, 84, 83, 35, 0, 643 0, 66, 67, 73, 74, 45, 0, 0, 73, 39, 644 0, 0, 0, 0, 0, 0, 53, 0, 0, 0, 645 12, 0, 13, 106, 107, 108, 0, 0, 98, 99, 646 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 647 117, 0, 0, 0, 0, 89, 0, 0, 33, 34, 648 0, 0, 41, 0, 43, 0, 60, 0, 49, 51, 649 55, 0, 0, 8, 6, 0, 111, 109, 110, 0, 650 0, 0, 132, 131, 130, 0, 0, 123, 124, 125, 651 126, 127, 0, 0, 93, 95, 94, 0, 87, 72, 652 0, 0, 118, 82, 0, 0, 0, 0, 0, 0, 653 0, 104, 100, 0, 128, 129, 0, 0, 0, 88, 654 42, 119, 0, 44, 61, 50, 52, 56, 57, 0, 655 0, 103, 96, 0, 0, 120, 105, 0, 0, 121, 656 101, 0, 97 657 }; 658 659 /* YYDEFGOTO[NTERM-NUM]. */ 660 static const yytype_int16 yydefgoto[] = 661 { 662 -1, 1, 3, 26, 151, 149, 27, 30, 59, 61, 663 55, 46, 83, 74, 87, 67, 79, 91, 93, 95, 664 97, 99, 101, 89, 56, 68, 57, 69, 48, 184, 665 58, 49, 50, 51, 52, 113, 199, 53, 223, 118 666 }; 667 668 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 669 STATE-NUM. */ 670 #define YYPACT_NINF -97 671 static const yytype_int16 yypact[] = 672 { 673 -97, 40, -97, 208, 5, -4, 140, 295, 295, 343, 674 233, 15, 319, 381, 91, 91, 295, 295, 295, 222, 675 24, 24, -15, 22, 14, -97, -97, 30, -97, -97, 676 -97, 486, 486, -97, -97, -97, -97, -97, -97, -97, 677 -97, 42, -97, 343, 406, 486, -97, -97, -97, -97, 678 -97, -97, 45, 48, 399, -97, -97, 20, -97, -97, 679 67, -97, 68, 367, 42, 19, 271, -97, -97, -97, 680 -97, -97, -97, 87, -97, 127, 343, -97, -97, -97, 681 19, 437, 486, -97, -97, 90, 92, -97, 94, -97, 682 96, -97, 104, -97, 105, -97, 111, -97, 118, -97, 683 119, -97, -97, -97, 486, -97, 486, -97, -97, -97, 684 133, 486, 486, 121, -97, 8, 122, -97, 80, -97, 685 134, 78, 413, -97, -97, 446, -97, -97, -97, 343, 686 295, -97, -97, 121, -97, -97, 7, 486, -97, -97, 687 437, 148, 453, 462, 343, 343, 343, 343, 343, 208, 688 284, 208, 284, 19, -97, -97, -1, 486, 131, -97, 689 486, 486, 486, 166, 177, 486, 486, 486, 486, 486, 690 -97, 176, 10, 136, 137, -97, 480, 141, -97, -97, 691 143, 142, -97, 16, -97, 149, -97, 150, 151, 154, 692 -97, 152, 155, -97, -97, 156, -97, -97, -97, 157, 693 159, 170, 99, 535, 542, 486, 486, 26, 26, -97, 694 -97, -97, 486, 486, 161, -97, -97, 162, -97, -97, 695 24, 184, 198, -97, 163, 24, 181, 183, 486, 222, 696 205, -97, -97, 229, 114, 114, 193, 194, 211, -97, 697 -97, 238, 219, -97, -97, -97, -97, -97, -97, 199, 698 486, -97, -97, 244, 232, -97, -97, 214, 486, -97, 699 -97, 215, -97 700 }; 701 702 /* YYPGOTO[NTERM-NUM]. */ 703 static const yytype_int16 yypgoto[] = 704 { 705 -97, -97, -97, -96, -97, -97, -97, 261, -97, -97, 706 -97, 262, -97, -97, -97, -97, -97, -97, -97, -97, 707 -97, -97, -97, -97, 17, 218, -2, -11, -9, 61, 708 -8, 51, 1, -3, -7, -56, -97, -10, -97, -87 709 }; 710 711 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 712 positive, shift that token. If negative, reduce the rule which 713 number is the opposite. If zero, do what YYDEFACT says. 714 If YYTABLE_NINF, syntax error. */ 715 #define YYTABLE_NINF -1 716 static const yytype_uint16 yytable[] = 717 { 718 73, 70, 84, 86, 75, 85, 60, 72, 133, 134, 719 98, 71, 100, 102, 92, 94, 96, 150, 157, 152, 720 213, 108, 109, 47, 138, 221, 62, 111, 112, 47, 721 196, 103, 197, 104, 117, 119, 167, 168, 169, 180, 722 2, 198, 172, 173, 127, 29, 222, 126, 110, 174, 723 111, 112, 28, 193, 131, 194, 73, 70, 41, 158, 724 114, 214, 106, 72, 132, 88, 90, 71, 105, 128, 725 139, 86, 117, 202, 203, 204, 54, 107, 207, 208, 726 209, 210, 211, 160, 161, 162, 163, 164, 165, 166, 727 167, 168, 169, 114, 117, 120, 117, 195, 121, 31, 728 32, 154, 155, 161, 162, 163, 164, 165, 166, 167, 729 168, 169, 109, 172, 173, 117, 129, 130, 234, 235, 730 174, 33, 165, 166, 167, 168, 169, 181, 179, 182, 731 86, 170, 185, 187, 41, 186, 42, 136, 137, 140, 732 153, 44, 141, 142, 45, 143, 178, 200, 31, 32, 733 117, 117, 117, 144, 145, 117, 117, 117, 117, 117, 734 146, 188, 189, 190, 191, 192, 109, 147, 148, 171, 735 33, 156, 205, 159, 34, 35, 36, 37, 38, 39, 736 180, 201, 40, 41, 206, 42, 212, 215, 216, 43, 737 44, 220, 218, 45, 219, 117, 117, 226, 224, 225, 738 227, 228, 236, 237, 229, 233, 230, 242, 231, 4, 739 232, 238, 240, 239, 241, 183, 245, 244, 247, 246, 740 248, 5, 6, 7, 8, 9, 10, 11, 12, 13, 741 14, 15, 16, 17, 18, 19, 20, 21, 249, 250, 742 257, 31, 32, 63, 251, 252, 253, 254, 261, 255, 743 256, 22, 23, 24, 258, 25, 34, 35, 36, 37, 744 38, 39, 259, 33, 40, 260, 262, 34, 35, 36, 745 37, 38, 39, 77, 78, 40, 64, 65, 42, 31, 746 32, 63, 66, 44, 135, 243, 45, 160, 161, 162, 747 163, 164, 165, 166, 167, 168, 169, 0, 0, 0, 748 0, 33, 0, 31, 32, 34, 35, 36, 37, 38, 749 39, 0, 0, 40, 64, 65, 42, 0, 0, 0, 750 0, 44, 0, 0, 45, 33, 0, 31, 32, 34, 751 35, 36, 37, 38, 39, 0, 0, 40, 41, 0, 752 42, 0, 0, 0, 0, 44, 0, 54, 45, 33, 753 0, 31, 32, 34, 35, 36, 37, 38, 39, 0, 754 0, 40, 41, 0, 42, 0, 0, 0, 76, 44, 755 0, 0, 45, 33, 0, 31, 32, 34, 35, 36, 756 37, 38, 39, 0, 0, 40, 41, 0, 42, 31, 757 32, 0, 0, 44, 0, 0, 45, 33, 0, 0, 758 0, 34, 35, 36, 37, 38, 39, 31, 122, 40, 759 0, 33, 42, 0, 31, 32, 0, 44, 0, 0, 760 45, 31, 32, 0, 80, 65, 42, 0, 0, 33, 761 81, 82, 0, 54, 45, 0, 33, 0, 0, 123, 762 124, 115, 41, 33, 42, 31, 32, 0, 116, 125, 763 0, 42, 45, 175, 31, 176, 82, 0, 42, 45, 764 0, 31, 32, 82, 0, 0, 45, 33, 0, 0, 765 31, 32, 0, 0, 0, 0, 33, 0, 0, 0, 766 80, 65, 42, 33, 0, 0, 177, 82, 31, 32, 767 45, 42, 33, 0, 31, 32, 82, 0, 42, 45, 768 0, 0, 0, 82, 0, 183, 45, 42, 0, 0, 769 33, 0, 82, 0, 54, 45, 33, 0, 0, 0, 770 217, 0, 0, 0, 0, 42, 0, 0, 0, 0, 771 82, 42, 0, 45, 0, 0, 82, 0, 0, 45, 772 162, 163, 164, 165, 166, 167, 168, 169, 163, 164, 773 165, 166, 167, 168, 169 774 }; 775 776 static const yytype_int16 yycheck[] = 777 { 778 10, 10, 13, 13, 11, 13, 8, 10, 64, 65, 779 19, 10, 20, 21, 16, 17, 18, 104, 10, 106, 780 10, 31, 32, 6, 80, 9, 9, 8, 9, 12, 781 31, 46, 33, 48, 44, 45, 10, 11, 12, 32, 782 0, 42, 35, 36, 54, 49, 30, 54, 6, 42, 783 8, 9, 47, 149, 63, 151, 66, 66, 43, 51, 784 43, 51, 48, 66, 63, 14, 15, 66, 46, 49, 785 81, 81, 82, 160, 161, 162, 52, 47, 165, 166, 786 167, 168, 169, 3, 4, 5, 6, 7, 8, 9, 787 10, 11, 12, 76, 104, 50, 106, 153, 50, 8, 788 9, 111, 112, 4, 5, 6, 7, 8, 9, 10, 789 11, 12, 122, 35, 36, 125, 49, 49, 205, 206, 790 42, 30, 8, 9, 10, 11, 12, 137, 130, 140, 791 140, 51, 142, 143, 43, 143, 45, 50, 11, 49, 792 7, 50, 50, 49, 53, 49, 129, 157, 8, 9, 793 160, 161, 162, 49, 49, 165, 166, 167, 168, 169, 794 49, 144, 145, 146, 147, 148, 176, 49, 49, 35, 795 30, 50, 6, 51, 34, 35, 36, 37, 38, 39, 796 32, 50, 42, 43, 7, 45, 10, 51, 51, 49, 797 50, 49, 51, 53, 51, 205, 206, 46, 49, 49, 798 46, 49, 212, 213, 49, 35, 50, 9, 51, 1, 799 51, 50, 220, 51, 30, 52, 35, 225, 228, 36, 800 229, 13, 14, 15, 16, 17, 18, 19, 20, 21, 801 22, 23, 24, 25, 26, 27, 28, 29, 33, 10, 802 250, 8, 9, 10, 51, 51, 35, 9, 258, 30, 803 51, 43, 44, 45, 10, 47, 34, 35, 36, 37, 804 38, 39, 30, 30, 42, 51, 51, 34, 35, 36, 805 37, 38, 39, 12, 12, 42, 43, 44, 45, 8, 806 9, 10, 49, 50, 66, 224, 53, 3, 4, 5, 807 6, 7, 8, 9, 10, 11, 12, -1, -1, -1, 808 -1, 30, -1, 8, 9, 34, 35, 36, 37, 38, 809 39, -1, -1, 42, 43, 44, 45, -1, -1, -1, 810 -1, 50, -1, -1, 53, 30, -1, 8, 9, 34, 811 35, 36, 37, 38, 39, -1, -1, 42, 43, -1, 812 45, -1, -1, -1, -1, 50, -1, 52, 53, 30, 813 -1, 8, 9, 34, 35, 36, 37, 38, 39, -1, 814 -1, 42, 43, -1, 45, -1, -1, -1, 49, 50, 815 -1, -1, 53, 30, -1, 8, 9, 34, 35, 36, 816 37, 38, 39, -1, -1, 42, 43, -1, 45, 8, 817 9, -1, -1, 50, -1, -1, 53, 30, -1, -1, 818 -1, 34, 35, 36, 37, 38, 39, 8, 9, 42, 819 -1, 30, 45, -1, 8, 9, -1, 50, -1, -1, 820 53, 8, 9, -1, 43, 44, 45, -1, -1, 30, 821 49, 50, -1, 52, 53, -1, 30, -1, -1, 40, 822 41, 35, 43, 30, 45, 8, 9, -1, 42, 50, 823 -1, 45, 53, 40, 8, 9, 50, -1, 45, 53, 824 -1, 8, 9, 50, -1, -1, 53, 30, -1, -1, 825 8, 9, -1, -1, -1, -1, 30, -1, -1, -1, 826 43, 44, 45, 30, -1, -1, 40, 50, 8, 9, 827 53, 45, 30, -1, 8, 9, 50, -1, 45, 53, 828 -1, -1, -1, 50, -1, 52, 53, 45, -1, -1, 829 30, -1, 50, -1, 52, 53, 30, -1, -1, -1, 830 40, -1, -1, -1, -1, 45, -1, -1, -1, -1, 831 50, 45, -1, 53, -1, -1, 50, -1, -1, 53, 832 5, 6, 7, 8, 9, 10, 11, 12, 6, 7, 833 8, 9, 10, 11, 12 834 }; 835 836 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 837 symbol of state STATE-NUM. */ 838 static const yytype_uint8 yystos[] = 839 { 840 0, 55, 0, 56, 1, 13, 14, 15, 16, 17, 841 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 842 28, 29, 43, 44, 45, 47, 57, 60, 47, 49, 843 61, 8, 9, 30, 34, 35, 36, 37, 38, 39, 844 42, 43, 45, 49, 50, 53, 65, 78, 82, 85, 845 86, 87, 88, 91, 52, 64, 78, 80, 84, 62, 846 80, 63, 78, 10, 43, 44, 49, 69, 79, 81, 847 82, 86, 87, 91, 67, 88, 49, 61, 65, 70, 848 43, 49, 50, 66, 81, 84, 91, 68, 85, 77, 849 85, 71, 80, 72, 80, 73, 80, 74, 82, 75, 850 84, 76, 84, 46, 48, 46, 48, 47, 91, 91, 851 6, 8, 9, 89, 78, 35, 42, 91, 93, 91, 852 50, 50, 9, 40, 41, 50, 88, 91, 49, 49, 853 49, 82, 86, 89, 89, 79, 50, 11, 89, 81, 854 49, 50, 49, 49, 49, 49, 49, 49, 49, 59, 855 93, 58, 93, 7, 91, 91, 50, 10, 51, 51, 856 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 857 51, 35, 35, 36, 42, 40, 9, 40, 78, 80, 858 32, 91, 81, 52, 83, 91, 84, 91, 78, 78, 859 78, 78, 78, 57, 57, 89, 31, 33, 42, 90, 860 91, 50, 93, 93, 93, 6, 7, 93, 93, 93, 861 93, 93, 10, 10, 51, 51, 51, 40, 51, 51, 862 49, 9, 30, 92, 49, 49, 46, 46, 49, 49, 863 50, 51, 51, 35, 93, 93, 91, 91, 50, 51, 864 84, 30, 9, 83, 84, 35, 36, 91, 82, 33, 865 10, 51, 51, 35, 9, 30, 51, 91, 10, 30, 866 51, 91, 51 867 }; 868 869 #define yyerrok (yyerrstatus = 0) 870 #define yyclearin (yychar = YYEMPTY) 871 #define YYEMPTY (-2) 872 #define YYEOF 0 873 874 #define YYACCEPT goto yyacceptlab 875 #define YYABORT goto yyabortlab 876 #define YYERROR goto yyerrorlab 877 878 879 /* Like YYERROR except do call yyerror. This remains here temporarily 880 to ease the transition to the new meaning of YYERROR, for GCC. 881 Once GCC version 2 has supplanted version 1, this can go. */ 882 883 #define YYFAIL goto yyerrlab 884 885 #define YYRECOVERING() (!!yyerrstatus) 886 887 #define YYBACKUP(Token, Value) \ 888 do \ 889 if (yychar == YYEMPTY && yylen == 1) \ 890 { \ 891 yychar = (Token); \ 892 yylval = (Value); \ 893 yytoken = YYTRANSLATE (yychar); \ 894 YYPOPSTACK (1); \ 895 goto yybackup; \ 896 } \ 897 else \ 898 { \ 899 yyerror (YY_("syntax error: cannot back up")); \ 900 YYERROR; \ 901 } \ 902 while (YYID (0)) 903 904 905 #define YYTERROR 1 906 #define YYERRCODE 256 907 908 909 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 910 If N is 0, then set CURRENT to the empty location which ends 911 the previous symbol: RHS[0] (always defined). */ 912 913 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 914 #ifndef YYLLOC_DEFAULT 915 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 916 do \ 917 if (YYID (N)) \ 918 { \ 919 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 920 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 921 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 922 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 923 } \ 924 else \ 925 { \ 926 (Current).first_line = (Current).last_line = \ 927 YYRHSLOC (Rhs, 0).last_line; \ 928 (Current).first_column = (Current).last_column = \ 929 YYRHSLOC (Rhs, 0).last_column; \ 930 } \ 931 while (YYID (0)) 932 #endif 933 934 935 /* YY_LOCATION_PRINT -- Print the location on the stream. 936 This macro was not mandated originally: define only if we know 937 we won't break user code: when these are the locations we know. */ 938 939 #ifndef YY_LOCATION_PRINT 940 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL 941 # define YY_LOCATION_PRINT(File, Loc) \ 942 fprintf (File, "%d.%d-%d.%d", \ 943 (Loc).first_line, (Loc).first_column, \ 944 (Loc).last_line, (Loc).last_column) 945 # else 946 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 947 # endif 948 #endif 949 950 951 /* YYLEX -- calling `yylex' with the right arguments. */ 952 953 #ifdef YYLEX_PARAM 954 # define YYLEX yylex (YYLEX_PARAM) 955 #else 956 # define YYLEX yylex () 957 #endif 958 959 /* Enable debugging if requested. */ 960 #if YYDEBUG 961 962 # ifndef YYFPRINTF 963 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 964 # define YYFPRINTF fprintf 965 # endif 966 967 # define YYDPRINTF(Args) \ 968 do { \ 969 if (yydebug) \ 970 YYFPRINTF Args; \ 971 } while (YYID (0)) 972 973 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 974 do { \ 975 if (yydebug) \ 976 { \ 977 YYFPRINTF (stderr, "%s ", Title); \ 978 yy_symbol_print (stderr, \ 979 Type, Value); \ 980 YYFPRINTF (stderr, "\n"); \ 981 } \ 982 } while (YYID (0)) 983 984 985 /*--------------------------------. 986 | Print this symbol on YYOUTPUT. | 987 `--------------------------------*/ 988 989 /*ARGSUSED*/ 990 #if (defined __STDC__ || defined __C99__FUNC__ \ 991 || defined __cplusplus || defined _MSC_VER) 992 static void 993 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 994 #else 995 static void 996 yy_symbol_value_print (yyoutput, yytype, yyvaluep) 997 FILE *yyoutput; 998 int yytype; 999 YYSTYPE const * const yyvaluep; 1000 #endif 1001 { 1002 if (!yyvaluep) 1003 return; 1004 # ifdef YYPRINT 1005 if (yytype < YYNTOKENS) 1006 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 1007 # else 1008 YYUSE (yyoutput); 1009 # endif 1010 switch (yytype) 1011 { 1012 default: 1013 break; 1014 } 1015 } 1016 1017 1018 /*--------------------------------. 1019 | Print this symbol on YYOUTPUT. | 1020 `--------------------------------*/ 1021 1022 #if (defined __STDC__ || defined __C99__FUNC__ \ 1023 || defined __cplusplus || defined _MSC_VER) 1024 static void 1025 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 1026 #else 1027 static void 1028 yy_symbol_print (yyoutput, yytype, yyvaluep) 1029 FILE *yyoutput; 1030 int yytype; 1031 YYSTYPE const * const yyvaluep; 1032 #endif 1033 { 1034 if (yytype < YYNTOKENS) 1035 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 1036 else 1037 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 1038 1039 yy_symbol_value_print (yyoutput, yytype, yyvaluep); 1040 YYFPRINTF (yyoutput, ")"); 1041 } 1042 1043 /*------------------------------------------------------------------. 1044 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 1045 | TOP (included). | 1046 `------------------------------------------------------------------*/ 1047 1048 #if (defined __STDC__ || defined __C99__FUNC__ \ 1049 || defined __cplusplus || defined _MSC_VER) 1050 static void 1051 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) 1052 #else 1053 static void 1054 yy_stack_print (bottom, top) 1055 yytype_int16 *bottom; 1056 yytype_int16 *top; 1057 #endif 1058 { 1059 YYFPRINTF (stderr, "Stack now"); 1060 for (; bottom <= top; ++bottom) 1061 YYFPRINTF (stderr, " %d", *bottom); 1062 YYFPRINTF (stderr, "\n"); 1063 } 1064 1065 # define YY_STACK_PRINT(Bottom, Top) \ 1066 do { \ 1067 if (yydebug) \ 1068 yy_stack_print ((Bottom), (Top)); \ 1069 } while (YYID (0)) 1070 1071 1072 /*------------------------------------------------. 1073 | Report that the YYRULE is going to be reduced. | 1074 `------------------------------------------------*/ 1075 1076 #if (defined __STDC__ || defined __C99__FUNC__ \ 1077 || defined __cplusplus || defined _MSC_VER) 1078 static void 1079 yy_reduce_print (YYSTYPE *yyvsp, int yyrule) 1080 #else 1081 static void 1082 yy_reduce_print (yyvsp, yyrule) 1083 YYSTYPE *yyvsp; 1084 int yyrule; 1085 #endif 1086 { 1087 int yynrhs = yyr2[yyrule]; 1088 int yyi; 1089 unsigned long int yylno = yyrline[yyrule]; 1090 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 1091 yyrule - 1, yylno); 1092 /* The symbols being reduced. */ 1093 for (yyi = 0; yyi < yynrhs; yyi++) 1094 { 1095 fprintf (stderr, " $%d = ", yyi + 1); 1096 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 1097 &(yyvsp[(yyi + 1) - (yynrhs)]) 1098 ); 1099 fprintf (stderr, "\n"); 1100 } 1101 } 1102 1103 # define YY_REDUCE_PRINT(Rule) \ 1104 do { \ 1105 if (yydebug) \ 1106 yy_reduce_print (yyvsp, Rule); \ 1107 } while (YYID (0)) 1108 1109 /* Nonzero means print parse trace. It is left uninitialized so that 1110 multiple parsers can coexist. */ 1111 int yydebug; 1112 #else /* !YYDEBUG */ 1113 # define YYDPRINTF(Args) 1114 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 1115 # define YY_STACK_PRINT(Bottom, Top) 1116 # define YY_REDUCE_PRINT(Rule) 1117 #endif /* !YYDEBUG */ 1118 1119 1120 /* YYINITDEPTH -- initial size of the parser's stacks. */ 1121 #ifndef YYINITDEPTH 1122 # define YYINITDEPTH 200 1123 #endif 1124 1125 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 1126 if the built-in stack extension method is used). 1127 1128 Do not make this value too large; the results are undefined if 1129 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 1130 evaluated with infinite-precision integer arithmetic. */ 1131 1132 #ifndef YYMAXDEPTH 1133 # define YYMAXDEPTH 10000 1134 #endif 1135 1136 1137 1138 #if YYERROR_VERBOSE 1139 1140 # ifndef yystrlen 1141 # if defined __GLIBC__ && defined _STRING_H 1142 # define yystrlen strlen 1143 # else 1144 /* Return the length of YYSTR. */ 1145 #if (defined __STDC__ || defined __C99__FUNC__ \ 1146 || defined __cplusplus || defined _MSC_VER) 1147 static YYSIZE_T 1148 yystrlen (const char *yystr) 1149 #else 1150 static YYSIZE_T 1151 yystrlen (yystr) 1152 const char *yystr; 1153 #endif 1154 { 1155 YYSIZE_T yylen; 1156 for (yylen = 0; yystr[yylen]; yylen++) 1157 continue; 1158 return yylen; 1159 } 1160 # endif 1161 # endif 1162 1163 # ifndef yystpcpy 1164 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 1165 # define yystpcpy stpcpy 1166 # else 1167 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 1168 YYDEST. */ 1169 #if (defined __STDC__ || defined __C99__FUNC__ \ 1170 || defined __cplusplus || defined _MSC_VER) 1171 static char * 1172 yystpcpy (char *yydest, const char *yysrc) 1173 #else 1174 static char * 1175 yystpcpy (yydest, yysrc) 1176 char *yydest; 1177 const char *yysrc; 1178 #endif 1179 { 1180 char *yyd = yydest; 1181 const char *yys = yysrc; 1182 1183 while ((*yyd++ = *yys++) != '\0') 1184 continue; 1185 1186 return yyd - 1; 1187 } 1188 # endif 1189 # endif 1190 1191 # ifndef yytnamerr 1192 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary 1193 quotes and backslashes, so that it's suitable for yyerror. The 1194 heuristic is that double-quoting is unnecessary unless the string 1195 contains an apostrophe, a comma, or backslash (other than 1196 backslash-backslash). YYSTR is taken from yytname. If YYRES is 1197 null, do not copy; instead, return the length of what the result 1198 would have been. */ 1199 static YYSIZE_T 1200 yytnamerr (char *yyres, const char *yystr) 1201 { 1202 if (*yystr == '"') 1203 { 1204 YYSIZE_T yyn = 0; 1205 char const *yyp = yystr; 1206 1207 for (;;) 1208 switch (*++yyp) 1209 { 1210 case '\'': 1211 case ',': 1212 goto do_not_strip_quotes; 1213 1214 case '\\': 1215 if (*++yyp != '\\') 1216 goto do_not_strip_quotes; 1217 /* Fall through. */ 1218 default: 1219 if (yyres) 1220 yyres[yyn] = *yyp; 1221 yyn++; 1222 break; 1223 1224 case '"': 1225 if (yyres) 1226 yyres[yyn] = '\0'; 1227 return yyn; 1228 } 1229 do_not_strip_quotes: ; 1230 } 1231 1232 if (! yyres) 1233 return yystrlen (yystr); 1234 1235 return yystpcpy (yyres, yystr) - yyres; 1236 } 1237 # endif 1238 1239 /* Copy into YYRESULT an error message about the unexpected token 1240 YYCHAR while in state YYSTATE. Return the number of bytes copied, 1241 including the terminating null byte. If YYRESULT is null, do not 1242 copy anything; just return the number of bytes that would be 1243 copied. As a special case, return 0 if an ordinary "syntax error" 1244 message will do. Return YYSIZE_MAXIMUM if overflow occurs during 1245 size calculation. */ 1246 static YYSIZE_T 1247 yysyntax_error (char *yyresult, int yystate, int yychar) 1248 { 1249 int yyn = yypact[yystate]; 1250 1251 if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) 1252 return 0; 1253 else 1254 { 1255 int yytype = YYTRANSLATE (yychar); 1256 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); 1257 YYSIZE_T yysize = yysize0; 1258 YYSIZE_T yysize1; 1259 int yysize_overflow = 0; 1260 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 1261 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 1262 int yyx; 1263 1264 # if 0 1265 /* This is so xgettext sees the translatable formats that are 1266 constructed on the fly. */ 1267 YY_("syntax error, unexpected %s"); 1268 YY_("syntax error, unexpected %s, expecting %s"); 1269 YY_("syntax error, unexpected %s, expecting %s or %s"); 1270 YY_("syntax error, unexpected %s, expecting %s or %s or %s"); 1271 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); 1272 # endif 1273 char *yyfmt; 1274 char const *yyf; 1275 static char const yyunexpected[] = "syntax error, unexpected %s"; 1276 static char const yyexpecting[] = ", expecting %s"; 1277 static char const yyor[] = " or %s"; 1278 char yyformat[sizeof yyunexpected 1279 + sizeof yyexpecting - 1 1280 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) 1281 * (sizeof yyor - 1))]; 1282 char const *yyprefix = yyexpecting; 1283 1284 /* Start YYX at -YYN if negative to avoid negative indexes in 1285 YYCHECK. */ 1286 int yyxbegin = yyn < 0 ? -yyn : 0; 1287 1288 /* Stay within bounds of both yycheck and yytname. */ 1289 int yychecklim = YYLAST - yyn + 1; 1290 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 1291 int yycount = 1; 1292 1293 yyarg[0] = yytname[yytype]; 1294 yyfmt = yystpcpy (yyformat, yyunexpected); 1295 1296 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 1297 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 1298 { 1299 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 1300 { 1301 yycount = 1; 1302 yysize = yysize0; 1303 yyformat[sizeof yyunexpected - 1] = '\0'; 1304 break; 1305 } 1306 yyarg[yycount++] = yytname[yyx]; 1307 yysize1 = yysize + yytnamerr (0, yytname[yyx]); 1308 yysize_overflow |= (yysize1 < yysize); 1309 yysize = yysize1; 1310 yyfmt = yystpcpy (yyfmt, yyprefix); 1311 yyprefix = yyor; 1312 } 1313 1314 yyf = YY_(yyformat); 1315 yysize1 = yysize + yystrlen (yyf); 1316 yysize_overflow |= (yysize1 < yysize); 1317 yysize = yysize1; 1318 1319 if (yysize_overflow) 1320 return YYSIZE_MAXIMUM; 1321 1322 if (yyresult) 1323 { 1324 /* Avoid sprintf, as that infringes on the user's name space. 1325 Don't have undefined behavior even if the translation 1326 produced a string with the wrong number of "%s"s. */ 1327 char *yyp = yyresult; 1328 int yyi = 0; 1329 while ((*yyp = *yyf) != '\0') 1330 { 1331 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) 1332 { 1333 yyp += yytnamerr (yyp, yyarg[yyi++]); 1334 yyf += 2; 1335 } 1336 else 1337 { 1338 yyp++; 1339 yyf++; 1340 } 1341 } 1342 } 1343 return yysize; 1344 } 1345 } 1346 #endif /* YYERROR_VERBOSE */ 1347 1348 1349 /*-----------------------------------------------. 1350 | Release the memory associated to this symbol. | 1351 `-----------------------------------------------*/ 1352 1353 /*ARGSUSED*/ 1354 #if (defined __STDC__ || defined __C99__FUNC__ \ 1355 || defined __cplusplus || defined _MSC_VER) 1356 static void 1357 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) 1358 #else 1359 static void 1360 yydestruct (yymsg, yytype, yyvaluep) 1361 const char *yymsg; 1362 int yytype; 1363 YYSTYPE *yyvaluep; 1364 #endif 1365 { 1366 YYUSE (yyvaluep); 1367 1368 if (!yymsg) 1369 yymsg = "Deleting"; 1370 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 1371 1372 switch (yytype) 1373 { 1374 1375 default: 1376 break; 1377 } 1378 } 1379 1380 1381 /* Prevent warnings from -Wmissing-prototypes. */ 1382 1383 #ifdef YYPARSE_PARAM 1384 #if defined __STDC__ || defined __cplusplus 1385 int yyparse (void *YYPARSE_PARAM); 1386 #else 1387 int yyparse (); 1388 #endif 1389 #else /* ! YYPARSE_PARAM */ 1390 #if defined __STDC__ || defined __cplusplus 1391 int yyparse (void); 1392 #else 1393 int yyparse (); 1394 #endif 1395 #endif /* ! YYPARSE_PARAM */ 1396 1397 1398 1399 /* The look-ahead symbol. */ 1400 int yychar; 1401 1402 /* The semantic value of the look-ahead symbol. */ 1403 YYSTYPE yylval; 1404 1405 /* Number of syntax errors so far. */ 1406 int yynerrs; 1407 1408 1409 1410 /*----------. 1411 | yyparse. | 1412 `----------*/ 1413 1414 #ifdef YYPARSE_PARAM 1415 #if (defined __STDC__ || defined __C99__FUNC__ \ 1416 || defined __cplusplus || defined _MSC_VER) 1417 int 1418 yyparse (void *YYPARSE_PARAM) 1419 #else 1420 int 1421 yyparse (YYPARSE_PARAM) 1422 void *YYPARSE_PARAM; 1423 #endif 1424 #else /* ! YYPARSE_PARAM */ 1425 #if (defined __STDC__ || defined __C99__FUNC__ \ 1426 || defined __cplusplus || defined _MSC_VER) 1427 int 1428 yyparse (void) 1429 #else 1430 int 1431 yyparse () 1432 1433 #endif 1434 #endif 1435 { 1436 1437 int yystate; 1438 int yyn; 1439 int yyresult; 1440 /* Number of tokens to shift before error messages enabled. */ 1441 int yyerrstatus; 1442 /* Look-ahead token as an internal (translated) token number. */ 1443 int yytoken = 0; 1444 #if YYERROR_VERBOSE 1445 /* Buffer for error messages, and its allocated size. */ 1446 char yymsgbuf[128]; 1447 char *yymsg = yymsgbuf; 1448 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 1449 #endif 1450 1451 /* Three stacks and their tools: 1452 `yyss': related to states, 1453 `yyvs': related to semantic values, 1454 `yyls': related to locations. 1455 1456 Refer to the stacks thru separate pointers, to allow yyoverflow 1457 to reallocate them elsewhere. */ 1458 1459 /* The state stack. */ 1460 yytype_int16 yyssa[YYINITDEPTH]; 1461 yytype_int16 *yyss = yyssa; 1462 yytype_int16 *yyssp; 1463 1464 /* The semantic value stack. */ 1465 YYSTYPE yyvsa[YYINITDEPTH]; 1466 YYSTYPE *yyvs = yyvsa; 1467 YYSTYPE *yyvsp; 1468 1469 1470 1471 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 1472 1473 YYSIZE_T yystacksize = YYINITDEPTH; 1474 1475 /* The variables used to return semantic value and location from the 1476 action routines. */ 1477 YYSTYPE yyval; 1478 1479 1480 /* The number of symbols on the RHS of the reduced rule. 1481 Keep to zero when no symbol should be popped. */ 1482 int yylen = 0; 1483 1484 YYDPRINTF ((stderr, "Starting parse\n")); 1485 1486 yystate = 0; 1487 yyerrstatus = 0; 1488 yynerrs = 0; 1489 yychar = YYEMPTY; /* Cause a token to be read. */ 1490 1491 /* Initialize stack pointers. 1492 Waste one element of value and location stack 1493 so that they stay on the same level as the state stack. 1494 The wasted elements are never initialized. */ 1495 1496 yyssp = yyss; 1497 yyvsp = yyvs; 1498 1499 goto yysetstate; 1500 1501 /*------------------------------------------------------------. 1502 | yynewstate -- Push a new state, which is found in yystate. | 1503 `------------------------------------------------------------*/ 1504 yynewstate: 1505 /* In all cases, when you get here, the value and location stacks 1506 have just been pushed. So pushing a state here evens the stacks. */ 1507 yyssp++; 1508 1509 yysetstate: 1510 *yyssp = yystate; 1511 1512 if (yyss + yystacksize - 1 <= yyssp) 1513 { 1514 /* Get the current used size of the three stacks, in elements. */ 1515 YYSIZE_T yysize = yyssp - yyss + 1; 1516 1517 #ifdef yyoverflow 1518 { 1519 /* Give user a chance to reallocate the stack. Use copies of 1520 these so that the &'s don't force the real ones into 1521 memory. */ 1522 YYSTYPE *yyvs1 = yyvs; 1523 yytype_int16 *yyss1 = yyss; 1524 1525 1526 /* Each stack pointer address is followed by the size of the 1527 data in use in that stack, in bytes. This used to be a 1528 conditional around just the two extra args, but that might 1529 be undefined if yyoverflow is a macro. */ 1530 yyoverflow (YY_("memory exhausted"), 1531 &yyss1, yysize * sizeof (*yyssp), 1532 &yyvs1, yysize * sizeof (*yyvsp), 1533 1534 &yystacksize); 1535 1536 yyss = yyss1; 1537 yyvs = yyvs1; 1538 } 1539 #else /* no yyoverflow */ 1540 # ifndef YYSTACK_RELOCATE 1541 goto yyexhaustedlab; 1542 # else 1543 /* Extend the stack our own way. */ 1544 if (YYMAXDEPTH <= yystacksize) 1545 goto yyexhaustedlab; 1546 yystacksize *= 2; 1547 if (YYMAXDEPTH < yystacksize) 1548 yystacksize = YYMAXDEPTH; 1549 1550 { 1551 yytype_int16 *yyss1 = yyss; 1552 union yyalloc *yyptr = 1553 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 1554 if (! yyptr) 1555 goto yyexhaustedlab; 1556 YYSTACK_RELOCATE (yyss); 1557 YYSTACK_RELOCATE (yyvs); 1558 1559 # undef YYSTACK_RELOCATE 1560 if (yyss1 != yyssa) 1561 YYSTACK_FREE (yyss1); 1562 } 1563 # endif 1564 #endif /* no yyoverflow */ 1565 1566 yyssp = yyss + yysize - 1; 1567 yyvsp = yyvs + yysize - 1; 1568 1569 1570 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 1571 (unsigned long int) yystacksize)); 1572 1573 if (yyss + yystacksize - 1 <= yyssp) 1574 YYABORT; 1575 } 1576 1577 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 1578 1579 goto yybackup; 1580 1581 /*-----------. 1582 | yybackup. | 1583 `-----------*/ 1584 yybackup: 1585 1586 /* Do appropriate processing given the current state. Read a 1587 look-ahead token if we need one and don't already have one. */ 1588 1589 /* First try to decide what to do without reference to look-ahead token. */ 1590 yyn = yypact[yystate]; 1591 if (yyn == YYPACT_NINF) 1592 goto yydefault; 1593 1594 /* Not known => get a look-ahead token if don't already have one. */ 1595 1596 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ 1597 if (yychar == YYEMPTY) 1598 { 1599 YYDPRINTF ((stderr, "Reading a token: ")); 1600 yychar = YYLEX; 1601 } 1602 1603 if (yychar <= YYEOF) 1604 { 1605 yychar = yytoken = YYEOF; 1606 YYDPRINTF ((stderr, "Now at end of input.\n")); 1607 } 1608 else 1609 { 1610 yytoken = YYTRANSLATE (yychar); 1611 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 1612 } 1613 1614 /* If the proper action on seeing token YYTOKEN is to reduce or to 1615 detect an error, take that action. */ 1616 yyn += yytoken; 1617 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 1618 goto yydefault; 1619 yyn = yytable[yyn]; 1620 if (yyn <= 0) 1621 { 1622 if (yyn == 0 || yyn == YYTABLE_NINF) 1623 goto yyerrlab; 1624 yyn = -yyn; 1625 goto yyreduce; 1626 } 1627 1628 if (yyn == YYFINAL) 1629 YYACCEPT; 1630 1631 /* Count tokens shifted since error; after three, turn off error 1632 status. */ 1633 if (yyerrstatus) 1634 yyerrstatus--; 1635 1636 /* Shift the look-ahead token. */ 1637 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 1638 1639 /* Discard the shifted token unless it is eof. */ 1640 if (yychar != YYEOF) 1641 yychar = YYEMPTY; 1642 1643 yystate = yyn; 1644 *++yyvsp = yylval; 1645 1646 goto yynewstate; 1647 1648 1649 /*-----------------------------------------------------------. 1650 | yydefault -- do the default action for the current state. | 1651 `-----------------------------------------------------------*/ 1652 yydefault: 1653 yyn = yydefact[yystate]; 1654 if (yyn == 0) 1655 goto yyerrlab; 1656 goto yyreduce; 1657 1658 1659 /*-----------------------------. 1660 | yyreduce -- Do a reduction. | 1661 `-----------------------------*/ 1662 yyreduce: 1663 /* yyn is the number of a rule to reduce with. */ 1664 yylen = yyr2[yyn]; 1665 1666 /* If YYLEN is nonzero, implement the default value of the action: 1667 `$$ = $1'. 1668 1669 Otherwise, the following line sets YYVAL to garbage. 1670 This behavior is undocumented and Bison 1671 users should not rely upon it. Assigning to YYVAL 1672 unconditionally makes the parser a bit smaller, and it avoids a 1673 GCC warning that YYVAL may be used uninitialized. */ 1674 yyval = yyvsp[1-yylen]; 1675 1676 1677 YY_REDUCE_PRINT (yyn); 1678 switch (yyn) 1679 { 1680 case 3: 1681 #line 66 "a.y" 1682 { 1683 stmtline = lineno; 1684 } 1685 break; 1686 1687 case 5: 1688 #line 73 "a.y" 1689 { 1690 if((yyvsp[(1) - (2)].sym)->value != pc) 1691 yyerror("redeclaration of %s", (yyvsp[(1) - (2)].sym)->name); 1692 (yyvsp[(1) - (2)].sym)->value = pc; 1693 } 1694 break; 1695 1696 case 7: 1697 #line 80 "a.y" 1698 { 1699 (yyvsp[(1) - (2)].sym)->type = LLAB; 1700 (yyvsp[(1) - (2)].sym)->value = pc; 1701 } 1702 break; 1703 1704 case 12: 1705 #line 91 "a.y" 1706 { 1707 (yyvsp[(1) - (3)].sym)->type = LVAR; 1708 (yyvsp[(1) - (3)].sym)->value = (yyvsp[(3) - (3)].lval); 1709 } 1710 break; 1711 1712 case 13: 1713 #line 96 "a.y" 1714 { 1715 if((yyvsp[(1) - (3)].sym)->value != (yyvsp[(3) - (3)].lval)) 1716 yyerror("redeclaration of %s", (yyvsp[(1) - (3)].sym)->name); 1717 (yyvsp[(1) - (3)].sym)->value = (yyvsp[(3) - (3)].lval); 1718 } 1719 break; 1720 1721 case 14: 1722 #line 101 "a.y" 1723 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } 1724 break; 1725 1726 case 15: 1727 #line 102 "a.y" 1728 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } 1729 break; 1730 1731 case 16: 1732 #line 103 "a.y" 1733 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } 1734 break; 1735 1736 case 17: 1737 #line 104 "a.y" 1738 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } 1739 break; 1740 1741 case 18: 1742 #line 105 "a.y" 1743 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } 1744 break; 1745 1746 case 19: 1747 #line 106 "a.y" 1748 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } 1749 break; 1750 1751 case 20: 1752 #line 107 "a.y" 1753 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } 1754 break; 1755 1756 case 21: 1757 #line 108 "a.y" 1758 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } 1759 break; 1760 1761 case 22: 1762 #line 109 "a.y" 1763 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } 1764 break; 1765 1766 case 23: 1767 #line 110 "a.y" 1768 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } 1769 break; 1770 1771 case 24: 1772 #line 111 "a.y" 1773 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } 1774 break; 1775 1776 case 25: 1777 #line 112 "a.y" 1778 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } 1779 break; 1780 1781 case 26: 1782 #line 113 "a.y" 1783 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } 1784 break; 1785 1786 case 27: 1787 #line 114 "a.y" 1788 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } 1789 break; 1790 1791 case 28: 1792 #line 115 "a.y" 1793 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } 1794 break; 1795 1796 case 29: 1797 #line 116 "a.y" 1798 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } 1799 break; 1800 1801 case 30: 1802 #line 117 "a.y" 1803 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } 1804 break; 1805 1806 case 31: 1807 #line 120 "a.y" 1808 { 1809 (yyval.gen2).from = nullgen; 1810 (yyval.gen2).to = nullgen; 1811 } 1812 break; 1813 1814 case 32: 1815 #line 125 "a.y" 1816 { 1817 (yyval.gen2).from = nullgen; 1818 (yyval.gen2).to = nullgen; 1819 } 1820 break; 1821 1822 case 33: 1823 #line 132 "a.y" 1824 { 1825 (yyval.gen2).from = (yyvsp[(1) - (3)].gen); 1826 (yyval.gen2).to = (yyvsp[(3) - (3)].gen); 1827 } 1828 break; 1829 1830 case 34: 1831 #line 139 "a.y" 1832 { 1833 (yyval.gen2).from = (yyvsp[(1) - (3)].gen); 1834 (yyval.gen2).to = (yyvsp[(3) - (3)].gen); 1835 } 1836 break; 1837 1838 case 35: 1839 #line 146 "a.y" 1840 { 1841 (yyval.gen2).from = (yyvsp[(1) - (2)].gen); 1842 (yyval.gen2).to = nullgen; 1843 } 1844 break; 1845 1846 case 36: 1847 #line 151 "a.y" 1848 { 1849 (yyval.gen2).from = (yyvsp[(1) - (1)].gen); 1850 (yyval.gen2).to = nullgen; 1851 } 1852 break; 1853 1854 case 37: 1855 #line 158 "a.y" 1856 { 1857 (yyval.gen2).from = nullgen; 1858 (yyval.gen2).to = (yyvsp[(2) - (2)].gen); 1859 } 1860 break; 1861 1862 case 38: 1863 #line 163 "a.y" 1864 { 1865 (yyval.gen2).from = nullgen; 1866 (yyval.gen2).to = (yyvsp[(1) - (1)].gen); 1867 } 1868 break; 1869 1870 case 39: 1871 #line 170 "a.y" 1872 { 1873 (yyval.gen2).from = nullgen; 1874 (yyval.gen2).to = (yyvsp[(2) - (2)].gen); 1875 } 1876 break; 1877 1878 case 40: 1879 #line 175 "a.y" 1880 { 1881 (yyval.gen2).from = nullgen; 1882 (yyval.gen2).to = (yyvsp[(1) - (1)].gen); 1883 } 1884 break; 1885 1886 case 41: 1887 #line 180 "a.y" 1888 { 1889 (yyval.gen2).from = (yyvsp[(1) - (3)].gen); 1890 (yyval.gen2).to = (yyvsp[(3) - (3)].gen); 1891 } 1892 break; 1893 1894 case 42: 1895 #line 187 "a.y" 1896 { 1897 (yyval.gen2).from = (yyvsp[(1) - (5)].gen); 1898 (yyval.gen2).from.scale = (yyvsp[(3) - (5)].lval); 1899 (yyval.gen2).to = (yyvsp[(5) - (5)].gen); 1900 } 1901 break; 1902 1903 case 43: 1904 #line 195 "a.y" 1905 { 1906 (yyval.gen2).from = (yyvsp[(1) - (3)].gen); 1907 (yyval.gen2).to = (yyvsp[(3) - (3)].gen); 1908 } 1909 break; 1910 1911 case 44: 1912 #line 200 "a.y" 1913 { 1914 (yyval.gen2).from = (yyvsp[(1) - (5)].gen); 1915 (yyval.gen2).from.scale = (yyvsp[(3) - (5)].lval); 1916 (yyval.gen2).to = (yyvsp[(5) - (5)].gen); 1917 } 1918 break; 1919 1920 case 45: 1921 #line 208 "a.y" 1922 { 1923 (yyval.gen2).from = nullgen; 1924 (yyval.gen2).to = (yyvsp[(2) - (2)].gen); 1925 } 1926 break; 1927 1928 case 46: 1929 #line 213 "a.y" 1930 { 1931 (yyval.gen2).from = nullgen; 1932 (yyval.gen2).to = (yyvsp[(1) - (1)].gen); 1933 } 1934 break; 1935 1936 case 49: 1937 #line 224 "a.y" 1938 { 1939 (yyval.gen2).from = (yyvsp[(1) - (3)].gen); 1940 (yyval.gen2).to = (yyvsp[(3) - (3)].gen); 1941 } 1942 break; 1943 1944 case 50: 1945 #line 229 "a.y" 1946 { 1947 (yyval.gen2).from = (yyvsp[(1) - (5)].gen); 1948 (yyval.gen2).to = (yyvsp[(3) - (5)].gen); 1949 if((yyval.gen2).from.index != D_NONE) 1950 yyerror("dp shift with lhs index"); 1951 (yyval.gen2).from.index = (yyvsp[(5) - (5)].lval); 1952 } 1953 break; 1954 1955 case 51: 1956 #line 239 "a.y" 1957 { 1958 (yyval.gen2).from = (yyvsp[(1) - (3)].gen); 1959 (yyval.gen2).to = (yyvsp[(3) - (3)].gen); 1960 } 1961 break; 1962 1963 case 52: 1964 #line 244 "a.y" 1965 { 1966 (yyval.gen2).from = (yyvsp[(1) - (5)].gen); 1967 (yyval.gen2).to = (yyvsp[(3) - (5)].gen); 1968 if((yyval.gen2).to.index != D_NONE) 1969 yyerror("dp move with lhs index"); 1970 (yyval.gen2).to.index = (yyvsp[(5) - (5)].lval); 1971 } 1972 break; 1973 1974 case 53: 1975 #line 254 "a.y" 1976 { 1977 (yyval.gen2).from = (yyvsp[(1) - (2)].gen); 1978 (yyval.gen2).to = nullgen; 1979 } 1980 break; 1981 1982 case 54: 1983 #line 259 "a.y" 1984 { 1985 (yyval.gen2).from = (yyvsp[(1) - (1)].gen); 1986 (yyval.gen2).to = nullgen; 1987 } 1988 break; 1989 1990 case 55: 1991 #line 264 "a.y" 1992 { 1993 (yyval.gen2).from = (yyvsp[(1) - (3)].gen); 1994 (yyval.gen2).to = (yyvsp[(3) - (3)].gen); 1995 } 1996 break; 1997 1998 case 56: 1999 #line 271 "a.y" 2000 { 2001 (yyval.gen2).from = (yyvsp[(1) - (5)].gen); 2002 (yyval.gen2).to = (yyvsp[(3) - (5)].gen); 2003 (yyval.gen2).to.offset = (yyvsp[(5) - (5)].lval); 2004 } 2005 break; 2006 2007 case 57: 2008 #line 279 "a.y" 2009 { 2010 (yyval.gen2).from = (yyvsp[(3) - (5)].gen); 2011 (yyval.gen2).to = (yyvsp[(5) - (5)].gen); 2012 if((yyvsp[(1) - (5)].gen).type != D_CONST) 2013 yyerror("illegal constant"); 2014 (yyval.gen2).to.offset = (yyvsp[(1) - (5)].gen).offset; 2015 } 2016 break; 2017 2018 case 58: 2019 #line 288 "a.y" 2020 { 2021 (yyval.gen2).from = nullgen; 2022 (yyval.gen2).to = nullgen; 2023 } 2024 break; 2025 2026 case 59: 2027 #line 293 "a.y" 2028 { 2029 (yyval.gen2).from = (yyvsp[(1) - (1)].gen); 2030 (yyval.gen2).to = nullgen; 2031 } 2032 break; 2033 2034 case 60: 2035 #line 300 "a.y" 2036 { 2037 (yyval.gen2).from = (yyvsp[(1) - (3)].gen); 2038 (yyval.gen2).to = (yyvsp[(3) - (3)].gen); 2039 } 2040 break; 2041 2042 case 61: 2043 #line 305 "a.y" 2044 { 2045 (yyval.gen2).from = (yyvsp[(1) - (5)].gen); 2046 (yyval.gen2).from.scale = (yyvsp[(3) - (5)].lval); 2047 (yyval.gen2).to = (yyvsp[(5) - (5)].gen); 2048 } 2049 break; 2050 2051 case 66: 2052 #line 319 "a.y" 2053 { 2054 (yyval.gen) = (yyvsp[(2) - (2)].gen); 2055 } 2056 break; 2057 2058 case 67: 2059 #line 323 "a.y" 2060 { 2061 (yyval.gen) = (yyvsp[(2) - (2)].gen); 2062 } 2063 break; 2064 2065 case 72: 2066 #line 335 "a.y" 2067 { 2068 (yyval.gen) = nullgen; 2069 (yyval.gen).type = D_BRANCH; 2070 (yyval.gen).offset = (yyvsp[(1) - (4)].lval) + pc; 2071 } 2072 break; 2073 2074 case 73: 2075 #line 341 "a.y" 2076 { 2077 (yyval.gen) = nullgen; 2078 if(pass == 2) 2079 yyerror("undefined label: %s", (yyvsp[(1) - (2)].sym)->name); 2080 (yyval.gen).type = D_BRANCH; 2081 (yyval.gen).sym = (yyvsp[(1) - (2)].sym); 2082 (yyval.gen).offset = (yyvsp[(2) - (2)].lval); 2083 } 2084 break; 2085 2086 case 74: 2087 #line 350 "a.y" 2088 { 2089 (yyval.gen) = nullgen; 2090 (yyval.gen).type = D_BRANCH; 2091 (yyval.gen).sym = (yyvsp[(1) - (2)].sym); 2092 (yyval.gen).offset = (yyvsp[(1) - (2)].sym)->value + (yyvsp[(2) - (2)].lval); 2093 } 2094 break; 2095 2096 case 75: 2097 #line 359 "a.y" 2098 { 2099 (yyval.gen) = nullgen; 2100 (yyval.gen).type = (yyvsp[(1) - (1)].lval); 2101 } 2102 break; 2103 2104 case 76: 2105 #line 364 "a.y" 2106 { 2107 (yyval.gen) = nullgen; 2108 (yyval.gen).type = (yyvsp[(1) - (1)].lval); 2109 } 2110 break; 2111 2112 case 77: 2113 #line 369 "a.y" 2114 { 2115 (yyval.gen) = nullgen; 2116 (yyval.gen).type = (yyvsp[(1) - (1)].lval); 2117 } 2118 break; 2119 2120 case 78: 2121 #line 374 "a.y" 2122 { 2123 (yyval.gen) = nullgen; 2124 (yyval.gen).type = (yyvsp[(1) - (1)].lval); 2125 } 2126 break; 2127 2128 case 79: 2129 #line 379 "a.y" 2130 { 2131 (yyval.gen) = nullgen; 2132 (yyval.gen).type = D_SP; 2133 } 2134 break; 2135 2136 case 80: 2137 #line 384 "a.y" 2138 { 2139 (yyval.gen) = nullgen; 2140 (yyval.gen).type = (yyvsp[(1) - (1)].lval); 2141 } 2142 break; 2143 2144 case 81: 2145 #line 389 "a.y" 2146 { 2147 (yyval.gen) = nullgen; 2148 (yyval.gen).type = (yyvsp[(1) - (1)].lval); 2149 } 2150 break; 2151 2152 case 82: 2153 #line 395 "a.y" 2154 { 2155 (yyval.gen) = nullgen; 2156 (yyval.gen).type = D_CONST; 2157 (yyval.gen).offset = (yyvsp[(2) - (2)].lval); 2158 } 2159 break; 2160 2161 case 83: 2162 #line 403 "a.y" 2163 { 2164 (yyval.gen) = nullgen; 2165 (yyval.gen).type = D_CONST; 2166 (yyval.gen).offset = (yyvsp[(2) - (2)].lval); 2167 } 2168 break; 2169 2170 case 84: 2171 #line 409 "a.y" 2172 { 2173 (yyval.gen) = (yyvsp[(2) - (2)].gen); 2174 (yyval.gen).index = (yyvsp[(2) - (2)].gen).type; 2175 (yyval.gen).type = D_ADDR; 2176 /* 2177 if($2.type == D_AUTO || $2.type == D_PARAM) 2178 yyerror("constant cannot be automatic: %s", 2179 $2.sym->name); 2180 */ 2181 } 2182 break; 2183 2184 case 85: 2185 #line 420 "a.y" 2186 { 2187 (yyval.gen) = nullgen; 2188 (yyval.gen).type = D_SCONST; 2189 memcpy((yyval.gen).sval, (yyvsp[(2) - (2)].sval), sizeof((yyval.gen).sval)); 2190 } 2191 break; 2192 2193 case 86: 2194 #line 426 "a.y" 2195 { 2196 (yyval.gen) = nullgen; 2197 (yyval.gen).type = D_FCONST; 2198 (yyval.gen).dval = (yyvsp[(2) - (2)].dval); 2199 } 2200 break; 2201 2202 case 87: 2203 #line 432 "a.y" 2204 { 2205 (yyval.gen) = nullgen; 2206 (yyval.gen).type = D_FCONST; 2207 (yyval.gen).dval = (yyvsp[(3) - (4)].dval); 2208 } 2209 break; 2210 2211 case 88: 2212 #line 438 "a.y" 2213 { 2214 (yyval.gen) = nullgen; 2215 (yyval.gen).type = D_FCONST; 2216 (yyval.gen).dval = -(yyvsp[(4) - (5)].dval); 2217 } 2218 break; 2219 2220 case 89: 2221 #line 444 "a.y" 2222 { 2223 (yyval.gen) = nullgen; 2224 (yyval.gen).type = D_FCONST; 2225 (yyval.gen).dval = -(yyvsp[(3) - (3)].dval); 2226 } 2227 break; 2228 2229 case 92: 2230 #line 456 "a.y" 2231 { 2232 (yyval.gen) = nullgen; 2233 (yyval.gen).type = D_INDIR+D_NONE; 2234 (yyval.gen).offset = (yyvsp[(1) - (1)].lval); 2235 } 2236 break; 2237 2238 case 93: 2239 #line 462 "a.y" 2240 { 2241 (yyval.gen) = nullgen; 2242 (yyval.gen).type = D_INDIR+(yyvsp[(3) - (4)].lval); 2243 (yyval.gen).offset = (yyvsp[(1) - (4)].lval); 2244 } 2245 break; 2246 2247 case 94: 2248 #line 468 "a.y" 2249 { 2250 (yyval.gen) = nullgen; 2251 (yyval.gen).type = D_INDIR+D_SP; 2252 (yyval.gen).offset = (yyvsp[(1) - (4)].lval); 2253 } 2254 break; 2255 2256 case 95: 2257 #line 474 "a.y" 2258 { 2259 (yyval.gen) = nullgen; 2260 (yyval.gen).type = D_INDIR+(yyvsp[(3) - (4)].lval); 2261 (yyval.gen).offset = (yyvsp[(1) - (4)].lval); 2262 } 2263 break; 2264 2265 case 96: 2266 #line 480 "a.y" 2267 { 2268 (yyval.gen) = nullgen; 2269 (yyval.gen).type = D_INDIR+D_NONE; 2270 (yyval.gen).offset = (yyvsp[(1) - (6)].lval); 2271 (yyval.gen).index = (yyvsp[(3) - (6)].lval); 2272 (yyval.gen).scale = (yyvsp[(5) - (6)].lval); 2273 checkscale((yyval.gen).scale); 2274 } 2275 break; 2276 2277 case 97: 2278 #line 489 "a.y" 2279 { 2280 (yyval.gen) = nullgen; 2281 (yyval.gen).type = D_INDIR+(yyvsp[(3) - (9)].lval); 2282 (yyval.gen).offset = (yyvsp[(1) - (9)].lval); 2283 (yyval.gen).index = (yyvsp[(6) - (9)].lval); 2284 (yyval.gen).scale = (yyvsp[(8) - (9)].lval); 2285 checkscale((yyval.gen).scale); 2286 } 2287 break; 2288 2289 case 98: 2290 #line 498 "a.y" 2291 { 2292 (yyval.gen) = nullgen; 2293 (yyval.gen).type = D_INDIR+(yyvsp[(2) - (3)].lval); 2294 } 2295 break; 2296 2297 case 99: 2298 #line 503 "a.y" 2299 { 2300 (yyval.gen) = nullgen; 2301 (yyval.gen).type = D_INDIR+D_SP; 2302 } 2303 break; 2304 2305 case 100: 2306 #line 508 "a.y" 2307 { 2308 (yyval.gen) = nullgen; 2309 (yyval.gen).type = D_INDIR+D_NONE; 2310 (yyval.gen).index = (yyvsp[(2) - (5)].lval); 2311 (yyval.gen).scale = (yyvsp[(4) - (5)].lval); 2312 checkscale((yyval.gen).scale); 2313 } 2314 break; 2315 2316 case 101: 2317 #line 516 "a.y" 2318 { 2319 (yyval.gen) = nullgen; 2320 (yyval.gen).type = D_INDIR+(yyvsp[(2) - (8)].lval); 2321 (yyval.gen).index = (yyvsp[(5) - (8)].lval); 2322 (yyval.gen).scale = (yyvsp[(7) - (8)].lval); 2323 checkscale((yyval.gen).scale); 2324 } 2325 break; 2326 2327 case 102: 2328 #line 526 "a.y" 2329 { 2330 (yyval.gen) = (yyvsp[(1) - (1)].gen); 2331 } 2332 break; 2333 2334 case 103: 2335 #line 530 "a.y" 2336 { 2337 (yyval.gen) = (yyvsp[(1) - (6)].gen); 2338 (yyval.gen).index = (yyvsp[(3) - (6)].lval); 2339 (yyval.gen).scale = (yyvsp[(5) - (6)].lval); 2340 checkscale((yyval.gen).scale); 2341 } 2342 break; 2343 2344 case 104: 2345 #line 539 "a.y" 2346 { 2347 (yyval.gen) = nullgen; 2348 (yyval.gen).type = (yyvsp[(4) - (5)].lval); 2349 (yyval.gen).sym = (yyvsp[(1) - (5)].sym); 2350 (yyval.gen).offset = (yyvsp[(2) - (5)].lval); 2351 } 2352 break; 2353 2354 case 105: 2355 #line 546 "a.y" 2356 { 2357 (yyval.gen) = nullgen; 2358 (yyval.gen).type = D_STATIC; 2359 (yyval.gen).sym = (yyvsp[(1) - (7)].sym); 2360 (yyval.gen).offset = (yyvsp[(4) - (7)].lval); 2361 } 2362 break; 2363 2364 case 106: 2365 #line 554 "a.y" 2366 { 2367 (yyval.lval) = 0; 2368 } 2369 break; 2370 2371 case 107: 2372 #line 558 "a.y" 2373 { 2374 (yyval.lval) = (yyvsp[(2) - (2)].lval); 2375 } 2376 break; 2377 2378 case 108: 2379 #line 562 "a.y" 2380 { 2381 (yyval.lval) = -(yyvsp[(2) - (2)].lval); 2382 } 2383 break; 2384 2385 case 110: 2386 #line 569 "a.y" 2387 { 2388 (yyval.lval) = D_AUTO; 2389 } 2390 break; 2391 2392 case 113: 2393 #line 577 "a.y" 2394 { 2395 (yyval.lval) = (yyvsp[(1) - (1)].sym)->value; 2396 } 2397 break; 2398 2399 case 114: 2400 #line 581 "a.y" 2401 { 2402 (yyval.lval) = -(yyvsp[(2) - (2)].lval); 2403 } 2404 break; 2405 2406 case 115: 2407 #line 585 "a.y" 2408 { 2409 (yyval.lval) = (yyvsp[(2) - (2)].lval); 2410 } 2411 break; 2412 2413 case 116: 2414 #line 589 "a.y" 2415 { 2416 (yyval.lval) = ~(yyvsp[(2) - (2)].lval); 2417 } 2418 break; 2419 2420 case 117: 2421 #line 593 "a.y" 2422 { 2423 (yyval.lval) = (yyvsp[(2) - (3)].lval); 2424 } 2425 break; 2426 2427 case 118: 2428 #line 599 "a.y" 2429 { 2430 (yyval.lval) = (yyvsp[(1) - (1)].lval) & 0xffffffffLL; 2431 } 2432 break; 2433 2434 case 119: 2435 #line 603 "a.y" 2436 { 2437 (yyval.lval) = -(yyvsp[(2) - (2)].lval) & 0xffffffffLL; 2438 } 2439 break; 2440 2441 case 120: 2442 #line 607 "a.y" 2443 { 2444 (yyval.lval) = ((yyvsp[(1) - (3)].lval) & 0xffffffffLL) + 2445 (((yyvsp[(3) - (3)].lval) & 0xffffLL) << 32); 2446 } 2447 break; 2448 2449 case 121: 2450 #line 612 "a.y" 2451 { 2452 (yyval.lval) = (-(yyvsp[(2) - (4)].lval) & 0xffffffffLL) + 2453 (((yyvsp[(4) - (4)].lval) & 0xffffLL) << 32); 2454 } 2455 break; 2456 2457 case 123: 2458 #line 620 "a.y" 2459 { 2460 (yyval.lval) = (yyvsp[(1) - (3)].lval) + (yyvsp[(3) - (3)].lval); 2461 } 2462 break; 2463 2464 case 124: 2465 #line 624 "a.y" 2466 { 2467 (yyval.lval) = (yyvsp[(1) - (3)].lval) - (yyvsp[(3) - (3)].lval); 2468 } 2469 break; 2470 2471 case 125: 2472 #line 628 "a.y" 2473 { 2474 (yyval.lval) = (yyvsp[(1) - (3)].lval) * (yyvsp[(3) - (3)].lval); 2475 } 2476 break; 2477 2478 case 126: 2479 #line 632 "a.y" 2480 { 2481 (yyval.lval) = (yyvsp[(1) - (3)].lval) / (yyvsp[(3) - (3)].lval); 2482 } 2483 break; 2484 2485 case 127: 2486 #line 636 "a.y" 2487 { 2488 (yyval.lval) = (yyvsp[(1) - (3)].lval) % (yyvsp[(3) - (3)].lval); 2489 } 2490 break; 2491 2492 case 128: 2493 #line 640 "a.y" 2494 { 2495 (yyval.lval) = (yyvsp[(1) - (4)].lval) << (yyvsp[(4) - (4)].lval); 2496 } 2497 break; 2498 2499 case 129: 2500 #line 644 "a.y" 2501 { 2502 (yyval.lval) = (yyvsp[(1) - (4)].lval) >> (yyvsp[(4) - (4)].lval); 2503 } 2504 break; 2505 2506 case 130: 2507 #line 648 "a.y" 2508 { 2509 (yyval.lval) = (yyvsp[(1) - (3)].lval) & (yyvsp[(3) - (3)].lval); 2510 } 2511 break; 2512 2513 case 131: 2514 #line 652 "a.y" 2515 { 2516 (yyval.lval) = (yyvsp[(1) - (3)].lval) ^ (yyvsp[(3) - (3)].lval); 2517 } 2518 break; 2519 2520 case 132: 2521 #line 656 "a.y" 2522 { 2523 (yyval.lval) = (yyvsp[(1) - (3)].lval) | (yyvsp[(3) - (3)].lval); 2524 } 2525 break; 2526 2527 2528 /* Line 1267 of yacc.c. */ 2529 #line 2530 "y.tab.c" 2530 default: break; 2531 } 2532 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 2533 2534 YYPOPSTACK (yylen); 2535 yylen = 0; 2536 YY_STACK_PRINT (yyss, yyssp); 2537 2538 *++yyvsp = yyval; 2539 2540 2541 /* Now `shift' the result of the reduction. Determine what state 2542 that goes to, based on the state we popped back to and the rule 2543 number reduced by. */ 2544 2545 yyn = yyr1[yyn]; 2546 2547 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 2548 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 2549 yystate = yytable[yystate]; 2550 else 2551 yystate = yydefgoto[yyn - YYNTOKENS]; 2552 2553 goto yynewstate; 2554 2555 2556 /*------------------------------------. 2557 | yyerrlab -- here on detecting error | 2558 `------------------------------------*/ 2559 yyerrlab: 2560 /* If not already recovering from an error, report this error. */ 2561 if (!yyerrstatus) 2562 { 2563 ++yynerrs; 2564 #if ! YYERROR_VERBOSE 2565 yyerror (YY_("syntax error")); 2566 #else 2567 { 2568 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); 2569 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) 2570 { 2571 YYSIZE_T yyalloc = 2 * yysize; 2572 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) 2573 yyalloc = YYSTACK_ALLOC_MAXIMUM; 2574 if (yymsg != yymsgbuf) 2575 YYSTACK_FREE (yymsg); 2576 yymsg = (char *) YYSTACK_ALLOC (yyalloc); 2577 if (yymsg) 2578 yymsg_alloc = yyalloc; 2579 else 2580 { 2581 yymsg = yymsgbuf; 2582 yymsg_alloc = sizeof yymsgbuf; 2583 } 2584 } 2585 2586 if (0 < yysize && yysize <= yymsg_alloc) 2587 { 2588 (void) yysyntax_error (yymsg, yystate, yychar); 2589 yyerror (yymsg); 2590 } 2591 else 2592 { 2593 yyerror (YY_("syntax error")); 2594 if (yysize != 0) 2595 goto yyexhaustedlab; 2596 } 2597 } 2598 #endif 2599 } 2600 2601 2602 2603 if (yyerrstatus == 3) 2604 { 2605 /* If just tried and failed to reuse look-ahead token after an 2606 error, discard it. */ 2607 2608 if (yychar <= YYEOF) 2609 { 2610 /* Return failure if at end of input. */ 2611 if (yychar == YYEOF) 2612 YYABORT; 2613 } 2614 else 2615 { 2616 yydestruct ("Error: discarding", 2617 yytoken, &yylval); 2618 yychar = YYEMPTY; 2619 } 2620 } 2621 2622 /* Else will try to reuse look-ahead token after shifting the error 2623 token. */ 2624 goto yyerrlab1; 2625 2626 2627 /*---------------------------------------------------. 2628 | yyerrorlab -- error raised explicitly by YYERROR. | 2629 `---------------------------------------------------*/ 2630 yyerrorlab: 2631 2632 /* Pacify compilers like GCC when the user code never invokes 2633 YYERROR and the label yyerrorlab therefore never appears in user 2634 code. */ 2635 if (/*CONSTCOND*/ 0) 2636 goto yyerrorlab; 2637 2638 /* Do not reclaim the symbols of the rule which action triggered 2639 this YYERROR. */ 2640 YYPOPSTACK (yylen); 2641 yylen = 0; 2642 YY_STACK_PRINT (yyss, yyssp); 2643 yystate = *yyssp; 2644 goto yyerrlab1; 2645 2646 2647 /*-------------------------------------------------------------. 2648 | yyerrlab1 -- common code for both syntax error and YYERROR. | 2649 `-------------------------------------------------------------*/ 2650 yyerrlab1: 2651 yyerrstatus = 3; /* Each real token shifted decrements this. */ 2652 2653 for (;;) 2654 { 2655 yyn = yypact[yystate]; 2656 if (yyn != YYPACT_NINF) 2657 { 2658 yyn += YYTERROR; 2659 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 2660 { 2661 yyn = yytable[yyn]; 2662 if (0 < yyn) 2663 break; 2664 } 2665 } 2666 2667 /* Pop the current state because it cannot handle the error token. */ 2668 if (yyssp == yyss) 2669 YYABORT; 2670 2671 2672 yydestruct ("Error: popping", 2673 yystos[yystate], yyvsp); 2674 YYPOPSTACK (1); 2675 yystate = *yyssp; 2676 YY_STACK_PRINT (yyss, yyssp); 2677 } 2678 2679 if (yyn == YYFINAL) 2680 YYACCEPT; 2681 2682 *++yyvsp = yylval; 2683 2684 2685 /* Shift the error token. */ 2686 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 2687 2688 yystate = yyn; 2689 goto yynewstate; 2690 2691 2692 /*-------------------------------------. 2693 | yyacceptlab -- YYACCEPT comes here. | 2694 `-------------------------------------*/ 2695 yyacceptlab: 2696 yyresult = 0; 2697 goto yyreturn; 2698 2699 /*-----------------------------------. 2700 | yyabortlab -- YYABORT comes here. | 2701 `-----------------------------------*/ 2702 yyabortlab: 2703 yyresult = 1; 2704 goto yyreturn; 2705 2706 #ifndef yyoverflow 2707 /*-------------------------------------------------. 2708 | yyexhaustedlab -- memory exhaustion comes here. | 2709 `-------------------------------------------------*/ 2710 yyexhaustedlab: 2711 yyerror (YY_("memory exhausted")); 2712 yyresult = 2; 2713 /* Fall through. */ 2714 #endif 2715 2716 yyreturn: 2717 if (yychar != YYEOF && yychar != YYEMPTY) 2718 yydestruct ("Cleanup: discarding lookahead", 2719 yytoken, &yylval); 2720 /* Do not reclaim the symbols of the rule which action triggered 2721 this YYABORT or YYACCEPT. */ 2722 YYPOPSTACK (yylen); 2723 YY_STACK_PRINT (yyss, yyssp); 2724 while (yyssp != yyss) 2725 { 2726 yydestruct ("Cleanup: popping", 2727 yystos[*yyssp], yyvsp); 2728 YYPOPSTACK (1); 2729 } 2730 #ifndef yyoverflow 2731 if (yyss != yyssa) 2732 YYSTACK_FREE (yyss); 2733 #endif 2734 #if YYERROR_VERBOSE 2735 if (yymsg != yymsgbuf) 2736 YYSTACK_FREE (yymsg); 2737 #endif 2738 /* Make sure YYID is used. */ 2739 return YYID (yyresult); 2740 } 2741 2742 2743