1: # include "mfile1"
2:
3: /* communication between lexical routines */
4:
5: char ftitle[100] = ""; /* title of the file */
6: int lineno; /* line number of the input file */
7:
8: CONSZ lastcon; /* the last constant read by the lexical analyzer */
9: double dcon; /* the last double read by the lexical analyzer */
10:
11:
12: /* symbol table maintainence */
13:
14: struct symtab stab[SYMTSZ+1]; /* one extra slot for scratch */
15:
16: int curftn; /* "current" function */
17: int ftnno; /* "current" function number */
18:
19: int curclass, /* current storage class */
20: instruct, /* "in structure" flag */
21: stwart, /* for accessing names which are structure members or names */
22: blevel, /* block level: 0 for extern, 1 for ftn args, >=2 inside function */
23: curdim; /* current offset into the dimension table */
24:
25: int dimtab[ DIMTABSZ ];
26:
27: int paramstk[ PARAMSZ ]; /* used in the definition of function parameters */
28: int paramno; /* the number of parameters */
29: int autooff, /* the next unused automatic offset */
30: argoff, /* the next unused argument offset */
31: strucoff; /* the next structure offset position */
32: int regvar; /* the next free register for register variables */
33: int minrvar; /* the smallest that regvar gets witing a function */
34: OFFSZ inoff; /* offset of external element being initialized */
35: int brkflag = 0; /* complain about break statements not reached */
36:
37: struct sw swtab[SWITSZ]; /* table for cases within a switch */
38: struct sw *swp; /* pointer to next free entry in swtab */
39: int swx; /* index of beginning of cases for current switch */
40:
41: /* debugging flag */
42: int xdebug = 0;
43:
44: int strflg; /* if on, strings are to be treated as lists */
45:
46: int reached; /* true if statement can be reached... */
47:
48: int idname; /* tunnel to buildtree for name id's */
49:
50:
51: NODE node[TREESZ];
52:
53: int cflag = 0; /* do we check for funny casts */
54: int hflag = 0; /* do we check for various heuristics which may indicate errors */
55: int pflag = 0; /* do we check for portable constructions */
56:
57: int brklab;
58: int contlab;
59: int flostat;
60: int retlab = NOLAB;
61: int retstat;
62:
63: /* save array for break, continue labels, and flostat */
64:
65: int asavbc[BCSZ];
66: int *psavbc = asavbc ;
67:
68: static char *
69: ccnames[] = { /* names of storage classes */
70: "SNULL",
71: "AUTO",
72: "EXTERN",
73: "STATIC",
74: "REGISTER",
75: "EXTDEF",
76: "LABEL",
77: "ULABEL",
78: "MOS",
79: "PARAM",
80: "STNAME",
81: "MOU",
82: "UNAME",
83: "TYPEDEF",
84: "FORTRAN",
85: "ENAME",
86: "MOE",
87: "UFORTRAN",
88: "USTATIC",
89: };
90:
91: char * scnames( c ) register c; {
92: /* return the name for storage class c */
93: static char buf[12];
94: if( c&FIELD ){
95: sprintf( buf, "FIELD[%d]", c&FLDSIZ );
96: return( buf );
97: }
98: return( ccnames[c] );
99: }
Defined functions
Defined variables
cflag
defined in line
53;
never used
dcon
defined in line
9;
never used
ftitle
defined in line
5;
never used
ftnno
defined in line
17;
never used
hflag
defined in line
54;
never used
lineno
defined in line
6;
never used
pflag
defined in line
55;
never used
stab
defined in line
14;
never used
swp
defined in line
38;
never used
swtab
defined in line
37;
never used
swx
defined in line
39;
never used