Annotation of researchv10dc/cmd/icon/src/tran/parse.c, revision 1.1.1.1

1.1       root        1: # define CSETLIT 257
                      2: # define EOFX 258
                      3: # define IDENT 259
                      4: # define INTLIT 260
                      5: # define REALLIT 261
                      6: # define STRINGLIT 262
                      7: # define BREAK 263
                      8: # define BY 264
                      9: # define CASE 265
                     10: # define CREATE 266
                     11: # define DEFAULT 267
                     12: # define DO 268
                     13: # define DYNAMIC 269
                     14: # define ELSE 270
                     15: # define END 271
                     16: # define EVERY 272
                     17: # define FAIL 273
                     18: # define GLOBAL 274
                     19: # define IF 275
                     20: # define INITIAL 276
                     21: # define LINK 277
                     22: # define LOCAL 278
                     23: # define NEXT 279
                     24: # define NOT 280
                     25: # define OF 281
                     26: # define PROCEDURE 282
                     27: # define RECORD 283
                     28: # define REPEAT 284
                     29: # define RETURN 285
                     30: # define STATIC 286
                     31: # define SUSPEND 287
                     32: # define THEN 288
                     33: # define TO 289
                     34: # define UNTIL 290
                     35: # define WHILE 291
                     36: # define ASSIGN 292
                     37: # define AT 293
                     38: # define AUGACT 294
                     39: # define AUGAND 295
                     40: # define AUGEQ 296
                     41: # define AUGEQV 297
                     42: # define AUGGE 298
                     43: # define AUGGT 299
                     44: # define AUGLE 300
                     45: # define AUGLT 301
                     46: # define AUGNE 302
                     47: # define AUGNEQV 303
                     48: # define AUGSEQ 304
                     49: # define AUGSGE 305
                     50: # define AUGSGT 306
                     51: # define AUGSLE 307
                     52: # define AUGSLT 308
                     53: # define AUGSNE 309
                     54: # define BACKSLASH 310
                     55: # define BANG 311
                     56: # define BAR 312
                     57: # define CARET 313
                     58: # define CARETASGN 314
                     59: # define COLON 315
                     60: # define COMMA 316
                     61: # define CONCAT 317
                     62: # define CONCATASGN 318
                     63: # define CONJUNC 319
                     64: # define DIFF 320
                     65: # define DIFFASGN 321
                     66: # define DOT 322
                     67: # define EQUIV 323
                     68: # define INTER 324
                     69: # define INTERASGN 325
                     70: # define LBRACE 326
                     71: # define LBRACK 327
                     72: # define LCONCAT 328
                     73: # define LCONCATASGN 329
                     74: # define LEXEQ 330
                     75: # define LEXGE 331
                     76: # define LEXGT 332
                     77: # define LEXLE 333
                     78: # define LEXLT 334
                     79: # define LEXNE 335
                     80: # define LPAREN 336
                     81: # define MCOLON 337
                     82: # define MINUS 338
                     83: # define MINUSASGN 339
                     84: # define MOD 340
                     85: # define MODASGN 341
                     86: # define NOTEQUIV 342
                     87: # define NUMEQ 343
                     88: # define NUMGE 344
                     89: # define NUMGT 345
                     90: # define NUMLE 346
                     91: # define NUMLT 347
                     92: # define NUMNE 348
                     93: # define PCOLON 349
                     94: # define PLUS 350
                     95: # define PLUSASGN 351
                     96: # define QMARK 352
                     97: # define RBRACE 353
                     98: # define RBRACK 354
                     99: # define REVASSIGN 355
                    100: # define REVSWAP 356
                    101: # define RPAREN 357
                    102: # define SCANASGN 358
                    103: # define SEMICOL 359
                    104: # define SLASH 360
                    105: # define SLASHASGN 361
                    106: # define STAR 362
                    107: # define STARASGN 363
                    108: # define SWAP 364
                    109: # define TILDE 365
                    110: # define UNION 366
                    111: # define UNIONASGN 367
                    112: 
                    113: # line 123 "icon.g"
                    114: #include "itran.h"
                    115: #include "sym.h"
                    116: #include "tree.h"
                    117: #include "../h/keyword.h"
                    118: #define YYSTYPE nodeptr
                    119: #define YYMAXDEPTH 500
                    120: #define yyclearin yychar = -1
                    121: #define yyerrok yyerrflag = 0
                    122: extern int yychar;
                    123: extern short yyerrflag;
                    124: #ifndef YYMAXDEPTH
                    125: #define YYMAXDEPTH 150
                    126: #endif
                    127: #ifndef YYSTYPE
                    128: #define YYSTYPE int
                    129: #endif
                    130: YYSTYPE yylval, yyval;
                    131: 
                    132: # line 134 "icon.g"
                    133: int argcnt;
                    134: int idflag;
                    135: int i;
                    136: int cstack[50];                        /* context stack expression lists */
                    137: int stacktop = 0;              /* stack top */
                    138: nodeptr cswitch();
                    139: # define YYERRCODE 256
                    140: 
                    141: # line 443 "icon.g"
                    142: 
                    143: 
                    144: pushcs(val)
                    145: int val;
                    146: {
                    147:        stacktop = stacktop + 1;
                    148:        cstack[stacktop] = val;
                    149: }
                    150: 
                    151: popcs()
                    152: {
                    153:        stacktop = stacktop - 1;
                    154: }
                    155: 
                    156: nodeptr cswitch(x,y)
                    157:        nodeptr x, y;
                    158:        {
                    159:        if (cstack[stacktop]) return(CreateNode(y,x));
                    160:        else return(x);
                    161: }
                    162: short yyexca[] ={
                    163: -1, 1,
                    164:        0, -1,
                    165:        -2, 0,
                    166: -1, 21,
                    167:        359, 32,
                    168:        -2, 30,
                    169: -1, 104,
                    170:        359, 32,
                    171:        -2, 30,
                    172: -1, 111,
                    173:        359, 32,
                    174:        -2, 30,
                    175:        };
                    176: # define YYNPROD 204
                    177: # define YYLAST 642
                    178: short yyact[]={
                    179: 
                    180:   32,  89, 170,  60,  86,  87,  88,  62, 207,  94,
                    181:   59, 281, 287, 112, 175, 240,  97,  90, 288,  93,
                    182:  172,  21, 111,  61,  45, 285, 275, 270,  98,  91,
                    183:  177,  92, 169, 249,  96,  95, 284,  44, 112, 277,
                    184:  254, 239, 233, 256, 208, 113, 103, 112, 171, 166,
                    185:  176, 251, 174, 252,  85,  68,  46,  73, 290, 266,
                    186:  167,  47, 112,  66,  69, 258,  67,  81,  74, 243,
                    187:   64,  65,  48, 283,  79, 246, 278, 257, 245,  80,
                    188:   63, 244,  76, 112, 184, 262,  84,  77, 182, 181,
                    189:  207, 242,  78,  25,  70, 289,  83, 250, 183, 110,
                    190:  253, 280, 100, 247,  72, 198,  71, 112, 236,  75,
                    191:   82,  32,  89, 101,  60,  86,  87,  88,  62, 197,
                    192:   94,  59, 112,  26,  20, 112, 112,  97,  90, 112,
                    193:   93,   3, 112, 180,  61,  45, 194,  40,  17,  98,
                    194:   91,  18,  92, 209,  38,  96,  95, 109,  44,  31,
                    195:  179,  37,  28, 178, 106,  39, 107, 210,  16,  35,
                    196:  255, 279, 274, 235, 108,  85,  68,  46,  73, 273,
                    197:   24, 234,  47,  30,  66,  69, 264,  67,  81,  74,
                    198:   99,  64,  65,  48, 102,  79,  12, 196,   2,   9,
                    199:   80,  63,  14,  76,  13,  10, 237,  84,  77, 261,
                    200:  193,  58,  57,  78,  56,  70,  55,  83,  54,  53,
                    201:   52,  51,  50,  49,  43,  72,  41,  71, 173, 168,
                    202:   75,  82,  89, 165,  60,  86,  87,  88,  62, 150,
                    203:   94,  59,  36, 191, 115,   4, 114,  97,  90,  34,
                    204:   93, 105,  23, 104,  61,  45,  27,  11,  19,  98,
                    205:   91,  12,  92,  22,   9,  96,  95, 211,  44,  13,
                    206:   10,  15, 215, 212, 214,   8,   7, 201, 202, 203,
                    207:  204, 205, 206,  42,   6,  85,  68,  46,  73, 222,
                    208:  213,   5,  47,   1,  66,  69,   0,  67,  81,  74,
                    209:    0,  64,  65,  48,   0,  79,   0,   0,   0,   0,
                    210:   80,  63, 224,  76,   0,   0,   0,  84,  77, 223,
                    211:  225, 227,   0,  78,   0,  70, 228,  83, 185, 186,
                    212:  187, 188, 189, 190, 226,  72,   0,  71,   0, 119,
                    213:   75,  82, 121,   0, 118, 117, 135, 136, 137, 138,
                    214:  139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
                    215:    0,   0, 248, 149, 134, 232,   0,   0, 124,  33,
                    216:    0, 126,   0,   0, 163, 131,   0,   0,   0, 125,
                    217:    0, 151, 152, 153, 154, 155, 156, 263, 238, 129,
                    218:    0, 133,   0, 164, 157, 158, 159, 160, 161, 162,
                    219:  291, 128,   0, 241,   0, 123, 122,   0, 116,   0,
                    220:   29, 132,   0, 130, 120,   0,   0, 127,   0,   0,
                    221:    0,   0,   0, 271,   0,   0, 265,   0, 267, 268,
                    222:  269,   0,   0,   0,   0,   0,   0,   0,   0, 272,
                    223:    0, 259, 260,   0,   0,   0,   0,   0,   0,   0,
                    224:  282, 192,   0, 195,   0,   0,   0,   0,   0,   0,
                    225:    0,   0, 286, 229, 230,   0,   0,   0,   0,   0,
                    226:    0,   0, 282, 292, 293,   0,   0,   0,   0,   0,
                    227:  199, 200,   0, 216, 217, 218, 219, 220, 221,   0,
                    228:    0,   0,   0,  29,   0,   0,   0,   0,   0,   0,
                    229:   29,   0,   0,   0,   0,   0,   0,   0,   0,   0,
                    230:    0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
                    231:    0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
                    232:    0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
                    233:    0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
                    234:    0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
                    235:    0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
                    236:  231,   0,   0,   0,   0,   0,   0,   0,   0,   0,
                    237:    0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
                    238:    0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
                    239:    0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
                    240:    0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
                    241:    0,   0,   0,   0,   0,   0,   0,   0,   0, 195,
                    242:    0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
                    243:    0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
                    244:    0, 276 };
                    245: short yypact[]={
                    246: 
                    247: -125,-1000, -23,-1000,-1000,-1000,-1000,-1000,-1000,-121,
                    248: -1000,-235,-1000,-1000, -88,-223,-1000,-1000,-1000,-136,
                    249: -1000,-145,-157,-146,-1000,-121,-290,-122,-172,-337,
                    250: -236,-307,-1000,-1000,  40,-1000,  41,-268,-318,-310,
                    251: -1000,-160,-1000,-238, -35, -35, -35, -35, -35, -35,
                    252: -1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-145,
                    253: -1000,-1000,-145,-1000,-145,-1000,-154,-1000,-1000,-1000,
                    254: -1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,
                    255: -1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,
                    256: -1000,-145,-145,-145,-145,-145,-145,-145,-145,-226,
                    257: -1000,-292,-1000,-157,-145,-157,-145,-1000,-1000,-1000,
                    258: -1000,-145, -35, -35, -35, -35, -35, -35, -35, -35,
                    259: -1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,
                    260: -1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,
                    261: -1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000, -35,
                    262:  -35,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,
                    263: -1000,-1000,-1000,-1000,-1000, -35,-1000,-1000, -35,-1000,
                    264: -1000,-1000,-1000, -35,-1000,-1000,-1000,-1000, -35, -35,
                    265:  -35,-145,-311,-1000,-151,-1000,-1000,-1000,-1000,-1000,
                    266: -1000,-236,-1000,-145,-312,-344,-145,-1000,-1000,-1000,
                    267: -1000,-197,-212,-187,-190,-193,-236,-156,-157,-324,
                    268: -226,-174,-308,-306,-1000,-307,-1000,-1000,-1000,-1000,
                    269: -1000,-1000,-164,-1000,-268,-318,-310,-1000,-1000,-1000,
                    270: -1000,-314,-272,-1000,-145,-145,-1000,-231,-1000,-1000,
                    271: -145,-231,-145,-267,-145,-145,-145,-1000,-330,-1000,
                    272: -1000,-1000,-1000, -35,-1000,-145,-1000,-1000,-1000,-231,
                    273: -231,-331,-145,-1000,-315,-194,-256,-236,-236,-236,
                    274: -1000,-1000,-281,-317,-332,-1000,-1000,-1000,-145,-341,
                    275: -1000,-220,-257,-1000,-1000,-1000,-236,-1000,-256,-145,
                    276: -145,-1000,-236,-236 };
                    277: short yypgo[]={
                    278: 
                    279:    0, 283, 188, 281, 274, 266, 265, 261, 158, 253,
                    280:  157, 248, 143, 247, 246, 243, 152, 242, 241, 173,
                    281:  378, 149, 359, 239, 236, 234, 159, 232, 151, 229,
                    282:  144, 223, 155, 219, 137, 218, 216, 273, 214, 213,
                    283:  212, 211, 210, 209, 208, 206, 204, 202, 201, 200,
                    284:  196, 199, 136, 187, 176, 171, 169, 163, 162, 161,
                    285:  101, 160 };
                    286: short yyr1[]={
                    287: 
                    288:    0,   1,   2,   2,   3,   3,   3,   3,   7,   7,
                    289:    8,   8,   9,   6,  11,   4,   5,  17,  13,  12,
                    290:   12,  10,  10,  14,  14,  18,  18,  18,  15,  15,
                    291:   16,  16,  20,  20,  19,  19,  21,  21,  22,  22,
                    292:   22,  22,  22,  22,  24,  24,  24,  24,  25,  25,
                    293:   25,  25,  25,  25,  25,  25,  25,  25,  25,  25,
                    294:   25,  25,  25,  25,  25,  25,  25,  25,  25,  25,
                    295:   25,  25,  25,  23,  23,  23,  26,  26,  27,  27,
                    296:   29,  29,  29,  29,  29,  29,  29,  29,  29,  29,
                    297:   29,  29,  29,  29,  28,  28,  31,  31,  30,  30,
                    298:   33,  33,  33,  33,  32,  32,  35,  35,  35,  35,
                    299:   34,  34,  36,  36,  36,  37,  37,  37,  37,  37,
                    300:   37,  37,  39,  39,  39,  39,  39,  39,  39,  39,
                    301:   39,  39,  39,  39,  39,  39,  39,  39,  39,  39,
                    302:   39,  38,  38,  38,  38,  38,  38,  38,  38,  38,
                    303:   38,  38,  38,  38,  49,  51,  38,  38,  53,  54,
                    304:   38,  38,  38,  55,  56,  38,  57,  58,  38,  38,
                    305:   38,  38,  45,  45,  46,  46,  47,  47,  48,  42,
                    306:   42,  42,  43,  43,  44,  59,  59,  60,  60,  50,
                    307:   50,  40,  40,  40,  40,  41,  61,  61,  61,  52,
                    308:   52,   1,   5,  19 };
                    309: short yyr2[]={
                    310: 
                    311:    0,   2,   0,   2,   1,   1,   1,   2,   1,   3,
                    312:    1,   1,   0,   3,   0,   6,   6,   0,   6,   0,
                    313:    1,   1,   3,   0,   4,   1,   1,   1,   0,   3,
                    314:    0,   3,   0,   1,   1,   3,   1,   3,   1,   3,
                    315:    3,   3,   3,   3,   1,   1,   1,   1,   1,   1,
                    316:    1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
                    317:    1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
                    318:    1,   1,   1,   1,   3,   5,   1,   3,   1,   3,
                    319:    1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
                    320:    1,   1,   1,   1,   1,   3,   1,   1,   1,   3,
                    321:    1,   1,   1,   1,   1,   3,   1,   1,   1,   1,
                    322:    1,   3,   1,   3,   3,   1,   2,   2,   2,   2,
                    323:    2,   2,   1,   1,   1,   1,   1,   1,   1,   1,
                    324:    1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
                    325:    1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
                    326:    2,   1,   1,   2,   0,   0,   5,   3,   0,   0,
                    327:    5,   4,   3,   0,   0,   6,   0,   0,   6,   3,
                    328:    2,   2,   2,   4,   2,   4,   2,   4,   2,   1,
                    329:    2,   2,   4,   6,   6,   1,   3,   3,   3,   1,
                    330:    3,   1,   1,   1,   1,   6,   1,   1,   1,   1,
                    331:    3,   3,   4,   1 };
                    332: short yychk[]={
                    333: 
                    334: -1000,  -1,  -2, 256, 258,  -3,  -4,  -5,  -6, 277,
                    335:  283, -13, 274, 282,  -2,  -7,  -8, 259, 262, -11,
                    336:  359, 256,  -9, -17, 258, 316, 259, -14, -16, -20,
                    337:  -19, -21, 256, -22, -23, -26, -27, -28, -30, -32,
                    338:  -34, -36, -37, -38, 293, 280, 312, 317, 328, -39,
                    339:  -40, -41, -42, -43, -44, -45, -46, -47, -48, 266,
                    340:  259, 279, 263, 336, 326, 327, 319, 322, 311, 320,
                    341:  350, 362, 360, 313, 324, 365, 338, 343, 348, 330,
                    342:  335, 323, 366, 352, 342, 310, 260, 261, 262, 257,
                    343:  273, 285, 287, 275, 265, 291, 290, 272, 284, -10,
                    344:  259, 259,  -8, 336, -15, -18, 276, 278, 286, 269,
                    345:  271, 359, 319, 352, -24, -25, 358, 295, 294, 289,
                    346:  364, 292, 356, 355, 318, 329, 321, 367, 351, 339,
                    347:  363, 325, 361, 341, 314, 296, 297, 298, 299, 300,
                    348:  301, 302, 303, 304, 305, 306, 307, 308, 309, 312,
                    349:  -29, 330, 331, 332, 333, 334, 335, 343, 344, 345,
                    350:  346, 347, 348, 323, 342, -31, 317, 328, -33, 350,
                    351:  320, 366, 338, -35, 362, 324, 360, 340, 313, 310,
                    352:  293, 327, 326, 336, 322, -37, -37, -37, -37, -37,
                    353:  -37, -19, -20, -49, -52, -20, -53, 273, 259, -20,
                    354:  -20, -19, -19, -19, -19, -19, -19, 316, 336, -12,
                    355:  -10, -16, -10, -19, -16, -21, -22, -22, -22, -22,
                    356:  -22, -22, -26, -26, -28, -30, -32, -34, -34, -37,
                    357:  -37, -20, -19, 353, -55, -57, 259, -50, -20, 353,
                    358:  359, -50, 288, 281, 268, 268, 268, 259, -12, 357,
                    359:  271, 359, 359, 264, 354, -61, 315, 349, 337, -50,
                    360:  -50, -51, 316, -52, -54, -19, 326, -19, -19, -19,
                    361:  357, -26, -19, -56, -58, 357, -20, 354, 270, -59,
                    362:  -60, 267, -19, 354, 353, 357, -19, 353, 359, 315,
                    363:  315, -60, -19, -19 };
                    364: short yydef[]={
                    365: 
                    366:    2,  -2,   0,   2,   1,   3,   4,   5,   6,   0,
                    367:   14,   0,  12,  17,   0,   7,   8,  10,  11,   0,
                    368:   23,  -2,   0,   0, 201,   0,   0,  28,   0,   0,
                    369:   33,  34, 203,  36,  38,  73,  76,  78,  94,  98,
                    370:  104, 110, 112, 115,   0,   0,   0,   0,   0,   0,
                    371:  141, 142, 143, 144, 145, 146, 147, 148, 149,   0,
                    372:  151, 152,  32, 154,  32, 158,   0, 122, 123, 124,
                    373:  125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
                    374:  135, 136, 137, 138, 139, 140, 191, 192, 193, 194,
                    375:  179,  32,  32,   0,   0,   0,   0,   0,   0,  13,
                    376:   21,   0,   9,  19,  -2,   0,   0,  25,  26,  27,
                    377:  202,  -2,   0,   0,   0,   0,   0,   0,   0,   0,
                    378:   44,  45,  46,  47,  48,  49,  50,  51,  52,  53,
                    379:   54,  55,  56,  57,  58,  59,  60,  61,  62,  63,
                    380:   64,  65,  66,  67,  68,  69,  70,  71,  72,   0,
                    381:    0,  80,  81,  82,  83,  84,  85,  86,  87,  88,
                    382:   89,  90,  91,  92,  93,   0,  96,  97,   0, 100,
                    383:  101, 102, 103,   0, 106, 107, 108, 109,   0,   0,
                    384:    0,  32, 163, 166,   0, 116, 117, 118, 119, 120,
                    385:  121, 150, 153,  32,   0, 199,  32, 170, 171, 180,
                    386:  181,   0,   0, 172, 174, 176, 178,   0,  19,   0,
                    387:   20,   0,   0,   0,  31,  35,  37,  39,  40,  41,
                    388:   42,  43,  74,  77,  79,  95,  99, 105, 111, 113,
                    389:  114,   0,  33, 162,  32,  32, 169, 155, 189, 157,
                    390:   32, 159,   0,   0,   0,   0,   0,  22,   0,  15,
                    391:   16,  24,  29,   0, 161,   0, 196, 197, 198, 164,
                    392:  167,   0,  32, 200,   0, 182,   0, 173, 175, 177,
                    393:   18,  75,   0,   0,   0, 156, 190, 160,   0,   0,
                    394:  185,   0,   0, 195, 165, 168, 183, 184,   0,   0,
                    395:    0, 186, 187, 188 };
                    396: #ifndef lint
                    397: static char yaccpar_sccsid[] = "@(#)yaccpar    4.1     (Berkeley)      2/11/83";
                    398: #endif not lint
                    399: 
                    400: #
                    401: # define YYFLAG -1000
                    402: # define YYERROR goto yyerrlab
                    403: # define YYACCEPT return(0)
                    404: # define YYABORT return(1)
                    405: 
                    406: /*     parser for yacc output  */
                    407: 
                    408: #ifdef YYDebug
                    409: int yydebug = 0; /* 1 for debugging */
                    410: #endif
                    411: YYSTYPE yyv[YYMAXDEPTH]; /* where the values are stored */
                    412: int yychar = -1; /* current input token number */
                    413: int yynerrs = 0;  /* number of errors */
                    414: short yyerrflag = 0;  /* error recovery flag */
                    415: 
                    416: yyparse() {
                    417: 
                    418:        short yys[YYMAXDEPTH];
                    419:        short yyj, yym;
                    420:        register YYSTYPE *yypvt;
                    421:        register short yystate, *yyps, yyn;
                    422:        register YYSTYPE *yypv;
                    423:        register short *yyxi;
                    424: 
                    425:        yystate = 0;
                    426:        yychar = -1;
                    427:        yynerrs = 0;
                    428:        yyerrflag = 0;
                    429:        yyps= &yys[-1];
                    430:        yypv= &yyv[-1];
                    431: 
                    432:  yystack:    /* put a state and value onto the stack */
                    433: 
                    434: #ifdef YYDebug
                    435:        if( yydebug  ) printf( "state %d, char 0%o\n", yystate, yychar );
                    436: #endif
                    437:                if( ++yyps> &yys[YYMAXDEPTH] ) { syserr( "yacc stack overflow" ); return(1); }
                    438:                *yyps = yystate;
                    439:                ++yypv;
                    440:                *yypv = yyval;
                    441: 
                    442:  yynewstate:
                    443: 
                    444:        yyn = yypact[yystate];
                    445: 
                    446:        if( yyn<= YYFLAG ) goto yydefault; /* simple state */
                    447: 
                    448:        if( yychar<0 ) if( (yychar=yylex())<0 ) yychar=0;
                    449:        if( (yyn += yychar)<0 || yyn >= YYLAST ) goto yydefault;
                    450: 
                    451:        if( yychk[ yyn=yyact[ yyn ] ] == yychar ){ /* valid shift */
                    452:                yychar = -1;
                    453:                yyval = yylval;
                    454:                yystate = yyn;
                    455:                if( yyerrflag > 0 ) --yyerrflag;
                    456:                goto yystack;
                    457:                }
                    458: 
                    459:  yydefault:
                    460:        /* default state action */
                    461: 
                    462:        if( (yyn=yydef[yystate]) == -2 ) {
                    463:                if( yychar<0 ) if( (yychar=yylex())<0 ) yychar = 0;
                    464:                /* look through exception table */
                    465: 
                    466:                for( yyxi=yyexca; (*yyxi!= (-1)) || (yyxi[1]!=yystate) ; yyxi += 2 ) ; /* VOID */
                    467: 
                    468:                while( *(yyxi+=2) >= 0 ){
                    469:                        if( *yyxi == yychar ) break;
                    470:                        }
                    471:                if( (yyn = yyxi[1]) < 0 ) return(0);   /* accept */
                    472:                }
                    473: 
                    474:        if( yyn == 0 ){ /* error */
                    475:                /* error ... attempt to resume parsing */
                    476: 
                    477:                switch( yyerrflag ){
                    478: 
                    479:                case 0:   /* brand new error */
                    480: 
                    481:                        yyerror( yychar, yylval, yystate );
                    482:                yyerrlab:
                    483:                        ++yynerrs;
                    484: 
                    485:                case 1:
                    486:                case 2: /* incompletely recovered error ... try again */
                    487: 
                    488:                        yyerrflag = 3;
                    489: 
                    490:                        /* find a state where "error" is a legal shift action */
                    491: 
                    492:                        while ( yyps >= yys ) {
                    493:                           yyn = yypact[*yyps] + YYERRCODE;
                    494:                           if( yyn>= 0 && yyn < YYLAST && yychk[yyact[yyn]] == YYERRCODE ){
                    495:                              yystate = yyact[yyn];  /* simulate a shift of "error" */
                    496:                              goto yystack;
                    497:                              }
                    498:                           yyn = yypact[*yyps];
                    499: 
                    500:                           /* the current yyps has no shift onn "error", pop stack */
                    501: 
                    502: #ifdef YYDebug
                    503:                           if( yydebug ) printf( "error recovery pops state %d, uncovers %d\n", *yyps, yyps[-1] );
                    504: #endif
                    505:                           --yyps;
                    506:                           --yypv;
                    507:                           }
                    508: 
                    509:                        /* there is no state on the stack with an error shift ... abort */
                    510: 
                    511:        yyabort:
                    512:                        return(1);
                    513: 
                    514: 
                    515:                case 3:  /* no shift yet; clobber input char */
                    516: 
                    517: #ifdef YYDebug
                    518:                        if( yydebug ) printf( "error recovery discards char %d\n", yychar );
                    519: #endif
                    520: 
                    521:                        if( yychar == 0 ) goto yyabort; /* don't discard EOF, quit */
                    522:                        yychar = -1;
                    523:                        goto yynewstate;   /* try again in the same state */
                    524: 
                    525:                        }
                    526: 
                    527:                }
                    528: 
                    529:        /* reduction by production yyn */
                    530: 
                    531: #ifdef YYDebug
                    532:                if( yydebug ) printf("reduce %d\n",yyn);
                    533: #endif
                    534:                yyps -= yyr2[yyn];
                    535:                yypvt = yypv;
                    536:                yypv -= yyr2[yyn];
                    537:                yyval = yypv[1];
                    538:                yym=yyn;
                    539:                        /* consult goto table to find next state */
                    540:                yyn = yyr1[yyn];
                    541:                yyj = yypgo[yyn] + *yyps + 1;
                    542:                if( yyj>=YYLAST || yychk[ yystate = yyact[yyj] ] != -yyn ) yystate = yyact[yypgo[yyn]];
                    543:                switch(yym){
                    544:                        
                    545: case 1:
                    546: # line 142 "icon.g"
                    547: {gout(globfile);} break;
                    548: case 4:
                    549: # line 147 "icon.g"
                    550: {
                    551:                if (!nocode)
                    552:                        rout(globfile, Str0(yypvt[-0]));
                    553:                nocode = 0;
                    554:                loc_init();
                    555:                } break;
                    556: case 5:
                    557: # line 153 "icon.g"
                    558: {
                    559:                if (!nocode)
                    560:                        codegen(yypvt[-0]);
                    561:                nocode = 0;
                    562:                treeinit();
                    563:                loc_init();
                    564:                } break;
                    565: case 10:
                    566: # line 166 "icon.g"
                    567: {addlfile(Str0(yypvt[-0]));} break;
                    568: case 11:
                    569: # line 167 "icon.g"
                    570: {addlfile(Str0(yypvt[-0]));} break;
                    571: case 12:
                    572: # line 169 "icon.g"
                    573: {idflag = F_Global;} break;
                    574: case 14:
                    575: # line 171 "icon.g"
                    576: {idflag = F_Argument;} break;
                    577: case 15:
                    578: # line 171 "icon.g"
                    579: {
                    580:                install(Str0(yypvt[-3]),F_Record|F_Global,(int)yypvt[-1]);
                    581:                yyval = yypvt[-3];
                    582:                } break;
                    583: case 16:
                    584: # line 176 "icon.g"
                    585: {
                    586:                yyval = (nodeptr)ProcNode(yypvt[-5],yypvt[-2],yypvt[-1],yypvt[-0]);
                    587:                } break;
                    588: case 17:
                    589: # line 180 "icon.g"
                    590: {idflag = F_Argument;} break;
                    591: case 18:
                    592: # line 180 "icon.g"
                    593: {
                    594:                yyval = yypvt[-3];
                    595:                install(Str0(yypvt[-3]),F_Proc|F_Global,(int)yypvt[-1]);
                    596:                } break;
                    597: case 19:
                    598: # line 185 "icon.g"
                    599: {yyval = (int)0;} break;
                    600: case 20:
                    601: # line 186 "icon.g"
                    602: {yyval = (nodeptr)yypvt[-0];} break;
                    603: case 21:
                    604: # line 189 "icon.g"
                    605: {
                    606:                install(Str0(yypvt[-0]),idflag,0);
                    607:                yyval = (nodeptr)1;
                    608:                } break;
                    609: case 22:
                    610: # line 193 "icon.g"
                    611: {
                    612:                install(Str0(yypvt[-0]),idflag,0);
                    613:                yyval = (nodeptr)((int)yypvt[-2] + 1);
                    614:                } break;
                    615: case 25:
                    616: # line 201 "icon.g"
                    617: {idflag = F_Dynamic;} break;
                    618: case 26:
                    619: # line 202 "icon.g"
                    620: {idflag = F_Static;} break;
                    621: case 27:
                    622: # line 203 "icon.g"
                    623: {idflag = F_Dynamic;} break;
                    624: case 28:
                    625: # line 205 "icon.g"
                    626: {yyval = EmptyNode;} break;
                    627: case 29:
                    628: # line 206 "icon.g"
                    629: {yyval = yypvt[-1];} break;
                    630: case 30:
                    631: # line 208 "icon.g"
                    632: {yyval = EmptyNode;} break;
                    633: case 31:
                    634: # line 209 "icon.g"
                    635: {yyval = SListNode(yypvt[-1], yypvt[-2], yypvt[-0]);} break;
                    636: case 32:
                    637: # line 211 "icon.g"
                    638: {yyval = EmptyNode;} break;
                    639: case 35:
                    640: # line 215 "icon.g"
                    641: {yyval = ConjNode(yypvt[-1],yypvt[-2],yypvt[-0]);} break;
                    642: case 37:
                    643: # line 218 "icon.g"
                    644: {yyval = ScanNode(yypvt[-1],yypvt[-2],yypvt[-0]);} break;
                    645: case 39:
                    646: # line 221 "icon.g"
                    647: {binop: yyval = BinopNode(yypvt[-1],yypvt[-2],yypvt[-0]);} break;
                    648: case 40:
                    649: # line 222 "icon.g"
                    650: {yyval = AugopNode(yypvt[-1],yypvt[-2],yypvt[-0]);} break;
                    651: case 41:
                    652: # line 223 "icon.g"
                    653: {yyval = ScanNode(yypvt[-1],yypvt[-2],yypvt[-0]);} break;
                    654: case 42:
                    655: # line 224 "icon.g"
                    656: {yyval = ConjNode(yypvt[-1],yypvt[-2],yypvt[-0]);} break;
                    657: case 43:
                    658: # line 225 "icon.g"
                    659: {yyval = ActivNode(yypvt[-1],yypvt[-0],yypvt[-2]);} break;
                    660: case 74:
                    661: # line 259 "icon.g"
                    662: {yyval = ToNode(yypvt[-1],yypvt[-2],yypvt[-0]);} break;
                    663: case 75:
                    664: # line 260 "icon.g"
                    665: {yyval = ToByNode(yypvt[-3],yypvt[-4],yypvt[-2],yypvt[-0]);} break;
                    666: case 77:
                    667: # line 263 "icon.g"
                    668: {yyval = AltNode(yypvt[-1],yypvt[-2],yypvt[-0]);} break;
                    669: case 79:
                    670: # line 266 "icon.g"
                    671: {goto binop;} break;
                    672: case 95:
                    673: # line 284 "icon.g"
                    674: {goto binop;} break;
                    675: case 99:
                    676: # line 290 "icon.g"
                    677: {goto binop;} break;
                    678: case 105:
                    679: # line 298 "icon.g"
                    680: {goto binop;} break;
                    681: case 111:
                    682: # line 306 "icon.g"
                    683: {goto binop;} break;
                    684: case 113:
                    685: # line 309 "icon.g"
                    686: {yyval = LimitNode(yypvt[-2],yypvt[-0]);} break;
                    687: case 114:
                    688: # line 310 "icon.g"
                    689: {yyval = ActivNode(yypvt[-1], yypvt[-0], yypvt[-2]);} break;
                    690: case 116:
                    691: # line 313 "icon.g"
                    692: {yyval = ActivNode(yypvt[-1], yypvt[-0], EmptyNode);} break;
                    693: case 117:
                    694: # line 314 "icon.g"
                    695: {yyval = NotNode(yypvt[-0]);} break;
                    696: case 118:
                    697: # line 315 "icon.g"
                    698: {yyval = BarNode(yypvt[-0]);} break;
                    699: case 119:
                    700: # line 316 "icon.g"
                    701: {yyval = BarNode(yypvt[-0]);} break;
                    702: case 120:
                    703: # line 317 "icon.g"
                    704: {yyval = BarNode(yypvt[-0]);} break;
                    705: case 121:
                    706: # line 318 "icon.g"
                    707: {yyval = UnopNode(yypvt[-1],yypvt[-0]);} break;
                    708: case 150:
                    709: # line 349 "icon.g"
                    710: {yyval = CreateNode(yypvt[-1],yypvt[-0]);} break;
                    711: case 151:
                    712: # line 350 "icon.g"
                    713: {Val0(yypvt[-0]) = putloc(Str0(yypvt[-0]),0);} break;
                    714: case 152:
                    715: # line 351 "icon.g"
                    716: {yyval = NextNode(yypvt[-0]);} break;
                    717: case 153:
                    718: # line 352 "icon.g"
                    719: {yyval = BreakNode(yypvt[-1],yypvt[-0]);} break;
                    720: case 154:
                    721: # line 353 "icon.g"
                    722: {
                    723:                pushcs(0);
                    724:                } break;
                    725: case 155:
                    726: # line 355 "icon.g"
                    727: {
                    728:                popcs();
                    729:                } break;
                    730: case 156:
                    731: # line 357 "icon.g"
                    732: {
                    733:                        if ((yypvt[-2])->n_type == N_Elist)
                    734:                        yyval = InvokNode(yypvt[-4],EmptyNode,yypvt[-2]);
                    735:                        else
                    736:                        yyval = yypvt[-2]; } break;
                    737: case 157:
                    738: # line 362 "icon.g"
                    739: {yyval = yypvt[-1];} break;
                    740: case 158:
                    741: # line 363 "icon.g"
                    742: {
                    743:                pushcs(0);
                    744:                } break;
                    745: case 159:
                    746: # line 365 "icon.g"
                    747: {
                    748:                popcs();
                    749:                } break;
                    750: case 160:
                    751: # line 367 "icon.g"
                    752: {
                    753:                yyval = ListNode(yypvt[-4],yypvt[-2]);} break;
                    754: case 161:
                    755: # line 369 "icon.g"
                    756: {yyval = BinopNode(yypvt[-2],yypvt[-3],yypvt[-1]);} break;
                    757: case 162:
                    758: # line 370 "icon.g"
                    759: {yyval = InvokNode(yypvt[-1],yypvt[-2],ListNode(yypvt[-1],EmptyNode));} break;
                    760: case 163:
                    761: # line 371 "icon.g"
                    762: {
                    763:                pushcs(1);
                    764:                } break;
                    765: case 164:
                    766: # line 373 "icon.g"
                    767: {
                    768:                popcs();
                    769:                } break;
                    770: case 165:
                    771: # line 375 "icon.g"
                    772: {
                    773:                yyval = InvokNode(yypvt[-4],yypvt[-5],ListNode(yypvt[-4],yypvt[-2]));
                    774:                } break;
                    775: case 166:
                    776: # line 378 "icon.g"
                    777: {
                    778:                pushcs(0);
                    779:                } break;
                    780: case 167:
                    781: # line 380 "icon.g"
                    782: {
                    783:                popcs();
                    784:                } break;
                    785: case 168:
                    786: # line 382 "icon.g"
                    787: {
                    788:                yyval = InvokNode(yypvt[-4],yypvt[-5],yypvt[-2]);
                    789:                } break;
                    790: case 169:
                    791: # line 385 "icon.g"
                    792: {yyval = FieldNode(yypvt[-1],yypvt[-2],yypvt[-0]);} break;
                    793: case 170:
                    794: # line 386 "icon.g"
                    795: {yyval = KeyNode(yypvt[-1], K_FAIL);} break;
                    796: case 171:
                    797: # line 387 "icon.g"
                    798: {
                    799:                if ((i = klocate(Str0(yypvt[-0]))) == NULL)
                    800:                        err("invalid keyword",Str0(yypvt[-0]));
                    801:                yyval = KeyNode(yypvt[-1], i);
                    802:                } break;
                    803: case 172:
                    804: # line 393 "icon.g"
                    805: {yyval = LoopNode(yypvt[-1],yypvt[-0],EmptyNode);} break;
                    806: case 173:
                    807: # line 394 "icon.g"
                    808: {yyval = LoopNode(yypvt[-3],yypvt[-2],yypvt[-0]);} break;
                    809: case 174:
                    810: # line 396 "icon.g"
                    811: {yyval = LoopNode(yypvt[-1],yypvt[-0],EmptyNode);} break;
                    812: case 175:
                    813: # line 397 "icon.g"
                    814: {yyval = LoopNode(yypvt[-3],yypvt[-2],yypvt[-0]);} break;
                    815: case 176:
                    816: # line 399 "icon.g"
                    817: {yyval = LoopNode(yypvt[-1],yypvt[-0],EmptyNode);} break;
                    818: case 177:
                    819: # line 400 "icon.g"
                    820: {yyval = LoopNode(yypvt[-3],yypvt[-2],yypvt[-0]);} break;
                    821: case 178:
                    822: # line 402 "icon.g"
                    823: {yyval = LoopNode(yypvt[-1],yypvt[-0],EmptyNode);} break;
                    824: case 179:
                    825: # line 404 "icon.g"
                    826: {yyval = RetNode(yypvt[-0],EmptyNode);} break;
                    827: case 180:
                    828: # line 405 "icon.g"
                    829: {yyval = RetNode(yypvt[-1],yypvt[-0]);} break;
                    830: case 181:
                    831: # line 406 "icon.g"
                    832: {yyval = SuspNode(yypvt[-1],yypvt[-0]);} break;
                    833: case 182:
                    834: # line 408 "icon.g"
                    835: {yyval = IfNode(yypvt[-3],yypvt[-2],yypvt[-0],EmptyNode);} break;
                    836: case 183:
                    837: # line 409 "icon.g"
                    838: {yyval = IfNode(yypvt[-5],yypvt[-4],yypvt[-2],yypvt[-0]);} break;
                    839: case 184:
                    840: # line 411 "icon.g"
                    841: {yyval = CaseNode(yypvt[-5],yypvt[-4],yypvt[-1]);} break;
                    842: case 186:
                    843: # line 414 "icon.g"
                    844: {yyval = ClistNode(yypvt[-1],yypvt[-2],yypvt[-0]);} break;
                    845: case 187:
                    846: # line 416 "icon.g"
                    847: {yyval = CclsNode(yypvt[-1],yypvt[-2],yypvt[-0]);} break;
                    848: case 188:
                    849: # line 417 "icon.g"
                    850: {yyval = CclsNode(yypvt[-1],yypvt[-2],yypvt[-0]);} break;
                    851: case 189:
                    852: # line 419 "icon.g"
                    853: {
                    854:                yyval = cswitch(yypvt[-0],yypvt[-0]);
                    855:                } break;
                    856: case 190:
                    857: # line 422 "icon.g"
                    858: {
                    859:                yyval = ElistNode(yypvt[-1],yypvt[-2],cswitch(yypvt[-0],yypvt[-1]));
                    860:                } break;
                    861: case 191:
                    862: # line 426 "icon.g"
                    863: {Val0(yypvt[-0]) = putlit(Str0(yypvt[-0]),F_IntLit,0);} break;
                    864: case 192:
                    865: # line 427 "icon.g"
                    866: {Val0(yypvt[-0]) = putlit(Str0(yypvt[-0]),F_RealLit,0);} break;
                    867: case 193:
                    868: # line 428 "icon.g"
                    869: {Val0(yypvt[-0]) = putlit(Str0(yypvt[-0]),F_StrLit,Val1(yypvt[-0]));} break;
                    870: case 194:
                    871: # line 429 "icon.g"
                    872: {Val0(yypvt[-0]) = putlit(Str0(yypvt[-0]),F_CsetLit,Val1(yypvt[-0]));} break;
                    873: case 195:
                    874: # line 431 "icon.g"
                    875: {yyval = (nodeptr)SectNode(yypvt[-2],yypvt[-5],yypvt[-3],yypvt[-1]);} break;
                    876: case 200:
                    877: # line 438 "icon.g"
                    878: {yyval = SListNode(yypvt[-1], yypvt[-2], yypvt[-0]);} break;
                    879:                }
                    880:                goto yystack;  /* stack new state and value */
                    881: 
                    882:        }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.