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