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