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