1 //line go.y:21 2 package gc 3 4 import __yyfmt__ "fmt" 5 6 //line go.y:21 7 import ( 8 "fmt" 9 "strings" 10 ) 11 12 //line go.y:28 13 type yySymType struct { 14 yys int 15 node *Node 16 list *NodeList 17 typ *Type 18 sym *Sym 19 val Val 20 i int 21 } 22 23 const LLITERAL = 57346 24 const LASOP = 57347 25 const LCOLAS = 57348 26 const LBREAK = 57349 27 const LCASE = 57350 28 const LCHAN = 57351 29 const LCONST = 57352 30 const LCONTINUE = 57353 31 const LDDD = 57354 32 const LDEFAULT = 57355 33 const LDEFER = 57356 34 const LELSE = 57357 35 const LFALL = 57358 36 const LFOR = 57359 37 const LFUNC = 57360 38 const LGO = 57361 39 const LGOTO = 57362 40 const LIF = 57363 41 const LIMPORT = 57364 42 const LINTERFACE = 57365 43 const LMAP = 57366 44 const LNAME = 57367 45 const LPACKAGE = 57368 46 const LRANGE = 57369 47 const LRETURN = 57370 48 const LSELECT = 57371 49 const LSTRUCT = 57372 50 const LSWITCH = 57373 51 const LTYPE = 57374 52 const LVAR = 57375 53 const LANDAND = 57376 54 const LANDNOT = 57377 55 const LBODY = 57378 56 const LCOMM = 57379 57 const LDEC = 57380 58 const LEQ = 57381 59 const LGE = 57382 60 const LGT = 57383 61 const LIGNORE = 57384 62 const LINC = 57385 63 const LLE = 57386 64 const LLSH = 57387 65 const LLT = 57388 66 const LNE = 57389 67 const LOROR = 57390 68 const LRSH = 57391 69 const NotPackage = 57392 70 const NotParen = 57393 71 const PreferToRightParen = 57394 72 73 var yyToknames = [...]string{ 74 "$end", 75 "error", 76 "$unk", 77 "LLITERAL", 78 "LASOP", 79 "LCOLAS", 80 "LBREAK", 81 "LCASE", 82 "LCHAN", 83 "LCONST", 84 "LCONTINUE", 85 "LDDD", 86 "LDEFAULT", 87 "LDEFER", 88 "LELSE", 89 "LFALL", 90 "LFOR", 91 "LFUNC", 92 "LGO", 93 "LGOTO", 94 "LIF", 95 "LIMPORT", 96 "LINTERFACE", 97 "LMAP", 98 "LNAME", 99 "LPACKAGE", 100 "LRANGE", 101 "LRETURN", 102 "LSELECT", 103 "LSTRUCT", 104 "LSWITCH", 105 "LTYPE", 106 "LVAR", 107 "LANDAND", 108 "LANDNOT", 109 "LBODY", 110 "LCOMM", 111 "LDEC", 112 "LEQ", 113 "LGE", 114 "LGT", 115 "LIGNORE", 116 "LINC", 117 "LLE", 118 "LLSH", 119 "LLT", 120 "LNE", 121 "LOROR", 122 "LRSH", 123 "'+'", 124 "'-'", 125 "'|'", 126 "'^'", 127 "'*'", 128 "'/'", 129 "'%'", 130 "'&'", 131 "NotPackage", 132 "NotParen", 133 "'('", 134 "')'", 135 "PreferToRightParen", 136 "';'", 137 "'.'", 138 "'$'", 139 "'='", 140 "':'", 141 "'{'", 142 "'}'", 143 "'!'", 144 "'~'", 145 "'['", 146 "']'", 147 "'?'", 148 "'@'", 149 "','", 150 } 151 var yyStatenames = [...]string{} 152 153 const yyEofCode = 1 154 const yyErrCode = 2 155 const yyMaxDepth = 200 156 157 //line go.y:2308 158 func fixlbrace(lbr int) { 159 // If the opening brace was an LBODY, 160 // set up for another one now that we're done. 161 // See comment in lex.C about loophack. 162 if lbr == LBODY { 163 loophack = 1 164 } 165 } 166 167 //line yacctab:1 168 var yyExca = [...]int{ 169 -1, 1, 170 1, -1, 171 -2, 0, 172 -1, 17, 173 1, 1, 174 63, 23, 175 -2, 0, 176 -1, 48, 177 6, 276, 178 66, 276, 179 76, 276, 180 -2, 49, 181 -1, 56, 182 67, 153, 183 -2, 162, 184 -1, 74, 185 60, 181, 186 -2, 215, 187 -1, 75, 188 60, 182, 189 -2, 183, 190 -1, 121, 191 60, 134, 192 64, 134, 193 68, 134, 194 72, 134, 195 -2, 266, 196 -1, 125, 197 60, 134, 198 64, 134, 199 68, 134, 200 72, 134, 201 -2, 267, 202 -1, 176, 203 2, 215, 204 36, 215, 205 60, 181, 206 68, 215, 207 -2, 173, 208 -1, 177, 209 36, 183, 210 60, 182, 211 68, 183, 212 -2, 174, 213 -1, 184, 214 63, 251, 215 69, 251, 216 -2, 0, 217 -1, 242, 218 63, 251, 219 69, 251, 220 -2, 0, 221 -1, 252, 222 8, 251, 223 13, 251, 224 63, 251, 225 69, 251, 226 -2, 0, 227 -1, 325, 228 4, 236, 229 63, 236, 230 69, 236, 231 -2, 157, 232 -1, 403, 233 67, 144, 234 -2, 142, 235 -1, 408, 236 36, 176, 237 60, 176, 238 68, 176, 239 -2, 167, 240 -1, 409, 241 36, 177, 242 60, 177, 243 68, 177, 244 -2, 168, 245 -1, 410, 246 36, 178, 247 60, 178, 248 68, 178, 249 -2, 169, 250 -1, 411, 251 36, 179, 252 60, 179, 253 68, 179, 254 -2, 170, 255 -1, 417, 256 8, 251, 257 13, 251, 258 63, 251, 259 69, 251, 260 -2, 0, 261 -1, 418, 262 63, 251, 263 69, 251, 264 -2, 0, 265 -1, 498, 266 63, 251, 267 69, 251, 268 -2, 0, 269 -1, 553, 270 60, 157, 271 -2, 318, 272 -1, 554, 273 60, 158, 274 -2, 317, 275 -1, 579, 276 8, 251, 277 13, 251, 278 63, 251, 279 69, 251, 280 -2, 0, 281 -1, 593, 282 36, 180, 283 60, 180, 284 68, 180, 285 -2, 171, 286 -1, 632, 287 67, 145, 288 -2, 143, 289 } 290 291 const yyNprod = 352 292 const yyPrivate = 57344 293 294 var yyTokenNames []string 295 var yyStates []string 296 297 const yyLast = 2321 298 299 var yyAct = [...]int{ 300 301 74, 304, 381, 291, 487, 611, 459, 285, 546, 229, 302 398, 467, 34, 296, 75, 302, 402, 550, 290, 186, 303 286, 479, 458, 356, 400, 401, 389, 338, 103, 318, 304 328, 245, 303, 339, 324, 243, 337, 468, 101, 374, 305 109, 104, 248, 85, 14, 246, 241, 174, 480, 212, 306 6, 181, 325, 155, 470, 469, 325, 385, 332, 517, 307 108, 627, 414, 373, 13, 208, 585, 11, 176, 461, 308 470, 172, 584, 461, 652, 600, 230, 219, 392, 191, 309 106, 322, 177, 542, 226, 322, 423, 321, 193, 88, 310 10, 321, 13, 192, 10, 310, 317, 309, 154, 160, 311 447, 12, 13, 161, 227, 12, 13, 446, 198, 227, 312 10, 162, 227, 320, 209, 227, 462, 384, 228, 663, 313 462, 626, 625, 228, 55, 460, 228, 155, 184, 228, 314 203, 628, 205, 633, 199, 200, 108, 632, 204, 12, 315 13, 222, 393, 12, 13, 86, 214, 216, 218, 90, 316 604, 239, 175, 10, 449, 194, 233, 88, 153, 12, 317 13, 176, 661, 213, 213, 213, 213, 288, 155, 282, 318 282, 601, 282, 537, 417, 177, 445, 280, 10, 176, 319 621, 528, 295, 163, 164, 165, 166, 167, 168, 169, 320 170, 227, 417, 177, 417, 301, 227, 227, 594, 227, 321 485, 88, 12, 13, 185, 228, 417, 524, 48, 308, 322 228, 228, 416, 228, 202, 347, 516, 90, 472, 448, 323 405, 428, 10, 242, 349, 171, 298, 12, 13, 345, 324 343, 341, 227, 581, 507, 330, 344, 507, 182, 508, 325 519, 397, 508, 348, 116, 175, 228, 367, 227, 334, 326 464, 227, 227, 360, 227, 129, 325, 355, 371, 210, 327 346, 90, 228, 175, 353, 228, 228, 362, 228, 182, 328 183, 12, 13, 54, 435, 314, 173, 10, 342, 358, 329 340, 13, 340, 340, 91, 379, 188, 378, 325, 380, 330 376, 331, 365, 375, 176, 623, 369, 394, 505, 417, 331 408, 183, 610, 163, 170, 12, 13, 605, 177, 410, 332 227, 227, 415, 238, 409, 118, 118, 602, 575, 126, 333 227, 569, 559, 331, 228, 228, 12, 13, 466, 465, 334 391, 444, 327, 443, 228, 437, 425, 12, 13, 254, 335 413, 388, 255, 256, 257, 258, 259, 260, 261, 262, 336 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 337 273, 274, 129, 129, 277, 227, 440, 383, 370, 173, 338 366, 294, 359, 491, 227, 424, 411, 442, 175, 228, 339 10, 455, 493, 333, 454, 436, 100, 492, 228, 300, 340 99, 84, 10, 509, 176, 481, 282, 512, 474, 20, 341 657, 282, 656, 655, 499, 495, 614, 227, 177, 503, 342 654, 484, 10, 227, 340, 340, 234, 515, 520, 521, 343 646, 228, 620, 617, 227, 340, 608, 228, 221, 12, 344 13, 607, 511, 129, 526, 430, 433, 69, 228, 518, 345 227, 12, 13, 598, 597, 129, 596, 293, 96, 494, 346 525, 593, 583, 563, 228, 529, 98, 490, 540, 532, 347 94, 12, 13, 523, 514, 513, 510, 560, 538, 558, 348 97, 95, 330, 323, 329, 539, 497, 496, 175, 483, 349 555, 477, 227, 476, 10, 473, 441, 562, 432, 421, 350 227, 372, 297, 386, 565, 615, 228, 491, 491, 606, 351 571, 573, 173, 92, 228, 403, 493, 493, 176, 10, 352 403, 492, 492, 340, 574, 340, 197, 554, 10, 114, 353 457, 340, 177, 434, 340, 572, 580, 439, 10, 578, 354 354, 591, 592, 12, 13, 253, 588, 568, 251, 180, 355 340, 197, 586, 587, 110, 533, 197, 609, 535, 197, 356 432, 348, 197, 107, 117, 382, 70, 502, 12, 13, 357 287, 7, 5, 102, 432, 211, 24, 12, 13, 129, 358 16, 19, 227, 494, 494, 651, 129, 12, 13, 431, 359 456, 490, 490, 364, 429, 561, 228, 335, 282, 207, 360 206, 618, 175, 129, 129, 624, 622, 120, 481, 491, 361 121, 125, 173, 636, 631, 630, 188, 619, 493, 21, 362 340, 638, 305, 492, 642, 340, 643, 306, 641, 336, 363 57, 351, 352, 640, 93, 644, 252, 645, 197, 176, 364 26, 340, 512, 197, 197, 28, 197, 76, 158, 387, 365 157, 666, 653, 177, 582, 390, 159, 491, 530, 156, 366 498, 658, 579, 662, 418, 534, 493, 31, 22, 15, 367 664, 492, 23, 665, 122, 122, 201, 18, 340, 197, 368 668, 3, 123, 554, 667, 494, 340, 8, 9, 282, 369 4, 2, 1, 490, 451, 197, 215, 544, 197, 197, 370 56, 197, 89, 566, 545, 548, 549, 612, 488, 323, 371 249, 531, 189, 105, 105, 112, 115, 80, 81, 576, 372 577, 329, 438, 175, 119, 119, 173, 72, 119, 71, 373 237, 478, 340, 494, 149, 340, 403, 316, 589, 403, 374 403, 490, 220, 326, 150, 244, 649, 197, 151, 141, 375 142, 143, 144, 145, 146, 147, 148, 197, 197, 629, 376 650, 127, 17, 450, 595, 399, 319, 197, 25, 89, 377 27, 36, 37, 78, 471, 281, 49, 66, 111, 39, 378 38, 35, 124, 279, 278, 105, 149, 83, 79, 10, 379 105, 73, 217, 112, 82, 113, 150, 247, 504, 616, 380 151, 232, 506, 87, 188, 145, 146, 147, 148, 0, 381 0, 0, 197, 0, 223, 0, 0, 0, 196, 235, 382 197, 197, 240, 128, 231, 0, 0, 0, 634, 635, 383 236, 0, 0, 0, 0, 639, 77, 0, 12, 13, 384 225, 0, 0, 0, 292, 647, 648, 173, 0, 0, 385 403, 0, 0, 0, 197, 0, 0, 0, 0, 0, 386 197, 0, 541, 0, 543, 0, 552, 56, 0, 0, 387 556, 197, 0, 557, 0, 0, 0, 347, 0, 0, 388 0, 0, 119, 119, 0, 0, 349, 197, 0, 567, 389 0, 345, 343, 341, 0, 0, 0, 0, 344, 0, 390 0, 311, 357, 0, 0, 348, 312, 313, 105, 315, 391 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 392 0, 0, 346, 0, 0, 56, 0, 0, 613, 197, 393 275, 276, 0, 283, 247, 56, 247, 197, 0, 0, 394 342, 0, 363, 13, 197, 197, 0, 0, 0, 0, 395 0, 0, 0, 0, 0, 0, 0, 0, 0, 599, 396 0, 377, 134, 149, 603, 152, 0, 135, 139, 140, 397 0, 0, 138, 150, 137, 136, 133, 151, 141, 142, 398 143, 144, 145, 146, 147, 148, 0, 0, 0, 0, 399 0, 0, 0, 0, 0, 0, 0, 422, 0, 0, 400 0, 361, 0, 0, 414, 0, 0, 0, 0, 0, 401 407, 0, 0, 368, 0, 0, 89, 637, 0, 197, 402 419, 420, 552, 0, 0, 0, 0, 0, 0, 347, 403 426, 0, 0, 463, 0, 0, 0, 357, 349, 0, 404 0, 0, 105, 345, 343, 341, 197, 0, 0, 105, 405 344, 0, 0, 112, 0, 486, 247, 348, 0, 0, 406 0, 0, 0, 0, 0, 0, 134, 149, 0, 152, 407 0, 135, 139, 140, 346, 407, 138, 150, 137, 136, 408 133, 151, 141, 142, 143, 144, 145, 146, 147, 148, 409 0, 0, 342, 0, 197, 13, 0, 0, 0, 0, 410 56, 56, 0, 0, 0, 396, 0, 0, 119, 0, 411 119, 0, 0, 0, 0, 0, 0, 311, 536, 0, 412 119, 0, 247, 522, 0, 0, 0, 0, 0, 0, 413 0, 547, 551, 0, 527, 0, 0, 475, 0, 0, 414 357, 0, 0, 463, 482, 0, 0, 463, 0, 0, 415 0, 0, 564, 357, 0, 0, 0, 0, 0, 0, 416 0, 275, 276, 0, 0, 0, 0, 0, 307, 0, 417 68, 0, 247, 41, 0, 78, 47, 42, 0, 0, 418 44, 56, 40, 50, 124, 43, 45, 53, 0, 83, 419 79, 10, 570, 0, 46, 52, 82, 51, 32, 30, 420 0, 0, 0, 65, 0, 0, 0, 0, 0, 0, 421 0, 0, 0, 0, 0, 0, 60, 61, 0, 64, 422 58, 0, 0, 59, 0, 0, 67, 0, 0, 0, 423 0, 0, 0, 0, 308, 0, 62, 63, 77, 0, 424 12, 13, 0, 0, 0, 0, 0, 0, 0, 0, 425 0, 29, 105, 68, 247, 0, 41, 0, 78, 47, 426 42, 0, 56, 44, 0, 40, 50, 33, 43, 45, 427 53, 0, 83, 79, 10, 0, 0, 46, 52, 82, 428 51, 32, 30, 0, 0, 547, 65, 0, 551, 357, 429 0, 0, 463, 0, 0, 0, 357, 0, 357, 60, 430 61, 0, 64, 58, 0, 0, 59, 0, 68, 67, 431 0, 0, 0, 78, 0, 0, 0, 0, 0, 62, 432 63, 77, 124, 12, 13, 0, 0, 83, 79, 10, 433 68, 0, 0, 0, 82, 78, 0, 0, 0, 0, 434 0, 65, 0, 0, 124, 0, 0, 0, 0, 83, 435 79, 10, 0, 0, 60, 61, 82, 64, 58, 0, 436 0, 59, 0, 68, 67, 0, 0, 0, 78, 0, 437 0, 0, 404, 0, 62, 63, 77, 124, 12, 13, 438 0, 0, 83, 79, 10, 0, 67, 0, 0, 82, 439 0, 0, 0, 0, 0, 0, 65, 0, 77, 0, 440 12, 13, 0, 0, 0, 0, 0, 0, 0, 60, 441 61, 0, 64, 58, 0, 0, 59, 0, 68, 67, 442 0, 0, 0, 78, 0, 0, 0, 590, 0, 62, 443 63, 77, 124, 12, 13, 0, 0, 83, 79, 10, 444 0, 501, 0, 0, 82, 0, 0, 0, 0, 0, 445 0, 65, 0, 0, 0, 0, 0, 0, 0, 0, 446 0, 0, 0, 0, 60, 61, 0, 64, 58, 0, 447 0, 59, 0, 68, 67, 0, 0, 0, 78, 0, 448 0, 0, 0, 0, 62, 63, 77, 124, 12, 13, 449 0, 0, 83, 79, 10, 0, 500, 0, 0, 82, 450 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 451 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 452 61, 0, 64, 58, 0, 0, 59, 0, 68, 67, 453 0, 0, 0, 78, 0, 0, 0, 78, 0, 62, 454 63, 77, 124, 12, 13, 0, 124, 83, 79, 10, 455 0, 83, 79, 10, 82, 0, 395, 0, 82, 0, 456 0, 179, 0, 0, 0, 232, 0, 0, 0, 0, 457 0, 68, 0, 0, 60, 61, 78, 64, 178, 0, 458 0, 59, 196, 0, 67, 124, 0, 0, 489, 0, 459 83, 79, 10, 0, 62, 63, 77, 82, 12, 13, 460 77, 0, 12, 13, 179, 0, 0, 0, 0, 0, 461 0, 0, 0, 0, 0, 0, 0, 60, 61, 0, 462 64, 178, 0, 0, 59, 0, 68, 67, 289, 0, 463 0, 78, 0, 0, 0, 0, 0, 62, 63, 77, 464 124, 12, 13, 0, 0, 83, 79, 10, 0, 284, 465 0, 0, 82, 0, 0, 0, 0, 0, 0, 65, 466 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 467 0, 0, 60, 61, 78, 64, 58, 187, 0, 59, 468 0, 0, 67, 124, 0, 0, 0, 0, 83, 79, 469 10, 0, 62, 63, 77, 82, 12, 13, 0, 0, 470 0, 0, 65, 0, 0, 0, 0, 0, 0, 0, 471 0, 0, 68, 0, 0, 60, 61, 78, 64, 58, 472 0, 0, 59, 0, 0, 67, 124, 0, 0, 0, 473 0, 83, 79, 10, 0, 62, 63, 77, 82, 12, 474 13, 0, 0, 0, 0, 65, 0, 0, 0, 0, 475 0, 0, 0, 0, 0, 68, 0, 0, 60, 61, 476 78, 64, 58, 0, 0, 59, 0, 0, 67, 124, 477 0, 0, 0, 0, 83, 79, 10, 0, 62, 63, 478 77, 82, 12, 13, 0, 0, 0, 0, 179, 0, 479 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 480 0, 60, 61, 299, 64, 178, 0, 0, 59, 0, 481 0, 67, 124, 0, 0, 0, 0, 83, 79, 10, 482 0, 62, 63, 77, 82, 12, 13, 0, 0, 0, 483 0, 65, 0, 0, 0, 0, 0, 0, 0, 0, 484 0, 0, 0, 0, 60, 61, 78, 64, 58, 0, 485 0, 59, 0, 0, 67, 124, 0, 0, 0, 0, 486 83, 79, 10, 0, 62, 63, 77, 82, 12, 13, 487 0, 78, 0, 0, 232, 0, 0, 0, 0, 0, 488 124, 0, 0, 0, 0, 83, 79, 10, 0, 0, 489 0, 196, 82, 0, 0, 0, 0, 231, 0, 232, 490 0, 0, 0, 224, 0, 0, 0, 0, 0, 77, 491 0, 12, 13, 225, 0, 0, 196, 0, 0, 0, 492 0, 0, 231, 0, 0, 0, 0, 0, 0, 0, 493 0, 0, 0, 0, 77, 0, 12, 13, 427, 134, 494 149, 0, 152, 0, 135, 139, 140, 0, 0, 138, 495 150, 137, 136, 133, 151, 141, 142, 143, 144, 145, 496 146, 147, 148, 134, 149, 0, 152, 0, 135, 139, 497 140, 0, 660, 138, 150, 137, 136, 133, 151, 141, 498 142, 143, 144, 145, 146, 147, 148, 0, 78, 0, 499 0, 250, 78, 0, 0, 0, 659, 124, 0, 0, 500 0, 124, 83, 79, 10, 0, 83, 79, 10, 82, 501 0, 0, 0, 82, 299, 0, 232, 0, 0, 0, 502 232, 0, 0, 124, 0, 0, 0, 0, 83, 79, 503 10, 0, 0, 196, 0, 82, 0, 196, 0, 231, 504 0, 0, 232, 231, 0, 0, 0, 78, 0, 0, 505 0, 77, 0, 12, 13, 77, 124, 12, 13, 196, 506 0, 83, 79, 10, 0, 231, 0, 0, 82, 78, 507 0, 0, 0, 347, 0, 406, 0, 77, 124, 12, 508 13, 0, 349, 83, 79, 10, 0, 345, 343, 553, 509 82, 0, 196, 0, 344, 0, 0, 190, 412, 0, 510 0, 348, 0, 0, 0, 0, 0, 0, 0, 0, 511 77, 0, 12, 13, 196, 0, 0, 0, 346, 0, 512 195, 0, 0, 0, 0, 0, 0, 0, 347, 0, 513 0, 0, 77, 0, 12, 13, 342, 349, 12, 13, 514 0, 0, 345, 343, 341, 0, 0, 0, 347, 344, 515 0, 0, 0, 0, 0, 0, 453, 349, 0, 0, 516 0, 0, 345, 343, 341, 0, 0, 0, 0, 344, 517 0, 0, 0, 346, 0, 0, 348, 0, 0, 452, 518 0, 0, 0, 130, 0, 0, 0, 0, 0, 0, 519 0, 342, 0, 346, 13, 0, 0, 0, 0, 0, 520 0, 0, 0, 0, 0, 350, 0, 0, 0, 0, 521 0, 342, 134, 149, 13, 152, 132, 135, 139, 140, 522 0, 131, 138, 150, 137, 136, 133, 151, 141, 142, 523 143, 144, 145, 146, 147, 148, 134, 149, 0, 152, 524 0, 135, 139, 140, 0, 0, 138, 150, 137, 136, 525 133, 151, 141, 142, 143, 144, 145, 146, 147, 148, 526 134, 149, 0, 0, 0, 135, 139, 140, 0, 0, 527 138, 150, 137, 136, 133, 151, 141, 142, 143, 144, 528 145, 146, 147, 148, 134, 149, 0, 0, 0, 135, 529 139, 140, 0, 0, 138, 150, 137, 136, 0, 151, 530 141, 142, 143, 144, 145, 146, 147, 148, 149, 0, 531 0, 0, 135, 139, 140, 0, 0, 138, 150, 137, 532 136, 0, 151, 141, 142, 143, 144, 145, 146, 147, 533 148, 534 } 535 var yyPact = [...]int{ 536 537 -1000, -1000, 536, 535, -1000, 128, -1000, 545, 549, 336, 538 -1000, -1000, -1000, 605, -1000, -1000, 541, 1239, 328, 85, 539 -1000, 220, 438, 327, -1000, 323, -1000, -1000, -1000, -1000, 540 503, 493, 484, 459, -1000, -1000, -1000, -1000, -1000, 177, 541 -1000, 128, 128, 1316, 1316, 128, 1698, -1000, 2168, 92, 542 -1000, -1000, -1000, -1000, -1000, -1000, -1000, 39, 1698, 1698, 543 1698, 1698, 1698, 1698, 1698, 1698, 157, 1741, -1000, -1000, 544 -1000, 479, 233, -1000, -1000, -1000, 202, 1655, 2050, 36, 545 -1000, -1000, 233, 233, -1000, -1000, 153, 535, -1000, 586, 546 585, 40, 194, -1000, 540, -11, -11, -11, 17, -1000, 547 -1000, -1000, 367, 1827, -1000, -1000, -1000, 355, 754, -1000, 548 252, 1973, -1000, 155, 1969, 478, -1000, -1000, -1000, -1000, 549 -1000, -1000, 39, -1000, 475, -1000, -1000, -1000, -23, 2192, 550 1698, -1000, -1000, 1698, 1698, 1698, 1698, 1698, 1698, 1698, 551 1698, 1698, 1698, 1698, 1698, 1698, 1698, 1698, 1698, 1698, 552 1698, 1698, 1698, 1698, 1698, 1698, 1612, 1698, 524, 1698, 553 1557, 387, 1698, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 554 -1000, -1000, 431, 2192, -1000, -1000, -1000, -1000, 1741, 1784, 555 1698, -1000, -1000, -1000, 1156, -1000, 24, 22, 2192, -1000, 556 1973, -1000, -1000, -1000, -1000, 1973, 1973, 211, 1973, 27, 557 263, 320, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 558 -1000, 583, 1010, -1000, 2129, 1010, -1000, 155, 470, 128, 559 309, -1000, -1000, 187, 1698, 128, -1000, -1000, -1000, -1000, 560 -1000, 1973, 574, 307, -1000, 181, 1698, 305, -1000, -1000, 561 -1000, -1000, 1156, 430, -13, -1000, -1000, 1969, -1000, -1000, 562 1973, 1969, 1156, 1969, 2192, 2240, 2263, 689, 689, 689, 563 689, 689, 689, 741, 741, 741, 741, -1000, -1000, -1000, 564 -1000, -1000, -1000, -1000, 2216, -23, -23, 2192, -1000, 519, 565 304, -1000, -1000, 51, 1698, -1000, 278, -1000, -1000, -1000, 566 66, -1000, -1000, 1514, 1022, 174, 1294, 152, -1000, 2028, 567 918, 1294, 143, -1000, -1000, -1000, -1000, -1000, -1000, 1973, 568 1973, -1000, 428, -1000, 128, 13, 273, -1000, -1000, 1852, 569 580, 525, 463, -1000, -1000, 210, 272, -1000, -1000, 467, 570 -1000, 539, 425, 197, -1000, 270, 268, -1000, -1000, -1000, 571 -1000, -1000, 103, 28, 151, 86, 1010, 2109, 571, 460, 572 65, 184, 266, 265, 128, -6, -1000, 206, 424, 128, 573 1698, -23, -1000, 422, 1973, 420, 128, 1698, -23, 418, 574 128, 131, 1518, 1969, -1000, -1000, -1000, -1000, 416, -1000, 575 415, -1000, -1000, 1698, 1459, 1404, 2192, 521, 1698, 229, 576 519, 405, -14, 1741, 404, 403, -1000, 1698, 147, -17, 577 -1000, -1000, 173, 2192, -1000, -1000, 1995, -1000, -1000, -1000, 578 -1000, -1000, 1973, 402, -1000, 138, -1000, 1156, 1156, -1000, 579 -1000, -1000, -1000, 1973, 112, 31, 580, 128, -1000, -1000, 580 398, 539, 210, 580, 539, 128, 104, 231, -1000, 1969, 581 397, -1000, -1000, -1000, -1000, 1010, 10, 1010, 128, 2054, 582 -1000, -1000, 514, 1010, -1000, -1000, 1010, 128, 259, -1000, 583 69, -1000, 581, -1000, 65, -1000, -1000, 392, -22, 128, 584 128, 580, 1010, -1000, -1000, -23, -1000, -1000, 258, -1000, 585 -1000, 754, -23, -1000, -1000, -1000, 440, -1000, -1000, 1969, 586 -1000, -1000, -1000, -1000, -1000, -1000, 1518, 1518, 1156, 255, 587 1698, 1698, -1000, -1000, -1000, -1000, -1000, 1741, 166, -1000, 588 -1000, 391, -1000, -1000, -1000, -1, -1000, 1294, -1000, 1349, 589 1294, 1294, 390, -1000, -1000, -1000, 129, -1000, -1000, -1000, 590 -1000, -1000, 580, 385, -1000, 383, -1000, -1000, -1000, 382, 591 -1000, -1000, 1010, 2, 102, 254, -1000, 1010, 81, 244, 592 -1000, 439, -1000, -1000, -1000, 370, -1000, -1000, 365, -1000, 593 497, -1000, 239, 858, 435, -1000, -1000, 580, 362, 128, 594 181, 1969, 361, -1000, 111, 1698, 2192, 2192, 226, 1156, 595 55, -1000, -1000, -1000, -1000, 1698, -1000, -1000, -1000, 2192, 596 -1000, 68, 64, -1000, -1000, -1000, 580, 580, 1518, -1000, 597 1010, -1000, 128, 580, -1000, 2054, 128, -1000, 858, 69, 598 -1000, -1000, -1000, 128, -1000, 128, -1000, -1000, -1000, 359, 599 -1000, -1000, -1000, -1000, 236, -1000, 1698, 1698, 1741, 560, 600 1, 1294, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 601 -1000, 349, -1000, 342, 341, 339, 1518, 1919, 1895, -1000, 602 -1000, 141, -1000, 50, 858, -1000, -1000, 858, -1000, -1000, 603 -1000, -1000, -1000, -1000, -1000, -1000, 1698, 519, -1000, 604 } 605 var yyPgo = [...]int{ 606 607 0, 51, 793, 672, 34, 221, 32, 700, 31, 792, 608 788, 1, 76, 113, 208, 16, 25, 3, 785, 782, 609 781, 774, 773, 771, 7, 770, 617, 30, 24, 769, 610 437, 45, 47, 273, 41, 19, 768, 554, 20, 620, 611 767, 556, 765, 762, 12, 761, 124, 760, 40, 13, 612 758, 46, 4, 2, 28, 756, 766, 755, 10, 18, 613 752, 751, 26, 750, 749, 736, 15, 35, 735, 733, 614 38, 732, 29, 727, 612, 48, 21, 721, 720, 719, 615 717, 42, 712, 708, 707, 9, 84, 702, 14, 698, 616 0, 67, 49, 22, 6, 23, 17, 8, 697, 5, 617 37, 11, 696, 695, 694, 687, 406, 36, 686, 33, 618 27, 684, 682, 681, 680, 677, 671, 50, 44, 667, 619 43, 666, 58, 662, 659, 658, 657, 654, 652, 650, 620 649, 646, 645, 644, 641, 640, 639, 638, 39, 637, 621 626, 624, 622 } 623 var yyR1 = [...]int{ 624 625 0, 112, 114, 114, 116, 113, 115, 115, 119, 119, 626 119, 120, 120, 121, 121, 2, 2, 2, 117, 123, 627 123, 124, 118, 50, 50, 50, 50, 50, 74, 74, 628 74, 74, 74, 74, 74, 74, 74, 74, 126, 70, 629 70, 70, 75, 75, 76, 76, 76, 36, 48, 44, 630 44, 44, 44, 44, 44, 9, 9, 9, 9, 127, 631 11, 128, 10, 62, 62, 129, 53, 42, 42, 42, 632 22, 22, 22, 21, 130, 23, 24, 24, 131, 132, 633 133, 25, 134, 63, 64, 64, 65, 65, 135, 136, 634 45, 137, 43, 14, 14, 14, 14, 14, 14, 14, 635 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 636 14, 14, 14, 14, 46, 46, 46, 46, 46, 46, 637 46, 46, 46, 41, 41, 41, 40, 40, 40, 40, 638 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 639 49, 28, 16, 16, 15, 15, 39, 39, 17, 17, 640 31, 1, 1, 33, 34, 37, 37, 3, 3, 3, 641 91, 91, 30, 29, 81, 81, 7, 7, 7, 7, 642 7, 7, 32, 32, 32, 32, 87, 87, 87, 87, 643 87, 79, 79, 80, 89, 89, 89, 89, 89, 12, 644 12, 88, 88, 88, 88, 88, 88, 88, 85, 86, 645 84, 84, 83, 83, 47, 18, 18, 19, 19, 90, 646 51, 51, 52, 52, 52, 139, 20, 20, 60, 60, 647 71, 71, 77, 77, 78, 78, 73, 73, 69, 69, 648 72, 72, 72, 72, 72, 72, 4, 4, 13, 27, 649 27, 27, 82, 8, 8, 8, 8, 68, 68, 67, 650 67, 6, 6, 6, 6, 6, 26, 26, 26, 26, 651 26, 140, 26, 26, 26, 26, 26, 26, 26, 26, 652 66, 66, 55, 55, 54, 54, 56, 56, 59, 59, 653 57, 57, 57, 57, 58, 58, 122, 122, 138, 138, 654 35, 35, 61, 61, 38, 38, 101, 101, 105, 105, 655 103, 103, 5, 5, 141, 141, 141, 141, 141, 141, 656 92, 108, 106, 106, 106, 111, 111, 107, 107, 107, 657 107, 107, 107, 107, 107, 107, 107, 107, 110, 109, 658 95, 95, 97, 96, 96, 99, 99, 98, 98, 94, 659 94, 94, 93, 93, 125, 125, 100, 100, 104, 104, 660 102, 102, 661 } 662 var yyR2 = [...]int{ 663 664 0, 4, 0, 3, 0, 3, 0, 3, 2, 5, 665 3, 3, 2, 1, 3, 1, 2, 2, 4, 0, 666 1, 0, 4, 0, 1, 1, 1, 1, 2, 5, 667 3, 2, 5, 7, 3, 2, 5, 3, 1, 2, 668 4, 3, 4, 3, 1, 2, 1, 1, 2, 1, 669 3, 3, 3, 2, 2, 3, 5, 5, 2, 0, 670 4, 0, 3, 0, 2, 0, 4, 4, 4, 2, 671 5, 1, 1, 2, 0, 3, 1, 3, 0, 0, 672 0, 8, 0, 5, 0, 2, 0, 2, 0, 0, 673 7, 0, 5, 1, 3, 3, 3, 3, 3, 3, 674 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 675 3, 3, 3, 3, 1, 2, 2, 2, 2, 2, 676 2, 2, 2, 3, 5, 6, 1, 1, 3, 5, 677 5, 4, 6, 8, 1, 5, 5, 5, 7, 1, 678 0, 3, 1, 4, 1, 4, 1, 3, 1, 1, 679 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 680 4, 4, 1, 1, 1, 2, 1, 1, 1, 1, 681 1, 3, 1, 1, 1, 2, 1, 1, 1, 1, 682 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 683 3, 4, 4, 2, 3, 5, 1, 1, 2, 3, 684 5, 3, 5, 3, 3, 5, 8, 5, 8, 5, 685 0, 3, 0, 1, 3, 1, 4, 2, 0, 3, 686 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 687 3, 2, 4, 3, 5, 5, 1, 3, 1, 2, 688 1, 3, 4, 1, 2, 2, 1, 1, 3, 0, 689 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 690 1, 0, 4, 1, 2, 2, 2, 2, 2, 2, 691 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 692 1, 1, 3, 3, 0, 2, 0, 1, 0, 1, 693 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 694 0, 1, 0, 1, 4, 4, 5, 6, 4, 4, 695 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 696 4, 5, 4, 4, 2, 2, 4, 3, 3, 5, 697 3, 4, 3, 5, 1, 0, 1, 3, 1, 1, 698 2, 1, 1, 5, 0, 2, 1, 3, 1, 3, 699 1, 3, 700 } 701 var yyChk = [...]int{ 702 703 -1000, -112, -113, -116, -114, 26, -117, 26, -115, -3, 704 25, -91, 74, 75, -118, -124, 25, -60, -119, 22, 705 63, 4, -125, -123, 25, -50, -74, -47, -26, 2, 706 33, -126, 32, 18, -44, -23, -45, -43, -25, -29, 707 16, 7, 11, 19, 14, 20, 28, 10, -14, -56, 708 17, 31, 29, 21, -33, -46, -3, -39, 54, 57, 709 50, 51, 70, 71, 53, 37, -40, 60, 4, -30, 710 -41, -79, -80, -20, -90, -88, -139, 72, 9, 24, 711 -84, -83, 30, 23, 63, -120, 60, -2, 4, -3, 712 64, 64, 65, -141, 22, 33, 10, 32, 18, 63, 713 63, -70, 60, -54, -34, -3, -75, 60, -54, -48, 714 60, -36, -3, -18, 60, -3, 67, -37, -33, -3, 715 -37, -41, -39, -3, 18, -41, -33, -61, -56, -14, 716 5, 43, 38, 48, 34, 39, 47, 46, 44, 40, 717 41, 50, 51, 52, 53, 54, 55, 56, 57, 35, 718 45, 49, 37, 66, 6, 76, -130, -135, -137, -131, 719 60, 64, 72, -46, -46, -46, -46, -46, -46, -46, 720 -46, 68, -17, -14, -32, -86, -90, -88, 54, 37, 721 60, -1, 36, 68, -1, 2, -35, 12, -14, -87, 722 37, -90, -88, -85, -12, 60, 54, -30, 72, -1, 723 -1, -121, 61, -120, -117, -118, 4, 4, 25, 74, 724 65, 25, -92, -91, -92, -108, -92, -19, -92, 60, 725 -71, 61, -70, -7, 66, 76, -86, -90, -88, -85, 726 -12, 60, 37, -75, 61, -7, 66, -78, 61, -48, 727 -7, -51, 68, -67, -68, -8, -31, -3, -81, -7, 728 12, 60, -140, 60, -14, -14, -14, -14, -14, -14, 729 -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, 730 -14, -14, -14, -14, -14, -56, -56, -14, -21, -22, 731 -38, -42, -44, -56, 27, -24, -38, 36, -24, 61, 732 -59, -17, -3, 60, -14, -35, -49, 61, -32, 9, 733 -14, -49, -66, -6, -11, -74, -26, 2, 68, 73, 734 73, -7, -7, -7, 64, -7, -73, 69, -72, -55, 735 -13, 60, 54, -33, -4, 25, -69, 69, -27, -33, 736 -4, 60, -122, 63, -118, 4, -106, -107, -110, -109, 737 -91, 25, 72, 24, 30, 23, 54, 9, 37, 18, 738 66, -106, -106, -51, 60, -100, -95, -3, -122, 63, 739 66, -56, -34, -7, 9, -122, 63, 66, -56, -122, 740 63, -66, 61, 76, -138, -31, -81, -7, -67, -6, 741 -67, -53, 36, 63, 66, 6, -14, -136, 63, -62, 742 -132, -138, 12, 76, -17, 32, 73, 67, -58, -57, 743 -28, -16, -15, -14, 68, 68, 37, -7, -90, -88, 744 -85, -12, 60, -138, 76, -58, 69, 63, -127, -7, 745 -7, 61, -3, 73, -122, 63, -7, 76, -5, 4, 746 -13, 54, 25, -13, 60, 64, -122, 63, -82, 60, 747 -4, 61, -120, 63, 63, 73, 4, 72, 68, 68, 748 -106, -111, 60, 37, -107, -109, 9, 60, -93, -94, 749 60, 4, 51, -3, 66, 63, 63, -101, -100, 61, 750 76, -106, 12, 61, -70, -56, 61, 61, -77, -76, 751 -75, -54, -56, 61, -48, 69, -3, -52, -89, 60, 752 -86, -90, -88, -85, -12, -8, 61, 61, -129, -38, 753 27, 27, 36, -38, -10, 69, -9, 8, 13, -53, 754 61, -138, -17, 61, 61, -35, 69, 76, -138, 67, 755 -49, -49, -7, 61, 69, -6, -66, -7, 69, -72, 756 -5, -33, 61, -13, -5, -13, -3, 69, -27, -67, 757 61, -106, 73, -106, -105, -104, -97, -3, -103, -102, 758 -96, -3, -106, 25, -91, -110, -106, -106, -101, 63, 759 -94, 4, -93, 61, -3, -95, -5, -106, -122, 63, 760 -7, 60, -67, -52, -66, 63, -14, -14, -62, -128, 761 -59, 67, -133, 61, 73, 67, -28, -16, -15, -14, 762 68, -58, -58, 61, 69, -5, 61, 61, 61, -106, 763 73, 69, 63, -106, 69, 63, 60, 61, 61, 50, 764 63, -99, -98, 60, -106, 60, -5, 61, -76, -67, 765 61, 69, -38, 69, -66, 67, 66, 6, 76, -64, 766 -35, -49, 69, 69, -5, -5, -52, -106, -97, -5, 767 -96, -101, -99, -94, -101, -101, 61, -14, -14, -65, 768 -63, 15, 73, -58, 61, 61, 61, 61, -52, 67, 769 67, 21, -11, 69, -99, -99, -134, -24, -53, 770 } 771 var yyDef = [...]int{ 772 773 4, -2, 2, 0, 6, 0, 21, 0, 218, 0, 774 157, 158, 159, 0, 5, 344, 19, -2, 0, 0, 775 3, 0, 0, 0, 20, 0, 24, 25, 26, 27, 776 0, 0, 0, 0, 256, 257, 258, 259, 260, 0, 777 263, 155, 155, 0, 0, 0, 292, 38, -2, 0, 778 74, 88, 91, 78, 163, 93, -2, 114, 0, 0, 779 0, 0, 0, 0, 0, 0, 146, 0, 126, 127, 780 134, 0, 0, 139, -2, -2, 0, 290, 0, 0, 781 196, 197, 0, 0, 7, 8, 0, 21, 15, 0, 782 0, 0, 0, 345, 0, 0, 0, 0, 0, 18, 783 219, 28, 0, 0, 274, 154, 31, 0, 0, 35, 784 0, 0, 47, 210, 249, 0, 261, 264, 156, 153, 785 265, -2, 0, 162, 0, -2, 268, 269, 293, 276, 786 0, 53, 54, 0, 0, 0, 0, 0, 0, 0, 787 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 788 0, 0, 0, 0, 0, 0, 294, 294, 0, 294, 789 0, 0, 290, 115, 116, 117, 118, 119, 120, 121, 790 122, 140, 0, 148, 149, 172, -2, -2, 0, 0, 791 0, 140, 151, 152, -2, 217, 0, 0, 291, 193, 792 0, 176, 177, 178, 179, 0, 0, 189, 0, 0, 793 0, 286, 10, 13, 21, 12, 16, 17, 160, 161, 794 22, 0, 0, 310, 0, 0, 311, 210, 0, 0, 795 286, 30, 220, 39, 0, 0, 166, 167, 168, 169, 796 170, 0, 0, 286, 34, 0, 0, 286, 37, 224, 797 48, 204, -2, 0, 288, 247, 243, 162, 246, 150, 798 164, 249, -2, 249, 50, 94, 95, 96, 97, 98, 799 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 800 109, 110, 111, 112, 113, 51, 52, 277, 75, 0, 801 71, 72, 295, 0, 0, 89, 76, 63, 79, 123, 802 288, 278, 128, 0, 291, 0, 284, 147, 175, 0, 803 288, 284, 0, 270, 252, 253, 254, 255, 59, 0, 804 0, 194, 0, 198, 0, 0, 286, 201, 226, 0, 805 302, 0, 0, 272, 238, -2, 286, 203, 228, 0, 806 240, 0, 0, 287, 11, 0, 0, 312, 313, 314, 807 317, 318, 0, 0, 0, 0, 0, 0, 0, 0, 808 0, 0, 0, 0, 296, 0, 346, 0, 0, 287, 809 0, 41, 275, 0, 0, 0, 287, 0, 43, 0, 810 287, 0, 212, 289, 250, 244, 245, 165, 0, 262, 811 0, 73, 65, 294, 0, 0, 69, 0, 294, 0, 812 0, 0, 288, 289, 0, 0, 131, 290, 0, 288, 813 280, 281, 0, -2, 140, 140, 0, 199, -2, -2, 814 -2, -2, 0, 0, 289, 0, 216, -2, -2, 191, 815 192, 180, 190, 0, 0, 287, 302, 0, 231, 303, 816 0, 0, 236, 302, 0, 0, 0, 287, 239, 249, 817 0, 9, 14, 304, 305, 0, 0, 0, 298, 300, 818 324, 325, 0, 0, 315, 316, 0, 296, 0, 342, 819 0, 339, 0, 341, 0, 308, 309, 0, 297, 0, 820 0, 302, 0, 29, 221, 40, 171, 32, 286, 222, 821 44, 46, 42, 36, 225, 211, 162, 209, 213, 249, 822 184, 185, 186, 187, 188, 248, 212, 212, -2, 0, 823 0, 0, 63, 77, 64, 92, 61, 0, 0, 80, 824 124, 0, 279, 129, 130, 0, 137, 289, 285, 0, 825 284, 284, 0, 135, 136, 271, 0, 195, 200, 227, 826 230, 273, 302, 0, 233, 0, 237, 202, 229, 0, 827 241, 319, 0, 0, 0, 299, 348, 0, 0, 301, 828 350, 0, 334, -2, -2, 0, 327, 328, 0, 306, 829 0, 340, 0, 335, 0, 347, 330, 302, 0, 287, 830 45, 249, 0, 205, 0, 294, 67, 68, 0, -2, 831 0, 58, 84, 125, 132, 290, 282, 283, 141, 144, 832 140, 0, 0, -2, 60, 232, 302, 302, 212, 320, 833 0, 322, 0, 302, 323, 0, 296, 326, 335, 0, 834 307, 207, 336, 296, 338, 296, 331, 33, 223, 0, 835 214, 66, 70, 90, 62, 55, 0, 0, 0, 86, 836 0, 284, -2, 138, 234, 235, 242, 321, 349, 332, 837 351, 0, 329, 0, 0, 0, 212, 0, 0, 81, 838 85, 0, 133, 0, 335, 343, 337, 335, 206, 56, 839 57, 82, 87, 145, 333, 208, 294, 0, 83, 840 } 841 var yyTok1 = [...]int{ 842 843 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 844 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 845 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 846 3, 3, 3, 70, 3, 3, 65, 56, 57, 3, 847 60, 61, 54, 50, 76, 51, 64, 55, 3, 3, 848 3, 3, 3, 3, 3, 3, 3, 3, 67, 63, 849 3, 66, 3, 74, 75, 3, 3, 3, 3, 3, 850 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 851 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 852 3, 72, 3, 73, 53, 3, 3, 3, 3, 3, 853 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 854 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 855 3, 3, 3, 68, 52, 69, 71, 856 } 857 var yyTok2 = [...]int{ 858 859 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 860 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 861 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 862 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 863 42, 43, 44, 45, 46, 47, 48, 49, 58, 59, 864 62, 865 } 866 var yyTok3 = [...]int{ 867 0, 868 } 869 870 var yyErrorMessages = [...]struct { 871 state int 872 token int 873 msg string 874 }{ 875 {332, 76, "unexpected comma during import block"}, 876 {89, 63, "missing import path; require quoted string"}, 877 {390, 63, "missing { after if clause"}, 878 {387, 63, "missing { after switch clause"}, 879 {279, 63, "missing { after for clause"}, 880 {499, 36, "missing { after for clause"}, 881 {17, 68, "unexpected semicolon or newline before {"}, 882 {111, 63, "unexpected semicolon or newline in type declaration"}, 883 {78, 69, "unexpected } in channel type"}, 884 {78, 61, "unexpected ) in channel type"}, 885 {78, 76, "unexpected comma in channel type"}, 886 {417, 15, "unexpected semicolon or newline before else"}, 887 {329, 76, "name list not allowed in interface type"}, 888 {279, 33, "var declaration not allowed in for initializer"}, 889 {25, 68, "unexpected { at end of statement"}, 890 {371, 68, "unexpected { at end of statement"}, 891 {122, 63, "argument to go/defer must be function call"}, 892 {398, 63, "need trailing comma before newline in composite literal"}, 893 {415, 63, "need trailing comma before newline in composite literal"}, 894 {124, 25, "nested func not allowed"}, 895 {651, 63, "else must be followed by if or statement block"}, 896 } 897 898 //line yaccpar:1 899 900 /* parser for yacc output */ 901 902 var ( 903 yyDebug = 0 904 yyErrorVerbose = false 905 ) 906 907 type yyLexer interface { 908 Lex(lval *yySymType) int 909 Error(s string) 910 } 911 912 type yyParser interface { 913 Parse(yyLexer) int 914 Lookahead() int 915 } 916 917 type yyParserImpl struct { 918 lookahead func() int 919 } 920 921 func (p *yyParserImpl) Lookahead() int { 922 return p.lookahead() 923 } 924 925 func yyNewParser() yyParser { 926 p := &yyParserImpl{ 927 lookahead: func() int { return -1 }, 928 } 929 return p 930 } 931 932 const yyFlag = -1000 933 934 func yyTokname(c int) string { 935 if c >= 1 && c-1 < len(yyToknames) { 936 if yyToknames[c-1] != "" { 937 return yyToknames[c-1] 938 } 939 } 940 return __yyfmt__.Sprintf("tok-%v", c) 941 } 942 943 func yyStatname(s int) string { 944 if s >= 0 && s < len(yyStatenames) { 945 if yyStatenames[s] != "" { 946 return yyStatenames[s] 947 } 948 } 949 return __yyfmt__.Sprintf("state-%v", s) 950 } 951 952 func yyErrorMessage(state, lookAhead int) string { 953 const TOKSTART = 4 954 955 if !yyErrorVerbose { 956 return "syntax error" 957 } 958 959 for _, e := range yyErrorMessages { 960 if e.state == state && e.token == lookAhead { 961 return "syntax error: " + e.msg 962 } 963 } 964 965 res := "syntax error: unexpected " + yyTokname(lookAhead) 966 967 // To match Bison, suggest at most four expected tokens. 968 expected := make([]int, 0, 4) 969 970 // Look for shiftable tokens. 971 base := yyPact[state] 972 for tok := TOKSTART; tok-1 < len(yyToknames); tok++ { 973 if n := base + tok; n >= 0 && n < yyLast && yyChk[yyAct[n]] == tok { 974 if len(expected) == cap(expected) { 975 return res 976 } 977 expected = append(expected, tok) 978 } 979 } 980 981 if yyDef[state] == -2 { 982 i := 0 983 for yyExca[i] != -1 || yyExca[i+1] != state { 984 i += 2 985 } 986 987 // Look for tokens that we accept or reduce. 988 for i += 2; yyExca[i] >= 0; i += 2 { 989 tok := yyExca[i] 990 if tok < TOKSTART || yyExca[i+1] == 0 { 991 continue 992 } 993 if len(expected) == cap(expected) { 994 return res 995 } 996 expected = append(expected, tok) 997 } 998 999 // If the default action is to accept or reduce, give up. 1000 if yyExca[i+1] != 0 { 1001 return res 1002 } 1003 } 1004 1005 for i, tok := range expected { 1006 if i == 0 { 1007 res += ", expecting " 1008 } else { 1009 res += " or " 1010 } 1011 res += yyTokname(tok) 1012 } 1013 return res 1014 } 1015 1016 func yylex1(lex yyLexer, lval *yySymType) (char, token int) { 1017 token = 0 1018 char = lex.Lex(lval) 1019 if char <= 0 { 1020 token = yyTok1[0] 1021 goto out 1022 } 1023 if char < len(yyTok1) { 1024 token = yyTok1[char] 1025 goto out 1026 } 1027 if char >= yyPrivate { 1028 if char < yyPrivate+len(yyTok2) { 1029 token = yyTok2[char-yyPrivate] 1030 goto out 1031 } 1032 } 1033 for i := 0; i < len(yyTok3); i += 2 { 1034 token = yyTok3[i+0] 1035 if token == char { 1036 token = yyTok3[i+1] 1037 goto out 1038 } 1039 } 1040 1041 out: 1042 if token == 0 { 1043 token = yyTok2[1] /* unknown char */ 1044 } 1045 if yyDebug >= 3 { 1046 __yyfmt__.Printf("lex %s(%d)\n", yyTokname(token), uint(char)) 1047 } 1048 return char, token 1049 } 1050 1051 func yyParse(yylex yyLexer) int { 1052 return yyNewParser().Parse(yylex) 1053 } 1054 1055 func (yyrcvr *yyParserImpl) Parse(yylex yyLexer) int { 1056 var yyn int 1057 var yylval yySymType 1058 var yyVAL yySymType 1059 var yyDollar []yySymType 1060 yyS := make([]yySymType, yyMaxDepth) 1061 1062 Nerrs := 0 /* number of errors */ 1063 Errflag := 0 /* error recovery flag */ 1064 yystate := 0 1065 yychar := -1 1066 yytoken := -1 // yychar translated into internal numbering 1067 yyrcvr.lookahead = func() int { return yychar } 1068 defer func() { 1069 // Make sure we report no lookahead when not parsing. 1070 yystate = -1 1071 yychar = -1 1072 yytoken = -1 1073 }() 1074 yyp := -1 1075 goto yystack 1076 1077 ret0: 1078 return 0 1079 1080 ret1: 1081 return 1 1082 1083 yystack: 1084 /* put a state and value onto the stack */ 1085 if yyDebug >= 4 { 1086 __yyfmt__.Printf("char %v in %v\n", yyTokname(yytoken), yyStatname(yystate)) 1087 } 1088 1089 yyp++ 1090 if yyp >= len(yyS) { 1091 nyys := make([]yySymType, len(yyS)*2) 1092 copy(nyys, yyS) 1093 yyS = nyys 1094 } 1095 yyS[yyp] = yyVAL 1096 yyS[yyp].yys = yystate 1097 1098 yynewstate: 1099 yyn = yyPact[yystate] 1100 if yyn <= yyFlag { 1101 goto yydefault /* simple state */ 1102 } 1103 if yychar < 0 { 1104 yychar, yytoken = yylex1(yylex, &yylval) 1105 } 1106 yyn += yytoken 1107 if yyn < 0 || yyn >= yyLast { 1108 goto yydefault 1109 } 1110 yyn = yyAct[yyn] 1111 if yyChk[yyn] == yytoken { /* valid shift */ 1112 yychar = -1 1113 yytoken = -1 1114 yyVAL = yylval 1115 yystate = yyn 1116 if Errflag > 0 { 1117 Errflag-- 1118 } 1119 goto yystack 1120 } 1121 1122 yydefault: 1123 /* default state action */ 1124 yyn = yyDef[yystate] 1125 if yyn == -2 { 1126 if yychar < 0 { 1127 yychar, yytoken = yylex1(yylex, &yylval) 1128 } 1129 1130 /* look through exception table */ 1131 xi := 0 1132 for { 1133 if yyExca[xi+0] == -1 && yyExca[xi+1] == yystate { 1134 break 1135 } 1136 xi += 2 1137 } 1138 for xi += 2; ; xi += 2 { 1139 yyn = yyExca[xi+0] 1140 if yyn < 0 || yyn == yytoken { 1141 break 1142 } 1143 } 1144 yyn = yyExca[xi+1] 1145 if yyn < 0 { 1146 goto ret0 1147 } 1148 } 1149 if yyn == 0 { 1150 /* error ... attempt to resume parsing */ 1151 switch Errflag { 1152 case 0: /* brand new error */ 1153 yylex.Error(yyErrorMessage(yystate, yytoken)) 1154 Nerrs++ 1155 if yyDebug >= 1 { 1156 __yyfmt__.Printf("%s", yyStatname(yystate)) 1157 __yyfmt__.Printf(" saw %s\n", yyTokname(yytoken)) 1158 } 1159 fallthrough 1160 1161 case 1, 2: /* incompletely recovered error ... try again */ 1162 Errflag = 3 1163 1164 /* find a state where "error" is a legal shift action */ 1165 for yyp >= 0 { 1166 yyn = yyPact[yyS[yyp].yys] + yyErrCode 1167 if yyn >= 0 && yyn < yyLast { 1168 yystate = yyAct[yyn] /* simulate a shift of "error" */ 1169 if yyChk[yystate] == yyErrCode { 1170 goto yystack 1171 } 1172 } 1173 1174 /* the current p has no shift on "error", pop stack */ 1175 if yyDebug >= 2 { 1176 __yyfmt__.Printf("error recovery pops state %d\n", yyS[yyp].yys) 1177 } 1178 yyp-- 1179 } 1180 /* there is no state on the stack with an error shift ... abort */ 1181 goto ret1 1182 1183 case 3: /* no shift yet; clobber input char */ 1184 if yyDebug >= 2 { 1185 __yyfmt__.Printf("error recovery discards %s\n", yyTokname(yytoken)) 1186 } 1187 if yytoken == yyEofCode { 1188 goto ret1 1189 } 1190 yychar = -1 1191 yytoken = -1 1192 goto yynewstate /* try again in the same state */ 1193 } 1194 } 1195 1196 /* reduction by production yyn */ 1197 if yyDebug >= 2 { 1198 __yyfmt__.Printf("reduce %v in:\n\t%v\n", yyn, yyStatname(yystate)) 1199 } 1200 1201 yynt := yyn 1202 yypt := yyp 1203 _ = yypt // guard against "declared and not used" 1204 1205 yyp -= yyR2[yyn] 1206 // yyp is now the index of $0. Perform the default action. Iff the 1207 // reduced production is , $1 is possibly out of range. 1208 if yyp+1 >= len(yyS) { 1209 nyys := make([]yySymType, len(yyS)*2) 1210 copy(nyys, yyS) 1211 yyS = nyys 1212 } 1213 yyVAL = yyS[yyp+1] 1214 1215 /* consult goto table to find next state */ 1216 yyn = yyR1[yyn] 1217 yyg := yyPgo[yyn] 1218 yyj := yyg + yyS[yyp].yys + 1 1219 1220 if yyj >= yyLast { 1221 yystate = yyAct[yyg] 1222 } else { 1223 yystate = yyAct[yyj] 1224 if yyChk[yystate] != -yyn { 1225 yystate = yyAct[yyg] 1226 } 1227 } 1228 // dummy call; replaced with literal code 1229 switch yynt { 1230 1231 case 1: 1232 yyDollar = yyS[yypt-4 : yypt+1] 1233 //line go.y:189 1234 { 1235 xtop = concat(xtop, yyDollar[4].list) 1236 } 1237 case 2: 1238 yyDollar = yyS[yypt-0 : yypt+1] 1239 //line go.y:195 1240 { 1241 prevlineno = lineno 1242 Yyerror("package statement must be first") 1243 errorexit() 1244 } 1245 case 3: 1246 yyDollar = yyS[yypt-3 : yypt+1] 1247 //line go.y:201 1248 { 1249 mkpackage(yyDollar[2].sym.Name) 1250 } 1251 case 4: 1252 yyDollar = yyS[yypt-0 : yypt+1] 1253 //line go.y:211 1254 { 1255 importpkg = Runtimepkg 1256 1257 if Debug['A'] != 0 { 1258 cannedimports("runtime.Builtin", "package runtime\n\n$$\n\n") 1259 } else { 1260 cannedimports("runtime.Builtin", runtimeimport) 1261 } 1262 curio.importsafe = true 1263 } 1264 case 5: 1265 yyDollar = yyS[yypt-3 : yypt+1] 1266 //line go.y:223 1267 { 1268 importpkg = nil 1269 } 1270 case 11: 1271 yyDollar = yyS[yypt-3 : yypt+1] 1272 //line go.y:237 1273 { 1274 ipkg := importpkg 1275 my := importmyname 1276 importpkg = nil 1277 importmyname = nil 1278 1279 if my == nil { 1280 my = Lookup(ipkg.Name) 1281 } 1282 1283 pack := Nod(OPACK, nil, nil) 1284 pack.Sym = my 1285 pack.Name.Pkg = ipkg 1286 pack.Lineno = int32(yyDollar[1].i) 1287 1288 if strings.HasPrefix(my.Name, ".") { 1289 importdot(ipkg, pack) 1290 break 1291 } 1292 if my.Name == "init" { 1293 Yyerror("cannot import package as init - init must be a func") 1294 break 1295 } 1296 if my.Name == "_" { 1297 break 1298 } 1299 if my.Def != nil { 1300 lineno = int32(yyDollar[1].i) 1301 redeclare(my, "as imported package name") 1302 } 1303 my.Def = pack 1304 my.Lastlineno = int32(yyDollar[1].i) 1305 my.Block = 1 // at top level 1306 } 1307 case 12: 1308 yyDollar = yyS[yypt-2 : yypt+1] 1309 //line go.y:272 1310 { 1311 // When an invalid import path is passed to importfile, 1312 // it calls Yyerror and then sets up a fake import with 1313 // no package statement. This allows us to test more 1314 // than one invalid import statement in a single file. 1315 if nerrors == 0 { 1316 Fatal("phase error in import") 1317 } 1318 } 1319 case 15: 1320 yyDollar = yyS[yypt-1 : yypt+1] 1321 //line go.y:288 1322 { 1323 // import with original name 1324 yyVAL.i = parserline() 1325 importmyname = nil 1326 importfile(&yyDollar[1].val, yyVAL.i) 1327 } 1328 case 16: 1329 yyDollar = yyS[yypt-2 : yypt+1] 1330 //line go.y:295 1331 { 1332 // import with given name 1333 yyVAL.i = parserline() 1334 importmyname = yyDollar[1].sym 1335 importfile(&yyDollar[2].val, yyVAL.i) 1336 } 1337 case 17: 1338 yyDollar = yyS[yypt-2 : yypt+1] 1339 //line go.y:302 1340 { 1341 // import into my name space 1342 yyVAL.i = parserline() 1343 importmyname = Lookup(".") 1344 importfile(&yyDollar[2].val, yyVAL.i) 1345 } 1346 case 18: 1347 yyDollar = yyS[yypt-4 : yypt+1] 1348 //line go.y:311 1349 { 1350 if importpkg.Name == "" { 1351 importpkg.Name = yyDollar[2].sym.Name 1352 numImport[yyDollar[2].sym.Name]++ 1353 } else if importpkg.Name != yyDollar[2].sym.Name { 1354 Yyerror("conflicting names %s and %s for package %q", importpkg.Name, yyDollar[2].sym.Name, importpkg.Path) 1355 } 1356 importpkg.Direct = 1 1357 importpkg.Safe = curio.importsafe 1358 1359 if safemode != 0 && !curio.importsafe { 1360 Yyerror("cannot import unsafe package %q", importpkg.Path) 1361 } 1362 } 1363 case 20: 1364 yyDollar = yyS[yypt-1 : yypt+1] 1365 //line go.y:328 1366 { 1367 if yyDollar[1].sym.Name == "safe" { 1368 curio.importsafe = true 1369 } 1370 } 1371 case 21: 1372 yyDollar = yyS[yypt-0 : yypt+1] 1373 //line go.y:335 1374 { 1375 defercheckwidth() 1376 } 1377 case 22: 1378 yyDollar = yyS[yypt-4 : yypt+1] 1379 //line go.y:339 1380 { 1381 resumecheckwidth() 1382 unimportfile() 1383 } 1384 case 23: 1385 yyDollar = yyS[yypt-0 : yypt+1] 1386 //line go.y:348 1387 { 1388 Yyerror("empty top-level declaration") 1389 yyVAL.list = nil 1390 } 1391 case 25: 1392 yyDollar = yyS[yypt-1 : yypt+1] 1393 //line go.y:354 1394 { 1395 yyVAL.list = list1(yyDollar[1].node) 1396 } 1397 case 26: 1398 yyDollar = yyS[yypt-1 : yypt+1] 1399 //line go.y:358 1400 { 1401 Yyerror("non-declaration statement outside function body") 1402 yyVAL.list = nil 1403 } 1404 case 27: 1405 yyDollar = yyS[yypt-1 : yypt+1] 1406 //line go.y:363 1407 { 1408 yyVAL.list = nil 1409 } 1410 case 28: 1411 yyDollar = yyS[yypt-2 : yypt+1] 1412 //line go.y:369 1413 { 1414 yyVAL.list = yyDollar[2].list 1415 } 1416 case 29: 1417 yyDollar = yyS[yypt-5 : yypt+1] 1418 //line go.y:373 1419 { 1420 yyVAL.list = yyDollar[3].list 1421 } 1422 case 30: 1423 yyDollar = yyS[yypt-3 : yypt+1] 1424 //line go.y:377 1425 { 1426 yyVAL.list = nil 1427 } 1428 case 31: 1429 yyDollar = yyS[yypt-2 : yypt+1] 1430 //line go.y:381 1431 { 1432 yyVAL.list = yyDollar[2].list 1433 iota_ = -100000 1434 lastconst = nil 1435 } 1436 case 32: 1437 yyDollar = yyS[yypt-5 : yypt+1] 1438 //line go.y:387 1439 { 1440 yyVAL.list = yyDollar[3].list 1441 iota_ = -100000 1442 lastconst = nil 1443 } 1444 case 33: 1445 yyDollar = yyS[yypt-7 : yypt+1] 1446 //line go.y:393 1447 { 1448 yyVAL.list = concat(yyDollar[3].list, yyDollar[5].list) 1449 iota_ = -100000 1450 lastconst = nil 1451 } 1452 case 34: 1453 yyDollar = yyS[yypt-3 : yypt+1] 1454 //line go.y:399 1455 { 1456 yyVAL.list = nil 1457 iota_ = -100000 1458 } 1459 case 35: 1460 yyDollar = yyS[yypt-2 : yypt+1] 1461 //line go.y:404 1462 { 1463 yyVAL.list = list1(yyDollar[2].node) 1464 } 1465 case 36: 1466 yyDollar = yyS[yypt-5 : yypt+1] 1467 //line go.y:408 1468 { 1469 yyVAL.list = yyDollar[3].list 1470 } 1471 case 37: 1472 yyDollar = yyS[yypt-3 : yypt+1] 1473 //line go.y:412 1474 { 1475 yyVAL.list = nil 1476 } 1477 case 38: 1478 yyDollar = yyS[yypt-1 : yypt+1] 1479 //line go.y:418 1480 { 1481 iota_ = 0 1482 } 1483 case 39: 1484 yyDollar = yyS[yypt-2 : yypt+1] 1485 //line go.y:424 1486 { 1487 yyVAL.list = variter(yyDollar[1].list, yyDollar[2].node, nil) 1488 } 1489 case 40: 1490 yyDollar = yyS[yypt-4 : yypt+1] 1491 //line go.y:428 1492 { 1493 yyVAL.list = variter(yyDollar[1].list, yyDollar[2].node, yyDollar[4].list) 1494 } 1495 case 41: 1496 yyDollar = yyS[yypt-3 : yypt+1] 1497 //line go.y:432 1498 { 1499 yyVAL.list = variter(yyDollar[1].list, nil, yyDollar[3].list) 1500 } 1501 case 42: 1502 yyDollar = yyS[yypt-4 : yypt+1] 1503 //line go.y:438 1504 { 1505 yyVAL.list = constiter(yyDollar[1].list, yyDollar[2].node, yyDollar[4].list) 1506 } 1507 case 43: 1508 yyDollar = yyS[yypt-3 : yypt+1] 1509 //line go.y:442 1510 { 1511 yyVAL.list = constiter(yyDollar[1].list, nil, yyDollar[3].list) 1512 } 1513 case 45: 1514 yyDollar = yyS[yypt-2 : yypt+1] 1515 //line go.y:449 1516 { 1517 yyVAL.list = constiter(yyDollar[1].list, yyDollar[2].node, nil) 1518 } 1519 case 46: 1520 yyDollar = yyS[yypt-1 : yypt+1] 1521 //line go.y:453 1522 { 1523 yyVAL.list = constiter(yyDollar[1].list, nil, nil) 1524 } 1525 case 47: 1526 yyDollar = yyS[yypt-1 : yypt+1] 1527 //line go.y:459 1528 { 1529 // different from dclname because the name 1530 // becomes visible right here, not at the end 1531 // of the declaration. 1532 yyVAL.node = typedcl0(yyDollar[1].sym) 1533 } 1534 case 48: 1535 yyDollar = yyS[yypt-2 : yypt+1] 1536 //line go.y:468 1537 { 1538 yyVAL.node = typedcl1(yyDollar[1].node, yyDollar[2].node, true) 1539 } 1540 case 49: 1541 yyDollar = yyS[yypt-1 : yypt+1] 1542 //line go.y:474 1543 { 1544 yyVAL.node = yyDollar[1].node 1545 1546 // These nodes do not carry line numbers. 1547 // Since a bare name used as an expression is an error, 1548 // introduce a wrapper node to give the correct line. 1549 switch yyVAL.node.Op { 1550 case ONAME, ONONAME, OTYPE, OPACK, OLITERAL: 1551 yyVAL.node = Nod(OPAREN, yyVAL.node, nil) 1552 yyVAL.node.Implicit = true 1553 break 1554 } 1555 } 1556 case 50: 1557 yyDollar = yyS[yypt-3 : yypt+1] 1558 //line go.y:488 1559 { 1560 yyVAL.node = Nod(OASOP, yyDollar[1].node, yyDollar[3].node) 1561 yyVAL.node.Etype = uint8(yyDollar[2].i) // rathole to pass opcode 1562 } 1563 case 51: 1564 yyDollar = yyS[yypt-3 : yypt+1] 1565 //line go.y:493 1566 { 1567 if yyDollar[1].list.Next == nil && yyDollar[3].list.Next == nil { 1568 // simple 1569 yyVAL.node = Nod(OAS, yyDollar[1].list.N, yyDollar[3].list.N) 1570 break 1571 } 1572 // multiple 1573 yyVAL.node = Nod(OAS2, nil, nil) 1574 yyVAL.node.List = yyDollar[1].list 1575 yyVAL.node.Rlist = yyDollar[3].list 1576 } 1577 case 52: 1578 yyDollar = yyS[yypt-3 : yypt+1] 1579 //line go.y:505 1580 { 1581 if yyDollar[3].list.N.Op == OTYPESW { 1582 yyVAL.node = Nod(OTYPESW, nil, yyDollar[3].list.N.Right) 1583 if yyDollar[3].list.Next != nil { 1584 Yyerror("expr.(type) must be alone in list") 1585 } 1586 if yyDollar[1].list.Next != nil { 1587 Yyerror("argument count mismatch: %d = %d", count(yyDollar[1].list), 1) 1588 } else if (yyDollar[1].list.N.Op != ONAME && yyDollar[1].list.N.Op != OTYPE && yyDollar[1].list.N.Op != ONONAME) || isblank(yyDollar[1].list.N) { 1589 Yyerror("invalid variable name %s in type switch", yyDollar[1].list.N) 1590 } else { 1591 yyVAL.node.Left = dclname(yyDollar[1].list.N.Sym) 1592 } // it's a colas, so must not re-use an oldname. 1593 break 1594 } 1595 yyVAL.node = colas(yyDollar[1].list, yyDollar[3].list, int32(yyDollar[2].i)) 1596 } 1597 case 53: 1598 yyDollar = yyS[yypt-2 : yypt+1] 1599 //line go.y:523 1600 { 1601 yyVAL.node = Nod(OASOP, yyDollar[1].node, Nodintconst(1)) 1602 yyVAL.node.Implicit = true 1603 yyVAL.node.Etype = OADD 1604 } 1605 case 54: 1606 yyDollar = yyS[yypt-2 : yypt+1] 1607 //line go.y:529 1608 { 1609 yyVAL.node = Nod(OASOP, yyDollar[1].node, Nodintconst(1)) 1610 yyVAL.node.Implicit = true 1611 yyVAL.node.Etype = OSUB 1612 } 1613 case 55: 1614 yyDollar = yyS[yypt-3 : yypt+1] 1615 //line go.y:537 1616 { 1617 var n, nn *Node 1618 1619 // will be converted to OCASE 1620 // right will point to next case 1621 // done in casebody() 1622 markdcl() 1623 yyVAL.node = Nod(OXCASE, nil, nil) 1624 yyVAL.node.List = yyDollar[2].list 1625 if typesw != nil && typesw.Right != nil { 1626 n = typesw.Right.Left 1627 if n != nil { 1628 // type switch - declare variable 1629 nn = newname(n.Sym) 1630 declare(nn, dclcontext) 1631 yyVAL.node.Rlist = list1(nn) 1632 1633 // keep track of the instances for reporting unused 1634 nn.Name.Defn = typesw.Right 1635 } 1636 } 1637 } 1638 case 56: 1639 yyDollar = yyS[yypt-5 : yypt+1] 1640 //line go.y:560 1641 { 1642 var n *Node 1643 1644 // will be converted to OCASE 1645 // right will point to next case 1646 // done in casebody() 1647 markdcl() 1648 yyVAL.node = Nod(OXCASE, nil, nil) 1649 if yyDollar[2].list.Next == nil { 1650 n = Nod(OAS, yyDollar[2].list.N, yyDollar[4].node) 1651 } else { 1652 n = Nod(OAS2, nil, nil) 1653 n.List = yyDollar[2].list 1654 n.Rlist = list1(yyDollar[4].node) 1655 } 1656 yyVAL.node.List = list1(n) 1657 } 1658 case 57: 1659 yyDollar = yyS[yypt-5 : yypt+1] 1660 //line go.y:578 1661 { 1662 // will be converted to OCASE 1663 // right will point to next case 1664 // done in casebody() 1665 markdcl() 1666 yyVAL.node = Nod(OXCASE, nil, nil) 1667 yyVAL.node.List = list1(colas(yyDollar[2].list, list1(yyDollar[4].node), int32(yyDollar[3].i))) 1668 } 1669 case 58: 1670 yyDollar = yyS[yypt-2 : yypt+1] 1671 //line go.y:587 1672 { 1673 var n, nn *Node 1674 1675 markdcl() 1676 yyVAL.node = Nod(OXCASE, nil, nil) 1677 if typesw != nil && typesw.Right != nil { 1678 n = typesw.Right.Left 1679 if n != nil { 1680 // type switch - declare variable 1681 nn = newname(n.Sym) 1682 declare(nn, dclcontext) 1683 yyVAL.node.Rlist = list1(nn) 1684 1685 // keep track of the instances for reporting unused 1686 nn.Name.Defn = typesw.Right 1687 } 1688 } 1689 } 1690 case 59: 1691 yyDollar = yyS[yypt-1 : yypt+1] 1692 //line go.y:608 1693 { 1694 markdcl() 1695 } 1696 case 60: 1697 yyDollar = yyS[yypt-4 : yypt+1] 1698 //line go.y:612 1699 { 1700 if yyDollar[3].list == nil { 1701 yyVAL.node = Nod(OEMPTY, nil, nil) 1702 } else { 1703 yyVAL.node = liststmt(yyDollar[3].list) 1704 } 1705 popdcl() 1706 } 1707 case 61: 1708 yyDollar = yyS[yypt-1 : yypt+1] 1709 //line go.y:623 1710 { 1711 // If the last token read by the lexer was consumed 1712 // as part of the case, clear it (parser has cleared yychar). 1713 // If the last token read by the lexer was the lookahead 1714 // leave it alone (parser has it cached in yychar). 1715 // This is so that the stmt_list action doesn't look at 1716 // the case tokens if the stmt_list is empty. 1717 yylast = yychar 1718 yyDollar[1].node.Xoffset = int64(block) 1719 } 1720 case 62: 1721 yyDollar = yyS[yypt-3 : yypt+1] 1722 //line go.y:634 1723 { 1724 // This is the only place in the language where a statement 1725 // list is not allowed to drop the final semicolon, because 1726 // it's the only place where a statement list is not followed 1727 // by a closing brace. Handle the error for pedantry. 1728 1729 // Find the final token of the statement list. 1730 // yylast is lookahead; yyprev is last of stmt_list 1731 last := yyprev 1732 1733 if last > 0 && last != ';' && yychar != '}' { 1734 Yyerror("missing statement after label") 1735 } 1736 yyVAL.node = yyDollar[1].node 1737 yyVAL.node.Nbody = yyDollar[3].list 1738 popdcl() 1739 } 1740 case 63: 1741 yyDollar = yyS[yypt-0 : yypt+1] 1742 //line go.y:653 1743 { 1744 yyVAL.list = nil 1745 } 1746 case 64: 1747 yyDollar = yyS[yypt-2 : yypt+1] 1748 //line go.y:657 1749 { 1750 yyVAL.list = list(yyDollar[1].list, yyDollar[2].node) 1751 } 1752 case 65: 1753 yyDollar = yyS[yypt-1 : yypt+1] 1754 //line go.y:663 1755 { 1756 markdcl() 1757 } 1758 case 66: 1759 yyDollar = yyS[yypt-4 : yypt+1] 1760 //line go.y:667 1761 { 1762 yyVAL.list = yyDollar[3].list 1763 popdcl() 1764 } 1765 case 67: 1766 yyDollar = yyS[yypt-4 : yypt+1] 1767 //line go.y:674 1768 { 1769 yyVAL.node = Nod(ORANGE, nil, yyDollar[4].node) 1770 yyVAL.node.List = yyDollar[1].list 1771 yyVAL.node.Etype = 0 // := flag 1772 } 1773 case 68: 1774 yyDollar = yyS[yypt-4 : yypt+1] 1775 //line go.y:680 1776 { 1777 yyVAL.node = Nod(ORANGE, nil, yyDollar[4].node) 1778 yyVAL.node.List = yyDollar[1].list 1779 yyVAL.node.Colas = true 1780 colasdefn(yyDollar[1].list, yyVAL.node) 1781 } 1782 case 69: 1783 yyDollar = yyS[yypt-2 : yypt+1] 1784 //line go.y:687 1785 { 1786 yyVAL.node = Nod(ORANGE, nil, yyDollar[2].node) 1787 yyVAL.node.Etype = 0 // := flag 1788 } 1789 case 70: 1790 yyDollar = yyS[yypt-5 : yypt+1] 1791 //line go.y:694 1792 { 1793 // init ; test ; incr 1794 if yyDollar[5].node != nil && yyDollar[5].node.Colas { 1795 Yyerror("cannot declare in the for-increment") 1796 } 1797 yyVAL.node = Nod(OFOR, nil, nil) 1798 if yyDollar[1].node != nil { 1799 yyVAL.node.Ninit = list1(yyDollar[1].node) 1800 } 1801 yyVAL.node.Left = yyDollar[3].node 1802 yyVAL.node.Right = yyDollar[5].node 1803 } 1804 case 71: 1805 yyDollar = yyS[yypt-1 : yypt+1] 1806 //line go.y:707 1807 { 1808 // normal test 1809 yyVAL.node = Nod(OFOR, nil, nil) 1810 yyVAL.node.Left = yyDollar[1].node 1811 } 1812 case 73: 1813 yyDollar = yyS[yypt-2 : yypt+1] 1814 //line go.y:716 1815 { 1816 yyVAL.node = yyDollar[1].node 1817 yyVAL.node.Nbody = concat(yyVAL.node.Nbody, yyDollar[2].list) 1818 } 1819 case 74: 1820 yyDollar = yyS[yypt-1 : yypt+1] 1821 //line go.y:723 1822 { 1823 markdcl() 1824 } 1825 case 75: 1826 yyDollar = yyS[yypt-3 : yypt+1] 1827 //line go.y:727 1828 { 1829 yyVAL.node = yyDollar[3].node 1830 popdcl() 1831 } 1832 case 76: 1833 yyDollar = yyS[yypt-1 : yypt+1] 1834 //line go.y:734 1835 { 1836 // test 1837 yyVAL.node = Nod(OIF, nil, nil) 1838 yyVAL.node.Left = yyDollar[1].node 1839 } 1840 case 77: 1841 yyDollar = yyS[yypt-3 : yypt+1] 1842 //line go.y:740 1843 { 1844 // init ; test 1845 yyVAL.node = Nod(OIF, nil, nil) 1846 if yyDollar[1].node != nil { 1847 yyVAL.node.Ninit = list1(yyDollar[1].node) 1848 } 1849 yyVAL.node.Left = yyDollar[3].node 1850 } 1851 case 78: 1852 yyDollar = yyS[yypt-1 : yypt+1] 1853 //line go.y:752 1854 { 1855 markdcl() 1856 } 1857 case 79: 1858 yyDollar = yyS[yypt-3 : yypt+1] 1859 //line go.y:756 1860 { 1861 if yyDollar[3].node.Left == nil { 1862 Yyerror("missing condition in if statement") 1863 } 1864 } 1865 case 80: 1866 yyDollar = yyS[yypt-5 : yypt+1] 1867 //line go.y:762 1868 { 1869 yyDollar[3].node.Nbody = yyDollar[5].list 1870 } 1871 case 81: 1872 yyDollar = yyS[yypt-8 : yypt+1] 1873 //line go.y:766 1874 { 1875 var n *Node 1876 var nn *NodeList 1877 1878 yyVAL.node = yyDollar[3].node 1879 n = yyDollar[3].node 1880 popdcl() 1881 for nn = concat(yyDollar[7].list, yyDollar[8].list); nn != nil; nn = nn.Next { 1882 if nn.N.Op == OIF { 1883 popdcl() 1884 } 1885 n.Rlist = list1(nn.N) 1886 n = nn.N 1887 } 1888 } 1889 case 82: 1890 yyDollar = yyS[yypt-2 : yypt+1] 1891 //line go.y:784 1892 { 1893 markdcl() 1894 } 1895 case 83: 1896 yyDollar = yyS[yypt-5 : yypt+1] 1897 //line go.y:788 1898 { 1899 if yyDollar[4].node.Left == nil { 1900 Yyerror("missing condition in if statement") 1901 } 1902 yyDollar[4].node.Nbody = yyDollar[5].list 1903 yyVAL.list = list1(yyDollar[4].node) 1904 } 1905 case 84: 1906 yyDollar = yyS[yypt-0 : yypt+1] 1907 //line go.y:797 1908 { 1909 yyVAL.list = nil 1910 } 1911 case 85: 1912 yyDollar = yyS[yypt-2 : yypt+1] 1913 //line go.y:801 1914 { 1915 yyVAL.list = concat(yyDollar[1].list, yyDollar[2].list) 1916 } 1917 case 86: 1918 yyDollar = yyS[yypt-0 : yypt+1] 1919 //line go.y:806 1920 { 1921 yyVAL.list = nil 1922 } 1923 case 87: 1924 yyDollar = yyS[yypt-2 : yypt+1] 1925 //line go.y:810 1926 { 1927 l := &NodeList{N: yyDollar[2].node} 1928 l.End = l 1929 yyVAL.list = l 1930 } 1931 case 88: 1932 yyDollar = yyS[yypt-1 : yypt+1] 1933 //line go.y:818 1934 { 1935 markdcl() 1936 } 1937 case 89: 1938 yyDollar = yyS[yypt-3 : yypt+1] 1939 //line go.y:822 1940 { 1941 var n *Node 1942 n = yyDollar[3].node.Left 1943 if n != nil && n.Op != OTYPESW { 1944 n = nil 1945 } 1946 typesw = Nod(OXXX, typesw, n) 1947 } 1948 case 90: 1949 yyDollar = yyS[yypt-7 : yypt+1] 1950 //line go.y:831 1951 { 1952 yyVAL.node = yyDollar[3].node 1953 yyVAL.node.Op = OSWITCH 1954 yyVAL.node.List = yyDollar[6].list 1955 typesw = typesw.Left 1956 popdcl() 1957 } 1958 case 91: 1959 yyDollar = yyS[yypt-1 : yypt+1] 1960 //line go.y:841 1961 { 1962 typesw = Nod(OXXX, typesw, nil) 1963 } 1964 case 92: 1965 yyDollar = yyS[yypt-5 : yypt+1] 1966 //line go.y:845 1967 { 1968 yyVAL.node = Nod(OSELECT, nil, nil) 1969 yyVAL.node.Lineno = typesw.Lineno 1970 yyVAL.node.List = yyDollar[4].list 1971 typesw = typesw.Left 1972 } 1973 case 94: 1974 yyDollar = yyS[yypt-3 : yypt+1] 1975 //line go.y:858 1976 { 1977 yyVAL.node = Nod(OOROR, yyDollar[1].node, yyDollar[3].node) 1978 } 1979 case 95: 1980 yyDollar = yyS[yypt-3 : yypt+1] 1981 //line go.y:862 1982 { 1983 yyVAL.node = Nod(OANDAND, yyDollar[1].node, yyDollar[3].node) 1984 } 1985 case 96: 1986 yyDollar = yyS[yypt-3 : yypt+1] 1987 //line go.y:866 1988 { 1989 yyVAL.node = Nod(OEQ, yyDollar[1].node, yyDollar[3].node) 1990 } 1991 case 97: 1992 yyDollar = yyS[yypt-3 : yypt+1] 1993 //line go.y:870 1994 { 1995 yyVAL.node = Nod(ONE, yyDollar[1].node, yyDollar[3].node) 1996 } 1997 case 98: 1998 yyDollar = yyS[yypt-3 : yypt+1] 1999 //line go.y:874 2000 { 2001 yyVAL.node = Nod(OLT, yyDollar[1].node, yyDollar[3].node) 2002 } 2003 case 99: 2004 yyDollar = yyS[yypt-3 : yypt+1] 2005 //line go.y:878 2006 { 2007 yyVAL.node = Nod(OLE, yyDollar[1].node, yyDollar[3].node) 2008 } 2009 case 100: 2010 yyDollar = yyS[yypt-3 : yypt+1] 2011 //line go.y:882 2012 { 2013 yyVAL.node = Nod(OGE, yyDollar[1].node, yyDollar[3].node) 2014 } 2015 case 101: 2016 yyDollar = yyS[yypt-3 : yypt+1] 2017 //line go.y:886 2018 { 2019 yyVAL.node = Nod(OGT, yyDollar[1].node, yyDollar[3].node) 2020 } 2021 case 102: 2022 yyDollar = yyS[yypt-3 : yypt+1] 2023 //line go.y:890 2024 { 2025 yyVAL.node = Nod(OADD, yyDollar[1].node, yyDollar[3].node) 2026 } 2027 case 103: 2028 yyDollar = yyS[yypt-3 : yypt+1] 2029 //line go.y:894 2030 { 2031 yyVAL.node = Nod(OSUB, yyDollar[1].node, yyDollar[3].node) 2032 } 2033 case 104: 2034 yyDollar = yyS[yypt-3 : yypt+1] 2035 //line go.y:898 2036 { 2037 yyVAL.node = Nod(OOR, yyDollar[1].node, yyDollar[3].node) 2038 } 2039 case 105: 2040 yyDollar = yyS[yypt-3 : yypt+1] 2041 //line go.y:902 2042 { 2043 yyVAL.node = Nod(OXOR, yyDollar[1].node, yyDollar[3].node) 2044 } 2045 case 106: 2046 yyDollar = yyS[yypt-3 : yypt+1] 2047 //line go.y:906 2048 { 2049 yyVAL.node = Nod(OMUL, yyDollar[1].node, yyDollar[3].node) 2050 } 2051 case 107: 2052 yyDollar = yyS[yypt-3 : yypt+1] 2053 //line go.y:910 2054 { 2055 yyVAL.node = Nod(ODIV, yyDollar[1].node, yyDollar[3].node) 2056 } 2057 case 108: 2058 yyDollar = yyS[yypt-3 : yypt+1] 2059 //line go.y:914 2060 { 2061 yyVAL.node = Nod(OMOD, yyDollar[1].node, yyDollar[3].node) 2062 } 2063 case 109: 2064 yyDollar = yyS[yypt-3 : yypt+1] 2065 //line go.y:918 2066 { 2067 yyVAL.node = Nod(OAND, yyDollar[1].node, yyDollar[3].node) 2068 } 2069 case 110: 2070 yyDollar = yyS[yypt-3 : yypt+1] 2071 //line go.y:922 2072 { 2073 yyVAL.node = Nod(OANDNOT, yyDollar[1].node, yyDollar[3].node) 2074 } 2075 case 111: 2076 yyDollar = yyS[yypt-3 : yypt+1] 2077 //line go.y:926 2078 { 2079 yyVAL.node = Nod(OLSH, yyDollar[1].node, yyDollar[3].node) 2080 } 2081 case 112: 2082 yyDollar = yyS[yypt-3 : yypt+1] 2083 //line go.y:930 2084 { 2085 yyVAL.node = Nod(ORSH, yyDollar[1].node, yyDollar[3].node) 2086 } 2087 case 113: 2088 yyDollar = yyS[yypt-3 : yypt+1] 2089 //line go.y:935 2090 { 2091 yyVAL.node = Nod(OSEND, yyDollar[1].node, yyDollar[3].node) 2092 } 2093 case 115: 2094 yyDollar = yyS[yypt-2 : yypt+1] 2095 //line go.y:942 2096 { 2097 yyVAL.node = Nod(OIND, yyDollar[2].node, nil) 2098 } 2099 case 116: 2100 yyDollar = yyS[yypt-2 : yypt+1] 2101 //line go.y:946 2102 { 2103 if yyDollar[2].node.Op == OCOMPLIT { 2104 // Special case for &T{...}: turn into (*T){...}. 2105 yyVAL.node = yyDollar[2].node 2106 yyVAL.node.Right = Nod(OIND, yyVAL.node.Right, nil) 2107 yyVAL.node.Right.Implicit = true 2108 } else { 2109 yyVAL.node = Nod(OADDR, yyDollar[2].node, nil) 2110 } 2111 } 2112 case 117: 2113 yyDollar = yyS[yypt-2 : yypt+1] 2114 //line go.y:957 2115 { 2116 yyVAL.node = Nod(OPLUS, yyDollar[2].node, nil) 2117 } 2118 case 118: 2119 yyDollar = yyS[yypt-2 : yypt+1] 2120 //line go.y:961 2121 { 2122 yyVAL.node = Nod(OMINUS, yyDollar[2].node, nil) 2123 } 2124 case 119: 2125 yyDollar = yyS[yypt-2 : yypt+1] 2126 //line go.y:965 2127 { 2128 yyVAL.node = Nod(ONOT, yyDollar[2].node, nil) 2129 } 2130 case 120: 2131 yyDollar = yyS[yypt-2 : yypt+1] 2132 //line go.y:969 2133 { 2134 Yyerror("the bitwise complement operator is ^") 2135 yyVAL.node = Nod(OCOM, yyDollar[2].node, nil) 2136 } 2137 case 121: 2138 yyDollar = yyS[yypt-2 : yypt+1] 2139 //line go.y:974 2140 { 2141 yyVAL.node = Nod(OCOM, yyDollar[2].node, nil) 2142 } 2143 case 122: 2144 yyDollar = yyS[yypt-2 : yypt+1] 2145 //line go.y:978 2146 { 2147 yyVAL.node = Nod(ORECV, yyDollar[2].node, nil) 2148 } 2149 case 123: 2150 yyDollar = yyS[yypt-3 : yypt+1] 2151 //line go.y:988 2152 { 2153 yyVAL.node = Nod(OCALL, yyDollar[1].node, nil) 2154 } 2155 case 124: 2156 yyDollar = yyS[yypt-5 : yypt+1] 2157 //line go.y:992 2158 { 2159 yyVAL.node = Nod(OCALL, yyDollar[1].node, nil) 2160 yyVAL.node.List = yyDollar[3].list 2161 } 2162 case 125: 2163 yyDollar = yyS[yypt-6 : yypt+1] 2164 //line go.y:997 2165 { 2166 yyVAL.node = Nod(OCALL, yyDollar[1].node, nil) 2167 yyVAL.node.List = yyDollar[3].list 2168 yyVAL.node.Isddd = true 2169 } 2170 case 126: 2171 yyDollar = yyS[yypt-1 : yypt+1] 2172 //line go.y:1005 2173 { 2174 yyVAL.node = nodlit(yyDollar[1].val) 2175 } 2176 case 128: 2177 yyDollar = yyS[yypt-3 : yypt+1] 2178 //line go.y:1010 2179 { 2180 if yyDollar[1].node.Op == OPACK { 2181 var s *Sym 2182 s = restrictlookup(yyDollar[3].sym.Name, yyDollar[1].node.Name.Pkg) 2183 yyDollar[1].node.Used = true 2184 yyVAL.node = oldname(s) 2185 break 2186 } 2187 yyVAL.node = Nod(OXDOT, yyDollar[1].node, newname(yyDollar[3].sym)) 2188 } 2189 case 129: 2190 yyDollar = yyS[yypt-5 : yypt+1] 2191 //line go.y:1021 2192 { 2193 yyVAL.node = Nod(ODOTTYPE, yyDollar[1].node, yyDollar[4].node) 2194 } 2195 case 130: 2196 yyDollar = yyS[yypt-5 : yypt+1] 2197 //line go.y:1025 2198 { 2199 yyVAL.node = Nod(OTYPESW, nil, yyDollar[1].node) 2200 } 2201 case 131: 2202 yyDollar = yyS[yypt-4 : yypt+1] 2203 //line go.y:1029 2204 { 2205 yyVAL.node = Nod(OINDEX, yyDollar[1].node, yyDollar[3].node) 2206 } 2207 case 132: 2208 yyDollar = yyS[yypt-6 : yypt+1] 2209 //line go.y:1033 2210 { 2211 yyVAL.node = Nod(OSLICE, yyDollar[1].node, Nod(OKEY, yyDollar[3].node, yyDollar[5].node)) 2212 } 2213 case 133: 2214 yyDollar = yyS[yypt-8 : yypt+1] 2215 //line go.y:1037 2216 { 2217 if yyDollar[5].node == nil { 2218 Yyerror("middle index required in 3-index slice") 2219 } 2220 if yyDollar[7].node == nil { 2221 Yyerror("final index required in 3-index slice") 2222 } 2223 yyVAL.node = Nod(OSLICE3, yyDollar[1].node, Nod(OKEY, yyDollar[3].node, Nod(OKEY, yyDollar[5].node, yyDollar[7].node))) 2224 } 2225 case 135: 2226 yyDollar = yyS[yypt-5 : yypt+1] 2227 //line go.y:1048 2228 { 2229 // conversion 2230 yyVAL.node = Nod(OCALL, yyDollar[1].node, nil) 2231 yyVAL.node.List = list1(yyDollar[3].node) 2232 } 2233 case 136: 2234 yyDollar = yyS[yypt-5 : yypt+1] 2235 //line go.y:1054 2236 { 2237 yyVAL.node = yyDollar[3].node 2238 yyVAL.node.Right = yyDollar[1].node 2239 yyVAL.node.List = yyDollar[4].list 2240 fixlbrace(yyDollar[2].i) 2241 } 2242 case 137: 2243 yyDollar = yyS[yypt-5 : yypt+1] 2244 //line go.y:1061 2245 { 2246 yyVAL.node = yyDollar[3].node 2247 yyVAL.node.Right = yyDollar[1].node 2248 yyVAL.node.List = yyDollar[4].list 2249 } 2250 case 138: 2251 yyDollar = yyS[yypt-7 : yypt+1] 2252 //line go.y:1067 2253 { 2254 Yyerror("cannot parenthesize type in composite literal") 2255 yyVAL.node = yyDollar[5].node 2256 yyVAL.node.Right = yyDollar[2].node 2257 yyVAL.node.List = yyDollar[6].list 2258 } 2259 case 140: 2260 yyDollar = yyS[yypt-0 : yypt+1] 2261 //line go.y:1076 2262 { 2263 // composite expression. 2264 // make node early so we get the right line number. 2265 yyVAL.node = Nod(OCOMPLIT, nil, nil) 2266 } 2267 case 141: 2268 yyDollar = yyS[yypt-3 : yypt+1] 2269 //line go.y:1084 2270 { 2271 yyVAL.node = Nod(OKEY, yyDollar[1].node, yyDollar[3].node) 2272 } 2273 case 142: 2274 yyDollar = yyS[yypt-1 : yypt+1] 2275 //line go.y:1090 2276 { 2277 // These nodes do not carry line numbers. 2278 // Since a composite literal commonly spans several lines, 2279 // the line number on errors may be misleading. 2280 // Introduce a wrapper node to give the correct line. 2281 yyVAL.node = yyDollar[1].node 2282 switch yyVAL.node.Op { 2283 case ONAME, ONONAME, OTYPE, OPACK, OLITERAL: 2284 yyVAL.node = Nod(OPAREN, yyVAL.node, nil) 2285 yyVAL.node.Implicit = true 2286 } 2287 } 2288 case 143: 2289 yyDollar = yyS[yypt-4 : yypt+1] 2290 //line go.y:1103 2291 { 2292 yyVAL.node = yyDollar[2].node 2293 yyVAL.node.List = yyDollar[3].list 2294 } 2295 case 145: 2296 yyDollar = yyS[yypt-4 : yypt+1] 2297 //line go.y:1111 2298 { 2299 yyVAL.node = yyDollar[2].node 2300 yyVAL.node.List = yyDollar[3].list 2301 } 2302 case 147: 2303 yyDollar = yyS[yypt-3 : yypt+1] 2304 //line go.y:1119 2305 { 2306 yyVAL.node = yyDollar[2].node 2307 2308 // Need to know on lhs of := whether there are ( ). 2309 // Don't bother with the OPAREN in other cases: 2310 // it's just a waste of memory and time. 2311 switch yyVAL.node.Op { 2312 case ONAME, ONONAME, OPACK, OTYPE, OLITERAL, OTYPESW: 2313 yyVAL.node = Nod(OPAREN, yyVAL.node, nil) 2314 } 2315 } 2316 case 151: 2317 yyDollar = yyS[yypt-1 : yypt+1] 2318 //line go.y:1140 2319 { 2320 yyVAL.i = LBODY 2321 } 2322 case 152: 2323 yyDollar = yyS[yypt-1 : yypt+1] 2324 //line go.y:1144 2325 { 2326 yyVAL.i = '{' 2327 } 2328 case 153: 2329 yyDollar = yyS[yypt-1 : yypt+1] 2330 //line go.y:1155 2331 { 2332 if yyDollar[1].sym == nil { 2333 yyVAL.node = nil 2334 } else { 2335 yyVAL.node = newname(yyDollar[1].sym) 2336 } 2337 } 2338 case 154: 2339 yyDollar = yyS[yypt-1 : yypt+1] 2340 //line go.y:1165 2341 { 2342 yyVAL.node = dclname(yyDollar[1].sym) 2343 } 2344 case 155: 2345 yyDollar = yyS[yypt-0 : yypt+1] 2346 //line go.y:1170 2347 { 2348 yyVAL.node = nil 2349 } 2350 case 157: 2351 yyDollar = yyS[yypt-1 : yypt+1] 2352 //line go.y:1177 2353 { 2354 yyVAL.sym = yyDollar[1].sym 2355 // during imports, unqualified non-exported identifiers are from builtinpkg 2356 if importpkg != nil && !exportname(yyDollar[1].sym.Name) { 2357 yyVAL.sym = Pkglookup(yyDollar[1].sym.Name, builtinpkg) 2358 } 2359 } 2360 case 159: 2361 yyDollar = yyS[yypt-1 : yypt+1] 2362 //line go.y:1186 2363 { 2364 yyVAL.sym = nil 2365 } 2366 case 160: 2367 yyDollar = yyS[yypt-4 : yypt+1] 2368 //line go.y:1192 2369 { 2370 var p *Pkg 2371 2372 if yyDollar[2].val.U.(string) == "" { 2373 p = importpkg 2374 } else { 2375 if isbadimport(yyDollar[2].val.U.(string)) { 2376 errorexit() 2377 } 2378 p = mkpkg(yyDollar[2].val.U.(string)) 2379 } 2380 yyVAL.sym = Pkglookup(yyDollar[4].sym.Name, p) 2381 } 2382 case 161: 2383 yyDollar = yyS[yypt-4 : yypt+1] 2384 //line go.y:1206 2385 { 2386 var p *Pkg 2387 2388 if yyDollar[2].val.U.(string) == "" { 2389 p = importpkg 2390 } else { 2391 if isbadimport(yyDollar[2].val.U.(string)) { 2392 errorexit() 2393 } 2394 p = mkpkg(yyDollar[2].val.U.(string)) 2395 } 2396 yyVAL.sym = Pkglookup("?", p) 2397 } 2398 case 162: 2399 yyDollar = yyS[yypt-1 : yypt+1] 2400 //line go.y:1222 2401 { 2402 yyVAL.node = oldname(yyDollar[1].sym) 2403 if yyVAL.node.Name != nil && yyVAL.node.Name.Pack != nil { 2404 yyVAL.node.Name.Pack.Used = true 2405 } 2406 } 2407 case 164: 2408 yyDollar = yyS[yypt-1 : yypt+1] 2409 //line go.y:1243 2410 { 2411 Yyerror("final argument in variadic function missing type") 2412 yyVAL.node = Nod(ODDD, typenod(typ(TINTER)), nil) 2413 } 2414 case 165: 2415 yyDollar = yyS[yypt-2 : yypt+1] 2416 //line go.y:1248 2417 { 2418 yyVAL.node = Nod(ODDD, yyDollar[2].node, nil) 2419 } 2420 case 171: 2421 yyDollar = yyS[yypt-3 : yypt+1] 2422 //line go.y:1259 2423 { 2424 yyVAL.node = yyDollar[2].node 2425 } 2426 case 175: 2427 yyDollar = yyS[yypt-2 : yypt+1] 2428 //line go.y:1268 2429 { 2430 yyVAL.node = Nod(OIND, yyDollar[2].node, nil) 2431 } 2432 case 180: 2433 yyDollar = yyS[yypt-3 : yypt+1] 2434 //line go.y:1278 2435 { 2436 yyVAL.node = yyDollar[2].node 2437 } 2438 case 190: 2439 yyDollar = yyS[yypt-3 : yypt+1] 2440 //line go.y:1299 2441 { 2442 if yyDollar[1].node.Op == OPACK { 2443 var s *Sym 2444 s = restrictlookup(yyDollar[3].sym.Name, yyDollar[1].node.Name.Pkg) 2445 yyDollar[1].node.Used = true 2446 yyVAL.node = oldname(s) 2447 break 2448 } 2449 yyVAL.node = Nod(OXDOT, yyDollar[1].node, newname(yyDollar[3].sym)) 2450 } 2451 case 191: 2452 yyDollar = yyS[yypt-4 : yypt+1] 2453 //line go.y:1312 2454 { 2455 yyVAL.node = Nod(OTARRAY, yyDollar[2].node, yyDollar[4].node) 2456 } 2457 case 192: 2458 yyDollar = yyS[yypt-4 : yypt+1] 2459 //line go.y:1316 2460 { 2461 // array literal of nelem 2462 yyVAL.node = Nod(OTARRAY, Nod(ODDD, nil, nil), yyDollar[4].node) 2463 } 2464 case 193: 2465 yyDollar = yyS[yypt-2 : yypt+1] 2466 //line go.y:1321 2467 { 2468 yyVAL.node = Nod(OTCHAN, yyDollar[2].node, nil) 2469 yyVAL.node.Etype = Cboth 2470 } 2471 case 194: 2472 yyDollar = yyS[yypt-3 : yypt+1] 2473 //line go.y:1326 2474 { 2475 yyVAL.node = Nod(OTCHAN, yyDollar[3].node, nil) 2476 yyVAL.node.Etype = Csend 2477 } 2478 case 195: 2479 yyDollar = yyS[yypt-5 : yypt+1] 2480 //line go.y:1331 2481 { 2482 yyVAL.node = Nod(OTMAP, yyDollar[3].node, yyDollar[5].node) 2483 } 2484 case 198: 2485 yyDollar = yyS[yypt-2 : yypt+1] 2486 //line go.y:1339 2487 { 2488 yyVAL.node = Nod(OIND, yyDollar[2].node, nil) 2489 } 2490 case 199: 2491 yyDollar = yyS[yypt-3 : yypt+1] 2492 //line go.y:1345 2493 { 2494 yyVAL.node = Nod(OTCHAN, yyDollar[3].node, nil) 2495 yyVAL.node.Etype = Crecv 2496 } 2497 case 200: 2498 yyDollar = yyS[yypt-5 : yypt+1] 2499 //line go.y:1352 2500 { 2501 yyVAL.node = Nod(OTSTRUCT, nil, nil) 2502 yyVAL.node.List = yyDollar[3].list 2503 fixlbrace(yyDollar[2].i) 2504 } 2505 case 201: 2506 yyDollar = yyS[yypt-3 : yypt+1] 2507 //line go.y:1358 2508 { 2509 yyVAL.node = Nod(OTSTRUCT, nil, nil) 2510 fixlbrace(yyDollar[2].i) 2511 } 2512 case 202: 2513 yyDollar = yyS[yypt-5 : yypt+1] 2514 //line go.y:1365 2515 { 2516 yyVAL.node = Nod(OTINTER, nil, nil) 2517 yyVAL.node.List = yyDollar[3].list 2518 fixlbrace(yyDollar[2].i) 2519 } 2520 case 203: 2521 yyDollar = yyS[yypt-3 : yypt+1] 2522 //line go.y:1371 2523 { 2524 yyVAL.node = Nod(OTINTER, nil, nil) 2525 fixlbrace(yyDollar[2].i) 2526 } 2527 case 204: 2528 yyDollar = yyS[yypt-3 : yypt+1] 2529 //line go.y:1382 2530 { 2531 yyVAL.node = yyDollar[2].node 2532 if yyVAL.node == nil { 2533 break 2534 } 2535 if noescape && yyDollar[3].list != nil { 2536 Yyerror("can only use //go:noescape with external func implementations") 2537 } 2538 yyVAL.node.Nbody = yyDollar[3].list 2539 yyVAL.node.Func.Endlineno = lineno 2540 yyVAL.node.Noescape = noescape 2541 yyVAL.node.Func.Norace = norace 2542 yyVAL.node.Func.Nosplit = nosplit 2543 yyVAL.node.Func.Nowritebarrier = nowritebarrier 2544 yyVAL.node.Func.Systemstack = systemstack 2545 funcbody(yyVAL.node) 2546 } 2547 case 205: 2548 yyDollar = yyS[yypt-5 : yypt+1] 2549 //line go.y:1402 2550 { 2551 var t *Node 2552 2553 yyVAL.node = nil 2554 yyDollar[3].list = checkarglist(yyDollar[3].list, 1) 2555 2556 if yyDollar[1].sym.Name == "init" { 2557 yyDollar[1].sym = renameinit() 2558 if yyDollar[3].list != nil || yyDollar[5].list != nil { 2559 Yyerror("func init must have no arguments and no return values") 2560 } 2561 } 2562 if localpkg.Name == "main" && yyDollar[1].sym.Name == "main" { 2563 if yyDollar[3].list != nil || yyDollar[5].list != nil { 2564 Yyerror("func main must have no arguments and no return values") 2565 } 2566 } 2567 2568 t = Nod(OTFUNC, nil, nil) 2569 t.List = yyDollar[3].list 2570 t.Rlist = yyDollar[5].list 2571 2572 yyVAL.node = Nod(ODCLFUNC, nil, nil) 2573 yyVAL.node.Func.Nname = newfuncname(yyDollar[1].sym) 2574 yyVAL.node.Func.Nname.Name.Defn = yyVAL.node 2575 yyVAL.node.Func.Nname.Name.Param.Ntype = t // TODO: check if nname already has an ntype 2576 declare(yyVAL.node.Func.Nname, PFUNC) 2577 2578 funchdr(yyVAL.node) 2579 } 2580 case 206: 2581 yyDollar = yyS[yypt-8 : yypt+1] 2582 //line go.y:1433 2583 { 2584 var rcvr, t *Node 2585 2586 yyVAL.node = nil 2587 yyDollar[2].list = checkarglist(yyDollar[2].list, 0) 2588 yyDollar[6].list = checkarglist(yyDollar[6].list, 1) 2589 2590 if yyDollar[2].list == nil { 2591 Yyerror("method has no receiver") 2592 break 2593 } 2594 if yyDollar[2].list.Next != nil { 2595 Yyerror("method has multiple receivers") 2596 break 2597 } 2598 rcvr = yyDollar[2].list.N 2599 if rcvr.Op != ODCLFIELD { 2600 Yyerror("bad receiver in method") 2601 break 2602 } 2603 2604 t = Nod(OTFUNC, rcvr, nil) 2605 t.List = yyDollar[6].list 2606 t.Rlist = yyDollar[8].list 2607 2608 yyVAL.node = Nod(ODCLFUNC, nil, nil) 2609 yyVAL.node.Func.Shortname = newfuncname(yyDollar[4].sym) 2610 yyVAL.node.Func.Nname = methodname1(yyVAL.node.Func.Shortname, rcvr.Right) 2611 yyVAL.node.Func.Nname.Name.Defn = yyVAL.node 2612 yyVAL.node.Func.Nname.Name.Param.Ntype = t 2613 yyVAL.node.Func.Nname.Nointerface = nointerface 2614 declare(yyVAL.node.Func.Nname, PFUNC) 2615 2616 funchdr(yyVAL.node) 2617 } 2618 case 207: 2619 yyDollar = yyS[yypt-5 : yypt+1] 2620 //line go.y:1471 2621 { 2622 var s *Sym 2623 var t *Type 2624 2625 yyVAL.node = nil 2626 2627 s = yyDollar[1].sym 2628 t = functype(nil, yyDollar[3].list, yyDollar[5].list) 2629 2630 importsym(s, ONAME) 2631 if s.Def != nil && s.Def.Op == ONAME { 2632 if Eqtype(t, s.Def.Type) { 2633 dclcontext = PDISCARD // since we skip funchdr below 2634 break 2635 } 2636 Yyerror("inconsistent definition for func %v during import\n\t%v\n\t%v", s, s.Def.Type, t) 2637 } 2638 2639 yyVAL.node = newfuncname(s) 2640 yyVAL.node.Type = t 2641 declare(yyVAL.node, PFUNC) 2642 2643 funchdr(yyVAL.node) 2644 } 2645 case 208: 2646 yyDollar = yyS[yypt-8 : yypt+1] 2647 //line go.y:1496 2648 { 2649 yyVAL.node = methodname1(newname(yyDollar[4].sym), yyDollar[2].list.N.Right) 2650 yyVAL.node.Type = functype(yyDollar[2].list.N, yyDollar[6].list, yyDollar[8].list) 2651 2652 checkwidth(yyVAL.node.Type) 2653 addmethod(yyDollar[4].sym, yyVAL.node.Type, false, nointerface) 2654 nointerface = false 2655 funchdr(yyVAL.node) 2656 2657 // inl.C's inlnode in on a dotmeth node expects to find the inlineable body as 2658 // (dotmeth's type).Nname.Inl, and dotmeth's type has been pulled 2659 // out by typecheck's lookdot as this $$.ttype. So by providing 2660 // this back link here we avoid special casing there. 2661 yyVAL.node.Type.Nname = yyVAL.node 2662 } 2663 case 209: 2664 yyDollar = yyS[yypt-5 : yypt+1] 2665 //line go.y:1514 2666 { 2667 yyDollar[3].list = checkarglist(yyDollar[3].list, 1) 2668 yyVAL.node = Nod(OTFUNC, nil, nil) 2669 yyVAL.node.List = yyDollar[3].list 2670 yyVAL.node.Rlist = yyDollar[5].list 2671 } 2672 case 210: 2673 yyDollar = yyS[yypt-0 : yypt+1] 2674 //line go.y:1522 2675 { 2676 yyVAL.list = nil 2677 } 2678 case 211: 2679 yyDollar = yyS[yypt-3 : yypt+1] 2680 //line go.y:1526 2681 { 2682 yyVAL.list = yyDollar[2].list 2683 if yyVAL.list == nil { 2684 yyVAL.list = list1(Nod(OEMPTY, nil, nil)) 2685 } 2686 } 2687 case 212: 2688 yyDollar = yyS[yypt-0 : yypt+1] 2689 //line go.y:1535 2690 { 2691 yyVAL.list = nil 2692 } 2693 case 213: 2694 yyDollar = yyS[yypt-1 : yypt+1] 2695 //line go.y:1539 2696 { 2697 yyVAL.list = list1(Nod(ODCLFIELD, nil, yyDollar[1].node)) 2698 } 2699 case 214: 2700 yyDollar = yyS[yypt-3 : yypt+1] 2701 //line go.y:1543 2702 { 2703 yyDollar[2].list = checkarglist(yyDollar[2].list, 0) 2704 yyVAL.list = yyDollar[2].list 2705 } 2706 case 215: 2707 yyDollar = yyS[yypt-1 : yypt+1] 2708 //line go.y:1550 2709 { 2710 closurehdr(yyDollar[1].node) 2711 } 2712 case 216: 2713 yyDollar = yyS[yypt-4 : yypt+1] 2714 //line go.y:1556 2715 { 2716 yyVAL.node = closurebody(yyDollar[3].list) 2717 fixlbrace(yyDollar[2].i) 2718 } 2719 case 217: 2720 yyDollar = yyS[yypt-2 : yypt+1] 2721 //line go.y:1561 2722 { 2723 yyVAL.node = closurebody(nil) 2724 } 2725 case 218: 2726 yyDollar = yyS[yypt-0 : yypt+1] 2727 //line go.y:1572 2728 { 2729 yyVAL.list = nil 2730 } 2731 case 219: 2732 yyDollar = yyS[yypt-3 : yypt+1] 2733 //line go.y:1576 2734 { 2735 yyVAL.list = concat(yyDollar[1].list, yyDollar[2].list) 2736 if nsyntaxerrors == 0 { 2737 testdclstack() 2738 } 2739 nointerface = false 2740 noescape = false 2741 norace = false 2742 nosplit = false 2743 nowritebarrier = false 2744 systemstack = false 2745 } 2746 case 221: 2747 yyDollar = yyS[yypt-3 : yypt+1] 2748 //line go.y:1592 2749 { 2750 yyVAL.list = concat(yyDollar[1].list, yyDollar[3].list) 2751 } 2752 case 223: 2753 yyDollar = yyS[yypt-3 : yypt+1] 2754 //line go.y:1599 2755 { 2756 yyVAL.list = concat(yyDollar[1].list, yyDollar[3].list) 2757 } 2758 case 224: 2759 yyDollar = yyS[yypt-1 : yypt+1] 2760 //line go.y:1605 2761 { 2762 yyVAL.list = list1(yyDollar[1].node) 2763 } 2764 case 225: 2765 yyDollar = yyS[yypt-3 : yypt+1] 2766 //line go.y:1609 2767 { 2768 yyVAL.list = list(yyDollar[1].list, yyDollar[3].node) 2769 } 2770 case 227: 2771 yyDollar = yyS[yypt-3 : yypt+1] 2772 //line go.y:1616 2773 { 2774 yyVAL.list = concat(yyDollar[1].list, yyDollar[3].list) 2775 } 2776 case 228: 2777 yyDollar = yyS[yypt-1 : yypt+1] 2778 //line go.y:1622 2779 { 2780 yyVAL.list = list1(yyDollar[1].node) 2781 } 2782 case 229: 2783 yyDollar = yyS[yypt-3 : yypt+1] 2784 //line go.y:1626 2785 { 2786 yyVAL.list = list(yyDollar[1].list, yyDollar[3].node) 2787 } 2788 case 230: 2789 yyDollar = yyS[yypt-3 : yypt+1] 2790 //line go.y:1632 2791 { 2792 var l *NodeList 2793 2794 var n *Node 2795 l = yyDollar[1].list 2796 if l == nil || l.N.Sym.Name == "?" { 2797 // ? symbol, during import (list1(nil) == nil) 2798 n = yyDollar[2].node 2799 if n.Op == OIND { 2800 n = n.Left 2801 } 2802 n = embedded(n.Sym, importpkg) 2803 n.Right = yyDollar[2].node 2804 n.SetVal(yyDollar[3].val) 2805 yyVAL.list = list1(n) 2806 break 2807 } 2808 2809 for l = yyDollar[1].list; l != nil; l = l.Next { 2810 l.N = Nod(ODCLFIELD, l.N, yyDollar[2].node) 2811 l.N.SetVal(yyDollar[3].val) 2812 } 2813 } 2814 case 231: 2815 yyDollar = yyS[yypt-2 : yypt+1] 2816 //line go.y:1656 2817 { 2818 yyDollar[1].node.SetVal(yyDollar[2].val) 2819 yyVAL.list = list1(yyDollar[1].node) 2820 } 2821 case 232: 2822 yyDollar = yyS[yypt-4 : yypt+1] 2823 //line go.y:1661 2824 { 2825 yyDollar[2].node.SetVal(yyDollar[4].val) 2826 yyVAL.list = list1(yyDollar[2].node) 2827 Yyerror("cannot parenthesize embedded type") 2828 } 2829 case 233: 2830 yyDollar = yyS[yypt-3 : yypt+1] 2831 //line go.y:1667 2832 { 2833 yyDollar[2].node.Right = Nod(OIND, yyDollar[2].node.Right, nil) 2834 yyDollar[2].node.SetVal(yyDollar[3].val) 2835 yyVAL.list = list1(yyDollar[2].node) 2836 } 2837 case 234: 2838 yyDollar = yyS[yypt-5 : yypt+1] 2839 //line go.y:1673 2840 { 2841 yyDollar[3].node.Right = Nod(OIND, yyDollar[3].node.Right, nil) 2842 yyDollar[3].node.SetVal(yyDollar[5].val) 2843 yyVAL.list = list1(yyDollar[3].node) 2844 Yyerror("cannot parenthesize embedded type") 2845 } 2846 case 235: 2847 yyDollar = yyS[yypt-5 : yypt+1] 2848 //line go.y:1680 2849 { 2850 yyDollar[3].node.Right = Nod(OIND, yyDollar[3].node.Right, nil) 2851 yyDollar[3].node.SetVal(yyDollar[5].val) 2852 yyVAL.list = list1(yyDollar[3].node) 2853 Yyerror("cannot parenthesize embedded type") 2854 } 2855 case 236: 2856 yyDollar = yyS[yypt-1 : yypt+1] 2857 //line go.y:1689 2858 { 2859 var n *Node 2860 2861 yyVAL.sym = yyDollar[1].sym 2862 n = oldname(yyDollar[1].sym) 2863 if n.Name != nil && n.Name.Pack != nil { 2864 n.Name.Pack.Used = true 2865 } 2866 } 2867 case 237: 2868 yyDollar = yyS[yypt-3 : yypt+1] 2869 //line go.y:1699 2870 { 2871 var pkg *Pkg 2872 2873 if yyDollar[1].sym.Def == nil || yyDollar[1].sym.Def.Op != OPACK { 2874 Yyerror("%v is not a package", yyDollar[1].sym) 2875 pkg = localpkg 2876 } else { 2877 yyDollar[1].sym.Def.Used = true 2878 pkg = yyDollar[1].sym.Def.Name.Pkg 2879 } 2880 yyVAL.sym = restrictlookup(yyDollar[3].sym.Name, pkg) 2881 } 2882 case 238: 2883 yyDollar = yyS[yypt-1 : yypt+1] 2884 //line go.y:1714 2885 { 2886 yyVAL.node = embedded(yyDollar[1].sym, localpkg) 2887 } 2888 case 239: 2889 yyDollar = yyS[yypt-2 : yypt+1] 2890 //line go.y:1720 2891 { 2892 yyVAL.node = Nod(ODCLFIELD, yyDollar[1].node, yyDollar[2].node) 2893 ifacedcl(yyVAL.node) 2894 } 2895 case 240: 2896 yyDollar = yyS[yypt-1 : yypt+1] 2897 //line go.y:1725 2898 { 2899 yyVAL.node = Nod(ODCLFIELD, nil, oldname(yyDollar[1].sym)) 2900 } 2901 case 241: 2902 yyDollar = yyS[yypt-3 : yypt+1] 2903 //line go.y:1729 2904 { 2905 yyVAL.node = Nod(ODCLFIELD, nil, oldname(yyDollar[2].sym)) 2906 Yyerror("cannot parenthesize embedded type") 2907 } 2908 case 242: 2909 yyDollar = yyS[yypt-4 : yypt+1] 2910 //line go.y:1736 2911 { 2912 // without func keyword 2913 yyDollar[2].list = checkarglist(yyDollar[2].list, 1) 2914 yyVAL.node = Nod(OTFUNC, fakethis(), nil) 2915 yyVAL.node.List = yyDollar[2].list 2916 yyVAL.node.Rlist = yyDollar[4].list 2917 } 2918 case 244: 2919 yyDollar = yyS[yypt-2 : yypt+1] 2920 //line go.y:1750 2921 { 2922 yyVAL.node = Nod(ONONAME, nil, nil) 2923 yyVAL.node.Sym = yyDollar[1].sym 2924 yyVAL.node = Nod(OKEY, yyVAL.node, yyDollar[2].node) 2925 } 2926 case 245: 2927 yyDollar = yyS[yypt-2 : yypt+1] 2928 //line go.y:1756 2929 { 2930 yyVAL.node = Nod(ONONAME, nil, nil) 2931 yyVAL.node.Sym = yyDollar[1].sym 2932 yyVAL.node = Nod(OKEY, yyVAL.node, yyDollar[2].node) 2933 } 2934 case 247: 2935 yyDollar = yyS[yypt-1 : yypt+1] 2936 //line go.y:1765 2937 { 2938 yyVAL.list = list1(yyDollar[1].node) 2939 } 2940 case 248: 2941 yyDollar = yyS[yypt-3 : yypt+1] 2942 //line go.y:1769 2943 { 2944 yyVAL.list = list(yyDollar[1].list, yyDollar[3].node) 2945 } 2946 case 249: 2947 yyDollar = yyS[yypt-0 : yypt+1] 2948 //line go.y:1774 2949 { 2950 yyVAL.list = nil 2951 } 2952 case 250: 2953 yyDollar = yyS[yypt-2 : yypt+1] 2954 //line go.y:1778 2955 { 2956 yyVAL.list = yyDollar[1].list 2957 } 2958 case 251: 2959 yyDollar = yyS[yypt-0 : yypt+1] 2960 //line go.y:1786 2961 { 2962 yyVAL.node = nil 2963 } 2964 case 253: 2965 yyDollar = yyS[yypt-1 : yypt+1] 2966 //line go.y:1791 2967 { 2968 yyVAL.node = liststmt(yyDollar[1].list) 2969 } 2970 case 255: 2971 yyDollar = yyS[yypt-1 : yypt+1] 2972 //line go.y:1796 2973 { 2974 yyVAL.node = nil 2975 } 2976 case 261: 2977 yyDollar = yyS[yypt-2 : yypt+1] 2978 //line go.y:1807 2979 { 2980 yyDollar[1].node = Nod(OLABEL, yyDollar[1].node, nil) 2981 yyDollar[1].node.Sym = dclstack // context, for goto restrictions 2982 } 2983 case 262: 2984 yyDollar = yyS[yypt-4 : yypt+1] 2985 //line go.y:1812 2986 { 2987 var l *NodeList 2988 2989 yyDollar[1].node.Name.Defn = yyDollar[4].node 2990 l = list1(yyDollar[1].node) 2991 if yyDollar[4].node != nil { 2992 l = list(l, yyDollar[4].node) 2993 } 2994 yyVAL.node = liststmt(l) 2995 } 2996 case 263: 2997 yyDollar = yyS[yypt-1 : yypt+1] 2998 //line go.y:1823 2999 { 3000 // will be converted to OFALL 3001 yyVAL.node = Nod(OXFALL, nil, nil) 3002 yyVAL.node.Xoffset = int64(block) 3003 } 3004 case 264: 3005 yyDollar = yyS[yypt-2 : yypt+1] 3006 //line go.y:1829 3007 { 3008 yyVAL.node = Nod(OBREAK, yyDollar[2].node, nil) 3009 } 3010 case 265: 3011 yyDollar = yyS[yypt-2 : yypt+1] 3012 //line go.y:1833 3013 { 3014 yyVAL.node = Nod(OCONTINUE, yyDollar[2].node, nil) 3015 } 3016 case 266: 3017 yyDollar = yyS[yypt-2 : yypt+1] 3018 //line go.y:1837 3019 { 3020 yyVAL.node = Nod(OPROC, yyDollar[2].node, nil) 3021 } 3022 case 267: 3023 yyDollar = yyS[yypt-2 : yypt+1] 3024 //line go.y:1841 3025 { 3026 yyVAL.node = Nod(ODEFER, yyDollar[2].node, nil) 3027 } 3028 case 268: 3029 yyDollar = yyS[yypt-2 : yypt+1] 3030 //line go.y:1845 3031 { 3032 yyVAL.node = Nod(OGOTO, yyDollar[2].node, nil) 3033 yyVAL.node.Sym = dclstack // context, for goto restrictions 3034 } 3035 case 269: 3036 yyDollar = yyS[yypt-2 : yypt+1] 3037 //line go.y:1850 3038 { 3039 yyVAL.node = Nod(ORETURN, nil, nil) 3040 yyVAL.node.List = yyDollar[2].list 3041 if yyVAL.node.List == nil && Curfn != nil { 3042 var l *NodeList 3043 3044 for l = Curfn.Func.Dcl; l != nil; l = l.Next { 3045 if l.N.Class == PPARAM { 3046 continue 3047 } 3048 if l.N.Class != PPARAMOUT { 3049 break 3050 } 3051 if l.N.Sym.Def != l.N { 3052 Yyerror("%s is shadowed during return", l.N.Sym.Name) 3053 } 3054 } 3055 } 3056 } 3057 case 270: 3058 yyDollar = yyS[yypt-1 : yypt+1] 3059 //line go.y:1872 3060 { 3061 yyVAL.list = nil 3062 if yyDollar[1].node != nil { 3063 yyVAL.list = list1(yyDollar[1].node) 3064 } 3065 } 3066 case 271: 3067 yyDollar = yyS[yypt-3 : yypt+1] 3068 //line go.y:1879 3069 { 3070 yyVAL.list = yyDollar[1].list 3071 if yyDollar[3].node != nil { 3072 yyVAL.list = list(yyVAL.list, yyDollar[3].node) 3073 } 3074 } 3075 case 272: 3076 yyDollar = yyS[yypt-1 : yypt+1] 3077 //line go.y:1888 3078 { 3079 yyVAL.list = list1(yyDollar[1].node) 3080 } 3081 case 273: 3082 yyDollar = yyS[yypt-3 : yypt+1] 3083 //line go.y:1892 3084 { 3085 yyVAL.list = list(yyDollar[1].list, yyDollar[3].node) 3086 } 3087 case 274: 3088 yyDollar = yyS[yypt-1 : yypt+1] 3089 //line go.y:1898 3090 { 3091 yyVAL.list = list1(yyDollar[1].node) 3092 } 3093 case 275: 3094 yyDollar = yyS[yypt-3 : yypt+1] 3095 //line go.y:1902 3096 { 3097 yyVAL.list = list(yyDollar[1].list, yyDollar[3].node) 3098 } 3099 case 276: 3100 yyDollar = yyS[yypt-1 : yypt+1] 3101 //line go.y:1908 3102 { 3103 yyVAL.list = list1(yyDollar[1].node) 3104 } 3105 case 277: 3106 yyDollar = yyS[yypt-3 : yypt+1] 3107 //line go.y:1912 3108 { 3109 yyVAL.list = list(yyDollar[1].list, yyDollar[3].node) 3110 } 3111 case 278: 3112 yyDollar = yyS[yypt-1 : yypt+1] 3113 //line go.y:1918 3114 { 3115 yyVAL.list = list1(yyDollar[1].node) 3116 } 3117 case 279: 3118 yyDollar = yyS[yypt-3 : yypt+1] 3119 //line go.y:1922 3120 { 3121 yyVAL.list = list(yyDollar[1].list, yyDollar[3].node) 3122 } 3123 case 280: 3124 yyDollar = yyS[yypt-1 : yypt+1] 3125 //line go.y:1931 3126 { 3127 yyVAL.list = list1(yyDollar[1].node) 3128 } 3129 case 281: 3130 yyDollar = yyS[yypt-1 : yypt+1] 3131 //line go.y:1935 3132 { 3133 yyVAL.list = list1(yyDollar[1].node) 3134 } 3135 case 282: 3136 yyDollar = yyS[yypt-3 : yypt+1] 3137 //line go.y:1939 3138 { 3139 yyVAL.list = list(yyDollar[1].list, yyDollar[3].node) 3140 } 3141 case 283: 3142 yyDollar = yyS[yypt-3 : yypt+1] 3143 //line go.y:1943 3144 { 3145 yyVAL.list = list(yyDollar[1].list, yyDollar[3].node) 3146 } 3147 case 284: 3148 yyDollar = yyS[yypt-0 : yypt+1] 3149 //line go.y:1948 3150 { 3151 yyVAL.list = nil 3152 } 3153 case 285: 3154 yyDollar = yyS[yypt-2 : yypt+1] 3155 //line go.y:1952 3156 { 3157 yyVAL.list = yyDollar[1].list 3158 } 3159 case 290: 3160 yyDollar = yyS[yypt-0 : yypt+1] 3161 //line go.y:1966 3162 { 3163 yyVAL.node = nil 3164 } 3165 case 292: 3166 yyDollar = yyS[yypt-0 : yypt+1] 3167 //line go.y:1972 3168 { 3169 yyVAL.list = nil 3170 } 3171 case 294: 3172 yyDollar = yyS[yypt-0 : yypt+1] 3173 //line go.y:1978 3174 { 3175 yyVAL.node = nil 3176 } 3177 case 296: 3178 yyDollar = yyS[yypt-0 : yypt+1] 3179 //line go.y:1984 3180 { 3181 yyVAL.list = nil 3182 } 3183 case 298: 3184 yyDollar = yyS[yypt-0 : yypt+1] 3185 //line go.y:1990 3186 { 3187 yyVAL.list = nil 3188 } 3189 case 300: 3190 yyDollar = yyS[yypt-0 : yypt+1] 3191 //line go.y:1996 3192 { 3193 yyVAL.list = nil 3194 } 3195 case 302: 3196 yyDollar = yyS[yypt-0 : yypt+1] 3197 //line go.y:2002 3198 { 3199 yyVAL.val.U = nil 3200 } 3201 case 304: 3202 yyDollar = yyS[yypt-4 : yypt+1] 3203 //line go.y:2012 3204 { 3205 importimport(yyDollar[2].sym, yyDollar[3].val.U.(string)) 3206 } 3207 case 305: 3208 yyDollar = yyS[yypt-4 : yypt+1] 3209 //line go.y:2016 3210 { 3211 importvar(yyDollar[2].sym, yyDollar[3].typ) 3212 } 3213 case 306: 3214 yyDollar = yyS[yypt-5 : yypt+1] 3215 //line go.y:2020 3216 { 3217 importconst(yyDollar[2].sym, Types[TIDEAL], yyDollar[4].node) 3218 } 3219 case 307: 3220 yyDollar = yyS[yypt-6 : yypt+1] 3221 //line go.y:2024 3222 { 3223 importconst(yyDollar[2].sym, yyDollar[3].typ, yyDollar[5].node) 3224 } 3225 case 308: 3226 yyDollar = yyS[yypt-4 : yypt+1] 3227 //line go.y:2028 3228 { 3229 importtype(yyDollar[2].typ, yyDollar[3].typ) 3230 } 3231 case 309: 3232 yyDollar = yyS[yypt-4 : yypt+1] 3233 //line go.y:2032 3234 { 3235 if yyDollar[2].node == nil { 3236 dclcontext = PEXTERN // since we skip the funcbody below 3237 break 3238 } 3239 3240 yyDollar[2].node.Func.Inl = yyDollar[3].list 3241 3242 funcbody(yyDollar[2].node) 3243 importlist = list(importlist, yyDollar[2].node) 3244 3245 if Debug['E'] > 0 { 3246 fmt.Printf("import [%q] func %v \n", importpkg.Path, yyDollar[2].node) 3247 if Debug['m'] > 2 && yyDollar[2].node.Func.Inl != nil { 3248 fmt.Printf("inl body:%v\n", yyDollar[2].node.Func.Inl) 3249 } 3250 } 3251 } 3252 case 310: 3253 yyDollar = yyS[yypt-1 : yypt+1] 3254 //line go.y:2053 3255 { 3256 yyVAL.sym = yyDollar[1].sym 3257 structpkg = yyVAL.sym.Pkg 3258 } 3259 case 311: 3260 yyDollar = yyS[yypt-1 : yypt+1] 3261 //line go.y:2060 3262 { 3263 yyVAL.typ = pkgtype(yyDollar[1].sym) 3264 importsym(yyDollar[1].sym, OTYPE) 3265 } 3266 case 317: 3267 yyDollar = yyS[yypt-1 : yypt+1] 3268 //line go.y:2080 3269 { 3270 yyVAL.typ = pkgtype(yyDollar[1].sym) 3271 } 3272 case 318: 3273 yyDollar = yyS[yypt-1 : yypt+1] 3274 //line go.y:2084 3275 { 3276 // predefined name like uint8 3277 yyDollar[1].sym = Pkglookup(yyDollar[1].sym.Name, builtinpkg) 3278 if yyDollar[1].sym.Def == nil || yyDollar[1].sym.Def.Op != OTYPE { 3279 Yyerror("%s is not a type", yyDollar[1].sym.Name) 3280 yyVAL.typ = nil 3281 } else { 3282 yyVAL.typ = yyDollar[1].sym.Def.Type 3283 } 3284 } 3285 case 319: 3286 yyDollar = yyS[yypt-3 : yypt+1] 3287 //line go.y:2095 3288 { 3289 yyVAL.typ = aindex(nil, yyDollar[3].typ) 3290 } 3291 case 320: 3292 yyDollar = yyS[yypt-4 : yypt+1] 3293 //line go.y:2099 3294 { 3295 yyVAL.typ = aindex(nodlit(yyDollar[2].val), yyDollar[4].typ) 3296 } 3297 case 321: 3298 yyDollar = yyS[yypt-5 : yypt+1] 3299 //line go.y:2103 3300 { 3301 yyVAL.typ = maptype(yyDollar[3].typ, yyDollar[5].typ) 3302 } 3303 case 322: 3304 yyDollar = yyS[yypt-4 : yypt+1] 3305 //line go.y:2107 3306 { 3307 yyVAL.typ = tostruct(yyDollar[3].list) 3308 } 3309 case 323: 3310 yyDollar = yyS[yypt-4 : yypt+1] 3311 //line go.y:2111 3312 { 3313 yyVAL.typ = tointerface(yyDollar[3].list) 3314 } 3315 case 324: 3316 yyDollar = yyS[yypt-2 : yypt+1] 3317 //line go.y:2115 3318 { 3319 yyVAL.typ = Ptrto(yyDollar[2].typ) 3320 } 3321 case 325: 3322 yyDollar = yyS[yypt-2 : yypt+1] 3323 //line go.y:2119 3324 { 3325 yyVAL.typ = typ(TCHAN) 3326 yyVAL.typ.Type = yyDollar[2].typ 3327 yyVAL.typ.Chan = Cboth 3328 } 3329 case 326: 3330 yyDollar = yyS[yypt-4 : yypt+1] 3331 //line go.y:2125 3332 { 3333 yyVAL.typ = typ(TCHAN) 3334 yyVAL.typ.Type = yyDollar[3].typ 3335 yyVAL.typ.Chan = Cboth 3336 } 3337 case 327: 3338 yyDollar = yyS[yypt-3 : yypt+1] 3339 //line go.y:2131 3340 { 3341 yyVAL.typ = typ(TCHAN) 3342 yyVAL.typ.Type = yyDollar[3].typ 3343 yyVAL.typ.Chan = Csend 3344 } 3345 case 328: 3346 yyDollar = yyS[yypt-3 : yypt+1] 3347 //line go.y:2139 3348 { 3349 yyVAL.typ = typ(TCHAN) 3350 yyVAL.typ.Type = yyDollar[3].typ 3351 yyVAL.typ.Chan = Crecv 3352 } 3353 case 329: 3354 yyDollar = yyS[yypt-5 : yypt+1] 3355 //line go.y:2147 3356 { 3357 yyVAL.typ = functype(nil, yyDollar[3].list, yyDollar[5].list) 3358 } 3359 case 330: 3360 yyDollar = yyS[yypt-3 : yypt+1] 3361 //line go.y:2153 3362 { 3363 yyVAL.node = Nod(ODCLFIELD, nil, typenod(yyDollar[2].typ)) 3364 if yyDollar[1].sym != nil { 3365 yyVAL.node.Left = newname(yyDollar[1].sym) 3366 } 3367 yyVAL.node.SetVal(yyDollar[3].val) 3368 } 3369 case 331: 3370 yyDollar = yyS[yypt-4 : yypt+1] 3371 //line go.y:2161 3372 { 3373 var t *Type 3374 3375 t = typ(TARRAY) 3376 t.Bound = -1 3377 t.Type = yyDollar[3].typ 3378 3379 yyVAL.node = Nod(ODCLFIELD, nil, typenod(t)) 3380 if yyDollar[1].sym != nil { 3381 yyVAL.node.Left = newname(yyDollar[1].sym) 3382 } 3383 yyVAL.node.Isddd = true 3384 yyVAL.node.SetVal(yyDollar[4].val) 3385 } 3386 case 332: 3387 yyDollar = yyS[yypt-3 : yypt+1] 3388 //line go.y:2178 3389 { 3390 var s *Sym 3391 var p *Pkg 3392 3393 if yyDollar[1].sym != nil && yyDollar[1].sym.Name != "?" { 3394 yyVAL.node = Nod(ODCLFIELD, newname(yyDollar[1].sym), typenod(yyDollar[2].typ)) 3395 yyVAL.node.SetVal(yyDollar[3].val) 3396 } else { 3397 s = yyDollar[2].typ.Sym 3398 if s == nil && Isptr[yyDollar[2].typ.Etype] { 3399 s = yyDollar[2].typ.Type.Sym 3400 } 3401 p = importpkg 3402 if yyDollar[1].sym != nil { 3403 p = yyDollar[1].sym.Pkg 3404 } 3405 yyVAL.node = embedded(s, p) 3406 yyVAL.node.Right = typenod(yyDollar[2].typ) 3407 yyVAL.node.SetVal(yyDollar[3].val) 3408 } 3409 } 3410 case 333: 3411 yyDollar = yyS[yypt-5 : yypt+1] 3412 //line go.y:2202 3413 { 3414 yyVAL.node = Nod(ODCLFIELD, newname(yyDollar[1].sym), typenod(functype(fakethis(), yyDollar[3].list, yyDollar[5].list))) 3415 } 3416 case 334: 3417 yyDollar = yyS[yypt-1 : yypt+1] 3418 //line go.y:2206 3419 { 3420 yyVAL.node = Nod(ODCLFIELD, nil, typenod(yyDollar[1].typ)) 3421 } 3422 case 335: 3423 yyDollar = yyS[yypt-0 : yypt+1] 3424 //line go.y:2211 3425 { 3426 yyVAL.list = nil 3427 } 3428 case 337: 3429 yyDollar = yyS[yypt-3 : yypt+1] 3430 //line go.y:2218 3431 { 3432 yyVAL.list = yyDollar[2].list 3433 } 3434 case 338: 3435 yyDollar = yyS[yypt-1 : yypt+1] 3436 //line go.y:2222 3437 { 3438 yyVAL.list = list1(Nod(ODCLFIELD, nil, typenod(yyDollar[1].typ))) 3439 } 3440 case 339: 3441 yyDollar = yyS[yypt-1 : yypt+1] 3442 //line go.y:2232 3443 { 3444 yyVAL.node = nodlit(yyDollar[1].val) 3445 } 3446 case 340: 3447 yyDollar = yyS[yypt-2 : yypt+1] 3448 //line go.y:2236 3449 { 3450 yyVAL.node = nodlit(yyDollar[2].val) 3451 switch yyVAL.node.Val().Ctype() { 3452 case CTINT, CTRUNE: 3453 mpnegfix(yyVAL.node.Val().U.(*Mpint)) 3454 break 3455 case CTFLT: 3456 mpnegflt(yyVAL.node.Val().U.(*Mpflt)) 3457 break 3458 case CTCPLX: 3459 mpnegflt(&yyVAL.node.Val().U.(*Mpcplx).Real) 3460 mpnegflt(&yyVAL.node.Val().U.(*Mpcplx).Imag) 3461 break 3462 default: 3463 Yyerror("bad negated constant") 3464 } 3465 } 3466 case 341: 3467 yyDollar = yyS[yypt-1 : yypt+1] 3468 //line go.y:2254 3469 { 3470 yyVAL.node = oldname(Pkglookup(yyDollar[1].sym.Name, builtinpkg)) 3471 if yyVAL.node.Op != OLITERAL { 3472 Yyerror("bad constant %v", yyVAL.node.Sym) 3473 } 3474 } 3475 case 343: 3476 yyDollar = yyS[yypt-5 : yypt+1] 3477 //line go.y:2264 3478 { 3479 if yyDollar[2].node.Val().Ctype() == CTRUNE && yyDollar[4].node.Val().Ctype() == CTINT { 3480 yyVAL.node = yyDollar[2].node 3481 mpaddfixfix(yyDollar[2].node.Val().U.(*Mpint), yyDollar[4].node.Val().U.(*Mpint), 0) 3482 break 3483 } 3484 yyDollar[4].node.Val().U.(*Mpcplx).Real = yyDollar[4].node.Val().U.(*Mpcplx).Imag 3485 Mpmovecflt(&yyDollar[4].node.Val().U.(*Mpcplx).Imag, 0.0) 3486 yyVAL.node = nodcplxlit(yyDollar[2].node.Val(), yyDollar[4].node.Val()) 3487 } 3488 case 346: 3489 yyDollar = yyS[yypt-1 : yypt+1] 3490 //line go.y:2280 3491 { 3492 yyVAL.list = list1(yyDollar[1].node) 3493 } 3494 case 347: 3495 yyDollar = yyS[yypt-3 : yypt+1] 3496 //line go.y:2284 3497 { 3498 yyVAL.list = list(yyDollar[1].list, yyDollar[3].node) 3499 } 3500 case 348: 3501 yyDollar = yyS[yypt-1 : yypt+1] 3502 //line go.y:2290 3503 { 3504 yyVAL.list = list1(yyDollar[1].node) 3505 } 3506 case 349: 3507 yyDollar = yyS[yypt-3 : yypt+1] 3508 //line go.y:2294 3509 { 3510 yyVAL.list = list(yyDollar[1].list, yyDollar[3].node) 3511 } 3512 case 350: 3513 yyDollar = yyS[yypt-1 : yypt+1] 3514 //line go.y:2300 3515 { 3516 yyVAL.list = list1(yyDollar[1].node) 3517 } 3518 case 351: 3519 yyDollar = yyS[yypt-3 : yypt+1] 3520 //line go.y:2304 3521 { 3522 yyVAL.list = list(yyDollar[1].list, yyDollar[3].node) 3523 } 3524 } 3525 goto yystack /* stack new state and value */ 3526 } 3527