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