ref: 3866717cbb020199d58171c1c0cdd7382a74ee82
dir: /limbo/y.tab.c/
#line 2 "limbo.y" #include "limbo.h" #line 5 "limbo.y" typedef union { struct{ Src src; union{ Sym *idval; Long ival; Real rval; }v; }tok; Decl *ids; Node *node; Type *type; Typelist *types; } YYSTYPE; extern int yyerrflag; #ifndef YYMAXDEPTH #define YYMAXDEPTH 150 #endif YYSTYPE yylval; YYSTYPE yyval; #define Landeq 57346 #define Loreq 57347 #define Lxoreq 57348 #define Llsheq 57349 #define Lrsheq 57350 #define Laddeq 57351 #define Lsubeq 57352 #define Lmuleq 57353 #define Ldiveq 57354 #define Lmodeq 57355 #define Lexpeq 57356 #define Ldeclas 57357 #define Lload 57358 #define Loror 57359 #define Landand 57360 #define Lcons 57361 #define Leq 57362 #define Lneq 57363 #define Lleq 57364 #define Lgeq 57365 #define Llsh 57366 #define Lrsh 57367 #define Lexp 57368 #define Lcomm 57369 #define Linc 57370 #define Ldec 57371 #define Lof 57372 #define Lref 57373 #define Lif 57374 #define Lelse 57375 #define Lfn 57376 #define Lexcept 57377 #define Lraises 57378 #define Lmdot 57379 #define Lto 57380 #define Lor 57381 #define Lrconst 57382 #define Lconst 57383 #define Lid 57384 #define Ltid 57385 #define Lsconst 57386 #define Llabs 57387 #define Lnil 57388 #define Llen 57389 #define Lhd 57390 #define Ltl 57391 #define Ltagof 57392 #define Limplement 57393 #define Limport 57394 #define Linclude 57395 #define Lcon 57396 #define Ltype 57397 #define Lmodule 57398 #define Lcyclic 57399 #define Ladt 57400 #define Larray 57401 #define Llist 57402 #define Lchan 57403 #define Lself 57404 #define Ldo 57405 #define Lwhile 57406 #define Lfor 57407 #define Lbreak 57408 #define Lalt 57409 #define Lcase 57410 #define Lpick 57411 #define Lcont 57412 #define Lreturn 57413 #define Lexit 57414 #define Lspawn 57415 #define Lraise 57416 #define Lfix 57417 #define Ldynamic 57418 #define YYEOFCODE 1 #define YYERRCODE 2 #line 1596 "limbo.y" static char *mkfileext(char*, char*, char*); static void usage(void); static int dosym; static int toterrors; static ulong canonnanbits[] = { 0x7fffffff, 0xffffffff}; static char* infile; #define SLASHMOD "/module" static char* getroot(void) { int n; char *e, *l, *s; if((e = getenv("EMU")) != nil){ for(s = e; *e != '\0'; e++){ if(*e == '-' && *(e+1) == 'r' && (e == s || *(e-1) == ' ' || *(e-1) == '\t')){ e += 2; l = strchr(e, ' '); if(l != nil) *l = '\0'; if((n = strlen(e)) > 0){ s = malloc(n+1); strcpy(s, e); return s; } } } } if((e = getenv("ROOT")) != nil) return strdup(e); return nil; } void main(int argc, char *argv[]) { char *s, *ofile, *ext, *root; int i; FPinit(); FPcontrol(0, INVAL|ZDIV|OVFL|UNFL|INEX); canonnan = canontod(canonnanbits); fmtinstall('D', dotconv); fmtinstall('I', instconv); fmtinstall('K', declconv); fmtinstall('k', storeconv); fmtinstall('L', lineconv); fmtinstall('M', mapconv); fmtinstall('n', nodeconv); /* exp structure */ fmtinstall('O', opconv); fmtinstall('g', gfltconv); fmtinstall('Q', etconv); /* src expression with type */ fmtinstall('R', ctypeconv); /* c equivalent type */ fmtinstall('P', ctypeconv); /* c equivalent type - pointer type */ fmtinstall('T', typeconv); /* source style types */ fmtinstall('t', stypeconv); /* structurally descriptive type */ fmtinstall('U', srcconv); fmtinstall('v', expconv); /* src expression */ fmtinstall('V', expconv); /* src expression in '' */ lexinit(); typeinit(); optabinit(); gendis = 1; asmsym = 0; maxerr = 20; ofile = nil; ext = nil; ARGBEGIN{ case 'D': /* * debug flags: * * a alt compilation * A array constructor compilation * b boolean and branch compilation * c case compilation * d function declaration * D descriptor generation * e expression compilation * E addressable expression compilation * f print arguments for compiled functions * F constant folding * g print out globals * m module declaration and type checking * n nil references * s print sizes of output file sections * S type signing * t type checking function bodies * T timing * v global var and constant compilation * x adt verification * Y tuple compilation * z Z bug fixes */ s = ARGF(); while(s && *s) debug[*s++] = 1; break; case 'I': s = ARGF(); if(s == nil) usage(); addinclude(s); break; case 'G': asmsym = 1; break; case 'S': gendis = 0; break; case 'a': emitstub = 1; break; case 'A': emitstub = emitdyn = 1; break; case 'c': mustcompile = 1; break; case 'C': dontcompile = 1; break; case 'e': maxerr = 1000; break; case 'f': isfatal = 1; break; case 'F': newfnptr = 1; break; case 'g': dosym = 1; break; case 'i': dontinline = 1; break; case 'o': ofile = ARGF(); break; case 'O': optims = 1; break; case 's': s = ARGF(); if(s != nil) fixss = atoi(s); break; case 't': emittab = ARGF(); if(emittab == nil) usage(); break; case 'T': emitcode = ARGF(); if(emitcode == nil) usage(); break; case 'd': emitcode = ARGF(); if(emitcode == nil) usage(); emitdyn = 1; break; case 'w': superwarn = dowarn; dowarn = 1; break; case 'x': ext = ARGF(); break; case 'X': signdump = ARGF(); break; case 'y': oldcycles = 1; break; case 'z': arrayz = 1; break; default: usage(); break; }ARGEND if((root = getroot()) != nil){ char *r; r = malloc(strlen(root)+strlen(SLASHMOD)+1); strcpy(r, root); strcat(r, SLASHMOD); addinclude(r); free(root); } else addinclude(INCPATH); if(argc == 0){ usage(); }else if(ofile != nil){ if(argc != 1) usage(); translate(argv[0], ofile, mkfileext(ofile, ".dis", ".sbl")); }else{ if(ext == nil){ ext = ".s"; if(gendis) ext = ".dis"; } for(i = 0; i < argc; i++){ s = strrchr(argv[i], '/'); if(s == nil) s = argv[i]; else s++; if(argc > 1) print("%s:\n", argv[i]); ofile = mkfileext(s, ".b", ext); translate(argv[i], ofile, mkfileext(ofile, ext, ".sbl")); } } if(toterrors) exits("errors"); exits(0); } static void usage(void) { fprint(2, "usage: limbo [-CGSacgwe] [-I incdir] [-o outfile] [-{T|t|d} module] [-D debug] file ...\n"); exits("usage"); } static char* mkfileext(char *file, char *oldext, char *ext) { char *ofile; int n, n2; n = strlen(file); n2 = strlen(oldext); if(n >= n2 && strcmp(&file[n-n2], oldext) == 0) n -= n2; ofile = malloc(n + strlen(ext) + 1); memmove(ofile, file, n); strcpy(ofile+n, ext); return ofile; } void translate(char *in, char *out, char *dbg) { Decl *entry; int doemit; infile = in; outfile = out; symfile = dbg; errors = 0; bins[0] = Bopen(in, OREAD); if(bins[0] == nil){ fprint(2, "can't open %s: %r\n", in); toterrors++; return; } doemit = emitstub || emittab || emitcode; if(!doemit){ bout = Bopen(out, OWRITE); if(bout == nil){ fprint(2, "can't open %s: %r\n", out); toterrors++; Bterm(bins[0]); return; } if(dosym){ bsym = Bopen(dbg, OWRITE); if(bsym == nil) fprint(2, "can't open %s: %r\n", dbg); } } lexstart(in); popscopes(); typestart(); declstart(); yyparse(); entry = typecheck(!doemit); modcom(entry); fns = nil; nfns = 0; descriptors = nil; if(bout != nil) Bterm(bout); if(bsym != nil) Bterm(bsym); toterrors += errors; if(errors && bout != nil) remove(out); if(errors && bsym != nil) remove(dbg); } void trapFPE(unsigned exception[5], int value[2]) { /* can't happen; it's just here to keep FPinit happy. */ USED(exception); USED(value); } static char * win2inf(char *s) { int nt = 0; char *t; if(strlen(s) > 1 && s[1] == ':'){ s[1] = '/'; s++; nt = 1; } for(t = s; *t != '\0'; t++){ if(*t == '\\') *t = '/'; if(nt) *t = tolower(*t); } return s; } static char * cleann(char *s) { char *p, *r, *t; char buf[256]; r = t = malloc(strlen(s)+1); strcpy(t, s); t = win2inf(t); if(*t != '/'){ p = win2inf(getwd(buf, sizeof(buf))); s = malloc(strlen(p)+strlen(t)+2); strcpy(s, p); strcat(s, "/"); strcat(s, t); } else{ s = malloc(strlen(t)+1); strcpy(s, t); } free(r); /* print("cleann: %s\n", p); */ return cleanname(s); } char * srcpath(char *name, int nlen) { int l1, l2; char *r, *srcp, *t; srcp = cleann(infile); r = getroot(); if(r == nil){ l1 = strlen(INCPATH); r = malloc(l1+1); strcpy(r, INCPATH); if(l1 >= strlen(SLASHMOD) && strcmp(r+l1-strlen(SLASHMOD), SLASHMOD) == 0) r[l1-strlen(SLASHMOD)] = '\0'; } t = cleann(r); free(r); r = t; /* srcp relative to r */ l1 = strlen(srcp); l2 = strlen(r); if(l1 >= l2 && strncmp(srcp, r, l2) == 0){ /* nothing to do */ }else l2 = 0; strncpy(name, srcp+l2, nlen); name[nlen-1] = '\0'; free(r); free(srcp); /* print("srcpath: %s\n", name); */ return name; } short yyexca[] = {-1, 1, 1, -1, -2, 0, -1, 3, 1, 3, -2, 0, -1, 17, 39, 88, 50, 62, 54, 88, 99, 62, -2, 250, -1, 209, 59, 29, 71, 29, -2, 0, -1, 228, 1, 2, -2, 0, -1, 271, 50, 176, -2, 255, -1, 305, 59, 41, 71, 41, 91, 41, -2, 0, -1, 307, 72, 175, 85, 150, 86, 150, 87, 150, 89, 150, 90, 150, 91, 150, -2, 0, -1, 376, 50, 62, 99, 62, -2, 250, -1, 377, 72, 175, 85, 150, 86, 150, 87, 150, 89, 150, 90, 150, 91, 150, -2, 0, -1, 383, 53, 71, 54, 71, -2, 110, -1, 385, 53, 72, 54, 72, -2, 112, -1, 417, 72, 175, 85, 150, 86, 150, 87, 150, 89, 150, 90, 150, 91, 150, -2, 0, -1, 424, 72, 175, 85, 150, 86, 150, 87, 150, 89, 150, 90, 150, 91, 150, -2, 0, -1, 439, 53, 71, 54, 71, -2, 111, -1, 440, 53, 72, 54, 72, -2, 113, -1, 448, 71, 277, 99, 277, -2, 163, -1, 465, 72, 175, 85, 150, 86, 150, 87, 150, 89, 150, 90, 150, 91, 150, -2, 0, -1, 482, 50, 126, 99, 126, -2, 239, -1, 487, 71, 274, -2, 0, -1, 499, 59, 47, 71, 47, -2, 0, -1, 504, 59, 41, 71, 41, 91, 41, -2, 0, -1, 510, 72, 175, 85, 150, 86, 150, 87, 150, 89, 150, 90, 150, 91, 150, -2, 0, -1, 544, 72, 175, 85, 150, 86, 150, 87, 150, 89, 150, 90, 150, 91, 150, -2, 0, -1, 550, 71, 154, 72, 175, 85, 150, 86, 150, 87, 150, 89, 150, 90, 150, 91, 150, -2, 0, -1, 558, 56, 59, 62, 59, -2, 62, -1, 564, 72, 175, 85, 150, 86, 150, 87, 150, 89, 150, 90, 150, 91, 150, -2, 0, -1, 569, 71, 157, 72, 175, 85, 150, 86, 150, 87, 150, 89, 150, 90, 150, 91, 150, -2, 0, -1, 573, 72, 176, -2, 163, -1, 592, 71, 160, 72, 175, 85, 150, 86, 150, 87, 150, 89, 150, 90, 150, 91, 150, -2, 0, -1, 598, 71, 168, 72, 175, 85, 150, 86, 150, 87, 150, 89, 150, 90, 150, 91, 150, -2, 0, -1, 602, 72, 175, 85, 150, 86, 150, 87, 150, 89, 150, 90, 150, 91, 150, -2, 0, -1, 605, 50, 62, 56, 171, 62, 171, 99, 62, -2, 250, }; #define YYNPROD 282 #define YYPRIVATE 57344 #define YYLAST 2674 short yyact[] = { 375, 587, 449, 360, 501, 380, 408, 307, 365, 311, 355, 447, 428, 295, 445, 184, 268, 15, 83, 8, 101, 49, 82, 4, 317, 12, 42, 23, 48, 77, 78, 79, 109, 35, 196, 51, 540, 487, 359, 6, 482, 3, 6, 396, 455, 454, 361, 14, 346, 21, 14, 378, 349, 290, 419, 283, 117, 223, 327, 31, 284, 224, 221, 46, 461, 111, 104, 11, 513, 595, 40, 208, 597, 185, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 43, 116, 581, 181, 182, 183, 71, 10, 284, 203, 10, 206, 284, 92, 345, 345, 418, 207, 345, 32, 113, 32, 543, 118, 291, 291, 44, 284, 118, 424, 423, 422, 481, 426, 425, 427, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 509, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 185, 6, 200, 271, 228, 479, 478, 305, 22, 14, 22, 269, 477, 210, 434, 265, 216, 192, 193, 277, 561, 22, 406, 282, 306, 420, 192, 193, 226, 285, 405, 205, 403, 350, 286, 93, 555, 267, 215, 47, 411, 26, 411, 25, 24, 508, 309, 308, 300, 591, 568, 63, 553, 549, 227, 5, 10, 416, 415, 414, 192, 193, 75, 74, 69, 68, 73, 532, 18, 54, 55, 62, 60, 61, 64, 521, 294, 486, 213, 531, 192, 193, 464, 310, 323, 302, 65, 66, 67, 111, 320, 395, 19, 379, 23, 562, 315, 576, 86, 204, 296, 504, 76, 191, 494, 84, 313, 475, 89, 6, 463, 394, 17, 357, 192, 193, 18, 14, 91, 81, 192, 193, 280, 185, 43, 217, 2, 337, 13, 444, 209, 113, 80, 526, 19, 96, 575, 181, 335, 491, 87, 88, 85, 333, 314, 600, 212, 192, 193, 19, 44, 610, 192, 193, 45, 107, 76, 344, 18, 377, 19, 489, 483, 354, 10, 353, 298, 608, 86, 114, 389, 190, 33, 115, 484, 84, 214, 387, 89, 385, 114, 398, 535, 383, 115, 194, 388, 197, 91, 81, 321, 560, 352, 279, 322, 202, 45, 399, 400, 5, 18, 600, 381, 503, 536, 495, 218, 599, 496, 412, 87, 88, 85, 417, 432, 558, 489, 185, 539, 489, 500, 431, 596, 433, 430, 593, 76, 489, 489, 437, 102, 86, 435, 584, 570, 22, 19, 448, 84, 337, 182, 89, 489, 72, 410, 440, 313, 489, 551, 439, 590, 91, 81, 490, 333, 476, 17, 429, 70, 288, 18, 75, 74, 45, 469, 73, 465, 18, 474, 438, 472, 496, 13, 87, 88, 85, 287, 503, 266, 156, 281, 119, 589, 103, 86, 192, 193, 448, 39, 76, 90, 84, 158, 90, 89, 506, 289, 483, 564, 292, 293, 485, 493, 36, 91, 81, 514, 588, 462, 197, 185, 413, 404, 473, 167, 280, 326, 222, 519, 105, 518, 511, 512, 316, 319, 507, 87, 88, 85, 86, 448, 523, 519, 525, 524, 34, 84, 397, 529, 89, 176, 522, 76, 90, 328, 90, 528, 533, 393, 91, 81, 180, 541, 90, 332, 179, 542, 537, 519, 329, 548, 176, 199, 552, 90, 177, 198, 550, 195, 402, 178, 87, 88, 85, 157, 442, 160, 330, 161, 162, 556, 559, 437, 313, 441, 325, 225, 76, 159, 158, 566, 342, 343, 573, 565, 571, 567, 569, 347, 473, 137, 138, 139, 136, 134, 519, 341, 579, 41, 201, 580, 602, 573, 582, 583, 544, 382, 324, 220, 386, 219, 545, 557, 471, 470, 467, 410, 421, 592, 391, 392, 39, 594, 473, 186, 573, 598, 601, 90, 136, 134, 520, 603, 19, 607, 241, 401, 29, 609, 27, 356, 534, 304, 473, 90, 364, 120, 90, 90, 30, 90, 28, 1, 460, 270, 272, 86, 90, 312, 182, 167, 538, 578, 84, 577, 409, 89, 499, 498, 586, 585, 90, 90, 16, 407, 194, 91, 81, 303, 351, 9, 473, 547, 546, 443, 517, 50, 516, 452, 211, 7, 446, 334, 456, 264, 457, 297, 502, 87, 88, 85, 52, 53, 56, 96, 367, 108, 59, 72, 106, 468, 112, 57, 58, 76, 63, 143, 142, 140, 141, 137, 138, 139, 136, 134, 90, 75, 74, 69, 273, 73, 110, 18, 54, 55, 62, 60, 61, 64, 20, 90, 37, 38, 0, 0, 0, 90, 0, 276, 492, 274, 275, 67, 497, 140, 141, 137, 138, 139, 136, 134, 0, 0, 0, 0, 0, 76, 90, 0, 0, 0, 0, 0, 0, 497, 0, 0, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, 530, 0, 0, 90, 90, 0, 0, 90, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 0, 155, 154, 153, 152, 151, 150, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 0, 339, 0, 90, 0, 0, 0, 0, 86, 0, 0, 0, 90, 0, 0, 84, 90, 0, 89, 0, 98, 90, 0, 90, 0, 0, 0, 362, 91, 81, 0, 0, 90, 0, 0, 0, 0, 0, 90, 0, 0, 0, 50, 95, 0, 97, 94, 99, 0, 100, 87, 88, 85, 0, 0, 0, 0, 52, 53, 56, 338, 0, 0, 59, 374, 0, 76, 0, 57, 58, 0, 63, 366, 0, 0, 0, 0, 90, 0, 0, 0, 90, 75, 74, 376, 68, 73, 0, 18, 54, 55, 62, 60, 61, 64, 363, 505, 362, 0, 0, 13, 0, 90, 0, 0, 0, 65, 66, 67, 0, 0, 0, 50, 368, 0, 90, 0, 369, 370, 373, 371, 372, 76, 0, 0, 0, 0, 52, 53, 56, 0, 0, 0, 59, 374, 0, 0, 0, 57, 58, 0, 63, 366, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 74, 376, 68, 73, 0, 18, 54, 55, 62, 60, 61, 64, 363, 466, 362, 0, 0, 13, 0, 0, 0, 0, 0, 65, 66, 67, 0, 0, 0, 50, 368, 0, 0, 0, 369, 370, 373, 371, 372, 76, 0, 0, 0, 0, 52, 53, 56, 0, 0, 0, 59, 374, 0, 0, 0, 57, 58, 0, 63, 366, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 74, 376, 68, 73, 0, 18, 54, 55, 62, 60, 61, 64, 363, 436, 362, 0, 0, 13, 0, 0, 0, 0, 0, 65, 66, 67, 0, 0, 0, 50, 368, 0, 0, 0, 369, 370, 373, 371, 372, 76, 0, 0, 0, 0, 52, 53, 56, 0, 0, 0, 59, 374, 0, 0, 0, 57, 58, 0, 63, 366, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 74, 376, 68, 73, 0, 18, 54, 55, 62, 60, 61, 64, 363, 358, 604, 0, 0, 13, 0, 0, 0, 0, 0, 65, 66, 67, 0, 0, 0, 50, 368, 0, 0, 0, 369, 370, 373, 371, 372, 76, 0, 0, 0, 0, 52, 53, 606, 0, 0, 0, 59, 374, 0, 0, 0, 57, 58, 0, 63, 366, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 74, 605, 68, 73, 0, 18, 54, 55, 62, 60, 61, 64, 363, 572, 0, 0, 0, 13, 0, 0, 0, 0, 0, 65, 66, 67, 0, 0, 50, 0, 368, 0, 0, 0, 369, 370, 373, 371, 372, 76, 0, 0, 0, 52, 53, 450, 0, 0, 0, 59, 374, 0, 0, 0, 57, 58, 0, 63, 366, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 74, 376, 68, 73, 0, 18, 54, 55, 62, 60, 61, 64, 363, 362, 0, 0, 0, 13, 0, 0, 0, 0, 0, 65, 66, 67, 0, 0, 50, 0, 368, 0, 0, 0, 369, 370, 373, 371, 372, 76, 0, 0, 0, 52, 53, 56, 0, 0, 0, 59, 374, 0, 0, 0, 57, 58, 0, 63, 366, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 74, 376, 68, 73, 0, 18, 54, 55, 62, 60, 61, 64, 363, 451, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 66, 67, 0, 0, 50, 0, 368, 0, 0, 0, 369, 370, 373, 371, 372, 76, 0, 0, 0, 52, 53, 450, 86, 0, 0, 59, 72, 0, 0, 84, 57, 58, 89, 63, 0, 0, 0, 0, 0, 0, 0, 0, 91, 81, 75, 74, 69, 68, 73, 0, 18, 54, 55, 62, 60, 61, 64, 0, 0, 0, 50, 0, 0, 0, 87, 88, 85, 318, 65, 66, 67, 0, 0, 0, 0, 52, 53, 56, 0, 0, 76, 59, 72, 0, 76, 278, 57, 58, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 74, 69, 68, 73, 0, 18, 54, 55, 62, 60, 61, 64, 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 65, 66, 67, 0, 0, 0, 52, 53, 56, 0, 0, 0, 59, 72, 0, 0, 76, 57, 58, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 74, 69, 68, 73, 0, 18, 54, 55, 62, 60, 61, 64, 0, 0, 0, 52, 53, 56, 0, 0, 0, 59, 72, 65, 66, 67, 57, 58, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 75, 74, 69, 68, 73, 0, 18, 54, 55, 62, 60, 61, 64, 0, 0, 0, 0, 0, 0, 0, 0, 86, 0, 0, 65, 66, 67, 0, 84, 0, 0, 89, 0, 98, 0, 0, 0, 0, 0, 0, 76, 91, 81, 0, 0, 0, 0, 0, 0, 0, 86, 0, 0, 0, 0, 0, 95, 84, 97, 94, 89, 0, 98, 87, 88, 85, 0, 0, 0, 0, 91, 81, 0, 0, 0, 0, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, 459, 458, 0, 0, 100, 87, 88, 85, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 76, 155, 154, 153, 152, 151, 150, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 154, 153, 152, 151, 150, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 563, 155, 154, 153, 152, 151, 150, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 153, 152, 151, 150, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 0, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 554, 155, 154, 153, 152, 151, 150, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 151, 150, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 0, 0, 0, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 527, 155, 154, 153, 152, 151, 150, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 150, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 0, 0, 0, 0, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 480, 155, 154, 153, 152, 151, 150, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 0, 0, 0, 0, 0, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 348, 155, 154, 153, 152, 151, 150, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 0, 0, 0, 0, 0, 0, 0, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 340, 155, 154, 153, 152, 151, 150, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 301, 155, 154, 153, 152, 151, 150, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 299, 155, 154, 153, 152, 151, 150, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 189, 155, 154, 153, 152, 151, 150, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 188, 155, 154, 153, 152, 151, 150, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 187, 155, 154, 153, 152, 151, 150, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 0, 86, 0, 0, 0, 86, 0, 0, 84, 86, 0, 89, 84, 0, 0, 89, 384, 0, 0, 89, 0, 91, 81, 0, 0, 91, 390, 0, 0, 91, 81, 0, 0, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 88, 85, 0, 87, 88, 85, 0, 87, 88, 85, 0, 0, 0, 0, 0, 76, 0, 0, 0, 76, 0, 0, 0, 76, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 0, 155, 154, 153, 152, 151, 150, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 574, 155, 154, 153, 152, 151, 150, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 515, 155, 154, 153, 152, 151, 150, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 0, 0, 0, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 488, 155, 154, 153, 152, 151, 150, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 0, 0, 0, 336, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 0, 155, 154, 153, 152, 151, 150, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 0, 0, 0, 331, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 0, 155, 154, 153, 152, 151, 150, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 0, 510, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 0, 155, 154, 153, 152, 151, 150, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 0, 453, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 0, 155, 154, 153, 152, 151, 150, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134, 155, 154, 153, 152, 151, 150, 148, 149, 144, 145, 146, 147, 143, 142, 140, 141, 137, 138, 139, 136, 134 }; short yypact[] = { 211,-1000, 334, 355,-1000, 130,-1000,-1000, 129, 127, 603, 601, 9, 269, 443,-1000, 407, 525,-1000, 253, -36, 125,-1000,-1000,-1000,-1000,-1000,1421,1421,1421, 1421,2216, 562, 121, 767, 336, 382, -21, 427, 279, -1000, 334, 16,-1000,-1000,-1000, 380,-1000,2215,-1000, 378, 493,1462,1462,1462,1462,1462,1462,1462,1462, 1462,1462,1462,1462,1462, 478, 483, 468,1462, 163, 1462,-1000,1421,-1000,-1000,-1000, 553,2160,2105,2050, 257,-1000,-1000,-1000,2216, 481,2216, 479, 475, 525, -1000, 526,-1000,-1000,2216,1421, 185,1421, 32, 218, 525, 234, 295, 525, 213,2216, 538, 536, -37,-1000, 425, 7, -38,-1000,-1000,-1000, 502,-1000, 253,-1000, 355,-1000,1421,1421,1421,1421,1421,1421,1421,1421, 1421,1421,1421,1421, 599,1421,1421,1421,1421,1421, 1421,1421,1421,1421,1421,1421,1421,1421,1421,1421, 1421,1421,1421,1421,1421,1421,1421,1421, 377, 362, 637,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000, -1000,-1000,-1000,-1000,-1000,-1000,1366, 291, 210,2216, 1421,-1000,-1000,-1000, 15,2614,1421,-1000,-1000,-1000, -1000,1421, 375, 358, 390,2216, 13, 390,2216,2216, 550, 585, 252,1995,-1000,1421,1940,-1000,2216, 608, 95,-1000,-1000, 134, 253,-1000,-1000, 334, 390,-1000, -1000, 268,1306,1306, 289,-1000,-1000,-1000, 355,2614, 2614,2614,2614,2614,2614,2614,2614,2614,2614,2614, 2614,1421,2614, 560, 560, 560, 560, 524, 524, 690, 690, 654, 654, 654, 654,1898,1898,1845,1791,1737, 1684,1684,1630,2635, 535, -39,-1000, 396, 501, 424, -41,2614,-1000,1462, 457, 472,2216,2501, 467,1462, 1421, 390,2462,-1000,1421, 759,1885, 523, 508, 390, -1000,2216, 390, 390, 336, 6, 390,2216,-1000,-1000, 1830,-1000, 12, 120,-1000, 606, 201,1033,-1000,-1000, 11, 180,-1000, 298, 534,-1000, 390,-1000,2224, 390, -1000,-1000,-1000,2614,-1000,-1000,1421, 637,2220, 403, 390, 461, 199,-1000, 178, -56, 450,2614,1421,-1000, -1000, 585, 585, 390,-1000, 448,-1000, 390,-1000, 118, -1000,-1000, 420, 116,-1000, 109,-1000, 334,-1000,-1000, -1000, 419, 145,-1000, 4, 111, 546, 31, 356, 356, 1421,1421,1421, 100,1421,2614, 163, 963,-1000,-1000, 334,-1000,-1000,-1000,2216,-1000, 390, 500, 491,2614, 1462, 390, 390, 217,1310,-1000,1421,2216,2577, 3, 2, 390,2216,-1000,1530,-1000, -23,-1000,-1000,-1000, 416, 198, 169,1501,-1000,-1000,-1000, 893, 544,2216, -1000,1421, 543, 542,1241,1421, 195, 354, 98,-1000, 92, 91,1775, 47,-1000, 0,-1000,-1000, 270,-1000, -1000,-1000,-1000, 390,1310, 164, -62,-1000,2424, 349, 1462,-1000, 390,-1000,-1000,-1000, 390, 225,2216,1421, -1000, 192, 287, 376, 189, 823, 402,1421, 131,2540, 1421,1421, -18, 414,2371,1310, 583,-1000,-1000,-1000, -1000,-1000,-1000, 350,-1000, 162,-1000,1310,1421,1310, 1421,-1000, 219,1720, 334,1421,2216, 165, 154, 607, -1000, 278, 306,-1000, 606,-1000, 317, -4,-1000,1421, 1241, 37, 533, 540,-1000,1310, 140,-1000, 344,2424, 1421,-1000,-1000,2614,-1000,2614,-1000,-1000, 139,1665, 122,-1000,-1000, 314, 302,-1000, 290, 107, 183,-1000, -1000,1610, 408,1421,1241,1421, 137,-1000, 330,-1000, 1172,-1000,2318,-1000,-1000,-1000, 232, 405,-1000, 193, -1000,-1000,1310,-1000,1241, 17,-1000, 531,-1000,1172, -1000, 329, 145,2424, 406,-1000,-1000, 136,-1000, 321, -1000,1421, -3, 318,-1000, 1,-1000, 303,-1000,-1000, -1000,-1000,1172,-1000, 529,-1000,-1000,-1000,1103,-1000, 406, 263,1241, 247, 145, 163,1462,-1000,-1000,-1000, -1000 }; short yypgo[] = { 0, 258, 710, 709, 33, 24, 416, 22, 18, 46, 707, 699, 679, 34, 677, 674, 32, 673, 12, 4, 665, 70, 8, 0, 21, 35, 15, 662, 660, 93, 25, 67, 26, 14, 659, 11, 2, 38, 41, 23, 658, 657, 3, 7, 655, 653, 651, 650, 648, 19, 647, 646, 642, 10, 641, 638, 637, 1, 636, 635, 633, 6, 5, 632, 630, 629, 17, 20, 626, 9, 623, 16, 622, 621, 13, 620, 614, 613 }; short yyr1[] = { 0, 76, 75, 75, 38, 38, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 30, 30, 37, 37, 37, 37, 37, 37, 37, 66, 66, 48, 51, 51, 51, 50, 50, 50, 50, 50, 49, 49, 73, 73, 53, 53, 53, 52, 52, 52, 62, 62, 61, 61, 60, 58, 58, 58, 59, 59, 59, 19, 20, 20, 9, 10, 10, 6, 6, 74, 74, 74, 74, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 8, 8, 13, 13, 21, 21, 2, 2, 2, 3, 3, 4, 4, 14, 14, 15, 15, 16, 16, 16, 16, 11, 12, 12, 12, 12, 5, 5, 5, 5, 40, 67, 67, 67, 41, 41, 41, 54, 54, 43, 43, 43, 77, 77, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 17, 17, 18, 18, 44, 45, 45, 46, 47, 47, 63, 64, 64, 36, 36, 36, 36, 36, 55, 56, 56, 57, 57, 57, 57, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 29, 29, 31, 72, 72, 71, 71, 70, 70, 70, 70, 65, 65, 32, 32, 32, 32, 27, 27, 28, 28, 26, 26, 33, 33, 34, 34, 35, 35, 69, 68, 68 }; short yyr2[] = { 0, 0, 5, 1, 1, 2, 2, 1, 1, 2, 2, 4, 4, 4, 4, 4, 6, 1, 3, 3, 5, 5, 4, 6, 5, 1, 4, 7, 6, 0, 2, 1, 4, 2, 5, 5, 1, 8, 11, 0, 4, 0, 2, 1, 1, 1, 5, 0, 2, 5, 4, 4, 2, 2, 1, 2, 4, 4, 1, 1, 3, 1, 1, 3, 6, 4, 1, 2, 3, 4, 1, 1, 1, 3, 6, 2, 3, 3, 3, 3, 4, 1, 1, 4, 3, 6, 1, 3, 0, 3, 3, 3, 5, 1, 3, 1, 5, 0, 1, 1, 3, 3, 3, 3, 3, 1, 1, 1, 3, 3, 2, 3, 2, 3, 4, 4, 2, 0, 3, 2, 4, 2, 4, 0, 2, 2, 3, 5, 2, 2, 4, 3, 4, 6, 2, 5, 7, 10, 6, 8, 3, 3, 3, 3, 3, 6, 5, 8, 2, 8, 0, 2, 0, 1, 2, 2, 4, 2, 2, 4, 2, 2, 4, 1, 3, 1, 3, 1, 2, 2, 4, 1, 1, 3, 1, 0, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 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, 2, 2, 2, 2, 2, 6, 8, 7, 5, 3, 6, 4, 2, 2, 2, 1, 4, 3, 3, 3, 4, 6, 2, 2, 1, 1, 1, 6, 1, 1, 3, 1, 3, 1, 1, 1, 3, 3, 2, 1, 0, 1, 1, 3, 3, 0, 1, 1, 2, 1, 3, 1, 2, 1, 3, 1, 3, 2, 2, 4 }; short yychk[] = { -1000, -75, 73, -38, -39, 2, -37, -40, -49, -48, -29, -31, -30, 75, -9, -66, -54, 59, 63, 39, -10, -9, 59, -39, 72, 72, 72, 4, 16, 4, 16, 50, 99, 61, 50, -4, 54, -3, -2, 39, -21, 41, -32, -31, -29, 59, 99, 72, -23, -24, 17, -25, 32, 33, 64, 65, 34, 43, 44, 38, 67, 68, 66, 46, 69, 81, 82, 83, 60, 59, -6, -29, 39, 61, 58, 57, 97, -23, -23, -23, -1, 60, -7, -8, 46, 83, 39, 81, 82, 49, -6, 59, -31, 72, 77, 74, -1, 76, 51, 78, 80, -67, 52, 59, 87, 50, -14, 34, -15, -16, -11, -30, -12, -31, 59, 63, -9, 40, 99, 59, -76, 72, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 38, 16, 37, 34, 35, 36, 32, 33, 31, 30, 26, 27, 28, 29, 24, 25, 23, 22, 21, 20, 19, 18, 59, 39, 54, 53, 41, 43, 44, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, 41, 45, 45, 45, 41, -24, -24, -24, -26, -23, 39, 72, 72, 72, 72, 4, 53, 54, -1, 45, -13, -1, 45, 45, -21, 41, -1, -23, 72, 4, -23, 72, 39, 70, -21, -41, 70, 2, 39, -29, -21, 70, -1, 40, 40, 99, 50, 50, 99, 42, -31, -29, -38, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, 4, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -27, -26, 59, -25, -71, -22, -72, -23, -70, 60, 81, 82, 79, -23, 42, 60, 70, -1, -23, 40, 99, -23, -23, 59, 59, -1, 40, 99, -1, -1, -4, -74, -1, 79, 72, 72, -23, 72, -13, -51, 2, 70, 87, -43, 71, 70, -32, -69, -68, -9, 34, -16, -1, -5, 84, -1, -5, 59, 63, -23, 40, 42, 50, 99, 45, 45, -1, 42, 45, -24, -28, -26, 42, -23, 99, 40, 72, 41, 41, -1, -67, 99, 42, -1, 72, 40, 71, -50, -9, -49, -66, -53, 2, 70, 71, -37, -42, -9, 2, 70, -77, -22, 47, -17, 88, 92, 93, 95, 96, 94, 39, -23, 59, -43, 40, 71, -62, 62, 40, -7, 46, -8, -1, -22, -71, -23, 60, -1, -1, 45, 70, 71, 99, 45, -23, -74, -74, -1, 79, 72, 50, 72, 71, -52, -61, -60, -9, 91, -69, 50, 72, 71, 70, -43, 99, 50, 72, 39, 87, 86, 85, 90, 89, 91, -18, 59, -18, -22, -23, -22, 72, -26, 71, -61, -9, -7, -8, 42, 42, -1, 70, -33, -34, -35, -23, -36, 34, 2, -1, 40, 42, 42, -1, -1, 77, 76, -73, 87, 50, 70, 71, -43, 71, 39, -1, -23, 39, 39, -42, -9, -23, 70, 59, 72, 72, 72, 72, 72, 40, 50, 62, -33, 71, 99, 55, 56, 62, 72, -1, -23, 70, 76, 79, -1, -58, -59, 2, -19, -20, 59, 70, 71, 51, -26, 72, 4, 40, -22, -22, 86, 50, 70, -44, -45, -36, -23, 16, 71, -35, -23, -36, -23, 72, 72, -69, -23, -1, 72, 71, -62, 2, 62, 56, -53, -65, 59, 40, -23, -42, 72, 40, 39, -46, -47, -36, 71, -43, 62, -23, 71, 72, 72, -19, -9, 59, -19, 59, 71, 70, 72, 48, -22, -42, -22, 71, -43, 62, -36, 2, -23, 70, 62, 62, -63, -64, -36, -42, 72, 40, -36, 62, -55, -56, -57, 59, 34, 2, 71, -43, 62, -22, 72, 62, 71, -43, 62, 56, -36, 40, -57, 2, 59, 34, -57, 62, -42, 62 }; short yydef[] = { 0, -2, 0, -2, 4, 0, 7, 8, 0, 0, 0, 17, 0, 0, 0, 25, 0, -2, 251, 0, 61, 0, 62, 5, 6, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 117, 0, 95, 93, 97, 121, 0, 0, 263, 264, 250, 0, 1, 0, 177, 0, 213, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 250, 0, 237, 0, 246, 247, 248, 0, 0, 0, 0, 0, 70, 71, 72, 0, 0, 0, 0, 0, 88, 81, 82, 18, 19, 0, 0, 0, 0, 0, 0, 88, 0, 0, 88, 0, 0, 0, 0, 98, 99, 0, 0, 105, 17, 106, 107, 0, 252, 0, 63, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 267, 0, 0, 175, 244, 245, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 0, 0, 0, 0, 0, 234, 235, 236, 0, 271, 0, 13, 12, 14, 15, 0, 0, 0, 75, 0, 0, 86, 0, 0, 0, 0, 0, 0, 22, 0, 0, 26, 0, -2, 0, 114, 123, 0, 0, 116, 122, 0, 94, 90, 91, 0, 0, 0, 0, 89, 265, 266, -2, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 0, 191, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 192, 0, 268, 240, 241, 253, 0, 0, -2, 256, 257, 0, 0, 0, 0, 0, 0, 0, 231, 0, 239, 0, 0, 0, 73, 84, 76, 77, 0, 78, 79, 117, 0, 66, 0, 20, 21, 0, 24, 0, 0, 31, -2, 0, -2, 119, 123, 0, 0, 47, 0, 0, 100, 101, 102, 0, 103, 104, 108, 109, 190, 238, 242, 175, 0, 0, 0, 260, 0, 0, 233, 0, 269, 0, 272, 0, 65, 16, 0, 0, 87, 80, 0, 83, 67, 23, 0, 28, 30, 0, 0, 36, 0, 43, 0, 118, 124, 125, 0, 0, 123, 0, 0, 0, 0, 152, 152, 175, 0, 175, 0, 0, 176, -2, -2, 115, 96, 279, 280, 92, -2, 0, -2, 0, 0, 254, 255, 70, 258, 259, 0, 0, 230, 270, 0, 0, 0, 0, 68, 0, 27, 0, 33, 39, 42, 44, 45, 0, 0, 0, 151, 128, 129, 123, -2, 0, 0, 134, 0, 0, 0, -2, 0, 0, 0, 0, 153, 0, 0, 0, 0, 148, 0, 120, 48, 0, -2, -2, 243, 249, 227, 0, 0, 273, 275, -2, 0, 165, 167, 232, 64, 74, 85, 69, 0, 0, 0, 37, 0, 0, 0, 0, -2, 131, 0, 0, 0, 175, 175, 0, 0, 0, 0, 0, 140, 141, 142, 143, 144, -2, 0, 281, 0, 229, -2, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, -2, 54, 0, 58, 59, -2, 130, 262, 0, 132, 0, -2, 0, 0, 0, 151, 0, 0, 123, 0, 163, 0, 228, 276, 164, 166, 278, 34, 35, 0, 0, 0, 50, 51, 52, 53, 55, 0, 0, 0, 261, 127, 0, 135, 175, -2, 175, 0, 123, 0, 146, -2, 155, 0, 40, 46, 49, 0, 0, -2, 0, 60, 38, 0, 133, -2, 0, 138, 0, 145, -2, 158, 0, 167, -2, 0, 56, 57, 0, 123, 0, 136, 175, 0, 0, 156, 0, 123, 0, 171, 172, 174, 149, -2, 161, 0, 139, 159, 147, -2, 169, 0, 0, -2, 0, 174, -2, 172, 173, 162, 137, 170 }; short yytok1[] = { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 36, 23, 0, 39, 40, 34, 32, 99, 33, 54, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 72, 26, 4, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 0, 42, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 21, 71, 65 }; short yytok2[] = { 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 24, 25, 28, 29, 30, 31, 37, 38, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 66, 67, 68, 69, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98 }; long yytok3[] = { 0 }; #define YYFLAG -1000 #define yyclearin yychar = -1 #define yyerrok yyerrflag = 0 #ifdef yydebug #include "y.debug" #else #define yydebug 0 char* yytoknames[1]; /* for debugging */ char* yystates[1]; /* for debugging */ #endif /* parser for yacc output */ int yynerrs = 0; /* number of errors */ int yyerrflag = 0; /* error recovery flag */ extern int fprint(int, char*, ...); extern int sprint(char*, char*, ...); char* yytokname(int yyc) { static char x[16]; if(yyc > 0 && yyc <= sizeof(yytoknames)/sizeof(yytoknames[0])) if(yytoknames[yyc-1]) return yytoknames[yyc-1]; sprint(x, "<%d>", yyc); return x; } char* yystatname(int yys) { static char x[16]; if(yys >= 0 && yys < sizeof(yystates)/sizeof(yystates[0])) if(yystates[yys]) return yystates[yys]; sprint(x, "<%d>\n", yys); return x; } long yylex1(void) { long yychar; long *t3p; int c; yychar = yylex(); if(yychar <= 0) { c = yytok1[0]; goto out; } if(yychar < sizeof(yytok1)/sizeof(yytok1[0])) { c = yytok1[yychar]; goto out; } if(yychar >= YYPRIVATE) if(yychar < YYPRIVATE+sizeof(yytok2)/sizeof(yytok2[0])) { c = yytok2[yychar-YYPRIVATE]; goto out; } for(t3p=yytok3;; t3p+=2) { c = t3p[0]; if(c == yychar) { c = t3p[1]; goto out; } if(c == 0) break; } c = 0; out: if(c == 0) c = yytok2[1]; /* unknown char */ if(yydebug >= 3) fprint(2, "lex %.4lux %s\n", yychar, yytokname(c)); return c; } int yyparse(void) { struct { YYSTYPE yyv; int yys; } yys[YYMAXDEPTH], *yyp, *yypt; short *yyxi; int yyj, yym, yystate, yyn, yyg; long yychar; YYSTYPE save1, save2; int save3, save4; save1 = yylval; save2 = yyval; save3 = yynerrs; save4 = yyerrflag; yystate = 0; yychar = -1; yynerrs = 0; yyerrflag = 0; yyp = &yys[-1]; goto yystack; ret0: yyn = 0; goto ret; ret1: yyn = 1; goto ret; ret: yylval = save1; yyval = save2; yynerrs = save3; yyerrflag = save4; return yyn; yystack: /* put a state and value onto the stack */ if(yydebug >= 4) fprint(2, "char %s in %s", yytokname(yychar), yystatname(yystate)); yyp++; if(yyp >= &yys[YYMAXDEPTH]) { yyerror("yacc stack overflow"); goto ret1; } yyp->yys = yystate; yyp->yyv = yyval; yynewstate: yyn = yypact[yystate]; if(yyn <= YYFLAG) goto yydefault; /* simple state */ if(yychar < 0) yychar = yylex1(); yyn += yychar; if(yyn < 0 || yyn >= YYLAST) goto yydefault; yyn = yyact[yyn]; if(yychk[yyn] == yychar) { /* valid shift */ yychar = -1; yyval = yylval; yystate = yyn; if(yyerrflag > 0) yyerrflag--; goto yystack; } yydefault: /* default state action */ yyn = yydef[yystate]; if(yyn == -2) { if(yychar < 0) yychar = yylex1(); /* look through exception table */ for(yyxi=yyexca;; yyxi+=2) if(yyxi[0] == -1 && yyxi[1] == yystate) break; for(yyxi += 2;; yyxi += 2) { yyn = yyxi[0]; if(yyn < 0 || yyn == yychar) break; } yyn = yyxi[1]; if(yyn < 0) goto ret0; } if(yyn == 0) { /* error ... attempt to resume parsing */ switch(yyerrflag) { case 0: /* brand new error */ yyerror("syntax error"); yynerrs++; if(yydebug >= 1) { fprint(2, "%s", yystatname(yystate)); fprint(2, "saw %s\n", yytokname(yychar)); } case 1: case 2: /* incompletely recovered error ... try again */ yyerrflag = 3; /* find a state where "error" is a legal shift action */ while(yyp >= yys) { yyn = yypact[yyp->yys] + YYERRCODE; if(yyn >= 0 && yyn < YYLAST) { yystate = yyact[yyn]; /* simulate a shift of "error" */ if(yychk[yystate] == YYERRCODE) goto yystack; } /* the current yyp has no shift onn "error", pop stack */ if(yydebug >= 2) fprint(2, "error recovery pops state %d, uncovers %d\n", yyp->yys, (yyp-1)->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) fprint(2, "error recovery discards %s\n", yytokname(yychar)); if(yychar == YYEOFCODE) goto ret1; yychar = -1; goto yynewstate; /* try again in the same state */ } } /* reduction by production yyn */ if(yydebug >= 2) fprint(2, "reduce %d in:\n\t%s", yyn, yystatname(yystate)); yypt = yyp; yyp -= yyr2[yyn]; yyval = (yyp+1)->yyv; yym = yyn; /* consult goto table to find next state */ yyn = yyr1[yyn]; yyg = yypgo[yyn]; yyj = yyg + yyp->yys + 1; if(yyj >= YYLAST || yychk[yystate=yyact[yyj]] != -yyn) yystate = yyact[yyg]; switch(yym) { case 1: #line 74 "limbo.y" { impmods = yypt[-1].yyv.ids; } break; case 2: #line 77 "limbo.y" { tree = rotater(yypt[-0].yyv.node); } break; case 3: #line 81 "limbo.y" { impmods = nil; tree = rotater(yypt[-0].yyv.node); } break; case 5: #line 89 "limbo.y" { if(yypt[-1].yyv.node == nil) yyval.node = yypt[-0].yyv.node; else if(yypt[-0].yyv.node == nil) yyval.node = yypt[-1].yyv.node; else yyval.node = mkbin(Oseq, yypt[-1].yyv.node, yypt[-0].yyv.node); } break; case 6: #line 100 "limbo.y" { yyval.node = nil; } break; case 11: #line 108 "limbo.y" { yyval.node = mkbin(Oas, yypt[-3].yyv.node, yypt[-1].yyv.node); } break; case 12: #line 112 "limbo.y" { yyval.node = mkbin(Oas, yypt[-3].yyv.node, yypt[-1].yyv.node); } break; case 13: #line 116 "limbo.y" { yyval.node = mkbin(Odas, yypt[-3].yyv.node, yypt[-1].yyv.node); } break; case 14: #line 120 "limbo.y" { yyval.node = mkbin(Odas, yypt[-3].yyv.node, yypt[-1].yyv.node); } break; case 15: #line 124 "limbo.y" { yyerror("illegal declaration"); yyval.node = nil; } break; case 16: #line 129 "limbo.y" { yyerror("illegal declaration"); yyval.node = nil; } break; case 18: #line 137 "limbo.y" { yyval.node = mkbin(Oseq, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 19: #line 143 "limbo.y" { includef(yypt[-1].yyv.tok.v.idval); yyval.node = nil; } break; case 20: #line 148 "limbo.y" { yyval.node = typedecl(yypt[-4].yyv.ids, yypt[-1].yyv.type); } break; case 21: #line 152 "limbo.y" { yyval.node = importdecl(yypt[-1].yyv.node, yypt[-4].yyv.ids); yyval.node->src.start = yypt[-4].yyv.ids->src.start; yyval.node->src.stop = yypt[-0].yyv.tok.src.stop; } break; case 22: #line 158 "limbo.y" { yyval.node = vardecl(yypt[-3].yyv.ids, yypt[-1].yyv.type); } break; case 23: #line 162 "limbo.y" { yyval.node = mkbin(Ovardecli, vardecl(yypt[-5].yyv.ids, yypt[-3].yyv.type), varinit(yypt[-5].yyv.ids, yypt[-1].yyv.node)); } break; case 24: #line 166 "limbo.y" { yyval.node = condecl(yypt[-4].yyv.ids, yypt[-1].yyv.node); } break; case 26: #line 173 "limbo.y" { yyval.node = exdecl(yypt[-3].yyv.ids, nil); } break; case 27: #line 177 "limbo.y" { yyval.node = exdecl(yypt[-6].yyv.ids, revids(yypt[-2].yyv.ids)); } break; case 28: #line 183 "limbo.y" { yypt[-5].yyv.ids->src.stop = yypt[-0].yyv.tok.src.stop; yyval.node = moddecl(yypt[-5].yyv.ids, rotater(yypt[-1].yyv.node)); } break; case 29: #line 190 "limbo.y" { yyval.node = nil; } break; case 30: #line 194 "limbo.y" { if(yypt[-1].yyv.node == nil) yyval.node = yypt[-0].yyv.node; else if(yypt[-0].yyv.node == nil) yyval.node = yypt[-1].yyv.node; else yyval.node = mkn(Oseq, yypt[-1].yyv.node, yypt[-0].yyv.node); } break; case 31: #line 203 "limbo.y" { yyval.node = nil; } break; case 32: #line 209 "limbo.y" { yyval.node = fielddecl(Dglobal, typeids(yypt[-3].yyv.ids, yypt[-1].yyv.type)); } break; case 34: #line 214 "limbo.y" { yyval.node = typedecl(yypt[-4].yyv.ids, yypt[-1].yyv.type); } break; case 35: #line 218 "limbo.y" { yyval.node = condecl(yypt[-4].yyv.ids, yypt[-1].yyv.node); } break; case 37: #line 225 "limbo.y" { yypt[-7].yyv.ids->src.stop = yypt[-1].yyv.tok.src.stop; yyval.node = adtdecl(yypt[-7].yyv.ids, rotater(yypt[-2].yyv.node)); yyval.node->ty->polys = yypt[-4].yyv.ids; yyval.node->ty->val = rotater(yypt[-0].yyv.node); } break; case 38: #line 232 "limbo.y" { yypt[-10].yyv.ids->src.stop = yypt[-0].yyv.tok.src.stop; yyval.node = adtdecl(yypt[-10].yyv.ids, rotater(yypt[-1].yyv.node)); yyval.node->ty->polys = yypt[-7].yyv.ids; yyval.node->ty->val = rotater(yypt[-4].yyv.node); } break; case 39: #line 241 "limbo.y" { yyval.node = nil; } break; case 40: #line 245 "limbo.y" { yyval.node = yypt[-1].yyv.node; } break; case 41: #line 251 "limbo.y" { yyval.node = nil; } break; case 42: #line 255 "limbo.y" { if(yypt[-1].yyv.node == nil) yyval.node = yypt[-0].yyv.node; else if(yypt[-0].yyv.node == nil) yyval.node = yypt[-1].yyv.node; else yyval.node = mkn(Oseq, yypt[-1].yyv.node, yypt[-0].yyv.node); } break; case 43: #line 264 "limbo.y" { yyval.node = nil; } break; case 46: #line 272 "limbo.y" { yyval.node = condecl(yypt[-4].yyv.ids, yypt[-1].yyv.node); } break; case 47: #line 278 "limbo.y" { yyval.node = nil; } break; case 48: #line 282 "limbo.y" { if(yypt[-1].yyv.node == nil) yyval.node = yypt[-0].yyv.node; else if(yypt[-0].yyv.node == nil) yyval.node = yypt[-1].yyv.node; else yyval.node = mkn(Oseq, yypt[-1].yyv.node, yypt[-0].yyv.node); } break; case 49: #line 293 "limbo.y" { Decl *d; for(d = yypt[-4].yyv.ids; d != nil; d = d->next) d->cyc = 1; yyval.node = fielddecl(Dfield, typeids(yypt[-4].yyv.ids, yypt[-1].yyv.type)); } break; case 50: #line 301 "limbo.y" { yyval.node = fielddecl(Dfield, typeids(yypt[-3].yyv.ids, yypt[-1].yyv.type)); } break; case 51: #line 307 "limbo.y" { yyval.node = yypt[-1].yyv.node; } break; case 52: #line 313 "limbo.y" { yypt[-1].yyv.node->right->right = yypt[-0].yyv.node; yyval.node = yypt[-1].yyv.node; } break; case 53: #line 318 "limbo.y" { yyval.node = nil; } break; case 54: #line 322 "limbo.y" { yyval.node = nil; } break; case 55: #line 328 "limbo.y" { yyval.node = mkn(Opickdecl, nil, mkn(Oseq, fielddecl(Dtag, yypt[-1].yyv.ids), nil)); typeids(yypt[-1].yyv.ids, mktype(&yypt[-1].yyv.ids->src.start, &yypt[-1].yyv.ids->src.stop, Tadtpick, nil, nil)); } break; case 56: #line 333 "limbo.y" { yypt[-3].yyv.node->right->right = yypt[-2].yyv.node; yyval.node = mkn(Opickdecl, yypt[-3].yyv.node, mkn(Oseq, fielddecl(Dtag, yypt[-1].yyv.ids), nil)); typeids(yypt[-1].yyv.ids, mktype(&yypt[-1].yyv.ids->src.start, &yypt[-1].yyv.ids->src.stop, Tadtpick, nil, nil)); } break; case 57: #line 339 "limbo.y" { yyval.node = mkn(Opickdecl, nil, mkn(Oseq, fielddecl(Dtag, yypt[-1].yyv.ids), nil)); typeids(yypt[-1].yyv.ids, mktype(&yypt[-1].yyv.ids->src.start, &yypt[-1].yyv.ids->src.stop, Tadtpick, nil, nil)); } break; case 58: #line 346 "limbo.y" { yyval.ids = revids(yypt[-0].yyv.ids); } break; case 59: #line 352 "limbo.y" { yyval.ids = mkids(&yypt[-0].yyv.tok.src, yypt[-0].yyv.tok.v.idval, nil, nil); } break; case 60: #line 356 "limbo.y" { yyval.ids = mkids(&yypt[-0].yyv.tok.src, yypt[-0].yyv.tok.v.idval, nil, yypt[-2].yyv.ids); } break; case 61: #line 362 "limbo.y" { yyval.ids = revids(yypt[-0].yyv.ids); } break; case 62: #line 368 "limbo.y" { yyval.ids = mkids(&yypt[-0].yyv.tok.src, yypt[-0].yyv.tok.v.idval, nil, nil); } break; case 63: #line 372 "limbo.y" { yyval.ids = mkids(&yypt[-0].yyv.tok.src, yypt[-0].yyv.tok.v.idval, nil, yypt[-2].yyv.ids); } break; case 64: #line 378 "limbo.y" { yyval.type = mktype(&yypt[-5].yyv.tok.src.start, &yypt[-0].yyv.tok.src.stop, Tfix, nil, nil); yyval.type->val = mkbin(Oseq, yypt[-3].yyv.node, yypt[-1].yyv.node); } break; case 65: #line 383 "limbo.y" { yyval.type = mktype(&yypt[-3].yyv.tok.src.start, &yypt[-0].yyv.tok.src.stop, Tfix, nil, nil); yyval.type->val = yypt[-1].yyv.node; } break; case 66: #line 390 "limbo.y" { yyval.types = addtype(yypt[-0].yyv.type, nil); } break; case 67: #line 394 "limbo.y" { yyval.types = addtype(yypt[-0].yyv.type, nil); yypt[-0].yyv.type->flags |= CYCLIC; } break; case 68: #line 399 "limbo.y" { yyval.types = addtype(yypt[-0].yyv.type, yypt[-2].yyv.types); } break; case 69: #line 403 "limbo.y" { yyval.types = addtype(yypt[-0].yyv.type, yypt[-3].yyv.types); yypt[-0].yyv.type->flags |= CYCLIC; } break; case 70: #line 410 "limbo.y" { yyval.type = mkidtype(&yypt[-0].yyv.tok.src, yypt[-0].yyv.tok.v.idval); } break; case 71: #line 414 "limbo.y" { yyval.type = yypt[-0].yyv.type; } break; case 72: #line 418 "limbo.y" { yyval.type = yypt[-0].yyv.type; } break; case 73: #line 422 "limbo.y" { yyval.type = mkarrowtype(&yypt[-2].yyv.type->src.start, &yypt[-0].yyv.tok.src.stop, yypt[-2].yyv.type, yypt[-0].yyv.tok.v.idval); } break; case 74: #line 426 "limbo.y" { yyval.type = mkarrowtype(&yypt[-5].yyv.type->src.start, &yypt[-3].yyv.tok.src.stop, yypt[-5].yyv.type, yypt[-3].yyv.tok.v.idval); yyval.type = mkinsttype(&yypt[-5].yyv.type->src, yyval.type, yypt[-1].yyv.types); } break; case 75: #line 431 "limbo.y" { yyval.type = mktype(&yypt[-1].yyv.tok.src.start, &yypt[-0].yyv.type->src.stop, Tref, yypt[-0].yyv.type, nil); } break; case 76: #line 435 "limbo.y" { yyval.type = mktype(&yypt[-2].yyv.tok.src.start, &yypt[-0].yyv.type->src.stop, Tchan, yypt[-0].yyv.type, nil); } break; case 77: #line 439 "limbo.y" { if(yypt[-1].yyv.ids->next == nil) yyval.type = yypt[-1].yyv.ids->ty; else yyval.type = mktype(&yypt[-2].yyv.tok.src.start, &yypt[-0].yyv.tok.src.stop, Ttuple, nil, revids(yypt[-1].yyv.ids)); } break; case 78: #line 446 "limbo.y" { yyval.type = mktype(&yypt[-2].yyv.tok.src.start, &yypt[-0].yyv.type->src.stop, Tarray, yypt[-0].yyv.type, nil); } break; case 79: #line 450 "limbo.y" { yyval.type = mktype(&yypt[-2].yyv.tok.src.start, &yypt[-0].yyv.type->src.stop, Tlist, yypt[-0].yyv.type, nil); } break; case 80: #line 454 "limbo.y" { yypt[-1].yyv.type->src.start = yypt[-3].yyv.tok.src.start; yypt[-1].yyv.type->polys = yypt[-2].yyv.ids; yypt[-1].yyv.type->u.eraises = yypt[-0].yyv.node; yyval.type = yypt[-1].yyv.type; } break; case 82: #line 476 "limbo.y" { yyval.type = mkidtype(&yypt[-0].yyv.tok.src, yypt[-0].yyv.tok.v.idval); } break; case 83: #line 480 "limbo.y" { yyval.type = mkinsttype(&yypt[-3].yyv.tok.src, mkidtype(&yypt[-3].yyv.tok.src, yypt[-3].yyv.tok.v.idval), yypt[-1].yyv.types); } break; case 84: #line 486 "limbo.y" { yyval.type = mkdottype(&yypt[-2].yyv.type->src.start, &yypt[-0].yyv.tok.src.stop, yypt[-2].yyv.type, yypt[-0].yyv.tok.v.idval); } break; case 85: #line 490 "limbo.y" { yyval.type = mkdottype(&yypt[-5].yyv.type->src.start, &yypt[-3].yyv.tok.src.stop, yypt[-5].yyv.type, yypt[-3].yyv.tok.v.idval); yyval.type = mkinsttype(&yypt[-5].yyv.type->src, yyval.type, yypt[-1].yyv.types); } break; case 86: #line 497 "limbo.y" { yyval.ids = mkids(&yypt[-0].yyv.type->src, nil, yypt[-0].yyv.type, nil); } break; case 87: #line 501 "limbo.y" { yyval.ids = mkids(&yypt[-2].yyv.ids->src, nil, yypt[-0].yyv.type, yypt[-2].yyv.ids); } break; case 88: #line 507 "limbo.y" { yyval.ids = nil; } break; case 89: #line 511 "limbo.y" { yyval.ids = polydecl(yypt[-1].yyv.ids); } break; case 90: #line 517 "limbo.y" { yyval.type = mktype(&yypt[-2].yyv.tok.src.start, &yypt[-0].yyv.tok.src.stop, Tfn, tnone, yypt[-1].yyv.ids); } break; case 91: #line 521 "limbo.y" { yyval.type = mktype(&yypt[-2].yyv.tok.src.start, &yypt[-0].yyv.tok.src.stop, Tfn, tnone, nil); yyval.type->varargs = 1; } break; case 92: #line 526 "limbo.y" { yyval.type = mktype(&yypt[-4].yyv.tok.src.start, &yypt[-0].yyv.tok.src.stop, Tfn, tnone, yypt[-3].yyv.ids); yyval.type->varargs = 1; } break; case 93: #line 533 "limbo.y" { yyval.type = yypt[-0].yyv.type; } break; case 94: #line 537 "limbo.y" { yypt[-2].yyv.type->tof = yypt[-0].yyv.type; yypt[-2].yyv.type->src.stop = yypt[-0].yyv.type->src.stop; yyval.type = yypt[-2].yyv.type; } break; case 95: #line 545 "limbo.y" { yyval.type = yypt[-0].yyv.type; } break; case 96: #line 549 "limbo.y" { yyval.type = yypt[-4].yyv.type; yyval.type->val = rotater(yypt[-1].yyv.node); } break; case 97: #line 556 "limbo.y" { yyval.ids = nil; } break; case 100: #line 564 "limbo.y" { yyval.ids = appdecls(yypt[-2].yyv.ids, yypt[-0].yyv.ids); } break; case 101: #line 570 "limbo.y" { yyval.ids = typeids(yypt[-2].yyv.ids, yypt[-0].yyv.type); } break; case 102: #line 574 "limbo.y" { Decl *d; yyval.ids = typeids(yypt[-2].yyv.ids, yypt[-0].yyv.type); for(d = yyval.ids; d != nil; d = d->next) d->implicit = 1; } break; case 103: #line 582 "limbo.y" { yyval.ids = mkids(&yypt[-2].yyv.node->src, enter("junk", 0), yypt[-0].yyv.type, nil); yyval.ids->store = Darg; yyerror("illegal argument declaration"); } break; case 104: #line 588 "limbo.y" { yyval.ids = mkids(&yypt[-2].yyv.node->src, enter("junk", 0), yypt[-0].yyv.type, nil); yyval.ids->store = Darg; yyerror("illegal argument declaration"); } break; case 105: #line 596 "limbo.y" { yyval.ids = revids(yypt[-0].yyv.ids); } break; case 106: #line 602 "limbo.y" { yyval.ids = mkids(&yypt[-0].yyv.tok.src, yypt[-0].yyv.tok.v.idval, nil, nil); yyval.ids->store = Darg; } break; case 107: #line 607 "limbo.y" { yyval.ids = mkids(&yypt[-0].yyv.tok.src, nil, nil, nil); yyval.ids->store = Darg; } break; case 108: #line 612 "limbo.y" { yyval.ids = mkids(&yypt[-0].yyv.tok.src, yypt[-0].yyv.tok.v.idval, nil, yypt[-2].yyv.ids); yyval.ids->store = Darg; } break; case 109: #line 617 "limbo.y" { yyval.ids = mkids(&yypt[-0].yyv.tok.src, nil, nil, yypt[-2].yyv.ids); yyval.ids->store = Darg; } break; case 110: #line 650 "limbo.y" { yyval.type = yypt[-0].yyv.type; } break; case 111: #line 654 "limbo.y" { yyval.type = mktype(&yypt[-1].yyv.tok.src.start, &yypt[-0].yyv.tok.src.stop, Tref, yypt[-0].yyv.type, nil); } break; case 112: #line 658 "limbo.y" { yyval.type = yypt[-0].yyv.type; } break; case 113: #line 662 "limbo.y" { yyval.type = mktype(&yypt[-1].yyv.tok.src.start, &yypt[-0].yyv.tok.src.stop, Tref, yypt[-0].yyv.type, nil); } break; case 114: #line 668 "limbo.y" { yyval.node = fndecl(yypt[-3].yyv.node, yypt[-2].yyv.type, yypt[-0].yyv.node); nfns++; /* patch up polydecs */ if(yypt[-3].yyv.node->op == Odot){ if(yypt[-3].yyv.node->right->left != nil){ yypt[-2].yyv.type->polys = yypt[-3].yyv.node->right->left->decl; yypt[-3].yyv.node->right->left = nil; } if(yypt[-3].yyv.node->left->op == Oname && yypt[-3].yyv.node->left->left != nil){ yyval.node->decl = yypt[-3].yyv.node->left->left->decl; yypt[-3].yyv.node->left->left = nil; } } else{ if(yypt[-3].yyv.node->left != nil){ yypt[-2].yyv.type->polys = yypt[-3].yyv.node->left->decl; yypt[-3].yyv.node->left = nil; } } yypt[-2].yyv.type->u.eraises = yypt[-1].yyv.node; yyval.node->src = yypt[-3].yyv.node->src; } break; case 115: #line 694 "limbo.y" { yyval.node = mkn(Otuple, rotater(yypt[-1].yyv.node), nil); yyval.node->src.start = yypt[-3].yyv.tok.src.start; yyval.node->src.stop = yypt[-0].yyv.tok.src.stop; } break; case 116: #line 700 "limbo.y" { yyval.node = mkn(Otuple, mkunary(Oseq, yypt[-0].yyv.node), nil); yyval.node->src.start = yypt[-1].yyv.tok.src.start; yyval.node->src.stop = yypt[-0].yyv.node->src.stop; } break; case 117: #line 706 "limbo.y" { yyval.node = nil; } break; case 118: #line 712 "limbo.y" { if(yypt[-1].yyv.node == nil){ yypt[-1].yyv.node = mkn(Onothing, nil, nil); yypt[-1].yyv.node->src.start = curline(); yypt[-1].yyv.node->src.stop = yypt[-1].yyv.node->src.start; } yyval.node = rotater(yypt[-1].yyv.node); yyval.node->src.start = yypt[-2].yyv.tok.src.start; yyval.node->src.stop = yypt[-0].yyv.tok.src.stop; } break; case 119: #line 723 "limbo.y" { yyval.node = mkn(Onothing, nil, nil); } break; case 120: #line 727 "limbo.y" { yyval.node = mkn(Onothing, nil, nil); } break; case 121: #line 733 "limbo.y" { yyval.node = mkname(&yypt[-1].yyv.tok.src, yypt[-1].yyv.tok.v.idval); if(yypt[-0].yyv.ids != nil){ yyval.node->left = mkn(Onothing, nil ,nil); yyval.node->left->decl = yypt[-0].yyv.ids; } } break; case 122: #line 741 "limbo.y" { yyval.node = mkbin(Odot, yypt[-3].yyv.node, mkname(&yypt[-1].yyv.tok.src, yypt[-1].yyv.tok.v.idval)); if(yypt[-0].yyv.ids != nil){ yyval.node->right->left = mkn(Onothing, nil ,nil); yyval.node->right->left->decl = yypt[-0].yyv.ids; } } break; case 123: #line 751 "limbo.y" { yyval.node = nil; } break; case 124: #line 755 "limbo.y" { if(yypt[-1].yyv.node == nil) yyval.node = yypt[-0].yyv.node; else if(yypt[-0].yyv.node == nil) yyval.node = yypt[-1].yyv.node; else yyval.node = mkbin(Oseq, yypt[-1].yyv.node, yypt[-0].yyv.node); } break; case 125: #line 764 "limbo.y" { if(yypt[-1].yyv.node == nil) yyval.node = yypt[-0].yyv.node; else yyval.node = mkbin(Oseq, yypt[-1].yyv.node, yypt[-0].yyv.node); } break; case 128: #line 777 "limbo.y" { yyval.node = mkn(Onothing, nil, nil); yyval.node->src.start = curline(); yyval.node->src.stop = yyval.node->src.start; } break; case 129: #line 783 "limbo.y" { yyval.node = mkn(Onothing, nil, nil); yyval.node->src.start = curline(); yyval.node->src.stop = yyval.node->src.start; } break; case 130: #line 789 "limbo.y" { yyval.node = mkn(Onothing, nil, nil); yyval.node->src.start = curline(); yyval.node->src.stop = yyval.node->src.start; } break; case 131: #line 795 "limbo.y" { if(yypt[-1].yyv.node == nil){ yypt[-1].yyv.node = mkn(Onothing, nil, nil); yypt[-1].yyv.node->src.start = curline(); yypt[-1].yyv.node->src.stop = yypt[-1].yyv.node->src.start; } yyval.node = mkscope(rotater(yypt[-1].yyv.node)); } break; case 132: #line 804 "limbo.y" { yyerror("illegal declaration"); yyval.node = mkn(Onothing, nil, nil); yyval.node->src.start = curline(); yyval.node->src.stop = yyval.node->src.start; } break; case 133: #line 811 "limbo.y" { yyerror("illegal declaration"); yyval.node = mkn(Onothing, nil, nil); yyval.node->src.start = curline(); yyval.node->src.stop = yyval.node->src.start; } break; case 134: #line 818 "limbo.y" { yyval.node = yypt[-1].yyv.node; } break; case 135: #line 822 "limbo.y" { yyval.node = mkn(Oif, yypt[-2].yyv.node, mkunary(Oseq, yypt[-0].yyv.node)); yyval.node->src.start = yypt[-4].yyv.tok.src.start; yyval.node->src.stop = yypt[-0].yyv.node->src.stop; } break; case 136: #line 828 "limbo.y" { yyval.node = mkn(Oif, yypt[-4].yyv.node, mkbin(Oseq, yypt[-2].yyv.node, yypt[-0].yyv.node)); yyval.node->src.start = yypt[-6].yyv.tok.src.start; yyval.node->src.stop = yypt[-0].yyv.node->src.stop; } break; case 137: #line 834 "limbo.y" { yyval.node = mkunary(Oseq, yypt[-0].yyv.node); if(yypt[-2].yyv.node->op != Onothing) yyval.node->right = yypt[-2].yyv.node; yyval.node = mkbin(Ofor, yypt[-4].yyv.node, yyval.node); yyval.node->decl = yypt[-9].yyv.ids; if(yypt[-6].yyv.node->op != Onothing) yyval.node = mkbin(Oseq, yypt[-6].yyv.node, yyval.node); } break; case 138: #line 844 "limbo.y" { yyval.node = mkn(Ofor, yypt[-2].yyv.node, mkunary(Oseq, yypt[-0].yyv.node)); yyval.node->src.start = yypt[-4].yyv.tok.src.start; yyval.node->src.stop = yypt[-0].yyv.node->src.stop; yyval.node->decl = yypt[-5].yyv.ids; } break; case 139: #line 851 "limbo.y" { yyval.node = mkn(Odo, yypt[-2].yyv.node, yypt[-5].yyv.node); yyval.node->src.start = yypt[-6].yyv.tok.src.start; yyval.node->src.stop = yypt[-1].yyv.tok.src.stop; yyval.node->decl = yypt[-7].yyv.ids; } break; case 140: #line 858 "limbo.y" { yyval.node = mkn(Obreak, nil, nil); yyval.node->decl = yypt[-1].yyv.ids; yyval.node->src = yypt[-2].yyv.tok.src; } break; case 141: #line 864 "limbo.y" { yyval.node = mkn(Ocont, nil, nil); yyval.node->decl = yypt[-1].yyv.ids; yyval.node->src = yypt[-2].yyv.tok.src; } break; case 142: #line 870 "limbo.y" { yyval.node = mkn(Oret, yypt[-1].yyv.node, nil); yyval.node->src = yypt[-2].yyv.tok.src; if(yypt[-1].yyv.node->op == Onothing) yyval.node->left = nil; else yyval.node->src.stop = yypt[-1].yyv.node->src.stop; } break; case 143: #line 879 "limbo.y" { yyval.node = mkn(Ospawn, yypt[-1].yyv.node, nil); yyval.node->src.start = yypt[-2].yyv.tok.src.start; yyval.node->src.stop = yypt[-1].yyv.node->src.stop; } break; case 144: #line 885 "limbo.y" { yyval.node = mkn(Oraise, yypt[-1].yyv.node, nil); yyval.node->src.start = yypt[-2].yyv.tok.src.start; yyval.node->src.stop = yypt[-1].yyv.node->src.stop; } break; case 145: #line 891 "limbo.y" { yyval.node = mkn(Ocase, yypt[-3].yyv.node, caselist(yypt[-1].yyv.node, nil)); yyval.node->src = yypt[-3].yyv.node->src; yyval.node->decl = yypt[-5].yyv.ids; } break; case 146: #line 897 "limbo.y" { yyval.node = mkn(Oalt, caselist(yypt[-1].yyv.node, nil), nil); yyval.node->src = yypt[-3].yyv.tok.src; yyval.node->decl = yypt[-4].yyv.ids; } break; case 147: #line 903 "limbo.y" { yyval.node = mkn(Opick, mkbin(Odas, mkname(&yypt[-5].yyv.tok.src, yypt[-5].yyv.tok.v.idval), yypt[-3].yyv.node), caselist(yypt[-1].yyv.node, nil)); yyval.node->src.start = yypt[-5].yyv.tok.src.start; yyval.node->src.stop = yypt[-3].yyv.node->src.stop; yyval.node->decl = yypt[-7].yyv.ids; } break; case 148: #line 910 "limbo.y" { yyval.node = mkn(Oexit, nil, nil); yyval.node->src = yypt[-1].yyv.tok.src; } break; case 149: #line 915 "limbo.y" { if(yypt[-6].yyv.node == nil){ yypt[-6].yyv.node = mkn(Onothing, nil, nil); yypt[-6].yyv.node->src.start = curline(); yypt[-6].yyv.node->src.stop = curline(); } yypt[-6].yyv.node = mkscope(rotater(yypt[-6].yyv.node)); yyval.node = mkbin(Oexstmt, yypt[-6].yyv.node, mkn(Oexcept, yypt[-3].yyv.node, caselist(yypt[-1].yyv.node, nil))); } break; case 150: #line 933 "limbo.y" { yyval.ids = nil; } break; case 151: #line 937 "limbo.y" { if(yypt[-1].yyv.ids->next != nil) yyerror("only one identifier allowed in a label"); yyval.ids = yypt[-1].yyv.ids; } break; case 152: #line 945 "limbo.y" { yyval.ids = nil; } break; case 153: #line 949 "limbo.y" { yyval.ids = mkids(&yypt[-0].yyv.tok.src, yypt[-0].yyv.tok.v.idval, nil, nil); } break; case 154: #line 955 "limbo.y" { yypt[-1].yyv.node->left->right->right = yypt[-0].yyv.node; yyval.node = yypt[-1].yyv.node; } break; case 155: #line 962 "limbo.y" { yyval.node = mkunary(Oseq, mkscope(mkunary(Olabel, rotater(yypt[-1].yyv.node)))); } break; case 156: #line 966 "limbo.y" { yypt[-3].yyv.node->left->right->right = yypt[-2].yyv.node; yyval.node = mkbin(Oseq, mkscope(mkunary(Olabel, rotater(yypt[-1].yyv.node))), yypt[-3].yyv.node); } break; case 157: #line 973 "limbo.y" { yypt[-1].yyv.node->left->right = mkscope(yypt[-0].yyv.node); yyval.node = yypt[-1].yyv.node; } break; case 158: #line 980 "limbo.y" { yyval.node = mkunary(Oseq, mkunary(Olabel, rotater(yypt[-1].yyv.node))); } break; case 159: #line 984 "limbo.y" { yypt[-3].yyv.node->left->right = mkscope(yypt[-2].yyv.node); yyval.node = mkbin(Oseq, mkunary(Olabel, rotater(yypt[-1].yyv.node)), yypt[-3].yyv.node); } break; case 160: #line 991 "limbo.y" { yypt[-1].yyv.node->left->right = mkscope(yypt[-0].yyv.node); yyval.node = yypt[-1].yyv.node; } break; case 161: #line 998 "limbo.y" { yyval.node = mkunary(Oseq, mkunary(Olabel, rotater(yypt[-1].yyv.node))); } break; case 162: #line 1002 "limbo.y" { yypt[-3].yyv.node->left->right = mkscope(yypt[-2].yyv.node); yyval.node = mkbin(Oseq, mkunary(Olabel, rotater(yypt[-1].yyv.node)), yypt[-3].yyv.node); } break; case 164: #line 1010 "limbo.y" { yyval.node = mkbin(Orange, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 165: #line 1014 "limbo.y" { yyval.node = mkn(Owild, nil, nil); yyval.node->src = yypt[-0].yyv.tok.src; } break; case 166: #line 1019 "limbo.y" { yyval.node = mkbin(Oseq, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 167: #line 1023 "limbo.y" { yyval.node = mkn(Onothing, nil, nil); yyval.node->src.start = curline(); yyval.node->src.stop = yyval.node->src.start; } break; case 168: #line 1031 "limbo.y" { yypt[-1].yyv.node->left->right = mkscope(yypt[-0].yyv.node); yyval.node = yypt[-1].yyv.node; } break; case 169: #line 1038 "limbo.y" { yyval.node = mkunary(Oseq, mkunary(Olabel, rotater(yypt[-1].yyv.node))); } break; case 170: #line 1042 "limbo.y" { yypt[-3].yyv.node->left->right = mkscope(yypt[-2].yyv.node); yyval.node = mkbin(Oseq, mkunary(Olabel, rotater(yypt[-1].yyv.node)), yypt[-3].yyv.node); } break; case 171: #line 1049 "limbo.y" { yyval.node = mkname(&yypt[-0].yyv.tok.src, yypt[-0].yyv.tok.v.idval); } break; case 172: #line 1053 "limbo.y" { yyval.node = mkn(Owild, nil, nil); yyval.node->src = yypt[-0].yyv.tok.src; } break; case 173: #line 1058 "limbo.y" { yyval.node = mkbin(Oseq, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 174: #line 1062 "limbo.y" { yyval.node = mkn(Onothing, nil, nil); yyval.node->src.start = curline(); yyval.node->src.stop = yyval.node->src.start; } break; case 175: #line 1070 "limbo.y" { yyval.node = mkn(Onothing, nil, nil); yyval.node->src.start = curline(); yyval.node->src.stop = yyval.node->src.start; } break; case 178: #line 1080 "limbo.y" { yyval.node = mkbin(Oas, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 179: #line 1084 "limbo.y" { yyval.node = mkbin(Oandas, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 180: #line 1088 "limbo.y" { yyval.node = mkbin(Ooras, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 181: #line 1092 "limbo.y" { yyval.node = mkbin(Oxoras, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 182: #line 1096 "limbo.y" { yyval.node = mkbin(Olshas, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 183: #line 1100 "limbo.y" { yyval.node = mkbin(Orshas, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 184: #line 1104 "limbo.y" { yyval.node = mkbin(Oaddas, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 185: #line 1108 "limbo.y" { yyval.node = mkbin(Osubas, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 186: #line 1112 "limbo.y" { yyval.node = mkbin(Omulas, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 187: #line 1116 "limbo.y" { yyval.node = mkbin(Odivas, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 188: #line 1120 "limbo.y" { yyval.node = mkbin(Omodas, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 189: #line 1124 "limbo.y" { yyval.node = mkbin(Oexpas, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 190: #line 1128 "limbo.y" { yyval.node = mkbin(Osnd, yypt[-3].yyv.node, yypt[-0].yyv.node); } break; case 191: #line 1132 "limbo.y" { yyval.node = mkbin(Odas, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 192: #line 1136 "limbo.y" { yyval.node = mkn(Oload, yypt[-0].yyv.node, nil); yyval.node->src.start = yypt[-2].yyv.tok.src.start; yyval.node->src.stop = yypt[-0].yyv.node->src.stop; yyval.node->ty = mkidtype(&yypt[-1].yyv.tok.src, yypt[-1].yyv.tok.v.idval); } break; case 193: #line 1143 "limbo.y" { yyval.node = mkbin(Oexp, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 194: #line 1147 "limbo.y" { yyval.node = mkbin(Omul, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 195: #line 1151 "limbo.y" { yyval.node = mkbin(Odiv, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 196: #line 1155 "limbo.y" { yyval.node = mkbin(Omod, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 197: #line 1159 "limbo.y" { yyval.node = mkbin(Oadd, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 198: #line 1163 "limbo.y" { yyval.node = mkbin(Osub, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 199: #line 1167 "limbo.y" { yyval.node = mkbin(Orsh, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 200: #line 1171 "limbo.y" { yyval.node = mkbin(Olsh, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 201: #line 1175 "limbo.y" { yyval.node = mkbin(Olt, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 202: #line 1179 "limbo.y" { yyval.node = mkbin(Ogt, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 203: #line 1183 "limbo.y" { yyval.node = mkbin(Oleq, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 204: #line 1187 "limbo.y" { yyval.node = mkbin(Ogeq, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 205: #line 1191 "limbo.y" { yyval.node = mkbin(Oeq, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 206: #line 1195 "limbo.y" { yyval.node = mkbin(Oneq, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 207: #line 1199 "limbo.y" { yyval.node = mkbin(Oand, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 208: #line 1203 "limbo.y" { yyval.node = mkbin(Oxor, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 209: #line 1207 "limbo.y" { yyval.node = mkbin(Oor, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 210: #line 1211 "limbo.y" { yyval.node = mkbin(Ocons, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 211: #line 1215 "limbo.y" { yyval.node = mkbin(Oandand, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 212: #line 1219 "limbo.y" { yyval.node = mkbin(Ooror, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 214: #line 1226 "limbo.y" { yypt[-0].yyv.node->src.start = yypt[-1].yyv.tok.src.start; yyval.node = yypt[-0].yyv.node; } break; case 215: #line 1231 "limbo.y" { yyval.node = mkunary(Oneg, yypt[-0].yyv.node); yyval.node->src.start = yypt[-1].yyv.tok.src.start; } break; case 216: #line 1236 "limbo.y" { yyval.node = mkunary(Onot, yypt[-0].yyv.node); yyval.node->src.start = yypt[-1].yyv.tok.src.start; } break; case 217: #line 1241 "limbo.y" { yyval.node = mkunary(Ocomp, yypt[-0].yyv.node); yyval.node->src.start = yypt[-1].yyv.tok.src.start; } break; case 218: #line 1246 "limbo.y" { yyval.node = mkunary(Oind, yypt[-0].yyv.node); yyval.node->src.start = yypt[-1].yyv.tok.src.start; } break; case 219: #line 1251 "limbo.y" { yyval.node = mkunary(Opreinc, yypt[-0].yyv.node); yyval.node->src.start = yypt[-1].yyv.tok.src.start; } break; case 220: #line 1256 "limbo.y" { yyval.node = mkunary(Opredec, yypt[-0].yyv.node); yyval.node->src.start = yypt[-1].yyv.tok.src.start; } break; case 221: #line 1261 "limbo.y" { yyval.node = mkunary(Orcv, yypt[-0].yyv.node); yyval.node->src.start = yypt[-1].yyv.tok.src.start; } break; case 222: #line 1266 "limbo.y" { yyval.node = mkunary(Ohd, yypt[-0].yyv.node); yyval.node->src.start = yypt[-1].yyv.tok.src.start; } break; case 223: #line 1271 "limbo.y" { yyval.node = mkunary(Otl, yypt[-0].yyv.node); yyval.node->src.start = yypt[-1].yyv.tok.src.start; } break; case 224: #line 1276 "limbo.y" { yyval.node = mkunary(Olen, yypt[-0].yyv.node); yyval.node->src.start = yypt[-1].yyv.tok.src.start; } break; case 225: #line 1281 "limbo.y" { yyval.node = mkunary(Oref, yypt[-0].yyv.node); yyval.node->src.start = yypt[-1].yyv.tok.src.start; } break; case 226: #line 1286 "limbo.y" { yyval.node = mkunary(Otagof, yypt[-0].yyv.node); yyval.node->src.start = yypt[-1].yyv.tok.src.start; } break; case 227: #line 1291 "limbo.y" { yyval.node = mkn(Oarray, yypt[-3].yyv.node, nil); yyval.node->ty = mktype(&yypt[-5].yyv.tok.src.start, &yypt[-0].yyv.type->src.stop, Tarray, yypt[-0].yyv.type, nil); yyval.node->src = yyval.node->ty->src; } break; case 228: #line 1297 "limbo.y" { yyval.node = mkn(Oarray, yypt[-5].yyv.node, yypt[-1].yyv.node); yyval.node->src.start = yypt[-7].yyv.tok.src.start; yyval.node->src.stop = yypt[-0].yyv.tok.src.stop; } break; case 229: #line 1303 "limbo.y" { yyval.node = mkn(Onothing, nil, nil); yyval.node->src.start = yypt[-5].yyv.tok.src.start; yyval.node->src.stop = yypt[-4].yyv.tok.src.stop; yyval.node = mkn(Oarray, yyval.node, yypt[-1].yyv.node); yyval.node->src.start = yypt[-6].yyv.tok.src.start; yyval.node->src.stop = yypt[-0].yyv.tok.src.stop; } break; case 230: #line 1312 "limbo.y" { yyval.node = etolist(yypt[-1].yyv.node); yyval.node->src.start = yypt[-4].yyv.tok.src.start; yyval.node->src.stop = yypt[-0].yyv.tok.src.stop; } break; case 231: #line 1318 "limbo.y" { yyval.node = mkn(Ochan, nil, nil); yyval.node->ty = mktype(&yypt[-2].yyv.tok.src.start, &yypt[-0].yyv.type->src.stop, Tchan, yypt[-0].yyv.type, nil); yyval.node->src = yyval.node->ty->src; } break; case 232: #line 1324 "limbo.y" { yyval.node = mkn(Ochan, yypt[-3].yyv.node, nil); yyval.node->ty = mktype(&yypt[-5].yyv.tok.src.start, &yypt[-0].yyv.type->src.stop, Tchan, yypt[-0].yyv.type, nil); yyval.node->src = yyval.node->ty->src; } break; case 233: #line 1330 "limbo.y" { yyval.node = mkunary(Ocast, yypt[-0].yyv.node); yyval.node->ty = mktype(&yypt[-3].yyv.tok.src.start, &yypt[-0].yyv.node->src.stop, Tarray, mkidtype(&yypt[-1].yyv.tok.src, yypt[-1].yyv.tok.v.idval), nil); yyval.node->src = yyval.node->ty->src; } break; case 234: #line 1336 "limbo.y" { yyval.node = mkunary(Ocast, yypt[-0].yyv.node); yyval.node->src.start = yypt[-1].yyv.tok.src.start; yyval.node->ty = mkidtype(&yyval.node->src, yypt[-1].yyv.tok.v.idval); } break; case 235: #line 1342 "limbo.y" { yyval.node = mkunary(Ocast, yypt[-0].yyv.node); yyval.node->src.start = yypt[-1].yyv.tok.src.start; yyval.node->ty = mkidtype(&yyval.node->src, yypt[-1].yyv.tok.v.idval); } break; case 236: #line 1348 "limbo.y" { yyval.node = mkunary(Ocast, yypt[-0].yyv.node); yyval.node->src.start = yypt[-1].yyv.tok.src.start; yyval.node->ty = yypt[-1].yyv.type; } break; case 238: #line 1357 "limbo.y" { yyval.node = mkn(Ocall, yypt[-3].yyv.node, yypt[-1].yyv.node); yyval.node->src.start = yypt[-3].yyv.node->src.start; yyval.node->src.stop = yypt[-0].yyv.tok.src.stop; } break; case 239: #line 1363 "limbo.y" { yyval.node = yypt[-1].yyv.node; if(yypt[-1].yyv.node->op == Oseq) yyval.node = mkn(Otuple, rotater(yypt[-1].yyv.node), nil); else yyval.node->flags |= PARENS; yyval.node->src.start = yypt[-2].yyv.tok.src.start; yyval.node->src.stop = yypt[-0].yyv.tok.src.stop; } break; case 240: #line 1373 "limbo.y" { yyval.node = mkbin(Odot, yypt[-2].yyv.node, mkname(&yypt[-0].yyv.tok.src, yypt[-0].yyv.tok.v.idval)); } break; case 241: #line 1377 "limbo.y" { yyval.node = mkbin(Omdot, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 242: #line 1381 "limbo.y" { yyval.node = mkbin(Oindex, yypt[-3].yyv.node, yypt[-1].yyv.node); yyval.node->src.stop = yypt[-0].yyv.tok.src.stop; } break; case 243: #line 1386 "limbo.y" { if(yypt[-3].yyv.node->op == Onothing) yypt[-3].yyv.node->src = yypt[-2].yyv.tok.src; if(yypt[-1].yyv.node->op == Onothing) yypt[-1].yyv.node->src = yypt[-2].yyv.tok.src; yyval.node = mkbin(Oslice, yypt[-5].yyv.node, mkbin(Oseq, yypt[-3].yyv.node, yypt[-1].yyv.node)); yyval.node->src.stop = yypt[-0].yyv.tok.src.stop; } break; case 244: #line 1395 "limbo.y" { yyval.node = mkunary(Oinc, yypt[-1].yyv.node); yyval.node->src.stop = yypt[-0].yyv.tok.src.stop; } break; case 245: #line 1400 "limbo.y" { yyval.node = mkunary(Odec, yypt[-1].yyv.node); yyval.node->src.stop = yypt[-0].yyv.tok.src.stop; } break; case 246: #line 1405 "limbo.y" { yyval.node = mksconst(&yypt[-0].yyv.tok.src, yypt[-0].yyv.tok.v.idval); } break; case 247: #line 1409 "limbo.y" { yyval.node = mkconst(&yypt[-0].yyv.tok.src, yypt[-0].yyv.tok.v.ival); if(yypt[-0].yyv.tok.v.ival > 0x7fffffff || yypt[-0].yyv.tok.v.ival < -0x7fffffff) yyval.node->ty = tbig; yyval.node = yyval.node; } break; case 248: #line 1416 "limbo.y" { yyval.node = mkrconst(&yypt[-0].yyv.tok.src, yypt[-0].yyv.tok.v.rval); } break; case 249: #line 1420 "limbo.y" { yyval.node = mkbin(Oindex, yypt[-5].yyv.node, rotater(mkbin(Oseq, yypt[-3].yyv.node, yypt[-1].yyv.node))); yyval.node->src.stop = yypt[-0].yyv.tok.src.stop; } break; case 250: #line 1427 "limbo.y" { yyval.node = mkname(&yypt[-0].yyv.tok.src, yypt[-0].yyv.tok.v.idval); } break; case 251: #line 1431 "limbo.y" { yyval.node = mknil(&yypt[-0].yyv.tok.src); } break; case 252: #line 1437 "limbo.y" { yyval.node = mkn(Otuple, rotater(yypt[-1].yyv.node), nil); yyval.node->src.start = yypt[-2].yyv.tok.src.start; yyval.node->src.stop = yypt[-0].yyv.tok.src.stop; } break; case 254: #line 1446 "limbo.y" { yyval.node = mkbin(Oseq, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 257: #line 1456 "limbo.y" { yyval.node = mkn(Otype, nil, nil); yyval.node->ty = mkidtype(&yypt[-0].yyv.tok.src, yypt[-0].yyv.tok.v.idval); yyval.node->src = yyval.node->ty->src; } break; case 258: #line 1462 "limbo.y" { yyval.node = mkn(Otype, nil, nil); yyval.node->ty = mktype(&yypt[-2].yyv.tok.src.start, &yypt[-0].yyv.type->src.stop, Tarray, yypt[-0].yyv.type, nil); yyval.node->src = yyval.node->ty->src; } break; case 259: #line 1468 "limbo.y" { yyval.node = mkn(Otype, nil, nil); yyval.node->ty = mktype(&yypt[-2].yyv.tok.src.start, &yypt[-0].yyv.type->src.stop, Tlist, yypt[-0].yyv.type, nil); yyval.node->src = yyval.node->ty->src; } break; case 260: #line 1474 "limbo.y" { yyval.node = mkn(Otype, nil ,nil); yyval.node->ty = yypt[-0].yyv.type; yyval.node->ty->flags |= CYCLIC; yyval.node->src = yyval.node->ty->src; } break; case 261: #line 1483 "limbo.y" { yyval.node = mkname(&yypt[-0].yyv.tok.src, yypt[-0].yyv.tok.v.idval); } break; case 262: #line 1487 "limbo.y" { yyval.node = nil; } break; case 265: #line 1495 "limbo.y" { yyval.node = mkbin(Oseq, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 266: #line 1499 "limbo.y" { yyval.node = mkbin(Oseq, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 267: #line 1505 "limbo.y" { yyval.node = nil; } break; case 268: #line 1509 "limbo.y" { yyval.node = rotater(yypt[-0].yyv.node); } break; case 272: #line 1520 "limbo.y" { yyval.node = mkbin(Oseq, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 273: #line 1526 "limbo.y" { yyval.node = rotater(yypt[-0].yyv.node); } break; case 274: #line 1530 "limbo.y" { yyval.node = rotater(yypt[-1].yyv.node); } break; case 276: #line 1537 "limbo.y" { yyval.node = mkbin(Oseq, yypt[-2].yyv.node, yypt[-0].yyv.node); } break; case 277: #line 1543 "limbo.y" { yyval.node = mkn(Oelem, nil, yypt[-0].yyv.node); yyval.node->src = yypt[-0].yyv.node->src; } break; case 278: #line 1548 "limbo.y" { yyval.node = mkbin(Oelem, rotater(yypt[-2].yyv.node), yypt[-0].yyv.node); } break; case 279: #line 1573 "limbo.y" { if(yypt[-1].yyv.node->op == Oseq) yypt[-1].yyv.node->right->left = rotater(yypt[-0].yyv.node); else yypt[-1].yyv.node->left = rotater(yypt[-0].yyv.node); yyval.node = yypt[-1].yyv.node; } break; case 280: #line 1583 "limbo.y" { yyval.node = typedecl(yypt[-1].yyv.ids, mktype(&yypt[-1].yyv.ids->src.start, &yypt[-0].yyv.tok.src.stop, Tpoly, nil, nil)); } break; case 281: #line 1587 "limbo.y" { if(yypt[-3].yyv.node->op == Oseq) yypt[-3].yyv.node->right->left = rotater(yypt[-2].yyv.node); else yypt[-3].yyv.node->left = rotater(yypt[-2].yyv.node); yyval.node = mkbin(Oseq, yypt[-3].yyv.node, typedecl(yypt[-1].yyv.ids, mktype(&yypt[-1].yyv.ids->src.start, &yypt[-0].yyv.tok.src.stop, Tpoly, nil, nil))); } break; } goto yystack; /* stack new state and value */ }