1: # include <stdio.h>
2:
3: # define _actsize 2000
4: # define _memsize 3500
5: # define _nstates 500
6: # define _nterms 100
7: # define _nprod 350
8: # define _nnonterm 200
9: # define _tempsize 400
10: # define _cnamsz 2500
11: # define _lsetsize 300
12: # define _wsetsize 150
13:
14: # define _tbitset 8 /* increased from 6 for equel -- -tih */
15:
16: int tbitset; /* size of lookahed sets */
17: int nolook = 0; /* flag to suppress lookahead computations */
18: struct looksets { int lset[ _tbitset ]; } ;
19: struct item { int *pitem; } ;
20:
21: /* this file contains the definitions for most externally known data */
22:
23: int nstate = 0; /* number of states */
24: struct item *pstate[_nstates]; /* pointers to the descriptions of the states */
25: int apstate[_nstates]; /* index to the actions for the states */
26: int tystate[_nstates]; /* contains type information about the states */
27: int stsize = _nstates; /* maximum number of states, at present */
28: int memsiz = _memsize; /* maximum size for productions and states */
29: int mem0[_memsize] ; /* production storage */
30: int *mem = mem0;
31: int amem[_actsize]; /* action table storage */
32: int actsiz = _actsize; /* action table size */
33: int memact = 0; /* next free action table position */
34: int nprod = 1; /* number of productions */
35: int *prdptr[_nprod]; /* pointers to descriptions of productions */
36: int prdlim = _nprod ; /* the maximum number of productions */
37: /* levprd - productions levels to break conflicts */
38: int levprd[_nprod] = {0,0};
39: /* last two bits code associativity:
40: 0 = no definition
41: 1 = left associative
42: 2 = binary
43: 3 = right associative
44: bit 04 is 1 if the production has an action
45: the high 13 bits have the production level
46: */
47: int nterms = 0; /* number of terminals */
48: int tlim = _nterms ; /* the maximum number of terminals */
49: /* the ascii representations of the terminals */
50: int extval = 0; /* start of output values */
51: struct sxxx1 {char *name; int value;} trmset[_nterms];
52: char cnames[_cnamsz];
53: int cnamsz = _cnamsz;
54: char *cnamp;
55: int maxtmp = _tempsize; /* the size of the temp1 array */
56: int temp1[_tempsize]; /* temporary storage, indexed by terms + nterms or states */
57: int temp2[_nnonterm]; /* temporary storage indexed by nonterminals */
58: int trmlev[_nterms]; /* vector with the precedence of the terminals */
59: /* The levels are the same as for levprd, but bit 04 is always 0 */
60: /* the ascii representations of the nonterminals */
61: struct sxxx2 { char *name; } nontrst[_nnonterm];
62: int ntlim = _nnonterm ; /* limit to the number of nonterminals */
63: int indgo[_nstates]; /* index to the stored goto table */
64: int ***pres; /* vector of pointers to the productions yielding each nonterminal */
65: struct looksets **pfirst; /* vector of pointers to first sets for each nonterminal */
66: int *pempty = 0 ; /* table of nonterminals nontrivially deriving e */
67: int nnonter = -1; /* the number of nonterminals */
68: int lastred = 0; /* the number of the last reduction of a state */
69: FILE *ftable; /* y.tab.c file */
70: FILE *Foutput; /* y.output file */
71: int arrndx; /* used in the output of arrays on y.tab.c */
72: int zzcwset = 0;
73: int zzpairs = 0;
74: int zzgoent = 0;
75: int zzgobest = 0;
76: int zzacent = 0;
77: int zzacsave = 0;
78: int zznsave = 0;
79: int zzclose = 0;
80: int zzsrconf = 0;
81: int zzrrconf = 0;
82: char *ctokn;
83: int lineno = 1; /* current input line number */
84: int peekc = -1; /* look-ahead character */
85: int tstates[ _nterms ]; /* states generated by terminal gotos */
86: int ntstates[ _nnonterm ]; /* states generated by nonterminal gotos */
87: int mstates[ _nstates ]; /* chain of overflows of term/nonterm generation lists */
88:
89: struct looksets clset;
90: struct looksets lkst [ _lsetsize ];
91: int nlset = 0; /* next lookahead set index */
92: int lsetsz = _lsetsize; /* number of lookahead sets */
93:
94: struct wset { int *pitem, flag, ws[_tbitset]; } wsets[ _wsetsize ];
95: int cwset;
96: int wssize = _wsetsize;
97:
98: int numbval; /* the value of an input number */
99: int rflag = 0; /* ratfor flag */
100: int sflag = 0; /* suppress crap flag */
101: int oflag = 0; /* optimization flag */
102:
103: int ndeFout = 3; /* number of defined symbols output */
104: int nerrors = 0; /* number of errors */
105: int fatfl = 1; /* if on, error is fatal */
106: int machine; /* has a number describing the machine */
Defined variables
amem
defined in line
31; used 8 times
clset
defined in line
89; used 12 times
cnamp
defined in line
54; used 7 times
ctokn
defined in line
82; used 32 times
cwset
defined in line
95; used 21 times
indgo
defined in line
63; used 2 times
lkst
defined in line
90; used 4 times
mem
defined in line
30; used 26 times
mem0
defined in line
29; used 5 times
nlset
defined in line
91; used 5 times
nnonter
defined in line
67; used 24 times
- in /usr/ingres/source/yyyacc/y4.c line
168,
220,
233,
257
- in /usr/ingres/source/yyyacc/yyy1.c line
168,
174-180(3)
- in /usr/ingres/source/yyyacc/yyy2.c line
208-210(3),
409
- in /usr/ingres/source/yyyacc/yyy3.c line
9-10(2),
33-34(2),
53,
64-67(2),
164-165(2),
210,
237,
243
nprod
defined in line
34; used 16 times
nstate
defined in line
23; used 30 times
- in /usr/ingres/source/yyyacc/y4.c line
13,
91,
178,
187,
199,
263-266(2)
- in /usr/ingres/source/yyyacc/yyy1.c line
169,
181-188(3)
- in /usr/ingres/source/yyyacc/yyy3.c line
78-79(2),
107(2),
121-132(8),
143-147(3),
154,
193-198(2),
207
nterms
defined in line
47; used 38 times
- in /usr/ingres/source/yyyacc/y4.c line
17,
32,
116,
307,
313,
323,
372,
403
- in /usr/ingres/source/yyyacc/yyy1.c line
39,
167-171(2),
179,
283
- in /usr/ingres/source/yyyacc/yyy2.c line
213-227(10),
234-243(5),
252,
273,
404
- in /usr/ingres/source/yyyacc/yyy3.c line
210,
229-243(6)
ntlim
defined in line
62; used 3 times
peekc
defined in line
84; used 15 times
pempty
defined in line
66; used 10 times
prdptr
defined in line
35; used 19 times
pres
defined in line
64; used 10 times
pstate
defined in line
24; used 27 times
- in /usr/ingres/source/yyyacc/y4.c line
267-268(2),
331-332(2),
350-351(2),
393-394(2)
- in /usr/ingres/source/yyyacc/yyy1.c line
183
- in /usr/ingres/source/yyyacc/yyy3.c line
78-79(2),
96-97(2),
107(2),
121,
146-147(2),
154,
194-199(4),
218(2),
264-265(2)
rflag
defined in line
99; used 12 times
temp1
defined in line
56; used 39 times
- in /usr/ingres/source/yyyacc/y4.c line
17-23(4),
34-39(6),
50,
57-62(2),
93-98(2),
233-234(2),
241-245(3),
257,
270,
308-314(4),
323(2),
373,
403
- in /usr/ingres/source/yyyacc/yyy3.c line
210,
228-229(2),
235-243(6)
temp2
defined in line
57; used 2 times
tlim
defined in line
48; used 3 times
trmset
defined in line
51; used 23 times
tystate
defined in line
26; used 28 times
- in /usr/ingres/source/yyyacc/y4.c line
14,
92-98(3),
179-187(4),
200-202(3),
263,
271-276(3),
357-358(2),
368,
383,
398-399(2)
- in /usr/ingres/source/yyyacc/yyy3.c line
112,
131,
197,
208-209(2),
218(2)
wsets
defined in line
94; used 37 times
- in /usr/ingres/source/yyyacc/y4.c line
19,
29-33(2)
- in /usr/ingres/source/yyyacc/yyy3.c line
35-40(2),
57(3),
64,
214-216(3),
223-225(4),
266-268(3),
279-283(3),
293-294(3),
305,
317-319(4),
326-327(2),
333,
349-352(4)
Defined struct's
item
defined in line
19; used 2 times
sxxx1
defined in line
51;
never used
sxxx2
defined in line
61;
never used
wset
defined in line
94;
never used
Defined macros
_nprod
defined in line
7; used 3 times