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