blob: b05fe8f34e2c5a057cf4042edeabbfaf6d53f625 [file] [log] [blame]
//line go.y:21
package gc
import __yyfmt__ "fmt"
//line go.y:21
import (
"strings"
)
//line go.y:27
type yySymType struct {
yys int
node *Node
list *NodeList
typ *Type
sym *Sym
val Val
i int
}
const LLITERAL = 57346
const LASOP = 57347
const LCOLAS = 57348
const LBREAK = 57349
const LCASE = 57350
const LCHAN = 57351
const LCONST = 57352
const LCONTINUE = 57353
const LDDD = 57354
const LDEFAULT = 57355
const LDEFER = 57356
const LELSE = 57357
const LFALL = 57358
const LFOR = 57359
const LFUNC = 57360
const LGO = 57361
const LGOTO = 57362
const LIF = 57363
const LIMPORT = 57364
const LINTERFACE = 57365
const LMAP = 57366
const LNAME = 57367
const LPACKAGE = 57368
const LRANGE = 57369
const LRETURN = 57370
const LSELECT = 57371
const LSTRUCT = 57372
const LSWITCH = 57373
const LTYPE = 57374
const LVAR = 57375
const LANDAND = 57376
const LANDNOT = 57377
const LBODY = 57378
const LCOMM = 57379
const LDEC = 57380
const LEQ = 57381
const LGE = 57382
const LGT = 57383
const LIGNORE = 57384
const LINC = 57385
const LLE = 57386
const LLSH = 57387
const LLT = 57388
const LNE = 57389
const LOROR = 57390
const LRSH = 57391
const NotPackage = 57392
const NotParen = 57393
const PreferToRightParen = 57394
var yyToknames = []string{
"LLITERAL",
"LASOP",
"LCOLAS",
"LBREAK",
"LCASE",
"LCHAN",
"LCONST",
"LCONTINUE",
"LDDD",
"LDEFAULT",
"LDEFER",
"LELSE",
"LFALL",
"LFOR",
"LFUNC",
"LGO",
"LGOTO",
"LIF",
"LIMPORT",
"LINTERFACE",
"LMAP",
"LNAME",
"LPACKAGE",
"LRANGE",
"LRETURN",
"LSELECT",
"LSTRUCT",
"LSWITCH",
"LTYPE",
"LVAR",
"LANDAND",
"LANDNOT",
"LBODY",
"LCOMM",
"LDEC",
"LEQ",
"LGE",
"LGT",
"LIGNORE",
"LINC",
"LLE",
"LLSH",
"LLT",
"LNE",
"LOROR",
"LRSH",
"'+'",
"'-'",
"'|'",
"'^'",
"'*'",
"'/'",
"'%'",
"'&'",
"NotPackage",
"NotParen",
"'('",
"')'",
"PreferToRightParen",
}
var yyStatenames = []string{}
const yyEofCode = 1
const yyErrCode = 2
const yyMaxDepth = 200
//line go.y:2242
func fixlbrace(lbr int) {
// If the opening brace was an LBODY,
// set up for another one now that we're done.
// See comment in lex.C about loophack.
if lbr == LBODY {
loophack = 1
}
}
//line yacctab:1
var yyExca = []int{
-1, 1,
1, -1,
-2, 0,
-1, 17,
1, 1,
63, 23,
-2, 0,
-1, 48,
6, 276,
66, 276,
76, 276,
-2, 49,
-1, 56,
67, 153,
-2, 162,
-1, 74,
60, 181,
-2, 215,
-1, 75,
60, 182,
-2, 183,
-1, 121,
60, 134,
64, 134,
68, 134,
72, 134,
-2, 266,
-1, 125,
60, 134,
64, 134,
68, 134,
72, 134,
-2, 267,
-1, 176,
2, 215,
36, 215,
60, 181,
68, 215,
-2, 173,
-1, 177,
36, 183,
60, 182,
68, 183,
-2, 174,
-1, 184,
63, 251,
69, 251,
-2, 0,
-1, 242,
63, 251,
69, 251,
-2, 0,
-1, 252,
8, 251,
13, 251,
63, 251,
69, 251,
-2, 0,
-1, 325,
4, 236,
63, 236,
69, 236,
-2, 157,
-1, 407,
36, 176,
60, 176,
68, 176,
-2, 167,
-1, 408,
36, 177,
60, 177,
68, 177,
-2, 168,
-1, 409,
36, 178,
60, 178,
68, 178,
-2, 169,
-1, 410,
36, 179,
60, 179,
68, 179,
-2, 170,
-1, 416,
8, 251,
13, 251,
63, 251,
69, 251,
-2, 0,
-1, 417,
63, 251,
69, 251,
-2, 0,
-1, 497,
63, 251,
69, 251,
-2, 0,
-1, 552,
60, 157,
-2, 318,
-1, 553,
60, 158,
-2, 317,
-1, 578,
8, 251,
13, 251,
63, 251,
69, 251,
-2, 0,
-1, 592,
36, 180,
60, 180,
68, 180,
-2, 171,
}
const yyNprod = 352
const yyPrivate = 57344
var yyTokenNames []string
var yyStates []string
const yyLast = 2282
var yyAct = []int{
74, 381, 304, 285, 291, 486, 610, 398, 545, 478,
549, 296, 186, 75, 400, 229, 302, 401, 103, 389,
458, 356, 290, 318, 457, 34, 303, 338, 230, 245,
466, 109, 339, 101, 337, 332, 85, 104, 374, 248,
246, 174, 467, 286, 14, 324, 479, 328, 241, 212,
108, 6, 325, 155, 243, 469, 226, 181, 468, 516,
413, 320, 373, 392, 325, 219, 13, 208, 176, 10,
11, 584, 172, 469, 651, 385, 599, 583, 106, 191,
13, 177, 460, 541, 422, 160, 310, 331, 613, 161,
309, 446, 192, 322, 193, 626, 327, 162, 198, 321,
88, 12, 13, 10, 227, 238, 662, 194, 317, 227,
632, 448, 227, 12, 13, 227, 209, 228, 12, 13,
447, 10, 228, 203, 175, 228, 108, 393, 228, 461,
54, 660, 205, 445, 184, 384, 222, 460, 459, 204,
199, 200, 239, 88, 506, 155, 214, 216, 218, 507,
427, 631, 12, 13, 233, 625, 624, 202, 10, 88,
90, 176, 55, 288, 10, 627, 213, 213, 213, 213,
12, 13, 118, 118, 177, 295, 126, 154, 308, 176,
10, 416, 282, 282, 461, 282, 603, 620, 416, 10,
600, 227, 177, 301, 593, 416, 227, 227, 404, 227,
280, 484, 444, 90, 228, 622, 536, 12, 13, 228,
228, 506, 228, 12, 13, 86, 507, 175, 527, 90,
298, 163, 164, 165, 166, 167, 168, 169, 170, 12,
13, 523, 227, 580, 515, 175, 182, 153, 12, 13,
242, 171, 325, 397, 416, 228, 330, 155, 227, 334,
415, 227, 227, 116, 227, 185, 358, 367, 463, 371,
360, 228, 355, 362, 228, 228, 353, 228, 183, 365,
210, 322, 504, 369, 434, 314, 68, 321, 91, 379,
614, 78, 416, 340, 609, 340, 340, 376, 375, 182,
124, 12, 13, 604, 176, 83, 79, 10, 394, 325,
407, 336, 82, 351, 352, 10, 378, 177, 380, 414,
227, 227, 601, 408, 574, 409, 608, 10, 568, 558,
227, 183, 48, 228, 228, 465, 10, 464, 410, 391,
323, 329, 67, 228, 331, 348, 443, 656, 442, 412,
293, 163, 170, 605, 77, 436, 12, 13, 12, 13,
175, 424, 423, 234, 12, 13, 388, 383, 370, 366,
359, 114, 435, 333, 655, 227, 12, 13, 100, 129,
441, 99, 10, 490, 227, 12, 13, 439, 228, 84,
454, 20, 453, 429, 432, 480, 491, 228, 492, 654,
173, 10, 508, 473, 176, 10, 653, 645, 511, 619,
188, 493, 483, 494, 616, 607, 227, 177, 221, 282,
514, 606, 227, 597, 282, 519, 520, 340, 340, 228,
596, 12, 13, 227, 595, 228, 110, 498, 340, 489,
107, 510, 502, 592, 525, 449, 228, 582, 517, 227,
12, 13, 562, 524, 12, 13, 470, 539, 528, 531,
175, 522, 228, 254, 513, 512, 255, 256, 257, 258,
259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
269, 270, 271, 272, 273, 274, 129, 129, 277, 554,
559, 227, 330, 173, 537, 294, 509, 557, 561, 227,
69, 564, 532, 538, 228, 534, 490, 490, 496, 495,
482, 572, 228, 300, 476, 475, 472, 176, 440, 491,
491, 492, 492, 567, 573, 340, 10, 340, 420, 553,
177, 577, 372, 340, 493, 493, 340, 590, 591, 579,
297, 585, 570, 540, 586, 542, 456, 551, 431, 438,
249, 555, 340, 571, 556, 354, 253, 129, 251, 180,
431, 102, 489, 489, 382, 323, 501, 530, 287, 129,
566, 117, 7, 175, 70, 12, 13, 329, 5, 197,
431, 227, 211, 433, 24, 16, 529, 19, 617, 430,
650, 455, 364, 533, 228, 428, 560, 480, 305, 335,
207, 206, 21, 93, 197, 623, 252, 629, 490, 197,
282, 630, 197, 635, 120, 197, 26, 386, 121, 125,
637, 491, 340, 492, 641, 639, 173, 340, 621, 402,
57, 565, 306, 76, 402, 618, 493, 158, 176, 642,
598, 387, 511, 340, 157, 602, 640, 665, 652, 581,
28, 177, 390, 643, 223, 644, 490, 159, 156, 235,
96, 657, 240, 661, 489, 497, 578, 417, 98, 491,
663, 492, 94, 664, 122, 122, 31, 22, 667, 666,
340, 15, 97, 95, 493, 553, 23, 201, 340, 49,
18, 197, 594, 129, 175, 3, 197, 197, 636, 197,
129, 282, 8, 551, 4, 2, 1, 450, 215, 543,
544, 547, 489, 548, 611, 92, 487, 129, 129, 189,
80, 81, 437, 72, 71, 237, 173, 615, 477, 316,
188, 220, 197, 326, 340, 244, 128, 340, 648, 628,
649, 311, 127, 17, 399, 319, 312, 313, 197, 315,
25, 197, 197, 27, 197, 36, 633, 634, 78, 37,
281, 66, 111, 638, 39, 38, 35, 124, 279, 278,
73, 217, 83, 79, 10, 113, 587, 149, 503, 82,
505, 87, 363, 0, 123, 0, 232, 150, 0, 0,
9, 151, 141, 142, 143, 144, 145, 146, 147, 148,
197, 377, 56, 196, 89, 0, 0, 0, 0, 231,
197, 197, 0, 0, 0, 105, 105, 112, 115, 0,
197, 77, 0, 12, 13, 426, 119, 119, 0, 0,
119, 0, 575, 576, 0, 0, 0, 0, 0, 173,
0, 0, 0, 275, 276, 0, 283, 0, 0, 402,
406, 588, 402, 402, 0, 0, 0, 0, 0, 0,
418, 419, 0, 0, 0, 197, 0, 0, 78, 0,
425, 89, 0, 197, 197, 0, 0, 124, 0, 0,
0, 0, 83, 79, 10, 0, 0, 105, 149, 82,
0, 0, 105, 0, 0, 112, 232, 0, 150, 247,
0, 0, 151, 0, 0, 0, 197, 145, 146, 147,
148, 0, 197, 196, 361, 406, 0, 188, 0, 231,
0, 0, 0, 197, 0, 236, 368, 78, 0, 0,
250, 77, 0, 12, 13, 225, 124, 0, 0, 197,
0, 83, 79, 10, 0, 0, 292, 0, 82, 0,
0, 0, 0, 0, 0, 232, 311, 0, 646, 647,
173, 0, 521, 402, 0, 0, 0, 0, 0, 56,
0, 0, 196, 526, 0, 0, 0, 0, 231, 0,
0, 197, 0, 0, 119, 119, 0, 0, 0, 197,
77, 0, 12, 13, 0, 0, 197, 197, 0, 0,
0, 0, 134, 149, 357, 152, 0, 135, 139, 140,
105, 0, 138, 150, 137, 136, 133, 151, 141, 142,
143, 144, 145, 146, 147, 148, 0, 56, 0, 0,
0, 569, 0, 0, 0, 0, 247, 56, 247, 0,
68, 0, 0, 0, 413, 78, 0, 0, 0, 78,
474, 0, 0, 0, 124, 0, 0, 481, 124, 83,
79, 10, 0, 83, 79, 10, 82, 0, 0, 0,
82, 197, 0, 65, 275, 276, 0, 232, 0, 0,
0, 0, 0, 0, 0, 0, 60, 61, 0, 64,
58, 0, 0, 59, 196, 0, 67, 0, 197, 421,
488, 0, 0, 0, 403, 0, 62, 63, 77, 0,
12, 13, 77, 0, 12, 13, 0, 68, 89, 0,
0, 0, 78, 0, 0, 0, 0, 0, 0, 0,
0, 124, 0, 347, 0, 462, 83, 79, 10, 357,
0, 0, 349, 82, 105, 0, 197, 345, 343, 341,
65, 105, 0, 0, 344, 112, 0, 485, 247, 0,
0, 348, 0, 60, 61, 0, 64, 58, 0, 0,
59, 0, 0, 67, 0, 0, 0, 78, 346, 0,
0, 589, 0, 62, 63, 77, 124, 12, 13, 0,
350, 83, 79, 10, 0, 0, 342, 0, 82, 13,
0, 56, 56, 0, 0, 232, 0, 0, 0, 119,
0, 119, 0, 0, 0, 0, 0, 0, 0, 535,
0, 119, 196, 247, 0, 0, 0, 0, 231, 0,
0, 0, 546, 550, 0, 0, 0, 0, 0, 0,
77, 357, 12, 13, 462, 0, 0, 0, 462, 0,
0, 0, 0, 563, 357, 0, 0, 0, 0, 0,
0, 0, 307, 0, 68, 0, 0, 41, 0, 78,
47, 42, 0, 247, 44, 0, 40, 50, 124, 43,
45, 53, 56, 83, 79, 10, 0, 0, 46, 52,
82, 51, 32, 30, 0, 0, 0, 65, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
60, 61, 0, 64, 58, 0, 0, 59, 0, 0,
67, 0, 0, 0, 0, 0, 0, 0, 308, 0,
62, 63, 77, 0, 12, 13, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 29, 105, 68, 247, 0, 41, 0, 78,
47, 42, 0, 56, 44, 0, 40, 50, 33, 43,
45, 53, 0, 83, 79, 10, 0, 0, 46, 52,
82, 51, 32, 30, 0, 0, 546, 65, 0, 550,
357, 0, 0, 462, 0, 0, 0, 357, 0, 357,
60, 61, 0, 64, 58, 0, 0, 59, 0, 68,
67, 0, 0, 0, 78, 0, 0, 0, 0, 0,
62, 63, 77, 124, 12, 13, 0, 0, 83, 79,
10, 0, 500, 0, 0, 82, 0, 0, 0, 0,
0, 0, 65, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 60, 61, 0, 64, 58,
0, 0, 59, 0, 68, 67, 0, 0, 0, 78,
0, 0, 0, 0, 0, 62, 63, 77, 124, 12,
13, 0, 0, 83, 79, 10, 0, 499, 0, 0,
82, 0, 0, 0, 0, 0, 0, 65, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
60, 61, 0, 64, 58, 0, 0, 59, 0, 68,
67, 0, 0, 0, 78, 0, 0, 0, 299, 0,
62, 63, 77, 124, 12, 13, 0, 124, 83, 79,
10, 0, 83, 79, 10, 82, 0, 395, 0, 82,
0, 0, 179, 0, 0, 0, 232, 0, 0, 0,
0, 0, 68, 0, 0, 60, 61, 78, 64, 178,
0, 0, 59, 196, 0, 67, 124, 0, 0, 231,
0, 83, 79, 10, 0, 62, 63, 77, 82, 12,
13, 77, 0, 12, 13, 179, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 60, 61,
0, 64, 178, 0, 0, 59, 0, 68, 67, 289,
0, 0, 78, 0, 0, 0, 0, 0, 62, 63,
77, 124, 12, 13, 0, 0, 83, 79, 10, 0,
284, 0, 0, 82, 0, 0, 0, 0, 0, 0,
65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
68, 0, 0, 60, 61, 78, 64, 58, 187, 0,
59, 0, 0, 67, 124, 0, 0, 0, 0, 83,
79, 10, 0, 62, 63, 77, 82, 12, 13, 0,
0, 0, 0, 65, 0, 0, 0, 0, 0, 0,
0, 0, 0, 68, 0, 0, 60, 61, 78, 64,
58, 0, 0, 59, 0, 0, 67, 124, 0, 0,
0, 0, 83, 79, 10, 0, 62, 63, 77, 82,
12, 13, 0, 0, 0, 0, 65, 0, 0, 0,
0, 0, 0, 0, 0, 0, 68, 0, 0, 60,
61, 78, 64, 58, 0, 0, 59, 0, 0, 67,
124, 0, 0, 0, 0, 83, 79, 10, 0, 62,
63, 77, 82, 12, 13, 0, 0, 0, 0, 179,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 60, 61, 0, 64, 178, 0, 0, 59,
0, 0, 67, 0, 0, 0, 0, 0, 0, 0,
0, 0, 62, 63, 77, 0, 12, 13, 134, 149,
0, 152, 0, 135, 139, 140, 0, 0, 138, 150,
137, 136, 133, 151, 141, 142, 143, 144, 145, 146,
147, 148, 68, 0, 0, 0, 0, 299, 0, 0,
0, 0, 0, 0, 0, 0, 124, 396, 347, 0,
0, 83, 79, 10, 0, 0, 0, 349, 82, 78,
0, 0, 345, 343, 552, 65, 0, 0, 124, 344,
0, 0, 0, 83, 79, 10, 348, 0, 60, 61,
82, 64, 58, 0, 0, 59, 0, 232, 67, 0,
0, 0, 0, 346, 0, 0, 0, 0, 62, 63,
77, 0, 12, 13, 196, 0, 0, 0, 0, 0,
231, 342, 0, 12, 13, 0, 224, 0, 0, 0,
0, 0, 77, 0, 12, 13, 225, 134, 149, 0,
152, 0, 135, 139, 140, 0, 0, 138, 150, 137,
136, 133, 151, 141, 142, 143, 144, 145, 146, 147,
148, 134, 149, 0, 152, 0, 135, 139, 140, 0,
659, 138, 150, 137, 136, 133, 151, 141, 142, 143,
144, 145, 146, 147, 148, 134, 149, 0, 152, 0,
135, 139, 140, 0, 658, 138, 150, 137, 136, 133,
151, 141, 142, 143, 144, 145, 146, 147, 148, 0,
78, 0, 0, 0, 78, 0, 0, 0, 518, 124,
0, 0, 0, 124, 83, 79, 10, 0, 83, 79,
10, 82, 0, 0, 0, 82, 347, 0, 405, 0,
0, 0, 190, 0, 0, 349, 0, 0, 0, 0,
345, 343, 341, 0, 0, 196, 0, 344, 0, 196,
0, 411, 0, 0, 348, 195, 0, 0, 0, 347,
0, 0, 471, 77, 0, 12, 13, 77, 349, 12,
13, 346, 0, 345, 343, 341, 0, 612, 0, 347,
344, 0, 0, 0, 0, 0, 0, 348, 349, 342,
0, 0, 13, 345, 343, 341, 0, 0, 0, 347,
344, 0, 0, 0, 346, 0, 0, 452, 349, 0,
0, 0, 0, 345, 343, 341, 0, 0, 0, 0,
344, 0, 342, 0, 346, 13, 0, 348, 0, 0,
451, 0, 0, 0, 130, 0, 0, 0, 0, 0,
0, 0, 342, 0, 346, 13, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 342, 134, 149, 13, 152, 132, 135, 139,
140, 0, 131, 138, 150, 137, 136, 133, 151, 141,
142, 143, 144, 145, 146, 147, 148, 134, 149, 0,
152, 0, 135, 139, 140, 0, 0, 138, 150, 137,
136, 133, 151, 141, 142, 143, 144, 145, 146, 147,
148, 134, 149, 0, 0, 0, 135, 139, 140, 0,
0, 138, 150, 137, 136, 133, 151, 141, 142, 143,
144, 145, 146, 147, 148, 134, 149, 0, 0, 0,
135, 139, 140, 0, 0, 138, 150, 137, 136, 0,
151, 141, 142, 143, 144, 145, 146, 147, 148, 149,
0, 0, 0, 135, 139, 140, 0, 0, 138, 150,
137, 136, 0, 151, 141, 142, 143, 144, 145, 146,
147, 148,
}
var yyPact = []int{
-1000, -1000, 542, 536, -1000, 164, -1000, 550, 555, 318,
-1000, -1000, -1000, 588, -1000, -1000, 549, 1340, 316, 155,
-1000, 214, 640, 308, -1000, 305, -1000, -1000, -1000, -1000,
491, 370, 366, 301, -1000, -1000, -1000, -1000, -1000, 186,
-1000, 164, 164, 272, 272, 164, 1689, -1000, 2129, 171,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, 25, 1689, 1689,
1689, 1689, 1689, 1689, 1689, 1689, 173, 1732, -1000, -1000,
-1000, 489, 200, -1000, -1000, -1000, 253, 1646, 1995, 26,
-1000, -1000, 200, 200, -1000, -1000, 96, 536, -1000, 587,
586, 42, 205, -1000, 547, -9, -9, -9, 5, -1000,
-1000, -1000, 347, 1850, -1000, -1000, -1000, 292, 849, -1000,
44, 1158, -1000, 172, 908, 488, -1000, -1000, -1000, -1000,
-1000, -1000, 25, -1000, 486, -1000, -1000, -1000, -23, 2153,
1689, -1000, -1000, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
1689, 1689, 1689, 1689, 1689, 1689, 1603, 1689, 522, 1689,
1548, 280, 1689, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, 469, 2153, -1000, -1000, -1000, -1000, 1732, 1828,
1689, -1000, -1000, -1000, 1250, -1000, 17, 13, 2153, -1000,
1158, -1000, -1000, -1000, -1000, 1158, 1158, 211, 1158, 39,
27, 300, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, 585, 2090, -1000, 1114, 2090, -1000, 172, 485, 164,
297, -1000, -1000, 194, 1689, 164, -1000, -1000, -1000, -1000,
-1000, 1158, 573, 296, -1000, 191, 1689, 295, -1000, -1000,
-1000, -1000, 1250, 461, -14, -1000, -1000, 908, -1000, -1000,
1158, 908, 1250, 908, 2153, 2201, 2224, 732, 732, 732,
732, 732, 732, 843, 843, 843, 843, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, 2177, -23, -23, 2153, -1000, 518,
294, -1000, -1000, 69, 1689, -1000, 293, -1000, -1000, -1000,
51, -1000, -1000, 1505, 1774, 176, 1026, 130, -1000, 1991,
958, 1026, 181, -1000, -1000, -1000, -1000, -1000, -1000, 1158,
1158, -1000, 457, -1000, 164, 11, 288, -1000, -1000, 739,
581, 525, 513, -1000, -1000, 210, 282, -1000, -1000, 479,
-1000, 545, 447, 139, -1000, 275, 273, -1000, -1000, -1000,
-1000, -1000, 129, 19, 52, 43, 2090, 2070, 572, 476,
78, 192, 264, 262, 164, -3, -1000, 2050, 445, 164,
1689, -23, -1000, 444, 1158, 443, 164, 1689, -23, 439,
164, 132, 1030, 908, -1000, -1000, -1000, -1000, 438, -1000,
437, -1000, -1000, 1689, 1450, 1395, 2153, 520, 1689, 203,
518, 425, -16, 1732, 394, 393, -1000, 1689, 165, -17,
-1000, -1000, 1941, -1000, -1000, 1509, -1000, -1000, -1000, -1000,
-1000, 1158, 390, -1000, 162, -1000, 1250, 1250, -1000, -1000,
-1000, -1000, 1158, 149, 217, 581, 164, -1000, -1000, 388,
545, 210, 581, 545, 164, 137, 274, -1000, 908, 386,
-1000, -1000, -1000, -1000, 2090, 10, 2090, 164, 1839, -1000,
-1000, 298, 2090, -1000, -1000, 2090, 164, 256, -1000, 133,
-1000, 582, -1000, 78, -1000, -1000, 381, -21, 164, 164,
581, 2090, -1000, -1000, -23, -1000, -1000, 255, -1000, -1000,
849, -23, -1000, -1000, -1000, 472, -1000, -1000, 908, -1000,
-1000, -1000, -1000, -1000, -1000, 1030, 1030, 1250, 251, 1689,
1689, -1000, -1000, -1000, -1000, -1000, 1732, 166, -1000, -1000,
376, -1000, -1000, -1000, 4, -1000, 1026, -1000, 1103, 1026,
1026, 372, -1000, -1000, -1000, 125, -1000, -1000, -1000, -1000,
-1000, 581, 363, -1000, 359, -1000, -1000, -1000, 352, -1000,
-1000, 2090, 3, 121, 249, -1000, 2090, 117, 230, -1000,
283, -1000, -1000, -1000, 350, -1000, -1000, 344, -1000, 266,
-1000, 221, 2017, 220, -1000, -1000, 581, 343, 164, 191,
908, 338, -1000, 118, 1689, 2153, 2153, 136, 1250, 89,
-1000, -1000, -1000, -1000, 1689, -1000, -1000, -1000, 2153, -1000,
82, 41, -1000, -1000, -1000, 581, 581, 1030, -1000, 2090,
-1000, 164, 581, -1000, 1839, 164, -1000, 2017, 133, -1000,
-1000, -1000, 164, -1000, 164, -1000, -1000, -1000, 336, -1000,
-1000, -1000, -1000, 219, -1000, 1689, 1689, 1732, 565, 1,
1026, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
335, -1000, 328, 303, 276, 1030, 1917, 1893, -1000, -1000,
110, -1000, 37, 2017, -1000, -1000, 2017, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, 1689, 518, -1000,
}
var yyPgo = []int{
0, 57, 771, 774, 45, 150, 26, 540, 29, 770,
768, 2, 28, 61, 322, 766, 17, 4, 765, 761,
760, 759, 758, 756, 3, 755, 622, 47, 14, 754,
490, 40, 41, 130, 37, 12, 752, 561, 43, 620,
751, 564, 750, 749, 25, 745, 162, 743, 31, 11,
740, 48, 5, 1, 18, 735, 679, 734, 7, 22,
733, 732, 19, 730, 729, 728, 16, 54, 725, 723,
33, 721, 23, 719, 588, 46, 9, 718, 715, 714,
713, 39, 712, 711, 710, 15, 56, 709, 13, 706,
0, 70, 49, 24, 20, 21, 10, 8, 704, 6,
42, 30, 703, 701, 700, 699, 88, 34, 698, 32,
27, 697, 696, 695, 694, 692, 685, 51, 44, 680,
36, 677, 35, 676, 671, 667, 666, 657, 656, 655,
648, 647, 642, 639, 637, 634, 631, 627, 38, 623,
596, 593,
}
var yyR1 = []int{
0, 112, 114, 114, 116, 113, 115, 115, 119, 119,
119, 120, 120, 121, 121, 2, 2, 2, 117, 123,
123, 124, 118, 50, 50, 50, 50, 50, 74, 74,
74, 74, 74, 74, 74, 74, 74, 74, 126, 70,
70, 70, 75, 75, 76, 76, 76, 36, 48, 44,
44, 44, 44, 44, 44, 9, 9, 9, 9, 127,
11, 128, 10, 62, 62, 129, 53, 42, 42, 42,
22, 22, 22, 21, 130, 23, 24, 24, 131, 132,
133, 25, 134, 63, 64, 64, 65, 65, 135, 136,
45, 137, 43, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 46, 46, 46, 46, 46, 46,
46, 46, 46, 41, 41, 41, 40, 40, 40, 40,
40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
49, 28, 16, 16, 15, 15, 39, 39, 17, 17,
31, 1, 1, 33, 34, 37, 37, 3, 3, 3,
91, 91, 30, 29, 81, 81, 7, 7, 7, 7,
7, 7, 32, 32, 32, 32, 87, 87, 87, 87,
87, 79, 79, 80, 89, 89, 89, 89, 89, 12,
12, 88, 88, 88, 88, 88, 88, 88, 85, 86,
84, 84, 83, 83, 47, 18, 18, 19, 19, 90,
51, 51, 52, 52, 52, 139, 20, 20, 60, 60,
71, 71, 77, 77, 78, 78, 73, 73, 69, 69,
72, 72, 72, 72, 72, 72, 4, 4, 13, 27,
27, 27, 82, 8, 8, 8, 8, 68, 68, 67,
67, 6, 6, 6, 6, 6, 26, 26, 26, 26,
26, 140, 26, 26, 26, 26, 26, 26, 26, 26,
66, 66, 55, 55, 54, 54, 56, 56, 59, 59,
57, 57, 57, 57, 58, 58, 122, 122, 138, 138,
35, 35, 61, 61, 38, 38, 101, 101, 105, 105,
103, 103, 5, 5, 141, 141, 141, 141, 141, 141,
92, 108, 106, 106, 106, 111, 111, 107, 107, 107,
107, 107, 107, 107, 107, 107, 107, 107, 110, 109,
95, 95, 97, 96, 96, 99, 99, 98, 98, 94,
94, 94, 93, 93, 125, 125, 100, 100, 104, 104,
102, 102,
}
var yyR2 = []int{
0, 4, 0, 3, 0, 3, 0, 3, 2, 5,
3, 3, 2, 1, 3, 1, 2, 2, 4, 0,
1, 0, 4, 0, 1, 1, 1, 1, 2, 5,
3, 2, 5, 7, 3, 2, 5, 3, 1, 2,
4, 3, 4, 3, 1, 2, 1, 1, 2, 1,
3, 3, 3, 2, 2, 3, 5, 5, 2, 0,
4, 0, 3, 0, 2, 0, 4, 4, 4, 2,
5, 1, 1, 2, 0, 3, 1, 3, 0, 0,
0, 8, 0, 5, 0, 2, 0, 2, 0, 0,
7, 0, 5, 1, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 1, 2, 2, 2, 2, 2,
2, 2, 2, 3, 5, 6, 1, 1, 3, 5,
5, 4, 6, 8, 1, 5, 5, 5, 7, 1,
0, 3, 1, 4, 1, 4, 1, 3, 1, 1,
1, 1, 1, 1, 1, 0, 1, 1, 1, 1,
4, 4, 1, 1, 1, 2, 1, 1, 1, 1,
1, 3, 1, 1, 1, 2, 1, 1, 1, 1,
3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3, 4, 4, 2, 3, 5, 1, 1, 2, 3,
5, 3, 5, 3, 3, 5, 8, 5, 8, 5,
0, 3, 0, 1, 3, 1, 4, 2, 0, 3,
1, 3, 1, 3, 1, 3, 1, 3, 1, 3,
3, 2, 4, 3, 5, 5, 1, 3, 1, 2,
1, 3, 4, 1, 2, 2, 1, 1, 3, 0,
2, 0, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, 4, 1, 2, 2, 2, 2, 2, 2,
1, 3, 1, 3, 1, 3, 1, 3, 1, 3,
1, 1, 3, 3, 0, 2, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 4, 4, 5, 6, 4, 4,
1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
4, 5, 4, 4, 2, 2, 4, 3, 3, 5,
3, 4, 3, 5, 1, 0, 1, 3, 1, 1,
2, 1, 1, 5, 0, 2, 1, 3, 1, 3,
1, 3,
}
var yyChk = []int{
-1000, -112, -113, -116, -114, 26, -117, 26, -115, -3,
25, -91, 74, 75, -118, -124, 25, -60, -119, 22,
63, 4, -125, -123, 25, -50, -74, -47, -26, 2,
33, -126, 32, 18, -44, -23, -45, -43, -25, -29,
16, 7, 11, 19, 14, 20, 28, 10, -14, -56,
17, 31, 29, 21, -33, -46, -3, -39, 54, 57,
50, 51, 70, 71, 53, 37, -40, 60, 4, -30,
-41, -79, -80, -20, -90, -88, -139, 72, 9, 24,
-84, -83, 30, 23, 63, -120, 60, -2, 4, -3,
64, 64, 65, -141, 22, 33, 10, 32, 18, 63,
63, -70, 60, -54, -34, -3, -75, 60, -54, -48,
60, -36, -3, -18, 60, -3, 67, -37, -33, -3,
-37, -41, -39, -3, 18, -41, -33, -61, -56, -14,
5, 43, 38, 48, 34, 39, 47, 46, 44, 40,
41, 50, 51, 52, 53, 54, 55, 56, 57, 35,
45, 49, 37, 66, 6, 76, -130, -135, -137, -131,
60, 64, 72, -46, -46, -46, -46, -46, -46, -46,
-46, 68, -17, -14, -32, -86, -90, -88, 54, 37,
60, -1, 36, 68, -1, 2, -35, 12, -14, -87,
37, -90, -88, -85, -12, 60, 54, -30, 72, -1,
-1, -121, 61, -120, -117, -118, 4, 4, 25, 74,
65, 25, -92, -91, -92, -108, -92, -19, -92, 60,
-71, 61, -70, -7, 66, 76, -86, -90, -88, -85,
-12, 60, 37, -75, 61, -7, 66, -78, 61, -48,
-7, -51, 68, -67, -68, -8, -31, -3, -81, -7,
12, 60, -140, 60, -14, -14, -14, -14, -14, -14,
-14, -14, -14, -14, -14, -14, -14, -14, -14, -14,
-14, -14, -14, -14, -14, -56, -56, -14, -21, -22,
-38, -42, -44, -56, 27, -24, -38, 36, -24, 61,
-59, -17, -3, 60, -14, -35, -49, 61, -32, 9,
-14, -49, -66, -6, -11, -74, -26, 2, 68, 73,
73, -7, -7, -7, 64, -7, -73, 69, -72, -55,
-13, 60, 54, -33, -4, 25, -69, 69, -27, -33,
-4, 60, -122, 63, -118, 4, -106, -107, -110, -109,
-91, 25, 72, 24, 30, 23, 54, 9, 37, 18,
66, -106, -106, -51, 60, -100, -95, -3, -122, 63,
66, -56, -34, -7, 9, -122, 63, 66, -56, -122,
63, -66, 61, 76, -138, -31, -81, -7, -67, -6,
-67, -53, 36, 63, 66, 6, -14, -136, 63, -62,
-132, -138, 12, 76, -17, 32, 73, 67, -58, -57,
-28, -16, -14, 68, 68, 37, -7, -90, -88, -85,
-12, 60, -138, 76, -58, 69, 63, -127, -7, -7,
61, -3, 73, -122, 63, -7, 76, -5, 4, -13,
54, 25, -13, 60, 64, -122, 63, -82, 60, -4,
61, -120, 63, 63, 73, 4, 72, 68, 68, -106,
-111, 60, 37, -107, -109, 9, 60, -93, -94, 60,
4, 51, -3, 66, 63, 63, -101, -100, 61, 76,
-106, 12, 61, -70, -56, 61, 61, -77, -76, -75,
-54, -56, 61, -48, 69, -3, -52, -89, 60, -86,
-90, -88, -85, -12, -8, 61, 61, -129, -38, 27,
27, 36, -38, -10, 69, -9, 8, 13, -53, 61,
-138, -17, 61, 61, -35, 69, 76, -138, 67, -49,
-49, -7, 61, 69, -6, -66, -7, 69, -72, -5,
-33, 61, -13, -5, -13, -3, 69, -27, -67, 61,
-106, 73, -106, -105, -104, -97, -3, -103, -102, -96,
-3, -106, 25, -91, -110, -106, -106, -101, 63, -94,
4, -93, 61, -3, -95, -5, -106, -122, 63, -7,
60, -67, -52, -66, 63, -14, -14, -62, -128, -59,
67, -133, 61, 73, 67, -28, -16, -15, -14, 68,
-58, -58, 61, 69, -5, 61, 61, 61, -106, 73,
69, 63, -106, 69, 63, 60, 61, 61, 50, 63,
-99, -98, 60, -106, 60, -5, 61, -76, -67, 61,
69, -38, 69, -66, 67, 66, 6, 76, -64, -35,
-49, 69, 69, -5, -5, -52, -106, -97, -5, -96,
-101, -99, -94, -101, -101, 61, -14, -14, -65, -63,
15, 73, -58, 61, 61, 61, 61, -52, 67, 67,
21, -11, 69, -99, -99, -134, -24, -53,
}
var yyDef = []int{
4, -2, 2, 0, 6, 0, 21, 0, 218, 0,
157, 158, 159, 0, 5, 344, 19, -2, 0, 0,
3, 0, 0, 0, 20, 0, 24, 25, 26, 27,
0, 0, 0, 0, 256, 257, 258, 259, 260, 0,
263, 155, 155, 0, 0, 0, 292, 38, -2, 0,
74, 88, 91, 78, 163, 93, -2, 114, 0, 0,
0, 0, 0, 0, 0, 0, 146, 0, 126, 127,
134, 0, 0, 139, -2, -2, 0, 290, 0, 0,
196, 197, 0, 0, 7, 8, 0, 21, 15, 0,
0, 0, 0, 345, 0, 0, 0, 0, 0, 18,
219, 28, 0, 0, 274, 154, 31, 0, 0, 35,
0, 0, 47, 210, 249, 0, 261, 264, 156, 153,
265, -2, 0, 162, 0, -2, 268, 269, 293, 276,
0, 53, 54, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 294, 294, 0, 294,
0, 0, 290, 115, 116, 117, 118, 119, 120, 121,
122, 140, 0, 148, 149, 172, -2, -2, 0, 0,
0, 140, 151, 152, -2, 217, 0, 0, 291, 193,
0, 176, 177, 178, 179, 0, 0, 189, 0, 0,
0, 286, 10, 13, 21, 12, 16, 17, 160, 161,
22, 0, 0, 310, 0, 0, 311, 210, 0, 0,
286, 30, 220, 39, 0, 0, 166, 167, 168, 169,
170, 0, 0, 286, 34, 0, 0, 286, 37, 224,
48, 204, -2, 0, 288, 247, 243, 162, 246, 150,
164, 249, -2, 249, 50, 94, 95, 96, 97, 98,
99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
109, 110, 111, 112, 113, 51, 52, 277, 75, 0,
71, 72, 295, 0, 0, 89, 76, 63, 79, 123,
288, 278, 128, 0, 291, 0, 284, 147, 175, 0,
288, 284, 0, 270, 252, 253, 254, 255, 59, 0,
0, 194, 0, 198, 0, 0, 286, 201, 226, 0,
302, 0, 0, 272, 238, -2, 286, 203, 228, 0,
240, 0, 0, 287, 11, 0, 0, 312, 313, 314,
317, 318, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 296, 0, 346, 0, 0, 287,
0, 41, 275, 0, 0, 0, 287, 0, 43, 0,
287, 0, 212, 289, 250, 244, 245, 165, 0, 262,
0, 73, 65, 294, 0, 0, 69, 0, 294, 0,
0, 0, 288, 289, 0, 0, 131, 290, 0, 288,
280, 281, 142, 140, 140, 0, 199, -2, -2, -2,
-2, 0, 0, 289, 0, 216, -2, -2, 191, 192,
180, 190, 0, 0, 287, 302, 0, 231, 303, 0,
0, 236, 302, 0, 0, 0, 287, 239, 249, 0,
9, 14, 304, 305, 0, 0, 0, 298, 300, 324,
325, 0, 0, 315, 316, 0, 296, 0, 342, 0,
339, 0, 341, 0, 308, 309, 0, 297, 0, 0,
302, 0, 29, 221, 40, 171, 32, 286, 222, 44,
46, 42, 36, 225, 211, 162, 209, 213, 249, 184,
185, 186, 187, 188, 248, 212, 212, -2, 0, 0,
0, 63, 77, 64, 92, 61, 0, 0, 80, 124,
0, 279, 129, 130, 0, 137, 289, 285, 0, 284,
284, 0, 135, 136, 271, 0, 195, 200, 227, 230,
273, 302, 0, 233, 0, 237, 202, 229, 0, 241,
319, 0, 0, 0, 299, 348, 0, 0, 301, 350,
0, 334, -2, -2, 0, 327, 328, 0, 306, 0,
340, 0, 335, 0, 347, 330, 302, 0, 287, 45,
249, 0, 205, 0, 294, 67, 68, 0, -2, 0,
58, 84, 125, 132, 290, 282, 283, 141, 144, 140,
0, 0, -2, 60, 232, 302, 302, 212, 320, 0,
322, 0, 302, 323, 0, 296, 326, 335, 0, 307,
207, 336, 296, 338, 296, 331, 33, 223, 0, 214,
66, 70, 90, 62, 55, 0, 0, 0, 86, 0,
284, 143, 138, 234, 235, 242, 321, 349, 332, 351,
0, 329, 0, 0, 0, 212, 0, 0, 81, 85,
0, 133, 0, 335, 343, 337, 335, 206, 56, 57,
82, 87, 145, 333, 208, 294, 0, 83,
}
var yyTok1 = []int{
1, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 70, 3, 3, 65, 56, 57, 3,
60, 61, 54, 50, 76, 51, 64, 55, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 67, 63,
3, 66, 3, 74, 75, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 72, 3, 73, 53, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 68, 52, 69, 71,
}
var yyTok2 = []int{
2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
42, 43, 44, 45, 46, 47, 48, 49, 58, 59,
62,
}
var yyTok3 = []int{
0,
}
//line yaccpar:1
/* parser for yacc output */
var yyDebug = 0
type yyLexer interface {
Lex(lval *yySymType) int
Error(s string)
}
type yyParser interface {
Parse(yyLexer) int
Lookahead() int
}
type yyParserImpl struct {
lookahead func() int
}
func (p *yyParserImpl) Lookahead() int {
return p.lookahead()
}
func yyNewParser() yyParser {
p := &yyParserImpl{
lookahead: func() int { return -1 },
}
return p
}
const yyFlag = -1000
func yyTokname(c int) string {
// 4 is TOKSTART above
if c >= 4 && c-4 < len(yyToknames) {
if yyToknames[c-4] != "" {
return yyToknames[c-4]
}
}
return __yyfmt__.Sprintf("tok-%v", c)
}
func yyStatname(s int) string {
if s >= 0 && s < len(yyStatenames) {
if yyStatenames[s] != "" {
return yyStatenames[s]
}
}
return __yyfmt__.Sprintf("state-%v", s)
}
func yylex1(lex yyLexer, lval *yySymType) (char, token int) {
token = 0
char = lex.Lex(lval)
if char <= 0 {
token = yyTok1[0]
goto out
}
if char < len(yyTok1) {
token = yyTok1[char]
goto out
}
if char >= yyPrivate {
if char < yyPrivate+len(yyTok2) {
token = yyTok2[char-yyPrivate]
goto out
}
}
for i := 0; i < len(yyTok3); i += 2 {
token = yyTok3[i+0]
if token == char {
token = yyTok3[i+1]
goto out
}
}
out:
if token == 0 {
token = yyTok2[1] /* unknown char */
}
if yyDebug >= 3 {
__yyfmt__.Printf("lex %s(%d)\n", yyTokname(token), uint(char))
}
return char, token
}
func yyParse(yylex yyLexer) int {
return yyNewParser().Parse(yylex)
}
func (yyrcvr *yyParserImpl) Parse(yylex yyLexer) int {
var yyn int
var yylval yySymType
var yyVAL yySymType
var yyDollar []yySymType
yyS := make([]yySymType, yyMaxDepth)
Nerrs := 0 /* number of errors */
Errflag := 0 /* error recovery flag */
yystate := 0
yychar := -1
yytoken := -1 // yychar translated into internal numbering
yyrcvr.lookahead = func() int { return yychar }
defer func() {
// Make sure we report no lookahead when not parsing.
yychar = -1
yytoken = -1
}()
yyp := -1
goto yystack
ret0:
return 0
ret1:
return 1
yystack:
/* put a state and value onto the stack */
if yyDebug >= 4 {
__yyfmt__.Printf("char %v in %v\n", yyTokname(yytoken), yyStatname(yystate))
}
yyp++
if yyp >= len(yyS) {
nyys := make([]yySymType, len(yyS)*2)
copy(nyys, yyS)
yyS = nyys
}
yyS[yyp] = yyVAL
yyS[yyp].yys = yystate
yynewstate:
yyn = yyPact[yystate]
if yyn <= yyFlag {
goto yydefault /* simple state */
}
if yychar < 0 {
yychar, yytoken = yylex1(yylex, &yylval)
}
yyn += yytoken
if yyn < 0 || yyn >= yyLast {
goto yydefault
}
yyn = yyAct[yyn]
if yyChk[yyn] == yytoken { /* valid shift */
yychar = -1
yytoken = -1
yyVAL = yylval
yystate = yyn
if Errflag > 0 {
Errflag--
}
goto yystack
}
yydefault:
/* default state action */
yyn = yyDef[yystate]
if yyn == -2 {
if yychar < 0 {
yychar, yytoken = yylex1(yylex, &yylval)
}
/* look through exception table */
xi := 0
for {
if yyExca[xi+0] == -1 && yyExca[xi+1] == yystate {
break
}
xi += 2
}
for xi += 2; ; xi += 2 {
yyn = yyExca[xi+0]
if yyn < 0 || yyn == yytoken {
break
}
}
yyn = yyExca[xi+1]
if yyn < 0 {
goto ret0
}
}
if yyn == 0 {
/* error ... attempt to resume parsing */
switch Errflag {
case 0: /* brand new error */
yylex.Error("syntax error")
Nerrs++
if yyDebug >= 1 {
__yyfmt__.Printf("%s", yyStatname(yystate))
__yyfmt__.Printf(" saw %s\n", yyTokname(yytoken))
}
fallthrough
case 1, 2: /* incompletely recovered error ... try again */
Errflag = 3
/* find a state where "error" is a legal shift action */
for yyp >= 0 {
yyn = yyPact[yyS[yyp].yys] + yyErrCode
if yyn >= 0 && yyn < yyLast {
yystate = yyAct[yyn] /* simulate a shift of "error" */
if yyChk[yystate] == yyErrCode {
goto yystack
}
}
/* the current p has no shift on "error", pop stack */
if yyDebug >= 2 {
__yyfmt__.Printf("error recovery pops state %d\n", yyS[yyp].yys)
}
yyp--
}
/* there is no state on the stack with an error shift ... abort */
goto ret1
case 3: /* no shift yet; clobber input char */
if yyDebug >= 2 {
__yyfmt__.Printf("error recovery discards %s\n", yyTokname(yytoken))
}
if yytoken == yyEofCode {
goto ret1
}
yychar = -1
yytoken = -1
goto yynewstate /* try again in the same state */
}
}
/* reduction by production yyn */
if yyDebug >= 2 {
__yyfmt__.Printf("reduce %v in:\n\t%v\n", yyn, yyStatname(yystate))
}
yynt := yyn
yypt := yyp
_ = yypt // guard against "declared and not used"
yyp -= yyR2[yyn]
// yyp is now the index of $0. Perform the default action. Iff the
// reduced production is ε, $1 is possibly out of range.
if yyp+1 >= len(yyS) {
nyys := make([]yySymType, len(yyS)*2)
copy(nyys, yyS)
yyS = nyys
}
yyVAL = yyS[yyp+1]
/* consult goto table to find next state */
yyn = yyR1[yyn]
yyg := yyPgo[yyn]
yyj := yyg + yyS[yyp].yys + 1
if yyj >= yyLast {
yystate = yyAct[yyg]
} else {
yystate = yyAct[yyj]
if yyChk[yystate] != -yyn {
yystate = yyAct[yyg]
}
}
// dummy call; replaced with literal code
switch yynt {
case 1:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:127
{
xtop = concat(xtop, yyDollar[4].list)
}
case 2:
yyDollar = yyS[yypt-0 : yypt+1]
//line go.y:133
{
prevlineno = lineno
Yyerror("package statement must be first")
errorexit()
}
case 3:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:139
{
mkpackage(yyDollar[2].sym.Name)
}
case 4:
yyDollar = yyS[yypt-0 : yypt+1]
//line go.y:149
{
importpkg = Runtimepkg
if Debug['A'] != 0 {
cannedimports("runtime.Builtin", "package runtime\n\n$$\n\n")
} else {
cannedimports("runtime.Builtin", runtimeimport)
}
curio.importsafe = true
}
case 5:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:161
{
importpkg = nil
}
case 11:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:175
{
ipkg := importpkg
my := importmyname
importpkg = nil
importmyname = nil
if my == nil {
my = Lookup(ipkg.Name)
}
pack := Nod(OPACK, nil, nil)
pack.Sym = my
pack.Pkg = ipkg
pack.Lineno = int32(yyDollar[1].i)
if strings.HasPrefix(my.Name, ".") {
importdot(ipkg, pack)
break
}
if my.Name == "init" {
Yyerror("cannot import package as init - init must be a func")
break
}
if my.Name == "_" {
break
}
if my.Def != nil {
lineno = int32(yyDollar[1].i)
redeclare(my, "as imported package name")
}
my.Def = pack
my.Lastlineno = int32(yyDollar[1].i)
my.Block = 1 // at top level
}
case 12:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:210
{
// When an invalid import path is passed to importfile,
// it calls Yyerror and then sets up a fake import with
// no package statement. This allows us to test more
// than one invalid import statement in a single file.
if nerrors == 0 {
Fatal("phase error in import")
}
}
case 15:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:226
{
// import with original name
yyVAL.i = parserline()
importmyname = nil
importfile(&yyDollar[1].val, yyVAL.i)
}
case 16:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:233
{
// import with given name
yyVAL.i = parserline()
importmyname = yyDollar[1].sym
importfile(&yyDollar[2].val, yyVAL.i)
}
case 17:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:240
{
// import into my name space
yyVAL.i = parserline()
importmyname = Lookup(".")
importfile(&yyDollar[2].val, yyVAL.i)
}
case 18:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:249
{
if importpkg.Name == "" {
importpkg.Name = yyDollar[2].sym.Name
Pkglookup(yyDollar[2].sym.Name, nil).Npkg++
} else if importpkg.Name != yyDollar[2].sym.Name {
Yyerror("conflicting names %s and %s for package \"%v\"", importpkg.Name, yyDollar[2].sym.Name, Zconv(importpkg.Path, 0))
}
importpkg.Direct = 1
importpkg.Safe = curio.importsafe
if safemode != 0 && !curio.importsafe {
Yyerror("cannot import unsafe package \"%v\"", Zconv(importpkg.Path, 0))
}
}
case 20:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:266
{
if yyDollar[1].sym.Name == "safe" {
curio.importsafe = true
}
}
case 21:
yyDollar = yyS[yypt-0 : yypt+1]
//line go.y:273
{
defercheckwidth()
}
case 22:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:277
{
resumecheckwidth()
unimportfile()
}
case 23:
yyDollar = yyS[yypt-0 : yypt+1]
//line go.y:286
{
Yyerror("empty top-level declaration")
yyVAL.list = nil
}
case 24:
yyVAL.list = yyS[yypt-0].list
case 25:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:292
{
yyVAL.list = list1(yyDollar[1].node)
}
case 26:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:296
{
Yyerror("non-declaration statement outside function body")
yyVAL.list = nil
}
case 27:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:301
{
yyVAL.list = nil
}
case 28:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:307
{
yyVAL.list = yyDollar[2].list
}
case 29:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:311
{
yyVAL.list = yyDollar[3].list
}
case 30:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:315
{
yyVAL.list = nil
}
case 31:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:319
{
yyVAL.list = yyDollar[2].list
iota_ = -100000
lastconst = nil
}
case 32:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:325
{
yyVAL.list = yyDollar[3].list
iota_ = -100000
lastconst = nil
}
case 33:
yyDollar = yyS[yypt-7 : yypt+1]
//line go.y:331
{
yyVAL.list = concat(yyDollar[3].list, yyDollar[5].list)
iota_ = -100000
lastconst = nil
}
case 34:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:337
{
yyVAL.list = nil
iota_ = -100000
}
case 35:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:342
{
yyVAL.list = list1(yyDollar[2].node)
}
case 36:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:346
{
yyVAL.list = yyDollar[3].list
}
case 37:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:350
{
yyVAL.list = nil
}
case 38:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:356
{
iota_ = 0
}
case 39:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:362
{
yyVAL.list = variter(yyDollar[1].list, yyDollar[2].node, nil)
}
case 40:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:366
{
yyVAL.list = variter(yyDollar[1].list, yyDollar[2].node, yyDollar[4].list)
}
case 41:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:370
{
yyVAL.list = variter(yyDollar[1].list, nil, yyDollar[3].list)
}
case 42:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:376
{
yyVAL.list = constiter(yyDollar[1].list, yyDollar[2].node, yyDollar[4].list)
}
case 43:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:380
{
yyVAL.list = constiter(yyDollar[1].list, nil, yyDollar[3].list)
}
case 44:
yyVAL.list = yyS[yypt-0].list
case 45:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:387
{
yyVAL.list = constiter(yyDollar[1].list, yyDollar[2].node, nil)
}
case 46:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:391
{
yyVAL.list = constiter(yyDollar[1].list, nil, nil)
}
case 47:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:397
{
// different from dclname because the name
// becomes visible right here, not at the end
// of the declaration.
yyVAL.node = typedcl0(yyDollar[1].sym)
}
case 48:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:406
{
yyVAL.node = typedcl1(yyDollar[1].node, yyDollar[2].node, 1)
}
case 49:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:412
{
yyVAL.node = yyDollar[1].node
// These nodes do not carry line numbers.
// Since a bare name used as an expression is an error,
// introduce a wrapper node to give the correct line.
switch yyVAL.node.Op {
case ONAME, ONONAME, OTYPE, OPACK, OLITERAL:
yyVAL.node = Nod(OPAREN, yyVAL.node, nil)
yyVAL.node.Implicit = 1
break
}
}
case 50:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:426
{
yyVAL.node = Nod(OASOP, yyDollar[1].node, yyDollar[3].node)
yyVAL.node.Etype = uint8(yyDollar[2].i) // rathole to pass opcode
}
case 51:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:431
{
if yyDollar[1].list.Next == nil && yyDollar[3].list.Next == nil {
// simple
yyVAL.node = Nod(OAS, yyDollar[1].list.N, yyDollar[3].list.N)
break
}
// multiple
yyVAL.node = Nod(OAS2, nil, nil)
yyVAL.node.List = yyDollar[1].list
yyVAL.node.Rlist = yyDollar[3].list
}
case 52:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:443
{
if yyDollar[3].list.N.Op == OTYPESW {
yyVAL.node = Nod(OTYPESW, nil, yyDollar[3].list.N.Right)
if yyDollar[3].list.Next != nil {
Yyerror("expr.(type) must be alone in list")
}
if yyDollar[1].list.Next != nil {
Yyerror("argument count mismatch: %d = %d", count(yyDollar[1].list), 1)
} 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) {
Yyerror("invalid variable name %s in type switch", Nconv(yyDollar[1].list.N, 0))
} else {
yyVAL.node.Left = dclname(yyDollar[1].list.N.Sym)
} // it's a colas, so must not re-use an oldname.
break
}
yyVAL.node = colas(yyDollar[1].list, yyDollar[3].list, int32(yyDollar[2].i))
}
case 53:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:461
{
yyVAL.node = Nod(OASOP, yyDollar[1].node, Nodintconst(1))
yyVAL.node.Implicit = 1
yyVAL.node.Etype = OADD
}
case 54:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:467
{
yyVAL.node = Nod(OASOP, yyDollar[1].node, Nodintconst(1))
yyVAL.node.Implicit = 1
yyVAL.node.Etype = OSUB
}
case 55:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:475
{
var n, nn *Node
// will be converted to OCASE
// right will point to next case
// done in casebody()
markdcl()
yyVAL.node = Nod(OXCASE, nil, nil)
yyVAL.node.List = yyDollar[2].list
if typesw != nil && typesw.Right != nil {
n = typesw.Right.Left
if n != nil {
// type switch - declare variable
nn = newname(n.Sym)
declare(nn, dclcontext)
yyVAL.node.Nname = nn
// keep track of the instances for reporting unused
nn.Defn = typesw.Right
}
}
}
case 56:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:498
{
var n *Node
// will be converted to OCASE
// right will point to next case
// done in casebody()
markdcl()
yyVAL.node = Nod(OXCASE, nil, nil)
if yyDollar[2].list.Next == nil {
n = Nod(OAS, yyDollar[2].list.N, yyDollar[4].node)
} else {
n = Nod(OAS2, nil, nil)
n.List = yyDollar[2].list
n.Rlist = list1(yyDollar[4].node)
}
yyVAL.node.List = list1(n)
}
case 57:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:516
{
// will be converted to OCASE
// right will point to next case
// done in casebody()
markdcl()
yyVAL.node = Nod(OXCASE, nil, nil)
yyVAL.node.List = list1(colas(yyDollar[2].list, list1(yyDollar[4].node), int32(yyDollar[3].i)))
}
case 58:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:525
{
var n, nn *Node
markdcl()
yyVAL.node = Nod(OXCASE, nil, nil)
if typesw != nil && typesw.Right != nil {
n = typesw.Right.Left
if n != nil {
// type switch - declare variable
nn = newname(n.Sym)
declare(nn, dclcontext)
yyVAL.node.Nname = nn
// keep track of the instances for reporting unused
nn.Defn = typesw.Right
}
}
}
case 59:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:546
{
markdcl()
}
case 60:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:550
{
if yyDollar[3].list == nil {
yyVAL.node = Nod(OEMPTY, nil, nil)
} else {
yyVAL.node = liststmt(yyDollar[3].list)
}
popdcl()
}
case 61:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:561
{
// If the last token read by the lexer was consumed
// as part of the case, clear it (parser has cleared yychar).
// If the last token read by the lexer was the lookahead
// leave it alone (parser has it cached in yychar).
// This is so that the stmt_list action doesn't look at
// the case tokens if the stmt_list is empty.
yylast = yychar
yyDollar[1].node.Xoffset = int64(block)
}
case 62:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:572
{
// This is the only place in the language where a statement
// list is not allowed to drop the final semicolon, because
// it's the only place where a statement list is not followed
// by a closing brace. Handle the error for pedantry.
// Find the final token of the statement list.
// yylast is lookahead; yyprev is last of stmt_list
last := yyprev
if last > 0 && last != ';' && yychar != '}' {
Yyerror("missing statement after label")
}
yyVAL.node = yyDollar[1].node
yyVAL.node.Nbody = yyDollar[3].list
popdcl()
}
case 63:
yyDollar = yyS[yypt-0 : yypt+1]
//line go.y:591
{
yyVAL.list = nil
}
case 64:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:595
{
yyVAL.list = list(yyDollar[1].list, yyDollar[2].node)
}
case 65:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:601
{
markdcl()
}
case 66:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:605
{
yyVAL.list = yyDollar[3].list
popdcl()
}
case 67:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:612
{
yyVAL.node = Nod(ORANGE, nil, yyDollar[4].node)
yyVAL.node.List = yyDollar[1].list
yyVAL.node.Etype = 0 // := flag
}
case 68:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:618
{
yyVAL.node = Nod(ORANGE, nil, yyDollar[4].node)
yyVAL.node.List = yyDollar[1].list
yyVAL.node.Colas = 1
colasdefn(yyDollar[1].list, yyVAL.node)
}
case 69:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:625
{
yyVAL.node = Nod(ORANGE, nil, yyDollar[2].node)
yyVAL.node.Etype = 0 // := flag
}
case 70:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:632
{
// init ; test ; incr
if yyDollar[5].node != nil && yyDollar[5].node.Colas != 0 {
Yyerror("cannot declare in the for-increment")
}
yyVAL.node = Nod(OFOR, nil, nil)
if yyDollar[1].node != nil {
yyVAL.node.Ninit = list1(yyDollar[1].node)
}
yyVAL.node.Ntest = yyDollar[3].node
yyVAL.node.Nincr = yyDollar[5].node
}
case 71:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:645
{
// normal test
yyVAL.node = Nod(OFOR, nil, nil)
yyVAL.node.Ntest = yyDollar[1].node
}
case 72:
yyVAL.node = yyS[yypt-0].node
case 73:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:654
{
yyVAL.node = yyDollar[1].node
yyVAL.node.Nbody = concat(yyVAL.node.Nbody, yyDollar[2].list)
}
case 74:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:661
{
markdcl()
}
case 75:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:665
{
yyVAL.node = yyDollar[3].node
popdcl()
}
case 76:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:672
{
// test
yyVAL.node = Nod(OIF, nil, nil)
yyVAL.node.Ntest = yyDollar[1].node
}
case 77:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:678
{
// init ; test
yyVAL.node = Nod(OIF, nil, nil)
if yyDollar[1].node != nil {
yyVAL.node.Ninit = list1(yyDollar[1].node)
}
yyVAL.node.Ntest = yyDollar[3].node
}
case 78:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:690
{
markdcl()
}
case 79:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:694
{
if yyDollar[3].node.Ntest == nil {
Yyerror("missing condition in if statement")
}
}
case 80:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:700
{
yyDollar[3].node.Nbody = yyDollar[5].list
}
case 81:
yyDollar = yyS[yypt-8 : yypt+1]
//line go.y:704
{
var n *Node
var nn *NodeList
yyVAL.node = yyDollar[3].node
n = yyDollar[3].node
popdcl()
for nn = concat(yyDollar[7].list, yyDollar[8].list); nn != nil; nn = nn.Next {
if nn.N.Op == OIF {
popdcl()
}
n.Nelse = list1(nn.N)
n = nn.N
}
}
case 82:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:722
{
markdcl()
}
case 83:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:726
{
if yyDollar[4].node.Ntest == nil {
Yyerror("missing condition in if statement")
}
yyDollar[4].node.Nbody = yyDollar[5].list
yyVAL.list = list1(yyDollar[4].node)
}
case 84:
yyDollar = yyS[yypt-0 : yypt+1]
//line go.y:735
{
yyVAL.list = nil
}
case 85:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:739
{
yyVAL.list = concat(yyDollar[1].list, yyDollar[2].list)
}
case 86:
yyDollar = yyS[yypt-0 : yypt+1]
//line go.y:744
{
yyVAL.list = nil
}
case 87:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:748
{
l := &NodeList{N: yyDollar[2].node}
l.End = l
yyVAL.list = l
}
case 88:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:756
{
markdcl()
}
case 89:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:760
{
var n *Node
n = yyDollar[3].node.Ntest
if n != nil && n.Op != OTYPESW {
n = nil
}
typesw = Nod(OXXX, typesw, n)
}
case 90:
yyDollar = yyS[yypt-7 : yypt+1]
//line go.y:769
{
yyVAL.node = yyDollar[3].node
yyVAL.node.Op = OSWITCH
yyVAL.node.List = yyDollar[6].list
typesw = typesw.Left
popdcl()
}
case 91:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:779
{
typesw = Nod(OXXX, typesw, nil)
}
case 92:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:783
{
yyVAL.node = Nod(OSELECT, nil, nil)
yyVAL.node.Lineno = typesw.Lineno
yyVAL.node.List = yyDollar[4].list
typesw = typesw.Left
}
case 93:
yyVAL.node = yyS[yypt-0].node
case 94:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:796
{
yyVAL.node = Nod(OOROR, yyDollar[1].node, yyDollar[3].node)
}
case 95:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:800
{
yyVAL.node = Nod(OANDAND, yyDollar[1].node, yyDollar[3].node)
}
case 96:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:804
{
yyVAL.node = Nod(OEQ, yyDollar[1].node, yyDollar[3].node)
}
case 97:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:808
{
yyVAL.node = Nod(ONE, yyDollar[1].node, yyDollar[3].node)
}
case 98:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:812
{
yyVAL.node = Nod(OLT, yyDollar[1].node, yyDollar[3].node)
}
case 99:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:816
{
yyVAL.node = Nod(OLE, yyDollar[1].node, yyDollar[3].node)
}
case 100:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:820
{
yyVAL.node = Nod(OGE, yyDollar[1].node, yyDollar[3].node)
}
case 101:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:824
{
yyVAL.node = Nod(OGT, yyDollar[1].node, yyDollar[3].node)
}
case 102:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:828
{
yyVAL.node = Nod(OADD, yyDollar[1].node, yyDollar[3].node)
}
case 103:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:832
{
yyVAL.node = Nod(OSUB, yyDollar[1].node, yyDollar[3].node)
}
case 104:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:836
{
yyVAL.node = Nod(OOR, yyDollar[1].node, yyDollar[3].node)
}
case 105:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:840
{
yyVAL.node = Nod(OXOR, yyDollar[1].node, yyDollar[3].node)
}
case 106:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:844
{
yyVAL.node = Nod(OMUL, yyDollar[1].node, yyDollar[3].node)
}
case 107:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:848
{
yyVAL.node = Nod(ODIV, yyDollar[1].node, yyDollar[3].node)
}
case 108:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:852
{
yyVAL.node = Nod(OMOD, yyDollar[1].node, yyDollar[3].node)
}
case 109:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:856
{
yyVAL.node = Nod(OAND, yyDollar[1].node, yyDollar[3].node)
}
case 110:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:860
{
yyVAL.node = Nod(OANDNOT, yyDollar[1].node, yyDollar[3].node)
}
case 111:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:864
{
yyVAL.node = Nod(OLSH, yyDollar[1].node, yyDollar[3].node)
}
case 112:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:868
{
yyVAL.node = Nod(ORSH, yyDollar[1].node, yyDollar[3].node)
}
case 113:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:873
{
yyVAL.node = Nod(OSEND, yyDollar[1].node, yyDollar[3].node)
}
case 114:
yyVAL.node = yyS[yypt-0].node
case 115:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:880
{
yyVAL.node = Nod(OIND, yyDollar[2].node, nil)
}
case 116:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:884
{
if yyDollar[2].node.Op == OCOMPLIT {
// Special case for &T{...}: turn into (*T){...}.
yyVAL.node = yyDollar[2].node
yyVAL.node.Right = Nod(OIND, yyVAL.node.Right, nil)
yyVAL.node.Right.Implicit = 1
} else {
yyVAL.node = Nod(OADDR, yyDollar[2].node, nil)
}
}
case 117:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:895
{
yyVAL.node = Nod(OPLUS, yyDollar[2].node, nil)
}
case 118:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:899
{
yyVAL.node = Nod(OMINUS, yyDollar[2].node, nil)
}
case 119:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:903
{
yyVAL.node = Nod(ONOT, yyDollar[2].node, nil)
}
case 120:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:907
{
Yyerror("the bitwise complement operator is ^")
yyVAL.node = Nod(OCOM, yyDollar[2].node, nil)
}
case 121:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:912
{
yyVAL.node = Nod(OCOM, yyDollar[2].node, nil)
}
case 122:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:916
{
yyVAL.node = Nod(ORECV, yyDollar[2].node, nil)
}
case 123:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:926
{
yyVAL.node = Nod(OCALL, yyDollar[1].node, nil)
}
case 124:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:930
{
yyVAL.node = Nod(OCALL, yyDollar[1].node, nil)
yyVAL.node.List = yyDollar[3].list
}
case 125:
yyDollar = yyS[yypt-6 : yypt+1]
//line go.y:935
{
yyVAL.node = Nod(OCALL, yyDollar[1].node, nil)
yyVAL.node.List = yyDollar[3].list
yyVAL.node.Isddd = 1
}
case 126:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:943
{
yyVAL.node = nodlit(yyDollar[1].val)
}
case 127:
yyVAL.node = yyS[yypt-0].node
case 128:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:948
{
if yyDollar[1].node.Op == OPACK {
var s *Sym
s = restrictlookup(yyDollar[3].sym.Name, yyDollar[1].node.Pkg)
yyDollar[1].node.Used = 1
yyVAL.node = oldname(s)
break
}
yyVAL.node = Nod(OXDOT, yyDollar[1].node, newname(yyDollar[3].sym))
}
case 129:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:959
{
yyVAL.node = Nod(ODOTTYPE, yyDollar[1].node, yyDollar[4].node)
}
case 130:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:963
{
yyVAL.node = Nod(OTYPESW, nil, yyDollar[1].node)
}
case 131:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:967
{
yyVAL.node = Nod(OINDEX, yyDollar[1].node, yyDollar[3].node)
}
case 132:
yyDollar = yyS[yypt-6 : yypt+1]
//line go.y:971
{
yyVAL.node = Nod(OSLICE, yyDollar[1].node, Nod(OKEY, yyDollar[3].node, yyDollar[5].node))
}
case 133:
yyDollar = yyS[yypt-8 : yypt+1]
//line go.y:975
{
if yyDollar[5].node == nil {
Yyerror("middle index required in 3-index slice")
}
if yyDollar[7].node == nil {
Yyerror("final index required in 3-index slice")
}
yyVAL.node = Nod(OSLICE3, yyDollar[1].node, Nod(OKEY, yyDollar[3].node, Nod(OKEY, yyDollar[5].node, yyDollar[7].node)))
}
case 134:
yyVAL.node = yyS[yypt-0].node
case 135:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:986
{
// conversion
yyVAL.node = Nod(OCALL, yyDollar[1].node, nil)
yyVAL.node.List = list1(yyDollar[3].node)
}
case 136:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:992
{
yyVAL.node = yyDollar[3].node
yyVAL.node.Right = yyDollar[1].node
yyVAL.node.List = yyDollar[4].list
fixlbrace(yyDollar[2].i)
}
case 137:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:999
{
yyVAL.node = yyDollar[3].node
yyVAL.node.Right = yyDollar[1].node
yyVAL.node.List = yyDollar[4].list
}
case 138:
yyDollar = yyS[yypt-7 : yypt+1]
//line go.y:1005
{
Yyerror("cannot parenthesize type in composite literal")
yyVAL.node = yyDollar[5].node
yyVAL.node.Right = yyDollar[2].node
yyVAL.node.List = yyDollar[6].list
}
case 139:
yyVAL.node = yyS[yypt-0].node
case 140:
yyDollar = yyS[yypt-0 : yypt+1]
//line go.y:1014
{
// composite expression.
// make node early so we get the right line number.
yyVAL.node = Nod(OCOMPLIT, nil, nil)
}
case 141:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1022
{
yyVAL.node = Nod(OKEY, yyDollar[1].node, yyDollar[3].node)
}
case 142:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1028
{
// These nodes do not carry line numbers.
// Since a composite literal commonly spans several lines,
// the line number on errors may be misleading.
// Introduce a wrapper node to give the correct line.
yyVAL.node = yyDollar[1].node
switch yyVAL.node.Op {
case ONAME, ONONAME, OTYPE, OPACK, OLITERAL:
yyVAL.node = Nod(OPAREN, yyVAL.node, nil)
yyVAL.node.Implicit = 1
}
}
case 143:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:1041
{
yyVAL.node = yyDollar[2].node
yyVAL.node.List = yyDollar[3].list
}
case 144:
yyVAL.node = yyS[yypt-0].node
case 145:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:1049
{
yyVAL.node = yyDollar[2].node
yyVAL.node.List = yyDollar[3].list
}
case 146:
yyVAL.node = yyS[yypt-0].node
case 147:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1057
{
yyVAL.node = yyDollar[2].node
// Need to know on lhs of := whether there are ( ).
// Don't bother with the OPAREN in other cases:
// it's just a waste of memory and time.
switch yyVAL.node.Op {
case ONAME, ONONAME, OPACK, OTYPE, OLITERAL, OTYPESW:
yyVAL.node = Nod(OPAREN, yyVAL.node, nil)
}
}
case 148:
yyVAL.node = yyS[yypt-0].node
case 149:
yyVAL.node = yyS[yypt-0].node
case 150:
yyVAL.node = yyS[yypt-0].node
case 151:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1078
{
yyVAL.i = LBODY
}
case 152:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1082
{
yyVAL.i = '{'
}
case 153:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1093
{
if yyDollar[1].sym == nil {
yyVAL.node = nil
} else {
yyVAL.node = newname(yyDollar[1].sym)
}
}
case 154:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1103
{
yyVAL.node = dclname(yyDollar[1].sym)
}
case 155:
yyDollar = yyS[yypt-0 : yypt+1]
//line go.y:1108
{
yyVAL.node = nil
}
case 156:
yyVAL.node = yyS[yypt-0].node
case 157:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1115
{
yyVAL.sym = yyDollar[1].sym
// during imports, unqualified non-exported identifiers are from builtinpkg
if importpkg != nil && !exportname(yyDollar[1].sym.Name) {
yyVAL.sym = Pkglookup(yyDollar[1].sym.Name, builtinpkg)
}
}
case 158:
yyVAL.sym = yyS[yypt-0].sym
case 159:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1124
{
yyVAL.sym = nil
}
case 160:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:1130
{
var p *Pkg
if yyDollar[2].val.U.Sval.S == "" {
p = importpkg
} else {
if isbadimport(yyDollar[2].val.U.Sval) {
errorexit()
}
p = mkpkg(yyDollar[2].val.U.Sval)
}
yyVAL.sym = Pkglookup(yyDollar[4].sym.Name, p)
}
case 161:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:1144
{
var p *Pkg
if yyDollar[2].val.U.Sval.S == "" {
p = importpkg
} else {
if isbadimport(yyDollar[2].val.U.Sval) {
errorexit()
}
p = mkpkg(yyDollar[2].val.U.Sval)
}
yyVAL.sym = Pkglookup("?", p)
}
case 162:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1160
{
yyVAL.node = oldname(yyDollar[1].sym)
if yyVAL.node.Pack != nil {
yyVAL.node.Pack.Used = 1
}
}
case 163:
yyVAL.node = yyS[yypt-0].node
case 164:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1181
{
Yyerror("final argument in variadic function missing type")
yyVAL.node = Nod(ODDD, typenod(typ(TINTER)), nil)
}
case 165:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:1186
{
yyVAL.node = Nod(ODDD, yyDollar[2].node, nil)
}
case 166:
yyVAL.node = yyS[yypt-0].node
case 167:
yyVAL.node = yyS[yypt-0].node
case 168:
yyVAL.node = yyS[yypt-0].node
case 169:
yyVAL.node = yyS[yypt-0].node
case 170:
yyVAL.node = yyS[yypt-0].node
case 171:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1197
{
yyVAL.node = yyDollar[2].node
}
case 172:
yyVAL.node = yyS[yypt-0].node
case 173:
yyVAL.node = yyS[yypt-0].node
case 174:
yyVAL.node = yyS[yypt-0].node
case 175:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:1206
{
yyVAL.node = Nod(OIND, yyDollar[2].node, nil)
}
case 176:
yyVAL.node = yyS[yypt-0].node
case 177:
yyVAL.node = yyS[yypt-0].node
case 178:
yyVAL.node = yyS[yypt-0].node
case 179:
yyVAL.node = yyS[yypt-0].node
case 180:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1216
{
yyVAL.node = yyDollar[2].node
}
case 181:
yyVAL.node = yyS[yypt-0].node
case 182:
yyVAL.node = yyS[yypt-0].node
case 183:
yyVAL.node = yyS[yypt-0].node
case 184:
yyVAL.node = yyS[yypt-0].node
case 185:
yyVAL.node = yyS[yypt-0].node
case 186:
yyVAL.node = yyS[yypt-0].node
case 187:
yyVAL.node = yyS[yypt-0].node
case 188:
yyVAL.node = yyS[yypt-0].node
case 189:
yyVAL.node = yyS[yypt-0].node
case 190:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1237
{
if yyDollar[1].node.Op == OPACK {
var s *Sym
s = restrictlookup(yyDollar[3].sym.Name, yyDollar[1].node.Pkg)
yyDollar[1].node.Used = 1
yyVAL.node = oldname(s)
break
}
yyVAL.node = Nod(OXDOT, yyDollar[1].node, newname(yyDollar[3].sym))
}
case 191:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:1250
{
yyVAL.node = Nod(OTARRAY, yyDollar[2].node, yyDollar[4].node)
}
case 192:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:1254
{
// array literal of nelem
yyVAL.node = Nod(OTARRAY, Nod(ODDD, nil, nil), yyDollar[4].node)
}
case 193:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:1259
{
yyVAL.node = Nod(OTCHAN, yyDollar[2].node, nil)
yyVAL.node.Etype = Cboth
}
case 194:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1264
{
yyVAL.node = Nod(OTCHAN, yyDollar[3].node, nil)
yyVAL.node.Etype = Csend
}
case 195:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:1269
{
yyVAL.node = Nod(OTMAP, yyDollar[3].node, yyDollar[5].node)
}
case 196:
yyVAL.node = yyS[yypt-0].node
case 197:
yyVAL.node = yyS[yypt-0].node
case 198:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:1277
{
yyVAL.node = Nod(OIND, yyDollar[2].node, nil)
}
case 199:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1283
{
yyVAL.node = Nod(OTCHAN, yyDollar[3].node, nil)
yyVAL.node.Etype = Crecv
}
case 200:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:1290
{
yyVAL.node = Nod(OTSTRUCT, nil, nil)
yyVAL.node.List = yyDollar[3].list
fixlbrace(yyDollar[2].i)
}
case 201:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1296
{
yyVAL.node = Nod(OTSTRUCT, nil, nil)
fixlbrace(yyDollar[2].i)
}
case 202:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:1303
{
yyVAL.node = Nod(OTINTER, nil, nil)
yyVAL.node.List = yyDollar[3].list
fixlbrace(yyDollar[2].i)
}
case 203:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1309
{
yyVAL.node = Nod(OTINTER, nil, nil)
fixlbrace(yyDollar[2].i)
}
case 204:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1320
{
yyVAL.node = yyDollar[2].node
if yyVAL.node == nil {
break
}
if noescape && yyDollar[3].list != nil {
Yyerror("can only use //go:noescape with external func implementations")
}
yyVAL.node.Nbody = yyDollar[3].list
yyVAL.node.Endlineno = lineno
yyVAL.node.Noescape = noescape
yyVAL.node.Nosplit = nosplit
yyVAL.node.Nowritebarrier = nowritebarrier
funcbody(yyVAL.node)
}
case 205:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:1338
{
var t *Node
yyVAL.node = nil
yyDollar[3].list = checkarglist(yyDollar[3].list, 1)
if yyDollar[1].sym.Name == "init" {
yyDollar[1].sym = renameinit()
if yyDollar[3].list != nil || yyDollar[5].list != nil {
Yyerror("func init must have no arguments and no return values")
}
}
if localpkg.Name == "main" && yyDollar[1].sym.Name == "main" {
if yyDollar[3].list != nil || yyDollar[5].list != nil {
Yyerror("func main must have no arguments and no return values")
}
}
t = Nod(OTFUNC, nil, nil)
t.List = yyDollar[3].list
t.Rlist = yyDollar[5].list
yyVAL.node = Nod(ODCLFUNC, nil, nil)
yyVAL.node.Nname = newname(yyDollar[1].sym)
yyVAL.node.Nname.Defn = yyVAL.node
yyVAL.node.Nname.Ntype = t // TODO: check if nname already has an ntype
declare(yyVAL.node.Nname, PFUNC)
funchdr(yyVAL.node)
}
case 206:
yyDollar = yyS[yypt-8 : yypt+1]
//line go.y:1369
{
var rcvr, t *Node
yyVAL.node = nil
yyDollar[2].list = checkarglist(yyDollar[2].list, 0)
yyDollar[6].list = checkarglist(yyDollar[6].list, 1)
if yyDollar[2].list == nil {
Yyerror("method has no receiver")
break
}
if yyDollar[2].list.Next != nil {
Yyerror("method has multiple receivers")
break
}
rcvr = yyDollar[2].list.N
if rcvr.Op != ODCLFIELD {
Yyerror("bad receiver in method")
break
}
t = Nod(OTFUNC, rcvr, nil)
t.List = yyDollar[6].list
t.Rlist = yyDollar[8].list
yyVAL.node = Nod(ODCLFUNC, nil, nil)
yyVAL.node.Shortname = newname(yyDollar[4].sym)
yyVAL.node.Nname = methodname1(yyVAL.node.Shortname, rcvr.Right)
yyVAL.node.Nname.Defn = yyVAL.node
yyVAL.node.Nname.Ntype = t
yyVAL.node.Nname.Nointerface = nointerface
declare(yyVAL.node.Nname, PFUNC)
funchdr(yyVAL.node)
}
case 207:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:1407
{
var s *Sym
var t *Type
yyVAL.node = nil
s = yyDollar[1].sym
t = functype(nil, yyDollar[3].list, yyDollar[5].list)
importsym(s, ONAME)
if s.Def != nil && s.Def.Op == ONAME {
if Eqtype(t, s.Def.Type) {
dclcontext = PDISCARD // since we skip funchdr below
break
}
Yyerror("inconsistent definition for func %v during import\n\t%v\n\t%v", Sconv(s, 0), Tconv(s.Def.Type, 0), Tconv(t, 0))
}
yyVAL.node = newname(s)
yyVAL.node.Type = t
declare(yyVAL.node, PFUNC)
funchdr(yyVAL.node)
}
case 208:
yyDollar = yyS[yypt-8 : yypt+1]
//line go.y:1432
{
yyVAL.node = methodname1(newname(yyDollar[4].sym), yyDollar[2].list.N.Right)
yyVAL.node.Type = functype(yyDollar[2].list.N, yyDollar[6].list, yyDollar[8].list)
checkwidth(yyVAL.node.Type)
addmethod(yyDollar[4].sym, yyVAL.node.Type, false, nointerface)
nointerface = false
funchdr(yyVAL.node)
// inl.C's inlnode in on a dotmeth node expects to find the inlineable body as
// (dotmeth's type).Nname.Inl, and dotmeth's type has been pulled
// out by typecheck's lookdot as this $$.ttype. So by providing
// this back link here we avoid special casing there.
yyVAL.node.Type.Nname = yyVAL.node
}
case 209:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:1450
{
yyDollar[3].list = checkarglist(yyDollar[3].list, 1)
yyVAL.node = Nod(OTFUNC, nil, nil)
yyVAL.node.List = yyDollar[3].list
yyVAL.node.Rlist = yyDollar[5].list
}
case 210:
yyDollar = yyS[yypt-0 : yypt+1]
//line go.y:1458
{
yyVAL.list = nil
}
case 211:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1462
{
yyVAL.list = yyDollar[2].list
if yyVAL.list == nil {
yyVAL.list = list1(Nod(OEMPTY, nil, nil))
}
}
case 212:
yyDollar = yyS[yypt-0 : yypt+1]
//line go.y:1471
{
yyVAL.list = nil
}
case 213:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1475
{
yyVAL.list = list1(Nod(ODCLFIELD, nil, yyDollar[1].node))
}
case 214:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1479
{
yyDollar[2].list = checkarglist(yyDollar[2].list, 0)
yyVAL.list = yyDollar[2].list
}
case 215:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1486
{
closurehdr(yyDollar[1].node)
}
case 216:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:1492
{
yyVAL.node = closurebody(yyDollar[3].list)
fixlbrace(yyDollar[2].i)
}
case 217:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:1497
{
yyVAL.node = closurebody(nil)
}
case 218:
yyDollar = yyS[yypt-0 : yypt+1]
//line go.y:1508
{
yyVAL.list = nil
}
case 219:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1512
{
yyVAL.list = concat(yyDollar[1].list, yyDollar[2].list)
if nsyntaxerrors == 0 {
testdclstack()
}
nointerface = false
noescape = false
nosplit = false
nowritebarrier = false
}
case 220:
yyVAL.list = yyS[yypt-0].list
case 221:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1526
{
yyVAL.list = concat(yyDollar[1].list, yyDollar[3].list)
}
case 222:
yyVAL.list = yyS[yypt-0].list
case 223:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1533
{
yyVAL.list = concat(yyDollar[1].list, yyDollar[3].list)
}
case 224:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1539
{
yyVAL.list = list1(yyDollar[1].node)
}
case 225:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1543
{
yyVAL.list = list(yyDollar[1].list, yyDollar[3].node)
}
case 226:
yyVAL.list = yyS[yypt-0].list
case 227:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1550
{
yyVAL.list = concat(yyDollar[1].list, yyDollar[3].list)
}
case 228:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1556
{
yyVAL.list = list1(yyDollar[1].node)
}
case 229:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1560
{
yyVAL.list = list(yyDollar[1].list, yyDollar[3].node)
}
case 230:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1566
{
var l *NodeList
var n *Node
l = yyDollar[1].list
if l == nil {
// ? symbol, during import (list1(nil) == nil)
n = yyDollar[2].node
if n.Op == OIND {
n = n.Left
}
n = embedded(n.Sym, importpkg)
n.Right = yyDollar[2].node
n.Val = yyDollar[3].val
yyVAL.list = list1(n)
break
}
for l = yyDollar[1].list; l != nil; l = l.Next {
l.N = Nod(ODCLFIELD, l.N, yyDollar[2].node)
l.N.Val = yyDollar[3].val
}
}
case 231:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:1590
{
yyDollar[1].node.Val = yyDollar[2].val
yyVAL.list = list1(yyDollar[1].node)
}
case 232:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:1595
{
yyDollar[2].node.Val = yyDollar[4].val
yyVAL.list = list1(yyDollar[2].node)
Yyerror("cannot parenthesize embedded type")
}
case 233:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1601
{
yyDollar[2].node.Right = Nod(OIND, yyDollar[2].node.Right, nil)
yyDollar[2].node.Val = yyDollar[3].val
yyVAL.list = list1(yyDollar[2].node)
}
case 234:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:1607
{
yyDollar[3].node.Right = Nod(OIND, yyDollar[3].node.Right, nil)
yyDollar[3].node.Val = yyDollar[5].val
yyVAL.list = list1(yyDollar[3].node)
Yyerror("cannot parenthesize embedded type")
}
case 235:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:1614
{
yyDollar[3].node.Right = Nod(OIND, yyDollar[3].node.Right, nil)
yyDollar[3].node.Val = yyDollar[5].val
yyVAL.list = list1(yyDollar[3].node)
Yyerror("cannot parenthesize embedded type")
}
case 236:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1623
{
var n *Node
yyVAL.sym = yyDollar[1].sym
n = oldname(yyDollar[1].sym)
if n.Pack != nil {
n.Pack.Used = 1
}
}
case 237:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1633
{
var pkg *Pkg
if yyDollar[1].sym.Def == nil || yyDollar[1].sym.Def.Op != OPACK {
Yyerror("%v is not a package", Sconv(yyDollar[1].sym, 0))
pkg = localpkg
} else {
yyDollar[1].sym.Def.Used = 1
pkg = yyDollar[1].sym.Def.Pkg
}
yyVAL.sym = restrictlookup(yyDollar[3].sym.Name, pkg)
}
case 238:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1648
{
yyVAL.node = embedded(yyDollar[1].sym, localpkg)
}
case 239:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:1654
{
yyVAL.node = Nod(ODCLFIELD, yyDollar[1].node, yyDollar[2].node)
ifacedcl(yyVAL.node)
}
case 240:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1659
{
yyVAL.node = Nod(ODCLFIELD, nil, oldname(yyDollar[1].sym))
}
case 241:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1663
{
yyVAL.node = Nod(ODCLFIELD, nil, oldname(yyDollar[2].sym))
Yyerror("cannot parenthesize embedded type")
}
case 242:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:1670
{
// without func keyword
yyDollar[2].list = checkarglist(yyDollar[2].list, 1)
yyVAL.node = Nod(OTFUNC, fakethis(), nil)
yyVAL.node.List = yyDollar[2].list
yyVAL.node.Rlist = yyDollar[4].list
}
case 243:
yyVAL.node = yyS[yypt-0].node
case 244:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:1684
{
yyVAL.node = Nod(ONONAME, nil, nil)
yyVAL.node.Sym = yyDollar[1].sym
yyVAL.node = Nod(OKEY, yyVAL.node, yyDollar[2].node)
}
case 245:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:1690
{
yyVAL.node = Nod(ONONAME, nil, nil)
yyVAL.node.Sym = yyDollar[1].sym
yyVAL.node = Nod(OKEY, yyVAL.node, yyDollar[2].node)
}
case 246:
yyVAL.node = yyS[yypt-0].node
case 247:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1699
{
yyVAL.list = list1(yyDollar[1].node)
}
case 248:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1703
{
yyVAL.list = list(yyDollar[1].list, yyDollar[3].node)
}
case 249:
yyDollar = yyS[yypt-0 : yypt+1]
//line go.y:1708
{
yyVAL.list = nil
}
case 250:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:1712
{
yyVAL.list = yyDollar[1].list
}
case 251:
yyDollar = yyS[yypt-0 : yypt+1]
//line go.y:1720
{
yyVAL.node = nil
}
case 252:
yyVAL.node = yyS[yypt-0].node
case 253:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1725
{
yyVAL.node = liststmt(yyDollar[1].list)
}
case 254:
yyVAL.node = yyS[yypt-0].node
case 255:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1730
{
yyVAL.node = nil
}
case 256:
yyVAL.node = yyS[yypt-0].node
case 257:
yyVAL.node = yyS[yypt-0].node
case 258:
yyVAL.node = yyS[yypt-0].node
case 259:
yyVAL.node = yyS[yypt-0].node
case 260:
yyVAL.node = yyS[yypt-0].node
case 261:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:1741
{
yyDollar[1].node = Nod(OLABEL, yyDollar[1].node, nil)
yyDollar[1].node.Sym = dclstack // context, for goto restrictions
}
case 262:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:1746
{
var l *NodeList
yyDollar[1].node.Defn = yyDollar[4].node
l = list1(yyDollar[1].node)
if yyDollar[4].node != nil {
l = list(l, yyDollar[4].node)
}
yyVAL.node = liststmt(l)
}
case 263:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1757
{
// will be converted to OFALL
yyVAL.node = Nod(OXFALL, nil, nil)
yyVAL.node.Xoffset = int64(block)
}
case 264:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:1763
{
yyVAL.node = Nod(OBREAK, yyDollar[2].node, nil)
}
case 265:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:1767
{
yyVAL.node = Nod(OCONTINUE, yyDollar[2].node, nil)
}
case 266:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:1771
{
yyVAL.node = Nod(OPROC, yyDollar[2].node, nil)
}
case 267:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:1775
{
yyVAL.node = Nod(ODEFER, yyDollar[2].node, nil)
}
case 268:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:1779
{
yyVAL.node = Nod(OGOTO, yyDollar[2].node, nil)
yyVAL.node.Sym = dclstack // context, for goto restrictions
}
case 269:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:1784
{
yyVAL.node = Nod(ORETURN, nil, nil)
yyVAL.node.List = yyDollar[2].list
if yyVAL.node.List == nil && Curfn != nil {
var l *NodeList
for l = Curfn.Dcl; l != nil; l = l.Next {
if l.N.Class == PPARAM {
continue
}
if l.N.Class != PPARAMOUT {
break
}
if l.N.Sym.Def != l.N {
Yyerror("%s is shadowed during return", l.N.Sym.Name)
}
}
}
}
case 270:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1806
{
yyVAL.list = nil
if yyDollar[1].node != nil {
yyVAL.list = list1(yyDollar[1].node)
}
}
case 271:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1813
{
yyVAL.list = yyDollar[1].list
if yyDollar[3].node != nil {
yyVAL.list = list(yyVAL.list, yyDollar[3].node)
}
}
case 272:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1822
{
yyVAL.list = list1(yyDollar[1].node)
}
case 273:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1826
{
yyVAL.list = list(yyDollar[1].list, yyDollar[3].node)
}
case 274:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1832
{
yyVAL.list = list1(yyDollar[1].node)
}
case 275:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1836
{
yyVAL.list = list(yyDollar[1].list, yyDollar[3].node)
}
case 276:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1842
{
yyVAL.list = list1(yyDollar[1].node)
}
case 277:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1846
{
yyVAL.list = list(yyDollar[1].list, yyDollar[3].node)
}
case 278:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1852
{
yyVAL.list = list1(yyDollar[1].node)
}
case 279:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1856
{
yyVAL.list = list(yyDollar[1].list, yyDollar[3].node)
}
case 280:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1865
{
yyVAL.list = list1(yyDollar[1].node)
}
case 281:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1869
{
yyVAL.list = list1(yyDollar[1].node)
}
case 282:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1873
{
yyVAL.list = list(yyDollar[1].list, yyDollar[3].node)
}
case 283:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:1877
{
yyVAL.list = list(yyDollar[1].list, yyDollar[3].node)
}
case 284:
yyDollar = yyS[yypt-0 : yypt+1]
//line go.y:1882
{
yyVAL.list = nil
}
case 285:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:1886
{
yyVAL.list = yyDollar[1].list
}
case 290:
yyDollar = yyS[yypt-0 : yypt+1]
//line go.y:1900
{
yyVAL.node = nil
}
case 291:
yyVAL.node = yyS[yypt-0].node
case 292:
yyDollar = yyS[yypt-0 : yypt+1]
//line go.y:1906
{
yyVAL.list = nil
}
case 293:
yyVAL.list = yyS[yypt-0].list
case 294:
yyDollar = yyS[yypt-0 : yypt+1]
//line go.y:1912
{
yyVAL.node = nil
}
case 295:
yyVAL.node = yyS[yypt-0].node
case 296:
yyDollar = yyS[yypt-0 : yypt+1]
//line go.y:1918
{
yyVAL.list = nil
}
case 297:
yyVAL.list = yyS[yypt-0].list
case 298:
yyDollar = yyS[yypt-0 : yypt+1]
//line go.y:1924
{
yyVAL.list = nil
}
case 299:
yyVAL.list = yyS[yypt-0].list
case 300:
yyDollar = yyS[yypt-0 : yypt+1]
//line go.y:1930
{
yyVAL.list = nil
}
case 301:
yyVAL.list = yyS[yypt-0].list
case 302:
yyDollar = yyS[yypt-0 : yypt+1]
//line go.y:1936
{
yyVAL.val.Ctype = CTxxx
}
case 303:
yyVAL.val = yyS[yypt-0].val
case 304:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:1946
{
importimport(yyDollar[2].sym, yyDollar[3].val.U.Sval)
}
case 305:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:1950
{
importvar(yyDollar[2].sym, yyDollar[3].typ)
}
case 306:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:1954
{
importconst(yyDollar[2].sym, Types[TIDEAL], yyDollar[4].node)
}
case 307:
yyDollar = yyS[yypt-6 : yypt+1]
//line go.y:1958
{
importconst(yyDollar[2].sym, yyDollar[3].typ, yyDollar[5].node)
}
case 308:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:1962
{
importtype(yyDollar[2].typ, yyDollar[3].typ)
}
case 309:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:1966
{
if yyDollar[2].node == nil {
dclcontext = PEXTERN // since we skip the funcbody below
break
}
yyDollar[2].node.Inl = yyDollar[3].list
funcbody(yyDollar[2].node)
importlist = list(importlist, yyDollar[2].node)
if Debug['E'] > 0 {
print("import [%v] func %lN \n", Zconv(importpkg.Path, 0), yyDollar[2].node)
if Debug['m'] > 2 && yyDollar[2].node.Inl != nil {
print("inl body:%+H\n", yyDollar[2].node.Inl)
}
}
}
case 310:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1987
{
yyVAL.sym = yyDollar[1].sym
structpkg = yyVAL.sym.Pkg
}
case 311:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:1994
{
yyVAL.typ = pkgtype(yyDollar[1].sym)
importsym(yyDollar[1].sym, OTYPE)
}
case 312:
yyVAL.typ = yyS[yypt-0].typ
case 313:
yyVAL.typ = yyS[yypt-0].typ
case 314:
yyVAL.typ = yyS[yypt-0].typ
case 315:
yyVAL.typ = yyS[yypt-0].typ
case 316:
yyVAL.typ = yyS[yypt-0].typ
case 317:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:2014
{
yyVAL.typ = pkgtype(yyDollar[1].sym)
}
case 318:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:2018
{
// predefined name like uint8
yyDollar[1].sym = Pkglookup(yyDollar[1].sym.Name, builtinpkg)
if yyDollar[1].sym.Def == nil || yyDollar[1].sym.Def.Op != OTYPE {
Yyerror("%s is not a type", yyDollar[1].sym.Name)
yyVAL.typ = nil
} else {
yyVAL.typ = yyDollar[1].sym.Def.Type
}
}
case 319:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:2029
{
yyVAL.typ = aindex(nil, yyDollar[3].typ)
}
case 320:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:2033
{
yyVAL.typ = aindex(nodlit(yyDollar[2].val), yyDollar[4].typ)
}
case 321:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:2037
{
yyVAL.typ = maptype(yyDollar[3].typ, yyDollar[5].typ)
}
case 322:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:2041
{
yyVAL.typ = tostruct(yyDollar[3].list)
}
case 323:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:2045
{
yyVAL.typ = tointerface(yyDollar[3].list)
}
case 324:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:2049
{
yyVAL.typ = Ptrto(yyDollar[2].typ)
}
case 325:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:2053
{
yyVAL.typ = typ(TCHAN)
yyVAL.typ.Type = yyDollar[2].typ
yyVAL.typ.Chan = Cboth
}
case 326:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:2059
{
yyVAL.typ = typ(TCHAN)
yyVAL.typ.Type = yyDollar[3].typ
yyVAL.typ.Chan = Cboth
}
case 327:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:2065
{
yyVAL.typ = typ(TCHAN)
yyVAL.typ.Type = yyDollar[3].typ
yyVAL.typ.Chan = Csend
}
case 328:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:2073
{
yyVAL.typ = typ(TCHAN)
yyVAL.typ.Type = yyDollar[3].typ
yyVAL.typ.Chan = Crecv
}
case 329:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:2081
{
yyVAL.typ = functype(nil, yyDollar[3].list, yyDollar[5].list)
}
case 330:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:2087
{
yyVAL.node = Nod(ODCLFIELD, nil, typenod(yyDollar[2].typ))
if yyDollar[1].sym != nil {
yyVAL.node.Left = newname(yyDollar[1].sym)
}
yyVAL.node.Val = yyDollar[3].val
}
case 331:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:2095
{
var t *Type
t = typ(TARRAY)
t.Bound = -1
t.Type = yyDollar[3].typ
yyVAL.node = Nod(ODCLFIELD, nil, typenod(t))
if yyDollar[1].sym != nil {
yyVAL.node.Left = newname(yyDollar[1].sym)
}
yyVAL.node.Isddd = 1
yyVAL.node.Val = yyDollar[4].val
}
case 332:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:2112
{
var s *Sym
var p *Pkg
if yyDollar[1].sym != nil && yyDollar[1].sym.Name != "?" {
yyVAL.node = Nod(ODCLFIELD, newname(yyDollar[1].sym), typenod(yyDollar[2].typ))
yyVAL.node.Val = yyDollar[3].val
} else {
s = yyDollar[2].typ.Sym
if s == nil && Isptr[yyDollar[2].typ.Etype] != 0 {
s = yyDollar[2].typ.Type.Sym
}
p = importpkg
if yyDollar[1].sym != nil {
p = yyDollar[1].sym.Pkg
}
yyVAL.node = embedded(s, p)
yyVAL.node.Right = typenod(yyDollar[2].typ)
yyVAL.node.Val = yyDollar[3].val
}
}
case 333:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:2136
{
yyVAL.node = Nod(ODCLFIELD, newname(yyDollar[1].sym), typenod(functype(fakethis(), yyDollar[3].list, yyDollar[5].list)))
}
case 334:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:2140
{
yyVAL.node = Nod(ODCLFIELD, nil, typenod(yyDollar[1].typ))
}
case 335:
yyDollar = yyS[yypt-0 : yypt+1]
//line go.y:2145
{
yyVAL.list = nil
}
case 336:
yyVAL.list = yyS[yypt-0].list
case 337:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:2152
{
yyVAL.list = yyDollar[2].list
}
case 338:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:2156
{
yyVAL.list = list1(Nod(ODCLFIELD, nil, typenod(yyDollar[1].typ)))
}
case 339:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:2166
{
yyVAL.node = nodlit(yyDollar[1].val)
}
case 340:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:2170
{
yyVAL.node = nodlit(yyDollar[2].val)
switch yyVAL.node.Val.Ctype {
case CTINT, CTRUNE:
mpnegfix(yyVAL.node.Val.U.Xval)
break
case CTFLT:
mpnegflt(yyVAL.node.Val.U.Fval)
break
case CTCPLX:
mpnegflt(&yyVAL.node.Val.U.Cval.Real)
mpnegflt(&yyVAL.node.Val.U.Cval.Imag)
break
default:
Yyerror("bad negated constant")
}
}
case 341:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:2188
{
yyVAL.node = oldname(Pkglookup(yyDollar[1].sym.Name, builtinpkg))
if yyVAL.node.Op != OLITERAL {
Yyerror("bad constant %v", Sconv(yyVAL.node.Sym, 0))
}
}
case 342:
yyVAL.node = yyS[yypt-0].node
case 343:
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:2198
{
if yyDollar[2].node.Val.Ctype == CTRUNE && yyDollar[4].node.Val.Ctype == CTINT {
yyVAL.node = yyDollar[2].node
mpaddfixfix(yyDollar[2].node.Val.U.Xval, yyDollar[4].node.Val.U.Xval, 0)
break
}
yyDollar[4].node.Val.U.Cval.Real = yyDollar[4].node.Val.U.Cval.Imag
Mpmovecflt(&yyDollar[4].node.Val.U.Cval.Imag, 0.0)
yyVAL.node = nodcplxlit(yyDollar[2].node.Val, yyDollar[4].node.Val)
}
case 346:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:2214
{
yyVAL.list = list1(yyDollar[1].node)
}
case 347:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:2218
{
yyVAL.list = list(yyDollar[1].list, yyDollar[3].node)
}
case 348:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:2224
{
yyVAL.list = list1(yyDollar[1].node)
}
case 349:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:2228
{
yyVAL.list = list(yyDollar[1].list, yyDollar[3].node)
}
case 350:
yyDollar = yyS[yypt-1 : yypt+1]
//line go.y:2234
{
yyVAL.list = list1(yyDollar[1].node)
}
case 351:
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:2238
{
yyVAL.list = list(yyDollar[1].list, yyDollar[3].node)
}
}
goto yystack /* stack new state and value */
}