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