📄 gram.c
字号:
# define SEOS 1# define SCOMMENT 2# define SLABEL 3# define SUNKNOWN 4# define SHOLLERITH 5# define SSTRING 6# define SICON 7# define SRCON 8# define SDCON 9# define SBITCON 10# define SOCTCON 11# define SHEXCON 12# define STRUE 13# define SFALSE 14# define SNAME 15# define SNAMEEQ 16# define SFIELD 17# define SSCALE 18# define SINCLUDE 19# define SLET 20# define SASSIGN 21# define SAUTOMATIC 22# define SBACKSPACE 23# define SBLOCK 24# define SCALL 25# define SCHARACTER 26# define SCLOSE 27# define SCOMMON 28# define SCOMPLEX 29# define SCONTINUE 30# define SDATA 31# define SDCOMPLEX 32# define SDIMENSION 33# define SDO 34# define SDOUBLE 35# define SELSE 36# define SELSEIF 37# define SEND 38# define SENDFILE 39# define SENDIF 40# define SENTRY 41# define SEQUIV 42# define SEXTERNAL 43# define SFORMAT 44# define SFUNCTION 45# define SGOTO 46# define SASGOTO 47# define SCOMPGOTO 48# define SARITHIF 49# define SLOGIF 50# define SIMPLICIT 51# define SINQUIRE 52# define SINTEGER 53# define SINTRINSIC 54# define SLOGICAL 55# define SNAMELIST 56# define SOPEN 57# define SPARAM 58# define SPAUSE 59# define SPRINT 60# define SPROGRAM 61# define SPUNCH 62# define SREAD 63# define SREAL 64# define SRETURN 65# define SREWIND 66# define SSAVE 67# define SSTATIC 68# define SSTOP 69# define SSUBROUTINE 70# define STHEN 71# define STO 72# define SUNDEFINED 73# define SWRITE 74# define SLPAR 75# define SRPAR 76# define SEQUALS 77# define SCOLON 78# define SCOMMA 79# define SCURRENCY 80# define SPLUS 81# define SMINUS 82# define SSTAR 83# define SSLASH 84# define SPOWER 85# define SCONCAT 86# define SAND 87# define SOR 88# define SNEQV 89# define SEQV 90# define SNOT 91# define SEQ 92# define SLT 93# define SGT 94# define SLE 95# define SGE 96# define SNE 97# line 98 "gram.in" #ifndef lintstatic char *sccsid = "@(#)gram.head 4.1 (ULTRIX) 7/17/90";#endif lint# line 162 "gram.in"# include "defs.h"# include "data.h"#ifdef SDB# include <a.out.h># ifndef N_SO# include <stab.h># endif#endifstatic int equivlisterr;static int do_name_err;static int nstars;static int ndim;static int vartype;static ftnint varleng;static struct { expptr lb, ub; } dims[MAXDIM+1];static struct Labelblock *labarray[MAXLABLIST];static int lastwasbranch = NO;static int thiswasbranch = NO;extern ftnint yystno;extern flag intonly;ftnint convci();double convcd();expptr mklogcon(), mkaddcon(), mkrealcon(), mkstrcon(), mkbitcon();expptr mkcxcon();struct Listblock *mklist();struct Listblock *mklist();struct Impldoblock *mkiodo();struct Extsym *comblock();# line 199 "gram.in"typedef union { int ival; char *charpval; chainp chval; tagptr tagval; expptr expval; struct Labelblock *labval; struct Nameblock *namval; struct Eqvchain *eqvval; struct Extsym *extval; union Vexpr *vexpval; struct ValList *drvals; struct Vlist *dvals; union Delt *deltp; struct Rpair *rpairp; struct Elist *elistp; } YYSTYPE;#define yyclearin yychar = -1#define yyerrok yyerrflag = 0extern int yychar;extern short yyerrflag;#ifndef YYMAXDEPTH#define YYMAXDEPTH 150#endifYYSTYPE yylval, yyval;# define YYERRCODE 256short yyexca[] ={-1, 1, 0, -1, -2, 0,-1, 20, 1, 31, -2, 255,-1, 42, 1, 111, -2, 255,-1, 144, 1, 271, -2, 219,-1, 164, 1, 292, 79, 292, -2, 219,-1, 219, 78, 210, -2, 176,-1, 242, 75, 255, -2, 252,-1, 268, 1, 313, -2, 180,-1, 272, 1, 322, 79, 322, -2, 182,-1, 322, 78, 211, -2, 178,-1, 352, 1, 294, 15, 294, 75, 294, 79, 294, -2, 220,-1, 430, 78, 131, -2, 128,-1, 452, 92, 0, 93, 0, 94, 0, 95, 0, 96, 0, 97, 0, -2, 190,-1, 469, 1, 316, 79, 316, -2, 180,-1, 471, 1, 318, 79, 318, -2, 180,-1, 473, 1, 320, 79, 320, -2, 180,-1, 530, 79, 316, -2, 180, };# define YYNPROD 327# define YYLAST 1275short yyact[]={ 233, 271, 504, 428, 483, 434, 429, 404, 398, 431, 403, 390, 482, 351, 389, 350, 218, 418, 302, 528, 320, 263, 287, 315, 225, 197, 270, 249, 99, 441, 440, 214, 212, 121, 230, 290, 5, 17, 267, 210, 192, 199, 113, 201, 94, 173, 186, 190, 437, 105, 406, 328, 329, 330, 330, 232, 255, 256, 257, 95, 96, 97, 185, 103, 184, 514, 228, 510, 511, 385, 497, 128, 114, 257, 174, 496, 151, 299, 151, 112, 123, 124, 125, 126, 127, 180, 436, 261, 158, 159, 328, 329, 330, 101, 215, 103, 275, 535, 508, 509, 158, 159, 328, 329, 330, 336, 335, 334, 333, 332, 269, 337, 339, 338, 341, 340, 342, 466, 499, 498, 122, 489, 158, 159, 255, 256, 257, 258, 576, 575, 310, 149, 185, 149, 184, 309, 226, 236, 236, 554, 557, 175, 98, 178, 508, 509, 100, 183, 151, 103, 103, 254, 151, 240, 438, 490, 235, 237, 568, 507, 432, 433, 151, 289, 574, 205, 203, 506, 209, 477, 204, 176, 177, 151, 208, 476, 100, 213, 239, 158, 159, 328, 329, 330, 336, 335, 334, 213, 475, 365, 337, 339, 338, 341, 340, 342, 158, 159, 255, 256, 257, 272, 272, 149, 305, 306, 274, 149, 468, 265, 459, 285, 292, 262, 443, 304, 444, 149, 289, 318, 143, 322, 284, 294, 324, 439, 559, 327, 149, 462, 371, 344, 298, 268, 268, 346, 347, 327, 370, 505, 348, 343, 506, 312, 311, 369, 254, 487, 317, 151, 488, 300, 308, 283, 356, 151, 151, 151, 151, 151, 254, 254, 281, 282, 266, 316, 276, 277, 278, 167, 480, 349, 327, 481, 463, 344, 395, 462, 386, 396, 254, 387, 110, 130, 379, 364, 109, 380, 562, 4, 158, 159, 255, 256, 257, 258, 345, 160, 162, 166, 374, 108, 102, 107, 149, 106, 327, 327, 272, 344, 149, 149, 149, 149, 149, 400, 430, 104, 353, 327, 378, 354, 247, 327, 381, 327, 394, 397, 226, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 384, 372, 426, 217, 425, 409, 327, 565, 327, 327, 327, 366, 447, 564, 367, 368, 151, 254, 327, 405, 213, 254, 254, 254, 254, 254, 325, 563, 558, 326, 377, 219, 313, 562, 555, 345, 561, 375, 376, 102, 102, 102, 102, 464, 179, 373, 484, 556, 467, 182, 495, 187, 188, 189, 436, 442, 520, 195, 198, 144, 492, 164, 215, 427, 479, 272, 272, 272, 187, 206, 207, 149, 461, 478, 103, 215, 491, 313, 291, 150, 181, 297, 243, 494, 352, 242, 238, 244, 493, 158, 159, 255, 256, 257, 258, 501, 503, 469, 471, 473, 222, 219, 515, 512, 513, 191, 236, 522, 202, 200, 327, 327, 327, 327, 327, 327, 327, 327, 327, 327, 519, 523, 438, 102, 517, 521, 288, 254, 500, 502, 161, 518, 317, 134, 265, 216, 323, 526, 525, 103, 231, 470, 472, 474, 484, 303, 327, 345, 391, 516, 187, 467, 293, 527, 327, 534, 531, 532, 533, 30, 241, 221, 537, 92, 536, 541, 6, 543, 546, 542, 547, 272, 272, 272, 539, 548, 246, 551, 552, 549, 550, 553, 81, 236, 327, 129, 80, 524, 79, 78, 560, 163, 116, 409, 409, 409, 77, 76, 567, 75, 60, 566, 48, 530, 471, 473, 47, 405, 544, 544, 545, 545, 415, 423, 424, 44, 148, 32, 148, 570, 569, 138, 327, 42, 111, 573, 194, 245, 388, 327, 193, 259, 571, 383, 382, 327, 301, 187, 196, 578, 327, 260, 26, 25, 393, 198, 24, 470, 472, 474, 577, 23, 279, 460, 22, 21, 9, 8, 158, 159, 328, 329, 330, 336, 335, 334, 333, 332, 445, 337, 339, 338, 341, 340, 342, 158, 159, 255, 256, 257, 258, 158, 159, 328, 329, 330, 336, 7, 148, 2, 211, 314, 148, 158, 159, 328, 329, 330, 336, 335, 402, 435, 148, 264, 337, 339, 338, 341, 340, 342, 407, 414, 408, 148, 154, 295, 155, 156, 157, 20, 50, 572, 152, 153, 103, 288, 286, 224, 355, 321, 319, 392, 296, 91, 359, 360, 361, 362, 363, 458, 252, 303, 52, 331, 158, 159, 328, 329, 330, 336, 335, 334, 333, 332, 19, 337, 339, 338, 341, 340, 342, 446, 54, 36, 220, 3, 158, 159, 328, 329, 330, 336, 335, 334, 333, 332, 1, 337, 339, 338, 341, 340, 342, 0, 229, 0, 0, 0, 0, 148, 158, 159, 357, 0, 358, 148, 148, 148, 148, 148, 234, 0, 0, 264, 0, 0, 264, 264, 0, 0, 0, 0, 0, 529, 158, 159, 328, 329, 330, 336, 529, 529, 529, 0, 12, 337, 339, 338, 341, 340, 342, 0, 0, 0, 465, 538, 0, 0, 540, 10, 56, 45, 73, 85, 14, 61, 70, 90, 37, 66, 46, 55, 68, 72, 31, 67, 34, 33, 11, 87, 35, 18, 40, 38, 28, 16, 57, 58, 59, 49, 53, 41, 88, 64, 39, 69, 43, 89, 29, 62, 84, 13, 0, 82, 65, 51, 86, 27, 74, 63, 15, 399, 0, 71, 83, 148, 158, 159, 328, 329, 330, 336, 335, 334, 333, 332, 264, 337, 339, 338, 341, 340, 342, 0, 93, 0, 0, 0, 158, 159, 328, 329, 330, 336, 335, 334, 333, 332, 486, 337, 339, 338, 341, 340, 342, 154, 0, 155, 156, 157, 0, 0, 0, 152, 153, 103, 115, 0, 118, 119, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131, 132, 0, 0, 133, 0, 135, 136, 137, 0, 0, 0, 139, 140, 141, 154, 142, 155, 156, 157, 0, 0, 0, 152, 153, 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 168, 169, 170, 171, 172, 0, 0, 0, 0, 0, 229, 223, 0, 0, 264, 0, 158, 159, 227, 154, 0, 155, 156, 157, 0, 0, 234, 152, 153, 103, 154, 0, 155, 156, 157, 0, 0, 0, 152, 153, 103, 0, 0, 154, 0, 155, 156, 157, 0, 0, 229, 152, 153, 103, 0, 0, 158, 159, 485, 0, 154, 0, 155, 156, 157, 0, 234, 0, 152, 153, 103, 154, 0, 155, 156, 157, 0, 0, 0, 152, 153, 103, 154, 0, 155, 156, 157, 0, 0, 229, 152, 153, 103, 253, 0, 158, 159, 227, 0, 0, 229, 0, 0, 0, 0, 234, 158, 159, 401, 0, 0, 0, 0, 229, 0, 0, 234, 0, 0, 158, 159, 0, 0, 154, 0, 155, 156, 157, 0, 234, 273, 152, 153, 103, 0, 0, 158, 159, 0, 0, 0, 307, 0, 0, 0, 0, 234, 158, 159, 0, 0, 0, 248, 0, 0, 0, 0, 234, 158, 159, 250, 0, 251, 412, 413, 415, 423, 424, 422, 421, 420, 410, 411, 215, 154, 0, 155, 156, 157, 0, 0, 0, 152, 153, 103, 0, 0, 0, 0, 0, 0, 0, 0, 147, 0, 0, 0, 0, 0, 158, 159, 145, 0, 146, 0, 0, 0, 0, 0, 56, 45, 0, 85, 0, 61, 0, 90, 0, 0, 46, 0, 154, 0, 155, 156, 157, 0, 0, 87, 152, 153, 103, 0, 419, 0, 57, 58, 59, 49, 416, 417, 88, 0, 0, 248, 0, 89, 0, 62, 84, 158, 159, 82, 0, 51, 86, 0, 0, 63, 0, 117, 0, 154, 83, 155, 156, 157, 0, 0, 73, 152, 153, 103, 70, 0, 0, 66, 0, 0, 68, 72, 0, 67, 0, 0, 0, 0, 0, 0, 0, 0, 248, 0, 0, 0, 0, 0, 158, 159, 280, 64, 0, 69, 0, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 74, 0, 0, 0, 0, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, 0, 0, 0, 0, 0, 158, 159, 165 };short yypact[]={-1000, 33, 504, 759,-1000,-1000,-1000,-1000,-1000,-1000, 497,-1000,-1000,-1000,-1000,-1000,-1000, 97, 463, 238, 226, 224, 222, 207, 203,-1000, -5,-1000,-1000,-1000,-1000,-1000,1123,-1000,-1000,-1000, 37,-1000,-1000,-1000,-1000,-1000, 67,-1000, 463,-1000,-1000,-1000,-1000,-1000, 397,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,1052, 394,1191, 394, 190,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000, 463, 463, 463, 463,-1000, 463,-1000, 344,-1000,-1000, 463, -22, 463, 463, 463, 369,-1000,-1000, 463, 48, 373,-1000,-1000,-1000, 372,-1000,-1000,-1000,-1000, 48, 463, 463, 369,-1000, 399, 265, 365, 493,-1000, 364, 869, 972, 972, 350, 399, 492, 463, 346, 463,-1000,-1000,-1000,-1000,1011,-1000,-1000, 533,1103,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,1011, 134, 185,-1000,-1000, 989, 989,-1000,-1000,-1000,-1000,1150,-1000,-1000,-1000, 344, 344, 463,-1000,-1000, 135, 342, 67,-1000, 476,-1000, 342,-1000,-1000,-1000, 463,-1000, 345,1181, -7, 172,-1000,-1000,-1000, 463, 492, 972,1000,-1000, 463,-1000,-1000,-1000,-1000,-1000, 51,-1000, 341,-1000,-1000, 399, 972,-1000, 972, 403,-1000, 972,-1000, 289,-1000, 776, 492,-1000, 972,-1000,-1000,-1000, 972, 972,-1000, 776,-1000, 972,-1000,-1000,-1000, 67, 492,-1000, 347, 242,-1000,1103,-1000,-1000,-1000, 648,-1000,1103,1103,1103,1103,1103, -12, 209, 110, 398,-1000,-1000, 398, 398,-1000, 166, 159, 151, 776,-1000, 989,-1000,-1000,-1000,-1000,-1000, 533,-1000,-1000,-1000, 344, 342,-1000, 208,-1000,-1000,-1000, 37,-1000, 463, -15,-1000, 202,-1000, 472,-1000, 463, 48, 200,-1000, 250,-1000, 754, 776, 959,-1000,1092, 399, 327,-1000, 79, 146,-1000, 341,-1000, 776, 318, 136, 137, 776, 463, 624,-1000, 948, 972, 972, 972, 972, 972, 972, 972, 972, 972, 972,-1000,-1000,-1000,-1000,-1000,-1000,-1000, 602, 131, -31, 672, 516, 336, 198,-1000,-1000,-1000,1011, 41, 776,-1000,-1000, -27, -12, -12, -12, 115,-1000, 398, 110, 129, 110, 989, 989, 989, 109, 96, 90,-1000,-1000,-1000, 37,-1000, 80,-1000, 194, 909,-1000,-1000,-1000, 463, 171,-1000, 39,-1000, 76,-1000,-1000,-1000, 463, 972, 67, 351,-1000, 313, -9,-1000,-1000, 36, 35,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000, 544, 544,-1000, 972,-1000,-1000,-1000,-1000,-1000,-1000,-1000, 79, 163, 81, 17, -16, 386, 386,-1000, -20,-1000,-1000, 79, 399, 327,-1000, 320, 972, 972,-1000, 492,-1000, -32, -31, -31, -31, 539, 98, 98, 551, 672, 7,-1000, 972,-1000, 492, 492, 67,-1000, 533,-1000,-1000, 398,-1000,-1000,-1000,-1000,-1000,-1000, 989, 989, 989,-1000,-1000,-1000, 909,-1000,-1000, 19,-1000,-1000,-1000, 472, 472, 463,-1000, 776, 463,-1000,-1000,-1000,1092,1092,1092,-1000,-1000,-1000,-1000, 17,-1000, 79, 79, 386, 386, 386, 386, -16, -16, 386, 63, 296,-1000,-1000,-1000, 972, 310, 776, 61, 291, 150,-1000, 972, 299, 295, 291, 290, 276, 270,-1000, 909,-1000,-1000,-1000,-1000, 211,-1000,-1000,-1000,-1000,-1000,-1000, 17, 82, -16, -16,-1000,-1000,-1000,-1000, 79,-1000, 492,-1000,-1000, 776,-1000, 972,-1000,-1000,-1000,-1000, 776,-1000, 88, 17, 50, 49, 776,-1000, 492, 972,-1000, 776 };short yypgo[]={ 0, 715, 704, 13, 703, 110, 21, 33, 37, 702, 701, 693, 11, 0, 682, 681, 679, 672, 670, 669, 668, 19, 666, 85, 665, 660, 87, 38, 26, 16, 283, 22, 659, 46, 74, 45, 479, 1, 66, 20, 418, 322, 4, 24, 34, 55, 658, 41, 654, 7, 651, 17, 650, 50, 649, 48, 640, 5, 9, 2, 6, 10, 639, 3, 30, 23, 31, 32, 29, 630, 629, 628, 626, 596, 595, 853, 44, 594, 593, 590, 585, 582, 581, 42, 577, 575, 28, 35, 43, 8, 47, 25, 18, 573, 572, 12, 15, 40, 569, 567, 565, 14, 563, 562, 560, 39, 498, 556, 554, 545, 541, 539, 538, 220, 536, 535, 530, 528, 527, 525, 96, 521, 515, 27 };short yyr1[]={ 0, 1, 1, 71, 71, 71, 71, 71, 71, 71, 2, 72, 72, 72, 72, 72, 72, 76, 34, 30, 35, 35, 23, 23, 23, 24, 24, 31, 31, 17, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 11, 11, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 7, 7, 7, 46, 46, 46, 46, 47, 47, 77, 77, 78, 78, 79, 79, 90, 48, 48, 84, 84, 91, 91, 85, 85, 92, 33, 87, 87, 94, 93, 93, 95, 95, 42, 42, 96, 96, 3, 80, 80, 97, 100, 98, 99, 99, 101, 101, 12, 82, 82, 102, 18, 18, 83, 81, 103, 103, 104, 105, 70, 70, 62, 62, 67, 67, 67, 67, 67, 55, 64, 68, 63, 63, 60, 60, 66, 69, 69, 65, 65, 65, 65, 61, 61, 61, 49, 49, 49, 49, 49, 49, 49, 49, 49, 54, 54, 54, 53, 50, 50, 50, 51, 51, 52, 52, 52, 59, 59, 59, 59, 59, 58, 58, 58, 57, 57, 56, 56, 56, 19, 19, 20, 20, 37, 37, 37, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 13, 13, 14, 14, 14, 14, 14, 14, 36, 36, 36, 36, 29, 39, 39, 45, 45, 45, 45, 45, 45, 44, 40, 40, 41, 41, 41, 41, 41, 41, 41, 41, 74, 74, 74, 74, 74, 74, 74, 107, 21, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 4, 108, 109, 109, 109, 109, 86, 86, 32, 22, 22, 43, 43, 15, 15, 25, 25, 75, 88, 89, 110, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 112, 119, 119, 119, 114, 121, 121, 121, 116, 116, 113, 113, 122, 122, 123, 123, 123, 123, 123, 123, 16, 115, 117, 118, 118, 26, 26, 6, 6, 27, 27, 27, 28, 28, 28, 28, 28, 28, 5, 5, 5, 5, 120 };short yyr2[]={ 0, 0, 3, 2, 2, 2, 3, 3, 2, 1, 1, 3, 3, 4, 4, 5, 3, 0, 1, 1,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -