📄 gram.c
字号:
# 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# define SBYTE 100/* # line 125 "gram.in" */#include "defs.h"#include "p1defs.h"static int nstars; /* Number of labels in an alternate return CALL */static int datagripe;static int ndim;static int vartype;int new_dcl;static ftnint varleng;static struct Dims dims[MAXDIM+1];extern struct Labelblock **labarray; /* Labels in an alternate return CALL */extern int maxlablist;/* 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 */#define ESNULL (Extsym *)0#define NPNULL (Namep)0#define LBNULL (struct Listblock *)0 static voidpop_datastack(Void) { chainp d0 = datastack; if (d0->datap) curdtp = (chainp)d0->datap; datastack = d0->nextp; d0->nextp = 0; frchain(&d0); }/* # line 170 "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 = 0extern int yychar;typedef int yytabelem;extern yytabelem yyerrflag;#ifndef YYMAXDEPTH#define YYMAXDEPTH 150#endifYYSTYPE yylval, yyval;# define YYERRCODE 256yytabelem yyexca[] ={-1, 1, 0, -1, -2, 0,-1, 20, 1, 38, -2, 229,-1, 24, 1, 42, -2, 229,-1, 123, 6, 241, -2, 229,-1, 151, 1, 245, -2, 189,-1, 175, 1, 266, 78, 266, -2, 189,-1, 224, 77, 174, -2, 140,-1, 246, 74, 229, -2, 226,-1, 272, 1, 287, -2, 144,-1, 276, 1, 296, 78, 296, -2, 146,-1, 329, 77, 175, -2, 142,-1, 359, 1, 268, 14, 268, 74, 268, 78, 268, -2, 190,-1, 437, 91, 0, 92, 0, 93, 0, 94, 0, 95, 0, 96, 0, -2, 154,-1, 454, 1, 290, 78, 290, -2, 144,-1, 456, 1, 292, 78, 292, -2, 144,-1, 458, 1, 294, 78, 294, -2, 144,-1, 460, 1, 297, 78, 297, -2, 145,-1, 505, 78, 290, -2, 144, };# define YYNPROD 302# define YYLAST 1385yytabelem yyact[]={ 238, 275, 472, 318, 317, 413, 421, 298, 471, 305, 414, 398, 387, 358, 129, 267, 357, 327, 293, 400, 253, 202, 296, 230, 399, 223, 304, 100, 5, 117, 17, 265, 185, 204, 314, 274, 200, 211, 104, 271, 119, 337, 203, 184, 261, 121, 237, 120, 107, 235, 196, 102, 112, 122, 397, 513, 104, 105, 166, 167, 335, 336, 337, 343, 342, 341, 340, 339, 191, 344, 346, 345, 348, 347, 349, 396, 312, 158, 106, 158, 310, 273, 166, 167, 259, 260, 261, 262, 115, 130, 279, 397, 131, 132, 133, 134, 536, 136, 522, 476, 484, 138, 466, 166, 167, 335, 336, 337, 343, 342, 341, 340, 339, 540, 344, 346, 345, 348, 347, 349, 103, 95, 319, 156, 295, 156, 335, 336, 337, 118, 187, 188, 259, 260, 261, 104, 96, 97, 98, 526, 186, 523, 410, 101, 231, 241, 241, 409, 195, 194, 528, 212, 485, 447, 481, 158, 463, 220, 258, 158, 244, 240, 242, 166, 167, 335, 336, 337, 214, 99, 221, 219, 216, 158, 166, 167, 335, 336, 337, 343, 342, 341, 215, 104, 158, 344, 346, 345, 348, 347, 349, 166, 167, 335, 336, 337, 343, 103, 103, 103, 103, 156, 190, 101, 121, 156, 120, 193, 462, 104, 197, 198, 199, 461, 372, 321, 322, 207, 278, 156, 301, 189, 289, 300, 325, 316, 329, 276, 276, 331, 156, 453, 334, 197, 217, 218, 351, 309, 311, 444, 353, 354, 334, 269, 290, 355, 350, 266, 429, 246, 258, 248, 482, 158, 251, 483, 287, 288, 363, 158, 158, 158, 158, 158, 258, 258, 469, 324, 378, 470, 291, 280, 281, 282, 356, 464, 334, 295, 465, 379, 451, 4, 377, 428, 258, 166, 167, 259, 260, 261, 262, 103, 233, 448, 294, 376, 447, 270, 373, 156, 401, 374, 375, 208, 178, 156, 156, 156, 156, 156, 118, 393, 315, 382, 320, 113, 418, 407, 197, 419, 408, 391, 334, 334, 392, 351, 334, 276, 111, 425, 334, 151, 334, 175, 411, 231, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 404, 157, 110, 402, 360, 406, 334, 361, 334, 334, 334, 432, 389, 381, 109, 108, 158, 258, 334, 423, 420, 258, 258, 258, 258, 258, 388, 236, 383, 384, 332, 495, 222, 333, 334, 224, 449, 423, 371, 537, 533, 532, 452, 166, 167, 259, 260, 261, 262, 531, 527, 473, 401, 530, 525, 403, 197, 166, 167, 259, 260, 261, 156, 475, 493, 468, 417, 467, 427, 104, 297, 446, 422, 137, 480, 477, 487, 104, 489, 491, 276, 276, 276, 150, 241, 497, 430, 385, 334, 334, 334, 334, 334, 334, 334, 334, 334, 334, 404, 498, 496, 402, 404, 488, 155, 258, 155, 494, 486, 192, 308, 503, 455, 457, 459, 501, 286, 500, 247, 506, 507, 508, 243, 452, 272, 272, 473, 227, 334, 307, 502, 401, 509, 512, 224, 201, 511, 269, 213, 517, 210, 516, 334, 518, 334, 480, 334, 521, 294, 519, 515, 241, 334, 403, 524, 514, 249, 403, 529, 172, 263, 171, 173, 177, 142, 276, 276, 276, 330, 535, 534, 492, 30, 104, 264, 315, 415, 404, 510, 538, 402, 352, 155, 388, 334, 283, 155, 209, 245, 226, 334, 93, 6, 334, 539, 250, 82, 455, 457, 459, 155, 268, 81, 80, 79, 174, 124, 78, 541, 504, 77, 155, 76, 60, 49, 48, 45, 504, 504, 504, 33, 114, 206, 412, 380, 205, 395, 394, 299, 303, 479, 306, 403, 135, 390, 313, 116, 504, 26, 25, 359, 520, 24, 23, 320, 166, 167, 259, 260, 261, 262, 22, 21, 386, 362, 285, 9, 8, 7, 2, 366, 367, 368, 369, 370, 302, 20, 165, 51, 490, 352, 292, 229, 328, 326, 416, 92, 256, 53, 338, 155, 19, 55, 37, 225, 3, 155, 155, 155, 155, 155, 1, 0, 0, 268, 460, 0, 268, 268, 0, 166, 167, 335, 336, 337, 343, 342, 341, 340, 339, 0, 344, 346, 345, 348, 347, 349, 166, 167, 335, 336, 337, 343, 454, 456, 458, 0, 0, 344, 346, 345, 348, 347, 349, 0, 306, 0, 445, 0, 0, 0, 0, 166, 167, 335, 336, 337, 343, 342, 341, 340, 339, 352, 344, 346, 345, 348, 347, 349, 443, 0, 0, 0, 450, 166, 167, 335, 336, 337, 343, 342, 341, 340, 339, 0, 344, 346, 345, 348, 347, 349, 166, 167, 335, 336, 337, 343, 342, 0, 155, 0, 499, 344, 346, 345, 348, 347, 349, 0, 0, 268, 0, 0, 0, 0, 0, 431, 0, 505, 456, 458, 166, 167, 335, 336, 337, 343, 342, 341, 340, 339, 0, 344, 346, 345, 348, 347, 349, 0, 0, 0, 0, 0, 0, 424, 0, 478, 0, 306, 166, 167, 335, 336, 337, 343, 342, 341, 340, 339, 0, 344, 346, 345, 348, 347, 349, 166, 167, 335, 336, 337, 343, 342, 341, 340, 339, 0, 344, 346, 345, 348, 347, 349, 0, 0, 0, 0, 0, 0, 0, 0, 268, 161, 162, 163, 164, 170, 169, 168, 159, 160, 104, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 306, 10, 56, 46, 73, 86, 14, 61, 70, 91, 38, 66, 47, 42, 68, 72, 31, 67, 35, 34, 11, 88, 36, 18, 41, 39, 28, 16, 57, 58, 59, 50, 54, 43, 89, 64, 40, 69, 44, 90, 29, 62, 85, 13, 0, 83, 65, 52, 87, 27, 74, 63, 15, 73, 0, 71, 84, 70, 0, 0, 66, 0, 0, 68, 72, 0, 67, 161, 162, 163, 164, 170, 169, 168, 159, 160, 104, 0, 0, 0, 32, 0, 0, 75, 64, 0, 69, 0, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 74, 0, 0, 0, 0, 71, 161, 162, 163, 164, 170, 169, 168, 159, 160, 104, 0, 161, 162, 163, 164, 170, 169, 168, 159, 160, 104, 0, 0, 0, 0, 0, 0, 75, 0, 0, 0, 234, 0, 0, 0, 0, 0, 166, 167, 364, 0, 365, 0, 0, 0, 0, 0, 239, 161, 162, 163, 164, 170, 169, 168, 159, 160, 104, 0, 161, 162, 163, 164, 170, 169, 168, 159, 160, 104, 234, 228, 0, 0, 0, 0, 166, 167, 232, 0, 0, 234, 0, 0, 0, 0, 239, 166, 167, 474, 0, 0, 0, 0, 0, 94, 0, 239, 161, 162, 163, 164, 170, 169, 168, 159, 160, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 234, 0, 0, 0, 0, 0, 166, 167, 232, 123, 0, 234, 126, 127, 128, 0, 239, 166, 167, 426, 0, 0, 0, 0, 139, 140, 0, 239, 141, 0, 143, 144, 145, 0, 0, 146, 147, 148, 0, 149, 0, 0, 0, 0, 0, 0, 0, 0, 0, 234, 0, 0, 0, 0, 0, 166, 167, 0, 0, 179, 180, 181, 182, 183, 0, 239, 161, 162, 163, 164, 170, 169, 168, 159, 160, 104, 0, 161, 162, 163, 164, 170, 169, 168, 159, 160, 104, 0, 161, 162, 163, 164, 170, 169, 168, 159, 160, 104, 257, 161, 162, 163, 164, 170, 169, 168, 159, 160, 104, 0, 161, 162, 163, 164, 170, 169, 168, 159, 160, 104, 161, 162, 163, 164, 170, 169, 168, 159, 160, 104, 0, 0, 0, 0, 0, 277, 0, 0, 0, 0, 0, 166, 167, 0, 0, 0, 323, 0, 0, 0, 0, 239, 166, 167, 0, 0, 0, 252, 0, 0, 0, 0, 239, 166, 167, 254, 0, 255, 154, 0, 0, 0, 0, 0, 166, 167, 152, 0, 153, 252, 0, 0, 0, 0, 0, 166, 167, 284, 0, 154, 0, 0, 0, 0, 0, 166, 167, 176, 161, 162, 163, 164, 170, 169, 168, 159, 160, 104, 161, 162, 163, 164, 170, 169, 168, 159, 160, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 46, 0, 86, 0, 61, 0, 91, 0, 0, 47, 0, 0, 0, 405, 0, 0, 0, 0, 88, 166, 167, 0, 0, 252, 0, 57, 58, 59, 50, 166, 167, 89, 0, 0, 0, 0, 90, 0, 62, 85, 0, 0, 83, 0, 52, 87, 0, 0, 63, 0, 125, 0, 0, 84 };yytabelem yypact[]={-1000, 25, 537, 838,-1000,-1000,-1000,-1000,-1000,-1000, 532,-1000,-1000,-1000,-1000,-1000,-1000, 125, 505, -21, 283, 282, 270, 250, 65, 237, 5, 121,-1000,-1000,-1000,-1000,-1000,1311,-1000,-1000,-1000, 7,-1000,-1000,-1000,-1000,-1000,-1000,-1000, 505,-1000,-1000,-1000,-1000,-1000, 436,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,1171, 431,1192, 431, 226,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000, 505, 505, 505, 505,-1000, 505,-1000, 381,-1000,-1000, 505,-1000, -38, 505, 505, 505, 407,-1000,-1000,-1000, 505, 225,-1000,-1000,-1000,-1000, 519, 412, 65,-1000,-1000, 410,-1000,-1000,-1000,-1000, 121, 505, 505, 407,-1000,-1000, 302, 406, 529,-1000, 399, 955,1052,1052, 394, 528, 505, 390, 505,-1000,-1000,-1000,-1000,1160,-1000,-1000, 2,1280,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,1160, 169, 219,-1000,-1000,1138,1138,-1000,-1000,-1000,-1000,1182, 388,-1000,-1000, 381, 381, 505,-1000,-1000, 195, 342,-1000, 65,-1000, 342,-1000,-1000,-1000, 505,-1000, 401,-1000, 382, 887, -3, 121, -7, 505, 528, 24,1052,1149,-1000, 505,-1000,-1000,-1000,-1000,-1000,1052,-1000,1052, 443,-1000,1052,-1000, 301,-1000, 722, 528,-1000,1052,-1000,-1000,-1000,1052,1052,-1000, 722,-1000,1052,-1000,-1000, 65, 528,-1000, 511, 275,-1000,1280,-1000,-1000,-1000, 917,-1000,1280,1280,1280,1280,1280, -40, 309, 136, 409,-1000,-1000, 409, 409,-1000, 217, 204, 190, 722,-1000,1138,-1000,-1000,-1000,-1000,-1000, 2,-1000,-1000, 358,-1000,-1000, 381,-1000,-1000, 246,-1000,-1000,-1000, 7,-1000, -24,1270, 505,-1000, 242,-1000, 64,-1000,-1000, 401, 508,-1000, 505,-1000,-1000, 241,-1000, 290,-1000,-1000,-1000, 344, 289, 705, 722,1014,-1000, 722, 339, 206, 170, 722, 505, 677,-1000,1003,1052,1052,1052,1052,1052,1052,1052,1052,1052,1052,-1000,-1000,-1000,-1000,-1000,-1000,-1000, 630, 161, -43, 583, 608, 343, 218,-1000,-1000,-1000,1160, 205, 722,-1000,-1000, 50, -40, -40, -40, 323,-1000, 409, 136, 153, 136,1138,1138,1138, 566, 135, 130, 78,-1000,-1000,-1000, 200,-1000, 26,-1000, 342,-1000, 42,-1000, 191, 966,-1000,1270,-1000,-1000, 17, 823,-1000,-1000,-1000,1052,-1000,-1000, 505,-1000, 401, 76, 177,-1000, 19,-1000, 74,-1000,-1000, 505,1052, 65,1052,1052, 447,-1000, 335, 303,1052,1052,-1000, 528,-1000, 44, -43, -43, -43, 111, 94, 94, 647, 583, 83,-1000,1052,-1000, 528, 528, 65,-1000, 2,-1000,-1000, 409,-1000,-1000,-1000,-1000,-1000,-1000,-1000,1138,1138,1138,-1000, 515, 510, 7,-1000,-1000, 966,-1000,-1000, -22,-1000,-1000,1270,-1000,-1000,-1000,-1000, 401,-1000, 508, 508, 505,-1000, 722, 24, 23, 63, 722,-1000,-1000,-1000,1052, 325, 722, 61, 321, 75,-1000,1052, 324, 307, 321, 320, 312, 311,-1000,-1000,-1000,-1000, 966,-1000,-1000, 13, 310,-1000,-1000,-1000,-1000,-1000,1052,-1000,-1000, 528,-1000,-1000, 722,-1000,-1000,-1000,-1000,-1000, 722,-1000,-1000, 722, 35, 528,-1000 };yytabelem yypgo[]={ 0, 637, 631, 13, 630, 81, 15, 30, 629, 628, 627, 10, 0, 625, 624, 623, 14, 622, 9, 26, 621, 620, 619, 3, 4, 618, 68, 617, 615, 31, 39, 35, 25, 101, 18, 614, 50, 373, 1, 292, 17, 347, 254, 2, 19, 24, 23, 49, 46, 613, 612, 40, 32, 43, 611, 605, 604, 603, 602,1054, 121, 601, 599, 12, 598, 597, 589, 588, 585, 584, 582, 53, 581, 27, 580, 22, 42, 7, 37, 6, 36, 579, 21, 576, 574, 11, 29, 34, 573, 572, 8, 16, 33, 571, 569, 568, 5, 567, 518, 566, 562, 561, 560, 559, 558, 429, 556, 553, 551, 550, 549, 548, 90, 542, 541, 20 };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,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -