ref: 44ce0097b612a1fefd754065bdf8d9d2e5ef60c8
dir: /appl/cmd/limbo/limbo.b/
implement Limbo; #line 2 "limbo.y" include "limbo.m"; include "draw.m"; Limbo: module { init: fn(ctxt: ref Draw->Context, argv: list of string); YYSTYPE: adt{ tok: Tok; ids: ref Decl; node: ref Node; ty: ref Type; types: ref Typelist; }; YYLEX: adt { lval: YYSTYPE; lex: fn(nil: self ref YYLEX): int; error: fn(nil: self ref YYLEX, err: string); }; Landeq: con 57346; Loreq: con 57347; Lxoreq: con 57348; Llsheq: con 57349; Lrsheq: con 57350; Laddeq: con 57351; Lsubeq: con 57352; Lmuleq: con 57353; Ldiveq: con 57354; Lmodeq: con 57355; Lexpeq: con 57356; Ldeclas: con 57357; Lload: con 57358; Loror: con 57359; Landand: con 57360; Lcons: con 57361; Leq: con 57362; Lneq: con 57363; Lleq: con 57364; Lgeq: con 57365; Llsh: con 57366; Lrsh: con 57367; Lexp: con 57368; Lcomm: con 57369; Linc: con 57370; Ldec: con 57371; Lof: con 57372; Lref: con 57373; Lif: con 57374; Lelse: con 57375; Lfn: con 57376; Lexcept: con 57377; Lraises: con 57378; Lmdot: con 57379; Lto: con 57380; Lor: con 57381; Lrconst: con 57382; Lconst: con 57383; Lid: con 57384; Ltid: con 57385; Lsconst: con 57386; Llabs: con 57387; Lnil: con 57388; Llen: con 57389; Lhd: con 57390; Ltl: con 57391; Ltagof: con 57392; Limplement: con 57393; Limport: con 57394; Linclude: con 57395; Lcon: con 57396; Ltype: con 57397; Lmodule: con 57398; Lcyclic: con 57399; Ladt: con 57400; Larray: con 57401; Llist: con 57402; Lchan: con 57403; Lself: con 57404; Ldo: con 57405; Lwhile: con 57406; Lfor: con 57407; Lbreak: con 57408; Lalt: con 57409; Lcase: con 57410; Lpick: con 57411; Lcont: con 57412; Lreturn: con 57413; Lexit: con 57414; Lspawn: con 57415; Lraise: con 57416; Lfix: con 57417; Ldynamic: con 57418; }; #line 27 "limbo.y" # # lex.b # signdump: string; # name of function for sig debugging superwarn: int; debug: array of int; noline: Line; nosrc: Src; arrayz: int; oldcycles: int; emitcode: string; # emit stub routines for system module functions emitdyn: int; # emit as above but for dynamic modules emitsbl: string; # emit symbol file for sysm modules emitstub: int; # emit type and call frames for system modules emittab: string; # emit table of runtime functions for this module errors: int; mustcompile: int; dontcompile: int; asmsym: int; # generate symbols in assembly language? bout: ref Bufio->Iobuf; # output file bsym: ref Bufio->Iobuf; # symbol output file; nil => no sym out gendis: int; # generate dis or asm? fixss: int; newfnptr: int; # ISELF and -ve indices optims: int; # # decls.b # scope: int; # impmod: ref Sym; # name of implementation module impmods: ref Decl; # name of implementation module(s) nildecl: ref Decl; # declaration for limbo's nil selfdecl: ref Decl; # declaration for limbo's self # # types.b # tany: ref Type; tbig: ref Type; tbyte: ref Type; terror: ref Type; tint: ref Type; tnone: ref Type; treal: ref Type; tstring: ref Type; texception: ref Type; tunknown: ref Type; tfnptr: ref Type; rtexception: ref Type; descriptors: ref Desc; # list of all possible descriptors tattr: array of Tattr; # # nodes.b # opcommute: array of int; oprelinvert: array of int; isused: array of int; casttab: array of array of int; # instruction to cast from [1] to [2] nfns: int; # functions defined nfnexp: int; fns: array of ref Decl; # decls for fns defined tree: ref Node; # root of parse tree parset: int; # time to parse checkt: int; # time to typecheck gent: int; # time to generate code writet: int; # time to write out code symt: int; # time to write out symbols YYEOFCODE: con 1; YYERRCODE: con 2; YYMAXDEPTH: con 200; #line 1636 "limbo.y" include "ipints.m"; include "crypt.m"; sys: Sys; print, fprint, sprint: import sys; bufio: Bufio; Iobuf: import bufio; str: String; crypt:Crypt; md5: import crypt; math: Math; import_real, export_real, isnan: import math; yyctxt: ref YYLEX; canonnan: real; debug = array[256] of {* => 0}; noline = -1; nosrc = Src(-1, -1); infile: string; # front end include "arg.m"; include "lex.b"; include "types.b"; include "nodes.b"; include "decls.b"; include "typecheck.b"; # back end include "gen.b"; include "ecom.b"; include "asm.b"; include "dis.b"; include "sbl.b"; include "stubs.b"; include "com.b"; include "optim.b"; init(nil: ref Draw->Context, argv: list of string) { s: string; sys = load Sys Sys->PATH; crypt = load Crypt Crypt->PATH; math = load Math Math->PATH; bufio = load Bufio Bufio->PATH; if(bufio == nil){ sys->print("can't load %s: %r\n", Bufio->PATH); raise("fail:bad module"); } str = load String String->PATH; if(str == nil){ sys->print("can't load %s: %r\n", String->PATH); raise("fail:bad module"); } stderr = sys->fildes(2); yyctxt = ref YYLEX; math->FPcontrol(0, Math->INVAL|Math->ZDIV|Math->OVFL|Math->UNFL|Math->INEX); na := array[1] of {0.}; import_real(array[8] of {byte 16r7f, * => byte 16rff}, na); canonnan = na[0]; if(!isnan(canonnan)) fatal("bad canonical NaN"); lexinit(); typeinit(); optabinit(); gendis = 1; asmsym = 0; maxerr = 20; ofile := ""; ext := ""; arg := Arg.init(argv); while(c := arg.opt()){ case c{ 'Y' => emitsbl = arg.arg(); if(emitsbl == nil) usage(); 'C' => dontcompile = 1; '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 = arg.arg(); for(i := 0; i < len s; i++){ c = s[i]; if(c < len debug) debug[c] = 1; } 'I' => s = arg.arg(); if(s == "") usage(); addinclude(s); 'G' => asmsym = 1; 'S' => gendis = 0; 'a' => emitstub = 1; 'A' => emitstub = emitdyn = 1; 'c' => mustcompile = 1; 'e' => maxerr = 1000; 'f' => fabort = 1; 'F' => newfnptr = 1; 'g' => dosym = 1; 'i' => dontinline = 1; 'o' => ofile = arg.arg(); 'O' => optims = 1; 's' => s = arg.arg(); if(s != nil) fixss = int s; 't' => emittab = arg.arg(); if(emittab == nil) usage(); 'T' => emitcode = arg.arg(); if(emitcode == nil) usage(); 'd' => emitcode = arg.arg(); if(emitcode == nil) usage(); emitdyn = 1; 'w' => superwarn = dowarn; dowarn = 1; 'x' => ext = arg.arg(); 'X' => signdump = arg.arg(); 'z' => arrayz = 1; 'y' => oldcycles = 1; * => usage(); } } addinclude("/module"); argv = arg.argv; arg = nil; if(argv == nil){ usage(); }else if(ofile != nil){ if(len argv != 1) usage(); translate(hd argv, ofile, mkfileext(ofile, ".dis", ".sbl")); }else{ pr := len argv != 1; if(ext == ""){ ext = ".s"; if(gendis) ext = ".dis"; } for(; argv != nil; argv = tl argv){ file := hd argv; (nil, s) = str->splitr(file, "/"); if(pr) print("%s:\n", s); out := mkfileext(s, ".b", ext); translate(file, out, mkfileext(out, ext, ".sbl")); } } if (toterrors > 0) raise("fail:errors"); } usage() { fprint(stderr, "usage: limbo [-GSagwe] [-I incdir] [-o outfile] [-{T|t|d} module] [-D debug] file ...\n"); raise("fail:usage"); } mkfileext(file, oldext, ext: string): string { n := len file; n2 := len oldext; if(n >= n2 && file[n-n2:] == oldext) file = file[:n-n2]; return file + ext; } translate(in, out, dbg: string) { infile = in; outfile = out; errors = 0; bins[0] = bufio->open(in, Bufio->OREAD); if(bins[0] == nil){ fprint(stderr, "can't open %s: %r\n", in); toterrors++; return; } doemit := emitcode != "" || emitstub || emittab != "" || emitsbl != ""; if(!doemit){ bout = bufio->create(out, Bufio->OWRITE, 8r666); if(bout == nil){ fprint(stderr, "can't open %s: %r\n", out); toterrors++; bins[0].close(); return; } if(dosym){ bsym = bufio->create(dbg, Bufio->OWRITE, 8r666); if(bsym == nil) fprint(stderr, "can't open %s: %r\n", dbg); } } lexstart(in); popscopes(); typestart(); declstart(); nfnexp = 0; parset = sys->millisec(); yyparse(yyctxt); parset = sys->millisec() - parset; checkt = sys->millisec(); entry := typecheck(!doemit); checkt = sys->millisec() - checkt; modcom(entry); fns = nil; nfns = 0; descriptors = nil; if(debug['T']) print("times: parse=%d type=%d: gen=%d write=%d symbols=%d\n", parset, checkt, gent, writet, symt); if(bout != nil) bout.close(); if(bsym != nil) bsym.close(); toterrors += errors; if(errors && bout != nil) sys->remove(out); if(errors && bsym != nil) sys->remove(dbg); } pwd(): string { workdir := load Workdir Workdir->PATH; if(workdir == nil) cd := "/"; else cd = workdir->init(); # sys->print("pwd: %s\n", cd); return cd; } cleanname(s: string): string { ls, path: list of string; if(s == nil) return nil; if(s[0] != '/' && s[0] != '\\') (nil, ls) = sys->tokenize(pwd(), "/\\"); for( ; ls != nil; ls = tl ls) path = hd ls :: path; (nil, ls) = sys->tokenize(s, "/\\"); for( ; ls != nil; ls = tl ls){ n := hd ls; if(n == ".") ; else if (n == ".."){ if(path != nil) path = tl path; } else path = n :: path; } p := ""; for( ; path != nil; path = tl path) p = "/" + hd path + p; if(p == nil) p = "/"; # sys->print("cleanname: %s\n", p); return p; } srcpath(): string { srcp := cleanname(infile); # sys->print("srcpath: %s\n", srcp); return srcp; } yyexca := array[] of {-1, 1, 1, -1, -2, 0, -1, 3, 1, 3, -2, 0, -1, 17, 39, 88, 50, 62, 54, 88, 99, 62, -2, 253, -1, 211, 59, 29, 71, 29, -2, 0, -1, 230, 1, 2, -2, 0, -1, 274, 50, 176, -2, 258, -1, 309, 59, 41, 71, 41, 91, 41, -2, 0, -1, 311, 72, 175, 85, 150, 86, 150, 87, 150, 89, 150, 90, 150, 91, 150, -2, 0, -1, 381, 50, 62, 99, 62, -2, 253, -1, 382, 72, 175, 85, 150, 86, 150, 87, 150, 89, 150, 90, 150, 91, 150, -2, 0, -1, 388, 53, 71, 54, 71, -2, 110, -1, 390, 53, 72, 54, 72, -2, 112, -1, 422, 72, 175, 85, 150, 86, 150, 87, 150, 89, 150, 90, 150, 91, 150, -2, 0, -1, 429, 72, 175, 85, 150, 86, 150, 87, 150, 89, 150, 90, 150, 91, 150, -2, 0, -1, 444, 53, 71, 54, 71, -2, 111, -1, 445, 53, 72, 54, 72, -2, 113, -1, 453, 71, 280, 99, 280, -2, 163, -1, 470, 72, 175, 85, 150, 86, 150, 87, 150, 89, 150, 90, 150, 91, 150, -2, 0, -1, 487, 50, 126, 99, 126, -2, 240, -1, 492, 71, 277, -2, 0, -1, 504, 59, 47, 71, 47, -2, 0, -1, 509, 59, 41, 71, 41, 91, 41, -2, 0, -1, 515, 72, 175, 85, 150, 86, 150, 87, 150, 89, 150, 90, 150, 91, 150, -2, 0, -1, 549, 72, 175, 85, 150, 86, 150, 87, 150, 89, 150, 90, 150, 91, 150, -2, 0, -1, 555, 71, 154, 72, 175, 85, 150, 86, 150, 87, 150, 89, 150, 90, 150, 91, 150, -2, 0, -1, 563, 56, 59, 62, 59, -2, 62, -1, 569, 72, 175, 85, 150, 86, 150, 87, 150, 89, 150, 90, 150, 91, 150, -2, 0, -1, 574, 71, 157, 72, 175, 85, 150, 86, 150, 87, 150, 89, 150, 90, 150, 91, 150, -2, 0, -1, 578, 72, 176, -2, 163, -1, 597, 71, 160, 72, 175, 85, 150, 86, 150, 87, 150, 89, 150, 90, 150, 91, 150, -2, 0, -1, 603, 71, 168, 72, 175, 85, 150, 86, 150, 87, 150, 89, 150, 90, 150, 91, 150, -2, 0, -1, 607, 72, 175, 85, 150, 86, 150, 87, 150, 89, 150, 90, 150, 91, 150, -2, 0, -1, 610, 50, 62, 56, 171, 62, 171, 99, 62, -2, 253, }; YYNPROD: con 285; YYPRIVATE: con 57344; yytoknames: array of string; yystates: array of string; yydebug: con 0; YYLAST: con 2705; yyact := array[] of { 380, 592, 454, 365, 506, 385, 413, 311, 370, 315, 360, 452, 450, 185, 84, 83, 433, 299, 271, 15, 8, 49, 213, 102, 321, 12, 42, 110, 48, 78, 79, 80, 4, 35, 198, 51, 23, 492, 364, 6, 424, 3, 6, 545, 487, 401, 366, 14, 460, 21, 14, 87, 331, 287, 383, 459, 354, 351, 85, 294, 286, 90, 118, 226, 223, 112, 46, 225, 31, 466, 309, 92, 82, 186, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 310, 117, 423, 182, 183, 184, 88, 89, 86, 322, 205, 105, 208, 71, 10, 287, 287, 10, 350, 600, 518, 586, 77, 40, 548, 350, 119, 350, 295, 32, 32, 295, 287, 44, 119, 486, 484, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 186, 6, 22, 274, 230, 483, 11, 210, 514, 14, 5, 272, 22, 268, 566, 602, 429, 428, 427, 280, 431, 430, 432, 285, 411, 596, 43, 37, 482, 207, 289, 87, 439, 425, 416, 290, 410, 270, 85, 93, 209, 90, 202, 99, 416, 217, 114, 19, 408, 304, 22, 92, 82, 212, 313, 312, 218, 194, 195, 193, 94, 229, 355, 10, 567, 47, 96, 17, 98, 95, 100, 18, 101, 88, 89, 86, 513, 298, 194, 195, 573, 2, 26, 13, 314, 327, 306, 194, 195, 77, 112, 324, 319, 87, 421, 420, 419, 206, 194, 195, 85, 187, 25, 90, 23, 99, 560, 317, 194, 195, 6, 24, 87, 92, 82, 194, 195, 536, 14, 85, 5, 558, 90, 554, 99, 186, 228, 192, 96, 341, 98, 95, 92, 82, 531, 88, 89, 86, 339, 182, 194, 195, 194, 195, 215, 337, 537, 526, 491, 464, 463, 77, 342, 101, 88, 89, 86, 19, 44, 496, 509, 302, 382, 349, 469, 400, 384, 499, 359, 358, 77, 480, 10, 394, 468, 399, 362, 17, 390, 388, 392, 18, 283, 219, 211, 403, 325, 19, 488, 33, 326, 393, 605, 13, 87, 357, 216, 318, 615, 581, 489, 85, 19, 494, 90, 404, 405, 45, 580, 613, 282, 18, 214, 417, 92, 82, 45, 422, 437, 565, 18, 186, 115, 43, 108, 436, 116, 438, 540, 19, 114, 386, 435, 442, 440, 505, 88, 89, 86, 508, 563, 453, 544, 341, 183, 445, 444, 22, 415, 115, 317, 605, 77, 116, 494, 481, 494, 604, 337, 494, 601, 70, 598, 494, 63, 589, 541, 73, 474, 575, 470, 434, 479, 443, 477, 76, 75, 69, 68, 74, 292, 18, 54, 55, 62, 60, 61, 64, 87, 291, 269, 453, 508, 91, 157, 85, 91, 120, 90, 65, 66, 67, 104, 490, 494, 103, 498, 494, 92, 82, 556, 159, 595, 495, 186, 77, 511, 478, 168, 194, 195, 488, 524, 519, 523, 516, 517, 512, 501, 467, 88, 89, 86, 87, 453, 528, 524, 530, 529, 418, 85, 409, 534, 90, 594, 527, 77, 91, 39, 91, 533, 538, 330, 92, 82, 224, 546, 91, 106, 569, 547, 542, 524, 36, 553, 34, 402, 557, 91, 593, 500, 555, 300, 501, 398, 88, 89, 86, 158, 336, 161, 333, 162, 163, 561, 564, 442, 317, 201, 200, 197, 77, 160, 159, 571, 179, 447, 578, 570, 576, 572, 574, 177, 478, 81, 72, 332, 97, 181, 524, 446, 584, 180, 177, 585, 73, 578, 178, 588, 329, 227, 347, 346, 76, 75, 45, 562, 74, 41, 18, 415, 203, 597, 607, 587, 549, 599, 478, 387, 578, 603, 606, 91, 328, 222, 221, 608, 550, 612, 476, 475, 472, 614, 426, 137, 135, 135, 478, 196, 91, 199, 39, 91, 91, 188, 91, 19, 525, 204, 361, 539, 308, 91, 183, 168, 288, 369, 121, 1, 220, 138, 139, 140, 137, 135, 465, 91, 91, 141, 142, 138, 139, 140, 137, 135, 478, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 136, 273, 156, 155, 154, 153, 152, 151, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 29, 344, 275, 27, 87, 316, 543, 583, 582, 414, 91, 85, 30, 87, 90, 28, 504, 503, 591, 590, 85, 16, 284, 90, 92, 82, 91, 412, 307, 356, 9, 552, 91, 92, 82, 449, 551, 522, 521, 293, 7, 451, 296, 297, 283, 338, 88, 89, 86, 267, 507, 372, 199, 91, 109, 88, 89, 86, 107, 113, 343, 111, 77, 91, 91, 20, 320, 323, 38, 0, 0, 77, 0, 0, 0, 0, 0, 91, 91, 0, 0, 91, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 136, 0, 156, 155, 154, 153, 152, 151, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 0, 0, 0, 91, 334, 0, 0, 0, 0, 0, 0, 0, 91, 0, 0, 0, 91, 0, 0, 50, 348, 91, 0, 91, 0, 0, 352, 0, 0, 0, 0, 0, 91, 568, 52, 53, 56, 0, 91, 0, 59, 72, 0, 0, 281, 57, 58, 391, 63, 0, 0, 73, 0, 0, 0, 0, 0, 396, 397, 76, 75, 69, 68, 74, 0, 18, 54, 55, 62, 60, 61, 64, 0, 0, 0, 406, 0, 91, 0, 0, 0, 91, 0, 65, 66, 67, 87, 0, 0, 0, 0, 0, 0, 85, 0, 0, 90, 0, 0, 77, 0, 0, 91, 0, 0, 0, 92, 82, 0, 0, 367, 0, 0, 0, 196, 91, 0, 0, 0, 0, 0, 0, 0, 448, 0, 50, 407, 457, 88, 89, 86, 0, 461, 0, 462, 0, 0, 0, 0, 0, 52, 53, 56, 97, 77, 0, 59, 379, 0, 473, 0, 57, 58, 0, 63, 371, 0, 73, 0, 0, 0, 0, 0, 0, 0, 76, 75, 381, 68, 74, 0, 18, 54, 55, 62, 60, 61, 64, 368, 510, 367, 0, 0, 13, 0, 0, 0, 0, 497, 65, 66, 67, 502, 0, 0, 50, 373, 0, 0, 0, 374, 375, 378, 376, 377, 77, 0, 0, 0, 0, 52, 53, 56, 502, 0, 0, 59, 379, 0, 0, 0, 57, 58, 0, 63, 371, 535, 73, 0, 0, 0, 0, 0, 0, 0, 76, 75, 381, 68, 74, 0, 18, 54, 55, 62, 60, 61, 64, 368, 471, 367, 0, 0, 13, 0, 0, 0, 0, 0, 65, 66, 67, 0, 0, 0, 50, 373, 0, 0, 0, 374, 375, 378, 376, 377, 77, 0, 0, 0, 0, 52, 53, 56, 0, 0, 0, 59, 379, 0, 0, 0, 57, 58, 0, 63, 371, 0, 73, 0, 0, 0, 0, 0, 0, 0, 76, 75, 381, 68, 74, 0, 18, 54, 55, 62, 60, 61, 64, 368, 441, 367, 0, 0, 13, 0, 0, 0, 0, 0, 65, 66, 67, 0, 0, 0, 50, 373, 0, 0, 0, 374, 375, 378, 376, 377, 77, 0, 0, 0, 0, 52, 53, 56, 0, 0, 0, 59, 379, 0, 0, 0, 57, 58, 0, 63, 371, 0, 73, 0, 0, 0, 0, 0, 0, 0, 76, 75, 381, 68, 74, 0, 18, 54, 55, 62, 60, 61, 64, 368, 363, 609, 0, 0, 13, 0, 0, 0, 0, 0, 65, 66, 67, 0, 0, 0, 50, 373, 0, 0, 0, 374, 375, 378, 376, 377, 77, 0, 0, 0, 0, 52, 53, 611, 0, 0, 0, 59, 379, 0, 0, 0, 57, 58, 0, 63, 371, 0, 73, 0, 0, 0, 0, 0, 0, 0, 76, 75, 610, 68, 74, 0, 18, 54, 55, 62, 60, 61, 64, 368, 577, 0, 0, 0, 13, 0, 0, 0, 0, 0, 65, 66, 67, 0, 0, 50, 0, 373, 0, 0, 0, 374, 375, 378, 376, 377, 77, 0, 0, 0, 52, 53, 455, 0, 0, 0, 59, 379, 0, 0, 0, 57, 58, 0, 63, 371, 0, 73, 0, 0, 0, 0, 0, 0, 0, 76, 75, 381, 68, 74, 0, 18, 54, 55, 62, 60, 61, 64, 368, 367, 0, 0, 0, 13, 0, 0, 0, 0, 0, 65, 66, 67, 0, 0, 50, 0, 373, 0, 0, 0, 374, 375, 378, 376, 377, 77, 0, 0, 0, 52, 53, 56, 0, 0, 0, 59, 379, 0, 0, 0, 57, 58, 0, 63, 371, 0, 73, 0, 0, 0, 0, 0, 0, 0, 76, 75, 381, 68, 74, 0, 18, 54, 55, 62, 60, 61, 64, 368, 456, 144, 143, 141, 142, 138, 139, 140, 137, 135, 65, 66, 67, 0, 0, 50, 0, 373, 0, 0, 0, 374, 375, 378, 376, 377, 77, 0, 0, 0, 52, 53, 455, 0, 0, 0, 59, 72, 0, 0, 0, 57, 58, 0, 63, 0, 0, 73, 0, 0, 0, 0, 0, 0, 0, 76, 75, 69, 68, 74, 0, 18, 54, 55, 62, 60, 61, 64, 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 65, 66, 67, 0, 87, 0, 52, 53, 56, 0, 0, 85, 59, 72, 90, 0, 77, 57, 58, 0, 63, 0, 0, 73, 92, 82, 0, 0, 0, 0, 0, 76, 75, 69, 276, 74, 0, 18, 54, 55, 62, 60, 61, 64, 301, 243, 88, 89, 86, 0, 0, 0, 0, 279, 0, 277, 278, 67, 50, 0, 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, 77, 0, 52, 53, 56, 0, 0, 0, 59, 72, 0, 0, 0, 57, 58, 0, 63, 0, 0, 73, 0, 0, 0, 0, 0, 0, 0, 76, 75, 69, 68, 74, 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, 77, 57, 58, 0, 63, 0, 0, 73, 0, 0, 0, 0, 0, 0, 0, 76, 75, 69, 68, 74, 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, 73, 0, 0, 0, 0, 0, 0, 77, 76, 75, 69, 68, 74, 0, 18, 54, 55, 62, 60, 61, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 66, 67, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 136, 77, 156, 155, 154, 153, 152, 151, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 155, 154, 153, 152, 151, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 136, 559, 156, 155, 154, 153, 152, 151, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 154, 153, 152, 151, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 0, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 136, 532, 156, 155, 154, 153, 152, 151, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 152, 151, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 0, 0, 0, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 136, 485, 156, 155, 154, 153, 152, 151, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 151, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 0, 0, 0, 0, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 136, 353, 156, 155, 154, 153, 152, 151, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 0, 0, 0, 0, 0, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 136, 345, 156, 155, 154, 153, 152, 151, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 0, 0, 0, 0, 0, 0, 0, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 136, 305, 156, 155, 154, 153, 152, 151, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 136, 303, 156, 155, 154, 153, 152, 151, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 136, 191, 156, 155, 154, 153, 152, 151, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 136, 190, 156, 155, 154, 153, 152, 151, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 136, 189, 156, 155, 154, 153, 152, 151, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 0, 87, 0, 0, 0, 87, 0, 0, 85, 0, 0, 90, 389, 0, 0, 90, 0, 0, 0, 0, 0, 92, 395, 0, 0, 92, 82, 0, 0, 0, 0, 0, 0, 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 89, 86, 0, 88, 89, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 0, 0, 0, 77, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 136, 0, 156, 155, 154, 153, 152, 151, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 136, 579, 156, 155, 154, 153, 152, 151, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 136, 520, 156, 155, 154, 153, 152, 151, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 0, 0, 0, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 136, 493, 156, 155, 154, 153, 152, 151, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 0, 0, 0, 340, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 136, 0, 156, 155, 154, 153, 152, 151, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 0, 0, 0, 335, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 136, 0, 156, 155, 154, 153, 152, 151, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 0, 515, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 136, 0, 156, 155, 154, 153, 152, 151, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 0, 458, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 136, 0, 156, 155, 154, 153, 152, 151, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, 156, 155, 154, 153, 152, 151, 149, 150, 145, 146, 147, 148, 144, 143, 141, 142, 138, 139, 140, 137, 135, }; yypact := array[] of { 167,-1000, 347, 277,-1000, 198,-1000,-1000, 189, 169, 689, 686, 18, 287, 474,-1000, 468, 546,-1000, 307, -33, 152,-1000,-1000,-1000,-1000,-1000,1579,1579,1579, 1579, 314, 586, 147, 151, 412, 402, 11, 467, 349, -1000, 347, 22,-1000,-1000,-1000, 397,-1000,2250,-1000, 394, 498,1620,1620,1620,1620,1620,1620,1620,1620, 1620,1620,1620,1620,1620, 531, 509, 526,1620, 377, 1620,-1000,1579, 581,-1000,-1000,-1000, 584,2195,2140, 2085, 214,-1000,-1000,-1000, 314, 504, 314, 503, 502, 546,-1000, 549,-1000,-1000, 314,1579, 184,1579, 127, 273, 546, 301, 316, 546, 272, 314, 564, 563, -35, -1000, 464, 17, -36,-1000,-1000,-1000, 537,-1000, 307, -1000, 277,-1000,1579,1579,1579,1579,1579,1579,1579, 1579,1579,1579,1579,1579,1524,1579,1579,1579,1579, 1579,1579,1579,1579,1579,1579,1579,1579,1579,1579, 1579,1579,1579,1579,1579,1579,1579,1579,1579, 390, 525,1457,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000, -1000,-1000,-1000,-1000,-1000,-1000,-1000, 809, 309, 271, 314,1579,-1000,-1000,-1000, 20,2645,-1000,1579,-1000, -1000,-1000,-1000,1579, 389, 380, 425, 314, 19, 425, 314, 314, 581,1448, 248,2030,-1000,1579,1975,-1000, 314, 628, 0,-1000,-1000, 143, 307,-1000,-1000, 347, 425,-1000,-1000, 322, 12, 12, 286,-1000,-1000,-1000, 277,2645,2645,2645,2645,2645,2645,2645,2645,2645, 2645,2645,2645,1579, 577,2645, 576, 576, 576, 576, 605, 605, 615, 615,1375,1375,1375,1375,1988,1988, 1935,1881,1827,1774,1774,1720,2666, 562, -46,-1000, 416, 536, 461, -47,2645,-1000,1620, 520, 495, 314, 2532, 493,1620,1579, 425,2493,-1000,1579, 301, 651, 1920, 540, 539, 425,-1000, 314, 425, 425, 412, 15, 425, 314,-1000,-1000,1865,-1000, 16, 150,-1000, 626, 265,1125,-1000,-1000, 14, 254,-1000, 328, 557,-1000, 425,-1000,2255, 425,-1000,-1000,-1000,2645,-1000,-1000, 1579,1457,2251, 664, 425, 488, 264,-1000, 253, -54, 480,2645,-1000,1579,-1000,-1000,1448,1448, 425,-1000, 854,-1000, 425,-1000, 135,-1000,-1000, 450, 123,-1000, 112,-1000, 347,-1000,-1000,-1000, 448, 183,-1000, -10, 120, 573, 90, 371, 371,1579,1579,1579, 119,1579, 2645, 377,1055,-1000,-1000, 347,-1000,-1000,-1000, 314, -1000, 425, 527, 513,2645,1620, 425, 425, 655,1402, -1000,1579, 314,2608, 13, 6, 425, 314,-1000, 232, -1000, -18,-1000,-1000,-1000, 438, 263, 252, 213,-1000, -1000,-1000, 985, 571, 314,-1000,1579, 570, 569,1333, 1579, 260, 355, 115,-1000, 92, 51,1810, 50,-1000, 4,-1000,-1000, 297,-1000,-1000,-1000,-1000, 425,1402, 236, -62,-1000,2455, 410,1620,-1000, 425,-1000,-1000, -1000, 425, 246, 314,1579,-1000, 256, 453, 392, 249, 915, 424,1579, 163,2571,1579,1579, 21, 432,2402, 1402, 610,-1000,-1000,-1000,-1000,-1000,-1000, 408,-1000, 235,-1000,1402,1579,1402,1579,-1000, 221,1755, 347, 1579, 314, 204, 234, 627,-1000, 325, 369,-1000, 626, -1000, 342, 3,-1000,1579,1333, 39, 554, 567,-1000, 1402, 211,-1000, 407,2455,1579,-1000,-1000,2645,-1000, 2645,-1000,-1000, 209,1700, 193,-1000,-1000, 340, 339, -1000, 319, 102, 153,-1000,-1000, 768, 470,1579,1333, 1579, 168,-1000, 366,-1000,1264,-1000,2349,-1000,-1000, -1000, 305, 430,-1000, 296,-1000,-1000,1402,-1000,1333, 36,-1000, 553,-1000,1264,-1000, 362, 183,2455, 469, -1000,-1000, 113,-1000, 359,-1000,1579, 34, 357,-1000, 103,-1000, 354,-1000,-1000,-1000,-1000,1264,-1000, 552, -1000,-1000,-1000,1195,-1000, 469, 306,1333, 295, 183, 377,1620,-1000,-1000,-1000,-1000, }; yypgo := array[] of { 0, 531, 758, 186, 33, 24, 420, 15, 14, 46, 755, 751, 749, 34, 748, 744, 27, 741, 16, 4, 740, 110, 8, 0, 21, 35, 13, 739, 735, 100, 25, 165, 26, 12, 731, 11, 2, 38, 41, 32, 730, 22, 3, 7, 728, 727, 726, 721, 720, 20, 719, 718, 717, 10, 711, 709, 708, 1, 707, 706, 699, 6, 5, 698, 697, 696, 19, 23, 695, 9, 692, 18, 668, 644, 17, 637, 636, 635, 634, }; yyr1 := array[] of { 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, 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, 78, 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, }; yyr2 := array[] of { 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, 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, 0, 4, 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, }; yychk := array[] of { -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, 49, 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, -3, 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, -23, -27, -26, 59, -25, -71, -22, -72, -23, -70, 60, 81, 82, 79, -23, 42, 60, 70, -1, -23, 40, 99, -78, -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, -41, 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, }; yydef := array[] of { 0, -2, 0, -2, 4, 0, 7, 8, 0, 0, 0, 17, 0, 0, 0, 25, 0, -2, 254, 0, 61, 0, 62, 5, 6, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 117, 0, 95, 93, 97, 121, 0, 0, 266, 267, 253, 0, 1, 0, 177, 0, 214, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 253, 0, 238, 0, 0, 249, 250, 251, 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, 255, 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, 270, 0, 0, 175, 247, 248, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 0, 0, 0, 0, 0, 235, 236, 237, 0, 274, 241, 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, 268, 269, -2, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 0, 191, 192, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 193, 0, 271, 243, 244, 256, 0, 0, -2, 259, 260, 0, 0, 0, 0, 0, 0, 0, 232, 0, 240, 0, 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, 239, 245, 175, 0, 0, 0, 263, 0, 0, 234, 0, 272, 0, 275, 242, 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, 282, 283, 92, -2, 0, -2, 0, 0, 257, 258, 70, 261, 262, 0, 0, 231, 273, 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, 246, 252, 228, 0, 0, 276, 278, -2, 0, 165, 167, 233, 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, 284, 0, 230, -2, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, -2, 54, 0, 58, 59, -2, 130, 265, 0, 132, 0, -2, 0, 0, 0, 151, 0, 0, 123, 0, 163, 0, 229, 279, 164, 166, 281, 34, 35, 0, 0, 0, 50, 51, 52, 53, 55, 0, 0, 0, 264, 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, }; yytok1 := array[] of { 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, 64, 3, 3, 3, 36, 23, 3, 39, 40, 34, 32, 99, 33, 54, 35, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 50, 72, 26, 4, 27, 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, 41, 3, 42, 22, 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, 21, 71, 65, }; yytok2 := array[] of { 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, }; yytok3 := array[] of { 0 }; YYSys: module { FD: adt { fd: int; }; fildes: fn(fd: int): ref FD; fprint: fn(fd: ref FD, s: string, *): int; }; yysys: YYSys; yystderr: ref YYSys->FD; YYFLAG: con -1000; # parser for yacc output yytokname(yyc: int): string { if(yyc > 0 && yyc <= len yytoknames && yytoknames[yyc-1] != nil) return yytoknames[yyc-1]; return "<"+string yyc+">"; } yystatname(yys: int): string { if(yys >= 0 && yys < len yystates && yystates[yys] != nil) return yystates[yys]; return "<"+string yys+">\n"; } yylex1(yylex: ref YYLEX): int { c : int; yychar := yylex.lex(); if(yychar <= 0) c = yytok1[0]; else if(yychar < len yytok1) c = yytok1[yychar]; else if(yychar >= YYPRIVATE && yychar < YYPRIVATE+len yytok2) c = yytok2[yychar-YYPRIVATE]; else{ n := len yytok3; c = 0; for(i := 0; i < n; i+=2) { if(yytok3[i+0] == yychar) { c = yytok3[i+1]; break; } } if(c == 0) c = yytok2[1]; # unknown char } if(yydebug >= 3) yysys->fprint(yystderr, "lex %.4ux %s\n", yychar, yytokname(c)); return c; } YYS: adt { yyv: YYSTYPE; yys: int; }; yyparse(yylex: ref YYLEX): int { if(yydebug >= 1 && yysys == nil) { yysys = load YYSys "$Sys"; yystderr = yysys->fildes(2); } yys := array[YYMAXDEPTH] of YYS; yyval: YYSTYPE; yystate := 0; yychar := -1; yynerrs := 0; # number of errors yyerrflag := 0; # error recovery flag yyp := -1; yyn := 0; yystack: for(;;){ # put a state and value onto the stack if(yydebug >= 4) yysys->fprint(yystderr, "char %s in %s", yytokname(yychar), yystatname(yystate)); yyp++; if(yyp >= len yys) yys = (array[len yys * 2] of YYS)[0:] = yys; yys[yyp].yys = yystate; yys[yyp].yyv = yyval; for(;;){ yyn = yypact[yystate]; if(yyn > YYFLAG) { # simple state if(yychar < 0) yychar = yylex1(yylex); yyn += yychar; if(yyn >= 0 && yyn < YYLAST) { yyn = yyact[yyn]; if(yychk[yyn] == yychar) { # valid shift yychar = -1; yyp++; if(yyp >= len yys) yys = (array[len yys * 2] of YYS)[0:] = yys; yystate = yyn; yys[yyp].yys = yystate; yys[yyp].yyv = yylex.lval; if(yyerrflag > 0) yyerrflag--; if(yydebug >= 4) yysys->fprint(yystderr, "char %s in %s", yytokname(yychar), yystatname(yystate)); continue; } } } # default state action yyn = yydef[yystate]; if(yyn == -2) { if(yychar < 0) yychar = yylex1(yylex); # look through exception table for(yyxi:=0;; yyxi+=2) if(yyexca[yyxi] == -1 && yyexca[yyxi+1] == yystate) break; for(yyxi += 2;; yyxi += 2) { yyn = yyexca[yyxi]; if(yyn < 0 || yyn == yychar) break; } yyn = yyexca[yyxi+1]; if(yyn < 0){ yyn = 0; break yystack; } } if(yyn != 0) break; # error ... attempt to resume parsing if(yyerrflag == 0) { # brand new error yylex.error("syntax error"); yynerrs++; if(yydebug >= 1) { yysys->fprint(yystderr, "%s", yystatname(yystate)); yysys->fprint(yystderr, "saw %s\n", yytokname(yychar)); } } if(yyerrflag != 3) { # incompletely recovered error ... try again yyerrflag = 3; # find a state where "error" is a legal shift action while(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) continue yystack; } # the current yyp has no shift onn "error", pop stack if(yydebug >= 2) yysys->fprint(yystderr, "error recovery pops state %d, uncovers %d\n", yys[yyp].yys, yys[yyp-1].yys ); yyp--; } # there is no state on the stack with an error shift ... abort yyn = 1; break yystack; } # no shift yet; clobber input char if(yydebug >= 2) yysys->fprint(yystderr, "error recovery discards %s\n", yytokname(yychar)); if(yychar == YYEOFCODE) { yyn = 1; break yystack; } yychar = -1; # try again in the same state } # reduction by production yyn if(yydebug >= 2) yysys->fprint(yystderr, "reduce %d in:\n\t%s", yyn, yystatname(yystate)); yypt := yyp; yyp -= yyr2[yyn]; # yyval = yys[yyp+1].yyv; yym := yyn; # consult goto table to find next state yyn = yyr1[yyn]; yyg := yypgo[yyn]; yyj := yyg + yys[yyp].yys + 1; if(yyj >= YYLAST || yychk[yystate=yyact[yyj]] != -yyn) yystate = yyact[yyg]; case yym { 1=> #line 153 "limbo.y" { impmods = yys[yypt-1].yyv.ids; } 2=> #line 156 "limbo.y" { tree = rotater(yys[yypt-0].yyv.node); } 3=> #line 160 "limbo.y" { impmods = nil; tree = rotater(yys[yypt-0].yyv.node); } 4=> yyval.node = yys[yyp+1].yyv.node; 5=> #line 168 "limbo.y" { if(yys[yypt-1].yyv.node == nil) yyval.node = yys[yypt-0].yyv.node; else if(yys[yypt-0].yyv.node == nil) yyval.node = yys[yypt-1].yyv.node; else yyval.node = mkbin(Oseq, yys[yypt-1].yyv.node, yys[yypt-0].yyv.node); } 6=> #line 179 "limbo.y" { yyval.node = nil; } 7=> yyval.node = yys[yyp+1].yyv.node; 8=> yyval.node = yys[yyp+1].yyv.node; 9=> yyval.node = yys[yyp+1].yyv.node; 10=> yyval.node = yys[yyp+1].yyv.node; 11=> #line 187 "limbo.y" { yyval.node = mkbin(Oas, yys[yypt-3].yyv.node, yys[yypt-1].yyv.node); } 12=> #line 191 "limbo.y" { yyval.node = mkbin(Oas, yys[yypt-3].yyv.node, yys[yypt-1].yyv.node); } 13=> #line 195 "limbo.y" { yyval.node = mkbin(Odas, yys[yypt-3].yyv.node, yys[yypt-1].yyv.node); } 14=> #line 199 "limbo.y" { yyval.node = mkbin(Odas, yys[yypt-3].yyv.node, yys[yypt-1].yyv.node); } 15=> #line 203 "limbo.y" { yyerror("illegal declaration"); yyval.node = nil; } 16=> #line 208 "limbo.y" { yyerror("illegal declaration"); yyval.node = nil; } 17=> yyval.node = yys[yyp+1].yyv.node; 18=> #line 216 "limbo.y" { yyval.node = mkbin(Oseq, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 19=> #line 222 "limbo.y" { includef(yys[yypt-1].yyv.tok.v.idval); yyval.node = nil; } 20=> #line 227 "limbo.y" { yyval.node = typedecl(yys[yypt-4].yyv.ids, yys[yypt-1].yyv.ty); } 21=> #line 231 "limbo.y" { yyval.node = importdecl(yys[yypt-1].yyv.node, yys[yypt-4].yyv.ids); yyval.node.src.start = yys[yypt-4].yyv.ids.src.start; yyval.node.src.stop = yys[yypt-0].yyv.tok.src.stop; } 22=> #line 237 "limbo.y" { yyval.node = vardecl(yys[yypt-3].yyv.ids, yys[yypt-1].yyv.ty); } 23=> #line 241 "limbo.y" { yyval.node = mkbin(Ovardecli, vardecl(yys[yypt-5].yyv.ids, yys[yypt-3].yyv.ty), varinit(yys[yypt-5].yyv.ids, yys[yypt-1].yyv.node)); } 24=> #line 245 "limbo.y" { yyval.node = condecl(yys[yypt-4].yyv.ids, yys[yypt-1].yyv.node); } 25=> yyval.node = yys[yyp+1].yyv.node; 26=> #line 252 "limbo.y" { yyval.node = exdecl(yys[yypt-3].yyv.ids, nil); } 27=> #line 256 "limbo.y" { yyval.node = exdecl(yys[yypt-6].yyv.ids, revids(yys[yypt-2].yyv.ids)); } 28=> #line 262 "limbo.y" { yys[yypt-5].yyv.ids.src.stop = yys[yypt-0].yyv.tok.src.stop; yyval.node = moddecl(yys[yypt-5].yyv.ids, rotater(yys[yypt-1].yyv.node)); } 29=> #line 269 "limbo.y" { yyval.node = nil; } 30=> #line 273 "limbo.y" { if(yys[yypt-1].yyv.node == nil) yyval.node = yys[yypt-0].yyv.node; else if(yys[yypt-0].yyv.node == nil) yyval.node = yys[yypt-1].yyv.node; else yyval.node = mkn(Oseq, yys[yypt-1].yyv.node, yys[yypt-0].yyv.node); } 31=> #line 282 "limbo.y" { yyval.node = nil; } 32=> #line 288 "limbo.y" { yyval.node = fielddecl(Dglobal, typeids(yys[yypt-3].yyv.ids, yys[yypt-1].yyv.ty)); } 33=> yyval.node = yys[yyp+1].yyv.node; 34=> #line 293 "limbo.y" { yyval.node = typedecl(yys[yypt-4].yyv.ids, yys[yypt-1].yyv.ty); } 35=> #line 297 "limbo.y" { yyval.node = condecl(yys[yypt-4].yyv.ids, yys[yypt-1].yyv.node); } 36=> yyval.node = yys[yyp+1].yyv.node; 37=> #line 304 "limbo.y" { yys[yypt-7].yyv.ids.src.stop = yys[yypt-1].yyv.tok.src.stop; yyval.node = adtdecl(yys[yypt-7].yyv.ids, rotater(yys[yypt-2].yyv.node)); yyval.node.ty.polys = yys[yypt-4].yyv.ids; yyval.node.ty.val = rotater(yys[yypt-0].yyv.node); } 38=> #line 311 "limbo.y" { yys[yypt-10].yyv.ids.src.stop = yys[yypt-0].yyv.tok.src.stop; yyval.node = adtdecl(yys[yypt-10].yyv.ids, rotater(yys[yypt-1].yyv.node)); yyval.node.ty.polys = yys[yypt-7].yyv.ids; yyval.node.ty.val = rotater(yys[yypt-4].yyv.node); } 39=> #line 320 "limbo.y" { yyval.node = nil; } 40=> #line 324 "limbo.y" { yyval.node = yys[yypt-1].yyv.node; } 41=> #line 330 "limbo.y" { yyval.node = nil; } 42=> #line 334 "limbo.y" { if(yys[yypt-1].yyv.node == nil) yyval.node = yys[yypt-0].yyv.node; else if(yys[yypt-0].yyv.node == nil) yyval.node = yys[yypt-1].yyv.node; else yyval.node = mkn(Oseq, yys[yypt-1].yyv.node, yys[yypt-0].yyv.node); } 43=> #line 343 "limbo.y" { yyval.node = nil; } 44=> yyval.node = yys[yyp+1].yyv.node; 45=> yyval.node = yys[yyp+1].yyv.node; 46=> #line 351 "limbo.y" { yyval.node = condecl(yys[yypt-4].yyv.ids, yys[yypt-1].yyv.node); } 47=> #line 357 "limbo.y" { yyval.node = nil; } 48=> #line 361 "limbo.y" { if(yys[yypt-1].yyv.node == nil) yyval.node = yys[yypt-0].yyv.node; else if(yys[yypt-0].yyv.node == nil) yyval.node = yys[yypt-1].yyv.node; else yyval.node = mkn(Oseq, yys[yypt-1].yyv.node, yys[yypt-0].yyv.node); } 49=> #line 372 "limbo.y" { for(d := yys[yypt-4].yyv.ids; d != nil; d = d.next) d.cyc = byte 1; yyval.node = fielddecl(Dfield, typeids(yys[yypt-4].yyv.ids, yys[yypt-1].yyv.ty)); } 50=> #line 378 "limbo.y" { yyval.node = fielddecl(Dfield, typeids(yys[yypt-3].yyv.ids, yys[yypt-1].yyv.ty)); } 51=> #line 384 "limbo.y" { yyval.node = yys[yypt-1].yyv.node; } 52=> #line 390 "limbo.y" { yys[yypt-1].yyv.node.right.right = yys[yypt-0].yyv.node; yyval.node = yys[yypt-1].yyv.node; } 53=> #line 395 "limbo.y" { yyval.node = nil; } 54=> #line 399 "limbo.y" { yyval.node = nil; } 55=> #line 405 "limbo.y" { yyval.node = mkn(Opickdecl, nil, mkn(Oseq, fielddecl(Dtag, yys[yypt-1].yyv.ids), nil)); typeids(yys[yypt-1].yyv.ids, mktype(yys[yypt-1].yyv.ids.src.start, yys[yypt-1].yyv.ids.src.stop, Tadtpick, nil, nil)); } 56=> #line 410 "limbo.y" { yys[yypt-3].yyv.node.right.right = yys[yypt-2].yyv.node; yyval.node = mkn(Opickdecl, yys[yypt-3].yyv.node, mkn(Oseq, fielddecl(Dtag, yys[yypt-1].yyv.ids), nil)); typeids(yys[yypt-1].yyv.ids, mktype(yys[yypt-1].yyv.ids.src.start, yys[yypt-1].yyv.ids.src.stop, Tadtpick, nil, nil)); } 57=> #line 416 "limbo.y" { yyval.node = mkn(Opickdecl, nil, mkn(Oseq, fielddecl(Dtag, yys[yypt-1].yyv.ids), nil)); typeids(yys[yypt-1].yyv.ids, mktype(yys[yypt-1].yyv.ids.src.start, yys[yypt-1].yyv.ids.src.stop, Tadtpick, nil, nil)); } 58=> #line 423 "limbo.y" { yyval.ids = revids(yys[yypt-0].yyv.ids); } 59=> #line 429 "limbo.y" { yyval.ids = mkids(yys[yypt-0].yyv.tok.src, yys[yypt-0].yyv.tok.v.idval, nil, nil); } 60=> #line 433 "limbo.y" { yyval.ids = mkids(yys[yypt-0].yyv.tok.src, yys[yypt-0].yyv.tok.v.idval, nil, yys[yypt-2].yyv.ids); } 61=> #line 439 "limbo.y" { yyval.ids = revids(yys[yypt-0].yyv.ids); } 62=> #line 445 "limbo.y" { yyval.ids = mkids(yys[yypt-0].yyv.tok.src, yys[yypt-0].yyv.tok.v.idval, nil, nil); } 63=> #line 449 "limbo.y" { yyval.ids = mkids(yys[yypt-0].yyv.tok.src, yys[yypt-0].yyv.tok.v.idval, nil, yys[yypt-2].yyv.ids); } 64=> #line 455 "limbo.y" { yyval.ty = mktype(yys[yypt-5].yyv.tok.src.start, yys[yypt-0].yyv.tok.src.stop, Tfix, nil, nil); yyval.ty.val = mkbin(Oseq, yys[yypt-3].yyv.node, yys[yypt-1].yyv.node); } 65=> #line 460 "limbo.y" { yyval.ty = mktype(yys[yypt-3].yyv.tok.src.start, yys[yypt-0].yyv.tok.src.stop, Tfix, nil, nil); yyval.ty.val = yys[yypt-1].yyv.node; } 66=> #line 467 "limbo.y" { yyval.types = addtype(yys[yypt-0].yyv.ty, nil); } 67=> #line 471 "limbo.y" { yyval.types = addtype(yys[yypt-0].yyv.ty, nil); yys[yypt-0].yyv.ty.flags |= CYCLIC; } 68=> #line 476 "limbo.y" { yyval.types = addtype(yys[yypt-0].yyv.ty, yys[yypt-2].yyv.types); } 69=> #line 480 "limbo.y" { yyval.types = addtype(yys[yypt-0].yyv.ty, yys[yypt-3].yyv.types); yys[yypt-0].yyv.ty.flags |= CYCLIC; } 70=> #line 487 "limbo.y" { yyval.ty = mkidtype(yys[yypt-0].yyv.tok.src, yys[yypt-0].yyv.tok.v.idval); } 71=> #line 491 "limbo.y" { yyval.ty = yys[yypt-0].yyv.ty; } 72=> #line 495 "limbo.y" { yyval.ty = yys[yypt-0].yyv.ty; } 73=> #line 499 "limbo.y" { yyval.ty = mkarrowtype(yys[yypt-2].yyv.ty.src.start, yys[yypt-0].yyv.tok.src.stop, yys[yypt-2].yyv.ty, yys[yypt-0].yyv.tok.v.idval); } 74=> #line 503 "limbo.y" { yyval.ty = mkarrowtype(yys[yypt-5].yyv.ty.src.start, yys[yypt-3].yyv.tok.src.stop, yys[yypt-5].yyv.ty, yys[yypt-3].yyv.tok.v.idval); yyval.ty = mkinsttype(yys[yypt-5].yyv.ty.src, yyval.ty, yys[yypt-1].yyv.types); } 75=> #line 508 "limbo.y" { yyval.ty = mktype(yys[yypt-1].yyv.tok.src.start, yys[yypt-0].yyv.ty.src.stop, Tref, yys[yypt-0].yyv.ty, nil); } 76=> #line 512 "limbo.y" { yyval.ty = mktype(yys[yypt-2].yyv.tok.src.start, yys[yypt-0].yyv.ty.src.stop, Tchan, yys[yypt-0].yyv.ty, nil); } 77=> #line 516 "limbo.y" { if(yys[yypt-1].yyv.ids.next == nil) yyval.ty = yys[yypt-1].yyv.ids.ty; else yyval.ty = mktype(yys[yypt-2].yyv.tok.src.start, yys[yypt-0].yyv.tok.src.stop, Ttuple, nil, revids(yys[yypt-1].yyv.ids)); } 78=> #line 523 "limbo.y" { yyval.ty = mktype(yys[yypt-2].yyv.tok.src.start, yys[yypt-0].yyv.ty.src.stop, Tarray, yys[yypt-0].yyv.ty, nil); } 79=> #line 527 "limbo.y" { yyval.ty = mktype(yys[yypt-2].yyv.tok.src.start, yys[yypt-0].yyv.ty.src.stop, Tlist, yys[yypt-0].yyv.ty, nil); } 80=> #line 531 "limbo.y" { yys[yypt-1].yyv.ty.src.start = yys[yypt-3].yyv.tok.src.start; yys[yypt-1].yyv.ty.polys = yys[yypt-2].yyv.ids; yys[yypt-1].yyv.ty.eraises = yys[yypt-0].yyv.node; yyval.ty = yys[yypt-1].yyv.ty; } 81=> yyval.ty = yys[yyp+1].yyv.ty; 82=> #line 551 "limbo.y" { yyval.ty = mkidtype(yys[yypt-0].yyv.tok.src, yys[yypt-0].yyv.tok.v.idval); } 83=> #line 555 "limbo.y" { yyval.ty = mkinsttype(yys[yypt-3].yyv.tok.src, mkidtype(yys[yypt-3].yyv.tok.src, yys[yypt-3].yyv.tok.v.idval), yys[yypt-1].yyv.types); } 84=> #line 561 "limbo.y" { yyval.ty = mkdottype(yys[yypt-2].yyv.ty.src.start, yys[yypt-0].yyv.tok.src.stop, yys[yypt-2].yyv.ty, yys[yypt-0].yyv.tok.v.idval); } 85=> #line 565 "limbo.y" { yyval.ty = mkdottype(yys[yypt-5].yyv.ty.src.start, yys[yypt-3].yyv.tok.src.stop, yys[yypt-5].yyv.ty, yys[yypt-3].yyv.tok.v.idval); yyval.ty = mkinsttype(yys[yypt-5].yyv.ty.src, yyval.ty, yys[yypt-1].yyv.types); } 86=> #line 572 "limbo.y" { yyval.ids = mkids(yys[yypt-0].yyv.ty.src, nil, yys[yypt-0].yyv.ty, nil); } 87=> #line 576 "limbo.y" { yyval.ids = mkids(yys[yypt-2].yyv.ids.src, nil, yys[yypt-0].yyv.ty, yys[yypt-2].yyv.ids); } 88=> #line 582 "limbo.y" { yyval.ids = nil; } 89=> #line 586 "limbo.y" { yyval.ids = polydecl(yys[yypt-1].yyv.ids); } 90=> #line 592 "limbo.y" { yyval.ty = mktype(yys[yypt-2].yyv.tok.src.start, yys[yypt-0].yyv.tok.src.stop, Tfn, tnone, yys[yypt-1].yyv.ids); } 91=> #line 596 "limbo.y" { yyval.ty = mktype(yys[yypt-2].yyv.tok.src.start, yys[yypt-0].yyv.tok.src.stop, Tfn, tnone, nil); yyval.ty.varargs = byte 1; } 92=> #line 601 "limbo.y" { yyval.ty = mktype(yys[yypt-4].yyv.tok.src.start, yys[yypt-0].yyv.tok.src.stop, Tfn, tnone, yys[yypt-3].yyv.ids); yyval.ty.varargs = byte 1; } 93=> #line 608 "limbo.y" { yyval.ty = yys[yypt-0].yyv.ty; } 94=> #line 612 "limbo.y" { yys[yypt-2].yyv.ty.tof = yys[yypt-0].yyv.ty; yys[yypt-2].yyv.ty.src.stop = yys[yypt-0].yyv.ty.src.stop; yyval.ty = yys[yypt-2].yyv.ty; } 95=> #line 620 "limbo.y" { yyval.ty = yys[yypt-0].yyv.ty; } 96=> #line 624 "limbo.y" { yyval.ty = yys[yypt-4].yyv.ty; yyval.ty.val = rotater(yys[yypt-1].yyv.node); } 97=> #line 631 "limbo.y" { yyval.ids = nil; } 98=> yyval.ids = yys[yyp+1].yyv.ids; 99=> yyval.ids = yys[yyp+1].yyv.ids; 100=> #line 639 "limbo.y" { yyval.ids = appdecls(yys[yypt-2].yyv.ids, yys[yypt-0].yyv.ids); } 101=> #line 645 "limbo.y" { yyval.ids = typeids(yys[yypt-2].yyv.ids, yys[yypt-0].yyv.ty); } 102=> #line 649 "limbo.y" { yyval.ids = typeids(yys[yypt-2].yyv.ids, yys[yypt-0].yyv.ty); for(d := yyval.ids; d != nil; d = d.next) d.implicit = byte 1; } 103=> #line 655 "limbo.y" { yyval.ids = mkids(yys[yypt-2].yyv.node.src, enter("junk", 0), yys[yypt-0].yyv.ty, nil); yyval.ids.store = Darg; yyerror("illegal argument declaration"); } 104=> #line 661 "limbo.y" { yyval.ids = mkids(yys[yypt-2].yyv.node.src, enter("junk", 0), yys[yypt-0].yyv.ty, nil); yyval.ids.store = Darg; yyerror("illegal argument declaration"); } 105=> #line 669 "limbo.y" { yyval.ids = revids(yys[yypt-0].yyv.ids); } 106=> #line 675 "limbo.y" { yyval.ids = mkids(yys[yypt-0].yyv.tok.src, yys[yypt-0].yyv.tok.v.idval, nil, nil); yyval.ids.store = Darg; } 107=> #line 680 "limbo.y" { yyval.ids = mkids(yys[yypt-0].yyv.tok.src, nil, nil, nil); yyval.ids.store = Darg; } 108=> #line 685 "limbo.y" { yyval.ids = mkids(yys[yypt-0].yyv.tok.src, yys[yypt-0].yyv.tok.v.idval, nil, yys[yypt-2].yyv.ids); yyval.ids.store = Darg; } 109=> #line 690 "limbo.y" { yyval.ids = mkids(yys[yypt-0].yyv.tok.src, nil, nil, yys[yypt-2].yyv.ids); yyval.ids.store = Darg; } 110=> #line 697 "limbo.y" { yyval.ty = yys[yypt-0].yyv.ty; } 111=> #line 701 "limbo.y" { yyval.ty = mktype(yys[yypt-1].yyv.tok.src.start, yys[yypt-0].yyv.tok.src.stop, Tref, yys[yypt-0].yyv.ty, nil); } 112=> #line 705 "limbo.y" { yyval.ty = yys[yypt-0].yyv.ty; } 113=> #line 709 "limbo.y" { yyval.ty = mktype(yys[yypt-1].yyv.tok.src.start, yys[yypt-0].yyv.tok.src.stop, Tref, yys[yypt-0].yyv.ty, nil); } 114=> #line 715 "limbo.y" { yyval.node = fndecl(yys[yypt-3].yyv.node, yys[yypt-2].yyv.ty, yys[yypt-0].yyv.node); nfns++; # patch up polydecs if(yys[yypt-3].yyv.node.op == Odot){ if(yys[yypt-3].yyv.node.right.left != nil){ yys[yypt-2].yyv.ty.polys = yys[yypt-3].yyv.node.right.left.decl; yys[yypt-3].yyv.node.right.left = nil; } if(yys[yypt-3].yyv.node.left.op == Oname && yys[yypt-3].yyv.node.left.left != nil){ yyval.node.decl = yys[yypt-3].yyv.node.left.left.decl; yys[yypt-3].yyv.node.left.left = nil; } } else{ if(yys[yypt-3].yyv.node.left != nil){ yys[yypt-2].yyv.ty.polys = yys[yypt-3].yyv.node.left.decl; yys[yypt-3].yyv.node.left = nil; } } yys[yypt-2].yyv.ty.eraises = yys[yypt-1].yyv.node; yyval.node.src = yys[yypt-3].yyv.node.src; } 115=> #line 741 "limbo.y" { yyval.node = mkn(Otuple, rotater(yys[yypt-1].yyv.node), nil); yyval.node.src.start = yys[yypt-3].yyv.tok.src.start; yyval.node.src.stop = yys[yypt-0].yyv.tok.src.stop; } 116=> #line 747 "limbo.y" { yyval.node = mkn(Otuple, mkunary(Oseq, yys[yypt-0].yyv.node), nil); yyval.node.src.start = yys[yypt-1].yyv.tok.src.start; yyval.node.src.stop = yys[yypt-0].yyv.node.src.stop; } 117=> #line 753 "limbo.y" { yyval.node = nil; } 118=> #line 759 "limbo.y" { if(yys[yypt-1].yyv.node == nil){ yys[yypt-1].yyv.node = mkn(Onothing, nil, nil); yys[yypt-1].yyv.node.src.start = curline(); yys[yypt-1].yyv.node.src.stop = yys[yypt-1].yyv.node.src.start; } yyval.node = rotater(yys[yypt-1].yyv.node); yyval.node.src.start = yys[yypt-2].yyv.tok.src.start; yyval.node.src.stop = yys[yypt-0].yyv.tok.src.stop; } 119=> #line 770 "limbo.y" { yyval.node = mkn(Onothing, nil, nil); } 120=> #line 774 "limbo.y" { yyval.node = mkn(Onothing, nil, nil); } 121=> #line 780 "limbo.y" { yyval.node = mkname(yys[yypt-1].yyv.tok.src, yys[yypt-1].yyv.tok.v.idval); if(yys[yypt-0].yyv.ids != nil){ yyval.node.left = mkn(Onothing, nil ,nil); yyval.node.left.decl = yys[yypt-0].yyv.ids; } } 122=> #line 788 "limbo.y" { yyval.node = mkbin(Odot, yys[yypt-3].yyv.node, mkname(yys[yypt-1].yyv.tok.src, yys[yypt-1].yyv.tok.v.idval)); if(yys[yypt-0].yyv.ids != nil){ yyval.node.right.left = mkn(Onothing, nil ,nil); yyval.node.right.left.decl = yys[yypt-0].yyv.ids; } } 123=> #line 798 "limbo.y" { yyval.node = nil; } 124=> #line 802 "limbo.y" { if(yys[yypt-1].yyv.node == nil) yyval.node = yys[yypt-0].yyv.node; else if(yys[yypt-0].yyv.node == nil) yyval.node = yys[yypt-1].yyv.node; else yyval.node = mkbin(Oseq, yys[yypt-1].yyv.node, yys[yypt-0].yyv.node); } 125=> #line 811 "limbo.y" { if(yys[yypt-1].yyv.node == nil) yyval.node = yys[yypt-0].yyv.node; else yyval.node = mkbin(Oseq, yys[yypt-1].yyv.node, yys[yypt-0].yyv.node); } 128=> #line 824 "limbo.y" { yyval.node = mkn(Onothing, nil, nil); yyval.node.src.start = curline(); yyval.node.src.stop = yyval.node.src.start; } 129=> #line 830 "limbo.y" { yyval.node = mkn(Onothing, nil, nil); yyval.node.src.start = curline(); yyval.node.src.stop = yyval.node.src.start; } 130=> #line 836 "limbo.y" { yyval.node = mkn(Onothing, nil, nil); yyval.node.src.start = curline(); yyval.node.src.stop = yyval.node.src.start; } 131=> #line 842 "limbo.y" { if(yys[yypt-1].yyv.node == nil){ yys[yypt-1].yyv.node = mkn(Onothing, nil, nil); yys[yypt-1].yyv.node.src.start = curline(); yys[yypt-1].yyv.node.src.stop = yys[yypt-1].yyv.node.src.start; } yyval.node = mkscope(rotater(yys[yypt-1].yyv.node)); } 132=> #line 851 "limbo.y" { yyerror("illegal declaration"); yyval.node = mkn(Onothing, nil, nil); yyval.node.src.start = curline(); yyval.node.src.stop = yyval.node.src.start; } 133=> #line 858 "limbo.y" { yyerror("illegal declaration"); yyval.node = mkn(Onothing, nil, nil); yyval.node.src.start = curline(); yyval.node.src.stop = yyval.node.src.start; } 134=> #line 865 "limbo.y" { yyval.node = yys[yypt-1].yyv.node; } 135=> #line 869 "limbo.y" { yyval.node = mkn(Oif, yys[yypt-2].yyv.node, mkunary(Oseq, yys[yypt-0].yyv.node)); yyval.node.src.start = yys[yypt-4].yyv.tok.src.start; yyval.node.src.stop = yys[yypt-0].yyv.node.src.stop; } 136=> #line 875 "limbo.y" { yyval.node = mkn(Oif, yys[yypt-4].yyv.node, mkbin(Oseq, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node)); yyval.node.src.start = yys[yypt-6].yyv.tok.src.start; yyval.node.src.stop = yys[yypt-0].yyv.node.src.stop; } 137=> #line 881 "limbo.y" { yyval.node = mkunary(Oseq, yys[yypt-0].yyv.node); if(yys[yypt-2].yyv.node.op != Onothing) yyval.node.right = yys[yypt-2].yyv.node; yyval.node = mkbin(Ofor, yys[yypt-4].yyv.node, yyval.node); yyval.node.decl = yys[yypt-9].yyv.ids; if(yys[yypt-6].yyv.node.op != Onothing) yyval.node = mkbin(Oseq, yys[yypt-6].yyv.node, yyval.node); } 138=> #line 891 "limbo.y" { yyval.node = mkn(Ofor, yys[yypt-2].yyv.node, mkunary(Oseq, yys[yypt-0].yyv.node)); yyval.node.src.start = yys[yypt-4].yyv.tok.src.start; yyval.node.src.stop = yys[yypt-0].yyv.node.src.stop; yyval.node.decl = yys[yypt-5].yyv.ids; } 139=> #line 898 "limbo.y" { yyval.node = mkn(Odo, yys[yypt-2].yyv.node, yys[yypt-5].yyv.node); yyval.node.src.start = yys[yypt-6].yyv.tok.src.start; yyval.node.src.stop = yys[yypt-1].yyv.tok.src.stop; yyval.node.decl = yys[yypt-7].yyv.ids; } 140=> #line 905 "limbo.y" { yyval.node = mkn(Obreak, nil, nil); yyval.node.decl = yys[yypt-1].yyv.ids; yyval.node.src = yys[yypt-2].yyv.tok.src; } 141=> #line 911 "limbo.y" { yyval.node = mkn(Ocont, nil, nil); yyval.node.decl = yys[yypt-1].yyv.ids; yyval.node.src = yys[yypt-2].yyv.tok.src; } 142=> #line 917 "limbo.y" { yyval.node = mkn(Oret, yys[yypt-1].yyv.node, nil); yyval.node.src = yys[yypt-2].yyv.tok.src; if(yys[yypt-1].yyv.node.op == Onothing) yyval.node.left = nil; else yyval.node.src.stop = yys[yypt-1].yyv.node.src.stop; } 143=> #line 926 "limbo.y" { yyval.node = mkn(Ospawn, yys[yypt-1].yyv.node, nil); yyval.node.src.start = yys[yypt-2].yyv.tok.src.start; yyval.node.src.stop = yys[yypt-1].yyv.node.src.stop; } 144=> #line 932 "limbo.y" { yyval.node = mkn(Oraise, yys[yypt-1].yyv.node, nil); yyval.node.src.start = yys[yypt-2].yyv.tok.src.start; yyval.node.src.stop = yys[yypt-1].yyv.node.src.stop; } 145=> #line 938 "limbo.y" { yyval.node = mkn(Ocase, yys[yypt-3].yyv.node, caselist(yys[yypt-1].yyv.node, nil)); yyval.node.src = yys[yypt-3].yyv.node.src; yyval.node.decl = yys[yypt-5].yyv.ids; } 146=> #line 944 "limbo.y" { yyval.node = mkn(Oalt, caselist(yys[yypt-1].yyv.node, nil), nil); yyval.node.src = yys[yypt-3].yyv.tok.src; yyval.node.decl = yys[yypt-4].yyv.ids; } 147=> #line 950 "limbo.y" { yyval.node = mkn(Opick, mkbin(Odas, mkname(yys[yypt-5].yyv.tok.src, yys[yypt-5].yyv.tok.v.idval), yys[yypt-3].yyv.node), caselist(yys[yypt-1].yyv.node, nil)); yyval.node.src.start = yys[yypt-5].yyv.tok.src.start; yyval.node.src.stop = yys[yypt-3].yyv.node.src.stop; yyval.node.decl = yys[yypt-7].yyv.ids; } 148=> #line 957 "limbo.y" { yyval.node = mkn(Oexit, nil, nil); yyval.node.src = yys[yypt-1].yyv.tok.src; } 149=> #line 962 "limbo.y" { if(yys[yypt-6].yyv.node == nil){ yys[yypt-6].yyv.node = mkn(Onothing, nil, nil); yys[yypt-6].yyv.node.src.start = yys[yypt-6].yyv.node.src.stop = curline(); } yys[yypt-6].yyv.node = mkscope(rotater(yys[yypt-6].yyv.node)); yyval.node = mkbin(Oexstmt, yys[yypt-6].yyv.node, mkn(Oexcept, yys[yypt-3].yyv.node, caselist(yys[yypt-1].yyv.node, nil))); } 150=> #line 977 "limbo.y" { yyval.ids = nil; } 151=> #line 981 "limbo.y" { if(yys[yypt-1].yyv.ids.next != nil) yyerror("only one identifier allowed in a label"); yyval.ids = yys[yypt-1].yyv.ids; } 152=> #line 989 "limbo.y" { yyval.ids = nil; } 153=> #line 993 "limbo.y" { yyval.ids = mkids(yys[yypt-0].yyv.tok.src, yys[yypt-0].yyv.tok.v.idval, nil, nil); } 154=> #line 999 "limbo.y" { yys[yypt-1].yyv.node.left.right.right = yys[yypt-0].yyv.node; yyval.node = yys[yypt-1].yyv.node; } 155=> #line 1006 "limbo.y" { yyval.node = mkunary(Oseq, mkscope(mkunary(Olabel, rotater(yys[yypt-1].yyv.node)))); } 156=> #line 1010 "limbo.y" { yys[yypt-3].yyv.node.left.right.right = yys[yypt-2].yyv.node; yyval.node = mkbin(Oseq, mkscope(mkunary(Olabel, rotater(yys[yypt-1].yyv.node))), yys[yypt-3].yyv.node); } 157=> #line 1017 "limbo.y" { yys[yypt-1].yyv.node.left.right = mkscope(yys[yypt-0].yyv.node); yyval.node = yys[yypt-1].yyv.node; } 158=> #line 1024 "limbo.y" { yyval.node = mkunary(Oseq, mkunary(Olabel, rotater(yys[yypt-1].yyv.node))); } 159=> #line 1028 "limbo.y" { yys[yypt-3].yyv.node.left.right = mkscope(yys[yypt-2].yyv.node); yyval.node = mkbin(Oseq, mkunary(Olabel, rotater(yys[yypt-1].yyv.node)), yys[yypt-3].yyv.node); } 160=> #line 1035 "limbo.y" { yys[yypt-1].yyv.node.left.right = mkscope(yys[yypt-0].yyv.node); yyval.node = yys[yypt-1].yyv.node; } 161=> #line 1042 "limbo.y" { yyval.node = mkunary(Oseq, mkunary(Olabel, rotater(yys[yypt-1].yyv.node))); } 162=> #line 1046 "limbo.y" { yys[yypt-3].yyv.node.left.right = mkscope(yys[yypt-2].yyv.node); yyval.node = mkbin(Oseq, mkunary(Olabel, rotater(yys[yypt-1].yyv.node)), yys[yypt-3].yyv.node); } 163=> yyval.node = yys[yyp+1].yyv.node; 164=> #line 1054 "limbo.y" { yyval.node = mkbin(Orange, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 165=> #line 1058 "limbo.y" { yyval.node = mkn(Owild, nil, nil); yyval.node.src = yys[yypt-0].yyv.tok.src; } 166=> #line 1063 "limbo.y" { yyval.node = mkbin(Oseq, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 167=> #line 1067 "limbo.y" { yyval.node = mkn(Onothing, nil, nil); yyval.node.src.start = curline(); yyval.node.src.stop = yyval.node.src.start; } 168=> #line 1075 "limbo.y" { yys[yypt-1].yyv.node.left.right = mkscope(yys[yypt-0].yyv.node); yyval.node = yys[yypt-1].yyv.node; } 169=> #line 1082 "limbo.y" { yyval.node = mkunary(Oseq, mkunary(Olabel, rotater(yys[yypt-1].yyv.node))); } 170=> #line 1086 "limbo.y" { yys[yypt-3].yyv.node.left.right = mkscope(yys[yypt-2].yyv.node); yyval.node = mkbin(Oseq, mkunary(Olabel, rotater(yys[yypt-1].yyv.node)), yys[yypt-3].yyv.node); } 171=> #line 1093 "limbo.y" { yyval.node = mkname(yys[yypt-0].yyv.tok.src, yys[yypt-0].yyv.tok.v.idval); } 172=> #line 1097 "limbo.y" { yyval.node = mkn(Owild, nil, nil); yyval.node.src = yys[yypt-0].yyv.tok.src; } 173=> #line 1102 "limbo.y" { yyval.node = mkbin(Oseq, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 174=> #line 1106 "limbo.y" { yyval.node = mkn(Onothing, nil, nil); yyval.node.src.start = curline(); yyval.node.src.stop = yyval.node.src.start; } 175=> #line 1114 "limbo.y" { yyval.node = mkn(Onothing, nil, nil); yyval.node.src.start = curline(); yyval.node.src.stop = yyval.node.src.start; } 176=> yyval.node = yys[yyp+1].yyv.node; 177=> yyval.node = yys[yyp+1].yyv.node; 178=> #line 1124 "limbo.y" { yyval.node = mkbin(Oas, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 179=> #line 1128 "limbo.y" { yyval.node = mkbin(Oandas, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 180=> #line 1132 "limbo.y" { yyval.node = mkbin(Ooras, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 181=> #line 1136 "limbo.y" { yyval.node = mkbin(Oxoras, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 182=> #line 1140 "limbo.y" { yyval.node = mkbin(Olshas, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 183=> #line 1144 "limbo.y" { yyval.node = mkbin(Orshas, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 184=> #line 1148 "limbo.y" { yyval.node = mkbin(Oaddas, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 185=> #line 1152 "limbo.y" { yyval.node = mkbin(Osubas, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 186=> #line 1156 "limbo.y" { yyval.node = mkbin(Omulas, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 187=> #line 1160 "limbo.y" { yyval.node = mkbin(Odivas, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 188=> #line 1164 "limbo.y" { yyval.node = mkbin(Omodas, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 189=> #line 1168 "limbo.y" { yyval.node = mkbin(Oexpas, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 190=> #line 1172 "limbo.y" { yyval.node = mkbin(Osnd, yys[yypt-3].yyv.node, yys[yypt-0].yyv.node); } 191=> #line 1176 "limbo.y" { yyval.node = mkbin(Osnd, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 192=> #line 1180 "limbo.y" { yyval.node = mkbin(Odas, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 193=> #line 1184 "limbo.y" { yyval.node = mkn(Oload, yys[yypt-0].yyv.node, nil); yyval.node.src.start = yys[yypt-2].yyv.tok.src.start; yyval.node.src.stop = yys[yypt-0].yyv.node.src.stop; yyval.node.ty = mkidtype(yys[yypt-1].yyv.tok.src, yys[yypt-1].yyv.tok.v.idval); } 194=> #line 1191 "limbo.y" { yyval.node = yyval.node = mkbin(Oexp, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 195=> #line 1195 "limbo.y" { yyval.node = mkbin(Omul, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 196=> #line 1199 "limbo.y" { yyval.node = mkbin(Odiv, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 197=> #line 1203 "limbo.y" { yyval.node = mkbin(Omod, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 198=> #line 1207 "limbo.y" { yyval.node = mkbin(Oadd, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 199=> #line 1211 "limbo.y" { yyval.node = mkbin(Osub, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 200=> #line 1215 "limbo.y" { yyval.node = mkbin(Orsh, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 201=> #line 1219 "limbo.y" { yyval.node = mkbin(Olsh, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 202=> #line 1223 "limbo.y" { yyval.node = mkbin(Olt, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 203=> #line 1227 "limbo.y" { yyval.node = mkbin(Ogt, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 204=> #line 1231 "limbo.y" { yyval.node = mkbin(Oleq, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 205=> #line 1235 "limbo.y" { yyval.node = mkbin(Ogeq, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 206=> #line 1239 "limbo.y" { yyval.node = mkbin(Oeq, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 207=> #line 1243 "limbo.y" { yyval.node = mkbin(Oneq, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 208=> #line 1247 "limbo.y" { yyval.node = mkbin(Oand, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 209=> #line 1251 "limbo.y" { yyval.node = mkbin(Oxor, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 210=> #line 1255 "limbo.y" { yyval.node = mkbin(Oor, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 211=> #line 1259 "limbo.y" { yyval.node = mkbin(Ocons, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 212=> #line 1263 "limbo.y" { yyval.node = mkbin(Oandand, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 213=> #line 1267 "limbo.y" { yyval.node = mkbin(Ooror, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 214=> yyval.node = yys[yyp+1].yyv.node; 215=> #line 1274 "limbo.y" { yys[yypt-0].yyv.node.src.start = yys[yypt-1].yyv.tok.src.start; yyval.node = yys[yypt-0].yyv.node; } 216=> #line 1279 "limbo.y" { yyval.node = mkunary(Oneg, yys[yypt-0].yyv.node); yyval.node.src.start = yys[yypt-1].yyv.tok.src.start; } 217=> #line 1284 "limbo.y" { yyval.node = mkunary(Onot, yys[yypt-0].yyv.node); yyval.node.src.start = yys[yypt-1].yyv.tok.src.start; } 218=> #line 1289 "limbo.y" { yyval.node = mkunary(Ocomp, yys[yypt-0].yyv.node); yyval.node.src.start = yys[yypt-1].yyv.tok.src.start; } 219=> #line 1294 "limbo.y" { yyval.node = mkunary(Oind, yys[yypt-0].yyv.node); yyval.node.src.start = yys[yypt-1].yyv.tok.src.start; } 220=> #line 1299 "limbo.y" { yyval.node = mkunary(Opreinc, yys[yypt-0].yyv.node); yyval.node.src.start = yys[yypt-1].yyv.tok.src.start; } 221=> #line 1304 "limbo.y" { yyval.node = mkunary(Opredec, yys[yypt-0].yyv.node); yyval.node.src.start = yys[yypt-1].yyv.tok.src.start; } 222=> #line 1309 "limbo.y" { yyval.node = mkunary(Orcv, yys[yypt-0].yyv.node); yyval.node.src.start = yys[yypt-1].yyv.tok.src.start; } 223=> #line 1314 "limbo.y" { yyval.node = mkunary(Ohd, yys[yypt-0].yyv.node); yyval.node.src.start = yys[yypt-1].yyv.tok.src.start; } 224=> #line 1319 "limbo.y" { yyval.node = mkunary(Otl, yys[yypt-0].yyv.node); yyval.node.src.start = yys[yypt-1].yyv.tok.src.start; } 225=> #line 1324 "limbo.y" { yyval.node = mkunary(Olen, yys[yypt-0].yyv.node); yyval.node.src.start = yys[yypt-1].yyv.tok.src.start; } 226=> #line 1329 "limbo.y" { yyval.node = mkunary(Oref, yys[yypt-0].yyv.node); yyval.node.src.start = yys[yypt-1].yyv.tok.src.start; } 227=> #line 1334 "limbo.y" { yyval.node = mkunary(Otagof, yys[yypt-0].yyv.node); yyval.node.src.start = yys[yypt-1].yyv.tok.src.start; } 228=> #line 1339 "limbo.y" { yyval.node = mkn(Oarray, yys[yypt-3].yyv.node, nil); yyval.node.ty = mktype(yys[yypt-5].yyv.tok.src.start, yys[yypt-0].yyv.ty.src.stop, Tarray, yys[yypt-0].yyv.ty, nil); yyval.node.src = yyval.node.ty.src; } 229=> #line 1345 "limbo.y" { yyval.node = mkn(Oarray, yys[yypt-5].yyv.node, yys[yypt-1].yyv.node); yyval.node.src.start = yys[yypt-7].yyv.tok.src.start; yyval.node.src.stop = yys[yypt-0].yyv.tok.src.stop; } 230=> #line 1351 "limbo.y" { yyval.node = mkn(Onothing, nil, nil); yyval.node.src.start = yys[yypt-5].yyv.tok.src.start; yyval.node.src.stop = yys[yypt-4].yyv.tok.src.stop; yyval.node = mkn(Oarray, yyval.node, yys[yypt-1].yyv.node); yyval.node.src.start = yys[yypt-6].yyv.tok.src.start; yyval.node.src.stop = yys[yypt-0].yyv.tok.src.stop; } 231=> #line 1360 "limbo.y" { yyval.node = etolist(yys[yypt-1].yyv.node); yyval.node.src.start = yys[yypt-4].yyv.tok.src.start; yyval.node.src.stop = yys[yypt-0].yyv.tok.src.stop; } 232=> #line 1366 "limbo.y" { yyval.node = mkn(Ochan, nil, nil); yyval.node.ty = mktype(yys[yypt-2].yyv.tok.src.start, yys[yypt-0].yyv.ty.src.stop, Tchan, yys[yypt-0].yyv.ty, nil); yyval.node.src = yyval.node.ty.src; } 233=> #line 1372 "limbo.y" { yyval.node = mkn(Ochan, yys[yypt-3].yyv.node, nil); yyval.node.ty = mktype(yys[yypt-5].yyv.tok.src.start, yys[yypt-0].yyv.ty.src.stop, Tchan, yys[yypt-0].yyv.ty, nil); yyval.node.src = yyval.node.ty.src; } 234=> #line 1378 "limbo.y" { yyval.node = mkunary(Ocast, yys[yypt-0].yyv.node); yyval.node.ty = mktype(yys[yypt-3].yyv.tok.src.start, yys[yypt-0].yyv.node.src.stop, Tarray, mkidtype(yys[yypt-1].yyv.tok.src, yys[yypt-1].yyv.tok.v.idval), nil); yyval.node.src = yyval.node.ty.src; } 235=> #line 1384 "limbo.y" { yyval.node = mkunary(Ocast, yys[yypt-0].yyv.node); yyval.node.src.start = yys[yypt-1].yyv.tok.src.start; yyval.node.ty = mkidtype(yyval.node.src, yys[yypt-1].yyv.tok.v.idval); } 236=> #line 1390 "limbo.y" { yyval.node = mkunary(Ocast, yys[yypt-0].yyv.node); yyval.node.src.start = yys[yypt-1].yyv.tok.src.start; yyval.node.ty = mkidtype(yyval.node.src, yys[yypt-1].yyv.tok.v.idval); } 237=> #line 1396 "limbo.y" { yyval.node = mkunary(Ocast, yys[yypt-0].yyv.node); yyval.node.src.start = yys[yypt-1].yyv.tok.src.start; yyval.node.ty = yys[yypt-1].yyv.ty; } 238=> yyval.node = yys[yyp+1].yyv.node; 239=> #line 1405 "limbo.y" { yyval.node = mkn(Ocall, yys[yypt-3].yyv.node, yys[yypt-1].yyv.node); yyval.node.src.start = yys[yypt-3].yyv.node.src.start; yyval.node.src.stop = yys[yypt-0].yyv.tok.src.stop; } 240=> #line 1411 "limbo.y" { yyval.node = yys[yypt-1].yyv.node; if(yys[yypt-1].yyv.node.op == Oseq) yyval.node = mkn(Otuple, rotater(yys[yypt-1].yyv.node), nil); else yyval.node.flags |= byte PARENS; yyval.node.src.start = yys[yypt-2].yyv.tok.src.start; yyval.node.src.stop = yys[yypt-0].yyv.tok.src.stop; } 241=> #line 1421 "limbo.y" { # n := mkdeclname($1, mkids($1, enter(".fn"+string nfnexp++, 0), nil, nil)); # $<node>$ = fndef(n, $2); # nfns++; } 242=> #line 1426 "limbo.y" { # $$ = fnfinishdef($<node>3, $4); # $$ = mkdeclname($1, $$.left.decl); yyerror("urt unk"); yyval.node = nil; } 243=> #line 1433 "limbo.y" { yyval.node = mkbin(Odot, yys[yypt-2].yyv.node, mkname(yys[yypt-0].yyv.tok.src, yys[yypt-0].yyv.tok.v.idval)); } 244=> #line 1437 "limbo.y" { yyval.node = mkbin(Omdot, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 245=> #line 1441 "limbo.y" { yyval.node = mkbin(Oindex, yys[yypt-3].yyv.node, yys[yypt-1].yyv.node); yyval.node.src.stop = yys[yypt-0].yyv.tok.src.stop; } 246=> #line 1446 "limbo.y" { if(yys[yypt-3].yyv.node.op == Onothing) yys[yypt-3].yyv.node.src = yys[yypt-2].yyv.tok.src; if(yys[yypt-1].yyv.node.op == Onothing) yys[yypt-1].yyv.node.src = yys[yypt-2].yyv.tok.src; yyval.node = mkbin(Oslice, yys[yypt-5].yyv.node, mkbin(Oseq, yys[yypt-3].yyv.node, yys[yypt-1].yyv.node)); yyval.node.src.stop = yys[yypt-0].yyv.tok.src.stop; } 247=> #line 1455 "limbo.y" { yyval.node = mkunary(Oinc, yys[yypt-1].yyv.node); yyval.node.src.stop = yys[yypt-0].yyv.tok.src.stop; } 248=> #line 1460 "limbo.y" { yyval.node = mkunary(Odec, yys[yypt-1].yyv.node); yyval.node.src.stop = yys[yypt-0].yyv.tok.src.stop; } 249=> #line 1465 "limbo.y" { yyval.node = mksconst(yys[yypt-0].yyv.tok.src, yys[yypt-0].yyv.tok.v.idval); } 250=> #line 1469 "limbo.y" { yyval.node = mkconst(yys[yypt-0].yyv.tok.src, yys[yypt-0].yyv.tok.v.ival); if(yys[yypt-0].yyv.tok.v.ival > big 16r7fffffff || yys[yypt-0].yyv.tok.v.ival < big -16r7fffffff) yyval.node.ty = tbig; } 251=> #line 1475 "limbo.y" { yyval.node = mkrconst(yys[yypt-0].yyv.tok.src, yys[yypt-0].yyv.tok.v.rval); } 252=> #line 1479 "limbo.y" { yyval.node = mkbin(Oindex, yys[yypt-5].yyv.node, rotater(mkbin(Oseq, yys[yypt-3].yyv.node, yys[yypt-1].yyv.node))); yyval.node.src.stop = yys[yypt-0].yyv.tok.src.stop; } 253=> #line 1486 "limbo.y" { yyval.node = mkname(yys[yypt-0].yyv.tok.src, yys[yypt-0].yyv.tok.v.idval); } 254=> #line 1490 "limbo.y" { yyval.node = mknil(yys[yypt-0].yyv.tok.src); } 255=> #line 1496 "limbo.y" { yyval.node = mkn(Otuple, rotater(yys[yypt-1].yyv.node), nil); yyval.node.src.start = yys[yypt-2].yyv.tok.src.start; yyval.node.src.stop = yys[yypt-0].yyv.tok.src.stop; } 256=> yyval.node = yys[yyp+1].yyv.node; 257=> #line 1505 "limbo.y" { yyval.node = mkbin(Oseq, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 258=> yyval.node = yys[yyp+1].yyv.node; 259=> yyval.node = yys[yyp+1].yyv.node; 260=> #line 1515 "limbo.y" { yyval.node = mkn(Otype, nil, nil); yyval.node.ty = mkidtype(yys[yypt-0].yyv.tok.src, yys[yypt-0].yyv.tok.v.idval); yyval.node.src = yyval.node.ty.src; } 261=> #line 1521 "limbo.y" { yyval.node = mkn(Otype, nil, nil); yyval.node.ty = mktype(yys[yypt-2].yyv.tok.src.start, yys[yypt-0].yyv.ty.src.stop, Tarray, yys[yypt-0].yyv.ty, nil); yyval.node.src = yyval.node.ty.src; } 262=> #line 1527 "limbo.y" { yyval.node = mkn(Otype, nil, nil); yyval.node.ty = mktype(yys[yypt-2].yyv.tok.src.start, yys[yypt-0].yyv.ty.src.stop, Tlist, yys[yypt-0].yyv.ty, nil); yyval.node.src = yyval.node.ty.src; } 263=> #line 1533 "limbo.y" { yyval.node = mkn(Otype, nil ,nil); yyval.node.ty = yys[yypt-0].yyv.ty; yyval.node.ty.flags |= CYCLIC; yyval.node.src = yyval.node.ty.src; } 264=> #line 1542 "limbo.y" { yyval.node = mkname(yys[yypt-0].yyv.tok.src, yys[yypt-0].yyv.tok.v.idval); } 265=> #line 1546 "limbo.y" { yyval.node = nil; } 266=> yyval.node = yys[yyp+1].yyv.node; 267=> yyval.node = yys[yyp+1].yyv.node; 268=> #line 1554 "limbo.y" { yyval.node = mkbin(Oseq, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 269=> #line 1558 "limbo.y" { yyval.node = mkbin(Oseq, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 270=> #line 1564 "limbo.y" { yyval.node = nil; } 271=> #line 1568 "limbo.y" { yyval.node = rotater(yys[yypt-0].yyv.node); } 272=> yyval.node = yys[yyp+1].yyv.node; 273=> yyval.node = yys[yyp+1].yyv.node; 274=> yyval.node = yys[yyp+1].yyv.node; 275=> #line 1579 "limbo.y" { yyval.node = mkbin(Oseq, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 276=> #line 1585 "limbo.y" { yyval.node = rotater(yys[yypt-0].yyv.node); } 277=> #line 1589 "limbo.y" { yyval.node = rotater(yys[yypt-1].yyv.node); } 278=> yyval.node = yys[yyp+1].yyv.node; 279=> #line 1596 "limbo.y" { yyval.node = mkbin(Oseq, yys[yypt-2].yyv.node, yys[yypt-0].yyv.node); } 280=> #line 1602 "limbo.y" { yyval.node = mkn(Oelem, nil, yys[yypt-0].yyv.node); yyval.node.src = yys[yypt-0].yyv.node.src; } 281=> #line 1607 "limbo.y" { yyval.node = mkbin(Oelem, rotater(yys[yypt-2].yyv.node), yys[yypt-0].yyv.node); } 282=> #line 1613 "limbo.y" { if(yys[yypt-1].yyv.node.op == Oseq) yys[yypt-1].yyv.node.right.left = rotater(yys[yypt-0].yyv.node); else yys[yypt-1].yyv.node.left = rotater(yys[yypt-0].yyv.node); yyval.node = yys[yypt-1].yyv.node; } 283=> #line 1623 "limbo.y" { yyval.node = typedecl(yys[yypt-1].yyv.ids, mktype(yys[yypt-1].yyv.ids.src.start, yys[yypt-0].yyv.tok.src.stop, Tpoly, nil, nil)); } 284=> #line 1627 "limbo.y" { if(yys[yypt-3].yyv.node.op == Oseq) yys[yypt-3].yyv.node.right.left = rotater(yys[yypt-2].yyv.node); else yys[yypt-3].yyv.node.left = rotater(yys[yypt-2].yyv.node); yyval.node = mkbin(Oseq, yys[yypt-3].yyv.node, typedecl(yys[yypt-1].yyv.ids, mktype(yys[yypt-1].yyv.ids.src.start, yys[yypt-0].yyv.tok.src.stop, Tpoly, nil, nil))); } } } return yyn; }