github.com/varialus/godfly@v0.0.0-20130904042352-1934f9f095ab/src/cmd/gc/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 20 "go.y" 70 71 #include <u.h> 72 #include <stdio.h> /* if we don't, bison will, and go.h re-#defines getc */ 73 #include <libc.h> 74 #include "go.h" 75 76 static int isrelease = -1; 77 78 static void fixlbrace(int); 79 80 81 /* Line 268 of yacc.c */ 82 #line 83 "y.tab.c" 83 84 /* Enabling traces. */ 85 #ifndef YYDEBUG 86 # define YYDEBUG 0 87 #endif 88 89 /* Enabling verbose error messages. */ 90 #ifdef YYERROR_VERBOSE 91 # undef YYERROR_VERBOSE 92 # define YYERROR_VERBOSE 1 93 #else 94 # define YYERROR_VERBOSE 1 95 #endif 96 97 /* Enabling the token table. */ 98 #ifndef YYTOKEN_TABLE 99 # define YYTOKEN_TABLE 0 100 #endif 101 102 103 /* Tokens. */ 104 #ifndef YYTOKENTYPE 105 # define YYTOKENTYPE 106 /* Put the tokens into the symbol table, so that GDB and other debuggers 107 know about them. */ 108 enum yytokentype { 109 LLITERAL = 258, 110 LASOP = 259, 111 LCOLAS = 260, 112 LBREAK = 261, 113 LCASE = 262, 114 LCHAN = 263, 115 LCONST = 264, 116 LCONTINUE = 265, 117 LDDD = 266, 118 LDEFAULT = 267, 119 LDEFER = 268, 120 LELSE = 269, 121 LFALL = 270, 122 LFOR = 271, 123 LFUNC = 272, 124 LGO = 273, 125 LGOTO = 274, 126 LIF = 275, 127 LIMPORT = 276, 128 LINTERFACE = 277, 129 LMAP = 278, 130 LNAME = 279, 131 LPACKAGE = 280, 132 LRANGE = 281, 133 LRETURN = 282, 134 LSELECT = 283, 135 LSTRUCT = 284, 136 LSWITCH = 285, 137 LTYPE = 286, 138 LVAR = 287, 139 LANDAND = 288, 140 LANDNOT = 289, 141 LBODY = 290, 142 LCOMM = 291, 143 LDEC = 292, 144 LEQ = 293, 145 LGE = 294, 146 LGT = 295, 147 LIGNORE = 296, 148 LINC = 297, 149 LLE = 298, 150 LLSH = 299, 151 LLT = 300, 152 LNE = 301, 153 LOROR = 302, 154 LRSH = 303, 155 NotPackage = 304, 156 NotParen = 305, 157 PreferToRightParen = 306 158 }; 159 #endif 160 /* Tokens. */ 161 #define LLITERAL 258 162 #define LASOP 259 163 #define LCOLAS 260 164 #define LBREAK 261 165 #define LCASE 262 166 #define LCHAN 263 167 #define LCONST 264 168 #define LCONTINUE 265 169 #define LDDD 266 170 #define LDEFAULT 267 171 #define LDEFER 268 172 #define LELSE 269 173 #define LFALL 270 174 #define LFOR 271 175 #define LFUNC 272 176 #define LGO 273 177 #define LGOTO 274 178 #define LIF 275 179 #define LIMPORT 276 180 #define LINTERFACE 277 181 #define LMAP 278 182 #define LNAME 279 183 #define LPACKAGE 280 184 #define LRANGE 281 185 #define LRETURN 282 186 #define LSELECT 283 187 #define LSTRUCT 284 188 #define LSWITCH 285 189 #define LTYPE 286 190 #define LVAR 287 191 #define LANDAND 288 192 #define LANDNOT 289 193 #define LBODY 290 194 #define LCOMM 291 195 #define LDEC 292 196 #define LEQ 293 197 #define LGE 294 198 #define LGT 295 199 #define LIGNORE 296 200 #define LINC 297 201 #define LLE 298 202 #define LLSH 299 203 #define LLT 300 204 #define LNE 301 205 #define LOROR 302 206 #define LRSH 303 207 #define NotPackage 304 208 #define NotParen 305 209 #define PreferToRightParen 306 210 211 212 213 214 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 215 typedef union YYSTYPE 216 { 217 218 /* Line 293 of yacc.c */ 219 #line 30 "go.y" 220 221 Node* node; 222 NodeList* list; 223 Type* type; 224 Sym* sym; 225 struct Val val; 226 int i; 227 228 229 230 /* Line 293 of yacc.c */ 231 #line 232 "y.tab.c" 232 } YYSTYPE; 233 # define YYSTYPE_IS_TRIVIAL 1 234 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 235 # define YYSTYPE_IS_DECLARED 1 236 #endif 237 238 239 /* Copy the second part of user declarations. */ 240 241 242 /* Line 343 of yacc.c */ 243 #line 244 "y.tab.c" 244 245 #ifdef short 246 # undef short 247 #endif 248 249 #ifdef YYTYPE_UINT8 250 typedef YYTYPE_UINT8 yytype_uint8; 251 #else 252 typedef unsigned char yytype_uint8; 253 #endif 254 255 #ifdef YYTYPE_INT8 256 typedef YYTYPE_INT8 yytype_int8; 257 #elif (defined __STDC__ || defined __C99__FUNC__ \ 258 || defined __cplusplus || defined _MSC_VER) 259 typedef signed char yytype_int8; 260 #else 261 typedef short int yytype_int8; 262 #endif 263 264 #ifdef YYTYPE_UINT16 265 typedef YYTYPE_UINT16 yytype_uint16; 266 #else 267 typedef unsigned short int yytype_uint16; 268 #endif 269 270 #ifdef YYTYPE_INT16 271 typedef YYTYPE_INT16 yytype_int16; 272 #else 273 typedef short int yytype_int16; 274 #endif 275 276 #ifndef YYSIZE_T 277 # ifdef __SIZE_TYPE__ 278 # define YYSIZE_T __SIZE_TYPE__ 279 # elif defined size_t 280 # define YYSIZE_T size_t 281 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 282 || defined __cplusplus || defined _MSC_VER) 283 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 284 # define YYSIZE_T size_t 285 # else 286 # define YYSIZE_T unsigned int 287 # endif 288 #endif 289 290 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 291 292 #ifndef YY_ 293 # if defined YYENABLE_NLS && YYENABLE_NLS 294 # if ENABLE_NLS 295 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 296 # define YY_(msgid) dgettext ("bison-runtime", msgid) 297 # endif 298 # endif 299 # ifndef YY_ 300 # define YY_(msgid) msgid 301 # endif 302 #endif 303 304 /* Suppress unused-variable warnings by "using" E. */ 305 #if ! defined lint || defined __GNUC__ 306 # define YYUSE(e) ((void) (e)) 307 #else 308 # define YYUSE(e) /* empty */ 309 #endif 310 311 /* Identity function, used to suppress warnings about constant conditions. */ 312 #ifndef lint 313 # define YYID(n) (n) 314 #else 315 #if (defined __STDC__ || defined __C99__FUNC__ \ 316 || defined __cplusplus || defined _MSC_VER) 317 static int 318 YYID (int yyi) 319 #else 320 static int 321 YYID (yyi) 322 int yyi; 323 #endif 324 { 325 return yyi; 326 } 327 #endif 328 329 #if ! defined yyoverflow || YYERROR_VERBOSE 330 331 /* The parser invokes alloca or malloc; define the necessary symbols. */ 332 333 # ifdef YYSTACK_USE_ALLOCA 334 # if YYSTACK_USE_ALLOCA 335 # ifdef __GNUC__ 336 # define YYSTACK_ALLOC __builtin_alloca 337 # elif defined __BUILTIN_VA_ARG_INCR 338 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 339 # elif defined _AIX 340 # define YYSTACK_ALLOC __alloca 341 # elif defined _MSC_VER 342 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 343 # define alloca _alloca 344 # else 345 # define YYSTACK_ALLOC alloca 346 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 347 || defined __cplusplus || defined _MSC_VER) 348 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 349 # ifndef EXIT_SUCCESS 350 # define EXIT_SUCCESS 0 351 # endif 352 # endif 353 # endif 354 # endif 355 # endif 356 357 # ifdef YYSTACK_ALLOC 358 /* Pacify GCC's `empty if-body' warning. */ 359 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 360 # ifndef YYSTACK_ALLOC_MAXIMUM 361 /* The OS might guarantee only one guard page at the bottom of the stack, 362 and a page size can be as small as 4096 bytes. So we cannot safely 363 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 364 to allow for a few compiler-allocated temporary stack slots. */ 365 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 366 # endif 367 # else 368 # define YYSTACK_ALLOC YYMALLOC 369 # define YYSTACK_FREE YYFREE 370 # ifndef YYSTACK_ALLOC_MAXIMUM 371 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 372 # endif 373 # if (defined __cplusplus && ! defined EXIT_SUCCESS \ 374 && ! ((defined YYMALLOC || defined malloc) \ 375 && (defined YYFREE || defined free))) 376 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 377 # ifndef EXIT_SUCCESS 378 # define EXIT_SUCCESS 0 379 # endif 380 # endif 381 # ifndef YYMALLOC 382 # define YYMALLOC malloc 383 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 384 || defined __cplusplus || defined _MSC_VER) 385 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 386 # endif 387 # endif 388 # ifndef YYFREE 389 # define YYFREE free 390 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 391 || defined __cplusplus || defined _MSC_VER) 392 void free (void *); /* INFRINGES ON USER NAME SPACE */ 393 # endif 394 # endif 395 # endif 396 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 397 398 399 #if (! defined yyoverflow \ 400 && (! defined __cplusplus \ 401 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 402 403 /* A type that is properly aligned for any stack member. */ 404 union yyalloc 405 { 406 yytype_int16 yyss_alloc; 407 YYSTYPE yyvs_alloc; 408 }; 409 410 /* The size of the maximum gap between one aligned stack and the next. */ 411 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 412 413 /* The size of an array large to enough to hold all stacks, each with 414 N elements. */ 415 # define YYSTACK_BYTES(N) \ 416 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 417 + YYSTACK_GAP_MAXIMUM) 418 419 # define YYCOPY_NEEDED 1 420 421 /* Relocate STACK from its old location to the new one. The 422 local variables YYSIZE and YYSTACKSIZE give the old and new number of 423 elements in the stack, and YYPTR gives the new location of the 424 stack. Advance YYPTR to a properly aligned location for the next 425 stack. */ 426 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 427 do \ 428 { \ 429 YYSIZE_T yynewbytes; \ 430 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 431 Stack = &yyptr->Stack_alloc; \ 432 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 433 yyptr += yynewbytes / sizeof (*yyptr); \ 434 } \ 435 while (YYID (0)) 436 437 #endif 438 439 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED 440 /* Copy COUNT objects from FROM to TO. The source and destination do 441 not overlap. */ 442 # ifndef YYCOPY 443 # if defined __GNUC__ && 1 < __GNUC__ 444 # define YYCOPY(To, From, Count) \ 445 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 446 # else 447 # define YYCOPY(To, From, Count) \ 448 do \ 449 { \ 450 YYSIZE_T yyi; \ 451 for (yyi = 0; yyi < (Count); yyi++) \ 452 (To)[yyi] = (From)[yyi]; \ 453 } \ 454 while (YYID (0)) 455 # endif 456 # endif 457 #endif /* !YYCOPY_NEEDED */ 458 459 /* YYFINAL -- State number of the termination state. */ 460 #define YYFINAL 4 461 /* YYLAST -- Last index in YYTABLE. */ 462 #define YYLAST 2198 463 464 /* YYNTOKENS -- Number of terminals. */ 465 #define YYNTOKENS 76 466 /* YYNNTS -- Number of nonterminals. */ 467 #define YYNNTS 142 468 /* YYNRULES -- Number of rules. */ 469 #define YYNRULES 350 470 /* YYNRULES -- Number of states. */ 471 #define YYNSTATES 666 472 473 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 474 #define YYUNDEFTOK 2 475 #define YYMAXUTOK 306 476 477 #define YYTRANSLATE(YYX) \ 478 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 479 480 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 481 static const yytype_uint8 yytranslate[] = 482 { 483 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 484 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 485 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 486 2, 2, 2, 69, 2, 2, 64, 55, 56, 2, 487 59, 60, 53, 49, 75, 50, 63, 54, 2, 2, 488 2, 2, 2, 2, 2, 2, 2, 2, 66, 62, 489 2, 65, 2, 73, 74, 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, 71, 2, 72, 52, 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, 67, 51, 68, 70, 2, 2, 2, 496 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 497 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 498 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 499 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 500 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 501 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 502 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 503 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 504 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 505 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 506 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 507 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 508 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 509 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 510 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 511 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 512 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 513 45, 46, 47, 48, 57, 58, 61 514 }; 515 516 #if YYDEBUG 517 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 518 YYRHS. */ 519 static const yytype_uint16 yyprhs[] = 520 { 521 0, 0, 3, 8, 9, 13, 14, 18, 19, 23, 522 26, 32, 36, 40, 43, 45, 49, 51, 54, 57, 523 62, 63, 65, 66, 71, 72, 74, 76, 78, 80, 524 83, 89, 93, 96, 102, 110, 114, 117, 123, 127, 525 129, 132, 137, 141, 146, 150, 152, 155, 157, 159, 526 162, 164, 168, 172, 176, 179, 182, 186, 192, 198, 527 201, 202, 207, 208, 212, 213, 216, 217, 222, 227, 528 232, 238, 240, 242, 245, 246, 250, 252, 256, 257, 529 258, 259, 268, 269, 275, 276, 279, 280, 283, 284, 530 285, 293, 294, 300, 302, 306, 310, 314, 318, 322, 531 326, 330, 334, 338, 342, 346, 350, 354, 358, 362, 532 366, 370, 374, 378, 382, 384, 387, 390, 393, 396, 533 399, 402, 405, 408, 412, 418, 425, 427, 429, 433, 534 439, 445, 450, 457, 466, 468, 474, 480, 486, 494, 535 496, 497, 501, 503, 508, 510, 515, 517, 521, 523, 536 525, 527, 529, 531, 533, 535, 536, 538, 540, 542, 537 544, 549, 551, 553, 555, 558, 560, 562, 564, 566, 538 568, 572, 574, 576, 578, 581, 583, 585, 587, 589, 539 593, 595, 597, 599, 601, 603, 605, 607, 609, 611, 540 615, 620, 625, 628, 632, 638, 640, 642, 645, 649, 541 655, 659, 665, 669, 673, 679, 688, 694, 703, 709, 542 710, 714, 715, 717, 721, 723, 728, 731, 732, 736, 543 738, 742, 744, 748, 750, 754, 756, 760, 762, 766, 544 770, 773, 778, 782, 788, 794, 796, 800, 802, 805, 545 807, 811, 816, 818, 821, 824, 826, 828, 832, 833, 546 836, 837, 839, 841, 843, 845, 847, 849, 851, 853, 547 855, 856, 861, 863, 866, 869, 872, 875, 878, 881, 548 883, 887, 889, 893, 895, 899, 901, 905, 907, 911, 549 913, 915, 919, 923, 924, 927, 928, 930, 931, 933, 550 934, 936, 937, 939, 940, 942, 943, 945, 946, 948, 551 949, 951, 952, 954, 959, 964, 970, 977, 982, 987, 552 989, 991, 993, 995, 997, 999, 1001, 1003, 1005, 1009, 553 1014, 1020, 1025, 1030, 1033, 1036, 1041, 1045, 1049, 1055, 554 1059, 1064, 1068, 1074, 1076, 1077, 1079, 1083, 1085, 1087, 555 1090, 1092, 1094, 1100, 1101, 1104, 1106, 1110, 1112, 1116, 556 1118 557 }; 558 559 /* YYRHS -- A `-1'-separated list of the rules' RHS. */ 560 static const yytype_int16 yyrhs[] = 561 { 562 77, 0, -1, 79, 78, 81, 166, -1, -1, 25, 563 141, 62, -1, -1, 80, 86, 88, -1, -1, 81, 564 82, 62, -1, 21, 83, -1, 21, 59, 84, 190, 565 60, -1, 21, 59, 60, -1, 85, 86, 88, -1, 566 85, 88, -1, 83, -1, 84, 62, 83, -1, 3, 567 -1, 141, 3, -1, 63, 3, -1, 25, 24, 87, 568 62, -1, -1, 24, -1, -1, 89, 214, 64, 64, 569 -1, -1, 91, -1, 158, -1, 181, -1, 1, -1, 570 32, 93, -1, 32, 59, 167, 190, 60, -1, 32, 571 59, 60, -1, 92, 94, -1, 92, 59, 94, 190, 572 60, -1, 92, 59, 94, 62, 168, 190, 60, -1, 573 92, 59, 60, -1, 31, 97, -1, 31, 59, 169, 574 190, 60, -1, 31, 59, 60, -1, 9, -1, 185, 575 146, -1, 185, 146, 65, 186, -1, 185, 65, 186, 576 -1, 185, 146, 65, 186, -1, 185, 65, 186, -1, 577 94, -1, 185, 146, -1, 185, -1, 141, -1, 96, 578 146, -1, 126, -1, 126, 4, 126, -1, 186, 65, 579 186, -1, 186, 5, 186, -1, 126, 42, -1, 126, 580 37, -1, 7, 187, 66, -1, 7, 187, 65, 126, 581 66, -1, 7, 187, 5, 126, 66, -1, 12, 66, 582 -1, -1, 67, 101, 183, 68, -1, -1, 99, 103, 583 183, -1, -1, 104, 102, -1, -1, 35, 106, 183, 584 68, -1, 186, 65, 26, 126, -1, 186, 5, 26, 585 126, -1, 194, 62, 194, 62, 194, -1, 194, -1, 586 107, -1, 108, 105, -1, -1, 16, 111, 109, -1, 587 194, -1, 194, 62, 194, -1, -1, -1, -1, 20, 588 114, 112, 115, 105, 116, 119, 120, -1, -1, 14, 589 20, 118, 112, 105, -1, -1, 119, 117, -1, -1, 590 14, 100, -1, -1, -1, 30, 122, 112, 123, 35, 591 104, 68, -1, -1, 28, 125, 35, 104, 68, -1, 592 127, -1, 126, 47, 126, -1, 126, 33, 126, -1, 593 126, 38, 126, -1, 126, 46, 126, -1, 126, 45, 594 126, -1, 126, 43, 126, -1, 126, 39, 126, -1, 595 126, 40, 126, -1, 126, 49, 126, -1, 126, 50, 596 126, -1, 126, 51, 126, -1, 126, 52, 126, -1, 597 126, 53, 126, -1, 126, 54, 126, -1, 126, 55, 598 126, -1, 126, 56, 126, -1, 126, 34, 126, -1, 599 126, 44, 126, -1, 126, 48, 126, -1, 126, 36, 600 126, -1, 134, -1, 53, 127, -1, 56, 127, -1, 601 49, 127, -1, 50, 127, -1, 69, 127, -1, 70, 602 127, -1, 52, 127, -1, 36, 127, -1, 134, 59, 603 60, -1, 134, 59, 187, 191, 60, -1, 134, 59, 604 187, 11, 191, 60, -1, 3, -1, 143, -1, 134, 605 63, 141, -1, 134, 63, 59, 135, 60, -1, 134, 606 63, 59, 31, 60, -1, 134, 71, 126, 72, -1, 607 134, 71, 192, 66, 192, 72, -1, 134, 71, 192, 608 66, 192, 66, 192, 72, -1, 128, -1, 149, 59, 609 126, 191, 60, -1, 150, 137, 130, 189, 68, -1, 610 129, 67, 130, 189, 68, -1, 59, 135, 60, 67, 611 130, 189, 68, -1, 165, -1, -1, 126, 66, 133, 612 -1, 126, -1, 67, 130, 189, 68, -1, 126, -1, 613 67, 130, 189, 68, -1, 129, -1, 59, 135, 60, 614 -1, 126, -1, 147, -1, 146, -1, 35, -1, 67, 615 -1, 141, -1, 141, -1, -1, 138, -1, 24, -1, 616 142, -1, 73, -1, 74, 3, 63, 24, -1, 141, 617 -1, 138, -1, 11, -1, 11, 146, -1, 155, -1, 618 161, -1, 153, -1, 154, -1, 152, -1, 59, 146, 619 60, -1, 155, -1, 161, -1, 153, -1, 53, 147, 620 -1, 161, -1, 153, -1, 154, -1, 152, -1, 59, 621 146, 60, -1, 161, -1, 153, -1, 153, -1, 155, 622 -1, 161, -1, 153, -1, 154, -1, 152, -1, 143, 623 -1, 143, 63, 141, -1, 71, 192, 72, 146, -1, 624 71, 11, 72, 146, -1, 8, 148, -1, 8, 36, 625 146, -1, 23, 71, 146, 72, 146, -1, 156, -1, 626 157, -1, 53, 146, -1, 36, 8, 146, -1, 29, 627 137, 170, 190, 68, -1, 29, 137, 68, -1, 22, 628 137, 171, 190, 68, -1, 22, 137, 68, -1, 17, 629 159, 162, -1, 141, 59, 179, 60, 163, -1, 59, 630 179, 60, 141, 59, 179, 60, 163, -1, 200, 59, 631 195, 60, 210, -1, 59, 215, 60, 141, 59, 195, 632 60, 210, -1, 17, 59, 179, 60, 163, -1, -1, 633 67, 183, 68, -1, -1, 151, -1, 59, 179, 60, 634 -1, 161, -1, 164, 137, 183, 68, -1, 164, 1, 635 -1, -1, 166, 90, 62, -1, 93, -1, 167, 62, 636 93, -1, 95, -1, 168, 62, 95, -1, 97, -1, 637 169, 62, 97, -1, 172, -1, 170, 62, 172, -1, 638 175, -1, 171, 62, 175, -1, 184, 146, 198, -1, 639 174, 198, -1, 59, 174, 60, 198, -1, 53, 174, 640 198, -1, 59, 53, 174, 60, 198, -1, 53, 59, 641 174, 60, 198, -1, 24, -1, 24, 63, 141, -1, 642 173, -1, 138, 176, -1, 173, -1, 59, 173, 60, 643 -1, 59, 179, 60, 163, -1, 136, -1, 141, 136, 644 -1, 141, 145, -1, 145, -1, 177, -1, 178, 75, 645 177, -1, -1, 178, 191, -1, -1, 100, -1, 91, 646 -1, 181, -1, 1, -1, 98, -1, 110, -1, 121, 647 -1, 124, -1, 113, -1, -1, 144, 66, 182, 180, 648 -1, 15, -1, 6, 140, -1, 10, 140, -1, 18, 649 128, -1, 13, 128, -1, 19, 138, -1, 27, 193, 650 -1, 180, -1, 183, 62, 180, -1, 138, -1, 184, 651 75, 138, -1, 139, -1, 185, 75, 139, -1, 126, 652 -1, 186, 75, 126, -1, 135, -1, 187, 75, 135, 653 -1, 131, -1, 132, -1, 188, 75, 131, -1, 188, 654 75, 132, -1, -1, 188, 191, -1, -1, 62, -1, 655 -1, 75, -1, -1, 126, -1, -1, 186, -1, -1, 656 98, -1, -1, 215, -1, -1, 216, -1, -1, 217, 657 -1, -1, 3, -1, 21, 24, 3, 62, -1, 32, 658 200, 202, 62, -1, 9, 200, 65, 213, 62, -1, 659 9, 200, 202, 65, 213, 62, -1, 31, 201, 202, 660 62, -1, 17, 160, 162, 62, -1, 142, -1, 200, 661 -1, 204, -1, 205, -1, 206, -1, 204, -1, 206, 662 -1, 142, -1, 24, -1, 71, 72, 202, -1, 71, 663 3, 72, 202, -1, 23, 71, 202, 72, 202, -1, 664 29, 67, 196, 68, -1, 22, 67, 197, 68, -1, 665 53, 202, -1, 8, 203, -1, 8, 59, 205, 60, 666 -1, 8, 36, 202, -1, 36, 8, 202, -1, 17, 667 59, 195, 60, 210, -1, 141, 202, 198, -1, 141, 668 11, 202, 198, -1, 141, 202, 198, -1, 141, 59, 669 195, 60, 210, -1, 202, -1, -1, 211, -1, 59, 670 195, 60, -1, 202, -1, 3, -1, 50, 3, -1, 671 141, -1, 212, -1, 59, 212, 49, 212, 60, -1, 672 -1, 214, 199, -1, 207, -1, 215, 75, 207, -1, 673 208, -1, 216, 62, 208, -1, 209, -1, 217, 62, 674 209, -1 675 }; 676 677 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 678 static const yytype_uint16 yyrline[] = 679 { 680 0, 126, 126, 135, 141, 152, 152, 167, 168, 171, 681 172, 173, 176, 213, 224, 225, 228, 235, 242, 251, 682 265, 266, 273, 273, 286, 290, 291, 295, 300, 306, 683 310, 314, 318, 324, 330, 336, 341, 345, 349, 355, 684 361, 365, 369, 375, 379, 385, 386, 390, 396, 405, 685 411, 429, 434, 446, 462, 467, 474, 494, 512, 521, 686 540, 539, 554, 553, 584, 587, 594, 593, 604, 610, 687 619, 630, 636, 639, 647, 646, 657, 663, 675, 679, 688 684, 674, 705, 704, 717, 720, 726, 729, 741, 745, 689 740, 763, 762, 778, 779, 783, 787, 791, 795, 799, 690 803, 807, 811, 815, 819, 823, 827, 831, 835, 839, 691 843, 847, 851, 856, 862, 863, 867, 878, 882, 886, 692 890, 895, 899, 909, 913, 918, 926, 930, 931, 942, 693 946, 950, 954, 958, 973, 974, 980, 987, 993, 1000, 694 1003, 1010, 1016, 1033, 1040, 1041, 1048, 1049, 1068, 1069, 695 1072, 1075, 1079, 1090, 1099, 1105, 1108, 1111, 1118, 1119, 696 1125, 1140, 1148, 1160, 1165, 1171, 1172, 1173, 1174, 1175, 697 1176, 1182, 1183, 1184, 1185, 1191, 1192, 1193, 1194, 1195, 698 1201, 1202, 1205, 1208, 1209, 1210, 1211, 1212, 1215, 1216, 699 1229, 1233, 1238, 1243, 1248, 1252, 1253, 1256, 1262, 1269, 700 1275, 1282, 1288, 1299, 1313, 1342, 1382, 1407, 1425, 1434, 701 1437, 1445, 1449, 1453, 1460, 1466, 1471, 1483, 1486, 1496, 702 1497, 1503, 1504, 1510, 1514, 1520, 1521, 1527, 1531, 1537, 703 1560, 1565, 1571, 1577, 1584, 1593, 1602, 1617, 1623, 1628, 704 1632, 1639, 1652, 1653, 1659, 1665, 1668, 1672, 1678, 1681, 705 1690, 1693, 1694, 1698, 1699, 1705, 1706, 1707, 1708, 1709, 706 1711, 1710, 1725, 1730, 1734, 1738, 1742, 1746, 1751, 1770, 707 1776, 1784, 1788, 1794, 1798, 1804, 1808, 1814, 1818, 1827, 708 1831, 1835, 1839, 1845, 1848, 1856, 1857, 1859, 1860, 1863, 709 1866, 1869, 1872, 1875, 1878, 1881, 1884, 1887, 1890, 1893, 710 1896, 1899, 1902, 1908, 1912, 1916, 1920, 1924, 1928, 1948, 711 1955, 1966, 1967, 1968, 1971, 1972, 1975, 1979, 1989, 1993, 712 1997, 2001, 2005, 2009, 2013, 2019, 2025, 2033, 2041, 2047, 713 2054, 2070, 2088, 2092, 2098, 2101, 2104, 2108, 2118, 2122, 714 2137, 2145, 2146, 2158, 2159, 2162, 2166, 2172, 2176, 2182, 715 2186 716 }; 717 #endif 718 719 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 720 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 721 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 722 const char *yytname[] = 723 { 724 "$end", "error", "$undefined", "LLITERAL", "LASOP", "LCOLAS", "LBREAK", 725 "LCASE", "LCHAN", "LCONST", "LCONTINUE", "LDDD", "LDEFAULT", "LDEFER", 726 "LELSE", "LFALL", "LFOR", "LFUNC", "LGO", "LGOTO", "LIF", "LIMPORT", 727 "LINTERFACE", "LMAP", "LNAME", "LPACKAGE", "LRANGE", "LRETURN", 728 "LSELECT", "LSTRUCT", "LSWITCH", "LTYPE", "LVAR", "LANDAND", "LANDNOT", 729 "LBODY", "LCOMM", "LDEC", "LEQ", "LGE", "LGT", "LIGNORE", "LINC", "LLE", 730 "LLSH", "LLT", "LNE", "LOROR", "LRSH", "'+'", "'-'", "'|'", "'^'", "'*'", 731 "'/'", "'%'", "'&'", "NotPackage", "NotParen", "'('", "')'", 732 "PreferToRightParen", "';'", "'.'", "'$'", "'='", "':'", "'{'", "'}'", 733 "'!'", "'~'", "'['", "']'", "'?'", "'@'", "','", "$accept", "file", 734 "package", "loadsys", "$@1", "imports", "import", "import_stmt", 735 "import_stmt_list", "import_here", "import_package", "import_safety", 736 "import_there", "$@2", "xdcl", "common_dcl", "lconst", "vardcl", 737 "constdcl", "constdcl1", "typedclname", "typedcl", "simple_stmt", "case", 738 "compound_stmt", "$@3", "caseblock", "$@4", "caseblock_list", 739 "loop_body", "$@5", "range_stmt", "for_header", "for_body", "for_stmt", 740 "$@6", "if_header", "if_stmt", "$@7", "$@8", "$@9", "elseif", "$@10", 741 "elseif_list", "else", "switch_stmt", "$@11", "$@12", "select_stmt", 742 "$@13", "expr", "uexpr", "pseudocall", "pexpr_no_paren", "start_complit", 743 "keyval", "bare_complitexpr", "complitexpr", "pexpr", "expr_or_type", 744 "name_or_type", "lbrace", "new_name", "dcl_name", "onew_name", "sym", 745 "hidden_importsym", "name", "labelname", "dotdotdot", "ntype", 746 "non_expr_type", "non_recvchantype", "convtype", "comptype", 747 "fnret_type", "dotname", "othertype", "ptrtype", "recvchantype", 748 "structtype", "interfacetype", "xfndcl", "fndcl", "hidden_fndcl", 749 "fntype", "fnbody", "fnres", "fnlitdcl", "fnliteral", "xdcl_list", 750 "vardcl_list", "constdcl_list", "typedcl_list", "structdcl_list", 751 "interfacedcl_list", "structdcl", "packname", "embed", "interfacedcl", 752 "indcl", "arg_type", "arg_type_list", "oarg_type_list_ocomma", "stmt", 753 "non_dcl_stmt", "$@14", "stmt_list", "new_name_list", "dcl_name_list", 754 "expr_list", "expr_or_type_list", "keyval_list", "braced_keyval_list", 755 "osemi", "ocomma", "oexpr", "oexpr_list", "osimple_stmt", 756 "ohidden_funarg_list", "ohidden_structdcl_list", 757 "ohidden_interfacedcl_list", "oliteral", "hidden_import", 758 "hidden_pkg_importsym", "hidden_pkgtype", "hidden_type", 759 "hidden_type_non_recv_chan", "hidden_type_misc", "hidden_type_recv_chan", 760 "hidden_type_func", "hidden_funarg", "hidden_structdcl", 761 "hidden_interfacedcl", "ohidden_funres", "hidden_funres", 762 "hidden_literal", "hidden_constant", "hidden_import_list", 763 "hidden_funarg_list", "hidden_structdcl_list", 764 "hidden_interfacedcl_list", 0 765 }; 766 #endif 767 768 # ifdef YYPRINT 769 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 770 token YYLEX-NUM. */ 771 static const yytype_uint16 yytoknum[] = 772 { 773 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 774 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 775 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 776 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 777 295, 296, 297, 298, 299, 300, 301, 302, 303, 43, 778 45, 124, 94, 42, 47, 37, 38, 304, 305, 40, 779 41, 306, 59, 46, 36, 61, 58, 123, 125, 33, 780 126, 91, 93, 63, 64, 44 781 }; 782 # endif 783 784 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 785 static const yytype_uint8 yyr1[] = 786 { 787 0, 76, 77, 78, 78, 80, 79, 81, 81, 82, 788 82, 82, 83, 83, 84, 84, 85, 85, 85, 86, 789 87, 87, 89, 88, 90, 90, 90, 90, 90, 91, 790 91, 91, 91, 91, 91, 91, 91, 91, 91, 92, 791 93, 93, 93, 94, 94, 95, 95, 95, 96, 97, 792 98, 98, 98, 98, 98, 98, 99, 99, 99, 99, 793 101, 100, 103, 102, 104, 104, 106, 105, 107, 107, 794 108, 108, 108, 109, 111, 110, 112, 112, 114, 115, 795 116, 113, 118, 117, 119, 119, 120, 120, 122, 123, 796 121, 125, 124, 126, 126, 126, 126, 126, 126, 126, 797 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 798 126, 126, 126, 126, 127, 127, 127, 127, 127, 127, 799 127, 127, 127, 128, 128, 128, 129, 129, 129, 129, 800 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 801 130, 131, 132, 132, 133, 133, 134, 134, 135, 135, 802 136, 137, 137, 138, 139, 140, 140, 141, 141, 141, 803 142, 143, 144, 145, 145, 146, 146, 146, 146, 146, 804 146, 147, 147, 147, 147, 148, 148, 148, 148, 148, 805 149, 149, 150, 151, 151, 151, 151, 151, 152, 152, 806 153, 153, 153, 153, 153, 153, 153, 154, 155, 156, 807 156, 157, 157, 158, 159, 159, 160, 160, 161, 162, 808 162, 163, 163, 163, 164, 165, 165, 166, 166, 167, 809 167, 168, 168, 169, 169, 170, 170, 171, 171, 172, 810 172, 172, 172, 172, 172, 173, 173, 174, 175, 175, 811 175, 176, 177, 177, 177, 177, 178, 178, 179, 179, 812 180, 180, 180, 180, 180, 181, 181, 181, 181, 181, 813 182, 181, 181, 181, 181, 181, 181, 181, 181, 183, 814 183, 184, 184, 185, 185, 186, 186, 187, 187, 188, 815 188, 188, 188, 189, 189, 190, 190, 191, 191, 192, 816 192, 193, 193, 194, 194, 195, 195, 196, 196, 197, 817 197, 198, 198, 199, 199, 199, 199, 199, 199, 200, 818 201, 202, 202, 202, 203, 203, 204, 204, 204, 204, 819 204, 204, 204, 204, 204, 204, 204, 205, 206, 207, 820 207, 208, 209, 209, 210, 210, 211, 211, 212, 212, 821 212, 213, 213, 214, 214, 215, 215, 216, 216, 217, 822 217 823 }; 824 825 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 826 static const yytype_uint8 yyr2[] = 827 { 828 0, 2, 4, 0, 3, 0, 3, 0, 3, 2, 829 5, 3, 3, 2, 1, 3, 1, 2, 2, 4, 830 0, 1, 0, 4, 0, 1, 1, 1, 1, 2, 831 5, 3, 2, 5, 7, 3, 2, 5, 3, 1, 832 2, 4, 3, 4, 3, 1, 2, 1, 1, 2, 833 1, 3, 3, 3, 2, 2, 3, 5, 5, 2, 834 0, 4, 0, 3, 0, 2, 0, 4, 4, 4, 835 5, 1, 1, 2, 0, 3, 1, 3, 0, 0, 836 0, 8, 0, 5, 0, 2, 0, 2, 0, 0, 837 7, 0, 5, 1, 3, 3, 3, 3, 3, 3, 838 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 839 3, 3, 3, 3, 1, 2, 2, 2, 2, 2, 840 2, 2, 2, 3, 5, 6, 1, 1, 3, 5, 841 5, 4, 6, 8, 1, 5, 5, 5, 7, 1, 842 0, 3, 1, 4, 1, 4, 1, 3, 1, 1, 843 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 844 4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 845 3, 1, 1, 1, 2, 1, 1, 1, 1, 3, 846 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 847 4, 4, 2, 3, 5, 1, 1, 2, 3, 5, 848 3, 5, 3, 3, 5, 8, 5, 8, 5, 0, 849 3, 0, 1, 3, 1, 4, 2, 0, 3, 1, 850 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 851 2, 4, 3, 5, 5, 1, 3, 1, 2, 1, 852 3, 4, 1, 2, 2, 1, 1, 3, 0, 2, 853 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 854 0, 4, 1, 2, 2, 2, 2, 2, 2, 1, 855 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 856 1, 3, 3, 0, 2, 0, 1, 0, 1, 0, 857 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 858 1, 0, 1, 4, 4, 5, 6, 4, 4, 1, 859 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 860 5, 4, 4, 2, 2, 4, 3, 3, 5, 3, 861 4, 3, 5, 1, 0, 1, 3, 1, 1, 2, 862 1, 1, 5, 0, 2, 1, 3, 1, 3, 1, 863 3 864 }; 865 866 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. 867 Performed when YYTABLE doesn't specify something else to do. Zero 868 means the default is an error. */ 869 static const yytype_uint16 yydefact[] = 870 { 871 5, 0, 3, 0, 1, 0, 7, 0, 22, 157, 872 159, 0, 0, 158, 217, 20, 6, 343, 0, 4, 873 0, 0, 0, 21, 0, 0, 0, 16, 0, 0, 874 9, 22, 0, 8, 28, 126, 155, 0, 39, 155, 875 0, 262, 74, 0, 0, 0, 78, 0, 0, 291, 876 91, 0, 88, 0, 0, 0, 0, 0, 0, 0, 877 0, 0, 0, 0, 289, 0, 25, 0, 255, 256, 878 259, 257, 258, 50, 93, 134, 146, 114, 162, 161, 879 127, 0, 0, 0, 182, 195, 196, 26, 214, 0, 880 139, 27, 0, 19, 0, 0, 0, 0, 0, 0, 881 344, 160, 11, 14, 285, 18, 22, 13, 17, 156, 882 263, 153, 0, 0, 0, 0, 161, 188, 192, 178, 883 176, 177, 175, 264, 134, 0, 293, 248, 0, 209, 884 134, 267, 293, 151, 152, 0, 0, 275, 292, 268, 885 0, 0, 293, 0, 0, 36, 48, 0, 29, 273, 886 154, 0, 122, 117, 118, 121, 115, 116, 0, 0, 887 148, 0, 149, 173, 171, 172, 119, 120, 0, 290, 888 0, 218, 0, 32, 0, 0, 0, 0, 0, 55, 889 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 890 0, 0, 0, 0, 0, 0, 0, 0, 140, 0, 891 0, 289, 260, 0, 140, 216, 0, 0, 0, 0, 892 309, 0, 0, 209, 0, 0, 310, 0, 0, 23, 893 286, 0, 12, 248, 0, 0, 193, 169, 167, 168, 894 165, 166, 197, 0, 0, 294, 72, 0, 75, 0, 895 71, 163, 242, 161, 245, 150, 246, 287, 0, 248, 896 0, 203, 79, 76, 157, 0, 202, 0, 285, 239, 897 227, 0, 64, 0, 0, 200, 271, 285, 225, 237, 898 301, 0, 89, 38, 223, 285, 49, 31, 219, 285, 899 0, 0, 40, 0, 174, 147, 0, 0, 35, 285, 900 0, 0, 51, 95, 110, 113, 96, 100, 101, 99, 901 111, 98, 97, 94, 112, 102, 103, 104, 105, 106, 902 107, 108, 109, 283, 123, 277, 287, 0, 128, 290, 903 0, 0, 287, 283, 254, 60, 252, 251, 269, 253, 904 0, 53, 52, 276, 0, 0, 0, 0, 317, 0, 905 0, 0, 0, 0, 316, 0, 311, 312, 313, 0, 906 345, 0, 0, 295, 0, 0, 0, 15, 10, 0, 907 0, 0, 179, 189, 66, 73, 0, 0, 293, 164, 908 243, 244, 288, 249, 211, 0, 0, 0, 293, 0, 909 235, 0, 248, 238, 286, 0, 0, 0, 0, 301, 910 0, 0, 286, 0, 302, 230, 0, 301, 0, 286, 911 0, 286, 0, 42, 274, 0, 0, 0, 198, 169, 912 167, 168, 166, 140, 191, 190, 286, 0, 44, 0, 913 140, 142, 279, 280, 287, 0, 287, 288, 0, 0, 914 0, 131, 289, 261, 288, 0, 0, 0, 0, 215, 915 0, 0, 324, 314, 315, 295, 299, 0, 297, 0, 916 323, 338, 0, 0, 340, 341, 0, 0, 0, 0, 917 0, 301, 0, 0, 308, 0, 296, 303, 307, 304, 918 211, 170, 0, 0, 0, 0, 247, 248, 161, 212, 919 187, 185, 186, 183, 184, 208, 211, 210, 80, 77, 920 236, 240, 0, 228, 201, 194, 0, 0, 92, 62, 921 65, 0, 232, 0, 301, 226, 199, 272, 229, 64, 922 224, 37, 220, 30, 41, 0, 283, 45, 221, 285, 923 47, 33, 43, 283, 0, 288, 284, 137, 0, 278, 924 124, 130, 129, 0, 135, 136, 0, 270, 326, 0, 925 0, 317, 0, 316, 0, 333, 349, 300, 0, 0, 926 0, 347, 298, 327, 339, 0, 305, 0, 318, 0, 927 301, 329, 0, 346, 334, 0, 69, 68, 293, 0, 928 248, 204, 84, 211, 0, 59, 0, 301, 301, 231, 929 0, 170, 0, 286, 0, 46, 0, 140, 144, 141, 930 281, 282, 125, 289, 132, 61, 325, 334, 295, 322, 931 0, 0, 301, 321, 0, 0, 319, 306, 330, 295, 932 295, 337, 206, 335, 67, 70, 213, 0, 86, 241, 933 0, 0, 56, 0, 63, 234, 233, 90, 138, 222, 934 34, 143, 283, 0, 328, 0, 350, 320, 331, 348, 935 0, 0, 0, 211, 0, 85, 81, 0, 0, 0, 936 133, 334, 342, 334, 336, 205, 82, 87, 58, 57, 937 145, 332, 207, 293, 0, 83 938 }; 939 940 /* YYDEFGOTO[NTERM-NUM]. */ 941 static const yytype_int16 yydefgoto[] = 942 { 943 -1, 1, 6, 2, 3, 14, 21, 30, 104, 31, 944 8, 24, 16, 17, 65, 326, 67, 148, 517, 518, 945 144, 145, 68, 499, 327, 437, 500, 576, 387, 365, 946 472, 236, 237, 238, 69, 126, 252, 70, 132, 377, 947 572, 645, 663, 618, 646, 71, 142, 398, 72, 140, 948 73, 74, 75, 76, 313, 422, 423, 589, 77, 315, 949 242, 135, 78, 149, 110, 116, 13, 80, 81, 244, 950 245, 162, 118, 82, 83, 479, 227, 84, 229, 230, 951 85, 86, 87, 129, 213, 88, 251, 485, 89, 90, 952 22, 279, 519, 275, 267, 258, 268, 269, 270, 260, 953 383, 246, 247, 248, 328, 329, 321, 330, 271, 151, 954 92, 316, 424, 425, 221, 373, 170, 139, 253, 465, 955 550, 544, 395, 100, 211, 217, 611, 442, 346, 347, 956 348, 350, 551, 546, 612, 613, 455, 456, 25, 466, 957 552, 547 958 }; 959 960 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 961 STATE-NUM. */ 962 #define YYPACT_NINF -552 963 static const yytype_int16 yypact[] = 964 { 965 -552, 44, 35, 38, -552, 199, -552, 37, -552, -552, 966 -552, 83, 22, -552, 66, 79, -552, -552, 60, -552, 967 107, 89, 993, -552, 110, 454, 150, -552, 155, 179, 968 -552, 38, 182, -552, -552, -552, 199, 1760, -552, 199, 969 42, -552, -552, 257, 42, 199, -552, 7, 125, 1606, 970 -552, 7, -552, 394, 407, 1606, 1606, 1606, 1606, 1606, 971 1606, 1649, 1606, 1606, 1229, 137, -552, 506, -552, -552, 972 -552, -552, -552, 874, -552, -552, 140, 285, -552, 142, 973 -552, 154, 176, 7, 177, -552, -552, -552, 194, 90, 974 -552, -552, 65, -552, 186, -18, 250, 186, 186, 207, 975 -552, -552, -552, -552, 220, -552, -552, -552, -552, -552, 976 -552, -552, 228, 1768, 1768, 1768, -552, 229, -552, -552, 977 -552, -552, -552, -552, 86, 285, 1606, 1735, 245, 246, 978 180, -552, 1606, -552, -552, 216, 1768, 2118, 264, -552, 979 287, 436, 1606, 418, 1768, -552, -552, 452, -552, -552, 980 -552, 669, -552, -552, -552, -552, -552, -552, 1692, 1649, 981 2118, 286, -552, 13, -552, 243, -552, -552, 261, 2118, 982 280, -552, 455, -552, 772, 1606, 1606, 1606, 1606, -552, 983 1606, 1606, 1606, -552, 1606, 1606, 1606, 1606, 1606, 1606, 984 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, -552, 1288, 985 549, 1606, -552, 1606, -552, -552, 1156, 1606, 1606, 1606, 986 -552, 1251, 199, 246, 317, 361, -552, 1944, 1944, -552, 987 55, 322, -552, 1735, 369, 1768, -552, -552, -552, -552, 988 -552, -552, -552, 323, 199, -552, -552, 349, -552, 84, 989 329, 1768, -552, 1735, -552, -552, -552, 310, 333, 1735, 990 1156, -552, -552, 335, 121, 379, -552, 346, 348, -552, 991 -552, 341, -552, 16, 166, -552, -552, 352, -552, -552, 992 413, 545, -552, -552, -552, 358, -552, -552, -552, 360, 993 1606, 199, 363, 1793, -552, 356, 1768, 1768, -552, 373, 994 1606, 371, 2118, 846, -552, 2142, 620, 620, 620, 620, 995 -552, 620, 620, 917, -552, 587, 587, 587, 587, -552, 996 -552, -552, -552, 1343, -552, -552, 36, 1398, -552, 2016, 997 375, 1068, 1983, 1343, -552, -552, -552, -552, -552, -552, 998 0, 264, 264, 2118, 1860, 387, 384, 398, -552, 403, 999 466, 1944, 238, 34, -552, 417, -552, -552, -552, 1036, 1000 -552, -6, 422, 199, 425, 431, 432, -552, -552, 439, 1001 1768, 440, -552, -552, -552, -552, 1453, 1508, 1606, -552, 1002 -552, -552, 1735, -552, 1827, 442, 159, 349, 1606, 199, 1003 433, 445, 1735, -552, 554, 459, 1768, 85, 379, 413, 1004 379, 453, 448, 464, -552, -552, 199, 413, 473, 199, 1005 456, 199, 474, 264, -552, 1606, 1852, 1768, -552, 143, 1006 258, 259, 260, -552, -552, -552, 199, 485, 264, 1606, 1007 -552, 2046, -552, -552, 471, 479, 480, 1649, 494, 497, 1008 498, -552, 1606, -552, -552, 510, 503, 1156, 1068, -552, 1009 1944, 530, -552, -552, -552, 199, 1885, 1944, 199, 1944, 1010 -552, -552, 569, 305, -552, -552, 513, 505, 1944, 238, 1011 1944, 413, 199, 199, -552, 523, 509, -552, -552, -552, 1012 1827, -552, 1156, 1606, 1606, 525, -552, 1735, 533, -552, 1013 -552, -552, -552, -552, -552, -552, 1827, -552, -552, -552, 1014 -552, -552, 529, -552, -552, -552, 1649, 528, -552, -552, 1015 -552, 535, -552, 537, 413, -552, -552, -552, -552, -552, 1016 -552, -552, -552, -552, 264, 540, 1343, -552, -552, 539, 1017 772, -552, 264, 1343, 1551, 1343, -552, -552, 542, -552, 1018 -552, -552, -552, 165, -552, -552, 237, -552, -552, 543, 1019 555, 550, 558, 565, 546, -552, -552, 567, 560, 1944, 1020 566, -552, 576, -552, -552, 595, -552, 1944, -552, 583, 1021 413, -552, 588, -552, 1919, 247, 2118, 2118, 1606, 586, 1022 1735, -552, -552, 1827, 80, -552, 1068, 413, 413, -552, 1023 156, 265, 581, 199, 591, 371, 585, -552, 2118, -552, 1024 -552, -552, -552, 1606, -552, -552, -552, 1919, 199, -552, 1025 1885, 1944, 413, -552, 199, 305, -552, -552, -552, 199, 1026 199, -552, -552, -552, -552, -552, -552, 596, 641, -552, 1027 1606, 1606, -552, 1649, 599, -552, -552, -552, -552, -552, 1028 -552, -552, 1343, 590, -552, 598, -552, -552, -552, -552, 1029 605, 606, 618, 1827, 74, -552, -552, 2070, 2094, 613, 1030 -552, 1919, -552, 1919, -552, -552, -552, -552, -552, -552, 1031 -552, -552, -552, 1606, 349, -552 1032 }; 1033 1034 /* YYPGOTO[NTERM-NUM]. */ 1035 static const yytype_int16 yypgoto[] = 1036 { 1037 -552, -552, -552, -552, -552, -552, -552, -15, -552, -552, 1038 651, -552, 2, -552, -552, 661, -552, -131, -29, 101, 1039 -552, -134, -112, -552, 41, -552, -552, -552, 178, -366, 1040 -552, -552, -552, -552, -552, -552, -139, -552, -552, -552, 1041 -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, 1042 674, 303, 307, -552, -187, 163, 164, -552, 327, -59, 1043 447, -16, 81, 414, 655, 376, 103, 20, -552, 458, 1044 273, 547, -552, -552, -552, -552, -36, -37, -31, -38, 1045 -552, -552, -552, -552, -552, -32, 483, -468, -552, -552, 1046 -552, -552, -552, -552, -552, -552, 315, -116, -238, 318, 1047 -552, 336, -552, -213, -294, 677, -552, -242, -552, -63, 1048 6, 213, -552, -291, -236, -288, -194, -552, -111, -433, 1049 -552, -552, -301, -552, -46, -552, 190, -552, 377, 269, 1050 378, 251, 109, 115, -551, -552, -432, 262, -552, 504, 1051 -552, -552 1052 }; 1053 1054 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 1055 positive, shift that token. If negative, reduce the rule which 1056 number is the opposite. If YYTABLE_NINF, syntax error. */ 1057 #define YYTABLE_NINF -276 1058 static const yytype_int16 yytable[] = 1059 { 1060 120, 119, 161, 272, 174, 122, 121, 320, 376, 274, 1061 359, 488, 540, 103, 235, 240, 278, 323, 571, 259, 1062 235, 555, 385, 164, 163, 389, 391, 433, 428, 165, 1063 235, 393, 436, 107, 435, 141, 375, 457, 173, 400, 1064 380, 212, 133, 402, 4, 35, 634, 426, -182, 214, 1065 37, 216, 218, 417, 462, 138, 11, 117, 27, 112, 1066 5, 15, 438, 7, 47, 48, 9, 204, 439, 463, 1067 207, 51, -181, 206, 134, 388, 228, 228, 228, 9, 1068 -182, 231, 231, 231, 19, 620, 18, 20, 502, 366, 1069 228, 205, 496, -266, 656, 231, 508, 497, -266, 228, 1070 661, 61, 662, 23, 231, 619, 458, 228, 222, 174, 1071 27, 427, 231, 64, 228, 10, 11, 109, 29, 231, 1072 109, 164, 163, 26, -235, 133, 131, 165, 10, 11, 1073 208, 9, 239, 117, 117, 117, 526, 228, 528, 381, 1074 209, 325, 231, 289, 537, 621, 622, 117, -266, 367, 1075 501, 33, 503, 498, -266, 623, 117, 134, 27, 209, 1076 561, 164, 163, 496, 117, 635, 28, 165, 497, 492, 1077 29, 117, 93, 640, 101, 655, 641, 642, -178, 9, 1078 10, 11, 105, -235, 379, 108, 228, -265, 228, -235, 1079 380, 231, -265, 231, 117, 536, 136, 210, 210, 171, 1080 210, 210, -178, 579, 228, 357, 228, 198, -153, 231, 1081 -178, 231, 228, 331, 332, 102, 257, 231, 29, 390, 1082 202, 438, 266, 9, 627, 582, 516, 487, 10, 11, 1083 565, 593, 586, 523, 228, 203, -181, 594, 533, 231, 1084 254, 451, -265, 117, -214, 117, 410, 409, -265, 228, 1085 228, 412, 411, -180, 231, 231, 235, 475, 430, 608, 1086 11, 117, 9, 117, 569, 510, 235, 489, 259, 117, 1087 512, 219, 10, 11, 215, 255, 625, 626, -214, 164, 1088 163, 9, 220, 584, 256, 165, 403, 223, 452, 10, 1089 11, 117, 234, -176, -177, -175, 418, 453, 665, 438, 1090 -179, 638, -180, 117, 249, 595, 117, 117, 451, 438, 1091 -214, 10, 11, 250, 344, 614, 127, -176, -177, -175, 1092 344, 344, 262, 228, -179, -176, -177, -175, 231, 9, 1093 10, 11, -179, 286, 624, 228, 483, 481, 480, 209, 1094 231, 649, 484, 482, 199, 228, 285, 124, 200, 228, 1095 231, 130, 287, 520, 231, 452, 201, 617, 152, 153, 1096 154, 155, 156, 157, 354, 166, 167, 125, 529, 228, 1097 228, 125, 331, 332, 231, 231, 353, 360, 10, 11, 1098 117, 12, 358, 362, 364, 372, 226, 232, 233, 164, 1099 163, 368, 117, 374, 117, 165, 32, 378, 79, 633, 1100 632, 345, 117, 380, 32, 382, 117, 355, 356, 261, 1101 384, 514, 111, 386, 392, 111, 394, 276, 9, 128, 1102 399, 111, 401, 413, 282, 522, 117, 117, 405, 146, 1103 150, 9, 483, 481, 480, 416, 419, 344, 484, 482, 1104 228, 432, 9, 150, 344, 231, 445, 291, 483, 481, 1105 480, 446, 344, 143, 484, 482, 235, 615, 164, 163, 1106 254, 152, 156, 94, 165, 257, 147, 10, 11, 447, 1107 448, 95, 254, 266, 449, 96, 9, 507, 273, 9, 1108 10, 11, 459, 228, 464, 97, 98, 467, 231, 263, 1109 117, 10, 11, 468, 469, 264, 379, 117, 361, 470, 1110 471, 263, 486, 243, 265, 491, 117, 264, 509, 10, 1111 11, 111, 277, 504, 369, 288, 511, 111, 99, 146, 1112 520, 10, 11, 150, 664, 10, 11, 494, 10, 11, 1113 9, 450, 506, 228, 513, 483, 481, 480, 231, 461, 1114 117, 484, 482, 344, 397, 521, 525, 527, 150, 543, 1115 344, 235, 344, 37, 530, 434, 408, 531, 532, 414, 1116 415, 344, 112, 344, 529, 172, 340, 47, 48, 9, 1117 534, 535, 554, 9, 51, 556, 318, 557, 254, 10, 1118 11, 224, 79, 564, 463, 164, 163, 568, 349, 573, 1119 117, 165, 570, 117, 575, 577, 32, 578, 114, 243, 1120 581, 583, 592, 596, 225, 483, 481, 480, 317, -157, 1121 363, 484, 482, 255, 599, 597, 64, 598, 10, 11, 1122 396, 177, 10, 11, -158, 243, 79, 10, 11, 600, 1123 538, 185, 601, 408, 603, 189, 545, 548, 604, 553, 1124 194, 195, 196, 197, 605, 607, 616, 609, 558, 628, 1125 560, 630, 344, 631, 177, 644, 643, 150, 651, 495, 1126 344, 438, 650, 117, 185, 652, 653, 344, 189, 190, 1127 191, 192, 193, 194, 195, 196, 197, 37, 654, 226, 1128 515, 660, 106, 66, 629, 657, 112, 580, 590, 591, 1129 370, 47, 48, 9, 123, 404, 352, 79, 51, 91, 1130 344, 371, 493, 543, 344, 224, 284, 505, 476, 574, 1131 539, 443, 444, 639, 563, 636, 351, 0, 454, 0, 1132 0, 559, 114, 137, 0, 0, 0, 0, 225, 349, 1133 0, 0, 0, 0, 280, 160, 0, 0, 169, 602, 1134 64, 0, 10, 11, 281, 0, 0, 606, 243, 0, 1135 478, 0, 0, 0, 344, 490, 344, 0, 243, 0, 1136 111, 0, 0, 0, 0, 0, 0, 0, 111, 0, 1137 0, 0, 111, 0, 0, 146, 0, 150, 0, 0, 1138 37, 0, 0, 0, 0, 0, 0, 0, 0, 112, 1139 545, 637, 150, 585, 47, 48, 9, 0, 0, 0, 1140 0, 51, 0, 0, 0, 0, 0, 0, 224, 0, 1141 0, 0, 0, 79, 79, 0, 0, 0, 0, 0, 1142 0, 349, 542, 0, 549, 114, 0, 0, 0, 454, 1143 0, 225, 0, 0, 0, 454, 0, 290, 562, 349, 1144 0, 0, 0, 64, 0, 10, 11, 281, 79, 292, 1145 293, 294, 295, 243, 296, 297, 298, 0, 299, 300, 1146 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 1147 311, 312, 0, 160, 0, 319, 0, 322, 175, -275, 1148 177, 137, 137, 333, 180, 181, 182, 0, 0, 184, 1149 185, 186, 187, 0, 189, 190, 191, 192, 193, 194, 1150 195, 196, 197, 0, 0, 0, 0, 176, 177, 0, 1151 178, 179, 180, 181, 182, 0, 183, 184, 185, 186, 1152 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 1153 197, 0, 0, 0, 0, 0, 0, 0, 0, -275, 1154 0, 0, 0, 0, 0, 0, 243, 0, 0, -275, 1155 176, 177, 79, 0, 137, 180, 181, 182, 0, 150, 1156 184, 185, 186, 187, 137, 189, 190, 191, 192, 193, 1157 194, 195, 196, 197, 349, 0, 542, 0, 0, 0, 1158 549, 454, 0, 0, 0, 349, 349, 421, 0, 0, 1159 0, 160, 0, -2, 34, 0, 35, 421, 0, 36, 1160 0, 37, 38, 39, 0, 0, 40, 0, 41, 42, 1161 43, 44, 45, 46, 0, 47, 48, 9, 0, 0, 1162 49, 50, 51, 52, 53, 54, 0, 0, 0, 55, 1163 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1164 137, 137, 56, 57, 334, 58, 59, 460, 0, 60, 1165 0, 0, 61, 335, 0, -24, 0, 0, 336, 337, 1166 338, 0, 62, 63, 64, 339, 10, 11, 0, 324, 1167 0, 35, 340, 0, 36, -250, 37, 38, 39, 137, 1168 -250, 40, 0, 41, 42, 112, 44, 45, 46, 341, 1169 47, 48, 9, 137, 0, 49, 50, 51, 52, 53, 1170 54, 160, 0, 0, 55, 0, 169, 343, 0, 0, 1171 11, 0, 0, 0, 0, 0, 0, 56, 57, 0, 1172 58, 59, 0, 0, 60, 0, 0, 61, 0, 0, 1173 -250, 0, 0, 0, 0, 325, -250, 62, 63, 64, 1174 0, 10, 11, 0, 0, 0, 0, 566, 567, 0, 1175 0, 0, 0, 0, 0, 0, 0, 324, 0, 35, 1176 0, 0, 36, 0, 37, 38, 39, 0, 0, 40, 1177 160, 41, 42, 112, 44, 45, 46, 0, 47, 48, 1178 9, 0, 0, 49, 50, 51, 52, 53, 54, 0, 1179 421, 0, 55, 0, 0, 0, 0, 421, 588, 421, 1180 0, 0, 0, 0, 0, 56, 57, 0, 58, 59, 1181 0, 0, 60, 0, 0, 61, 0, 0, -250, 0, 1182 0, 0, 0, 325, -250, 62, 63, 64, 0, 10, 1183 11, 0, 35, 0, 0, 0, 0, 37, 0, 0, 1184 168, 0, 0, 0, 0, 0, 112, 0, 0, 0, 1185 0, 47, 48, 9, 0, 0, 0, 0, 51, 334, 1186 0, 0, 0, 0, 0, 55, 0, 169, 335, 0, 1187 0, 0, 0, 336, 337, 338, 0, 0, 56, 57, 1188 339, 58, 59, 0, 0, 60, 0, 340, 61, 0, 1189 0, 35, 0, 0, 647, 648, 37, 160, 62, 63, 1190 64, 0, 10, 11, 341, 112, 421, 0, 0, 0, 1191 47, 48, 9, 0, 0, 0, 342, 51, 0, 0, 1192 0, 0, 343, 0, 158, 11, 0, 0, 0, 0, 1193 0, 0, 0, 0, 0, 0, 0, 56, 57, 0, 1194 58, 159, 0, 0, 60, 0, 35, 61, 314, 0, 1195 0, 37, 0, 0, 0, 0, 0, 62, 63, 64, 1196 112, 10, 11, 0, 0, 47, 48, 9, 0, 0, 1197 0, 0, 51, 0, 0, 0, 0, 0, 0, 55, 1198 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1199 0, 0, 56, 57, 0, 58, 59, 0, 0, 60, 1200 0, 35, 61, 0, 0, 0, 37, 0, 0, 0, 1201 420, 0, 62, 63, 64, 112, 10, 11, 0, 0, 1202 47, 48, 9, 0, 0, 0, 0, 51, 0, 429, 1203 0, 0, 0, 0, 158, 0, 0, 0, 0, 0, 1204 0, 0, 0, 0, 0, 0, 0, 56, 57, 0, 1205 58, 159, 0, 0, 60, 0, 35, 61, 0, 0, 1206 0, 37, 0, 0, 0, 0, 0, 62, 63, 64, 1207 112, 10, 11, 0, 0, 47, 48, 9, 0, 473, 1208 0, 0, 51, 0, 0, 0, 0, 0, 0, 55, 1209 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1210 0, 0, 56, 57, 0, 58, 59, 0, 0, 60, 1211 0, 35, 61, 0, 0, 0, 37, 0, 0, 0, 1212 0, 0, 62, 63, 64, 112, 10, 11, 0, 0, 1213 47, 48, 9, 0, 474, 0, 0, 51, 0, 0, 1214 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, 1215 0, 0, 0, 0, 35, 0, 0, 56, 57, 37, 1216 58, 59, 0, 0, 60, 0, 0, 61, 112, 0, 1217 0, 0, 0, 47, 48, 9, 0, 62, 63, 64, 1218 51, 10, 11, 0, 0, 0, 0, 55, 0, 0, 1219 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1220 56, 57, 0, 58, 59, 0, 0, 60, 0, 35, 1221 61, 0, 0, 0, 37, 0, 0, 0, 587, 0, 1222 62, 63, 64, 112, 10, 11, 0, 0, 47, 48, 1223 9, 0, 0, 0, 0, 51, 0, 0, 0, 0, 1224 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 1225 0, 0, 35, 0, 0, 56, 57, 37, 58, 59, 1226 0, 0, 60, 0, 0, 61, 112, 0, 0, 0, 1227 0, 47, 48, 9, 0, 62, 63, 64, 51, 10, 1228 11, 0, 0, 0, 0, 158, 0, 0, 0, 0, 1229 0, 0, 0, 0, 0, 35, 0, 0, 56, 57, 1230 283, 58, 159, 0, 0, 60, 0, 0, 61, 112, 1231 0, 0, 0, 0, 47, 48, 9, 0, 62, 63, 1232 64, 51, 10, 11, 0, 0, 0, 0, 55, 0, 1233 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1234 0, 56, 57, 37, 58, 59, 241, 0, 60, 0, 1235 0, 61, 112, 0, 0, 0, 0, 47, 48, 9, 1236 0, 62, 63, 64, 51, 10, 11, 0, 37, 0, 1237 0, 224, 0, 0, 0, 0, 37, 112, 0, 0, 1238 0, 0, 47, 48, 9, 112, 0, 0, 114, 51, 1239 47, 48, 9, 0, 225, 0, 113, 51, 0, 0, 1240 0, 37, 0, 0, 224, 0, 64, 0, 10, 11, 1241 112, 0, 0, 114, 0, 47, 48, 9, 0, 115, 1242 0, 114, 51, 0, 0, 0, 0, 225, 0, 406, 1243 0, 64, 0, 10, 11, 37, 0, 0, 0, 64, 1244 0, 10, 11, 0, 112, 0, 114, 0, 0, 47, 1245 48, 9, 407, 0, 0, 0, 51, 0, 0, 0, 1246 283, 0, 0, 224, 64, 0, 10, 11, 334, 112, 1247 0, 0, 0, 0, 47, 48, 9, 335, 0, 0, 1248 114, 51, 336, 337, 338, 0, 477, 0, 224, 339, 1249 0, 0, 0, 334, 0, 0, 440, 0, 64, 0, 1250 10, 11, 335, 0, 0, 114, 0, 336, 337, 541, 1251 0, 225, 0, 341, 339, 0, 0, 0, 0, 441, 1252 0, 340, 0, 64, 0, 10, 11, 334, 0, 0, 1253 0, 343, 0, 0, 11, 0, 335, 0, 341, 0, 1254 0, 336, 337, 338, 0, 0, 0, 0, 339, 0, 1255 0, 0, 334, 0, 0, 340, 343, 0, 10, 11, 1256 0, 335, 0, 0, 0, 0, 336, 337, 338, 0, 1257 0, 0, 341, 339, 0, 0, 0, 0, 610, 0, 1258 340, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1259 343, 0, 0, 11, 0, 0, 0, 341, 0, 0, 1260 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1261 0, 0, 0, 0, 0, 343, 176, 177, 11, 178, 1262 0, 180, 181, 182, 0, 0, 184, 185, 186, 187, 1263 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 1264 0, 0, 0, 0, 0, 0, 0, 0, 0, 176, 1265 177, 0, 178, 0, 180, 181, 182, 0, 434, 184, 1266 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 1267 195, 196, 197, 0, 0, 0, 0, 0, 0, 176, 1268 177, 0, 178, 0, 180, 181, 182, 0, 431, 184, 1269 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 1270 195, 196, 197, 176, 177, 0, 178, 0, 180, 181, 1271 182, 0, 524, 184, 185, 186, 187, 188, 189, 190, 1272 191, 192, 193, 194, 195, 196, 197, 176, 177, 0, 1273 178, 0, 180, 181, 182, 0, 658, 184, 185, 186, 1274 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 1275 197, 176, 177, 0, 178, 0, 180, 181, 182, 0, 1276 659, 184, 185, 186, 187, 188, 189, 190, 191, 192, 1277 193, 194, 195, 196, 197, 176, 177, 0, 0, 0, 1278 180, 181, 182, 0, 0, 184, 185, 186, 187, 188, 1279 189, 190, 191, 192, 193, 194, 195, 196, 197 1280 }; 1281 1282 #define yypact_value_is_default(yystate) \ 1283 ((yystate) == (-552)) 1284 1285 #define yytable_value_is_error(yytable_value) \ 1286 YYID (0) 1287 1288 static const yytype_int16 yycheck[] = 1289 { 1290 37, 37, 61, 142, 67, 37, 37, 201, 250, 143, 1291 223, 377, 445, 28, 126, 126, 147, 204, 486, 135, 1292 132, 453, 258, 61, 61, 263, 264, 321, 316, 61, 1293 142, 267, 323, 31, 322, 51, 249, 3, 67, 275, 1294 24, 59, 35, 279, 0, 3, 597, 11, 35, 95, 1295 8, 97, 98, 289, 60, 49, 74, 37, 3, 17, 1296 25, 24, 62, 25, 22, 23, 24, 83, 68, 75, 1297 5, 29, 59, 89, 67, 59, 113, 114, 115, 24, 1298 67, 113, 114, 115, 62, 5, 3, 21, 389, 5, 1299 127, 1, 7, 7, 20, 127, 397, 12, 12, 136, 1300 651, 59, 653, 24, 136, 573, 72, 144, 106, 172, 1301 3, 75, 144, 71, 151, 73, 74, 36, 63, 151, 1302 39, 159, 159, 63, 3, 35, 45, 159, 73, 74, 1303 65, 24, 126, 113, 114, 115, 424, 174, 426, 255, 1304 75, 67, 174, 172, 438, 65, 66, 127, 62, 65, 1305 388, 62, 390, 68, 68, 75, 136, 67, 3, 75, 1306 461, 199, 199, 7, 144, 598, 59, 199, 12, 382, 1307 63, 151, 62, 605, 24, 643, 609, 610, 35, 24, 1308 73, 74, 3, 62, 63, 3, 223, 7, 225, 68, 1309 24, 223, 12, 225, 174, 437, 71, 94, 95, 62, 1310 97, 98, 59, 504, 241, 220, 243, 67, 66, 241, 1311 67, 243, 249, 207, 208, 60, 135, 249, 63, 53, 1312 66, 62, 141, 24, 68, 516, 413, 68, 73, 74, 1313 472, 66, 523, 420, 271, 59, 59, 72, 432, 271, 1314 24, 3, 62, 223, 1, 225, 283, 283, 68, 286, 1315 287, 283, 283, 59, 286, 287, 368, 368, 317, 560, 1316 74, 241, 24, 243, 477, 399, 378, 378, 384, 249, 1317 401, 64, 73, 74, 24, 59, 577, 578, 35, 317, 1318 317, 24, 62, 519, 68, 317, 280, 59, 50, 73, 1319 74, 271, 63, 35, 35, 35, 290, 59, 664, 62, 1320 35, 602, 59, 283, 59, 68, 286, 287, 3, 62, 1321 67, 73, 74, 67, 211, 68, 59, 59, 59, 59, 1322 217, 218, 35, 360, 59, 67, 67, 67, 360, 24, 1323 73, 74, 67, 72, 576, 372, 374, 374, 374, 75, 1324 372, 632, 374, 374, 59, 382, 60, 40, 63, 386, 1325 382, 44, 72, 416, 386, 50, 71, 570, 55, 56, 1326 57, 58, 59, 60, 3, 62, 63, 40, 427, 406, 1327 407, 44, 366, 367, 406, 407, 59, 8, 73, 74, 1328 360, 5, 60, 60, 35, 75, 113, 114, 115, 427, 1329 427, 62, 372, 60, 374, 427, 20, 62, 22, 593, 1330 587, 211, 382, 24, 28, 59, 386, 217, 218, 136, 1331 62, 405, 36, 72, 62, 39, 3, 144, 24, 43, 1332 62, 45, 62, 67, 151, 419, 406, 407, 65, 53, 1333 54, 24, 470, 470, 470, 62, 65, 334, 470, 470, 1334 477, 66, 24, 67, 341, 477, 59, 174, 486, 486, 1335 486, 67, 349, 59, 486, 486, 568, 568, 496, 496, 1336 24, 158, 159, 9, 496, 384, 59, 73, 74, 71, 1337 67, 17, 24, 392, 8, 21, 24, 396, 60, 24, 1338 73, 74, 65, 520, 62, 31, 32, 62, 520, 53, 1339 470, 73, 74, 62, 62, 59, 63, 477, 225, 60, 1340 60, 53, 60, 127, 68, 60, 486, 59, 35, 73, 1341 74, 135, 60, 60, 241, 60, 60, 141, 64, 143, 1342 583, 73, 74, 147, 663, 73, 74, 68, 73, 74, 1343 24, 341, 68, 570, 60, 573, 573, 573, 570, 349, 1344 520, 573, 573, 440, 271, 60, 75, 68, 172, 446, 1345 447, 663, 449, 8, 60, 75, 283, 60, 60, 286, 1346 287, 458, 17, 460, 623, 59, 36, 22, 23, 24, 1347 60, 68, 3, 24, 29, 62, 200, 72, 24, 73, 1348 74, 36, 206, 60, 75, 623, 623, 62, 212, 60, 1349 570, 623, 59, 573, 66, 60, 220, 60, 53, 223, 1350 60, 62, 60, 60, 59, 643, 643, 643, 59, 59, 1351 234, 643, 643, 59, 68, 60, 71, 59, 73, 74, 1352 75, 34, 73, 74, 59, 249, 250, 73, 74, 62, 1353 440, 44, 72, 360, 68, 48, 446, 447, 62, 449, 1354 53, 54, 55, 56, 49, 62, 60, 59, 458, 68, 1355 460, 60, 549, 68, 34, 14, 60, 281, 60, 386, 1356 557, 62, 72, 643, 44, 60, 60, 564, 48, 49, 1357 50, 51, 52, 53, 54, 55, 56, 8, 60, 406, 1358 407, 68, 31, 22, 583, 644, 17, 509, 525, 525, 1359 243, 22, 23, 24, 39, 281, 213, 321, 29, 22, 1360 597, 243, 384, 600, 601, 36, 159, 392, 372, 496, 1361 441, 334, 334, 604, 463, 600, 212, -1, 342, -1, 1362 -1, 459, 53, 49, -1, -1, -1, -1, 59, 353, 1363 -1, -1, -1, -1, 65, 61, -1, -1, 64, 549, 1364 71, -1, 73, 74, 75, -1, -1, 557, 372, -1, 1365 374, -1, -1, -1, 651, 379, 653, -1, 382, -1, 1366 384, -1, -1, -1, -1, -1, -1, -1, 392, -1, 1367 -1, -1, 396, -1, -1, 399, -1, 401, -1, -1, 1368 8, -1, -1, -1, -1, -1, -1, -1, -1, 17, 1369 600, 601, 416, 520, 22, 23, 24, -1, -1, -1, 1370 -1, 29, -1, -1, -1, -1, -1, -1, 36, -1, 1371 -1, -1, -1, 437, 438, -1, -1, -1, -1, -1, 1372 -1, 445, 446, -1, 448, 53, -1, -1, -1, 453, 1373 -1, 59, -1, -1, -1, 459, -1, 65, 462, 463, 1374 -1, -1, -1, 71, -1, 73, 74, 75, 472, 175, 1375 176, 177, 178, 477, 180, 181, 182, -1, 184, 185, 1376 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 1377 196, 197, -1, 199, -1, 201, -1, 203, 4, 5, 1378 34, 207, 208, 209, 38, 39, 40, -1, -1, 43, 1379 44, 45, 46, -1, 48, 49, 50, 51, 52, 53, 1380 54, 55, 56, -1, -1, -1, -1, 33, 34, -1, 1381 36, 37, 38, 39, 40, -1, 42, 43, 44, 45, 1382 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 1383 56, -1, -1, -1, -1, -1, -1, -1, -1, 65, 1384 -1, -1, -1, -1, -1, -1, 570, -1, -1, 75, 1385 33, 34, 576, -1, 280, 38, 39, 40, -1, 583, 1386 43, 44, 45, 46, 290, 48, 49, 50, 51, 52, 1387 53, 54, 55, 56, 598, -1, 600, -1, -1, -1, 1388 604, 605, -1, -1, -1, 609, 610, 313, -1, -1, 1389 -1, 317, -1, 0, 1, -1, 3, 323, -1, 6, 1390 -1, 8, 9, 10, -1, -1, 13, -1, 15, 16, 1391 17, 18, 19, 20, -1, 22, 23, 24, -1, -1, 1392 27, 28, 29, 30, 31, 32, -1, -1, -1, 36, 1393 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1394 366, 367, 49, 50, 8, 52, 53, 11, -1, 56, 1395 -1, -1, 59, 17, -1, 62, -1, -1, 22, 23, 1396 24, -1, 69, 70, 71, 29, 73, 74, -1, 1, 1397 -1, 3, 36, -1, 6, 7, 8, 9, 10, 405, 1398 12, 13, -1, 15, 16, 17, 18, 19, 20, 53, 1399 22, 23, 24, 419, -1, 27, 28, 29, 30, 31, 1400 32, 427, -1, -1, 36, -1, 432, 71, -1, -1, 1401 74, -1, -1, -1, -1, -1, -1, 49, 50, -1, 1402 52, 53, -1, -1, 56, -1, -1, 59, -1, -1, 1403 62, -1, -1, -1, -1, 67, 68, 69, 70, 71, 1404 -1, 73, 74, -1, -1, -1, -1, 473, 474, -1, 1405 -1, -1, -1, -1, -1, -1, -1, 1, -1, 3, 1406 -1, -1, 6, -1, 8, 9, 10, -1, -1, 13, 1407 496, 15, 16, 17, 18, 19, 20, -1, 22, 23, 1408 24, -1, -1, 27, 28, 29, 30, 31, 32, -1, 1409 516, -1, 36, -1, -1, -1, -1, 523, 524, 525, 1410 -1, -1, -1, -1, -1, 49, 50, -1, 52, 53, 1411 -1, -1, 56, -1, -1, 59, -1, -1, 62, -1, 1412 -1, -1, -1, 67, 68, 69, 70, 71, -1, 73, 1413 74, -1, 3, -1, -1, -1, -1, 8, -1, -1, 1414 11, -1, -1, -1, -1, -1, 17, -1, -1, -1, 1415 -1, 22, 23, 24, -1, -1, -1, -1, 29, 8, 1416 -1, -1, -1, -1, -1, 36, -1, 593, 17, -1, 1417 -1, -1, -1, 22, 23, 24, -1, -1, 49, 50, 1418 29, 52, 53, -1, -1, 56, -1, 36, 59, -1, 1419 -1, 3, -1, -1, 620, 621, 8, 623, 69, 70, 1420 71, -1, 73, 74, 53, 17, 632, -1, -1, -1, 1421 22, 23, 24, -1, -1, -1, 65, 29, -1, -1, 1422 -1, -1, 71, -1, 36, 74, -1, -1, -1, -1, 1423 -1, -1, -1, -1, -1, -1, -1, 49, 50, -1, 1424 52, 53, -1, -1, 56, -1, 3, 59, 60, -1, 1425 -1, 8, -1, -1, -1, -1, -1, 69, 70, 71, 1426 17, 73, 74, -1, -1, 22, 23, 24, -1, -1, 1427 -1, -1, 29, -1, -1, -1, -1, -1, -1, 36, 1428 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1429 -1, -1, 49, 50, -1, 52, 53, -1, -1, 56, 1430 -1, 3, 59, -1, -1, -1, 8, -1, -1, -1, 1431 67, -1, 69, 70, 71, 17, 73, 74, -1, -1, 1432 22, 23, 24, -1, -1, -1, -1, 29, -1, 31, 1433 -1, -1, -1, -1, 36, -1, -1, -1, -1, -1, 1434 -1, -1, -1, -1, -1, -1, -1, 49, 50, -1, 1435 52, 53, -1, -1, 56, -1, 3, 59, -1, -1, 1436 -1, 8, -1, -1, -1, -1, -1, 69, 70, 71, 1437 17, 73, 74, -1, -1, 22, 23, 24, -1, 26, 1438 -1, -1, 29, -1, -1, -1, -1, -1, -1, 36, 1439 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1440 -1, -1, 49, 50, -1, 52, 53, -1, -1, 56, 1441 -1, 3, 59, -1, -1, -1, 8, -1, -1, -1, 1442 -1, -1, 69, 70, 71, 17, 73, 74, -1, -1, 1443 22, 23, 24, -1, 26, -1, -1, 29, -1, -1, 1444 -1, -1, -1, -1, 36, -1, -1, -1, -1, -1, 1445 -1, -1, -1, -1, 3, -1, -1, 49, 50, 8, 1446 52, 53, -1, -1, 56, -1, -1, 59, 17, -1, 1447 -1, -1, -1, 22, 23, 24, -1, 69, 70, 71, 1448 29, 73, 74, -1, -1, -1, -1, 36, -1, -1, 1449 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1450 49, 50, -1, 52, 53, -1, -1, 56, -1, 3, 1451 59, -1, -1, -1, 8, -1, -1, -1, 67, -1, 1452 69, 70, 71, 17, 73, 74, -1, -1, 22, 23, 1453 24, -1, -1, -1, -1, 29, -1, -1, -1, -1, 1454 -1, -1, 36, -1, -1, -1, -1, -1, -1, -1, 1455 -1, -1, 3, -1, -1, 49, 50, 8, 52, 53, 1456 -1, -1, 56, -1, -1, 59, 17, -1, -1, -1, 1457 -1, 22, 23, 24, -1, 69, 70, 71, 29, 73, 1458 74, -1, -1, -1, -1, 36, -1, -1, -1, -1, 1459 -1, -1, -1, -1, -1, 3, -1, -1, 49, 50, 1460 8, 52, 53, -1, -1, 56, -1, -1, 59, 17, 1461 -1, -1, -1, -1, 22, 23, 24, -1, 69, 70, 1462 71, 29, 73, 74, -1, -1, -1, -1, 36, -1, 1463 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1464 -1, 49, 50, 8, 52, 53, 11, -1, 56, -1, 1465 -1, 59, 17, -1, -1, -1, -1, 22, 23, 24, 1466 -1, 69, 70, 71, 29, 73, 74, -1, 8, -1, 1467 -1, 36, -1, -1, -1, -1, 8, 17, -1, -1, 1468 -1, -1, 22, 23, 24, 17, -1, -1, 53, 29, 1469 22, 23, 24, -1, 59, -1, 36, 29, -1, -1, 1470 -1, 8, -1, -1, 36, -1, 71, -1, 73, 74, 1471 17, -1, -1, 53, -1, 22, 23, 24, -1, 59, 1472 -1, 53, 29, -1, -1, -1, -1, 59, -1, 36, 1473 -1, 71, -1, 73, 74, 8, -1, -1, -1, 71, 1474 -1, 73, 74, -1, 17, -1, 53, -1, -1, 22, 1475 23, 24, 59, -1, -1, -1, 29, -1, -1, -1, 1476 8, -1, -1, 36, 71, -1, 73, 74, 8, 17, 1477 -1, -1, -1, -1, 22, 23, 24, 17, -1, -1, 1478 53, 29, 22, 23, 24, -1, 59, -1, 36, 29, 1479 -1, -1, -1, 8, -1, -1, 36, -1, 71, -1, 1480 73, 74, 17, -1, -1, 53, -1, 22, 23, 24, 1481 -1, 59, -1, 53, 29, -1, -1, -1, -1, 59, 1482 -1, 36, -1, 71, -1, 73, 74, 8, -1, -1, 1483 -1, 71, -1, -1, 74, -1, 17, -1, 53, -1, 1484 -1, 22, 23, 24, -1, -1, -1, -1, 29, -1, 1485 -1, -1, 8, -1, -1, 36, 71, -1, 73, 74, 1486 -1, 17, -1, -1, -1, -1, 22, 23, 24, -1, 1487 -1, -1, 53, 29, -1, -1, -1, -1, 59, -1, 1488 36, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1489 71, -1, -1, 74, -1, -1, -1, 53, -1, -1, 1490 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1491 -1, -1, -1, -1, -1, 71, 33, 34, 74, 36, 1492 -1, 38, 39, 40, -1, -1, 43, 44, 45, 46, 1493 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 1494 -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, 1495 34, -1, 36, -1, 38, 39, 40, -1, 75, 43, 1496 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 1497 54, 55, 56, -1, -1, -1, -1, -1, -1, 33, 1498 34, -1, 36, -1, 38, 39, 40, -1, 72, 43, 1499 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 1500 54, 55, 56, 33, 34, -1, 36, -1, 38, 39, 1501 40, -1, 66, 43, 44, 45, 46, 47, 48, 49, 1502 50, 51, 52, 53, 54, 55, 56, 33, 34, -1, 1503 36, -1, 38, 39, 40, -1, 66, 43, 44, 45, 1504 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 1505 56, 33, 34, -1, 36, -1, 38, 39, 40, -1, 1506 66, 43, 44, 45, 46, 47, 48, 49, 50, 51, 1507 52, 53, 54, 55, 56, 33, 34, -1, -1, -1, 1508 38, 39, 40, -1, -1, 43, 44, 45, 46, 47, 1509 48, 49, 50, 51, 52, 53, 54, 55, 56 1510 }; 1511 1512 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 1513 symbol of state STATE-NUM. */ 1514 static const yytype_uint8 yystos[] = 1515 { 1516 0, 77, 79, 80, 0, 25, 78, 25, 86, 24, 1517 73, 74, 141, 142, 81, 24, 88, 89, 3, 62, 1518 21, 82, 166, 24, 87, 214, 63, 3, 59, 63, 1519 83, 85, 141, 62, 1, 3, 6, 8, 9, 10, 1520 13, 15, 16, 17, 18, 19, 20, 22, 23, 27, 1521 28, 29, 30, 31, 32, 36, 49, 50, 52, 53, 1522 56, 59, 69, 70, 71, 90, 91, 92, 98, 110, 1523 113, 121, 124, 126, 127, 128, 129, 134, 138, 141, 1524 143, 144, 149, 150, 153, 156, 157, 158, 161, 164, 1525 165, 181, 186, 62, 9, 17, 21, 31, 32, 64, 1526 199, 24, 60, 83, 84, 3, 86, 88, 3, 138, 1527 140, 141, 17, 36, 53, 59, 141, 143, 148, 152, 1528 153, 154, 161, 140, 128, 134, 111, 59, 141, 159, 1529 128, 138, 114, 35, 67, 137, 71, 126, 186, 193, 1530 125, 137, 122, 59, 96, 97, 141, 59, 93, 139, 1531 141, 185, 127, 127, 127, 127, 127, 127, 36, 53, 1532 126, 135, 147, 153, 155, 161, 127, 127, 11, 126, 1533 192, 62, 59, 94, 185, 4, 33, 34, 36, 37, 1534 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 1535 49, 50, 51, 52, 53, 54, 55, 56, 67, 59, 1536 63, 71, 66, 59, 137, 1, 137, 5, 65, 75, 1537 142, 200, 59, 160, 200, 24, 200, 201, 200, 64, 1538 62, 190, 88, 59, 36, 59, 146, 152, 153, 154, 1539 155, 161, 146, 146, 63, 98, 107, 108, 109, 186, 1540 194, 11, 136, 141, 145, 146, 177, 178, 179, 59, 1541 67, 162, 112, 194, 24, 59, 68, 138, 171, 173, 1542 175, 146, 35, 53, 59, 68, 138, 170, 172, 173, 1543 174, 184, 112, 60, 97, 169, 146, 60, 93, 167, 1544 65, 75, 146, 8, 147, 60, 72, 72, 60, 94, 1545 65, 146, 126, 126, 126, 126, 126, 126, 126, 126, 1546 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 1547 126, 126, 126, 130, 60, 135, 187, 59, 141, 126, 1548 192, 182, 126, 130, 1, 67, 91, 100, 180, 181, 1549 183, 186, 186, 126, 8, 17, 22, 23, 24, 29, 1550 36, 53, 65, 71, 142, 202, 204, 205, 206, 141, 1551 207, 215, 162, 59, 3, 202, 202, 83, 60, 179, 1552 8, 146, 60, 141, 35, 105, 5, 65, 62, 146, 1553 136, 145, 75, 191, 60, 179, 183, 115, 62, 63, 1554 24, 173, 59, 176, 62, 190, 72, 104, 59, 174, 1555 53, 174, 62, 190, 3, 198, 75, 146, 123, 62, 1556 190, 62, 190, 186, 139, 65, 36, 59, 146, 152, 1557 153, 154, 161, 67, 146, 146, 62, 190, 186, 65, 1558 67, 126, 131, 132, 188, 189, 11, 75, 191, 31, 1559 135, 72, 66, 180, 75, 191, 189, 101, 62, 68, 1560 36, 59, 203, 204, 206, 59, 67, 71, 67, 8, 1561 202, 3, 50, 59, 141, 212, 213, 3, 72, 65, 1562 11, 202, 60, 75, 62, 195, 215, 62, 62, 62, 1563 60, 60, 106, 26, 26, 194, 177, 59, 141, 151, 1564 152, 153, 154, 155, 161, 163, 60, 68, 105, 194, 1565 141, 60, 179, 175, 68, 146, 7, 12, 68, 99, 1566 102, 174, 198, 174, 60, 172, 68, 138, 198, 35, 1567 97, 60, 93, 60, 186, 146, 130, 94, 95, 168, 1568 185, 60, 186, 130, 66, 75, 191, 68, 191, 135, 1569 60, 60, 60, 192, 60, 68, 183, 180, 202, 205, 1570 195, 24, 141, 142, 197, 202, 209, 217, 202, 141, 1571 196, 208, 216, 202, 3, 212, 62, 72, 202, 213, 1572 202, 198, 141, 207, 60, 183, 126, 126, 62, 179, 1573 59, 163, 116, 60, 187, 66, 103, 60, 60, 198, 1574 104, 60, 189, 62, 190, 146, 189, 67, 126, 133, 1575 131, 132, 60, 66, 72, 68, 60, 60, 59, 68, 1576 62, 72, 202, 68, 62, 49, 202, 62, 198, 59, 1577 59, 202, 210, 211, 68, 194, 60, 179, 119, 163, 1578 5, 65, 66, 75, 183, 198, 198, 68, 68, 95, 1579 60, 68, 130, 192, 210, 195, 209, 202, 198, 208, 1580 212, 195, 195, 60, 14, 117, 120, 126, 126, 189, 1581 72, 60, 60, 60, 60, 163, 20, 100, 66, 66, 1582 68, 210, 210, 118, 112, 105 1583 }; 1584 1585 #define yyerrok (yyerrstatus = 0) 1586 #define yyclearin (yychar = YYEMPTY) 1587 #define YYEMPTY (-2) 1588 #define YYEOF 0 1589 1590 #define YYACCEPT goto yyacceptlab 1591 #define YYABORT goto yyabortlab 1592 #define YYERROR goto yyerrorlab 1593 1594 1595 /* Like YYERROR except do call yyerror. This remains here temporarily 1596 to ease the transition to the new meaning of YYERROR, for GCC. 1597 Once GCC version 2 has supplanted version 1, this can go. However, 1598 YYFAIL appears to be in use. Nevertheless, it is formally deprecated 1599 in Bison 2.4.2's NEWS entry, where a plan to phase it out is 1600 discussed. */ 1601 1602 #define YYFAIL goto yyerrlab 1603 #if defined YYFAIL 1604 /* This is here to suppress warnings from the GCC cpp's 1605 -Wunused-macros. Normally we don't worry about that warning, but 1606 some users do, and we want to make it easy for users to remove 1607 YYFAIL uses, which will produce warnings from Bison 2.5. */ 1608 #endif 1609 1610 #define YYRECOVERING() (!!yyerrstatus) 1611 1612 #define YYBACKUP(Token, Value) \ 1613 do \ 1614 if (yychar == YYEMPTY && yylen == 1) \ 1615 { \ 1616 yychar = (Token); \ 1617 yylval = (Value); \ 1618 YYPOPSTACK (1); \ 1619 goto yybackup; \ 1620 } \ 1621 else \ 1622 { \ 1623 yyerror (YY_("syntax error: cannot back up")); \ 1624 YYERROR; \ 1625 } \ 1626 while (YYID (0)) 1627 1628 1629 #define YYTERROR 1 1630 #define YYERRCODE 256 1631 1632 1633 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 1634 If N is 0, then set CURRENT to the empty location which ends 1635 the previous symbol: RHS[0] (always defined). */ 1636 1637 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 1638 #ifndef YYLLOC_DEFAULT 1639 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 1640 do \ 1641 if (YYID (N)) \ 1642 { \ 1643 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 1644 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 1645 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 1646 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 1647 } \ 1648 else \ 1649 { \ 1650 (Current).first_line = (Current).last_line = \ 1651 YYRHSLOC (Rhs, 0).last_line; \ 1652 (Current).first_column = (Current).last_column = \ 1653 YYRHSLOC (Rhs, 0).last_column; \ 1654 } \ 1655 while (YYID (0)) 1656 #endif 1657 1658 1659 /* This macro is provided for backward compatibility. */ 1660 1661 #ifndef YY_LOCATION_PRINT 1662 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 1663 #endif 1664 1665 1666 /* YYLEX -- calling `yylex' with the right arguments. */ 1667 1668 #ifdef YYLEX_PARAM 1669 # define YYLEX yylex (YYLEX_PARAM) 1670 #else 1671 # define YYLEX yylex () 1672 #endif 1673 1674 /* Enable debugging if requested. */ 1675 #if YYDEBUG 1676 1677 # ifndef YYFPRINTF 1678 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 1679 # define YYFPRINTF fprintf 1680 # endif 1681 1682 # define YYDPRINTF(Args) \ 1683 do { \ 1684 if (yydebug) \ 1685 YYFPRINTF Args; \ 1686 } while (YYID (0)) 1687 1688 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 1689 do { \ 1690 if (yydebug) \ 1691 { \ 1692 YYFPRINTF (stderr, "%s ", Title); \ 1693 yy_symbol_print (stderr, \ 1694 Type, Value); \ 1695 YYFPRINTF (stderr, "\n"); \ 1696 } \ 1697 } while (YYID (0)) 1698 1699 1700 /*--------------------------------. 1701 | Print this symbol on YYOUTPUT. | 1702 `--------------------------------*/ 1703 1704 /*ARGSUSED*/ 1705 #if (defined __STDC__ || defined __C99__FUNC__ \ 1706 || defined __cplusplus || defined _MSC_VER) 1707 static void 1708 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 1709 #else 1710 static void 1711 yy_symbol_value_print (yyoutput, yytype, yyvaluep) 1712 FILE *yyoutput; 1713 int yytype; 1714 YYSTYPE const * const yyvaluep; 1715 #endif 1716 { 1717 if (!yyvaluep) 1718 return; 1719 # ifdef YYPRINT 1720 if (yytype < YYNTOKENS) 1721 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 1722 # else 1723 YYUSE (yyoutput); 1724 # endif 1725 switch (yytype) 1726 { 1727 default: 1728 break; 1729 } 1730 } 1731 1732 1733 /*--------------------------------. 1734 | Print this symbol on YYOUTPUT. | 1735 `--------------------------------*/ 1736 1737 #if (defined __STDC__ || defined __C99__FUNC__ \ 1738 || defined __cplusplus || defined _MSC_VER) 1739 static void 1740 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 1741 #else 1742 static void 1743 yy_symbol_print (yyoutput, yytype, yyvaluep) 1744 FILE *yyoutput; 1745 int yytype; 1746 YYSTYPE const * const yyvaluep; 1747 #endif 1748 { 1749 if (yytype < YYNTOKENS) 1750 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 1751 else 1752 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 1753 1754 yy_symbol_value_print (yyoutput, yytype, yyvaluep); 1755 YYFPRINTF (yyoutput, ")"); 1756 } 1757 1758 /*------------------------------------------------------------------. 1759 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 1760 | TOP (included). | 1761 `------------------------------------------------------------------*/ 1762 1763 #if (defined __STDC__ || defined __C99__FUNC__ \ 1764 || defined __cplusplus || defined _MSC_VER) 1765 static void 1766 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 1767 #else 1768 static void 1769 yy_stack_print (yybottom, yytop) 1770 yytype_int16 *yybottom; 1771 yytype_int16 *yytop; 1772 #endif 1773 { 1774 YYFPRINTF (stderr, "Stack now"); 1775 for (; yybottom <= yytop; yybottom++) 1776 { 1777 int yybot = *yybottom; 1778 YYFPRINTF (stderr, " %d", yybot); 1779 } 1780 YYFPRINTF (stderr, "\n"); 1781 } 1782 1783 # define YY_STACK_PRINT(Bottom, Top) \ 1784 do { \ 1785 if (yydebug) \ 1786 yy_stack_print ((Bottom), (Top)); \ 1787 } while (YYID (0)) 1788 1789 1790 /*------------------------------------------------. 1791 | Report that the YYRULE is going to be reduced. | 1792 `------------------------------------------------*/ 1793 1794 #if (defined __STDC__ || defined __C99__FUNC__ \ 1795 || defined __cplusplus || defined _MSC_VER) 1796 static void 1797 yy_reduce_print (YYSTYPE *yyvsp, int yyrule) 1798 #else 1799 static void 1800 yy_reduce_print (yyvsp, yyrule) 1801 YYSTYPE *yyvsp; 1802 int yyrule; 1803 #endif 1804 { 1805 int yynrhs = yyr2[yyrule]; 1806 int yyi; 1807 unsigned long int yylno = yyrline[yyrule]; 1808 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 1809 yyrule - 1, yylno); 1810 /* The symbols being reduced. */ 1811 for (yyi = 0; yyi < yynrhs; yyi++) 1812 { 1813 YYFPRINTF (stderr, " $%d = ", yyi + 1); 1814 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 1815 &(yyvsp[(yyi + 1) - (yynrhs)]) 1816 ); 1817 YYFPRINTF (stderr, "\n"); 1818 } 1819 } 1820 1821 # define YY_REDUCE_PRINT(Rule) \ 1822 do { \ 1823 if (yydebug) \ 1824 yy_reduce_print (yyvsp, Rule); \ 1825 } while (YYID (0)) 1826 1827 /* Nonzero means print parse trace. It is left uninitialized so that 1828 multiple parsers can coexist. */ 1829 int yydebug; 1830 #else /* !YYDEBUG */ 1831 # define YYDPRINTF(Args) 1832 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 1833 # define YY_STACK_PRINT(Bottom, Top) 1834 # define YY_REDUCE_PRINT(Rule) 1835 #endif /* !YYDEBUG */ 1836 1837 1838 /* YYINITDEPTH -- initial size of the parser's stacks. */ 1839 #ifndef YYINITDEPTH 1840 # define YYINITDEPTH 200 1841 #endif 1842 1843 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 1844 if the built-in stack extension method is used). 1845 1846 Do not make this value too large; the results are undefined if 1847 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 1848 evaluated with infinite-precision integer arithmetic. */ 1849 1850 #ifndef YYMAXDEPTH 1851 # define YYMAXDEPTH 10000 1852 #endif 1853 1854 1855 #if YYERROR_VERBOSE 1856 1857 # ifndef yystrlen 1858 # if defined __GLIBC__ && defined _STRING_H 1859 # define yystrlen strlen 1860 # else 1861 /* Return the length of YYSTR. */ 1862 #if (defined __STDC__ || defined __C99__FUNC__ \ 1863 || defined __cplusplus || defined _MSC_VER) 1864 static YYSIZE_T 1865 yystrlen (const char *yystr) 1866 #else 1867 static YYSIZE_T 1868 yystrlen (yystr) 1869 const char *yystr; 1870 #endif 1871 { 1872 YYSIZE_T yylen; 1873 for (yylen = 0; yystr[yylen]; yylen++) 1874 continue; 1875 return yylen; 1876 } 1877 # endif 1878 # endif 1879 1880 # ifndef yystpcpy 1881 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 1882 # define yystpcpy stpcpy 1883 # else 1884 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 1885 YYDEST. */ 1886 #if (defined __STDC__ || defined __C99__FUNC__ \ 1887 || defined __cplusplus || defined _MSC_VER) 1888 static char * 1889 yystpcpy (char *yydest, const char *yysrc) 1890 #else 1891 static char * 1892 yystpcpy (yydest, yysrc) 1893 char *yydest; 1894 const char *yysrc; 1895 #endif 1896 { 1897 char *yyd = yydest; 1898 const char *yys = yysrc; 1899 1900 while ((*yyd++ = *yys++) != '\0') 1901 continue; 1902 1903 return yyd - 1; 1904 } 1905 # endif 1906 # endif 1907 1908 # ifndef yytnamerr 1909 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary 1910 quotes and backslashes, so that it's suitable for yyerror. The 1911 heuristic is that double-quoting is unnecessary unless the string 1912 contains an apostrophe, a comma, or backslash (other than 1913 backslash-backslash). YYSTR is taken from yytname. If YYRES is 1914 null, do not copy; instead, return the length of what the result 1915 would have been. */ 1916 static YYSIZE_T 1917 yytnamerr (char *yyres, const char *yystr) 1918 { 1919 if (*yystr == '"') 1920 { 1921 YYSIZE_T yyn = 0; 1922 char const *yyp = yystr; 1923 1924 for (;;) 1925 switch (*++yyp) 1926 { 1927 case '\'': 1928 case ',': 1929 goto do_not_strip_quotes; 1930 1931 case '\\': 1932 if (*++yyp != '\\') 1933 goto do_not_strip_quotes; 1934 /* Fall through. */ 1935 default: 1936 if (yyres) 1937 yyres[yyn] = *yyp; 1938 yyn++; 1939 break; 1940 1941 case '"': 1942 if (yyres) 1943 yyres[yyn] = '\0'; 1944 return yyn; 1945 } 1946 do_not_strip_quotes: ; 1947 } 1948 1949 if (! yyres) 1950 return yystrlen (yystr); 1951 1952 return yystpcpy (yyres, yystr) - yyres; 1953 } 1954 # endif 1955 1956 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message 1957 about the unexpected token YYTOKEN for the state stack whose top is 1958 YYSSP. 1959 1960 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is 1961 not large enough to hold the message. In that case, also set 1962 *YYMSG_ALLOC to the required number of bytes. Return 2 if the 1963 required number of bytes is too large to store. */ 1964 static int 1965 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, 1966 yytype_int16 *yyssp, int yytoken) 1967 { 1968 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); 1969 YYSIZE_T yysize = yysize0; 1970 YYSIZE_T yysize1; 1971 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 1972 /* Internationalized format string. */ 1973 const char *yyformat = 0; 1974 /* Arguments of yyformat. */ 1975 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 1976 /* Number of reported tokens (one for the "unexpected", one per 1977 "expected"). */ 1978 int yycount = 0; 1979 1980 /* There are many possibilities here to consider: 1981 - Assume YYFAIL is not used. It's too flawed to consider. See 1982 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> 1983 for details. YYERROR is fine as it does not invoke this 1984 function. 1985 - If this state is a consistent state with a default action, then 1986 the only way this function was invoked is if the default action 1987 is an error action. In that case, don't check for expected 1988 tokens because there are none. 1989 - The only way there can be no lookahead present (in yychar) is if 1990 this state is a consistent state with a default action. Thus, 1991 detecting the absence of a lookahead is sufficient to determine 1992 that there is no unexpected or expected token to report. In that 1993 case, just report a simple "syntax error". 1994 - Don't assume there isn't a lookahead just because this state is a 1995 consistent state with a default action. There might have been a 1996 previous inconsistent state, consistent state with a non-default 1997 action, or user semantic action that manipulated yychar. 1998 - Of course, the expected token list depends on states to have 1999 correct lookahead information, and it depends on the parser not 2000 to perform extra reductions after fetching a lookahead from the 2001 scanner and before detecting a syntax error. Thus, state merging 2002 (from LALR or IELR) and default reductions corrupt the expected 2003 token list. However, the list is correct for canonical LR with 2004 one exception: it will still contain any token that will not be 2005 accepted due to an error action in a later state. 2006 */ 2007 if (yytoken != YYEMPTY) 2008 { 2009 int yyn = yypact[*yyssp]; 2010 yyarg[yycount++] = yytname[yytoken]; 2011 if (!yypact_value_is_default (yyn)) 2012 { 2013 /* Start YYX at -YYN if negative to avoid negative indexes in 2014 YYCHECK. In other words, skip the first -YYN actions for 2015 this state because they are default actions. */ 2016 int yyxbegin = yyn < 0 ? -yyn : 0; 2017 /* Stay within bounds of both yycheck and yytname. */ 2018 int yychecklim = YYLAST - yyn + 1; 2019 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 2020 int yyx; 2021 2022 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 2023 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR 2024 && !yytable_value_is_error (yytable[yyx + yyn])) 2025 { 2026 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 2027 { 2028 yycount = 1; 2029 yysize = yysize0; 2030 break; 2031 } 2032 yyarg[yycount++] = yytname[yyx]; 2033 yysize1 = yysize + yytnamerr (0, yytname[yyx]); 2034 if (! (yysize <= yysize1 2035 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 2036 return 2; 2037 yysize = yysize1; 2038 } 2039 } 2040 } 2041 2042 switch (yycount) 2043 { 2044 # define YYCASE_(N, S) \ 2045 case N: \ 2046 yyformat = S; \ 2047 break 2048 YYCASE_(0, YY_("syntax error")); 2049 YYCASE_(1, YY_("syntax error, unexpected %s")); 2050 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); 2051 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); 2052 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); 2053 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); 2054 # undef YYCASE_ 2055 } 2056 2057 yysize1 = yysize + yystrlen (yyformat); 2058 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 2059 return 2; 2060 yysize = yysize1; 2061 2062 if (*yymsg_alloc < yysize) 2063 { 2064 *yymsg_alloc = 2 * yysize; 2065 if (! (yysize <= *yymsg_alloc 2066 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) 2067 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; 2068 return 1; 2069 } 2070 2071 /* Avoid sprintf, as that infringes on the user's name space. 2072 Don't have undefined behavior even if the translation 2073 produced a string with the wrong number of "%s"s. */ 2074 { 2075 char *yyp = *yymsg; 2076 int yyi = 0; 2077 while ((*yyp = *yyformat) != '\0') 2078 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) 2079 { 2080 yyp += yytnamerr (yyp, yyarg[yyi++]); 2081 yyformat += 2; 2082 } 2083 else 2084 { 2085 yyp++; 2086 yyformat++; 2087 } 2088 } 2089 return 0; 2090 } 2091 #endif /* YYERROR_VERBOSE */ 2092 2093 /*-----------------------------------------------. 2094 | Release the memory associated to this symbol. | 2095 `-----------------------------------------------*/ 2096 2097 /*ARGSUSED*/ 2098 #if (defined __STDC__ || defined __C99__FUNC__ \ 2099 || defined __cplusplus || defined _MSC_VER) 2100 static void 2101 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) 2102 #else 2103 static void 2104 yydestruct (yymsg, yytype, yyvaluep) 2105 const char *yymsg; 2106 int yytype; 2107 YYSTYPE *yyvaluep; 2108 #endif 2109 { 2110 YYUSE (yyvaluep); 2111 2112 if (!yymsg) 2113 yymsg = "Deleting"; 2114 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 2115 2116 switch (yytype) 2117 { 2118 2119 default: 2120 break; 2121 } 2122 } 2123 2124 2125 /* Prevent warnings from -Wmissing-prototypes. */ 2126 #ifdef YYPARSE_PARAM 2127 #if defined __STDC__ || defined __cplusplus 2128 int yyparse (void *YYPARSE_PARAM); 2129 #else 2130 int yyparse (); 2131 #endif 2132 #else /* ! YYPARSE_PARAM */ 2133 #if defined __STDC__ || defined __cplusplus 2134 int yyparse (void); 2135 #else 2136 int yyparse (); 2137 #endif 2138 #endif /* ! YYPARSE_PARAM */ 2139 2140 2141 /* The lookahead symbol. */ 2142 int yychar, yystate; 2143 2144 /* The semantic value of the lookahead symbol. */ 2145 YYSTYPE yylval; 2146 2147 /* Number of syntax errors so far. */ 2148 int yynerrs; 2149 2150 2151 /*----------. 2152 | yyparse. | 2153 `----------*/ 2154 2155 #ifdef YYPARSE_PARAM 2156 #if (defined __STDC__ || defined __C99__FUNC__ \ 2157 || defined __cplusplus || defined _MSC_VER) 2158 int 2159 yyparse (void *YYPARSE_PARAM) 2160 #else 2161 int 2162 yyparse (YYPARSE_PARAM) 2163 void *YYPARSE_PARAM; 2164 #endif 2165 #else /* ! YYPARSE_PARAM */ 2166 #if (defined __STDC__ || defined __C99__FUNC__ \ 2167 || defined __cplusplus || defined _MSC_VER) 2168 int 2169 yyparse (void) 2170 #else 2171 int 2172 yyparse () 2173 2174 #endif 2175 #endif 2176 { 2177 /* Number of tokens to shift before error messages enabled. */ 2178 int yyerrstatus; 2179 2180 /* The stacks and their tools: 2181 `yyss': related to states. 2182 `yyvs': related to semantic values. 2183 2184 Refer to the stacks thru separate pointers, to allow yyoverflow 2185 to reallocate them elsewhere. */ 2186 2187 /* The state stack. */ 2188 yytype_int16 yyssa[YYINITDEPTH]; 2189 yytype_int16 *yyss; 2190 yytype_int16 *yyssp; 2191 2192 /* The semantic value stack. */ 2193 YYSTYPE yyvsa[YYINITDEPTH]; 2194 YYSTYPE *yyvs; 2195 YYSTYPE *yyvsp; 2196 2197 YYSIZE_T yystacksize; 2198 2199 int yyn; 2200 int yyresult; 2201 /* Lookahead token as an internal (translated) token number. */ 2202 int yytoken; 2203 /* The variables used to return semantic value and location from the 2204 action routines. */ 2205 YYSTYPE yyval; 2206 2207 #if YYERROR_VERBOSE 2208 /* Buffer for error messages, and its allocated size. */ 2209 char yymsgbuf[128]; 2210 char *yymsg = yymsgbuf; 2211 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 2212 #endif 2213 2214 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 2215 2216 /* The number of symbols on the RHS of the reduced rule. 2217 Keep to zero when no symbol should be popped. */ 2218 int yylen = 0; 2219 2220 yytoken = 0; 2221 yyss = yyssa; 2222 yyvs = yyvsa; 2223 yystacksize = YYINITDEPTH; 2224 2225 YYDPRINTF ((stderr, "Starting parse\n")); 2226 2227 yystate = 0; 2228 yyerrstatus = 0; 2229 yynerrs = 0; 2230 yychar = YYEMPTY; /* Cause a token to be read. */ 2231 2232 /* Initialize stack pointers. 2233 Waste one element of value and location stack 2234 so that they stay on the same level as the state stack. 2235 The wasted elements are never initialized. */ 2236 yyssp = yyss; 2237 yyvsp = yyvs; 2238 2239 goto yysetstate; 2240 2241 /*------------------------------------------------------------. 2242 | yynewstate -- Push a new state, which is found in yystate. | 2243 `------------------------------------------------------------*/ 2244 yynewstate: 2245 /* In all cases, when you get here, the value and location stacks 2246 have just been pushed. So pushing a state here evens the stacks. */ 2247 yyssp++; 2248 2249 yysetstate: 2250 *yyssp = yystate; 2251 2252 if (yyss + yystacksize - 1 <= yyssp) 2253 { 2254 /* Get the current used size of the three stacks, in elements. */ 2255 YYSIZE_T yysize = yyssp - yyss + 1; 2256 2257 #ifdef yyoverflow 2258 { 2259 /* Give user a chance to reallocate the stack. Use copies of 2260 these so that the &'s don't force the real ones into 2261 memory. */ 2262 YYSTYPE *yyvs1 = yyvs; 2263 yytype_int16 *yyss1 = yyss; 2264 2265 /* Each stack pointer address is followed by the size of the 2266 data in use in that stack, in bytes. This used to be a 2267 conditional around just the two extra args, but that might 2268 be undefined if yyoverflow is a macro. */ 2269 yyoverflow (YY_("memory exhausted"), 2270 &yyss1, yysize * sizeof (*yyssp), 2271 &yyvs1, yysize * sizeof (*yyvsp), 2272 &yystacksize); 2273 2274 yyss = yyss1; 2275 yyvs = yyvs1; 2276 } 2277 #else /* no yyoverflow */ 2278 # ifndef YYSTACK_RELOCATE 2279 goto yyexhaustedlab; 2280 # else 2281 /* Extend the stack our own way. */ 2282 if (YYMAXDEPTH <= yystacksize) 2283 goto yyexhaustedlab; 2284 yystacksize *= 2; 2285 if (YYMAXDEPTH < yystacksize) 2286 yystacksize = YYMAXDEPTH; 2287 2288 { 2289 yytype_int16 *yyss1 = yyss; 2290 union yyalloc *yyptr = 2291 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 2292 if (! yyptr) 2293 goto yyexhaustedlab; 2294 YYSTACK_RELOCATE (yyss_alloc, yyss); 2295 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 2296 # undef YYSTACK_RELOCATE 2297 if (yyss1 != yyssa) 2298 YYSTACK_FREE (yyss1); 2299 } 2300 # endif 2301 #endif /* no yyoverflow */ 2302 2303 yyssp = yyss + yysize - 1; 2304 yyvsp = yyvs + yysize - 1; 2305 2306 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 2307 (unsigned long int) yystacksize)); 2308 2309 if (yyss + yystacksize - 1 <= yyssp) 2310 YYABORT; 2311 } 2312 2313 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 2314 2315 if (yystate == YYFINAL) 2316 YYACCEPT; 2317 2318 goto yybackup; 2319 2320 /*-----------. 2321 | yybackup. | 2322 `-----------*/ 2323 yybackup: 2324 2325 /* Do appropriate processing given the current state. Read a 2326 lookahead token if we need one and don't already have one. */ 2327 2328 /* First try to decide what to do without reference to lookahead token. */ 2329 yyn = yypact[yystate]; 2330 if (yypact_value_is_default (yyn)) 2331 goto yydefault; 2332 2333 /* Not known => get a lookahead token if don't already have one. */ 2334 2335 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 2336 if (yychar == YYEMPTY) 2337 { 2338 YYDPRINTF ((stderr, "Reading a token: ")); 2339 yychar = YYLEX; 2340 } 2341 2342 if (yychar <= YYEOF) 2343 { 2344 yychar = yytoken = YYEOF; 2345 YYDPRINTF ((stderr, "Now at end of input.\n")); 2346 } 2347 else 2348 { 2349 yytoken = YYTRANSLATE (yychar); 2350 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 2351 } 2352 2353 /* If the proper action on seeing token YYTOKEN is to reduce or to 2354 detect an error, take that action. */ 2355 yyn += yytoken; 2356 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 2357 goto yydefault; 2358 yyn = yytable[yyn]; 2359 if (yyn <= 0) 2360 { 2361 if (yytable_value_is_error (yyn)) 2362 goto yyerrlab; 2363 yyn = -yyn; 2364 goto yyreduce; 2365 } 2366 2367 /* Count tokens shifted since error; after three, turn off error 2368 status. */ 2369 if (yyerrstatus) 2370 yyerrstatus--; 2371 2372 /* Shift the lookahead token. */ 2373 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 2374 2375 /* Discard the shifted token. */ 2376 yychar = YYEMPTY; 2377 2378 yystate = yyn; 2379 *++yyvsp = yylval; 2380 2381 goto yynewstate; 2382 2383 2384 /*-----------------------------------------------------------. 2385 | yydefault -- do the default action for the current state. | 2386 `-----------------------------------------------------------*/ 2387 yydefault: 2388 yyn = yydefact[yystate]; 2389 if (yyn == 0) 2390 goto yyerrlab; 2391 goto yyreduce; 2392 2393 2394 /*-----------------------------. 2395 | yyreduce -- Do a reduction. | 2396 `-----------------------------*/ 2397 yyreduce: 2398 /* yyn is the number of a rule to reduce with. */ 2399 yylen = yyr2[yyn]; 2400 2401 /* If YYLEN is nonzero, implement the default value of the action: 2402 `$$ = $1'. 2403 2404 Otherwise, the following line sets YYVAL to garbage. 2405 This behavior is undocumented and Bison 2406 users should not rely upon it. Assigning to YYVAL 2407 unconditionally makes the parser a bit smaller, and it avoids a 2408 GCC warning that YYVAL may be used uninitialized. */ 2409 yyval = yyvsp[1-yylen]; 2410 2411 2412 YY_REDUCE_PRINT (yyn); 2413 switch (yyn) 2414 { 2415 case 2: 2416 2417 /* Line 1806 of yacc.c */ 2418 #line 130 "go.y" 2419 { 2420 xtop = concat(xtop, (yyvsp[(4) - (4)].list)); 2421 } 2422 break; 2423 2424 case 3: 2425 2426 /* Line 1806 of yacc.c */ 2427 #line 136 "go.y" 2428 { 2429 prevlineno = lineno; 2430 yyerror("package statement must be first"); 2431 errorexit(); 2432 } 2433 break; 2434 2435 case 4: 2436 2437 /* Line 1806 of yacc.c */ 2438 #line 142 "go.y" 2439 { 2440 mkpackage((yyvsp[(2) - (3)].sym)->name); 2441 } 2442 break; 2443 2444 case 5: 2445 2446 /* Line 1806 of yacc.c */ 2447 #line 152 "go.y" 2448 { 2449 importpkg = runtimepkg; 2450 2451 if(debug['A']) 2452 cannedimports("runtime.builtin", "package runtime\n\n$$\n\n"); 2453 else 2454 cannedimports("runtime.builtin", runtimeimport); 2455 curio.importsafe = 1; 2456 } 2457 break; 2458 2459 case 6: 2460 2461 /* Line 1806 of yacc.c */ 2462 #line 163 "go.y" 2463 { 2464 importpkg = nil; 2465 } 2466 break; 2467 2468 case 12: 2469 2470 /* Line 1806 of yacc.c */ 2471 #line 177 "go.y" 2472 { 2473 Pkg *ipkg; 2474 Sym *my; 2475 Node *pack; 2476 2477 ipkg = importpkg; 2478 my = importmyname; 2479 importpkg = nil; 2480 importmyname = S; 2481 2482 if(my == nil) 2483 my = lookup(ipkg->name); 2484 2485 pack = nod(OPACK, N, N); 2486 pack->sym = my; 2487 pack->pkg = ipkg; 2488 pack->lineno = (yyvsp[(1) - (3)].i); 2489 2490 if(my->name[0] == '.') { 2491 importdot(ipkg, pack); 2492 break; 2493 } 2494 if(strcmp(my->name, "init") == 0) { 2495 yyerror("cannot import package as init - init must be a func"); 2496 break; 2497 } 2498 if(my->name[0] == '_' && my->name[1] == '\0') 2499 break; 2500 if(my->def) { 2501 lineno = (yyvsp[(1) - (3)].i); 2502 redeclare(my, "as imported package name"); 2503 } 2504 my->def = pack; 2505 my->lastlineno = (yyvsp[(1) - (3)].i); 2506 my->block = 1; // at top level 2507 } 2508 break; 2509 2510 case 13: 2511 2512 /* Line 1806 of yacc.c */ 2513 #line 214 "go.y" 2514 { 2515 // When an invalid import path is passed to importfile, 2516 // it calls yyerror and then sets up a fake import with 2517 // no package statement. This allows us to test more 2518 // than one invalid import statement in a single file. 2519 if(nerrors == 0) 2520 fatal("phase error in import"); 2521 } 2522 break; 2523 2524 case 16: 2525 2526 /* Line 1806 of yacc.c */ 2527 #line 229 "go.y" 2528 { 2529 // import with original name 2530 (yyval.i) = parserline(); 2531 importmyname = S; 2532 importfile(&(yyvsp[(1) - (1)].val), (yyval.i)); 2533 } 2534 break; 2535 2536 case 17: 2537 2538 /* Line 1806 of yacc.c */ 2539 #line 236 "go.y" 2540 { 2541 // import with given name 2542 (yyval.i) = parserline(); 2543 importmyname = (yyvsp[(1) - (2)].sym); 2544 importfile(&(yyvsp[(2) - (2)].val), (yyval.i)); 2545 } 2546 break; 2547 2548 case 18: 2549 2550 /* Line 1806 of yacc.c */ 2551 #line 243 "go.y" 2552 { 2553 // import into my name space 2554 (yyval.i) = parserline(); 2555 importmyname = lookup("."); 2556 importfile(&(yyvsp[(2) - (2)].val), (yyval.i)); 2557 } 2558 break; 2559 2560 case 19: 2561 2562 /* Line 1806 of yacc.c */ 2563 #line 252 "go.y" 2564 { 2565 if(importpkg->name == nil) { 2566 importpkg->name = (yyvsp[(2) - (4)].sym)->name; 2567 pkglookup((yyvsp[(2) - (4)].sym)->name, nil)->npkg++; 2568 } else if(strcmp(importpkg->name, (yyvsp[(2) - (4)].sym)->name) != 0) 2569 yyerror("conflicting names %s and %s for package \"%Z\"", importpkg->name, (yyvsp[(2) - (4)].sym)->name, importpkg->path); 2570 importpkg->direct = 1; 2571 importpkg->safe = curio.importsafe; 2572 2573 if(safemode && !curio.importsafe) 2574 yyerror("cannot import unsafe package \"%Z\"", importpkg->path); 2575 } 2576 break; 2577 2578 case 21: 2579 2580 /* Line 1806 of yacc.c */ 2581 #line 267 "go.y" 2582 { 2583 if(strcmp((yyvsp[(1) - (1)].sym)->name, "safe") == 0) 2584 curio.importsafe = 1; 2585 } 2586 break; 2587 2588 case 22: 2589 2590 /* Line 1806 of yacc.c */ 2591 #line 273 "go.y" 2592 { 2593 defercheckwidth(); 2594 } 2595 break; 2596 2597 case 23: 2598 2599 /* Line 1806 of yacc.c */ 2600 #line 277 "go.y" 2601 { 2602 resumecheckwidth(); 2603 unimportfile(); 2604 } 2605 break; 2606 2607 case 24: 2608 2609 /* Line 1806 of yacc.c */ 2610 #line 286 "go.y" 2611 { 2612 yyerror("empty top-level declaration"); 2613 (yyval.list) = nil; 2614 } 2615 break; 2616 2617 case 26: 2618 2619 /* Line 1806 of yacc.c */ 2620 #line 292 "go.y" 2621 { 2622 (yyval.list) = list1((yyvsp[(1) - (1)].node)); 2623 } 2624 break; 2625 2626 case 27: 2627 2628 /* Line 1806 of yacc.c */ 2629 #line 296 "go.y" 2630 { 2631 yyerror("non-declaration statement outside function body"); 2632 (yyval.list) = nil; 2633 } 2634 break; 2635 2636 case 28: 2637 2638 /* Line 1806 of yacc.c */ 2639 #line 301 "go.y" 2640 { 2641 (yyval.list) = nil; 2642 } 2643 break; 2644 2645 case 29: 2646 2647 /* Line 1806 of yacc.c */ 2648 #line 307 "go.y" 2649 { 2650 (yyval.list) = (yyvsp[(2) - (2)].list); 2651 } 2652 break; 2653 2654 case 30: 2655 2656 /* Line 1806 of yacc.c */ 2657 #line 311 "go.y" 2658 { 2659 (yyval.list) = (yyvsp[(3) - (5)].list); 2660 } 2661 break; 2662 2663 case 31: 2664 2665 /* Line 1806 of yacc.c */ 2666 #line 315 "go.y" 2667 { 2668 (yyval.list) = nil; 2669 } 2670 break; 2671 2672 case 32: 2673 2674 /* Line 1806 of yacc.c */ 2675 #line 319 "go.y" 2676 { 2677 (yyval.list) = (yyvsp[(2) - (2)].list); 2678 iota = -100000; 2679 lastconst = nil; 2680 } 2681 break; 2682 2683 case 33: 2684 2685 /* Line 1806 of yacc.c */ 2686 #line 325 "go.y" 2687 { 2688 (yyval.list) = (yyvsp[(3) - (5)].list); 2689 iota = -100000; 2690 lastconst = nil; 2691 } 2692 break; 2693 2694 case 34: 2695 2696 /* Line 1806 of yacc.c */ 2697 #line 331 "go.y" 2698 { 2699 (yyval.list) = concat((yyvsp[(3) - (7)].list), (yyvsp[(5) - (7)].list)); 2700 iota = -100000; 2701 lastconst = nil; 2702 } 2703 break; 2704 2705 case 35: 2706 2707 /* Line 1806 of yacc.c */ 2708 #line 337 "go.y" 2709 { 2710 (yyval.list) = nil; 2711 iota = -100000; 2712 } 2713 break; 2714 2715 case 36: 2716 2717 /* Line 1806 of yacc.c */ 2718 #line 342 "go.y" 2719 { 2720 (yyval.list) = list1((yyvsp[(2) - (2)].node)); 2721 } 2722 break; 2723 2724 case 37: 2725 2726 /* Line 1806 of yacc.c */ 2727 #line 346 "go.y" 2728 { 2729 (yyval.list) = (yyvsp[(3) - (5)].list); 2730 } 2731 break; 2732 2733 case 38: 2734 2735 /* Line 1806 of yacc.c */ 2736 #line 350 "go.y" 2737 { 2738 (yyval.list) = nil; 2739 } 2740 break; 2741 2742 case 39: 2743 2744 /* Line 1806 of yacc.c */ 2745 #line 356 "go.y" 2746 { 2747 iota = 0; 2748 } 2749 break; 2750 2751 case 40: 2752 2753 /* Line 1806 of yacc.c */ 2754 #line 362 "go.y" 2755 { 2756 (yyval.list) = variter((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node), nil); 2757 } 2758 break; 2759 2760 case 41: 2761 2762 /* Line 1806 of yacc.c */ 2763 #line 366 "go.y" 2764 { 2765 (yyval.list) = variter((yyvsp[(1) - (4)].list), (yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].list)); 2766 } 2767 break; 2768 2769 case 42: 2770 2771 /* Line 1806 of yacc.c */ 2772 #line 370 "go.y" 2773 { 2774 (yyval.list) = variter((yyvsp[(1) - (3)].list), nil, (yyvsp[(3) - (3)].list)); 2775 } 2776 break; 2777 2778 case 43: 2779 2780 /* Line 1806 of yacc.c */ 2781 #line 376 "go.y" 2782 { 2783 (yyval.list) = constiter((yyvsp[(1) - (4)].list), (yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].list)); 2784 } 2785 break; 2786 2787 case 44: 2788 2789 /* Line 1806 of yacc.c */ 2790 #line 380 "go.y" 2791 { 2792 (yyval.list) = constiter((yyvsp[(1) - (3)].list), N, (yyvsp[(3) - (3)].list)); 2793 } 2794 break; 2795 2796 case 46: 2797 2798 /* Line 1806 of yacc.c */ 2799 #line 387 "go.y" 2800 { 2801 (yyval.list) = constiter((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node), nil); 2802 } 2803 break; 2804 2805 case 47: 2806 2807 /* Line 1806 of yacc.c */ 2808 #line 391 "go.y" 2809 { 2810 (yyval.list) = constiter((yyvsp[(1) - (1)].list), N, nil); 2811 } 2812 break; 2813 2814 case 48: 2815 2816 /* Line 1806 of yacc.c */ 2817 #line 397 "go.y" 2818 { 2819 // different from dclname because the name 2820 // becomes visible right here, not at the end 2821 // of the declaration. 2822 (yyval.node) = typedcl0((yyvsp[(1) - (1)].sym)); 2823 } 2824 break; 2825 2826 case 49: 2827 2828 /* Line 1806 of yacc.c */ 2829 #line 406 "go.y" 2830 { 2831 (yyval.node) = typedcl1((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node), 1); 2832 } 2833 break; 2834 2835 case 50: 2836 2837 /* Line 1806 of yacc.c */ 2838 #line 412 "go.y" 2839 { 2840 (yyval.node) = (yyvsp[(1) - (1)].node); 2841 2842 // These nodes do not carry line numbers. 2843 // Since a bare name used as an expression is an error, 2844 // introduce a wrapper node to give the correct line. 2845 switch((yyval.node)->op) { 2846 case ONAME: 2847 case ONONAME: 2848 case OTYPE: 2849 case OPACK: 2850 case OLITERAL: 2851 (yyval.node) = nod(OPAREN, (yyval.node), N); 2852 (yyval.node)->implicit = 1; 2853 break; 2854 } 2855 } 2856 break; 2857 2858 case 51: 2859 2860 /* Line 1806 of yacc.c */ 2861 #line 430 "go.y" 2862 { 2863 (yyval.node) = nod(OASOP, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 2864 (yyval.node)->etype = (yyvsp[(2) - (3)].i); // rathole to pass opcode 2865 } 2866 break; 2867 2868 case 52: 2869 2870 /* Line 1806 of yacc.c */ 2871 #line 435 "go.y" 2872 { 2873 if((yyvsp[(1) - (3)].list)->next == nil && (yyvsp[(3) - (3)].list)->next == nil) { 2874 // simple 2875 (yyval.node) = nod(OAS, (yyvsp[(1) - (3)].list)->n, (yyvsp[(3) - (3)].list)->n); 2876 break; 2877 } 2878 // multiple 2879 (yyval.node) = nod(OAS2, N, N); 2880 (yyval.node)->list = (yyvsp[(1) - (3)].list); 2881 (yyval.node)->rlist = (yyvsp[(3) - (3)].list); 2882 } 2883 break; 2884 2885 case 53: 2886 2887 /* Line 1806 of yacc.c */ 2888 #line 447 "go.y" 2889 { 2890 if((yyvsp[(3) - (3)].list)->n->op == OTYPESW) { 2891 (yyval.node) = nod(OTYPESW, N, (yyvsp[(3) - (3)].list)->n->right); 2892 if((yyvsp[(3) - (3)].list)->next != nil) 2893 yyerror("expr.(type) must be alone in list"); 2894 if((yyvsp[(1) - (3)].list)->next != nil) 2895 yyerror("argument count mismatch: %d = %d", count((yyvsp[(1) - (3)].list)), 1); 2896 else if(((yyvsp[(1) - (3)].list)->n->op != ONAME && (yyvsp[(1) - (3)].list)->n->op != OTYPE && (yyvsp[(1) - (3)].list)->n->op != ONONAME) || isblank((yyvsp[(1) - (3)].list)->n)) 2897 yyerror("invalid variable name %N in type switch", (yyvsp[(1) - (3)].list)->n); 2898 else 2899 (yyval.node)->left = dclname((yyvsp[(1) - (3)].list)->n->sym); // it's a colas, so must not re-use an oldname. 2900 break; 2901 } 2902 (yyval.node) = colas((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].list), (yyvsp[(2) - (3)].i)); 2903 } 2904 break; 2905 2906 case 54: 2907 2908 /* Line 1806 of yacc.c */ 2909 #line 463 "go.y" 2910 { 2911 (yyval.node) = nod(OASOP, (yyvsp[(1) - (2)].node), nodintconst(1)); 2912 (yyval.node)->etype = OADD; 2913 } 2914 break; 2915 2916 case 55: 2917 2918 /* Line 1806 of yacc.c */ 2919 #line 468 "go.y" 2920 { 2921 (yyval.node) = nod(OASOP, (yyvsp[(1) - (2)].node), nodintconst(1)); 2922 (yyval.node)->etype = OSUB; 2923 } 2924 break; 2925 2926 case 56: 2927 2928 /* Line 1806 of yacc.c */ 2929 #line 475 "go.y" 2930 { 2931 Node *n, *nn; 2932 2933 // will be converted to OCASE 2934 // right will point to next case 2935 // done in casebody() 2936 markdcl(); 2937 (yyval.node) = nod(OXCASE, N, N); 2938 (yyval.node)->list = (yyvsp[(2) - (3)].list); 2939 if(typesw != N && typesw->right != N && (n=typesw->right->left) != N) { 2940 // type switch - declare variable 2941 nn = newname(n->sym); 2942 declare(nn, dclcontext); 2943 (yyval.node)->nname = nn; 2944 2945 // keep track of the instances for reporting unused 2946 nn->defn = typesw->right; 2947 } 2948 } 2949 break; 2950 2951 case 57: 2952 2953 /* Line 1806 of yacc.c */ 2954 #line 495 "go.y" 2955 { 2956 Node *n; 2957 2958 // will be converted to OCASE 2959 // right will point to next case 2960 // done in casebody() 2961 markdcl(); 2962 (yyval.node) = nod(OXCASE, N, N); 2963 if((yyvsp[(2) - (5)].list)->next == nil) 2964 n = nod(OAS, (yyvsp[(2) - (5)].list)->n, (yyvsp[(4) - (5)].node)); 2965 else { 2966 n = nod(OAS2, N, N); 2967 n->list = (yyvsp[(2) - (5)].list); 2968 n->rlist = list1((yyvsp[(4) - (5)].node)); 2969 } 2970 (yyval.node)->list = list1(n); 2971 } 2972 break; 2973 2974 case 58: 2975 2976 /* Line 1806 of yacc.c */ 2977 #line 513 "go.y" 2978 { 2979 // will be converted to OCASE 2980 // right will point to next case 2981 // done in casebody() 2982 markdcl(); 2983 (yyval.node) = nod(OXCASE, N, N); 2984 (yyval.node)->list = list1(colas((yyvsp[(2) - (5)].list), list1((yyvsp[(4) - (5)].node)), (yyvsp[(3) - (5)].i))); 2985 } 2986 break; 2987 2988 case 59: 2989 2990 /* Line 1806 of yacc.c */ 2991 #line 522 "go.y" 2992 { 2993 Node *n, *nn; 2994 2995 markdcl(); 2996 (yyval.node) = nod(OXCASE, N, N); 2997 if(typesw != N && typesw->right != N && (n=typesw->right->left) != N) { 2998 // type switch - declare variable 2999 nn = newname(n->sym); 3000 declare(nn, dclcontext); 3001 (yyval.node)->nname = nn; 3002 3003 // keep track of the instances for reporting unused 3004 nn->defn = typesw->right; 3005 } 3006 } 3007 break; 3008 3009 case 60: 3010 3011 /* Line 1806 of yacc.c */ 3012 #line 540 "go.y" 3013 { 3014 markdcl(); 3015 } 3016 break; 3017 3018 case 61: 3019 3020 /* Line 1806 of yacc.c */ 3021 #line 544 "go.y" 3022 { 3023 if((yyvsp[(3) - (4)].list) == nil) 3024 (yyval.node) = nod(OEMPTY, N, N); 3025 else 3026 (yyval.node) = liststmt((yyvsp[(3) - (4)].list)); 3027 popdcl(); 3028 } 3029 break; 3030 3031 case 62: 3032 3033 /* Line 1806 of yacc.c */ 3034 #line 554 "go.y" 3035 { 3036 // If the last token read by the lexer was consumed 3037 // as part of the case, clear it (parser has cleared yychar). 3038 // If the last token read by the lexer was the lookahead 3039 // leave it alone (parser has it cached in yychar). 3040 // This is so that the stmt_list action doesn't look at 3041 // the case tokens if the stmt_list is empty. 3042 yylast = yychar; 3043 } 3044 break; 3045 3046 case 63: 3047 3048 /* Line 1806 of yacc.c */ 3049 #line 564 "go.y" 3050 { 3051 int last; 3052 3053 // This is the only place in the language where a statement 3054 // list is not allowed to drop the final semicolon, because 3055 // it's the only place where a statement list is not followed 3056 // by a closing brace. Handle the error for pedantry. 3057 3058 // Find the final token of the statement list. 3059 // yylast is lookahead; yyprev is last of stmt_list 3060 last = yyprev; 3061 3062 if(last > 0 && last != ';' && yychar != '}') 3063 yyerror("missing statement after label"); 3064 (yyval.node) = (yyvsp[(1) - (3)].node); 3065 (yyval.node)->nbody = (yyvsp[(3) - (3)].list); 3066 popdcl(); 3067 } 3068 break; 3069 3070 case 64: 3071 3072 /* Line 1806 of yacc.c */ 3073 #line 584 "go.y" 3074 { 3075 (yyval.list) = nil; 3076 } 3077 break; 3078 3079 case 65: 3080 3081 /* Line 1806 of yacc.c */ 3082 #line 588 "go.y" 3083 { 3084 (yyval.list) = list((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node)); 3085 } 3086 break; 3087 3088 case 66: 3089 3090 /* Line 1806 of yacc.c */ 3091 #line 594 "go.y" 3092 { 3093 markdcl(); 3094 } 3095 break; 3096 3097 case 67: 3098 3099 /* Line 1806 of yacc.c */ 3100 #line 598 "go.y" 3101 { 3102 (yyval.list) = (yyvsp[(3) - (4)].list); 3103 popdcl(); 3104 } 3105 break; 3106 3107 case 68: 3108 3109 /* Line 1806 of yacc.c */ 3110 #line 605 "go.y" 3111 { 3112 (yyval.node) = nod(ORANGE, N, (yyvsp[(4) - (4)].node)); 3113 (yyval.node)->list = (yyvsp[(1) - (4)].list); 3114 (yyval.node)->etype = 0; // := flag 3115 } 3116 break; 3117 3118 case 69: 3119 3120 /* Line 1806 of yacc.c */ 3121 #line 611 "go.y" 3122 { 3123 (yyval.node) = nod(ORANGE, N, (yyvsp[(4) - (4)].node)); 3124 (yyval.node)->list = (yyvsp[(1) - (4)].list); 3125 (yyval.node)->colas = 1; 3126 colasdefn((yyvsp[(1) - (4)].list), (yyval.node)); 3127 } 3128 break; 3129 3130 case 70: 3131 3132 /* Line 1806 of yacc.c */ 3133 #line 620 "go.y" 3134 { 3135 // init ; test ; incr 3136 if((yyvsp[(5) - (5)].node) != N && (yyvsp[(5) - (5)].node)->colas != 0) 3137 yyerror("cannot declare in the for-increment"); 3138 (yyval.node) = nod(OFOR, N, N); 3139 if((yyvsp[(1) - (5)].node) != N) 3140 (yyval.node)->ninit = list1((yyvsp[(1) - (5)].node)); 3141 (yyval.node)->ntest = (yyvsp[(3) - (5)].node); 3142 (yyval.node)->nincr = (yyvsp[(5) - (5)].node); 3143 } 3144 break; 3145 3146 case 71: 3147 3148 /* Line 1806 of yacc.c */ 3149 #line 631 "go.y" 3150 { 3151 // normal test 3152 (yyval.node) = nod(OFOR, N, N); 3153 (yyval.node)->ntest = (yyvsp[(1) - (1)].node); 3154 } 3155 break; 3156 3157 case 73: 3158 3159 /* Line 1806 of yacc.c */ 3160 #line 640 "go.y" 3161 { 3162 (yyval.node) = (yyvsp[(1) - (2)].node); 3163 (yyval.node)->nbody = concat((yyval.node)->nbody, (yyvsp[(2) - (2)].list)); 3164 } 3165 break; 3166 3167 case 74: 3168 3169 /* Line 1806 of yacc.c */ 3170 #line 647 "go.y" 3171 { 3172 markdcl(); 3173 } 3174 break; 3175 3176 case 75: 3177 3178 /* Line 1806 of yacc.c */ 3179 #line 651 "go.y" 3180 { 3181 (yyval.node) = (yyvsp[(3) - (3)].node); 3182 popdcl(); 3183 } 3184 break; 3185 3186 case 76: 3187 3188 /* Line 1806 of yacc.c */ 3189 #line 658 "go.y" 3190 { 3191 // test 3192 (yyval.node) = nod(OIF, N, N); 3193 (yyval.node)->ntest = (yyvsp[(1) - (1)].node); 3194 } 3195 break; 3196 3197 case 77: 3198 3199 /* Line 1806 of yacc.c */ 3200 #line 664 "go.y" 3201 { 3202 // init ; test 3203 (yyval.node) = nod(OIF, N, N); 3204 if((yyvsp[(1) - (3)].node) != N) 3205 (yyval.node)->ninit = list1((yyvsp[(1) - (3)].node)); 3206 (yyval.node)->ntest = (yyvsp[(3) - (3)].node); 3207 } 3208 break; 3209 3210 case 78: 3211 3212 /* Line 1806 of yacc.c */ 3213 #line 675 "go.y" 3214 { 3215 markdcl(); 3216 } 3217 break; 3218 3219 case 79: 3220 3221 /* Line 1806 of yacc.c */ 3222 #line 679 "go.y" 3223 { 3224 if((yyvsp[(3) - (3)].node)->ntest == N) 3225 yyerror("missing condition in if statement"); 3226 } 3227 break; 3228 3229 case 80: 3230 3231 /* Line 1806 of yacc.c */ 3232 #line 684 "go.y" 3233 { 3234 (yyvsp[(3) - (5)].node)->nbody = (yyvsp[(5) - (5)].list); 3235 } 3236 break; 3237 3238 case 81: 3239 3240 /* Line 1806 of yacc.c */ 3241 #line 688 "go.y" 3242 { 3243 Node *n; 3244 NodeList *nn; 3245 3246 (yyval.node) = (yyvsp[(3) - (8)].node); 3247 n = (yyvsp[(3) - (8)].node); 3248 popdcl(); 3249 for(nn = concat((yyvsp[(7) - (8)].list), (yyvsp[(8) - (8)].list)); nn; nn = nn->next) { 3250 if(nn->n->op == OIF) 3251 popdcl(); 3252 n->nelse = list1(nn->n); 3253 n = nn->n; 3254 } 3255 } 3256 break; 3257 3258 case 82: 3259 3260 /* Line 1806 of yacc.c */ 3261 #line 705 "go.y" 3262 { 3263 markdcl(); 3264 } 3265 break; 3266 3267 case 83: 3268 3269 /* Line 1806 of yacc.c */ 3270 #line 709 "go.y" 3271 { 3272 if((yyvsp[(4) - (5)].node)->ntest == N) 3273 yyerror("missing condition in if statement"); 3274 (yyvsp[(4) - (5)].node)->nbody = (yyvsp[(5) - (5)].list); 3275 (yyval.list) = list1((yyvsp[(4) - (5)].node)); 3276 } 3277 break; 3278 3279 case 84: 3280 3281 /* Line 1806 of yacc.c */ 3282 #line 717 "go.y" 3283 { 3284 (yyval.list) = nil; 3285 } 3286 break; 3287 3288 case 85: 3289 3290 /* Line 1806 of yacc.c */ 3291 #line 721 "go.y" 3292 { 3293 (yyval.list) = concat((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].list)); 3294 } 3295 break; 3296 3297 case 86: 3298 3299 /* Line 1806 of yacc.c */ 3300 #line 726 "go.y" 3301 { 3302 (yyval.list) = nil; 3303 } 3304 break; 3305 3306 case 87: 3307 3308 /* Line 1806 of yacc.c */ 3309 #line 730 "go.y" 3310 { 3311 NodeList *node; 3312 3313 node = mal(sizeof *node); 3314 node->n = (yyvsp[(2) - (2)].node); 3315 node->end = node; 3316 (yyval.list) = node; 3317 } 3318 break; 3319 3320 case 88: 3321 3322 /* Line 1806 of yacc.c */ 3323 #line 741 "go.y" 3324 { 3325 markdcl(); 3326 } 3327 break; 3328 3329 case 89: 3330 3331 /* Line 1806 of yacc.c */ 3332 #line 745 "go.y" 3333 { 3334 Node *n; 3335 n = (yyvsp[(3) - (3)].node)->ntest; 3336 if(n != N && n->op != OTYPESW) 3337 n = N; 3338 typesw = nod(OXXX, typesw, n); 3339 } 3340 break; 3341 3342 case 90: 3343 3344 /* Line 1806 of yacc.c */ 3345 #line 753 "go.y" 3346 { 3347 (yyval.node) = (yyvsp[(3) - (7)].node); 3348 (yyval.node)->op = OSWITCH; 3349 (yyval.node)->list = (yyvsp[(6) - (7)].list); 3350 typesw = typesw->left; 3351 popdcl(); 3352 } 3353 break; 3354 3355 case 91: 3356 3357 /* Line 1806 of yacc.c */ 3358 #line 763 "go.y" 3359 { 3360 typesw = nod(OXXX, typesw, N); 3361 } 3362 break; 3363 3364 case 92: 3365 3366 /* Line 1806 of yacc.c */ 3367 #line 767 "go.y" 3368 { 3369 (yyval.node) = nod(OSELECT, N, N); 3370 (yyval.node)->lineno = typesw->lineno; 3371 (yyval.node)->list = (yyvsp[(4) - (5)].list); 3372 typesw = typesw->left; 3373 } 3374 break; 3375 3376 case 94: 3377 3378 /* Line 1806 of yacc.c */ 3379 #line 780 "go.y" 3380 { 3381 (yyval.node) = nod(OOROR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 3382 } 3383 break; 3384 3385 case 95: 3386 3387 /* Line 1806 of yacc.c */ 3388 #line 784 "go.y" 3389 { 3390 (yyval.node) = nod(OANDAND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 3391 } 3392 break; 3393 3394 case 96: 3395 3396 /* Line 1806 of yacc.c */ 3397 #line 788 "go.y" 3398 { 3399 (yyval.node) = nod(OEQ, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 3400 } 3401 break; 3402 3403 case 97: 3404 3405 /* Line 1806 of yacc.c */ 3406 #line 792 "go.y" 3407 { 3408 (yyval.node) = nod(ONE, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 3409 } 3410 break; 3411 3412 case 98: 3413 3414 /* Line 1806 of yacc.c */ 3415 #line 796 "go.y" 3416 { 3417 (yyval.node) = nod(OLT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 3418 } 3419 break; 3420 3421 case 99: 3422 3423 /* Line 1806 of yacc.c */ 3424 #line 800 "go.y" 3425 { 3426 (yyval.node) = nod(OLE, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 3427 } 3428 break; 3429 3430 case 100: 3431 3432 /* Line 1806 of yacc.c */ 3433 #line 804 "go.y" 3434 { 3435 (yyval.node) = nod(OGE, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 3436 } 3437 break; 3438 3439 case 101: 3440 3441 /* Line 1806 of yacc.c */ 3442 #line 808 "go.y" 3443 { 3444 (yyval.node) = nod(OGT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 3445 } 3446 break; 3447 3448 case 102: 3449 3450 /* Line 1806 of yacc.c */ 3451 #line 812 "go.y" 3452 { 3453 (yyval.node) = nod(OADD, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 3454 } 3455 break; 3456 3457 case 103: 3458 3459 /* Line 1806 of yacc.c */ 3460 #line 816 "go.y" 3461 { 3462 (yyval.node) = nod(OSUB, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 3463 } 3464 break; 3465 3466 case 104: 3467 3468 /* Line 1806 of yacc.c */ 3469 #line 820 "go.y" 3470 { 3471 (yyval.node) = nod(OOR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 3472 } 3473 break; 3474 3475 case 105: 3476 3477 /* Line 1806 of yacc.c */ 3478 #line 824 "go.y" 3479 { 3480 (yyval.node) = nod(OXOR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 3481 } 3482 break; 3483 3484 case 106: 3485 3486 /* Line 1806 of yacc.c */ 3487 #line 828 "go.y" 3488 { 3489 (yyval.node) = nod(OMUL, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 3490 } 3491 break; 3492 3493 case 107: 3494 3495 /* Line 1806 of yacc.c */ 3496 #line 832 "go.y" 3497 { 3498 (yyval.node) = nod(ODIV, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 3499 } 3500 break; 3501 3502 case 108: 3503 3504 /* Line 1806 of yacc.c */ 3505 #line 836 "go.y" 3506 { 3507 (yyval.node) = nod(OMOD, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 3508 } 3509 break; 3510 3511 case 109: 3512 3513 /* Line 1806 of yacc.c */ 3514 #line 840 "go.y" 3515 { 3516 (yyval.node) = nod(OAND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 3517 } 3518 break; 3519 3520 case 110: 3521 3522 /* Line 1806 of yacc.c */ 3523 #line 844 "go.y" 3524 { 3525 (yyval.node) = nod(OANDNOT, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 3526 } 3527 break; 3528 3529 case 111: 3530 3531 /* Line 1806 of yacc.c */ 3532 #line 848 "go.y" 3533 { 3534 (yyval.node) = nod(OLSH, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 3535 } 3536 break; 3537 3538 case 112: 3539 3540 /* Line 1806 of yacc.c */ 3541 #line 852 "go.y" 3542 { 3543 (yyval.node) = nod(ORSH, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 3544 } 3545 break; 3546 3547 case 113: 3548 3549 /* Line 1806 of yacc.c */ 3550 #line 857 "go.y" 3551 { 3552 (yyval.node) = nod(OSEND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 3553 } 3554 break; 3555 3556 case 115: 3557 3558 /* Line 1806 of yacc.c */ 3559 #line 864 "go.y" 3560 { 3561 (yyval.node) = nod(OIND, (yyvsp[(2) - (2)].node), N); 3562 } 3563 break; 3564 3565 case 116: 3566 3567 /* Line 1806 of yacc.c */ 3568 #line 868 "go.y" 3569 { 3570 if((yyvsp[(2) - (2)].node)->op == OCOMPLIT) { 3571 // Special case for &T{...}: turn into (*T){...}. 3572 (yyval.node) = (yyvsp[(2) - (2)].node); 3573 (yyval.node)->right = nod(OIND, (yyval.node)->right, N); 3574 (yyval.node)->right->implicit = 1; 3575 } else { 3576 (yyval.node) = nod(OADDR, (yyvsp[(2) - (2)].node), N); 3577 } 3578 } 3579 break; 3580 3581 case 117: 3582 3583 /* Line 1806 of yacc.c */ 3584 #line 879 "go.y" 3585 { 3586 (yyval.node) = nod(OPLUS, (yyvsp[(2) - (2)].node), N); 3587 } 3588 break; 3589 3590 case 118: 3591 3592 /* Line 1806 of yacc.c */ 3593 #line 883 "go.y" 3594 { 3595 (yyval.node) = nod(OMINUS, (yyvsp[(2) - (2)].node), N); 3596 } 3597 break; 3598 3599 case 119: 3600 3601 /* Line 1806 of yacc.c */ 3602 #line 887 "go.y" 3603 { 3604 (yyval.node) = nod(ONOT, (yyvsp[(2) - (2)].node), N); 3605 } 3606 break; 3607 3608 case 120: 3609 3610 /* Line 1806 of yacc.c */ 3611 #line 891 "go.y" 3612 { 3613 yyerror("the bitwise complement operator is ^"); 3614 (yyval.node) = nod(OCOM, (yyvsp[(2) - (2)].node), N); 3615 } 3616 break; 3617 3618 case 121: 3619 3620 /* Line 1806 of yacc.c */ 3621 #line 896 "go.y" 3622 { 3623 (yyval.node) = nod(OCOM, (yyvsp[(2) - (2)].node), N); 3624 } 3625 break; 3626 3627 case 122: 3628 3629 /* Line 1806 of yacc.c */ 3630 #line 900 "go.y" 3631 { 3632 (yyval.node) = nod(ORECV, (yyvsp[(2) - (2)].node), N); 3633 } 3634 break; 3635 3636 case 123: 3637 3638 /* Line 1806 of yacc.c */ 3639 #line 910 "go.y" 3640 { 3641 (yyval.node) = nod(OCALL, (yyvsp[(1) - (3)].node), N); 3642 } 3643 break; 3644 3645 case 124: 3646 3647 /* Line 1806 of yacc.c */ 3648 #line 914 "go.y" 3649 { 3650 (yyval.node) = nod(OCALL, (yyvsp[(1) - (5)].node), N); 3651 (yyval.node)->list = (yyvsp[(3) - (5)].list); 3652 } 3653 break; 3654 3655 case 125: 3656 3657 /* Line 1806 of yacc.c */ 3658 #line 919 "go.y" 3659 { 3660 (yyval.node) = nod(OCALL, (yyvsp[(1) - (6)].node), N); 3661 (yyval.node)->list = (yyvsp[(3) - (6)].list); 3662 (yyval.node)->isddd = 1; 3663 } 3664 break; 3665 3666 case 126: 3667 3668 /* Line 1806 of yacc.c */ 3669 #line 927 "go.y" 3670 { 3671 (yyval.node) = nodlit((yyvsp[(1) - (1)].val)); 3672 } 3673 break; 3674 3675 case 128: 3676 3677 /* Line 1806 of yacc.c */ 3678 #line 932 "go.y" 3679 { 3680 if((yyvsp[(1) - (3)].node)->op == OPACK) { 3681 Sym *s; 3682 s = restrictlookup((yyvsp[(3) - (3)].sym)->name, (yyvsp[(1) - (3)].node)->pkg); 3683 (yyvsp[(1) - (3)].node)->used = 1; 3684 (yyval.node) = oldname(s); 3685 break; 3686 } 3687 (yyval.node) = nod(OXDOT, (yyvsp[(1) - (3)].node), newname((yyvsp[(3) - (3)].sym))); 3688 } 3689 break; 3690 3691 case 129: 3692 3693 /* Line 1806 of yacc.c */ 3694 #line 943 "go.y" 3695 { 3696 (yyval.node) = nod(ODOTTYPE, (yyvsp[(1) - (5)].node), (yyvsp[(4) - (5)].node)); 3697 } 3698 break; 3699 3700 case 130: 3701 3702 /* Line 1806 of yacc.c */ 3703 #line 947 "go.y" 3704 { 3705 (yyval.node) = nod(OTYPESW, N, (yyvsp[(1) - (5)].node)); 3706 } 3707 break; 3708 3709 case 131: 3710 3711 /* Line 1806 of yacc.c */ 3712 #line 951 "go.y" 3713 { 3714 (yyval.node) = nod(OINDEX, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); 3715 } 3716 break; 3717 3718 case 132: 3719 3720 /* Line 1806 of yacc.c */ 3721 #line 955 "go.y" 3722 { 3723 (yyval.node) = nod(OSLICE, (yyvsp[(1) - (6)].node), nod(OKEY, (yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].node))); 3724 } 3725 break; 3726 3727 case 133: 3728 3729 /* Line 1806 of yacc.c */ 3730 #line 959 "go.y" 3731 { 3732 // Make sure we don't accidentally release this experimental feature. 3733 // http://golang.org/s/go12slice. 3734 if(isrelease < 0) 3735 isrelease = strstr(getgoversion(), "release") != nil; 3736 if(isrelease) 3737 yyerror("3-index slice not available in release"); 3738 3739 if((yyvsp[(5) - (8)].node) == N) 3740 yyerror("middle index required in 3-index slice"); 3741 if((yyvsp[(7) - (8)].node) == N) 3742 yyerror("final index required in 3-index slice"); 3743 (yyval.node) = nod(OSLICE3, (yyvsp[(1) - (8)].node), nod(OKEY, (yyvsp[(3) - (8)].node), nod(OKEY, (yyvsp[(5) - (8)].node), (yyvsp[(7) - (8)].node)))); 3744 } 3745 break; 3746 3747 case 135: 3748 3749 /* Line 1806 of yacc.c */ 3750 #line 975 "go.y" 3751 { 3752 // conversion 3753 (yyval.node) = nod(OCALL, (yyvsp[(1) - (5)].node), N); 3754 (yyval.node)->list = list1((yyvsp[(3) - (5)].node)); 3755 } 3756 break; 3757 3758 case 136: 3759 3760 /* Line 1806 of yacc.c */ 3761 #line 981 "go.y" 3762 { 3763 (yyval.node) = (yyvsp[(3) - (5)].node); 3764 (yyval.node)->right = (yyvsp[(1) - (5)].node); 3765 (yyval.node)->list = (yyvsp[(4) - (5)].list); 3766 fixlbrace((yyvsp[(2) - (5)].i)); 3767 } 3768 break; 3769 3770 case 137: 3771 3772 /* Line 1806 of yacc.c */ 3773 #line 988 "go.y" 3774 { 3775 (yyval.node) = (yyvsp[(3) - (5)].node); 3776 (yyval.node)->right = (yyvsp[(1) - (5)].node); 3777 (yyval.node)->list = (yyvsp[(4) - (5)].list); 3778 } 3779 break; 3780 3781 case 138: 3782 3783 /* Line 1806 of yacc.c */ 3784 #line 994 "go.y" 3785 { 3786 yyerror("cannot parenthesize type in composite literal"); 3787 (yyval.node) = (yyvsp[(5) - (7)].node); 3788 (yyval.node)->right = (yyvsp[(2) - (7)].node); 3789 (yyval.node)->list = (yyvsp[(6) - (7)].list); 3790 } 3791 break; 3792 3793 case 140: 3794 3795 /* Line 1806 of yacc.c */ 3796 #line 1003 "go.y" 3797 { 3798 // composite expression. 3799 // make node early so we get the right line number. 3800 (yyval.node) = nod(OCOMPLIT, N, N); 3801 } 3802 break; 3803 3804 case 141: 3805 3806 /* Line 1806 of yacc.c */ 3807 #line 1011 "go.y" 3808 { 3809 (yyval.node) = nod(OKEY, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 3810 } 3811 break; 3812 3813 case 142: 3814 3815 /* Line 1806 of yacc.c */ 3816 #line 1017 "go.y" 3817 { 3818 // These nodes do not carry line numbers. 3819 // Since a composite literal commonly spans several lines, 3820 // the line number on errors may be misleading. 3821 // Introduce a wrapper node to give the correct line. 3822 (yyval.node) = (yyvsp[(1) - (1)].node); 3823 switch((yyval.node)->op) { 3824 case ONAME: 3825 case ONONAME: 3826 case OTYPE: 3827 case OPACK: 3828 case OLITERAL: 3829 (yyval.node) = nod(OPAREN, (yyval.node), N); 3830 (yyval.node)->implicit = 1; 3831 } 3832 } 3833 break; 3834 3835 case 143: 3836 3837 /* Line 1806 of yacc.c */ 3838 #line 1034 "go.y" 3839 { 3840 (yyval.node) = (yyvsp[(2) - (4)].node); 3841 (yyval.node)->list = (yyvsp[(3) - (4)].list); 3842 } 3843 break; 3844 3845 case 145: 3846 3847 /* Line 1806 of yacc.c */ 3848 #line 1042 "go.y" 3849 { 3850 (yyval.node) = (yyvsp[(2) - (4)].node); 3851 (yyval.node)->list = (yyvsp[(3) - (4)].list); 3852 } 3853 break; 3854 3855 case 147: 3856 3857 /* Line 1806 of yacc.c */ 3858 #line 1050 "go.y" 3859 { 3860 (yyval.node) = (yyvsp[(2) - (3)].node); 3861 3862 // Need to know on lhs of := whether there are ( ). 3863 // Don't bother with the OPAREN in other cases: 3864 // it's just a waste of memory and time. 3865 switch((yyval.node)->op) { 3866 case ONAME: 3867 case ONONAME: 3868 case OPACK: 3869 case OTYPE: 3870 case OLITERAL: 3871 case OTYPESW: 3872 (yyval.node) = nod(OPAREN, (yyval.node), N); 3873 } 3874 } 3875 break; 3876 3877 case 151: 3878 3879 /* Line 1806 of yacc.c */ 3880 #line 1076 "go.y" 3881 { 3882 (yyval.i) = LBODY; 3883 } 3884 break; 3885 3886 case 152: 3887 3888 /* Line 1806 of yacc.c */ 3889 #line 1080 "go.y" 3890 { 3891 (yyval.i) = '{'; 3892 } 3893 break; 3894 3895 case 153: 3896 3897 /* Line 1806 of yacc.c */ 3898 #line 1091 "go.y" 3899 { 3900 if((yyvsp[(1) - (1)].sym) == S) 3901 (yyval.node) = N; 3902 else 3903 (yyval.node) = newname((yyvsp[(1) - (1)].sym)); 3904 } 3905 break; 3906 3907 case 154: 3908 3909 /* Line 1806 of yacc.c */ 3910 #line 1100 "go.y" 3911 { 3912 (yyval.node) = dclname((yyvsp[(1) - (1)].sym)); 3913 } 3914 break; 3915 3916 case 155: 3917 3918 /* Line 1806 of yacc.c */ 3919 #line 1105 "go.y" 3920 { 3921 (yyval.node) = N; 3922 } 3923 break; 3924 3925 case 157: 3926 3927 /* Line 1806 of yacc.c */ 3928 #line 1112 "go.y" 3929 { 3930 (yyval.sym) = (yyvsp[(1) - (1)].sym); 3931 // during imports, unqualified non-exported identifiers are from builtinpkg 3932 if(importpkg != nil && !exportname((yyvsp[(1) - (1)].sym)->name)) 3933 (yyval.sym) = pkglookup((yyvsp[(1) - (1)].sym)->name, builtinpkg); 3934 } 3935 break; 3936 3937 case 159: 3938 3939 /* Line 1806 of yacc.c */ 3940 #line 1120 "go.y" 3941 { 3942 (yyval.sym) = S; 3943 } 3944 break; 3945 3946 case 160: 3947 3948 /* Line 1806 of yacc.c */ 3949 #line 1126 "go.y" 3950 { 3951 Pkg *p; 3952 3953 if((yyvsp[(2) - (4)].val).u.sval->len == 0) 3954 p = importpkg; 3955 else { 3956 if(isbadimport((yyvsp[(2) - (4)].val).u.sval)) 3957 errorexit(); 3958 p = mkpkg((yyvsp[(2) - (4)].val).u.sval); 3959 } 3960 (yyval.sym) = pkglookup((yyvsp[(4) - (4)].sym)->name, p); 3961 } 3962 break; 3963 3964 case 161: 3965 3966 /* Line 1806 of yacc.c */ 3967 #line 1141 "go.y" 3968 { 3969 (yyval.node) = oldname((yyvsp[(1) - (1)].sym)); 3970 if((yyval.node)->pack != N) 3971 (yyval.node)->pack->used = 1; 3972 } 3973 break; 3974 3975 case 163: 3976 3977 /* Line 1806 of yacc.c */ 3978 #line 1161 "go.y" 3979 { 3980 yyerror("final argument in variadic function missing type"); 3981 (yyval.node) = nod(ODDD, typenod(typ(TINTER)), N); 3982 } 3983 break; 3984 3985 case 164: 3986 3987 /* Line 1806 of yacc.c */ 3988 #line 1166 "go.y" 3989 { 3990 (yyval.node) = nod(ODDD, (yyvsp[(2) - (2)].node), N); 3991 } 3992 break; 3993 3994 case 170: 3995 3996 /* Line 1806 of yacc.c */ 3997 #line 1177 "go.y" 3998 { 3999 (yyval.node) = nod(OTPAREN, (yyvsp[(2) - (3)].node), N); 4000 } 4001 break; 4002 4003 case 174: 4004 4005 /* Line 1806 of yacc.c */ 4006 #line 1186 "go.y" 4007 { 4008 (yyval.node) = nod(OIND, (yyvsp[(2) - (2)].node), N); 4009 } 4010 break; 4011 4012 case 179: 4013 4014 /* Line 1806 of yacc.c */ 4015 #line 1196 "go.y" 4016 { 4017 (yyval.node) = nod(OTPAREN, (yyvsp[(2) - (3)].node), N); 4018 } 4019 break; 4020 4021 case 189: 4022 4023 /* Line 1806 of yacc.c */ 4024 #line 1217 "go.y" 4025 { 4026 if((yyvsp[(1) - (3)].node)->op == OPACK) { 4027 Sym *s; 4028 s = restrictlookup((yyvsp[(3) - (3)].sym)->name, (yyvsp[(1) - (3)].node)->pkg); 4029 (yyvsp[(1) - (3)].node)->used = 1; 4030 (yyval.node) = oldname(s); 4031 break; 4032 } 4033 (yyval.node) = nod(OXDOT, (yyvsp[(1) - (3)].node), newname((yyvsp[(3) - (3)].sym))); 4034 } 4035 break; 4036 4037 case 190: 4038 4039 /* Line 1806 of yacc.c */ 4040 #line 1230 "go.y" 4041 { 4042 (yyval.node) = nod(OTARRAY, (yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].node)); 4043 } 4044 break; 4045 4046 case 191: 4047 4048 /* Line 1806 of yacc.c */ 4049 #line 1234 "go.y" 4050 { 4051 // array literal of nelem 4052 (yyval.node) = nod(OTARRAY, nod(ODDD, N, N), (yyvsp[(4) - (4)].node)); 4053 } 4054 break; 4055 4056 case 192: 4057 4058 /* Line 1806 of yacc.c */ 4059 #line 1239 "go.y" 4060 { 4061 (yyval.node) = nod(OTCHAN, (yyvsp[(2) - (2)].node), N); 4062 (yyval.node)->etype = Cboth; 4063 } 4064 break; 4065 4066 case 193: 4067 4068 /* Line 1806 of yacc.c */ 4069 #line 1244 "go.y" 4070 { 4071 (yyval.node) = nod(OTCHAN, (yyvsp[(3) - (3)].node), N); 4072 (yyval.node)->etype = Csend; 4073 } 4074 break; 4075 4076 case 194: 4077 4078 /* Line 1806 of yacc.c */ 4079 #line 1249 "go.y" 4080 { 4081 (yyval.node) = nod(OTMAP, (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node)); 4082 } 4083 break; 4084 4085 case 197: 4086 4087 /* Line 1806 of yacc.c */ 4088 #line 1257 "go.y" 4089 { 4090 (yyval.node) = nod(OIND, (yyvsp[(2) - (2)].node), N); 4091 } 4092 break; 4093 4094 case 198: 4095 4096 /* Line 1806 of yacc.c */ 4097 #line 1263 "go.y" 4098 { 4099 (yyval.node) = nod(OTCHAN, (yyvsp[(3) - (3)].node), N); 4100 (yyval.node)->etype = Crecv; 4101 } 4102 break; 4103 4104 case 199: 4105 4106 /* Line 1806 of yacc.c */ 4107 #line 1270 "go.y" 4108 { 4109 (yyval.node) = nod(OTSTRUCT, N, N); 4110 (yyval.node)->list = (yyvsp[(3) - (5)].list); 4111 fixlbrace((yyvsp[(2) - (5)].i)); 4112 } 4113 break; 4114 4115 case 200: 4116 4117 /* Line 1806 of yacc.c */ 4118 #line 1276 "go.y" 4119 { 4120 (yyval.node) = nod(OTSTRUCT, N, N); 4121 fixlbrace((yyvsp[(2) - (3)].i)); 4122 } 4123 break; 4124 4125 case 201: 4126 4127 /* Line 1806 of yacc.c */ 4128 #line 1283 "go.y" 4129 { 4130 (yyval.node) = nod(OTINTER, N, N); 4131 (yyval.node)->list = (yyvsp[(3) - (5)].list); 4132 fixlbrace((yyvsp[(2) - (5)].i)); 4133 } 4134 break; 4135 4136 case 202: 4137 4138 /* Line 1806 of yacc.c */ 4139 #line 1289 "go.y" 4140 { 4141 (yyval.node) = nod(OTINTER, N, N); 4142 fixlbrace((yyvsp[(2) - (3)].i)); 4143 } 4144 break; 4145 4146 case 203: 4147 4148 /* Line 1806 of yacc.c */ 4149 #line 1300 "go.y" 4150 { 4151 (yyval.node) = (yyvsp[(2) - (3)].node); 4152 if((yyval.node) == N) 4153 break; 4154 if(noescape && (yyvsp[(3) - (3)].list) != nil) 4155 yyerror("can only use //go:noescape with external func implementations"); 4156 (yyval.node)->nbody = (yyvsp[(3) - (3)].list); 4157 (yyval.node)->endlineno = lineno; 4158 (yyval.node)->noescape = noescape; 4159 funcbody((yyval.node)); 4160 } 4161 break; 4162 4163 case 204: 4164 4165 /* Line 1806 of yacc.c */ 4166 #line 1314 "go.y" 4167 { 4168 Node *t; 4169 4170 (yyval.node) = N; 4171 (yyvsp[(3) - (5)].list) = checkarglist((yyvsp[(3) - (5)].list), 1); 4172 4173 if(strcmp((yyvsp[(1) - (5)].sym)->name, "init") == 0) { 4174 (yyvsp[(1) - (5)].sym) = renameinit(); 4175 if((yyvsp[(3) - (5)].list) != nil || (yyvsp[(5) - (5)].list) != nil) 4176 yyerror("func init must have no arguments and no return values"); 4177 } 4178 if(strcmp(localpkg->name, "main") == 0 && strcmp((yyvsp[(1) - (5)].sym)->name, "main") == 0) { 4179 if((yyvsp[(3) - (5)].list) != nil || (yyvsp[(5) - (5)].list) != nil) 4180 yyerror("func main must have no arguments and no return values"); 4181 } 4182 4183 t = nod(OTFUNC, N, N); 4184 t->list = (yyvsp[(3) - (5)].list); 4185 t->rlist = (yyvsp[(5) - (5)].list); 4186 4187 (yyval.node) = nod(ODCLFUNC, N, N); 4188 (yyval.node)->nname = newname((yyvsp[(1) - (5)].sym)); 4189 (yyval.node)->nname->defn = (yyval.node); 4190 (yyval.node)->nname->ntype = t; // TODO: check if nname already has an ntype 4191 declare((yyval.node)->nname, PFUNC); 4192 4193 funchdr((yyval.node)); 4194 } 4195 break; 4196 4197 case 205: 4198 4199 /* Line 1806 of yacc.c */ 4200 #line 1343 "go.y" 4201 { 4202 Node *rcvr, *t; 4203 4204 (yyval.node) = N; 4205 (yyvsp[(2) - (8)].list) = checkarglist((yyvsp[(2) - (8)].list), 0); 4206 (yyvsp[(6) - (8)].list) = checkarglist((yyvsp[(6) - (8)].list), 1); 4207 4208 if((yyvsp[(2) - (8)].list) == nil) { 4209 yyerror("method has no receiver"); 4210 break; 4211 } 4212 if((yyvsp[(2) - (8)].list)->next != nil) { 4213 yyerror("method has multiple receivers"); 4214 break; 4215 } 4216 rcvr = (yyvsp[(2) - (8)].list)->n; 4217 if(rcvr->op != ODCLFIELD) { 4218 yyerror("bad receiver in method"); 4219 break; 4220 } 4221 if(rcvr->right->op == OTPAREN || (rcvr->right->op == OIND && rcvr->right->left->op == OTPAREN)) 4222 yyerror("cannot parenthesize receiver type"); 4223 4224 t = nod(OTFUNC, rcvr, N); 4225 t->list = (yyvsp[(6) - (8)].list); 4226 t->rlist = (yyvsp[(8) - (8)].list); 4227 4228 (yyval.node) = nod(ODCLFUNC, N, N); 4229 (yyval.node)->shortname = newname((yyvsp[(4) - (8)].sym)); 4230 (yyval.node)->nname = methodname1((yyval.node)->shortname, rcvr->right); 4231 (yyval.node)->nname->defn = (yyval.node); 4232 (yyval.node)->nname->ntype = t; 4233 (yyval.node)->nname->nointerface = nointerface; 4234 declare((yyval.node)->nname, PFUNC); 4235 4236 funchdr((yyval.node)); 4237 } 4238 break; 4239 4240 case 206: 4241 4242 /* Line 1806 of yacc.c */ 4243 #line 1383 "go.y" 4244 { 4245 Sym *s; 4246 Type *t; 4247 4248 (yyval.node) = N; 4249 4250 s = (yyvsp[(1) - (5)].sym); 4251 t = functype(N, (yyvsp[(3) - (5)].list), (yyvsp[(5) - (5)].list)); 4252 4253 importsym(s, ONAME); 4254 if(s->def != N && s->def->op == ONAME) { 4255 if(eqtype(t, s->def->type)) { 4256 dclcontext = PDISCARD; // since we skip funchdr below 4257 break; 4258 } 4259 yyerror("inconsistent definition for func %S during import\n\t%T\n\t%T", s, s->def->type, t); 4260 } 4261 4262 (yyval.node) = newname(s); 4263 (yyval.node)->type = t; 4264 declare((yyval.node), PFUNC); 4265 4266 funchdr((yyval.node)); 4267 } 4268 break; 4269 4270 case 207: 4271 4272 /* Line 1806 of yacc.c */ 4273 #line 1408 "go.y" 4274 { 4275 (yyval.node) = methodname1(newname((yyvsp[(4) - (8)].sym)), (yyvsp[(2) - (8)].list)->n->right); 4276 (yyval.node)->type = functype((yyvsp[(2) - (8)].list)->n, (yyvsp[(6) - (8)].list), (yyvsp[(8) - (8)].list)); 4277 4278 checkwidth((yyval.node)->type); 4279 addmethod((yyvsp[(4) - (8)].sym), (yyval.node)->type, 0, nointerface); 4280 nointerface = 0; 4281 funchdr((yyval.node)); 4282 4283 // inl.c's inlnode in on a dotmeth node expects to find the inlineable body as 4284 // (dotmeth's type)->nname->inl, and dotmeth's type has been pulled 4285 // out by typecheck's lookdot as this $$->ttype. So by providing 4286 // this back link here we avoid special casing there. 4287 (yyval.node)->type->nname = (yyval.node); 4288 } 4289 break; 4290 4291 case 208: 4292 4293 /* Line 1806 of yacc.c */ 4294 #line 1426 "go.y" 4295 { 4296 (yyvsp[(3) - (5)].list) = checkarglist((yyvsp[(3) - (5)].list), 1); 4297 (yyval.node) = nod(OTFUNC, N, N); 4298 (yyval.node)->list = (yyvsp[(3) - (5)].list); 4299 (yyval.node)->rlist = (yyvsp[(5) - (5)].list); 4300 } 4301 break; 4302 4303 case 209: 4304 4305 /* Line 1806 of yacc.c */ 4306 #line 1434 "go.y" 4307 { 4308 (yyval.list) = nil; 4309 } 4310 break; 4311 4312 case 210: 4313 4314 /* Line 1806 of yacc.c */ 4315 #line 1438 "go.y" 4316 { 4317 (yyval.list) = (yyvsp[(2) - (3)].list); 4318 if((yyval.list) == nil) 4319 (yyval.list) = list1(nod(OEMPTY, N, N)); 4320 } 4321 break; 4322 4323 case 211: 4324 4325 /* Line 1806 of yacc.c */ 4326 #line 1446 "go.y" 4327 { 4328 (yyval.list) = nil; 4329 } 4330 break; 4331 4332 case 212: 4333 4334 /* Line 1806 of yacc.c */ 4335 #line 1450 "go.y" 4336 { 4337 (yyval.list) = list1(nod(ODCLFIELD, N, (yyvsp[(1) - (1)].node))); 4338 } 4339 break; 4340 4341 case 213: 4342 4343 /* Line 1806 of yacc.c */ 4344 #line 1454 "go.y" 4345 { 4346 (yyvsp[(2) - (3)].list) = checkarglist((yyvsp[(2) - (3)].list), 0); 4347 (yyval.list) = (yyvsp[(2) - (3)].list); 4348 } 4349 break; 4350 4351 case 214: 4352 4353 /* Line 1806 of yacc.c */ 4354 #line 1461 "go.y" 4355 { 4356 closurehdr((yyvsp[(1) - (1)].node)); 4357 } 4358 break; 4359 4360 case 215: 4361 4362 /* Line 1806 of yacc.c */ 4363 #line 1467 "go.y" 4364 { 4365 (yyval.node) = closurebody((yyvsp[(3) - (4)].list)); 4366 fixlbrace((yyvsp[(2) - (4)].i)); 4367 } 4368 break; 4369 4370 case 216: 4371 4372 /* Line 1806 of yacc.c */ 4373 #line 1472 "go.y" 4374 { 4375 (yyval.node) = closurebody(nil); 4376 } 4377 break; 4378 4379 case 217: 4380 4381 /* Line 1806 of yacc.c */ 4382 #line 1483 "go.y" 4383 { 4384 (yyval.list) = nil; 4385 } 4386 break; 4387 4388 case 218: 4389 4390 /* Line 1806 of yacc.c */ 4391 #line 1487 "go.y" 4392 { 4393 (yyval.list) = concat((yyvsp[(1) - (3)].list), (yyvsp[(2) - (3)].list)); 4394 if(nsyntaxerrors == 0) 4395 testdclstack(); 4396 nointerface = 0; 4397 noescape = 0; 4398 } 4399 break; 4400 4401 case 220: 4402 4403 /* Line 1806 of yacc.c */ 4404 #line 1498 "go.y" 4405 { 4406 (yyval.list) = concat((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].list)); 4407 } 4408 break; 4409 4410 case 222: 4411 4412 /* Line 1806 of yacc.c */ 4413 #line 1505 "go.y" 4414 { 4415 (yyval.list) = concat((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].list)); 4416 } 4417 break; 4418 4419 case 223: 4420 4421 /* Line 1806 of yacc.c */ 4422 #line 1511 "go.y" 4423 { 4424 (yyval.list) = list1((yyvsp[(1) - (1)].node)); 4425 } 4426 break; 4427 4428 case 224: 4429 4430 /* Line 1806 of yacc.c */ 4431 #line 1515 "go.y" 4432 { 4433 (yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); 4434 } 4435 break; 4436 4437 case 226: 4438 4439 /* Line 1806 of yacc.c */ 4440 #line 1522 "go.y" 4441 { 4442 (yyval.list) = concat((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].list)); 4443 } 4444 break; 4445 4446 case 227: 4447 4448 /* Line 1806 of yacc.c */ 4449 #line 1528 "go.y" 4450 { 4451 (yyval.list) = list1((yyvsp[(1) - (1)].node)); 4452 } 4453 break; 4454 4455 case 228: 4456 4457 /* Line 1806 of yacc.c */ 4458 #line 1532 "go.y" 4459 { 4460 (yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); 4461 } 4462 break; 4463 4464 case 229: 4465 4466 /* Line 1806 of yacc.c */ 4467 #line 1538 "go.y" 4468 { 4469 NodeList *l; 4470 4471 Node *n; 4472 l = (yyvsp[(1) - (3)].list); 4473 if(l == nil) { 4474 // ? symbol, during import (list1(N) == nil) 4475 n = (yyvsp[(2) - (3)].node); 4476 if(n->op == OIND) 4477 n = n->left; 4478 n = embedded(n->sym); 4479 n->right = (yyvsp[(2) - (3)].node); 4480 n->val = (yyvsp[(3) - (3)].val); 4481 (yyval.list) = list1(n); 4482 break; 4483 } 4484 4485 for(l=(yyvsp[(1) - (3)].list); l; l=l->next) { 4486 l->n = nod(ODCLFIELD, l->n, (yyvsp[(2) - (3)].node)); 4487 l->n->val = (yyvsp[(3) - (3)].val); 4488 } 4489 } 4490 break; 4491 4492 case 230: 4493 4494 /* Line 1806 of yacc.c */ 4495 #line 1561 "go.y" 4496 { 4497 (yyvsp[(1) - (2)].node)->val = (yyvsp[(2) - (2)].val); 4498 (yyval.list) = list1((yyvsp[(1) - (2)].node)); 4499 } 4500 break; 4501 4502 case 231: 4503 4504 /* Line 1806 of yacc.c */ 4505 #line 1566 "go.y" 4506 { 4507 (yyvsp[(2) - (4)].node)->val = (yyvsp[(4) - (4)].val); 4508 (yyval.list) = list1((yyvsp[(2) - (4)].node)); 4509 yyerror("cannot parenthesize embedded type"); 4510 } 4511 break; 4512 4513 case 232: 4514 4515 /* Line 1806 of yacc.c */ 4516 #line 1572 "go.y" 4517 { 4518 (yyvsp[(2) - (3)].node)->right = nod(OIND, (yyvsp[(2) - (3)].node)->right, N); 4519 (yyvsp[(2) - (3)].node)->val = (yyvsp[(3) - (3)].val); 4520 (yyval.list) = list1((yyvsp[(2) - (3)].node)); 4521 } 4522 break; 4523 4524 case 233: 4525 4526 /* Line 1806 of yacc.c */ 4527 #line 1578 "go.y" 4528 { 4529 (yyvsp[(3) - (5)].node)->right = nod(OIND, (yyvsp[(3) - (5)].node)->right, N); 4530 (yyvsp[(3) - (5)].node)->val = (yyvsp[(5) - (5)].val); 4531 (yyval.list) = list1((yyvsp[(3) - (5)].node)); 4532 yyerror("cannot parenthesize embedded type"); 4533 } 4534 break; 4535 4536 case 234: 4537 4538 /* Line 1806 of yacc.c */ 4539 #line 1585 "go.y" 4540 { 4541 (yyvsp[(3) - (5)].node)->right = nod(OIND, (yyvsp[(3) - (5)].node)->right, N); 4542 (yyvsp[(3) - (5)].node)->val = (yyvsp[(5) - (5)].val); 4543 (yyval.list) = list1((yyvsp[(3) - (5)].node)); 4544 yyerror("cannot parenthesize embedded type"); 4545 } 4546 break; 4547 4548 case 235: 4549 4550 /* Line 1806 of yacc.c */ 4551 #line 1594 "go.y" 4552 { 4553 Node *n; 4554 4555 (yyval.sym) = (yyvsp[(1) - (1)].sym); 4556 n = oldname((yyvsp[(1) - (1)].sym)); 4557 if(n->pack != N) 4558 n->pack->used = 1; 4559 } 4560 break; 4561 4562 case 236: 4563 4564 /* Line 1806 of yacc.c */ 4565 #line 1603 "go.y" 4566 { 4567 Pkg *pkg; 4568 4569 if((yyvsp[(1) - (3)].sym)->def == N || (yyvsp[(1) - (3)].sym)->def->op != OPACK) { 4570 yyerror("%S is not a package", (yyvsp[(1) - (3)].sym)); 4571 pkg = localpkg; 4572 } else { 4573 (yyvsp[(1) - (3)].sym)->def->used = 1; 4574 pkg = (yyvsp[(1) - (3)].sym)->def->pkg; 4575 } 4576 (yyval.sym) = restrictlookup((yyvsp[(3) - (3)].sym)->name, pkg); 4577 } 4578 break; 4579 4580 case 237: 4581 4582 /* Line 1806 of yacc.c */ 4583 #line 1618 "go.y" 4584 { 4585 (yyval.node) = embedded((yyvsp[(1) - (1)].sym)); 4586 } 4587 break; 4588 4589 case 238: 4590 4591 /* Line 1806 of yacc.c */ 4592 #line 1624 "go.y" 4593 { 4594 (yyval.node) = nod(ODCLFIELD, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 4595 ifacedcl((yyval.node)); 4596 } 4597 break; 4598 4599 case 239: 4600 4601 /* Line 1806 of yacc.c */ 4602 #line 1629 "go.y" 4603 { 4604 (yyval.node) = nod(ODCLFIELD, N, oldname((yyvsp[(1) - (1)].sym))); 4605 } 4606 break; 4607 4608 case 240: 4609 4610 /* Line 1806 of yacc.c */ 4611 #line 1633 "go.y" 4612 { 4613 (yyval.node) = nod(ODCLFIELD, N, oldname((yyvsp[(2) - (3)].sym))); 4614 yyerror("cannot parenthesize embedded type"); 4615 } 4616 break; 4617 4618 case 241: 4619 4620 /* Line 1806 of yacc.c */ 4621 #line 1640 "go.y" 4622 { 4623 // without func keyword 4624 (yyvsp[(2) - (4)].list) = checkarglist((yyvsp[(2) - (4)].list), 1); 4625 (yyval.node) = nod(OTFUNC, fakethis(), N); 4626 (yyval.node)->list = (yyvsp[(2) - (4)].list); 4627 (yyval.node)->rlist = (yyvsp[(4) - (4)].list); 4628 } 4629 break; 4630 4631 case 243: 4632 4633 /* Line 1806 of yacc.c */ 4634 #line 1654 "go.y" 4635 { 4636 (yyval.node) = nod(ONONAME, N, N); 4637 (yyval.node)->sym = (yyvsp[(1) - (2)].sym); 4638 (yyval.node) = nod(OKEY, (yyval.node), (yyvsp[(2) - (2)].node)); 4639 } 4640 break; 4641 4642 case 244: 4643 4644 /* Line 1806 of yacc.c */ 4645 #line 1660 "go.y" 4646 { 4647 (yyval.node) = nod(ONONAME, N, N); 4648 (yyval.node)->sym = (yyvsp[(1) - (2)].sym); 4649 (yyval.node) = nod(OKEY, (yyval.node), (yyvsp[(2) - (2)].node)); 4650 } 4651 break; 4652 4653 case 246: 4654 4655 /* Line 1806 of yacc.c */ 4656 #line 1669 "go.y" 4657 { 4658 (yyval.list) = list1((yyvsp[(1) - (1)].node)); 4659 } 4660 break; 4661 4662 case 247: 4663 4664 /* Line 1806 of yacc.c */ 4665 #line 1673 "go.y" 4666 { 4667 (yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); 4668 } 4669 break; 4670 4671 case 248: 4672 4673 /* Line 1806 of yacc.c */ 4674 #line 1678 "go.y" 4675 { 4676 (yyval.list) = nil; 4677 } 4678 break; 4679 4680 case 249: 4681 4682 /* Line 1806 of yacc.c */ 4683 #line 1682 "go.y" 4684 { 4685 (yyval.list) = (yyvsp[(1) - (2)].list); 4686 } 4687 break; 4688 4689 case 250: 4690 4691 /* Line 1806 of yacc.c */ 4692 #line 1690 "go.y" 4693 { 4694 (yyval.node) = N; 4695 } 4696 break; 4697 4698 case 252: 4699 4700 /* Line 1806 of yacc.c */ 4701 #line 1695 "go.y" 4702 { 4703 (yyval.node) = liststmt((yyvsp[(1) - (1)].list)); 4704 } 4705 break; 4706 4707 case 254: 4708 4709 /* Line 1806 of yacc.c */ 4710 #line 1700 "go.y" 4711 { 4712 (yyval.node) = N; 4713 } 4714 break; 4715 4716 case 260: 4717 4718 /* Line 1806 of yacc.c */ 4719 #line 1711 "go.y" 4720 { 4721 (yyvsp[(1) - (2)].node) = nod(OLABEL, (yyvsp[(1) - (2)].node), N); 4722 (yyvsp[(1) - (2)].node)->sym = dclstack; // context, for goto restrictions 4723 } 4724 break; 4725 4726 case 261: 4727 4728 /* Line 1806 of yacc.c */ 4729 #line 1716 "go.y" 4730 { 4731 NodeList *l; 4732 4733 (yyvsp[(1) - (4)].node)->defn = (yyvsp[(4) - (4)].node); 4734 l = list1((yyvsp[(1) - (4)].node)); 4735 if((yyvsp[(4) - (4)].node)) 4736 l = list(l, (yyvsp[(4) - (4)].node)); 4737 (yyval.node) = liststmt(l); 4738 } 4739 break; 4740 4741 case 262: 4742 4743 /* Line 1806 of yacc.c */ 4744 #line 1726 "go.y" 4745 { 4746 // will be converted to OFALL 4747 (yyval.node) = nod(OXFALL, N, N); 4748 } 4749 break; 4750 4751 case 263: 4752 4753 /* Line 1806 of yacc.c */ 4754 #line 1731 "go.y" 4755 { 4756 (yyval.node) = nod(OBREAK, (yyvsp[(2) - (2)].node), N); 4757 } 4758 break; 4759 4760 case 264: 4761 4762 /* Line 1806 of yacc.c */ 4763 #line 1735 "go.y" 4764 { 4765 (yyval.node) = nod(OCONTINUE, (yyvsp[(2) - (2)].node), N); 4766 } 4767 break; 4768 4769 case 265: 4770 4771 /* Line 1806 of yacc.c */ 4772 #line 1739 "go.y" 4773 { 4774 (yyval.node) = nod(OPROC, (yyvsp[(2) - (2)].node), N); 4775 } 4776 break; 4777 4778 case 266: 4779 4780 /* Line 1806 of yacc.c */ 4781 #line 1743 "go.y" 4782 { 4783 (yyval.node) = nod(ODEFER, (yyvsp[(2) - (2)].node), N); 4784 } 4785 break; 4786 4787 case 267: 4788 4789 /* Line 1806 of yacc.c */ 4790 #line 1747 "go.y" 4791 { 4792 (yyval.node) = nod(OGOTO, (yyvsp[(2) - (2)].node), N); 4793 (yyval.node)->sym = dclstack; // context, for goto restrictions 4794 } 4795 break; 4796 4797 case 268: 4798 4799 /* Line 1806 of yacc.c */ 4800 #line 1752 "go.y" 4801 { 4802 (yyval.node) = nod(ORETURN, N, N); 4803 (yyval.node)->list = (yyvsp[(2) - (2)].list); 4804 if((yyval.node)->list == nil && curfn != N) { 4805 NodeList *l; 4806 4807 for(l=curfn->dcl; l; l=l->next) { 4808 if(l->n->class == PPARAM) 4809 continue; 4810 if(l->n->class != PPARAMOUT) 4811 break; 4812 if(l->n->sym->def != l->n) 4813 yyerror("%s is shadowed during return", l->n->sym->name); 4814 } 4815 } 4816 } 4817 break; 4818 4819 case 269: 4820 4821 /* Line 1806 of yacc.c */ 4822 #line 1771 "go.y" 4823 { 4824 (yyval.list) = nil; 4825 if((yyvsp[(1) - (1)].node) != N) 4826 (yyval.list) = list1((yyvsp[(1) - (1)].node)); 4827 } 4828 break; 4829 4830 case 270: 4831 4832 /* Line 1806 of yacc.c */ 4833 #line 1777 "go.y" 4834 { 4835 (yyval.list) = (yyvsp[(1) - (3)].list); 4836 if((yyvsp[(3) - (3)].node) != N) 4837 (yyval.list) = list((yyval.list), (yyvsp[(3) - (3)].node)); 4838 } 4839 break; 4840 4841 case 271: 4842 4843 /* Line 1806 of yacc.c */ 4844 #line 1785 "go.y" 4845 { 4846 (yyval.list) = list1((yyvsp[(1) - (1)].node)); 4847 } 4848 break; 4849 4850 case 272: 4851 4852 /* Line 1806 of yacc.c */ 4853 #line 1789 "go.y" 4854 { 4855 (yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); 4856 } 4857 break; 4858 4859 case 273: 4860 4861 /* Line 1806 of yacc.c */ 4862 #line 1795 "go.y" 4863 { 4864 (yyval.list) = list1((yyvsp[(1) - (1)].node)); 4865 } 4866 break; 4867 4868 case 274: 4869 4870 /* Line 1806 of yacc.c */ 4871 #line 1799 "go.y" 4872 { 4873 (yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); 4874 } 4875 break; 4876 4877 case 275: 4878 4879 /* Line 1806 of yacc.c */ 4880 #line 1805 "go.y" 4881 { 4882 (yyval.list) = list1((yyvsp[(1) - (1)].node)); 4883 } 4884 break; 4885 4886 case 276: 4887 4888 /* Line 1806 of yacc.c */ 4889 #line 1809 "go.y" 4890 { 4891 (yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); 4892 } 4893 break; 4894 4895 case 277: 4896 4897 /* Line 1806 of yacc.c */ 4898 #line 1815 "go.y" 4899 { 4900 (yyval.list) = list1((yyvsp[(1) - (1)].node)); 4901 } 4902 break; 4903 4904 case 278: 4905 4906 /* Line 1806 of yacc.c */ 4907 #line 1819 "go.y" 4908 { 4909 (yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); 4910 } 4911 break; 4912 4913 case 279: 4914 4915 /* Line 1806 of yacc.c */ 4916 #line 1828 "go.y" 4917 { 4918 (yyval.list) = list1((yyvsp[(1) - (1)].node)); 4919 } 4920 break; 4921 4922 case 280: 4923 4924 /* Line 1806 of yacc.c */ 4925 #line 1832 "go.y" 4926 { 4927 (yyval.list) = list1((yyvsp[(1) - (1)].node)); 4928 } 4929 break; 4930 4931 case 281: 4932 4933 /* Line 1806 of yacc.c */ 4934 #line 1836 "go.y" 4935 { 4936 (yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); 4937 } 4938 break; 4939 4940 case 282: 4941 4942 /* Line 1806 of yacc.c */ 4943 #line 1840 "go.y" 4944 { 4945 (yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); 4946 } 4947 break; 4948 4949 case 283: 4950 4951 /* Line 1806 of yacc.c */ 4952 #line 1845 "go.y" 4953 { 4954 (yyval.list) = nil; 4955 } 4956 break; 4957 4958 case 284: 4959 4960 /* Line 1806 of yacc.c */ 4961 #line 1849 "go.y" 4962 { 4963 (yyval.list) = (yyvsp[(1) - (2)].list); 4964 } 4965 break; 4966 4967 case 289: 4968 4969 /* Line 1806 of yacc.c */ 4970 #line 1863 "go.y" 4971 { 4972 (yyval.node) = N; 4973 } 4974 break; 4975 4976 case 291: 4977 4978 /* Line 1806 of yacc.c */ 4979 #line 1869 "go.y" 4980 { 4981 (yyval.list) = nil; 4982 } 4983 break; 4984 4985 case 293: 4986 4987 /* Line 1806 of yacc.c */ 4988 #line 1875 "go.y" 4989 { 4990 (yyval.node) = N; 4991 } 4992 break; 4993 4994 case 295: 4995 4996 /* Line 1806 of yacc.c */ 4997 #line 1881 "go.y" 4998 { 4999 (yyval.list) = nil; 5000 } 5001 break; 5002 5003 case 297: 5004 5005 /* Line 1806 of yacc.c */ 5006 #line 1887 "go.y" 5007 { 5008 (yyval.list) = nil; 5009 } 5010 break; 5011 5012 case 299: 5013 5014 /* Line 1806 of yacc.c */ 5015 #line 1893 "go.y" 5016 { 5017 (yyval.list) = nil; 5018 } 5019 break; 5020 5021 case 301: 5022 5023 /* Line 1806 of yacc.c */ 5024 #line 1899 "go.y" 5025 { 5026 (yyval.val).ctype = CTxxx; 5027 } 5028 break; 5029 5030 case 303: 5031 5032 /* Line 1806 of yacc.c */ 5033 #line 1909 "go.y" 5034 { 5035 importimport((yyvsp[(2) - (4)].sym), (yyvsp[(3) - (4)].val).u.sval); 5036 } 5037 break; 5038 5039 case 304: 5040 5041 /* Line 1806 of yacc.c */ 5042 #line 1913 "go.y" 5043 { 5044 importvar((yyvsp[(2) - (4)].sym), (yyvsp[(3) - (4)].type)); 5045 } 5046 break; 5047 5048 case 305: 5049 5050 /* Line 1806 of yacc.c */ 5051 #line 1917 "go.y" 5052 { 5053 importconst((yyvsp[(2) - (5)].sym), types[TIDEAL], (yyvsp[(4) - (5)].node)); 5054 } 5055 break; 5056 5057 case 306: 5058 5059 /* Line 1806 of yacc.c */ 5060 #line 1921 "go.y" 5061 { 5062 importconst((yyvsp[(2) - (6)].sym), (yyvsp[(3) - (6)].type), (yyvsp[(5) - (6)].node)); 5063 } 5064 break; 5065 5066 case 307: 5067 5068 /* Line 1806 of yacc.c */ 5069 #line 1925 "go.y" 5070 { 5071 importtype((yyvsp[(2) - (4)].type), (yyvsp[(3) - (4)].type)); 5072 } 5073 break; 5074 5075 case 308: 5076 5077 /* Line 1806 of yacc.c */ 5078 #line 1929 "go.y" 5079 { 5080 if((yyvsp[(2) - (4)].node) == N) { 5081 dclcontext = PEXTERN; // since we skip the funcbody below 5082 break; 5083 } 5084 5085 (yyvsp[(2) - (4)].node)->inl = (yyvsp[(3) - (4)].list); 5086 5087 funcbody((yyvsp[(2) - (4)].node)); 5088 importlist = list(importlist, (yyvsp[(2) - (4)].node)); 5089 5090 if(debug['E']) { 5091 print("import [%Z] func %lN \n", importpkg->path, (yyvsp[(2) - (4)].node)); 5092 if(debug['m'] > 2 && (yyvsp[(2) - (4)].node)->inl) 5093 print("inl body:%+H\n", (yyvsp[(2) - (4)].node)->inl); 5094 } 5095 } 5096 break; 5097 5098 case 309: 5099 5100 /* Line 1806 of yacc.c */ 5101 #line 1949 "go.y" 5102 { 5103 (yyval.sym) = (yyvsp[(1) - (1)].sym); 5104 structpkg = (yyval.sym)->pkg; 5105 } 5106 break; 5107 5108 case 310: 5109 5110 /* Line 1806 of yacc.c */ 5111 #line 1956 "go.y" 5112 { 5113 (yyval.type) = pkgtype((yyvsp[(1) - (1)].sym)); 5114 importsym((yyvsp[(1) - (1)].sym), OTYPE); 5115 } 5116 break; 5117 5118 case 316: 5119 5120 /* Line 1806 of yacc.c */ 5121 #line 1976 "go.y" 5122 { 5123 (yyval.type) = pkgtype((yyvsp[(1) - (1)].sym)); 5124 } 5125 break; 5126 5127 case 317: 5128 5129 /* Line 1806 of yacc.c */ 5130 #line 1980 "go.y" 5131 { 5132 // predefined name like uint8 5133 (yyvsp[(1) - (1)].sym) = pkglookup((yyvsp[(1) - (1)].sym)->name, builtinpkg); 5134 if((yyvsp[(1) - (1)].sym)->def == N || (yyvsp[(1) - (1)].sym)->def->op != OTYPE) { 5135 yyerror("%s is not a type", (yyvsp[(1) - (1)].sym)->name); 5136 (yyval.type) = T; 5137 } else 5138 (yyval.type) = (yyvsp[(1) - (1)].sym)->def->type; 5139 } 5140 break; 5141 5142 case 318: 5143 5144 /* Line 1806 of yacc.c */ 5145 #line 1990 "go.y" 5146 { 5147 (yyval.type) = aindex(N, (yyvsp[(3) - (3)].type)); 5148 } 5149 break; 5150 5151 case 319: 5152 5153 /* Line 1806 of yacc.c */ 5154 #line 1994 "go.y" 5155 { 5156 (yyval.type) = aindex(nodlit((yyvsp[(2) - (4)].val)), (yyvsp[(4) - (4)].type)); 5157 } 5158 break; 5159 5160 case 320: 5161 5162 /* Line 1806 of yacc.c */ 5163 #line 1998 "go.y" 5164 { 5165 (yyval.type) = maptype((yyvsp[(3) - (5)].type), (yyvsp[(5) - (5)].type)); 5166 } 5167 break; 5168 5169 case 321: 5170 5171 /* Line 1806 of yacc.c */ 5172 #line 2002 "go.y" 5173 { 5174 (yyval.type) = tostruct((yyvsp[(3) - (4)].list)); 5175 } 5176 break; 5177 5178 case 322: 5179 5180 /* Line 1806 of yacc.c */ 5181 #line 2006 "go.y" 5182 { 5183 (yyval.type) = tointerface((yyvsp[(3) - (4)].list)); 5184 } 5185 break; 5186 5187 case 323: 5188 5189 /* Line 1806 of yacc.c */ 5190 #line 2010 "go.y" 5191 { 5192 (yyval.type) = ptrto((yyvsp[(2) - (2)].type)); 5193 } 5194 break; 5195 5196 case 324: 5197 5198 /* Line 1806 of yacc.c */ 5199 #line 2014 "go.y" 5200 { 5201 (yyval.type) = typ(TCHAN); 5202 (yyval.type)->type = (yyvsp[(2) - (2)].type); 5203 (yyval.type)->chan = Cboth; 5204 } 5205 break; 5206 5207 case 325: 5208 5209 /* Line 1806 of yacc.c */ 5210 #line 2020 "go.y" 5211 { 5212 (yyval.type) = typ(TCHAN); 5213 (yyval.type)->type = (yyvsp[(3) - (4)].type); 5214 (yyval.type)->chan = Cboth; 5215 } 5216 break; 5217 5218 case 326: 5219 5220 /* Line 1806 of yacc.c */ 5221 #line 2026 "go.y" 5222 { 5223 (yyval.type) = typ(TCHAN); 5224 (yyval.type)->type = (yyvsp[(3) - (3)].type); 5225 (yyval.type)->chan = Csend; 5226 } 5227 break; 5228 5229 case 327: 5230 5231 /* Line 1806 of yacc.c */ 5232 #line 2034 "go.y" 5233 { 5234 (yyval.type) = typ(TCHAN); 5235 (yyval.type)->type = (yyvsp[(3) - (3)].type); 5236 (yyval.type)->chan = Crecv; 5237 } 5238 break; 5239 5240 case 328: 5241 5242 /* Line 1806 of yacc.c */ 5243 #line 2042 "go.y" 5244 { 5245 (yyval.type) = functype(nil, (yyvsp[(3) - (5)].list), (yyvsp[(5) - (5)].list)); 5246 } 5247 break; 5248 5249 case 329: 5250 5251 /* Line 1806 of yacc.c */ 5252 #line 2048 "go.y" 5253 { 5254 (yyval.node) = nod(ODCLFIELD, N, typenod((yyvsp[(2) - (3)].type))); 5255 if((yyvsp[(1) - (3)].sym)) 5256 (yyval.node)->left = newname((yyvsp[(1) - (3)].sym)); 5257 (yyval.node)->val = (yyvsp[(3) - (3)].val); 5258 } 5259 break; 5260 5261 case 330: 5262 5263 /* Line 1806 of yacc.c */ 5264 #line 2055 "go.y" 5265 { 5266 Type *t; 5267 5268 t = typ(TARRAY); 5269 t->bound = -1; 5270 t->type = (yyvsp[(3) - (4)].type); 5271 5272 (yyval.node) = nod(ODCLFIELD, N, typenod(t)); 5273 if((yyvsp[(1) - (4)].sym)) 5274 (yyval.node)->left = newname((yyvsp[(1) - (4)].sym)); 5275 (yyval.node)->isddd = 1; 5276 (yyval.node)->val = (yyvsp[(4) - (4)].val); 5277 } 5278 break; 5279 5280 case 331: 5281 5282 /* Line 1806 of yacc.c */ 5283 #line 2071 "go.y" 5284 { 5285 Sym *s; 5286 5287 if((yyvsp[(1) - (3)].sym) != S) { 5288 (yyval.node) = nod(ODCLFIELD, newname((yyvsp[(1) - (3)].sym)), typenod((yyvsp[(2) - (3)].type))); 5289 (yyval.node)->val = (yyvsp[(3) - (3)].val); 5290 } else { 5291 s = (yyvsp[(2) - (3)].type)->sym; 5292 if(s == S && isptr[(yyvsp[(2) - (3)].type)->etype]) 5293 s = (yyvsp[(2) - (3)].type)->type->sym; 5294 (yyval.node) = embedded(s); 5295 (yyval.node)->right = typenod((yyvsp[(2) - (3)].type)); 5296 (yyval.node)->val = (yyvsp[(3) - (3)].val); 5297 } 5298 } 5299 break; 5300 5301 case 332: 5302 5303 /* Line 1806 of yacc.c */ 5304 #line 2089 "go.y" 5305 { 5306 (yyval.node) = nod(ODCLFIELD, newname((yyvsp[(1) - (5)].sym)), typenod(functype(fakethis(), (yyvsp[(3) - (5)].list), (yyvsp[(5) - (5)].list)))); 5307 } 5308 break; 5309 5310 case 333: 5311 5312 /* Line 1806 of yacc.c */ 5313 #line 2093 "go.y" 5314 { 5315 (yyval.node) = nod(ODCLFIELD, N, typenod((yyvsp[(1) - (1)].type))); 5316 } 5317 break; 5318 5319 case 334: 5320 5321 /* Line 1806 of yacc.c */ 5322 #line 2098 "go.y" 5323 { 5324 (yyval.list) = nil; 5325 } 5326 break; 5327 5328 case 336: 5329 5330 /* Line 1806 of yacc.c */ 5331 #line 2105 "go.y" 5332 { 5333 (yyval.list) = (yyvsp[(2) - (3)].list); 5334 } 5335 break; 5336 5337 case 337: 5338 5339 /* Line 1806 of yacc.c */ 5340 #line 2109 "go.y" 5341 { 5342 (yyval.list) = list1(nod(ODCLFIELD, N, typenod((yyvsp[(1) - (1)].type)))); 5343 } 5344 break; 5345 5346 case 338: 5347 5348 /* Line 1806 of yacc.c */ 5349 #line 2119 "go.y" 5350 { 5351 (yyval.node) = nodlit((yyvsp[(1) - (1)].val)); 5352 } 5353 break; 5354 5355 case 339: 5356 5357 /* Line 1806 of yacc.c */ 5358 #line 2123 "go.y" 5359 { 5360 (yyval.node) = nodlit((yyvsp[(2) - (2)].val)); 5361 switch((yyval.node)->val.ctype){ 5362 case CTINT: 5363 case CTRUNE: 5364 mpnegfix((yyval.node)->val.u.xval); 5365 break; 5366 case CTFLT: 5367 mpnegflt((yyval.node)->val.u.fval); 5368 break; 5369 default: 5370 yyerror("bad negated constant"); 5371 } 5372 } 5373 break; 5374 5375 case 340: 5376 5377 /* Line 1806 of yacc.c */ 5378 #line 2138 "go.y" 5379 { 5380 (yyval.node) = oldname(pkglookup((yyvsp[(1) - (1)].sym)->name, builtinpkg)); 5381 if((yyval.node)->op != OLITERAL) 5382 yyerror("bad constant %S", (yyval.node)->sym); 5383 } 5384 break; 5385 5386 case 342: 5387 5388 /* Line 1806 of yacc.c */ 5389 #line 2147 "go.y" 5390 { 5391 if((yyvsp[(2) - (5)].node)->val.ctype == CTRUNE && (yyvsp[(4) - (5)].node)->val.ctype == CTINT) { 5392 (yyval.node) = (yyvsp[(2) - (5)].node); 5393 mpaddfixfix((yyvsp[(2) - (5)].node)->val.u.xval, (yyvsp[(4) - (5)].node)->val.u.xval, 0); 5394 break; 5395 } 5396 (yyvsp[(4) - (5)].node)->val.u.cval->real = (yyvsp[(4) - (5)].node)->val.u.cval->imag; 5397 mpmovecflt(&(yyvsp[(4) - (5)].node)->val.u.cval->imag, 0.0); 5398 (yyval.node) = nodcplxlit((yyvsp[(2) - (5)].node)->val, (yyvsp[(4) - (5)].node)->val); 5399 } 5400 break; 5401 5402 case 345: 5403 5404 /* Line 1806 of yacc.c */ 5405 #line 2163 "go.y" 5406 { 5407 (yyval.list) = list1((yyvsp[(1) - (1)].node)); 5408 } 5409 break; 5410 5411 case 346: 5412 5413 /* Line 1806 of yacc.c */ 5414 #line 2167 "go.y" 5415 { 5416 (yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); 5417 } 5418 break; 5419 5420 case 347: 5421 5422 /* Line 1806 of yacc.c */ 5423 #line 2173 "go.y" 5424 { 5425 (yyval.list) = list1((yyvsp[(1) - (1)].node)); 5426 } 5427 break; 5428 5429 case 348: 5430 5431 /* Line 1806 of yacc.c */ 5432 #line 2177 "go.y" 5433 { 5434 (yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); 5435 } 5436 break; 5437 5438 case 349: 5439 5440 /* Line 1806 of yacc.c */ 5441 #line 2183 "go.y" 5442 { 5443 (yyval.list) = list1((yyvsp[(1) - (1)].node)); 5444 } 5445 break; 5446 5447 case 350: 5448 5449 /* Line 1806 of yacc.c */ 5450 #line 2187 "go.y" 5451 { 5452 (yyval.list) = list((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); 5453 } 5454 break; 5455 5456 5457 5458 /* Line 1806 of yacc.c */ 5459 #line 5461 "y.tab.c" 5460 default: break; 5461 } 5462 /* User semantic actions sometimes alter yychar, and that requires 5463 that yytoken be updated with the new translation. We take the 5464 approach of translating immediately before every use of yytoken. 5465 One alternative is translating here after every semantic action, 5466 but that translation would be missed if the semantic action invokes 5467 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or 5468 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an 5469 incorrect destructor might then be invoked immediately. In the 5470 case of YYERROR or YYBACKUP, subsequent parser actions might lead 5471 to an incorrect destructor call or verbose syntax error message 5472 before the lookahead is translated. */ 5473 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 5474 5475 YYPOPSTACK (yylen); 5476 yylen = 0; 5477 YY_STACK_PRINT (yyss, yyssp); 5478 5479 *++yyvsp = yyval; 5480 5481 /* Now `shift' the result of the reduction. Determine what state 5482 that goes to, based on the state we popped back to and the rule 5483 number reduced by. */ 5484 5485 yyn = yyr1[yyn]; 5486 5487 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 5488 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 5489 yystate = yytable[yystate]; 5490 else 5491 yystate = yydefgoto[yyn - YYNTOKENS]; 5492 5493 goto yynewstate; 5494 5495 5496 /*------------------------------------. 5497 | yyerrlab -- here on detecting error | 5498 `------------------------------------*/ 5499 yyerrlab: 5500 /* Make sure we have latest lookahead translation. See comments at 5501 user semantic actions for why this is necessary. */ 5502 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); 5503 5504 /* If not already recovering from an error, report this error. */ 5505 if (!yyerrstatus) 5506 { 5507 ++yynerrs; 5508 #if ! YYERROR_VERBOSE 5509 yyerror (YY_("syntax error")); 5510 #else 5511 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 5512 yyssp, yytoken) 5513 { 5514 char *yymsgp = YY_("syntax error"); 5515 int yysyntax_error_status; 5516 yysyntax_error_status = YYSYNTAX_ERROR; 5517 if (yysyntax_error_status == 0) 5518 yymsgp = yymsg; 5519 else if (yysyntax_error_status == 1) 5520 { 5521 if (yymsg != yymsgbuf) 5522 YYSTACK_FREE (yymsg); 5523 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); 5524 if (!yymsg) 5525 { 5526 yymsg = yymsgbuf; 5527 yymsg_alloc = sizeof yymsgbuf; 5528 yysyntax_error_status = 2; 5529 } 5530 else 5531 { 5532 yysyntax_error_status = YYSYNTAX_ERROR; 5533 yymsgp = yymsg; 5534 } 5535 } 5536 yyerror (yymsgp); 5537 if (yysyntax_error_status == 2) 5538 goto yyexhaustedlab; 5539 } 5540 # undef YYSYNTAX_ERROR 5541 #endif 5542 } 5543 5544 5545 5546 if (yyerrstatus == 3) 5547 { 5548 /* If just tried and failed to reuse lookahead token after an 5549 error, discard it. */ 5550 5551 if (yychar <= YYEOF) 5552 { 5553 /* Return failure if at end of input. */ 5554 if (yychar == YYEOF) 5555 YYABORT; 5556 } 5557 else 5558 { 5559 yydestruct ("Error: discarding", 5560 yytoken, &yylval); 5561 yychar = YYEMPTY; 5562 } 5563 } 5564 5565 /* Else will try to reuse lookahead token after shifting the error 5566 token. */ 5567 goto yyerrlab1; 5568 5569 5570 /*---------------------------------------------------. 5571 | yyerrorlab -- error raised explicitly by YYERROR. | 5572 `---------------------------------------------------*/ 5573 yyerrorlab: 5574 5575 /* Pacify compilers like GCC when the user code never invokes 5576 YYERROR and the label yyerrorlab therefore never appears in user 5577 code. */ 5578 if (/*CONSTCOND*/ 0) 5579 goto yyerrorlab; 5580 5581 /* Do not reclaim the symbols of the rule which action triggered 5582 this YYERROR. */ 5583 YYPOPSTACK (yylen); 5584 yylen = 0; 5585 YY_STACK_PRINT (yyss, yyssp); 5586 yystate = *yyssp; 5587 goto yyerrlab1; 5588 5589 5590 /*-------------------------------------------------------------. 5591 | yyerrlab1 -- common code for both syntax error and YYERROR. | 5592 `-------------------------------------------------------------*/ 5593 yyerrlab1: 5594 yyerrstatus = 3; /* Each real token shifted decrements this. */ 5595 5596 for (;;) 5597 { 5598 yyn = yypact[yystate]; 5599 if (!yypact_value_is_default (yyn)) 5600 { 5601 yyn += YYTERROR; 5602 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 5603 { 5604 yyn = yytable[yyn]; 5605 if (0 < yyn) 5606 break; 5607 } 5608 } 5609 5610 /* Pop the current state because it cannot handle the error token. */ 5611 if (yyssp == yyss) 5612 YYABORT; 5613 5614 5615 yydestruct ("Error: popping", 5616 yystos[yystate], yyvsp); 5617 YYPOPSTACK (1); 5618 yystate = *yyssp; 5619 YY_STACK_PRINT (yyss, yyssp); 5620 } 5621 5622 *++yyvsp = yylval; 5623 5624 5625 /* Shift the error token. */ 5626 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 5627 5628 yystate = yyn; 5629 goto yynewstate; 5630 5631 5632 /*-------------------------------------. 5633 | yyacceptlab -- YYACCEPT comes here. | 5634 `-------------------------------------*/ 5635 yyacceptlab: 5636 yyresult = 0; 5637 goto yyreturn; 5638 5639 /*-----------------------------------. 5640 | yyabortlab -- YYABORT comes here. | 5641 `-----------------------------------*/ 5642 yyabortlab: 5643 yyresult = 1; 5644 goto yyreturn; 5645 5646 #if !defined(yyoverflow) || YYERROR_VERBOSE 5647 /*-------------------------------------------------. 5648 | yyexhaustedlab -- memory exhaustion comes here. | 5649 `-------------------------------------------------*/ 5650 yyexhaustedlab: 5651 yyerror (YY_("memory exhausted")); 5652 yyresult = 2; 5653 /* Fall through. */ 5654 #endif 5655 5656 yyreturn: 5657 if (yychar != YYEMPTY) 5658 { 5659 /* Make sure we have latest lookahead translation. See comments at 5660 user semantic actions for why this is necessary. */ 5661 yytoken = YYTRANSLATE (yychar); 5662 yydestruct ("Cleanup: discarding lookahead", 5663 yytoken, &yylval); 5664 } 5665 /* Do not reclaim the symbols of the rule which action triggered 5666 this YYABORT or YYACCEPT. */ 5667 YYPOPSTACK (yylen); 5668 YY_STACK_PRINT (yyss, yyssp); 5669 while (yyssp != yyss) 5670 { 5671 yydestruct ("Cleanup: popping", 5672 yystos[*yyssp], yyvsp); 5673 YYPOPSTACK (1); 5674 } 5675 #ifndef yyoverflow 5676 if (yyss != yyssa) 5677 YYSTACK_FREE (yyss); 5678 #endif 5679 #if YYERROR_VERBOSE 5680 if (yymsg != yymsgbuf) 5681 YYSTACK_FREE (yymsg); 5682 #endif 5683 /* Make sure YYID is used. */ 5684 return YYID (yyresult); 5685 } 5686 5687 5688 5689 /* Line 2067 of yacc.c */ 5690 #line 2191 "go.y" 5691 5692 5693 static void 5694 fixlbrace(int lbr) 5695 { 5696 // If the opening brace was an LBODY, 5697 // set up for another one now that we're done. 5698 // See comment in lex.c about loophack. 5699 if(lbr == LBODY) 5700 loophack = 1; 5701 } 5702 5703