home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD2.bin
/
bbs
/
gnu
/
f2c-1993.04.28-src.lha
/
f2c-1993.04.28
/
src
/
gram.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-04-28
|
57KB
|
1,830 lines
# 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 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 */
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 178 "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;
typedef int yytabelem;
extern yytabelem yyerrflag;
#ifndef YYMAXDEPTH
#define YYMAXDEPTH 150
#endif
YYSTYPE yylval, yyval;
# 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