github.com/ccccaoqing/test@v0.0.0-20220510085219-3985d23445c0/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 546 415 416 /* YYNTOKENS -- Number of terminals. */ 417 #define YYNTOKENS 54 418 /* YYNNTS -- Number of nonterminals. */ 419 #define YYNNTS 41 420 /* YYNRULES -- Number of rules. */ 421 #define YYNRULES 135 422 /* YYNRULES -- Number of states. */ 423 #define YYNSTATES 276 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, 16, 21, 473 23, 26, 29, 33, 37, 40, 43, 46, 49, 52, 474 55, 58, 61, 64, 67, 70, 73, 76, 79, 82, 475 85, 88, 91, 92, 94, 98, 102, 105, 107, 110, 476 112, 115, 117, 121, 127, 131, 137, 140, 142, 145, 477 147, 149, 153, 159, 163, 169, 172, 174, 178, 182, 478 188, 194, 200, 204, 208, 210, 212, 214, 216, 219, 479 222, 224, 226, 228, 230, 232, 237, 240, 243, 245, 480 247, 249, 251, 253, 255, 258, 261, 264, 267, 272, 481 278, 282, 285, 287, 290, 294, 299, 301, 303, 305, 482 310, 315, 322, 332, 342, 346, 350, 355, 361, 370, 483 372, 379, 385, 393, 394, 397, 400, 402, 404, 406, 484 408, 410, 413, 416, 419, 423, 425, 429, 433, 437, 485 441, 445, 450, 455, 459, 463 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 44, 46, 58, 57, -1, -1, 43, 46, 59, 57, 493 -1, 47, -1, 60, 47, -1, 1, 47, -1, 43, 494 48, 94, -1, 45, 48, 94, -1, 13, 61, -1, 495 14, 65, -1, 15, 64, -1, 16, 62, -1, 17, 496 63, -1, 21, 66, -1, 19, 67, -1, 22, 68, 497 -1, 18, 69, -1, 20, 70, -1, 23, 71, -1, 498 24, 72, -1, 25, 73, -1, 26, 74, -1, 27, 499 75, -1, 28, 76, -1, 29, 77, -1, 30, 78, 500 -1, -1, 49, -1, 81, 49, 79, -1, 79, 49, 501 81, -1, 81, 49, -1, 81, -1, 49, 79, -1, 502 79, -1, 49, 82, -1, 82, -1, 84, 49, 82, 503 -1, 90, 11, 93, 49, 84, -1, 87, 49, 85, 504 -1, 87, 49, 93, 49, 85, -1, 49, 80, -1, 505 80, -1, 10, 90, -1, 61, -1, 65, -1, 81, 506 49, 79, -1, 81, 49, 79, 46, 36, -1, 81, 507 49, 79, -1, 81, 49, 79, 46, 37, -1, 81, 508 49, -1, 81, -1, 81, 49, 79, -1, 87, 49, 509 84, -1, 87, 49, 93, 49, 84, -1, 83, 49, 510 79, 49, 93, -1, 84, 49, 79, 49, 83, -1, 511 81, 49, 81, -1, 81, 49, 81, -1, 83, -1, 512 87, -1, 82, -1, 89, -1, 10, 83, -1, 10, 513 88, -1, 83, -1, 88, -1, 84, -1, 79, -1, 514 84, -1, 93, 50, 33, 51, -1, 43, 91, -1, 515 44, 91, -1, 35, -1, 38, -1, 36, -1, 39, 516 -1, 42, -1, 37, -1, 52, 93, -1, 52, 90, 517 -1, 52, 41, -1, 52, 40, -1, 52, 50, 40, 518 51, -1, 52, 50, 9, 40, 51, -1, 52, 9, 519 40, -1, 52, 86, -1, 31, -1, 9, 31, -1, 520 31, 9, 31, -1, 9, 31, 9, 31, -1, 88, 521 -1, 89, -1, 93, -1, 93, 50, 36, 51, -1, 522 93, 50, 42, 51, -1, 93, 50, 36, 10, 93, 523 51, -1, 93, 50, 36, 51, 50, 36, 10, 93, 524 51, -1, 93, 50, 36, 51, 50, 37, 10, 93, 525 51, -1, 50, 36, 51, -1, 50, 42, 51, -1, 526 93, 50, 37, 51, -1, 50, 36, 10, 93, 51, 527 -1, 50, 36, 51, 50, 36, 10, 93, 51, -1, 528 90, -1, 90, 50, 36, 10, 93, 51, -1, 43, 529 91, 50, 92, 51, -1, 43, 6, 7, 91, 50, 530 34, 51, -1, -1, 8, 93, -1, 9, 93, -1, 531 34, -1, 42, -1, 32, -1, 31, -1, 45, -1, 532 9, 93, -1, 8, 93, -1, 53, 93, -1, 50, 533 94, 51, -1, 93, -1, 94, 8, 94, -1, 94, 534 9, 94, -1, 94, 10, 94, -1, 94, 11, 94, 535 -1, 94, 12, 94, -1, 94, 6, 6, 94, -1, 536 94, 7, 7, 94, -1, 94, 5, 94, -1, 94, 537 4, 94, -1, 94, 3, 94, -1 538 }; 539 540 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 541 static const yytype_uint16 yyrline[] = 542 { 543 0, 69, 69, 71, 70, 78, 77, 85, 84, 90, 544 91, 92, 95, 100, 106, 107, 108, 109, 110, 111, 545 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 546 122, 123, 126, 130, 137, 144, 151, 156, 163, 168, 547 175, 180, 185, 192, 200, 205, 213, 218, 223, 232, 548 233, 236, 241, 251, 256, 266, 271, 276, 283, 288, 549 296, 304, 314, 323, 334, 335, 338, 339, 340, 344, 550 348, 349, 350, 353, 354, 357, 363, 371, 379, 384, 551 389, 394, 399, 404, 411, 417, 428, 434, 440, 446, 552 452, 460, 469, 474, 479, 484, 491, 492, 495, 501, 553 507, 513, 522, 531, 540, 545, 550, 556, 564, 574, 554 578, 587, 594, 603, 606, 610, 616, 617, 621, 624, 555 625, 629, 633, 637, 641, 647, 648, 652, 656, 660, 556 664, 668, 672, 676, 680, 684 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", "LTYPES", 568 "LTYPEM", "LTYPEI", "LTYPEG", "LTYPEXC", "LTYPEX", "LTYPEPC", "LTYPEF", 569 "LCONST", "LFP", "LPC", "LSB", "LBREG", "LLREG", "LSREG", "LFREG", 570 "LXREG", "LFCONST", "LSCONST", "LSP", "LNAME", "LLAB", "LVAR", "':'", 571 "';'", "'='", "','", "'('", "')'", "'$'", "'~'", "$accept", "prog", "@1", 572 "line", "@2", "@3", "inst", "nonnon", "rimrem", "remrim", "rimnon", 573 "nonrem", "nonrel", "spec1", "spec2", "spec3", "spec4", "spec5", "spec6", 574 "spec7", "spec8", "spec9", "spec10", "spec11", "spec12", "rem", "rom", 575 "rim", "rel", "reg", "imm", "imm2", "con2", "mem", "omem", "nmem", "nam", 576 "offset", "pointer", "con", "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, 58, 59, 61, 44, 590 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, 54, 55, 56, 55, 58, 57, 59, 57, 57, 598 57, 57, 60, 60, 60, 60, 60, 60, 60, 60, 599 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 600 60, 60, 61, 61, 62, 63, 64, 64, 65, 65, 601 66, 66, 66, 67, 68, 68, 69, 69, 69, 70, 602 70, 71, 71, 72, 72, 73, 73, 73, 74, 74, 603 75, 76, 77, 78, 79, 79, 80, 80, 80, 80, 604 80, 80, 80, 81, 81, 82, 82, 82, 83, 83, 605 83, 83, 83, 83, 84, 84, 84, 84, 84, 84, 606 84, 85, 86, 86, 86, 86, 87, 87, 88, 88, 607 88, 88, 88, 88, 88, 88, 88, 88, 88, 89, 608 89, 90, 90, 91, 91, 91, 92, 92, 92, 93, 609 93, 93, 93, 93, 93, 94, 94, 94, 94, 94, 610 94, 94, 94, 94, 94, 94 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, 0, 4, 1, 617 2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 618 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 619 2, 2, 0, 1, 3, 3, 2, 1, 2, 1, 620 2, 1, 3, 5, 3, 5, 2, 1, 2, 1, 621 1, 3, 5, 3, 5, 2, 1, 3, 3, 5, 622 5, 5, 3, 3, 1, 1, 1, 1, 2, 2, 623 1, 1, 1, 1, 1, 4, 2, 2, 1, 1, 624 1, 1, 1, 1, 2, 2, 2, 2, 4, 5, 625 3, 2, 1, 2, 3, 4, 1, 1, 1, 4, 626 4, 6, 9, 9, 3, 3, 4, 5, 8, 1, 627 6, 5, 7, 0, 2, 2, 1, 1, 1, 1, 628 1, 2, 2, 2, 3, 1, 3, 3, 3, 3, 629 3, 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, 32, 0, 0, 0, 0, 638 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 639 0, 0, 0, 0, 0, 0, 9, 4, 0, 11, 640 33, 14, 0, 0, 119, 78, 80, 83, 79, 81, 641 82, 113, 120, 0, 0, 0, 15, 39, 64, 65, 642 96, 97, 109, 98, 0, 16, 73, 37, 74, 17, 643 0, 18, 0, 0, 113, 113, 0, 22, 47, 66, 644 70, 72, 71, 67, 98, 20, 0, 33, 49, 50, 645 23, 113, 0, 0, 19, 41, 0, 0, 21, 0, 646 24, 0, 25, 0, 26, 56, 27, 0, 28, 0, 647 29, 0, 30, 0, 31, 0, 7, 0, 5, 0, 648 10, 122, 121, 0, 0, 0, 0, 38, 0, 0, 649 125, 0, 123, 0, 0, 0, 87, 86, 0, 85, 650 84, 36, 0, 0, 68, 69, 48, 76, 77, 0, 651 46, 0, 0, 76, 40, 0, 0, 0, 0, 0, 652 55, 0, 0, 0, 0, 0, 0, 12, 0, 13, 653 113, 114, 115, 0, 0, 104, 105, 0, 0, 0, 654 0, 0, 0, 0, 0, 0, 0, 124, 0, 0, 655 0, 0, 90, 0, 0, 34, 35, 0, 0, 42, 656 0, 44, 0, 51, 53, 57, 58, 0, 0, 0, 657 62, 63, 8, 6, 0, 118, 116, 117, 0, 0, 658 0, 135, 134, 133, 0, 0, 126, 127, 128, 129, 659 130, 0, 0, 99, 106, 100, 0, 88, 75, 0, 660 0, 92, 91, 0, 0, 0, 0, 0, 0, 0, 661 111, 107, 0, 131, 132, 0, 0, 0, 89, 43, 662 93, 0, 45, 52, 54, 59, 60, 61, 0, 0, 663 110, 101, 0, 0, 0, 94, 112, 0, 0, 0, 664 95, 108, 0, 0, 102, 103 665 }; 666 667 /* YYDEFGOTO[NTERM-NUM]. */ 668 static const yytype_int16 yydefgoto[] = 669 { 670 -1, 1, 3, 27, 158, 156, 28, 31, 59, 61, 671 55, 46, 84, 75, 88, 67, 80, 90, 92, 94, 672 96, 98, 100, 102, 104, 56, 68, 57, 69, 48, 673 58, 191, 232, 49, 50, 51, 52, 116, 208, 53, 674 121 675 }; 676 677 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 678 STATE-NUM. */ 679 #define YYPACT_NINF -104 680 static const yytype_int16 yypact[] = 681 { 682 -104, 4, -104, 173, -26, -25, 277, 297, 297, 349, 683 225, -14, 329, 396, 18, 297, 297, 297, 18, 171, 684 -20, 297, 297, 2, -4, 26, -104, -104, 43, -104, 685 -104, -104, 478, 478, -104, -104, -104, -104, -104, -104, 686 -104, 111, -104, 349, 402, 478, -104, -104, -104, -104, 687 -104, -104, -12, -5, 83, -104, -104, 44, -104, -104, 688 46, -104, 49, 349, 111, 113, 245, -104, -104, -104, 689 -104, -104, -104, -104, 50, -104, 100, 349, -104, -104, 690 -104, 113, 420, 478, -104, -104, 64, 66, -104, 78, 691 -104, 80, -104, 85, -104, 89, -104, 93, -104, 98, 692 -104, 101, -104, 112, -104, 121, -104, 478, -104, 478, 693 -104, -104, -104, 153, 478, 478, 135, -104, 8, 163, 694 -104, 74, -104, 179, 52, 427, -104, -104, 445, -104, 695 -104, -104, 349, 297, -104, -104, -104, 135, -104, 381, 696 -104, 33, 478, -104, -104, 420, 186, 451, 349, 349, 697 349, 460, 349, 349, 297, 297, 173, 172, 173, 172, 698 113, -104, -104, 5, 478, 180, -104, 478, 478, 478, 699 226, 224, 478, 478, 478, 478, 478, -104, 235, 36, 700 195, 196, -104, 466, 197, -104, -104, 199, 202, -104, 701 21, -104, 203, 211, 219, -104, -104, 217, 222, 223, 702 -104, -104, -104, -104, 229, -104, -104, -104, 240, 241, 703 237, 232, 527, 534, 478, 478, 134, 134, -104, -104, 704 -104, 478, 478, 243, -104, -104, 248, -104, -104, -20, 705 263, 287, -104, 249, 264, 265, -20, 478, 171, 269, 706 -104, -104, 294, 214, 214, 256, 258, 119, -104, -104, 707 301, 280, -104, -104, -104, -104, -104, -104, 266, 478, 708 -104, -104, 308, 311, 292, -104, -104, 273, 478, 478, 709 -104, -104, 274, 278, -104, -104 710 }; 711 712 /* YYPGOTO[NTERM-NUM]. */ 713 static const yytype_int16 yypgoto[] = 714 { 715 -104, -104, -104, -103, -104, -104, -104, 319, -104, -104, 716 -104, 331, -104, -104, -104, -104, -104, -104, -104, -104, 717 -104, -104, -104, -104, -104, 19, 275, -2, -6, -9, 718 -8, 115, -104, 22, 1, -1, -3, -48, -104, -10, 719 -66 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 74, 70, 71, 87, 2, 86, 60, 85, 76, 73, 730 99, 72, 101, 91, 93, 95, 137, 138, 164, 103, 731 105, 29, 111, 112, 30, 47, 32, 33, 62, 41, 732 230, 47, 54, 143, 120, 122, 89, 205, 123, 206, 733 97, 157, 108, 159, 130, 124, 222, 207, 106, 34, 734 107, 129, 231, 202, 134, 203, 74, 70, 71, 165, 735 136, 41, 117, 42, 135, 73, 187, 72, 44, 179, 736 180, 45, 87, 120, 109, 181, 144, 167, 168, 169, 737 170, 171, 172, 173, 174, 175, 176, 223, 179, 180, 738 110, 32, 125, 131, 181, 132, 117, 120, 133, 120, 739 141, 211, 212, 213, 161, 162, 216, 217, 218, 219, 740 220, 142, 204, 145, 34, 112, 146, 113, 120, 114, 741 115, 114, 115, 126, 127, 177, 41, 147, 42, 148, 742 134, 186, 188, 128, 149, 87, 45, 192, 150, 189, 743 135, 197, 151, 196, 174, 175, 176, 152, 243, 244, 744 153, 185, 200, 201, 209, 262, 263, 120, 120, 120, 745 160, 154, 120, 120, 120, 120, 120, 193, 194, 195, 746 155, 198, 199, 112, 4, 167, 168, 169, 170, 171, 747 172, 173, 174, 175, 176, 163, 5, 6, 7, 8, 748 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 749 19, 20, 21, 22, 120, 120, 35, 36, 37, 38, 750 39, 245, 246, 40, 166, 178, 23, 24, 25, 187, 751 26, 249, 172, 173, 174, 175, 176, 256, 255, 257, 752 210, 215, 214, 32, 33, 63, 168, 169, 170, 171, 753 172, 173, 174, 175, 176, 221, 224, 225, 227, 267, 754 228, 229, 233, 32, 33, 139, 34, 234, 272, 273, 755 35, 36, 37, 38, 39, 235, 236, 40, 64, 65, 756 42, 237, 238, 242, 66, 44, 34, 54, 45, 239, 757 35, 36, 37, 38, 39, 32, 33, 40, 64, 65, 758 42, 240, 241, 247, 250, 44, 251, 54, 45, 248, 759 253, 190, 254, 258, 259, 32, 33, 260, 34, 261, 760 264, 265, 35, 36, 37, 38, 39, 266, 268, 40, 761 41, 269, 42, 270, 271, 274, 43, 44, 34, 275, 762 45, 78, 35, 36, 37, 38, 39, 32, 33, 40, 763 41, 140, 42, 79, 0, 0, 0, 44, 252, 54, 764 45, 0, 0, 0, 0, 0, 0, 32, 33, 0, 765 34, 0, 0, 0, 35, 36, 37, 38, 39, 0, 766 0, 40, 41, 0, 42, 0, 0, 0, 77, 44, 767 34, 0, 45, 0, 35, 36, 37, 38, 39, 32, 768 33, 40, 41, 0, 42, 0, 0, 0, 0, 44, 769 0, 0, 45, 0, 32, 33, 0, 0, 0, 0, 770 32, 33, 34, 0, 0, 0, 35, 36, 37, 38, 771 39, 0, 0, 40, 0, 0, 42, 34, 32, 33, 772 0, 44, 0, 34, 45, 32, 33, 0, 118, 81, 773 65, 42, 0, 0, 119, 82, 83, 42, 54, 45, 774 0, 34, 83, 32, 183, 45, 0, 0, 34, 32, 775 33, 0, 0, 81, 65, 42, 0, 182, 32, 33, 776 83, 0, 42, 45, 32, 33, 34, 83, 0, 0, 777 45, 0, 34, 0, 0, 184, 32, 33, 0, 0, 778 42, 34, 0, 0, 0, 83, 42, 34, 45, 0, 779 0, 83, 0, 190, 45, 42, 226, 0, 0, 34, 780 83, 42, 54, 45, 0, 0, 83, 0, 0, 45, 781 0, 0, 0, 42, 0, 0, 0, 0, 83, 0, 782 0, 45, 169, 170, 171, 172, 173, 174, 175, 176, 783 170, 171, 172, 173, 174, 175, 176 784 }; 785 786 static const yytype_int16 yycheck[] = 787 { 788 10, 10, 10, 13, 0, 13, 8, 13, 11, 10, 789 19, 10, 20, 15, 16, 17, 64, 65, 10, 21, 790 22, 47, 32, 33, 49, 6, 8, 9, 9, 43, 791 9, 12, 52, 81, 44, 45, 14, 32, 50, 34, 792 18, 107, 46, 109, 54, 50, 10, 42, 46, 31, 793 48, 54, 31, 156, 63, 158, 66, 66, 66, 51, 794 63, 43, 43, 45, 63, 66, 33, 66, 50, 36, 795 37, 53, 82, 83, 48, 42, 82, 3, 4, 5, 796 6, 7, 8, 9, 10, 11, 12, 51, 36, 37, 797 47, 8, 9, 49, 42, 49, 77, 107, 49, 109, 798 50, 167, 168, 169, 114, 115, 172, 173, 174, 175, 799 176, 11, 160, 49, 31, 125, 50, 6, 128, 8, 800 9, 8, 9, 40, 41, 51, 43, 49, 45, 49, 801 139, 133, 142, 50, 49, 145, 53, 147, 49, 145, 802 139, 151, 49, 151, 10, 11, 12, 49, 214, 215, 803 49, 132, 154, 155, 164, 36, 37, 167, 168, 169, 804 7, 49, 172, 173, 174, 175, 176, 148, 149, 150, 805 49, 152, 153, 183, 1, 3, 4, 5, 6, 7, 806 8, 9, 10, 11, 12, 50, 13, 14, 15, 16, 807 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 808 27, 28, 29, 30, 214, 215, 35, 36, 37, 38, 809 39, 221, 222, 42, 51, 36, 43, 44, 45, 33, 810 47, 229, 8, 9, 10, 11, 12, 237, 236, 238, 811 50, 7, 6, 8, 9, 10, 4, 5, 6, 7, 812 8, 9, 10, 11, 12, 10, 51, 51, 51, 259, 813 51, 49, 49, 8, 9, 10, 31, 46, 268, 269, 814 35, 36, 37, 38, 39, 46, 49, 42, 43, 44, 815 45, 49, 49, 36, 49, 50, 31, 52, 53, 50, 816 35, 36, 37, 38, 39, 8, 9, 42, 43, 44, 817 45, 51, 51, 50, 31, 50, 9, 52, 53, 51, 818 36, 52, 37, 34, 10, 8, 9, 51, 31, 51, 819 9, 31, 35, 36, 37, 38, 39, 51, 10, 42, 820 43, 10, 45, 31, 51, 51, 49, 50, 31, 51, 821 53, 12, 35, 36, 37, 38, 39, 8, 9, 42, 822 43, 66, 45, 12, -1, -1, -1, 50, 233, 52, 823 53, -1, -1, -1, -1, -1, -1, 8, 9, -1, 824 31, -1, -1, -1, 35, 36, 37, 38, 39, -1, 825 -1, 42, 43, -1, 45, -1, -1, -1, 49, 50, 826 31, -1, 53, -1, 35, 36, 37, 38, 39, 8, 827 9, 42, 43, -1, 45, -1, -1, -1, -1, 50, 828 -1, -1, 53, -1, 8, 9, -1, -1, -1, -1, 829 8, 9, 31, -1, -1, -1, 35, 36, 37, 38, 830 39, -1, -1, 42, -1, -1, 45, 31, 8, 9, 831 -1, 50, -1, 31, 53, 8, 9, -1, 36, 43, 832 44, 45, -1, -1, 42, 49, 50, 45, 52, 53, 833 -1, 31, 50, 8, 9, 53, -1, -1, 31, 8, 834 9, -1, -1, 43, 44, 45, -1, 40, 8, 9, 835 50, -1, 45, 53, 8, 9, 31, 50, -1, -1, 836 53, -1, 31, -1, -1, 40, 8, 9, -1, -1, 837 45, 31, -1, -1, -1, 50, 45, 31, 53, -1, 838 -1, 50, -1, 52, 53, 45, 40, -1, -1, 31, 839 50, 45, 52, 53, -1, -1, 50, -1, -1, 53, 840 -1, -1, -1, 45, -1, -1, -1, -1, 50, -1, 841 -1, 53, 5, 6, 7, 8, 9, 10, 11, 12, 842 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, 55, 0, 56, 1, 13, 14, 15, 16, 17, 850 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 851 28, 29, 30, 43, 44, 45, 47, 57, 60, 47, 852 49, 61, 8, 9, 31, 35, 36, 37, 38, 39, 853 42, 43, 45, 49, 50, 53, 65, 79, 83, 87, 854 88, 89, 90, 93, 52, 64, 79, 81, 84, 62, 855 81, 63, 79, 10, 43, 44, 49, 69, 80, 82, 856 83, 84, 88, 89, 93, 67, 90, 49, 61, 65, 857 70, 43, 49, 50, 66, 82, 84, 93, 68, 87, 858 71, 81, 72, 81, 73, 81, 74, 87, 75, 83, 859 76, 84, 77, 81, 78, 81, 46, 48, 46, 48, 860 47, 93, 93, 6, 8, 9, 91, 79, 36, 42, 861 93, 94, 93, 50, 50, 9, 40, 41, 50, 90, 862 93, 49, 49, 49, 83, 88, 90, 91, 91, 10, 863 80, 50, 11, 91, 82, 49, 50, 49, 49, 49, 864 49, 49, 49, 49, 49, 49, 59, 94, 58, 94, 865 7, 93, 93, 50, 10, 51, 51, 3, 4, 5, 866 6, 7, 8, 9, 10, 11, 12, 51, 36, 36, 867 37, 42, 40, 9, 40, 79, 81, 33, 93, 82, 868 52, 85, 93, 79, 79, 79, 84, 93, 79, 79, 869 81, 81, 57, 57, 91, 32, 34, 42, 92, 93, 870 50, 94, 94, 94, 6, 7, 94, 94, 94, 94, 871 94, 10, 10, 51, 51, 51, 40, 51, 51, 49, 872 9, 31, 86, 49, 46, 46, 49, 49, 49, 50, 873 51, 51, 36, 94, 94, 93, 93, 50, 51, 84, 874 31, 9, 85, 36, 37, 84, 93, 83, 34, 10, 875 51, 51, 36, 37, 9, 31, 51, 93, 10, 10, 876 31, 51, 93, 93, 51, 51 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 71 "a.y" 1692 { 1693 stmtline = lineno; 1694 } 1695 break; 1696 1697 case 5: 1698 #line 78 "a.y" 1699 { 1700 if((yyvsp[(1) - (2)].sym)->value != pc) 1701 yyerror("redeclaration of %s", (yyvsp[(1) - (2)].sym)->name); 1702 (yyvsp[(1) - (2)].sym)->value = pc; 1703 } 1704 break; 1705 1706 case 7: 1707 #line 85 "a.y" 1708 { 1709 (yyvsp[(1) - (2)].sym)->type = LLAB; 1710 (yyvsp[(1) - (2)].sym)->value = pc; 1711 } 1712 break; 1713 1714 case 12: 1715 #line 96 "a.y" 1716 { 1717 (yyvsp[(1) - (3)].sym)->type = LVAR; 1718 (yyvsp[(1) - (3)].sym)->value = (yyvsp[(3) - (3)].lval); 1719 } 1720 break; 1721 1722 case 13: 1723 #line 101 "a.y" 1724 { 1725 if((yyvsp[(1) - (3)].sym)->value != (yyvsp[(3) - (3)].lval)) 1726 yyerror("redeclaration of %s", (yyvsp[(1) - (3)].sym)->name); 1727 (yyvsp[(1) - (3)].sym)->value = (yyvsp[(3) - (3)].lval); 1728 } 1729 break; 1730 1731 case 14: 1732 #line 106 "a.y" 1733 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].addr2)); } 1734 break; 1735 1736 case 15: 1737 #line 107 "a.y" 1738 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].addr2)); } 1739 break; 1740 1741 case 16: 1742 #line 108 "a.y" 1743 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].addr2)); } 1744 break; 1745 1746 case 17: 1747 #line 109 "a.y" 1748 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].addr2)); } 1749 break; 1750 1751 case 18: 1752 #line 110 "a.y" 1753 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].addr2)); } 1754 break; 1755 1756 case 19: 1757 #line 111 "a.y" 1758 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].addr2)); } 1759 break; 1760 1761 case 20: 1762 #line 112 "a.y" 1763 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].addr2)); } 1764 break; 1765 1766 case 21: 1767 #line 113 "a.y" 1768 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].addr2)); } 1769 break; 1770 1771 case 22: 1772 #line 114 "a.y" 1773 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].addr2)); } 1774 break; 1775 1776 case 23: 1777 #line 115 "a.y" 1778 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].addr2)); } 1779 break; 1780 1781 case 24: 1782 #line 116 "a.y" 1783 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].addr2)); } 1784 break; 1785 1786 case 25: 1787 #line 117 "a.y" 1788 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].addr2)); } 1789 break; 1790 1791 case 26: 1792 #line 118 "a.y" 1793 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].addr2)); } 1794 break; 1795 1796 case 27: 1797 #line 119 "a.y" 1798 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].addr2)); } 1799 break; 1800 1801 case 28: 1802 #line 120 "a.y" 1803 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].addr2)); } 1804 break; 1805 1806 case 29: 1807 #line 121 "a.y" 1808 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].addr2)); } 1809 break; 1810 1811 case 30: 1812 #line 122 "a.y" 1813 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].addr2)); } 1814 break; 1815 1816 case 31: 1817 #line 123 "a.y" 1818 { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].addr2)); } 1819 break; 1820 1821 case 32: 1822 #line 126 "a.y" 1823 { 1824 (yyval.addr2).from = nullgen; 1825 (yyval.addr2).to = nullgen; 1826 } 1827 break; 1828 1829 case 33: 1830 #line 131 "a.y" 1831 { 1832 (yyval.addr2).from = nullgen; 1833 (yyval.addr2).to = nullgen; 1834 } 1835 break; 1836 1837 case 34: 1838 #line 138 "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 35: 1846 #line 145 "a.y" 1847 { 1848 (yyval.addr2).from = (yyvsp[(1) - (3)].addr); 1849 (yyval.addr2).to = (yyvsp[(3) - (3)].addr); 1850 } 1851 break; 1852 1853 case 36: 1854 #line 152 "a.y" 1855 { 1856 (yyval.addr2).from = (yyvsp[(1) - (2)].addr); 1857 (yyval.addr2).to = nullgen; 1858 } 1859 break; 1860 1861 case 37: 1862 #line 157 "a.y" 1863 { 1864 (yyval.addr2).from = (yyvsp[(1) - (1)].addr); 1865 (yyval.addr2).to = nullgen; 1866 } 1867 break; 1868 1869 case 38: 1870 #line 164 "a.y" 1871 { 1872 (yyval.addr2).from = nullgen; 1873 (yyval.addr2).to = (yyvsp[(2) - (2)].addr); 1874 } 1875 break; 1876 1877 case 39: 1878 #line 169 "a.y" 1879 { 1880 (yyval.addr2).from = nullgen; 1881 (yyval.addr2).to = (yyvsp[(1) - (1)].addr); 1882 } 1883 break; 1884 1885 case 40: 1886 #line 176 "a.y" 1887 { 1888 (yyval.addr2).from = nullgen; 1889 (yyval.addr2).to = (yyvsp[(2) - (2)].addr); 1890 } 1891 break; 1892 1893 case 41: 1894 #line 181 "a.y" 1895 { 1896 (yyval.addr2).from = nullgen; 1897 (yyval.addr2).to = (yyvsp[(1) - (1)].addr); 1898 } 1899 break; 1900 1901 case 42: 1902 #line 186 "a.y" 1903 { 1904 (yyval.addr2).from = (yyvsp[(1) - (3)].addr); 1905 (yyval.addr2).to = (yyvsp[(3) - (3)].addr); 1906 } 1907 break; 1908 1909 case 43: 1910 #line 193 "a.y" 1911 { 1912 (yyval.addr2).from = (yyvsp[(1) - (5)].addr); 1913 (yyval.addr2).from.scale = (yyvsp[(3) - (5)].lval); 1914 (yyval.addr2).to = (yyvsp[(5) - (5)].addr); 1915 } 1916 break; 1917 1918 case 44: 1919 #line 201 "a.y" 1920 { 1921 (yyval.addr2).from = (yyvsp[(1) - (3)].addr); 1922 (yyval.addr2).to = (yyvsp[(3) - (3)].addr); 1923 } 1924 break; 1925 1926 case 45: 1927 #line 206 "a.y" 1928 { 1929 (yyval.addr2).from = (yyvsp[(1) - (5)].addr); 1930 (yyval.addr2).from.scale = (yyvsp[(3) - (5)].lval); 1931 (yyval.addr2).to = (yyvsp[(5) - (5)].addr); 1932 } 1933 break; 1934 1935 case 46: 1936 #line 214 "a.y" 1937 { 1938 (yyval.addr2).from = nullgen; 1939 (yyval.addr2).to = (yyvsp[(2) - (2)].addr); 1940 } 1941 break; 1942 1943 case 47: 1944 #line 219 "a.y" 1945 { 1946 (yyval.addr2).from = nullgen; 1947 (yyval.addr2).to = (yyvsp[(1) - (1)].addr); 1948 } 1949 break; 1950 1951 case 48: 1952 #line 224 "a.y" 1953 { 1954 (yyval.addr2).from = nullgen; 1955 (yyval.addr2).to = (yyvsp[(2) - (2)].addr); 1956 (yyval.addr2).to.index = (yyvsp[(2) - (2)].addr).type; 1957 (yyval.addr2).to.type = D_INDIR+D_ADDR; 1958 } 1959 break; 1960 1961 case 51: 1962 #line 237 "a.y" 1963 { 1964 (yyval.addr2).from = (yyvsp[(1) - (3)].addr); 1965 (yyval.addr2).to = (yyvsp[(3) - (3)].addr); 1966 } 1967 break; 1968 1969 case 52: 1970 #line 242 "a.y" 1971 { 1972 (yyval.addr2).from = (yyvsp[(1) - (5)].addr); 1973 (yyval.addr2).to = (yyvsp[(3) - (5)].addr); 1974 if((yyval.addr2).from.index != D_NONE) 1975 yyerror("dp shift with lhs index"); 1976 (yyval.addr2).from.index = (yyvsp[(5) - (5)].lval); 1977 } 1978 break; 1979 1980 case 53: 1981 #line 252 "a.y" 1982 { 1983 (yyval.addr2).from = (yyvsp[(1) - (3)].addr); 1984 (yyval.addr2).to = (yyvsp[(3) - (3)].addr); 1985 } 1986 break; 1987 1988 case 54: 1989 #line 257 "a.y" 1990 { 1991 (yyval.addr2).from = (yyvsp[(1) - (5)].addr); 1992 (yyval.addr2).to = (yyvsp[(3) - (5)].addr); 1993 if((yyval.addr2).to.index != D_NONE) 1994 yyerror("dp move with lhs index"); 1995 (yyval.addr2).to.index = (yyvsp[(5) - (5)].lval); 1996 } 1997 break; 1998 1999 case 55: 2000 #line 267 "a.y" 2001 { 2002 (yyval.addr2).from = (yyvsp[(1) - (2)].addr); 2003 (yyval.addr2).to = nullgen; 2004 } 2005 break; 2006 2007 case 56: 2008 #line 272 "a.y" 2009 { 2010 (yyval.addr2).from = (yyvsp[(1) - (1)].addr); 2011 (yyval.addr2).to = nullgen; 2012 } 2013 break; 2014 2015 case 57: 2016 #line 277 "a.y" 2017 { 2018 (yyval.addr2).from = (yyvsp[(1) - (3)].addr); 2019 (yyval.addr2).to = (yyvsp[(3) - (3)].addr); 2020 } 2021 break; 2022 2023 case 58: 2024 #line 284 "a.y" 2025 { 2026 (yyval.addr2).from = (yyvsp[(1) - (3)].addr); 2027 (yyval.addr2).to = (yyvsp[(3) - (3)].addr); 2028 } 2029 break; 2030 2031 case 59: 2032 #line 289 "a.y" 2033 { 2034 (yyval.addr2).from = (yyvsp[(1) - (5)].addr); 2035 (yyval.addr2).from.scale = (yyvsp[(3) - (5)].lval); 2036 (yyval.addr2).to = (yyvsp[(5) - (5)].addr); 2037 } 2038 break; 2039 2040 case 60: 2041 #line 297 "a.y" 2042 { 2043 (yyval.addr2).from = (yyvsp[(1) - (5)].addr); 2044 (yyval.addr2).to = (yyvsp[(3) - (5)].addr); 2045 (yyval.addr2).to.offset = (yyvsp[(5) - (5)].lval); 2046 } 2047 break; 2048 2049 case 61: 2050 #line 305 "a.y" 2051 { 2052 (yyval.addr2).from = (yyvsp[(3) - (5)].addr); 2053 (yyval.addr2).to = (yyvsp[(5) - (5)].addr); 2054 if((yyvsp[(1) - (5)].addr).type != D_CONST) 2055 yyerror("illegal constant"); 2056 (yyval.addr2).to.offset = (yyvsp[(1) - (5)].addr).offset; 2057 } 2058 break; 2059 2060 case 62: 2061 #line 315 "a.y" 2062 { 2063 if((yyvsp[(1) - (3)].addr).type != D_CONST || (yyvsp[(3) - (3)].addr).type != D_CONST) 2064 yyerror("arguments to PCDATA must be integer constants"); 2065 (yyval.addr2).from = (yyvsp[(1) - (3)].addr); 2066 (yyval.addr2).to = (yyvsp[(3) - (3)].addr); 2067 } 2068 break; 2069 2070 case 63: 2071 #line 324 "a.y" 2072 { 2073 if((yyvsp[(1) - (3)].addr).type != D_CONST) 2074 yyerror("index for FUNCDATA must be integer constant"); 2075 if((yyvsp[(3) - (3)].addr).type != D_EXTERN && (yyvsp[(3) - (3)].addr).type != D_STATIC) 2076 yyerror("value for FUNCDATA must be symbol reference"); 2077 (yyval.addr2).from = (yyvsp[(1) - (3)].addr); 2078 (yyval.addr2).to = (yyvsp[(3) - (3)].addr); 2079 } 2080 break; 2081 2082 case 68: 2083 #line 341 "a.y" 2084 { 2085 (yyval.addr) = (yyvsp[(2) - (2)].addr); 2086 } 2087 break; 2088 2089 case 69: 2090 #line 345 "a.y" 2091 { 2092 (yyval.addr) = (yyvsp[(2) - (2)].addr); 2093 } 2094 break; 2095 2096 case 75: 2097 #line 358 "a.y" 2098 { 2099 (yyval.addr) = nullgen; 2100 (yyval.addr).type = D_BRANCH; 2101 (yyval.addr).offset = (yyvsp[(1) - (4)].lval) + pc; 2102 } 2103 break; 2104 2105 case 76: 2106 #line 364 "a.y" 2107 { 2108 (yyval.addr) = nullgen; 2109 if(pass == 2) 2110 yyerror("undefined label: %s", (yyvsp[(1) - (2)].sym)->name); 2111 (yyval.addr).type = D_BRANCH; 2112 (yyval.addr).offset = (yyvsp[(2) - (2)].lval); 2113 } 2114 break; 2115 2116 case 77: 2117 #line 372 "a.y" 2118 { 2119 (yyval.addr) = nullgen; 2120 (yyval.addr).type = D_BRANCH; 2121 (yyval.addr).offset = (yyvsp[(1) - (2)].sym)->value + (yyvsp[(2) - (2)].lval); 2122 } 2123 break; 2124 2125 case 78: 2126 #line 380 "a.y" 2127 { 2128 (yyval.addr) = nullgen; 2129 (yyval.addr).type = (yyvsp[(1) - (1)].lval); 2130 } 2131 break; 2132 2133 case 79: 2134 #line 385 "a.y" 2135 { 2136 (yyval.addr) = nullgen; 2137 (yyval.addr).type = (yyvsp[(1) - (1)].lval); 2138 } 2139 break; 2140 2141 case 80: 2142 #line 390 "a.y" 2143 { 2144 (yyval.addr) = nullgen; 2145 (yyval.addr).type = (yyvsp[(1) - (1)].lval); 2146 } 2147 break; 2148 2149 case 81: 2150 #line 395 "a.y" 2151 { 2152 (yyval.addr) = nullgen; 2153 (yyval.addr).type = (yyvsp[(1) - (1)].lval); 2154 } 2155 break; 2156 2157 case 82: 2158 #line 400 "a.y" 2159 { 2160 (yyval.addr) = nullgen; 2161 (yyval.addr).type = D_SP; 2162 } 2163 break; 2164 2165 case 83: 2166 #line 405 "a.y" 2167 { 2168 (yyval.addr) = nullgen; 2169 (yyval.addr).type = (yyvsp[(1) - (1)].lval); 2170 } 2171 break; 2172 2173 case 84: 2174 #line 412 "a.y" 2175 { 2176 (yyval.addr) = nullgen; 2177 (yyval.addr).type = D_CONST; 2178 (yyval.addr).offset = (yyvsp[(2) - (2)].lval); 2179 } 2180 break; 2181 2182 case 85: 2183 #line 418 "a.y" 2184 { 2185 (yyval.addr) = (yyvsp[(2) - (2)].addr); 2186 (yyval.addr).index = (yyvsp[(2) - (2)].addr).type; 2187 (yyval.addr).type = D_ADDR; 2188 /* 2189 if($2.type == D_AUTO || $2.type == D_PARAM) 2190 yyerror("constant cannot be automatic: %s", 2191 $2.sym->name); 2192 */ 2193 } 2194 break; 2195 2196 case 86: 2197 #line 429 "a.y" 2198 { 2199 (yyval.addr) = nullgen; 2200 (yyval.addr).type = D_SCONST; 2201 memcpy((yyval.addr).u.sval, (yyvsp[(2) - (2)].sval), sizeof((yyval.addr).u.sval)); 2202 } 2203 break; 2204 2205 case 87: 2206 #line 435 "a.y" 2207 { 2208 (yyval.addr) = nullgen; 2209 (yyval.addr).type = D_FCONST; 2210 (yyval.addr).u.dval = (yyvsp[(2) - (2)].dval); 2211 } 2212 break; 2213 2214 case 88: 2215 #line 441 "a.y" 2216 { 2217 (yyval.addr) = nullgen; 2218 (yyval.addr).type = D_FCONST; 2219 (yyval.addr).u.dval = (yyvsp[(3) - (4)].dval); 2220 } 2221 break; 2222 2223 case 89: 2224 #line 447 "a.y" 2225 { 2226 (yyval.addr) = nullgen; 2227 (yyval.addr).type = D_FCONST; 2228 (yyval.addr).u.dval = -(yyvsp[(4) - (5)].dval); 2229 } 2230 break; 2231 2232 case 90: 2233 #line 453 "a.y" 2234 { 2235 (yyval.addr) = nullgen; 2236 (yyval.addr).type = D_FCONST; 2237 (yyval.addr).u.dval = -(yyvsp[(3) - (3)].dval); 2238 } 2239 break; 2240 2241 case 91: 2242 #line 461 "a.y" 2243 { 2244 (yyval.addr) = nullgen; 2245 (yyval.addr).type = D_CONST2; 2246 (yyval.addr).offset = (yyvsp[(2) - (2)].con2).v1; 2247 (yyval.addr).offset2 = (yyvsp[(2) - (2)].con2).v2; 2248 } 2249 break; 2250 2251 case 92: 2252 #line 470 "a.y" 2253 { 2254 (yyval.con2).v1 = (yyvsp[(1) - (1)].lval); 2255 (yyval.con2).v2 = ArgsSizeUnknown; 2256 } 2257 break; 2258 2259 case 93: 2260 #line 475 "a.y" 2261 { 2262 (yyval.con2).v1 = -(yyvsp[(2) - (2)].lval); 2263 (yyval.con2).v2 = ArgsSizeUnknown; 2264 } 2265 break; 2266 2267 case 94: 2268 #line 480 "a.y" 2269 { 2270 (yyval.con2).v1 = (yyvsp[(1) - (3)].lval); 2271 (yyval.con2).v2 = (yyvsp[(3) - (3)].lval); 2272 } 2273 break; 2274 2275 case 95: 2276 #line 485 "a.y" 2277 { 2278 (yyval.con2).v1 = -(yyvsp[(2) - (4)].lval); 2279 (yyval.con2).v2 = (yyvsp[(4) - (4)].lval); 2280 } 2281 break; 2282 2283 case 98: 2284 #line 496 "a.y" 2285 { 2286 (yyval.addr) = nullgen; 2287 (yyval.addr).type = D_INDIR+D_NONE; 2288 (yyval.addr).offset = (yyvsp[(1) - (1)].lval); 2289 } 2290 break; 2291 2292 case 99: 2293 #line 502 "a.y" 2294 { 2295 (yyval.addr) = nullgen; 2296 (yyval.addr).type = D_INDIR+(yyvsp[(3) - (4)].lval); 2297 (yyval.addr).offset = (yyvsp[(1) - (4)].lval); 2298 } 2299 break; 2300 2301 case 100: 2302 #line 508 "a.y" 2303 { 2304 (yyval.addr) = nullgen; 2305 (yyval.addr).type = D_INDIR+D_SP; 2306 (yyval.addr).offset = (yyvsp[(1) - (4)].lval); 2307 } 2308 break; 2309 2310 case 101: 2311 #line 514 "a.y" 2312 { 2313 (yyval.addr) = nullgen; 2314 (yyval.addr).type = D_INDIR+D_NONE; 2315 (yyval.addr).offset = (yyvsp[(1) - (6)].lval); 2316 (yyval.addr).index = (yyvsp[(3) - (6)].lval); 2317 (yyval.addr).scale = (yyvsp[(5) - (6)].lval); 2318 checkscale((yyval.addr).scale); 2319 } 2320 break; 2321 2322 case 102: 2323 #line 523 "a.y" 2324 { 2325 (yyval.addr) = nullgen; 2326 (yyval.addr).type = D_INDIR+(yyvsp[(3) - (9)].lval); 2327 (yyval.addr).offset = (yyvsp[(1) - (9)].lval); 2328 (yyval.addr).index = (yyvsp[(6) - (9)].lval); 2329 (yyval.addr).scale = (yyvsp[(8) - (9)].lval); 2330 checkscale((yyval.addr).scale); 2331 } 2332 break; 2333 2334 case 103: 2335 #line 532 "a.y" 2336 { 2337 (yyval.addr) = nullgen; 2338 (yyval.addr).type = D_INDIR+(yyvsp[(3) - (9)].lval); 2339 (yyval.addr).offset = (yyvsp[(1) - (9)].lval); 2340 (yyval.addr).index = (yyvsp[(6) - (9)].lval); 2341 (yyval.addr).scale = (yyvsp[(8) - (9)].lval); 2342 checkscale((yyval.addr).scale); 2343 } 2344 break; 2345 2346 case 104: 2347 #line 541 "a.y" 2348 { 2349 (yyval.addr) = nullgen; 2350 (yyval.addr).type = D_INDIR+(yyvsp[(2) - (3)].lval); 2351 } 2352 break; 2353 2354 case 105: 2355 #line 546 "a.y" 2356 { 2357 (yyval.addr) = nullgen; 2358 (yyval.addr).type = D_INDIR+D_SP; 2359 } 2360 break; 2361 2362 case 106: 2363 #line 551 "a.y" 2364 { 2365 (yyval.addr) = nullgen; 2366 (yyval.addr).type = D_INDIR+(yyvsp[(3) - (4)].lval); 2367 (yyval.addr).offset = (yyvsp[(1) - (4)].lval); 2368 } 2369 break; 2370 2371 case 107: 2372 #line 557 "a.y" 2373 { 2374 (yyval.addr) = nullgen; 2375 (yyval.addr).type = D_INDIR+D_NONE; 2376 (yyval.addr).index = (yyvsp[(2) - (5)].lval); 2377 (yyval.addr).scale = (yyvsp[(4) - (5)].lval); 2378 checkscale((yyval.addr).scale); 2379 } 2380 break; 2381 2382 case 108: 2383 #line 565 "a.y" 2384 { 2385 (yyval.addr) = nullgen; 2386 (yyval.addr).type = D_INDIR+(yyvsp[(2) - (8)].lval); 2387 (yyval.addr).index = (yyvsp[(5) - (8)].lval); 2388 (yyval.addr).scale = (yyvsp[(7) - (8)].lval); 2389 checkscale((yyval.addr).scale); 2390 } 2391 break; 2392 2393 case 109: 2394 #line 575 "a.y" 2395 { 2396 (yyval.addr) = (yyvsp[(1) - (1)].addr); 2397 } 2398 break; 2399 2400 case 110: 2401 #line 579 "a.y" 2402 { 2403 (yyval.addr) = (yyvsp[(1) - (6)].addr); 2404 (yyval.addr).index = (yyvsp[(3) - (6)].lval); 2405 (yyval.addr).scale = (yyvsp[(5) - (6)].lval); 2406 checkscale((yyval.addr).scale); 2407 } 2408 break; 2409 2410 case 111: 2411 #line 588 "a.y" 2412 { 2413 (yyval.addr) = nullgen; 2414 (yyval.addr).type = (yyvsp[(4) - (5)].lval); 2415 (yyval.addr).sym = linklookup(ctxt, (yyvsp[(1) - (5)].sym)->name, 0); 2416 (yyval.addr).offset = (yyvsp[(2) - (5)].lval); 2417 } 2418 break; 2419 2420 case 112: 2421 #line 595 "a.y" 2422 { 2423 (yyval.addr) = nullgen; 2424 (yyval.addr).type = D_STATIC; 2425 (yyval.addr).sym = linklookup(ctxt, (yyvsp[(1) - (7)].sym)->name, 1); 2426 (yyval.addr).offset = (yyvsp[(4) - (7)].lval); 2427 } 2428 break; 2429 2430 case 113: 2431 #line 603 "a.y" 2432 { 2433 (yyval.lval) = 0; 2434 } 2435 break; 2436 2437 case 114: 2438 #line 607 "a.y" 2439 { 2440 (yyval.lval) = (yyvsp[(2) - (2)].lval); 2441 } 2442 break; 2443 2444 case 115: 2445 #line 611 "a.y" 2446 { 2447 (yyval.lval) = -(yyvsp[(2) - (2)].lval); 2448 } 2449 break; 2450 2451 case 117: 2452 #line 618 "a.y" 2453 { 2454 (yyval.lval) = D_AUTO; 2455 } 2456 break; 2457 2458 case 120: 2459 #line 626 "a.y" 2460 { 2461 (yyval.lval) = (yyvsp[(1) - (1)].sym)->value; 2462 } 2463 break; 2464 2465 case 121: 2466 #line 630 "a.y" 2467 { 2468 (yyval.lval) = -(yyvsp[(2) - (2)].lval); 2469 } 2470 break; 2471 2472 case 122: 2473 #line 634 "a.y" 2474 { 2475 (yyval.lval) = (yyvsp[(2) - (2)].lval); 2476 } 2477 break; 2478 2479 case 123: 2480 #line 638 "a.y" 2481 { 2482 (yyval.lval) = ~(yyvsp[(2) - (2)].lval); 2483 } 2484 break; 2485 2486 case 124: 2487 #line 642 "a.y" 2488 { 2489 (yyval.lval) = (yyvsp[(2) - (3)].lval); 2490 } 2491 break; 2492 2493 case 126: 2494 #line 649 "a.y" 2495 { 2496 (yyval.lval) = (yyvsp[(1) - (3)].lval) + (yyvsp[(3) - (3)].lval); 2497 } 2498 break; 2499 2500 case 127: 2501 #line 653 "a.y" 2502 { 2503 (yyval.lval) = (yyvsp[(1) - (3)].lval) - (yyvsp[(3) - (3)].lval); 2504 } 2505 break; 2506 2507 case 128: 2508 #line 657 "a.y" 2509 { 2510 (yyval.lval) = (yyvsp[(1) - (3)].lval) * (yyvsp[(3) - (3)].lval); 2511 } 2512 break; 2513 2514 case 129: 2515 #line 661 "a.y" 2516 { 2517 (yyval.lval) = (yyvsp[(1) - (3)].lval) / (yyvsp[(3) - (3)].lval); 2518 } 2519 break; 2520 2521 case 130: 2522 #line 665 "a.y" 2523 { 2524 (yyval.lval) = (yyvsp[(1) - (3)].lval) % (yyvsp[(3) - (3)].lval); 2525 } 2526 break; 2527 2528 case 131: 2529 #line 669 "a.y" 2530 { 2531 (yyval.lval) = (yyvsp[(1) - (4)].lval) << (yyvsp[(4) - (4)].lval); 2532 } 2533 break; 2534 2535 case 132: 2536 #line 673 "a.y" 2537 { 2538 (yyval.lval) = (yyvsp[(1) - (4)].lval) >> (yyvsp[(4) - (4)].lval); 2539 } 2540 break; 2541 2542 case 133: 2543 #line 677 "a.y" 2544 { 2545 (yyval.lval) = (yyvsp[(1) - (3)].lval) & (yyvsp[(3) - (3)].lval); 2546 } 2547 break; 2548 2549 case 134: 2550 #line 681 "a.y" 2551 { 2552 (yyval.lval) = (yyvsp[(1) - (3)].lval) ^ (yyvsp[(3) - (3)].lval); 2553 } 2554 break; 2555 2556 case 135: 2557 #line 685 "a.y" 2558 { 2559 (yyval.lval) = (yyvsp[(1) - (3)].lval) | (yyvsp[(3) - (3)].lval); 2560 } 2561 break; 2562 2563 2564 /* Line 1267 of yacc.c. */ 2565 #line 2566 "y.tab.c" 2566 default: break; 2567 } 2568 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 2569 2570 YYPOPSTACK (yylen); 2571 yylen = 0; 2572 YY_STACK_PRINT (yyss, yyssp); 2573 2574 *++yyvsp = yyval; 2575 2576 2577 /* Now `shift' the result of the reduction. Determine what state 2578 that goes to, based on the state we popped back to and the rule 2579 number reduced by. */ 2580 2581 yyn = yyr1[yyn]; 2582 2583 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 2584 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 2585 yystate = yytable[yystate]; 2586 else 2587 yystate = yydefgoto[yyn - YYNTOKENS]; 2588 2589 goto yynewstate; 2590 2591 2592 /*------------------------------------. 2593 | yyerrlab -- here on detecting error | 2594 `------------------------------------*/ 2595 yyerrlab: 2596 /* If not already recovering from an error, report this error. */ 2597 if (!yyerrstatus) 2598 { 2599 ++yynerrs; 2600 #if ! YYERROR_VERBOSE 2601 yyerror (YY_("syntax error")); 2602 #else 2603 { 2604 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); 2605 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) 2606 { 2607 YYSIZE_T yyalloc = 2 * yysize; 2608 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) 2609 yyalloc = YYSTACK_ALLOC_MAXIMUM; 2610 if (yymsg != yymsgbuf) 2611 YYSTACK_FREE (yymsg); 2612 yymsg = (char *) YYSTACK_ALLOC (yyalloc); 2613 if (yymsg) 2614 yymsg_alloc = yyalloc; 2615 else 2616 { 2617 yymsg = yymsgbuf; 2618 yymsg_alloc = sizeof yymsgbuf; 2619 } 2620 } 2621 2622 if (0 < yysize && yysize <= yymsg_alloc) 2623 { 2624 (void) yysyntax_error (yymsg, yystate, yychar); 2625 yyerror (yymsg); 2626 } 2627 else 2628 { 2629 yyerror (YY_("syntax error")); 2630 if (yysize != 0) 2631 goto yyexhaustedlab; 2632 } 2633 } 2634 #endif 2635 } 2636 2637 2638 2639 if (yyerrstatus == 3) 2640 { 2641 /* If just tried and failed to reuse look-ahead token after an 2642 error, discard it. */ 2643 2644 if (yychar <= YYEOF) 2645 { 2646 /* Return failure if at end of input. */ 2647 if (yychar == YYEOF) 2648 YYABORT; 2649 } 2650 else 2651 { 2652 yydestruct ("Error: discarding", 2653 yytoken, &yylval); 2654 yychar = YYEMPTY; 2655 } 2656 } 2657 2658 /* Else will try to reuse look-ahead token after shifting the error 2659 token. */ 2660 goto yyerrlab1; 2661 2662 2663 /*---------------------------------------------------. 2664 | yyerrorlab -- error raised explicitly by YYERROR. | 2665 `---------------------------------------------------*/ 2666 yyerrorlab: 2667 2668 /* Pacify compilers like GCC when the user code never invokes 2669 YYERROR and the label yyerrorlab therefore never appears in user 2670 code. */ 2671 if (/*CONSTCOND*/ 0) 2672 goto yyerrorlab; 2673 2674 /* Do not reclaim the symbols of the rule which action triggered 2675 this YYERROR. */ 2676 YYPOPSTACK (yylen); 2677 yylen = 0; 2678 YY_STACK_PRINT (yyss, yyssp); 2679 yystate = *yyssp; 2680 goto yyerrlab1; 2681 2682 2683 /*-------------------------------------------------------------. 2684 | yyerrlab1 -- common code for both syntax error and YYERROR. | 2685 `-------------------------------------------------------------*/ 2686 yyerrlab1: 2687 yyerrstatus = 3; /* Each real token shifted decrements this. */ 2688 2689 for (;;) 2690 { 2691 yyn = yypact[yystate]; 2692 if (yyn != YYPACT_NINF) 2693 { 2694 yyn += YYTERROR; 2695 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 2696 { 2697 yyn = yytable[yyn]; 2698 if (0 < yyn) 2699 break; 2700 } 2701 } 2702 2703 /* Pop the current state because it cannot handle the error token. */ 2704 if (yyssp == yyss) 2705 YYABORT; 2706 2707 2708 yydestruct ("Error: popping", 2709 yystos[yystate], yyvsp); 2710 YYPOPSTACK (1); 2711 yystate = *yyssp; 2712 YY_STACK_PRINT (yyss, yyssp); 2713 } 2714 2715 if (yyn == YYFINAL) 2716 YYACCEPT; 2717 2718 *++yyvsp = yylval; 2719 2720 2721 /* Shift the error token. */ 2722 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 2723 2724 yystate = yyn; 2725 goto yynewstate; 2726 2727 2728 /*-------------------------------------. 2729 | yyacceptlab -- YYACCEPT comes here. | 2730 `-------------------------------------*/ 2731 yyacceptlab: 2732 yyresult = 0; 2733 goto yyreturn; 2734 2735 /*-----------------------------------. 2736 | yyabortlab -- YYABORT comes here. | 2737 `-----------------------------------*/ 2738 yyabortlab: 2739 yyresult = 1; 2740 goto yyreturn; 2741 2742 #ifndef yyoverflow 2743 /*-------------------------------------------------. 2744 | yyexhaustedlab -- memory exhaustion comes here. | 2745 `-------------------------------------------------*/ 2746 yyexhaustedlab: 2747 yyerror (YY_("memory exhausted")); 2748 yyresult = 2; 2749 /* Fall through. */ 2750 #endif 2751 2752 yyreturn: 2753 if (yychar != YYEOF && yychar != YYEMPTY) 2754 yydestruct ("Cleanup: discarding lookahead", 2755 yytoken, &yylval); 2756 /* Do not reclaim the symbols of the rule which action triggered 2757 this YYABORT or YYACCEPT. */ 2758 YYPOPSTACK (yylen); 2759 YY_STACK_PRINT (yyss, yyssp); 2760 while (yyssp != yyss) 2761 { 2762 yydestruct ("Cleanup: popping", 2763 yystos[*yyssp], yyvsp); 2764 YYPOPSTACK (1); 2765 } 2766 #ifndef yyoverflow 2767 if (yyss != yyssa) 2768 YYSTACK_FREE (yyss); 2769 #endif 2770 #if YYERROR_VERBOSE 2771 if (yymsg != yymsgbuf) 2772 YYSTACK_FREE (yymsg); 2773 #endif 2774 /* Make sure YYID is used. */ 2775 return YYID (yyresult); 2776 } 2777 2778 2779