# define SEOS 1 # define SCOMMENT 2 # define SLABEL 3 # define SUNKNOWN 4 # define SHOLLERITH 5 # define SICON 6 # define SRCON 7 # define SDCON 8 # define SBITCON 9 # define SOCTCON 10 # define SHEXCON 11 # define STRUE 12 # define SFALSE 13 # define SNAME 14 # define SNAMEEQ 15 # define SFIELD 16 # define SSCALE 17 # define SINCLUDE 18 # define SLET 19 # define SASSIGN 20 # define SAUTOMATIC 21 # define SBACKSPACE 22 # define SBLOCK 23 # define SCALL 24 # define SCHARACTER 25 # define SCLOSE 26 # define SCOMMON 27 # define SCOMPLEX 28 # define SCONTINUE 29 # define SDATA 30 # define SDCOMPLEX 31 # define SDIMENSION 32 # define SDO 33 # define SDOUBLE 34 # define SELSE 35 # define SELSEIF 36 # define SEND 37 # define SENDFILE 38 # define SENDIF 39 # define SENTRY 40 # define SEQUIV 41 # define SEXTERNAL 42 # define SFORMAT 43 # define SFUNCTION 44 # define SGOTO 45 # define SASGOTO 46 # define SCOMPGOTO 47 # define SARITHIF 48 # define SLOGIF 49 # define SIMPLICIT 50 # define SINQUIRE 51 # define SINTEGER 52 # define SINTRINSIC 53 # define SLOGICAL 54 # define SNAMELIST 55 # define SOPEN 56 # define SPARAM 57 # define SPAUSE 58 # define SPRINT 59 # define SPROGRAM 60 # define SPUNCH 61 # define SREAD 62 # define SREAL 63 # define SRETURN 64 # define SREWIND 65 # define SSAVE 66 # define SSTATIC 67 # define SSTOP 68 # define SSUBROUTINE 69 # define STHEN 70 # define STO 71 # define SUNDEFINED 72 # define SWRITE 73 # define SLPAR 74 # define SRPAR 75 # define SEQUALS 76 # define SCOLON 77 # define SCOMMA 78 # define SCURRENCY 79 # define SPLUS 80 # define SMINUS 81 # define SSTAR 82 # define SSLASH 83 # define SPOWER 84 # define SCONCAT 85 # define SAND 86 # define SOR 87 # define SNEQV 88 # define SEQV 89 # define SNOT 90 # define SEQ 91 # define SLT 92 # define SGT 93 # define SLE 94 # define SGE 95 # define SNE 96 # define SENDDO 97 # define SWHILE 98 # define SSLASHD 99 /* # line 124 "gram.in" */ # include "defs.h" # include "p1defs.h" static int nstars; /* Number of labels in an alternate return CALL */ static int ndim; static int vartype; int new_dcl; static ftnint varleng; static struct { expptr lb, ub; } dims[MAXDIM+1]; static struct Labelblock *labarray[MAXLABLIST]; /* Labels in an alternate return CALL */ /* The next two variables are used to verify that each statement might be reached during runtime. lastwasbranch is tested only in the defintion of the stat: nonterminal. */ int lastwasbranch = NO; static int thiswasbranch = NO; extern ftnint yystno; extern flag intonly; static chainp datastack; extern long laststfcn, thisstno; extern int can_include; /* for netlib */ ftnint convci(); Addrp nextdata(); expptr mklogcon(), mkaddcon(), mkrealcon(), mkstrcon(), mkbitcon(); expptr mkcxcon(); struct Listblock *mklist(); struct Listblock *mklist(); struct Impldoblock *mkiodo(); Extsym *comblock(); #define ESNULL (Extsym *)0 #define NPNULL (Namep)0 #define LBNULL (struct Listblock *)0 extern void freetemps(), make_param(); static void pop_datastack() { chainp d0 = datastack; if (d0->datap) curdtp = (chainp)d0->datap; datastack = d0->nextp; d0->nextp = 0; frchain(&d0); } /* # line 176 "gram.in" */ typedef union { int ival; ftnint lval; char *charpval; chainp chval; tagptr tagval; expptr expval; struct Labelblock *labval; struct Nameblock *namval; struct Eqvchain *eqvval; Extsym *extval; } YYSTYPE; #define yyclearin yychar = -1 #define yyerrok yyerrflag = 0 extern int yychar; extern int yyerrflag; #ifndef YYMAXDEPTH #define YYMAXDEPTH 150 #endif YYSTYPE yylval, yyval; typedef int yytabelem; # define YYERRCODE 256 yytabelem yyexca[] ={ -1, 1, 0, -1, -2, 0, -1, 20, 1, 38, -2, 228, -1, 24, 1, 42, -2, 228, -1, 122, 6, 240, -2, 228, -1, 150, 1, 244, -2, 188, -1, 174, 1, 265, 78, 265, -2, 188, -1, 223, 77, 173, -2, 139, -1, 245, 74, 228, -2, 225, -1, 271, 1, 286, -2, 143, -1, 275, 1, 295, 78, 295, -2, 145, -1, 328, 77, 174, -2, 141, -1, 358, 1, 267, 14, 267, 74, 267, 78, 267, -2, 189, -1, 436, 91, 0, 92, 0, 93, 0, 94, 0, 95, 0, 96, 0, -2, 153, -1, 453, 1, 289, 78, 289, -2, 143, -1, 455, 1, 291, 78, 291, -2, 143, -1, 457, 1, 293, 78, 293, -2, 143, -1, 459, 1, 296, 78, 296, -2, 144, -1, 504, 78, 289, -2, 143, }; # define YYNPROD 301 # define YYLAST 1346 yytabelem yyact[]={ 237, 274, 471, 317, 316, 412, 420, 297, 470, 399, 413, 397, 386, 357, 398, 266, 128, 356, 273, 252, 292, 5, 116, 295, 326, 303, 222, 99, 184, 121, 195, 229, 17, 203, 270, 304, 313, 199, 201, 118, 94, 202, 396, 104, 210, 183, 236, 101, 106, 234, 264, 103, 111, 336, 260, 95, 96, 97, 165, 166, 334, 335, 336, 395, 105, 311, 309, 190, 130, 131, 132, 133, 120, 135, 119, 114, 157, 129, 157, 475, 103, 272, 334, 335, 336, 396, 521, 103, 278, 483, 535, 165, 166, 334, 335, 336, 342, 341, 340, 339, 338, 137, 343, 345, 344, 347, 346, 348, 450, 258, 259, 260, 539, 165, 166, 258, 259, 260, 261, 525, 102, 522, 155, 409, 155, 186, 187, 103, 408, 117, 165, 166, 258, 259, 260, 318, 100, 527, 484, 188, 446, 185, 480, 230, 240, 240, 194, 193, 290, 120, 211, 119, 462, 481, 157, 294, 482, 257, 157, 243, 468, 214, 463, 469, 461, 464, 460, 239, 241, 220, 215, 218, 157, 219, 213, 165, 166, 334, 335, 336, 342, 341, 340, 157, 371, 452, 343, 345, 344, 347, 346, 348, 443, 428, 377, 294, 102, 102, 102, 102, 155, 189, 447, 149, 155, 446, 192, 103, 98, 196, 197, 198, 277, 376, 320, 321, 206, 288, 155, 289, 300, 375, 299, 324, 315, 328, 275, 275, 330, 155, 310, 333, 196, 216, 217, 350, 269, 207, 308, 352, 353, 333, 100, 177, 354, 349, 323, 112, 245, 257, 247, 110, 157, 417, 286, 287, 418, 362, 157, 157, 157, 157, 157, 257, 257, 109, 108, 268, 279, 280, 281, 265, 107, 355, 4, 333, 427, 465, 378, 370, 170, 172, 176, 257, 165, 166, 258, 259, 260, 261, 102, 406, 232, 293, 407, 381, 422, 390, 155, 400, 391, 223, 419, 422, 155, 155, 155, 155, 155, 117, 221, 314, 392, 319, 387, 359, 372, 196, 360, 373, 374, 333, 333, 536, 350, 333, 275, 250, 424, 333, 405, 333, 410, 532, 230, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 403, 331, 156, 401, 332, 531, 333, 530, 333, 333, 333, 388, 526, 380, 529, 524, 157, 257, 333, 431, 492, 257, 257, 257, 257, 257, 382, 383, 235, 426, 384, 358, 494, 296, 333, 448, 165, 166, 258, 259, 260, 261, 451, 165, 166, 258, 259, 260, 261, 103, 445, 472, 400, 421, 191, 402, 196, 103, 150, 307, 174, 285, 155, 474, 246, 476, 416, 467, 466, 242, 226, 223, 200, 212, 136, 209, 486, 171, 488, 490, 275, 275, 275, 141, 240, 496, 429, 329, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 403, 497, 479, 401, 403, 487, 154, 257, 154, 495, 493, 306, 485, 502, 454, 456, 458, 500, 491, 268, 499, 505, 506, 507, 103, 451, 271, 271, 472, 30, 333, 414, 501, 400, 508, 511, 509, 387, 244, 208, 510, 516, 514, 515, 333, 517, 333, 513, 333, 520, 293, 518, 225, 240, 333, 402, 523, 92, 248, 402, 528, 6, 262, 123, 249, 81, 80, 275, 275, 275, 79, 534, 533, 479, 78, 173, 263, 314, 77, 403, 76, 537, 401, 351, 154, 75, 333, 282, 154, 60, 49, 48, 333, 45, 33, 333, 538, 113, 205, 454, 456, 458, 154, 267, 165, 166, 334, 335, 336, 342, 540, 503, 411, 154, 204, 394, 393, 298, 478, 503, 503, 503, 134, 389, 312, 115, 379, 26, 25, 24, 23, 302, 22, 305, 402, 21, 385, 284, 9, 503, 8, 7, 2, 519, 301, 20, 319, 164, 51, 489, 291, 228, 327, 325, 415, 91, 361, 255, 53, 337, 19, 55, 365, 366, 367, 368, 369, 37, 224, 3, 1, 0, 351, 0, 0, 0, 0, 0, 0, 0, 0, 0, 154, 0, 0, 0, 0, 0, 154, 154, 154, 154, 154, 0, 0, 0, 267, 0, 512, 267, 267, 165, 166, 334, 335, 336, 342, 341, 340, 339, 338, 0, 343, 345, 344, 347, 346, 348, 165, 166, 334, 335, 336, 342, 341, 453, 455, 457, 0, 343, 345, 344, 347, 346, 348, 0, 0, 305, 0, 459, 0, 0, 0, 0, 165, 166, 334, 335, 336, 342, 341, 340, 339, 338, 351, 343, 345, 344, 347, 346, 348, 444, 0, 0, 0, 449, 165, 166, 334, 335, 336, 342, 341, 340, 339, 338, 0, 343, 345, 344, 347, 346, 348, 165, 166, 334, 335, 336, 342, 0, 0, 154, 0, 498, 343, 345, 344, 347, 346, 348, 0, 0, 267, 0, 0, 0, 0, 0, 442, 0, 504, 455, 457, 165, 166, 334, 335, 336, 342, 341, 340, 339, 338, 0, 343, 345, 344, 347, 346, 348, 0, 0, 0, 0, 0, 0, 430, 0, 477, 0, 305, 165, 166, 334, 335, 336, 342, 341, 340, 339, 338, 0, 343, 345, 344, 347, 346, 348, 423, 0, 0, 0, 0, 165, 166, 334, 335, 336, 342, 341, 340, 339, 338, 0, 343, 345, 344, 347, 346, 348, 0, 0, 0, 267, 0, 0, 0, 0, 165, 166, 334, 335, 336, 342, 341, 340, 339, 338, 12, 343, 345, 344, 347, 346, 348, 0, 0, 0, 0, 0, 0, 305, 10, 56, 46, 73, 85, 14, 61, 70, 90, 38, 66, 47, 42, 68, 72, 31, 67, 35, 34, 11, 87, 36, 18, 41, 39, 28, 16, 57, 58, 59, 50, 54, 43, 88, 64, 40, 69, 44, 89, 29, 62, 84, 13, 0, 82, 65, 52, 86, 27, 74, 63, 15, 0, 0, 71, 83, 160, 161, 162, 163, 169, 168, 167, 158, 159, 103, 0, 160, 161, 162, 163, 169, 168, 167, 158, 159, 103, 0, 0, 32, 160, 161, 162, 163, 169, 168, 167, 158, 159, 103, 0, 160, 161, 162, 163, 169, 168, 167, 158, 159, 103, 0, 160, 161, 162, 163, 169, 168, 167, 158, 159, 103, 0, 160, 161, 162, 163, 169, 168, 167, 158, 159, 103, 0, 0, 233, 0, 0, 0, 0, 0, 165, 166, 363, 0, 364, 233, 227, 0, 0, 0, 238, 165, 166, 231, 0, 0, 0, 0, 233, 0, 0, 238, 0, 0, 165, 166, 473, 0, 0, 233, 0, 0, 0, 0, 238, 165, 166, 231, 0, 0, 233, 0, 0, 0, 0, 238, 165, 166, 425, 0, 0, 233, 0, 0, 0, 0, 238, 165, 166, 0, 0, 0, 0, 0, 0, 0, 0, 238, 160, 161, 162, 163, 169, 168, 167, 158, 159, 103, 0, 160, 161, 162, 163, 169, 168, 167, 158, 159, 103, 160, 161, 162, 163, 169, 168, 167, 158, 159, 103, 0, 0, 0, 160, 161, 162, 163, 169, 168, 167, 158, 159, 103, 256, 0, 93, 160, 161, 162, 163, 169, 168, 167, 158, 159, 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 276, 0, 0, 0, 0, 0, 165, 166, 0, 122, 0, 322, 125, 126, 127, 0, 238, 165, 166, 0, 0, 0, 0, 0, 138, 139, 0, 238, 140, 0, 142, 143, 144, 0, 251, 145, 146, 147, 0, 148, 165, 166, 253, 0, 254, 0, 0, 153, 0, 0, 0, 0, 0, 165, 166, 151, 0, 152, 178, 179, 180, 181, 182, 160, 161, 162, 163, 169, 168, 167, 158, 159, 103, 160, 161, 162, 163, 169, 168, 167, 158, 159, 103, 160, 161, 162, 163, 169, 168, 167, 158, 159, 103, 160, 161, 162, 163, 169, 168, 167, 158, 159, 103, 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, 251, 0, 0, 0, 0, 0, 165, 166, 283, 0, 153, 0, 0, 0, 0, 0, 165, 166, 175, 0, 404, 0, 0, 0, 0, 0, 165, 166, 56, 46, 251, 85, 0, 61, 0, 90, 165, 166, 47, 73, 0, 0, 0, 70, 0, 0, 66, 87, 0, 68, 72, 0, 67, 0, 57, 58, 59, 50, 0, 0, 88, 0, 0, 0, 0, 89, 0, 62, 84, 0, 64, 82, 69, 52, 86, 0, 0, 63, 0, 124, 0, 65, 83, 0, 0, 74, 0, 0, 0, 0, 71 }; yytabelem yypact[]={ -1000, 18, 503, 837, -1000, -1000, -1000, -1000, -1000, -1000, 495, -1000, -1000, -1000, -1000, -1000, -1000, 164, 453, -35, 194, 188, 187, 173, 58, 169, -8, 66, -1000, -1000, -1000, -1000, -1000, 1264, -1000, -1000, -1000, -5, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 453, -1000, -1000, -1000, -1000, -1000, 354, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 1096, 348, 1191, 348, 165, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 453, 453, 453, 453, -1000, 453, -1000, 325, -1000, -1000, 453, -1000, -11, 453, 453, 453, 343, -1000, -1000, -1000, 453, 159, -1000, -1000, -1000, -1000, 468, 346, 58, -1000, -1000, 344, -1000, -1000, -1000, -1000, 66, 453, 453, 343, -1000, -1000, 234, 342, 489, -1000, 341, 917, 963, 963, 340, 475, 453, 335, 453, -1000, -1000, -1000, -1000, 1083, -1000, -1000, 308, 1211, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 1083, 193, 158, -1000, -1000, 1049, 1049, -1000, -1000, -1000, -1000, 1181, 332, -1000, -1000, 325, 325, 453, -1000, -1000, 73, 304, -1000, 58, -1000, 304, -1000, -1000, -1000, 453, -1000, 380, -1000, 330, 1273, -17, 66, -18, 453, 475, 37, 963, 1060, -1000, 453, -1000, -1000, -1000, -1000, -1000, 963, -1000, 963, 361, -1000, 963, -1000, 271, -1000, 751, 475, -1000, 963, -1000, -1000, -1000, 963, 963, -1000, 751, -1000, 963, -1000, -1000, 58, 475, -1000, 301, 240, -1000, 1211, -1000, -1000, -1000, 906, -1000, 1211, 1211, 1211, 1211, 1211, -30, 204, 106, 388, -1000, -1000, 388, 388, -1000, 143, 135, 116, 751, -1000, 1049, -1000, -1000, -1000, -1000, -1000, 308, -1000, -1000, 300, -1000, -1000, 325, -1000, -1000, 222, -1000, -1000, -1000, -5, -1000, -36, 1201, 453, -1000, 216, -1000, 45, -1000, -1000, 380, 460, -1000, 453, -1000, -1000, 178, -1000, 226, -1000, -1000, -1000, 324, 220, 726, 751, 952, -1000, 751, 299, 199, 115, 751, 453, 704, -1000, 941, 963, 963, 963, 963, 963, 963, 963, 963, 963, 963, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 676, 114, -31, 646, 629, 321, 127, -1000, -1000, -1000, 1083, 33, 751, -1000, -1000, 27, -30, -30, -30, 50, -1000, 388, 106, 107, 106, 1049, 1049, 1049, 607, 88, 86, 74, -1000, -1000, -1000, 87, -1000, 201, -1000, 304, -1000, 113, -1000, 85, 930, -1000, 1201, -1000, -1000, -3, 1070, -1000, -1000, -1000, 963, -1000, -1000, 453, -1000, 380, 64, 78, -1000, 8, -1000, 60, -1000, -1000, 453, 963, 58, 963, 963, 391, -1000, 290, 303, 963, 963, -1000, 475, -1000, 0, -31, -31, -31, 467, 95, 95, 581, 646, -22, -1000, 963, -1000, 475, 475, 58, -1000, 308, -1000, -1000, 388, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 1049, 1049, 1049, -1000, 466, 465, -5, -1000, -1000, 930, -1000, -1000, 564, -1000, -1000, 1201, -1000, -1000, -1000, -1000, 380, -1000, 460, 460, 453, -1000, 751, 37, 11, 43, 751, -1000, -1000, -1000, 963, 285, 751, 41, 282, 62, -1000, 963, 284, 227, 282, 277, 275, 258, -1000, -1000, -1000, -1000, 930, -1000, -1000, 7, 248, -1000, -1000, -1000, -1000, -1000, 963, -1000, -1000, 475, -1000, -1000, 751, -1000, -1000, -1000, -1000, -1000, 751, -1000, -1000, 751, 34, 475, -1000 }; yytabelem yypgo[]={ 0, 613, 612, 13, 611, 81, 15, 32, 610, 604, 603, 10, 0, 602, 601, 600, 16, 598, 35, 25, 597, 596, 595, 3, 4, 594, 67, 593, 592, 50, 34, 18, 26, 101, 20, 591, 30, 373, 1, 292, 24, 347, 327, 2, 9, 14, 31, 49, 46, 590, 588, 39, 28, 45, 587, 585, 584, 583, 581, 1100, 40, 580, 579, 12, 578, 575, 573, 572, 571, 570, 568, 29, 567, 27, 566, 23, 41, 7, 44, 6, 37, 565, 38, 561, 560, 11, 22, 36, 559, 558, 8, 17, 33, 557, 555, 541, 5, 540, 472, 537, 536, 534, 533, 532, 528, 203, 523, 521, 518, 517, 513, 509, 88, 508, 507, 19 }; yytabelem yyr1[]={ 0, 1, 1, 55, 55, 55, 55, 55, 55, 55, 2, 56, 56, 56, 56, 56, 56, 56, 60, 52, 33, 53, 53, 61, 61, 62, 62, 63, 63, 26, 26, 26, 27, 27, 34, 34, 17, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 10, 10, 10, 74, 7, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 16, 16, 16, 50, 50, 50, 50, 51, 51, 64, 64, 65, 65, 66, 66, 80, 54, 54, 67, 67, 81, 82, 76, 83, 84, 77, 77, 85, 85, 45, 45, 45, 70, 70, 86, 86, 72, 72, 87, 36, 18, 18, 19, 19, 75, 75, 89, 88, 88, 90, 90, 43, 43, 91, 91, 3, 68, 68, 92, 92, 95, 93, 94, 94, 96, 96, 11, 69, 69, 97, 20, 20, 71, 21, 21, 22, 22, 38, 38, 38, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 12, 12, 13, 13, 13, 13, 13, 13, 37, 37, 37, 37, 32, 40, 40, 44, 44, 48, 48, 48, 48, 48, 48, 48, 47, 49, 49, 49, 41, 41, 42, 42, 42, 42, 42, 42, 42, 42, 58, 58, 58, 58, 58, 58, 58, 58, 58, 99, 23, 24, 24, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 4, 100, 101, 101, 101, 101, 73, 73, 35, 25, 25, 46, 46, 14, 14, 28, 28, 59, 78, 79, 102, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 104, 111, 111, 111, 106, 113, 113, 113, 108, 108, 105, 105, 114, 114, 115, 115, 115, 115, 115, 115, 15, 107, 109, 110, 110, 29, 29, 6, 6, 30, 30, 30, 31, 31, 31, 31, 31, 31, 5, 5, 5, 5, 5, 112 }; yytabelem yyr2[]={ 0, 0, 6, 5, 4, 5, 7, 7, 5, 3, 3, 7, 9, 7, 9, 9, 11, 7, 1, 3, 3, 1, 2, 4, 6, 2, 6, 2, 6, 1, 5, 7, 3, 7, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 3, 11, 15, 11, 11, 1, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 9, 13, 7, 9, 11, 7, 3, 7, 7, 7, 7, 7, 6, 6, 7, 3, 7, 6, 6, 1, 13, 1, 1, 1, 4, 6, 3, 7, 2, 5, 2, 2, 6, 3, 2, 2, 6, 7, 5, 3, 11, 3, 7, 1, 6, 1, 4, 6, 3, 7, 3, 2, 3, 7, 3, 7, 6, 8, 3, 1, 4, 2, 6, 3, 7, 3, 2, 4, 9, 3, 7, 1, 1, 2, 3, 7, 2, 7, 2, 2, 2, 7, 7, 7, 7, 5, 7, 7, 7, 7, 7, 5, 7, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 9, 11, 11, 1, 2, 3, 2, 3, 3, 3, 3, 3, 3, 2, 11, 3, 3, 3, 2, 7, 2, 2, 7, 7, 7, 7, 5, 7, 2, 15, 9, 3, 5, 4, 13, 5, 5, 11, 7, 2, 9, 9, 11, 4, 2, 3, 21, 3, 7, 9, 7, 7, 3, 3, 7, 7, 15, 15, 0, 2, 7, 3, 7, 2, 5, 3, 3, 3, 7, 1, 1, 1, 3, 4, 5, 5, 5, 4, 5, 5, 7, 9, 9, 5, 7, 3, 7, 6, 3, 3, 3, 6, 3, 3, 3, 3, 3, 7, 7, 2, 6, 3, 3, 3, 5, 5, 5, 3, 7, 7, 9, 9, 3, 7, 3, 11, 3, 3, 2, 7, 7, 7, 7, 7, 7, 3, 7, 11, 11, 11, 1 }; yytabelem yychk[]={ -1000, -1, -55, -2, 256, 3, 1, -56, -57, -58, 18, 37, 4, 60, 23, 69, 44, -7, 40, -10, -50, -64, -65, -66, -67, -68, -69, 66, 43, 57, -98, 33, 97, -99, 36, 35, 39, -8, 27, 42, 53, 41, 30, 50, 55, -100, 20, 29, -101, -102, 48, -35, 64, -14, 49, -9, 19, 45, 46, 47, -103, 24, 58, 68, 52, 63, 28, 34, 31, 54, 25, 72, 32, 21, 67, -104, -106, -107, -109, -110, -111, -113, 62, 73, 59, 22, 65, 38, 51, 56, 26, -17, 5, -59, -60, -60, -60, -60, 44, -73, 78, -52, -33, 14, 78, 99, -73, 78, 78, 78, 78, -73, 78, -97, 83, -70, -86, -33, -51, 85, 83, -71, -59, -98, 70, -59, -59, -59, -16, 82, -71, -71, -71, -71, -81, -71, -37, -33, -59, -59, -59, 74, -59, -59, -59, -59, -59, -59, -59, -105, -42, 82, 84, 74, -37, -48, -41, -12, 12, 13, 5, 6, 7, 8, -49, 80, 81, 11, 10, 9, -105, 74, -105, -108, -42, 82, -105, 78, -59, -59, -59, -59, -59, -53, -52, -53, -52, -52, -60, -33, -26, 74, -33, -76, -51, -36, -33, -33, -33, -80, 74, -82, -76, -92, -93, -95, -33, 78, 14, 74, -78, -73, 74, -78, -36, -51, -33, -33, -80, -82, -92, 76, -32, 74, -4, 6, 74, 75, -25, -46, -38, 82, -39, 74, -47, -37, -48, -12, 90, -40, -38, -40, 74, -3, 6, -33, 74, -33, -41, -114, -42, 74, -115, 82, 84, -15, 15, -12, 82, 83, 84, 85, -41, -41, -29, 78, -6, -37, 74, 78, -30, -39, -5, -31, -38, -47, 74, -30, -112, -112, -112, -112, -41, 82, -61, 74, -26, -26, -52, -71, 75, -27, -34, -33, 82, -75, 74, -77, -84, -73, -75, -54, -37, -19, -18, -37, 74, 74, -7, 83, -86, 83, -72, -87, -33, -3, -24, -23, 98, -33, -38, -38, 74, -36, -38, -21, -40, -22, -38, 71, -38, 75, 78, -12, 82, 83, 84, -13, 89, 88, 87, 86, 85, 91, 93, 92, 95, 94, 96, -3, -38, -39, -38, -38, -38, -73, -91, -3, 75, 75, 78, -41, -38, 82, 84, -41, -41, -41, -41, -41, 75, 78, -29, -29, -29, 78, 78, 78, -38, -39, -5, -31, -112, -112, 75, -62, -63, 14, -26, -74, 75, 78, -16, -88, -89, 99, 78, -85, -45, -44, -12, -47, -33, -48, 74, -36, 75, 78, 83, 78, -19, -94, -96, -11, 14, -20, -33, 75, 78, 76, -79, 74, 76, 75, -79, 82, 75, 77, 78, -33, 75, -46, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, 75, 78, 75, 74, 78, 75, -115, -41, 75, -6, 78, -39, -5, -39, -5, -39, -5, 75, 78, 78, 78, 75, 78, 76, -75, -34, 75, 78, -90, -43, -38, 82, -85, 82, -44, -37, -83, -18, 78, 75, 78, 81, 78, -87, -38, -73, -38, -28, -38, 70, 75, -32, 74, -40, -38, -3, -39, -91, -3, -73, -23, -33, -39, -23, -23, -23, -63, 14, -16, -90, 77, -45, -44, -77, -23, -96, -11, -33, -24, 75, 78, -79, 75, 78, 75, 75, -38, 75, 75, 75, 75, -43, -38, 83, 75, -38, -3, 78, -3 }; yytabelem yydef[]={ 1, -2, 0, 0, 9, 10, 2, 3, 4, 5, 0, 239, 8, 18, 18, 18, 18, 228, 0, 37, -2, 39, 40, 41, -2, 43, 44, 45, 47, 138, 198, 239, 201, 0, 239, 239, 239, 66, 138, 138, 138, 138, 86, 138, 133, 0, 239, 239, 214, 215, 239, 217, 239, 239, 239, 54, 223, 239, 239, 239, 242, 239, 235, 236, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 0, 0, 0, 0, 255, 239, 239, 239, 239, 239, 258, 259, 260, 262, 263, 264, 6, 36, 7, 21, 21, 0, 0, 18, 0, 229, 29, 19, 20, 0, 88, 0, 229, 0, 0, 0, 88, 126, 134, 0, 46, 98, 100, 101, 73, 0, 0, -2, 202, 203, 0, 205, 206, 53, 240, 0, 0, 0, 0, 88, 126, 0, 168, 0, 213, 0, 0, 173, 173, 0, 0, 0, 0, 0, 243, -2, 245, 246, 0, 190, 191, 0, 0, 177, 178, 179, 180, 181, 182, 183, 160, 161, 185, 186, 187, 247, 0, 248, 249, -2, 266, 253, 0, 300, 300, 300, 300, 0, 11, 22, 13, 29, 29, 0, 138, 17, 0, 110, 90, 228, 72, 110, 76, 78, 80, 0, 85, 0, 123, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 75, 77, 79, 84, 122, 0, 169, -2, 0, 222, 0, 218, 0, 231, 233, 0, 143, 0, 145, 146, 147, 0, 0, 220, 174, 221, 0, 224, 121, -2, 0, 230, 271, 0, 188, 0, 269, 272, 273, 0, 277, 0, 0, 0, 0, 0, 196, 271, 250, 0, 282, 284, 0, 0, 254, -2, 287, 288, 0, -2, 0, 256, 257, 261, 278, 279, 300, 300, 12, 0, 14, 15, 29, 52, 30, 0, 32, 34, 35, 66, 112, 0, 0, 0, 105, 0, 82, 0, 108, 106, 0, 0, 127, 0, 99, 74, 0, 102, 0, 241, 200, 209, 0, 0, 0, 241, 0, 70, 211, 0, 0, 140, -2, 0, 0, 219, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 162, 163, 164, 165, 166, 167, 234, 0, 143, 152, 158, 0, 0, 0, 119, -2, 268, 0, 0, 274, 275, 276, 192, 193, 194, 195, 197, 267, 0, 252, 0, 251, 0, 0, 0, 0, 143, 0, 0, 280, 281, 23, 0, 25, 27, 16, 110, 31, 0, 50, 0, 0, 51, 0, 91, 93, 95, 0, 97, 175, 176, 0, 71, 81, 0, 89, 0, 0, 0, 128, 130, 132, 135, 136, 48, 0, 0, 228, 0, 0, 0, 67, 0, 170, 173, 0, 212, 0, 232, 148, 149, 150, 151, -2, 154, 155, 156, 157, 159, 144, 0, 207, 0, 0, 228, 270, 271, 189, 283, 0, -2, 290, -2, 292, -2, 294, -2, 0, 0, 0, 24, 0, 0, 66, 33, 111, 0, 113, 115, 118, 117, 92, 0, 96, 83, 90, 109, 0, 124, 0, 0, 0, 103, 104, 0, 0, 208, 237, 204, 241, 171, 173, 0, 142, 0, 143, 0, 120, 0, 0, 168, -2, 0, 0, 0, 26, 28, 49, 114, 0, 94, 95, 0, 0, 129, 131, 137, 199, 210, 0, 68, 172, 0, 184, 226, 227, 285, 297, 298, 299, 116, 118, 87, 107, 238, 0, 0, 216 }; typedef struct { char *t_name; int t_val; } yytoktype; #ifndef YYDEBUG # define YYDEBUG 0 /* don't allow debugging */ #endif #if YYDEBUG yytoktype yytoks[] = { "SEOS", 1, "SCOMMENT", 2, "SLABEL", 3, "SUNKNOWN", 4, "SHOLLERITH", 5, "SICON", 6, "SRCON", 7, "SDCON", 8, "SBITCON", 9, "SOCTCON", 10, "SHEXCON", 11, "STRUE", 12, "SFALSE", 13, "SNAME", 14, "SNAMEEQ", 15, "SFIELD", 16, "SSCALE", 17, "SINCLUDE", 18, "SLET", 19, "SASSIGN", 20, "SAUTOMATIC", 21, "SBACKSPACE", 22, "SBLOCK", 23, "SCALL", 24, "SCHARACTER", 25, "SCLOSE", 26, "SCOMMON", 27, "SCOMPLEX", 28, "SCONTINUE", 29, "SDATA", 30, "SDCOMPLEX", 31, "SDIMENSION", 32, "SDO", 33, "SDOUBLE", 34, "SELSE", 35, "SELSEIF", 36, "SEND", 37, "SENDFILE", 38, "SENDIF", 39, "SENTRY", 40, "SEQUIV", 41, "SEXTERNAL", 42, "SFORMAT", 43, "SFUNCTION", 44, "SGOTO", 45, "SASGOTO", 46, "SCOMPGOTO", 47, "SARITHIF", 48, "SLOGIF", 49, "SIMPLICIT", 50, "SINQUIRE", 51, "SINTEGER", 52, "SINTRINSIC", 53, "SLOGICAL", 54, "SNAMELIST", 55, "SOPEN", 56, "SPARAM", 57, "SPAUSE", 58, "SPRINT", 59, "SPROGRAM", 60, "SPUNCH", 61, "SREAD", 62, "SREAL", 63, "SRETURN", 64, "SREWIND", 65, "SSAVE", 66, "SSTATIC", 67, "SSTOP", 68, "SSUBROUTINE", 69, "STHEN", 70, "STO", 71, "SUNDEFINED", 72, "SWRITE", 73, "SLPAR", 74, "SRPAR", 75, "SEQUALS", 76, "SCOLON", 77, "SCOMMA", 78, "SCURRENCY", 79, "SPLUS", 80, "SMINUS", 81, "SSTAR", 82, "SSLASH", 83, "SPOWER", 84, "SCONCAT", 85, "SAND", 86, "SOR", 87, "SNEQV", 88, "SEQV", 89, "SNOT", 90, "SEQ", 91, "SLT", 92, "SGT", 93, "SLE", 94, "SGE", 95, "SNE", 96, "SENDDO", 97, "SWHILE", 98, "SSLASHD", 99, "-unknown-", -1 /* ends search */ }; char * yyreds[] = { "-no such reduction-", "program : /* empty */", "program : program stat SEOS", "stat : thislabel entry", "stat : thislabel spec", "stat : thislabel exec", "stat : thislabel SINCLUDE filename", "stat : thislabel SEND end_spec", "stat : thislabel SUNKNOWN", "stat : error", "thislabel : SLABEL", "entry : SPROGRAM new_proc progname", "entry : SPROGRAM new_proc progname progarglist", "entry : SBLOCK new_proc progname", "entry : SSUBROUTINE new_proc entryname arglist", "entry : SFUNCTION new_proc entryname arglist", "entry : type SFUNCTION new_proc entryname arglist", "entry : SENTRY entryname arglist", "new_proc : /* empty */", "entryname : name", "name : SNAME", "progname : /* empty */", "progname : entryname", "progarglist : SLPAR SRPAR", "progarglist : SLPAR progargs SRPAR", "progargs : progarg", "progargs : progargs SCOMMA progarg", "progarg : SNAME", "progarg : SNAME SEQUALS SNAME", "arglist : /* empty */", "arglist : SLPAR SRPAR", "arglist : SLPAR args SRPAR", "args : arg", "args : args SCOMMA arg", "arg : name", "arg : SSTAR", "filename : SHOLLERITH", "spec : dcl", "spec : common", "spec : external", "spec : intrinsic", "spec : equivalence", "spec : data", "spec : implicit", "spec : namelist", "spec : SSAVE", "spec : SSAVE savelist", "spec : SFORMAT", "spec : SPARAM in_dcl SLPAR paramlist SRPAR", "dcl : type opt_comma name in_dcl new_dcl dims lengspec", "dcl : dcl SCOMMA name dims lengspec", "dcl : dcl SSLASHD datainit vallist SSLASHD", "new_dcl : /* empty */", "type : typespec lengspec", "typespec : typename", "typename : SINTEGER", "typename : SREAL", "typename : SCOMPLEX", "typename : SDOUBLE", "typename : SDCOMPLEX", "typename : SLOGICAL", "typename : SCHARACTER", "typename : SUNDEFINED", "typename : SDIMENSION", "typename : SAUTOMATIC", "typename : SSTATIC", "lengspec : /* empty */", "lengspec : SSTAR intonlyon expr intonlyoff", "lengspec : SSTAR intonlyon SLPAR SSTAR SRPAR intonlyoff", "common : SCOMMON in_dcl var", "common : SCOMMON in_dcl comblock var", "common : common opt_comma comblock opt_comma var", "common : common SCOMMA var", "comblock : SCONCAT", "comblock : SSLASH SNAME SSLASH", "external : SEXTERNAL in_dcl name", "external : external SCOMMA name", "intrinsic : SINTRINSIC in_dcl name", "intrinsic : intrinsic SCOMMA name", "equivalence : SEQUIV in_dcl equivset", "equivalence : equivalence SCOMMA equivset", "equivset : SLPAR equivlist SRPAR", "equivlist : lhs", "equivlist : equivlist SCOMMA lhs", "data : SDATA in_data datalist", "data : data opt_comma datalist", "in_data : /* empty */", "datalist : datainit datavarlist SSLASH datapop vallist SSLASH", "datainit : /* empty */", "datapop : /* empty */", "vallist : /* empty */", "vallist : val", "vallist : vallist SCOMMA val", "val : value", "val : simple SSTAR value", "value : simple", "value : addop simple", "value : complex_const", "savelist : saveitem", "savelist : savelist SCOMMA saveitem", "saveitem : name", "saveitem : comblock", "paramlist : paramitem", "paramlist : paramlist SCOMMA paramitem", "paramitem : name SEQUALS expr", "var : name dims", "datavar : lhs", "datavar : SLPAR datavarlist SCOMMA dospec SRPAR", "datavarlist : datavar", "datavarlist : datavarlist SCOMMA datavar", "dims : /* empty */", "dims : SLPAR dimlist SRPAR", "dimlist : /* empty */", "dimlist : dim", "dimlist : dimlist SCOMMA dim", "dim : ubound", "dim : expr SCOLON ubound", "ubound : SSTAR", "ubound : expr", "labellist : label", "labellist : labellist SCOMMA label", "label : SICON", "implicit : SIMPLICIT in_dcl implist", "implicit : implicit SCOMMA implist", "implist : imptype SLPAR letgroups SRPAR", "implist : imptype", "imptype : /* empty */", "imptype : type", "letgroups : letgroup", "letgroups : letgroups SCOMMA letgroup", "letgroup : letter", "letgroup : letter SMINUS letter", "letter : SNAME", "namelist : SNAMELIST", "namelist : namelist namelistentry", "namelistentry : SSLASH name SSLASH namelistlist", "namelistlist : name", "namelistlist : namelistlist SCOMMA name", "in_dcl : /* empty */", "funarglist : /* empty */", "funarglist : funargs", "funargs : expr", "funargs : funargs SCOMMA expr", "expr : uexpr", "expr : SLPAR expr SRPAR", "expr : complex_const", "uexpr : lhs", "uexpr : simple_const", "uexpr : expr addop expr", "uexpr : expr SSTAR expr", "uexpr : expr SSLASH expr", "uexpr : expr SPOWER expr", "uexpr : addop expr", "uexpr : expr relop expr", "uexpr : expr SEQV expr", "uexpr : expr SNEQV expr", "uexpr : expr SOR expr", "uexpr : expr SAND expr", "uexpr : SNOT expr", "uexpr : expr SCONCAT expr", "addop : SPLUS", "addop : SMINUS", "relop : SEQ", "relop : SGT", "relop : SLT", "relop : SGE", "relop : SLE", "relop : SNE", "lhs : name", "lhs : name substring", "lhs : name SLPAR funarglist SRPAR", "lhs : name SLPAR funarglist SRPAR substring", "substring : SLPAR opt_expr SCOLON opt_expr SRPAR", "opt_expr : /* empty */", "opt_expr : expr", "simple : name", "simple : simple_const", "simple_const : STRUE", "simple_const : SFALSE", "simple_const : SHOLLERITH", "simple_const : SICON", "simple_const : SRCON", "simple_const : SDCON", "simple_const : bit_const", "complex_const : SLPAR uexpr SCOMMA uexpr SRPAR", "bit_const : SHEXCON", "bit_const : SOCTCON", "bit_const : SBITCON", "fexpr : unpar_fexpr", "fexpr : SLPAR fexpr SRPAR", "unpar_fexpr : lhs", "unpar_fexpr : simple_const", "unpar_fexpr : fexpr addop fexpr", "unpar_fexpr : fexpr SSTAR fexpr", "unpar_fexpr : fexpr SSLASH fexpr", "unpar_fexpr : fexpr SPOWER fexpr", "unpar_fexpr : addop fexpr", "unpar_fexpr : fexpr SCONCAT fexpr", "exec : iffable", "exec : SDO end_spec intonlyon label intonlyoff opt_comma dospecw", "exec : SDO end_spec opt_comma dospecw", "exec : SENDDO", "exec : logif iffable", "exec : logif STHEN", "exec : SELSEIF end_spec SLPAR expr SRPAR STHEN", "exec : SELSE end_spec", "exec : SENDIF end_spec", "logif : SLOGIF end_spec SLPAR expr SRPAR", "dospec : name SEQUALS exprlist", "dospecw : dospec", "dospecw : SWHILE SLPAR expr SRPAR", "iffable : let lhs SEQUALS expr", "iffable : SASSIGN end_spec assignlabel STO name", "iffable : SCONTINUE end_spec", "iffable : goto", "iffable : io", "iffable : SARITHIF end_spec SLPAR expr SRPAR label SCOMMA label SCOMMA label", "iffable : call", "iffable : call SLPAR SRPAR", "iffable : call SLPAR callarglist SRPAR", "iffable : SRETURN end_spec opt_expr", "iffable : stop end_spec opt_expr", "assignlabel : SICON", "let : SLET", "goto : SGOTO end_spec label", "goto : SASGOTO end_spec name", "goto : SASGOTO end_spec name opt_comma SLPAR labellist SRPAR", "goto : SCOMPGOTO end_spec SLPAR labellist SRPAR opt_comma expr", "opt_comma : /* empty */", "opt_comma : SCOMMA", "call : SCALL end_spec name", "callarglist : callarg", "callarglist : callarglist SCOMMA callarg", "callarg : expr", "callarg : SSTAR label", "stop : SPAUSE", "stop : SSTOP", "exprlist : expr", "exprlist : exprlist SCOMMA expr", "end_spec : /* empty */", "intonlyon : /* empty */", "intonlyoff : /* empty */", "io : io1", "io1 : iofmove ioctl", "io1 : iofmove unpar_fexpr", "io1 : iofmove SSTAR", "io1 : iofmove SPOWER", "io1 : iofctl ioctl", "io1 : read ioctl", "io1 : read infmt", "io1 : read ioctl inlist", "io1 : read infmt SCOMMA inlist", "io1 : read ioctl SCOMMA inlist", "io1 : write ioctl", "io1 : write ioctl outlist", "io1 : print", "io1 : print SCOMMA outlist", "iofmove : fmkwd end_spec in_ioctl", "fmkwd : SBACKSPACE", "fmkwd : SREWIND", "fmkwd : SENDFILE", "iofctl : ctlkwd end_spec in_ioctl", "ctlkwd : SINQUIRE", "ctlkwd : SOPEN", "ctlkwd : SCLOSE", "infmt : unpar_fexpr", "infmt : SSTAR", "ioctl : SLPAR fexpr SRPAR", "ioctl : SLPAR ctllist SRPAR", "ctllist : ioclause", "ctllist : ctllist SCOMMA ioclause", "ioclause : fexpr", "ioclause : SSTAR", "ioclause : SPOWER", "ioclause : nameeq expr", "ioclause : nameeq SSTAR", "ioclause : nameeq SPOWER", "nameeq : SNAMEEQ", "read : SREAD end_spec in_ioctl", "write : SWRITE end_spec in_ioctl", "print : SPRINT end_spec fexpr in_ioctl", "print : SPRINT end_spec SSTAR in_ioctl", "inlist : inelt", "inlist : inlist SCOMMA inelt", "inelt : lhs", "inelt : SLPAR inlist SCOMMA dospec SRPAR", "outlist : uexpr", "outlist : other", "outlist : out2", "out2 : uexpr SCOMMA uexpr", "out2 : uexpr SCOMMA other", "out2 : other SCOMMA uexpr", "out2 : other SCOMMA other", "out2 : out2 SCOMMA uexpr", "out2 : out2 SCOMMA other", "other : complex_const", "other : SLPAR expr SRPAR", "other : SLPAR uexpr SCOMMA dospec SRPAR", "other : SLPAR other SCOMMA dospec SRPAR", "other : SLPAR out2 SCOMMA dospec SRPAR", "in_ioctl : /* empty */", }; #endif /* YYDEBUG */ /* * @(#) yaccpar 1.4 88/11/11 * * UNIX is a registered trademark of AT&T * Portions Copyright 1976-1989 AT&T * Portions Copyright 1980-1989 Microsoft Corporation * Portions Copyright 1983-1989 The Santa Cruz Operation, Inc * All Rights Reserved */ #ident "@(#)yacc:yaccpar 1.10" /* ** Skeleton parser driver for yacc output */ /* ** yacc user known macros and defines */ #define YYERROR goto yyerrlab #define YYACCEPT return(0) #define YYABORT return(1) #define YYBACKUP( newtoken, newvalue )\ {\ if ( yychar >= 0 || ( yyr2[ yytmp ] >> 1 ) != 1 )\ {\ yyerror( "syntax error - cannot backup" );\ goto yyerrlab;\ }\ yychar = newtoken;\ yystate = *yyps;\ yylval = newvalue;\ goto yynewstate;\ } #define YYRECOVERING() (!!yyerrflag) #ifndef YYDEBUG # define YYDEBUG 1 /* make debugging available */ #endif /* ** user known globals */ int yydebug; /* set to 1 to get debugging */ /* ** driver internal defines */ #define YYFLAG (-1000) /* ** global variables used by the parser */ YYSTYPE yyv[ YYMAXDEPTH ]; /* value stack */ int yys[ YYMAXDEPTH ]; /* state stack */ YYSTYPE *yypv; /* top of value stack */ int *yyps; /* top of state stack */ int yystate; /* current state */ int yytmp; /* extra var (lasts between blocks) */ int yynerrs; /* number of errors */ int yyerrflag; /* error recovery flag */ int yychar; /* current input token number */ /* ** yyparse - return 0 if worked, 1 if syntax error not recovered from */ int yyparse() { register YYSTYPE *yypvt; /* top of value stack for $vars */ /* ** Initialize externals - yyparse may be called more than once */ yypv = &yyv[-1]; yyps = &yys[-1]; yystate = 0; yytmp = 0; yynerrs = 0; yyerrflag = 0; yychar = -1; goto yystack; { register YYSTYPE *yy_pv; /* top of value stack */ register int *yy_ps; /* top of state stack */ register int yy_state; /* current state */ register int yy_n; /* internal state number info */ /* ** get globals into registers. ** branch to here only if YYBACKUP was called. */ yynewstate: yy_pv = yypv; yy_ps = yyps; yy_state = yystate; goto yy_newstate; /* ** get globals into registers. ** either we just started, or we just finished a reduction */ yystack: yy_pv = yypv; yy_ps = yyps; yy_state = yystate; /* ** top of for (;;) loop while no reductions done */ yy_stack: /* ** put a state and value onto the stacks */ #if YYDEBUG /* ** if debugging, look up token value in list of value vs. ** name pairs. 0 and negative (-1) are special values. ** Note: linear search is used since time is not a real ** consideration while debugging. */ if ( yydebug ) { register int yy_i; printf( "State %d, token ", yy_state ); if ( yychar == 0 ) printf( "end-of-file\n" ); else if ( yychar < 0 ) printf( "-none-\n" ); else { for ( yy_i = 0; yytoks[yy_i].t_val >= 0; yy_i++ ) { if ( yytoks[yy_i].t_val == yychar ) break; } printf( "%s\n", yytoks[yy_i].t_name ); } } #endif /* YYDEBUG */ if ( ++yy_ps >= &yys[ YYMAXDEPTH ] ) /* room on stack? */ { yyerror( "yacc stack overflow" ); YYABORT; } *yy_ps = yy_state; *++yy_pv = yyval; /* ** we have a new state - find out what to do */ yy_newstate: if ( ( yy_n = yypact[ yy_state ] ) <= YYFLAG ) goto yydefault; /* simple state */ #if YYDEBUG /* ** if debugging, need to mark whether new token grabbed */ yytmp = yychar < 0; #endif if ( ( yychar < 0 ) && ( ( yychar = yylex() ) < 0 ) ) yychar = 0; /* reached EOF */ #if YYDEBUG if ( yydebug && yytmp ) { register int yy_i; printf( "Received token " ); if ( yychar == 0 ) printf( "end-of-file\n" ); else if ( yychar < 0 ) printf( "-none-\n" ); else { for ( yy_i = 0; yytoks[yy_i].t_val >= 0; yy_i++ ) { if ( yytoks[yy_i].t_val == yychar ) break; } printf( "%s\n", yytoks[yy_i].t_name ); } } #endif /* YYDEBUG */ if ( ( ( yy_n += yychar ) < 0 ) || ( yy_n >= YYLAST ) ) goto yydefault; if ( yychk[ yy_n = yyact[ yy_n ] ] == yychar ) /*valid shift*/ { yychar = -1; yyval = yylval; yy_state = yy_n; if ( yyerrflag > 0 ) yyerrflag--; goto yy_stack; } yydefault: if ( ( yy_n = yydef[ yy_state ] ) == -2 ) { #if YYDEBUG yytmp = yychar < 0; #endif if ( ( yychar < 0 ) && ( ( yychar = yylex() ) < 0 ) ) yychar = 0; /* reached EOF */ #if YYDEBUG if ( yydebug && yytmp ) { register int yy_i; printf( "Received token " ); if ( yychar == 0 ) printf( "end-of-file\n" ); else if ( yychar < 0 ) printf( "-none-\n" ); else { for ( yy_i = 0; yytoks[yy_i].t_val >= 0; yy_i++ ) { if ( yytoks[yy_i].t_val == yychar ) { break; } } printf( "%s\n", yytoks[yy_i].t_name ); } } #endif /* YYDEBUG */ /* ** look through exception table */ { register int *yyxi = yyexca; while ( ( *yyxi != -1 ) || ( yyxi[1] != yy_state ) ) { yyxi += 2; } while ( ( *(yyxi += 2) >= 0 ) && ( *yyxi != yychar ) ) ; if ( ( yy_n = yyxi[1] ) < 0 ) YYACCEPT; } } /* ** check for syntax error */ if ( yy_n == 0 ) /* have an error */ { /* no worry about speed here! */ switch ( yyerrflag ) { case 0: /* new error */ yyerror( "syntax error" ); goto skip_init; yyerrlab: /* ** get globals into registers. ** we have a user generated syntax type error */ yy_pv = yypv; yy_ps = yyps; yy_state = yystate; yynerrs++; skip_init: case 1: case 2: /* incompletely recovered error */ /* try again... */ yyerrflag = 3; /* ** find state where "error" is a legal ** shift action */ while ( yy_ps >= yys ) { yy_n = yypact[ *yy_ps ] + YYERRCODE; if ( yy_n >= 0 && yy_n < YYLAST && yychk[yyact[yy_n]] == YYERRCODE) { /* ** simulate shift of "error" */ yy_state = yyact[ yy_n ]; goto yy_stack; } /* ** current state has no shift on ** "error", pop stack */ #if YYDEBUG # define _POP_ "Error recovery pops state %d, uncovers state %d\n" if ( yydebug ) printf( _POP_, *yy_ps, yy_ps[-1] ); # undef _POP_ #endif yy_ps--; yy_pv--; } /* ** there is no state on stack with "error" as ** a valid shift. give up. */ YYABORT; case 3: /* no shift yet; eat a token */ #if YYDEBUG /* ** if debugging, look up token in list of ** pairs. 0 and negative shouldn't occur, ** but since timing doesn't matter when ** debugging, it doesn't hurt to leave the ** tests here. */ if ( yydebug ) { register int yy_i; printf( "Error recovery discards " ); if ( yychar == 0 ) printf( "token end-of-file\n" ); else if ( yychar < 0 ) printf( "token -none-\n" ); else { for ( yy_i = 0; yytoks[yy_i].t_val >= 0; yy_i++ ) { if ( yytoks[yy_i].t_val == yychar ) { break; } } printf( "token %s\n", yytoks[yy_i].t_name ); } } #endif /* YYDEBUG */ if ( yychar == 0 ) /* reached EOF. quit */ YYABORT; yychar = -1; goto yy_newstate; } }/* end if ( yy_n == 0 ) */ /* ** reduction by production yy_n ** put stack tops, etc. so things right after switch */ #if YYDEBUG /* ** if debugging, print the string that is the user's ** specification of the reduction which is just about ** to be done. */ if ( yydebug ) printf( "Reduce by (%d) \"%s\"\n", yy_n, yyreds[ yy_n ] ); #endif yytmp = yy_n; /* value to switch over */ yypvt = yy_pv; /* $vars top of value stack */ /* ** Look in goto table for next state ** Sorry about using yy_state here as temporary ** register variable, but why not, if it works... ** If yyr2[ yy_n ] doesn't have the low order bit ** set, then there is no action to be done for ** this reduction. So, no saving & unsaving of ** registers done. The only difference between the ** code just after the if and the body of the if is ** the goto yy_stack in the body. This way the test ** can be made before the choice of what to do is needed. */ { /* length of production doubled with extra bit */ register int yy_len = yyr2[ yy_n ]; if ( !( yy_len & 01 ) ) { yy_len >>= 1; yyval = ( yy_pv -= yy_len )[1]; /* $$ = $1 */ yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] + *( yy_ps -= yy_len ) + 1; if ( yy_state >= YYLAST || yychk[ yy_state = yyact[ yy_state ] ] != -yy_n ) { yy_state = yyact[ yypgo[ yy_n ] ]; } goto yy_stack; } yy_len >>= 1; yyval = ( yy_pv -= yy_len )[1]; /* $$ = $1 */ yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] + *( yy_ps -= yy_len ) + 1; if ( yy_state >= YYLAST || yychk[ yy_state = yyact[ yy_state ] ] != -yy_n ) { yy_state = yyact[ yypgo[ yy_n ] ]; } } /* save until reenter driver code */ yystate = yy_state; yyps = yy_ps; yypv = yy_pv; } /* ** code supplied by user is placed in this switch */ switch( yytmp ) { case 3: /* # line 224 "gram.in" */ { /* stat: is the nonterminal for Fortran statements */ lastwasbranch = NO; } break; case 5: /* # line 230 "gram.in" */ { /* forbid further statement function definitions... */ if (parstate == INDATA && laststfcn != thisstno) parstate = INEXEC; thisstno++; if(yypvt[-1].labval && (yypvt[-1].labval->labelno==dorange)) enddo(yypvt[-1].labval->labelno); if(lastwasbranch && thislabel==NULL) warn("statement cannot be reached"); lastwasbranch = thiswasbranch; thiswasbranch = NO; if(yypvt[-1].labval) { if(yypvt[-1].labval->labtype == LABFORMAT) err("label already that of a format"); else yypvt[-1].labval->labtype = LABEXEC; } freetemps(); } break; case 6: /* # line 250 "gram.in" */ { if (can_include) doinclude( yypvt[-0].charpval ); else { fprintf(diagfile, "Cannot open file %s\n", yypvt[-0].charpval); done(1); } } break; case 7: /* # line 258 "gram.in" */ { if (yypvt[-2].labval) lastwasbranch = NO; endproc(); /* lastwasbranch = NO; -- set in endproc() */ } break; case 8: /* # line 263 "gram.in" */ { extern void unclassifiable(); unclassifiable(); /* flline flushes the current line, ignoring the rest of the text there */ flline(); } break; case 9: /* # line 270 "gram.in" */ { flline(); needkwd = NO; inioctl = NO; yyerrok; yyclearin; } break; case 10: /* # line 275 "gram.in" */ { if(yystno != 0) { yyval.labval = thislabel = mklabel(yystno); if( ! headerdone ) { if (procclass == CLUNKNOWN) procclass = CLMAIN; puthead(CNULL, procclass); } if(thislabel->labdefined) execerr("label %s already defined", convic(thislabel->stateno) ); else { if(thislabel->blklevel!=0 && thislabel->blklevellabtype!=LABFORMAT) warn1("there is a branch to label %s from outside block", convic( (ftnint) (thislabel->stateno) ) ); thislabel->blklevel = blklevel; thislabel->labdefined = YES; if(thislabel->labtype != LABFORMAT) p1_label((long)(thislabel - labeltab)); } } else yyval.labval = thislabel = NULL; } break; case 11: /* # line 303 "gram.in" */ {startproc(yypvt[-0].extval, CLMAIN); } break; case 12: /* # line 305 "gram.in" */ { warn("ignoring arguments to main program"); /* hashclear(); */ startproc(yypvt[-1].extval, CLMAIN); } break; case 13: /* # line 309 "gram.in" */ { if(yypvt[-0].extval) NO66("named BLOCKDATA"); startproc(yypvt[-0].extval, CLBLOCK); } break; case 14: /* # line 312 "gram.in" */ { entrypt(CLPROC, TYSUBR, (ftnint) 0, yypvt[-1].extval, yypvt[-0].chval); } break; case 15: /* # line 314 "gram.in" */ { entrypt(CLPROC, TYUNKNOWN, (ftnint) 0, yypvt[-1].extval, yypvt[-0].chval); } break; case 16: /* # line 316 "gram.in" */ { entrypt(CLPROC, yypvt[-4].ival, varleng, yypvt[-1].extval, yypvt[-0].chval); } break; case 17: /* # line 318 "gram.in" */ { if(parstate==OUTSIDE || procclass==CLMAIN || procclass==CLBLOCK) execerr("misplaced entry statement", CNULL); entrypt(CLENTRY, 0, (ftnint) 0, yypvt[-1].extval, yypvt[-0].chval); } break; case 18: /* # line 326 "gram.in" */ { newproc(); } break; case 19: /* # line 330 "gram.in" */ { yyval.extval = newentry(yypvt[-0].namval, 1); } break; case 20: /* # line 334 "gram.in" */ { yyval.namval = mkname(token); } break; case 21: /* # line 337 "gram.in" */ { yyval.extval = NULL; } break; case 29: /* # line 355 "gram.in" */ { yyval.chval = 0; } break; case 30: /* # line 357 "gram.in" */ { NO66(" () argument list"); yyval.chval = 0; } break; case 31: /* # line 360 "gram.in" */ {yyval.chval = yypvt[-1].chval; } break; case 32: /* # line 364 "gram.in" */ { yyval.chval = (yypvt[-0].namval ? mkchain((char *)yypvt[-0].namval,CHNULL) : CHNULL ); } break; case 33: /* # line 366 "gram.in" */ { if(yypvt[-0].namval) yypvt[-2].chval = yyval.chval = mkchain((char *)yypvt[-0].namval, yypvt[-2].chval); } break; case 34: /* # line 370 "gram.in" */ { if(yypvt[-0].namval->vstg!=STGUNKNOWN && yypvt[-0].namval->vstg!=STGARG) dclerr("name declared as argument after use", yypvt[-0].namval); yypvt[-0].namval->vstg = STGARG; } break; case 35: /* # line 375 "gram.in" */ { NO66("altenate return argument"); /* substars means that '*'ed formal parameters should be replaced. This is used to specify alternate return labels; in theory, only parameter slots which have '*' should accept the statement labels. This compiler chooses to ignore the '*'s in the formal declaration, and always return the proper value anyway. This variable is only referred to in proc.c */ yyval.namval = 0; substars = YES; } break; case 36: /* # line 391 "gram.in" */ { char *s; s = copyn(toklen+1, token); s[toklen] = '\0'; yyval.charpval = s; } break; case 45: /* # line 407 "gram.in" */ { NO66("SAVE statement"); saveall = YES; } break; case 46: /* # line 410 "gram.in" */ { NO66("SAVE statement"); } break; case 47: /* # line 412 "gram.in" */ { fmtstmt(thislabel); setfmt(thislabel); } break; case 48: /* # line 414 "gram.in" */ { NO66("PARAMETER statement"); } break; case 49: /* # line 418 "gram.in" */ { settype(yypvt[-4].namval, yypvt[-6].ival, yypvt[-0].lval); if(ndim>0) setbound(yypvt[-4].namval,ndim,dims); } break; case 50: /* # line 422 "gram.in" */ { settype(yypvt[-2].namval, yypvt[-4].ival, yypvt[-0].lval); if(ndim>0) setbound(yypvt[-2].namval,ndim,dims); } break; case 51: /* # line 426 "gram.in" */ { if (new_dcl == 2) { err("attempt to give DATA in type-declaration"); new_dcl = 1; } } break; case 52: /* # line 433 "gram.in" */ { new_dcl = 2; } break; case 53: /* # line 436 "gram.in" */ { varleng = yypvt[-0].lval; if (vartype == TYLOGICAL && varleng == 1) { varleng = 0; err("treating LOGICAL*1 as LOGICAL"); --nerr; /* allow generation of .c file */ } } break; case 54: /* # line 446 "gram.in" */ { varleng = (yypvt[-0].ival<0 || yypvt[-0].ival==TYLONG ? 0 : typesize[yypvt[-0].ival]); vartype = yypvt[-0].ival; } break; case 55: /* # line 450 "gram.in" */ { yyval.ival = TYLONG; } break; case 56: /* # line 451 "gram.in" */ { yyval.ival = tyreal; } break; case 57: /* # line 452 "gram.in" */ { ++complex_seen; yyval.ival = TYCOMPLEX; } break; case 58: /* # line 453 "gram.in" */ { yyval.ival = TYDREAL; } break; case 59: /* # line 454 "gram.in" */ { ++dcomplex_seen; NOEXT("DOUBLE COMPLEX statement"); yyval.ival = TYDCOMPLEX; } break; case 60: /* # line 455 "gram.in" */ { yyval.ival = TYLOGICAL; } break; case 61: /* # line 456 "gram.in" */ { NO66("CHARACTER statement"); yyval.ival = TYCHAR; } break; case 62: /* # line 457 "gram.in" */ { yyval.ival = TYUNKNOWN; } break; case 63: /* # line 458 "gram.in" */ { yyval.ival = TYUNKNOWN; } break; case 64: /* # line 459 "gram.in" */ { NOEXT("AUTOMATIC statement"); yyval.ival = - STGAUTO; } break; case 65: /* # line 460 "gram.in" */ { NOEXT("STATIC statement"); yyval.ival = - STGBSS; } break; case 66: /* # line 464 "gram.in" */ { yyval.lval = varleng; } break; case 67: /* # line 466 "gram.in" */ { expptr p; p = yypvt[-1].expval; NO66("length specification *n"); if( ! ISICON(p) || p->constblock.Const.ci<0 ) { yyval.lval = 0; dclerr("length must be a positive integer constant", NPNULL); } else { if (vartype == TYCHAR) yyval.lval = p->constblock.Const.ci; else switch((int)p->constblock.Const.ci) { case 1: yyval.lval = 1; break; case 2: yyval.lval = typesize[TYSHORT]; break; case 4: yyval.lval = typesize[TYLONG]; break; case 8: yyval.lval = typesize[TYDREAL]; break; case 16: yyval.lval = typesize[TYDCOMPLEX]; break; default: dclerr("invalid length",NPNULL); yyval.lval = varleng; } } } break; case 68: /* # line 492 "gram.in" */ { NO66("length specification *(*)"); yyval.lval = -1; } break; case 69: /* # line 496 "gram.in" */ { incomm( yyval.extval = comblock("") , yypvt[-0].namval ); } break; case 70: /* # line 498 "gram.in" */ { yyval.extval = yypvt[-1].extval; incomm(yypvt[-1].extval, yypvt[-0].namval); } break; case 71: /* # line 500 "gram.in" */ { yyval.extval = yypvt[-2].extval; incomm(yypvt[-2].extval, yypvt[-0].namval); } break; case 72: /* # line 502 "gram.in" */ { incomm(yypvt[-2].extval, yypvt[-0].namval); } break; case 73: /* # line 506 "gram.in" */ { yyval.extval = comblock(""); } break; case 74: /* # line 508 "gram.in" */ { yyval.extval = comblock(token); } break; case 75: /* # line 512 "gram.in" */ { setext(yypvt[-0].namval); } break; case 76: /* # line 514 "gram.in" */ { setext(yypvt[-0].namval); } break; case 77: /* # line 518 "gram.in" */ { NO66("INTRINSIC statement"); setintr(yypvt[-0].namval); } break; case 78: /* # line 520 "gram.in" */ { setintr(yypvt[-0].namval); } break; case 81: /* # line 528 "gram.in" */ { struct Equivblock *p; if(nequiv >= maxequiv) many("equivalences", 'q', maxequiv); p = & eqvclass[nequiv++]; p->eqvinit = NO; p->eqvbottom = 0; p->eqvtop = 0; p->equivs = yypvt[-1].eqvval; } break; case 82: /* # line 541 "gram.in" */ { yyval.eqvval=ALLOC(Eqvchain); yyval.eqvval->eqvitem.eqvlhs = (struct Primblock *)yypvt[-0].expval; } break; case 83: /* # line 545 "gram.in" */ { yyval.eqvval=ALLOC(Eqvchain); yyval.eqvval->eqvitem.eqvlhs = (struct Primblock *) yypvt[-0].expval; yyval.eqvval->eqvnextp = yypvt[-2].eqvval; } break; case 86: /* # line 556 "gram.in" */ { if(parstate == OUTSIDE) { newproc(); startproc(ESNULL, CLMAIN); } if(parstate < INDATA) { enddcl(); parstate = INDATA; } } break; case 87: /* # line 570 "gram.in" */ { ftnint junk; if(nextdata(&junk) != NULL) err("too few initializers"); frdata(yypvt[-4].chval); frrpl(); } break; case 88: /* # line 578 "gram.in" */ { frchain(&datastack); curdtp = 0; } break; case 89: /* # line 580 "gram.in" */ { pop_datastack(); } break; case 90: /* # line 582 "gram.in" */ { toomanyinit = NO; } break; case 93: /* # line 587 "gram.in" */ { dataval(ENULL, yypvt[-0].expval); } break; case 94: /* # line 589 "gram.in" */ { dataval(yypvt[-2].expval, yypvt[-0].expval); } break; case 96: /* # line 594 "gram.in" */ { if( yypvt[-1].ival==OPMINUS && ISCONST(yypvt[-0].expval) ) consnegop((Constp)yypvt[-0].expval); yyval.expval = yypvt[-0].expval; } break; case 100: /* # line 606 "gram.in" */ { int k; yypvt[-0].namval->vsave = YES; k = yypvt[-0].namval->vstg; if( ! ONEOF(k, M(STGUNKNOWN)|M(STGBSS)|M(STGINIT)) ) dclerr("can only save static variables", yypvt[-0].namval); } break; case 104: /* # line 620 "gram.in" */ { if(yypvt[-2].namval->vclass == CLUNKNOWN) make_param((struct Paramblock *)yypvt[-2].namval, yypvt[-0].expval); else dclerr("cannot make into parameter", yypvt[-2].namval); } break; case 105: /* # line 627 "gram.in" */ { if(ndim>0) setbound(yypvt[-1].namval, ndim, dims); } break; case 106: /* # line 631 "gram.in" */ { Namep np; np = ( (struct Primblock *) yypvt[-0].expval) -> namep; vardcl(np); if(np->vstg == STGCOMMON) extsymtab[np->vardesc.varno].extinit = YES; else if(np->vstg==STGEQUIV) eqvclass[np->vardesc.varno].eqvinit = YES; else if(np->vstg!=STGINIT && np->vstg!=STGBSS) dclerr("inconsistent storage classes", np); yyval.chval = mkchain((char *)yypvt[-0].expval, CHNULL); } break; case 107: /* # line 643 "gram.in" */ { chainp p; struct Impldoblock *q; pop_datastack(); q = ALLOC(Impldoblock); q->tag = TIMPLDO; (q->varnp = (Namep) (yypvt[-1].chval->datap))->vimpldovar = 1; p = yypvt[-1].chval->nextp; if(p) { q->implb = (expptr)(p->datap); p = p->nextp; } if(p) { q->impub = (expptr)(p->datap); p = p->nextp; } if(p) { q->impstep = (expptr)(p->datap); } frchain( & (yypvt[-1].chval) ); yyval.chval = mkchain((char *)q, CHNULL); q->datalist = hookup(yypvt[-3].chval, yyval.chval); } break; case 108: /* # line 659 "gram.in" */ { if (!datastack) curdtp = 0; datastack = mkchain((char *)curdtp, datastack); curdtp = yypvt[-0].chval; curdtelt = 0; } break; case 109: /* # line 665 "gram.in" */ { yyval.chval = hookup(yypvt[-2].chval, yypvt[-0].chval); } break; case 110: /* # line 669 "gram.in" */ { ndim = 0; } break; case 112: /* # line 673 "gram.in" */ { ndim = 0; } break; case 115: /* # line 678 "gram.in" */ { if(ndim == maxdim) err("too many dimensions"); else if(ndim < maxdim) { dims[ndim].lb = 0; dims[ndim].ub = yypvt[-0].expval; } ++ndim; } break; case 116: /* # line 688 "gram.in" */ { if(ndim == maxdim) err("too many dimensions"); else if(ndim < maxdim) { dims[ndim].lb = yypvt[-2].expval; dims[ndim].ub = yypvt[-0].expval; } ++ndim; } break; case 117: /* # line 700 "gram.in" */ { yyval.expval = 0; } break; case 119: /* # line 705 "gram.in" */ { nstars = 1; labarray[0] = yypvt[-0].labval; } break; case 120: /* # line 707 "gram.in" */ { if(nstars < MAXLABLIST) labarray[nstars++] = yypvt[-0].labval; } break; case 121: /* # line 711 "gram.in" */ { yyval.labval = execlab( convci(toklen, token) ); } break; case 122: /* # line 715 "gram.in" */ { NO66("IMPLICIT statement"); } break; case 125: /* # line 721 "gram.in" */ { if (vartype != TYUNKNOWN) dclerr("-- expected letter range",NPNULL); setimpl(vartype, varleng, 'a', 'z'); } break; case 126: /* # line 726 "gram.in" */ { needkwd = 1; } break; case 130: /* # line 735 "gram.in" */ { setimpl(vartype, varleng, yypvt[-0].ival, yypvt[-0].ival); } break; case 131: /* # line 737 "gram.in" */ { setimpl(vartype, varleng, yypvt[-2].ival, yypvt[-0].ival); } break; case 132: /* # line 741 "gram.in" */ { if(toklen!=1 || token[0]<'a' || token[0]>'z') { dclerr("implicit item must be single letter", NPNULL); yyval.ival = 0; } else yyval.ival = token[0]; } break; case 135: /* # line 755 "gram.in" */ { if(yypvt[-2].namval->vclass == CLUNKNOWN) { yypvt[-2].namval->vclass = CLNAMELIST; yypvt[-2].namval->vtype = TYINT; yypvt[-2].namval->vstg = STGBSS; yypvt[-2].namval->varxptr.namelist = yypvt[-0].chval; yypvt[-2].namval->vardesc.varno = ++lastvarno; } else dclerr("cannot be a namelist name", yypvt[-2].namval); } break; case 136: /* # line 769 "gram.in" */ { yyval.chval = mkchain((char *)yypvt[-0].namval, CHNULL); } break; case 137: /* # line 771 "gram.in" */ { yyval.chval = hookup(yypvt[-2].chval, mkchain((char *)yypvt[-0].namval, CHNULL)); } break; case 138: /* # line 775 "gram.in" */ { switch(parstate) { case OUTSIDE: newproc(); startproc(ESNULL, CLMAIN); case INSIDE: parstate = INDCL; case INDCL: break; case INDATA: errstr( "Statement order error: declaration after DATA", CNULL); break; default: dclerr("declaration among executables", NPNULL); } } break; case 139: /* # line 794 "gram.in" */ { yyval.chval = 0; } break; case 141: /* # line 799 "gram.in" */ { yyval.chval = mkchain((char *)yypvt[-0].expval, CHNULL); } break; case 142: /* # line 801 "gram.in" */ { yyval.chval = hookup(yypvt[-2].chval, mkchain((char *)yypvt[-0].expval,CHNULL) ); } break; case 144: /* # line 806 "gram.in" */ { yyval.expval = yypvt[-1].expval; } break; case 148: /* # line 813 "gram.in" */ { yyval.expval = mkexpr(yypvt[-1].ival, yypvt[-2].expval, yypvt[-0].expval); } break; case 149: /* # line 815 "gram.in" */ { yyval.expval = mkexpr(OPSTAR, yypvt[-2].expval, yypvt[-0].expval); } break; case 150: /* # line 817 "gram.in" */ { yyval.expval = mkexpr(OPSLASH, yypvt[-2].expval, yypvt[-0].expval); } break; case 151: /* # line 819 "gram.in" */ { yyval.expval = mkexpr(OPPOWER, yypvt[-2].expval, yypvt[-0].expval); } break; case 152: /* # line 821 "gram.in" */ { if(yypvt[-1].ival == OPMINUS) yyval.expval = mkexpr(OPNEG, yypvt[-0].expval, ENULL); else yyval.expval = yypvt[-0].expval; } break; case 153: /* # line 826 "gram.in" */ { yyval.expval = mkexpr(yypvt[-1].ival, yypvt[-2].expval, yypvt[-0].expval); } break; case 154: /* # line 828 "gram.in" */ { NO66(".EQV. operator"); yyval.expval = mkexpr(OPEQV, yypvt[-2].expval,yypvt[-0].expval); } break; case 155: /* # line 831 "gram.in" */ { NO66(".NEQV. operator"); yyval.expval = mkexpr(OPNEQV, yypvt[-2].expval, yypvt[-0].expval); } break; case 156: /* # line 834 "gram.in" */ { yyval.expval = mkexpr(OPOR, yypvt[-2].expval, yypvt[-0].expval); } break; case 157: /* # line 836 "gram.in" */ { yyval.expval = mkexpr(OPAND, yypvt[-2].expval, yypvt[-0].expval); } break; case 158: /* # line 838 "gram.in" */ { yyval.expval = mkexpr(OPNOT, yypvt[-0].expval, ENULL); } break; case 159: /* # line 840 "gram.in" */ { NO66("concatenation operator //"); yyval.expval = mkexpr(OPCONCAT, yypvt[-2].expval, yypvt[-0].expval); } break; case 160: /* # line 844 "gram.in" */ { yyval.ival = OPPLUS; } break; case 161: /* # line 845 "gram.in" */ { yyval.ival = OPMINUS; } break; case 162: /* # line 848 "gram.in" */ { yyval.ival = OPEQ; } break; case 163: /* # line 849 "gram.in" */ { yyval.ival = OPGT; } break; case 164: /* # line 850 "gram.in" */ { yyval.ival = OPLT; } break; case 165: /* # line 851 "gram.in" */ { yyval.ival = OPGE; } break; case 166: /* # line 852 "gram.in" */ { yyval.ival = OPLE; } break; case 167: /* # line 853 "gram.in" */ { yyval.ival = OPNE; } break; case 168: /* # line 857 "gram.in" */ { yyval.expval = mkprim(yypvt[-0].namval, LBNULL, CHNULL); } break; case 169: /* # line 859 "gram.in" */ { NO66("substring operator :"); yyval.expval = mkprim(yypvt[-1].namval, LBNULL, yypvt[-0].chval); } break; case 170: /* # line 862 "gram.in" */ { yyval.expval = mkprim(yypvt[-3].namval, mklist(yypvt[-1].chval), CHNULL); } break; case 171: /* # line 864 "gram.in" */ { NO66("substring operator :"); yyval.expval = mkprim(yypvt[-4].namval, mklist(yypvt[-2].chval), yypvt[-0].chval); } break; case 172: /* # line 869 "gram.in" */ { yyval.chval = mkchain((char *)yypvt[-3].expval, mkchain((char *)yypvt[-1].expval,CHNULL)); } break; case 173: /* # line 873 "gram.in" */ { yyval.expval = 0; } break; case 175: /* # line 878 "gram.in" */ { if(yypvt[-0].namval->vclass == CLPARAM) yyval.expval = (expptr) cpexpr( ( (struct Paramblock *) (yypvt[-0].namval) ) -> paramval); } break; case 177: /* # line 885 "gram.in" */ { yyval.expval = mklogcon(1); } break; case 178: /* # line 886 "gram.in" */ { yyval.expval = mklogcon(0); } break; case 179: /* # line 887 "gram.in" */ { yyval.expval = mkstrcon(toklen, token); } break; case 180: /* # line 888 "gram.in" */ { yyval.expval = mkintcon( convci(toklen, token) ); } break; case 181: /* # line 889 "gram.in" */ { yyval.expval = mkrealcon(tyreal, token); } break; case 182: /* # line 890 "gram.in" */ { yyval.expval = mkrealcon(TYDREAL, token); } break; case 184: /* # line 895 "gram.in" */ { yyval.expval = mkcxcon(yypvt[-3].expval,yypvt[-1].expval); } break; case 185: /* # line 899 "gram.in" */ { NOEXT("hex constant"); yyval.expval = mkbitcon(4, toklen, token); } break; case 186: /* # line 902 "gram.in" */ { NOEXT("octal constant"); yyval.expval = mkbitcon(3, toklen, token); } break; case 187: /* # line 905 "gram.in" */ { NOEXT("binary constant"); yyval.expval = mkbitcon(1, toklen, token); } break; case 189: /* # line 911 "gram.in" */ { yyval.expval = yypvt[-1].expval; } break; case 192: /* # line 917 "gram.in" */ { yyval.expval = mkexpr(yypvt[-1].ival, yypvt[-2].expval, yypvt[-0].expval); } break; case 193: /* # line 919 "gram.in" */ { yyval.expval = mkexpr(OPSTAR, yypvt[-2].expval, yypvt[-0].expval); } break; case 194: /* # line 921 "gram.in" */ { yyval.expval = mkexpr(OPSLASH, yypvt[-2].expval, yypvt[-0].expval); } break; case 195: /* # line 923 "gram.in" */ { yyval.expval = mkexpr(OPPOWER, yypvt[-2].expval, yypvt[-0].expval); } break; case 196: /* # line 925 "gram.in" */ { if(yypvt[-1].ival == OPMINUS) yyval.expval = mkexpr(OPNEG, yypvt[-0].expval, ENULL); else yyval.expval = yypvt[-0].expval; } break; case 197: /* # line 930 "gram.in" */ { NO66("concatenation operator //"); yyval.expval = mkexpr(OPCONCAT, yypvt[-2].expval, yypvt[-0].expval); } break; case 199: /* # line 935 "gram.in" */ { if(yypvt[-3].labval->labdefined) execerr("no backward DO loops", CNULL); yypvt[-3].labval->blklevel = blklevel+1; exdo(yypvt[-3].labval->labelno, NPNULL, yypvt[-0].chval); } break; case 200: /* # line 942 "gram.in" */ { exdo(ctls - ctlstack - 2, NPNULL, yypvt[-0].chval); NOEXT("DO without label"); } break; case 201: /* # line 947 "gram.in" */ { exenddo(NPNULL); } break; case 202: /* # line 949 "gram.in" */ { exendif(); thiswasbranch = NO; } break; case 204: /* # line 952 "gram.in" */ { exelif(yypvt[-2].expval); lastwasbranch = NO; } break; case 205: /* # line 954 "gram.in" */ { exelse(); lastwasbranch = NO; } break; case 206: /* # line 956 "gram.in" */ { exendif(); lastwasbranch = NO; } break; case 207: /* # line 960 "gram.in" */ { exif(yypvt[-1].expval); } break; case 208: /* # line 964 "gram.in" */ { yyval.chval = mkchain((char *)yypvt[-2].namval, yypvt[-0].chval); } break; case 210: /* # line 969 "gram.in" */ { yyval.chval = mkchain(CNULL, (chainp)yypvt[-1].expval); } break; case 211: /* # line 973 "gram.in" */ { exequals((struct Primblock *)yypvt[-2].expval, yypvt[-0].expval); } break; case 212: /* # line 975 "gram.in" */ { exassign(yypvt[-0].namval, yypvt[-2].labval); } break; case 215: /* # line 979 "gram.in" */ { inioctl = NO; } break; case 216: /* # line 981 "gram.in" */ { exarif(yypvt[-6].expval, yypvt[-4].labval, yypvt[-2].labval, yypvt[-0].labval); thiswasbranch = YES; } break; case 217: /* # line 983 "gram.in" */ { excall(yypvt[-0].namval, LBNULL, 0, labarray); } break; case 218: /* # line 985 "gram.in" */ { excall(yypvt[-2].namval, LBNULL, 0, labarray); } break; case 219: /* # line 987 "gram.in" */ { if(nstars < MAXLABLIST) excall(yypvt[-3].namval, mklist(yypvt[-1].chval), nstars, labarray); else err("too many alternate returns"); } break; case 220: /* # line 993 "gram.in" */ { exreturn(yypvt[-0].expval); thiswasbranch = YES; } break; case 221: /* # line 995 "gram.in" */ { exstop(yypvt[-2].ival, yypvt[-0].expval); thiswasbranch = yypvt[-2].ival; } break; case 222: /* # line 999 "gram.in" */ { yyval.labval = mklabel( convci(toklen, token) ); } break; case 223: /* # line 1003 "gram.in" */ { if(parstate == OUTSIDE) { newproc(); startproc(ESNULL, CLMAIN); } } break; case 224: /* # line 1012 "gram.in" */ { exgoto(yypvt[-0].labval); thiswasbranch = YES; } break; case 225: /* # line 1014 "gram.in" */ { exasgoto(yypvt[-0].namval); thiswasbranch = YES; } break; case 226: /* # line 1016 "gram.in" */ { exasgoto(yypvt[-4].namval); thiswasbranch = YES; } break; case 227: /* # line 1018 "gram.in" */ { if(nstars < MAXLABLIST) putcmgo(putx(fixtype(yypvt[-0].expval)), nstars, labarray); else err("computed GOTO list too long"); } break; case 230: /* # line 1030 "gram.in" */ { nstars = 0; yyval.namval = yypvt[-0].namval; } break; case 231: /* # line 1034 "gram.in" */ { yyval.chval = (yypvt[-0].expval ? mkchain((char *)yypvt[-0].expval,CHNULL) : CHNULL); } break; case 232: /* # line 1036 "gram.in" */ { if(yypvt[-0].expval) if(yypvt[-2].chval) yyval.chval = hookup(yypvt[-2].chval, mkchain((char *)yypvt[-0].expval,CHNULL)); else yyval.chval = mkchain((char *)yypvt[-0].expval,CHNULL); else yyval.chval = yypvt[-2].chval; } break; case 234: /* # line 1046 "gram.in" */ { if(nstars