1: /* (c) 1979 Regents of the University of California */
2: #include <stdio.h>
3: #ifndef SMALL
4: # define _actsize 2500
5: # define _memsize 3000
6: # define _nstates 700
7: # define _nterms 95
8: # define _nprod 300
9: # define _nnonterm 150
10: # define _tempsize 700
11: # define _cnamsz 3500
12: # define _lsetsize 600
13: # define _wsetsize 400
14: #else
15: # define _actsize 2000
16: # define _memsize 2500
17: # define _nstates 600
18: # define _nterms 95
19: # define _nprod 250
20: # define _nnonterm 150
21: # define _tempsize 700
22: # define _cnamsz 3200
23: # define _lsetsize 500
24: # define _wsetsize 350
25: #endif
26:
27: # define _tbitset 6
28:
29: int tbitset; /* size of lookahed sets */
30: int nolook = 0; /* flag to suppress lookahead computations */
31: struct looksets { int lset[ _tbitset ]; } ;
32: struct item { int *pitem; } ;
33:
34: /* this file contains the definitions for most externally known data */
35:
36: int nstate = 0; /* number of states */
37: struct item *pstate[_nstates]; /* pointers to the descriptions of the states */
38: int apstate[_nstates]; /* index to the actions for the states */
39: int tystate[_nstates]; /* contains type information about the states */
40: int stsize = _nstates; /* maximum number of states, at present */
41: int memsiz = _memsize; /* maximum size for productions and states */
42: int mem0[_memsize] ; /* production storage */
43: int *mem = mem0;
44: int amem[_actsize]; /* action table storage */
45: int actsiz = _actsize; /* action table size */
46: int memact = 0; /* next free action table position */
47: int nprod = 1; /* number of productions */
48: int *prdptr[_nprod]; /* pointers to descriptions of productions */
49: int prdlim = _nprod ; /* the maximum number of productions */
50: /* levprd - productions levels to break conflicts */
51: int levprd[_nprod] = {0,0};
52: /* last two bits code associativity:
53: 0 = no definition
54: 1 = left associative
55: 2 = binary
56: 3 = right associative
57: bit 04 is 1 if the production has an action
58: the high 13 bits have the production level
59: */
60: int nterms = 0; /* number of terminals */
61: int tlim = _nterms ; /* the maximum number of terminals */
62: /* the ascii representations of the terminals */
63: int extval = 0; /* start of output values */
64: struct sxxx1 {char *name; int value;} trmset[_nterms];
65: char cnames[_cnamsz];
66: int cnamsz = _cnamsz;
67: char *cnamp;
68: int maxtmp = _tempsize; /* the size of the temp1 array */
69: int temp1[_tempsize]; /* temporary storage, indexed by terms + nterms or states */
70: int temp2[_nnonterm]; /* temporary storage indexed by nonterminals */
71: int trmlev[_nterms]; /* vector with the precedence of the terminals */
72: /* The levels are the same as for levprd, but bit 04 is always 0 */
73: /* the ascii representations of the nonterminals */
74: struct sxxx2 { char *name; } nontrst[_nnonterm];
75: int ntlim = _nnonterm ; /* limit to the number of nonterminals */
76: int indgo[_nstates]; /* index to the stored goto table */
77: int ***pres; /* vector of pointers to the productions yielding each nonterminal */
78: struct looksets **pfirst; /* vector of pointers to first sets for each nonterminal */
79: int *pempty = 0 ; /* table of nonterminals nontrivially deriving e */
80: int nnonter = -1; /* the number of nonterminals */
81: int lastred = 0; /* the number of the last reduction of a state */
82: FILE *ftable; /* y.tab.c file */
83: FILE *foutput; /* y.output file */
84: int arrndx; /* used in the output of arrays on y.tab.c */
85: int zzcwset = 0;
86: int zzpairs = 0;
87: int zzgoent = 0;
88: int zzgobest = 0;
89: int zzacent = 0;
90: int zzacsave = 0;
91: int zznsave = 0;
92: int zzclose = 0;
93: int zzsrconf = 0;
94: int zzrrconf = 0;
95: char *ctokn;
96: int lineno = 1; /* current input line number */
97: int peekc = -1; /* look-ahead character */
98: int tstates[ _nterms ]; /* states generated by terminal gotos */
99: int ntstates[ _nnonterm ]; /* states generated by nonterminal gotos */
100: int mstates[ _nstates ]; /* chain of overflows of term/nonterm generation lists */
101:
102: struct looksets clset;
103: struct looksets lkst [ _lsetsize ];
104: int nlset = 0; /* next lookahead set index */
105: int lsetsz = _lsetsize; /* number of lookahead sets */
106:
107: struct wset { int *pitem, flag, ws[_tbitset]; } wsets[ _wsetsize ];
108: int cwset;
109: int wssize = _wsetsize;
110:
111: int numbval; /* the value of an input number */
112: int rflag = 0; /* ratfor flag */
113: int oflag = 0; /* optimization flag */
114:
115: int ndefout = 3; /* number of defined symbols output */
116: int nerrors = 0; /* number of errors */
117: int fatfl = 1; /* if on, error is fatal */
118: int machine; /* has a number describing the machine */
Defined variables
amem
defined in line
44; used 8 times
clset
defined in line
102; used 12 times
cnamp
defined in line
67; used 7 times
ctokn
defined in line
95; used 32 times
cwset
defined in line
108; used 21 times
indgo
defined in line
76; used 2 times
lkst
defined in line
103; used 4 times
mem
defined in line
43; used 26 times
mem0
defined in line
42; used 5 times
nnonter
defined in line
80; used 24 times
- in /usr/src/ucb/eyacc/ey1.c line
200,
206-212(3)
- in /usr/src/ucb/eyacc/ey2.c line
199-201(3),
401
- in /usr/src/ucb/eyacc/ey3.c line
7-8(2),
31-32(2),
51,
62-65(2),
161-162(2),
207,
234,
240
- in /usr/src/ucb/eyacc/ey4.c line
166,
218,
231,
255
nprod
defined in line
47; used 16 times
nstate
defined in line
36; used 30 times
- in /usr/src/ucb/eyacc/ey1.c line
201,
213-220(3)
- in /usr/src/ucb/eyacc/ey3.c line
76-77(2),
105(2),
119-130(8),
140-144(3),
151,
190-195(2),
204
- in /usr/src/ucb/eyacc/ey4.c line
11,
89,
176,
185,
197,
261-264(2)
nterms
defined in line
60; used 38 times
- in /usr/src/ucb/eyacc/ey1.c line
74,
199-203(2),
211,
315
- in /usr/src/ucb/eyacc/ey2.c line
204-218(10),
225-234(5),
243,
264,
396
- in /usr/src/ucb/eyacc/ey3.c line
207,
226-240(6)
- in /usr/src/ucb/eyacc/ey4.c line
15,
30,
114,
307,
313,
323,
372,
406
ntlim
defined in line
75; used 3 times
peekc
defined in line
97; used 16 times
pempty
defined in line
79; used 10 times
prdptr
defined in line
48; used 19 times
pres
defined in line
77; used 10 times
pstate
defined in line
37; used 27 times
- in /usr/src/ucb/eyacc/ey1.c line
215
- in /usr/src/ucb/eyacc/ey3.c line
76-77(2),
94-95(2),
105(2),
119,
143-144(2),
151,
191-196(4),
215(2),
261-262(2)
- in /usr/src/ucb/eyacc/ey4.c line
265-266(2),
331-332(2),
350-351(2),
396-397(2)
rflag
defined in line
112; used 12 times
temp1
defined in line
69; used 40 times
- in /usr/src/ucb/eyacc/ey3.c line
207,
225-226(2),
232-240(6)
- in /usr/src/ucb/eyacc/ey4.c line
15-21(4),
32-37(6),
48,
55-60(2),
91-96(2),
231-232(2),
239-243(3),
255,
268,
306-314(5),
323(2),
373,
406
temp2
defined in line
70; used 2 times
tlim
defined in line
61; used 3 times
trmset
defined in line
64; used 23 times
tystate
defined in line
39; used 28 times
- in /usr/src/ucb/eyacc/ey3.c line
110,
129,
194,
205-206(2),
215(2)
- in /usr/src/ucb/eyacc/ey4.c line
12,
90-96(3),
177-185(4),
198-200(3),
261,
269-274(3),
357-358(2),
368,
386,
401-402(2)
wsets
defined in line
107; used 37 times
- in /usr/src/ucb/eyacc/ey3.c line
33-38(2),
55(3),
62,
211-213(3),
220-222(4),
263-265(3),
276-280(3),
290-291(3),
302,
314-316(4),
323-324(2),
330,
346-349(4)
- in /usr/src/ucb/eyacc/ey4.c line
17,
27-31(2)
Defined struct's
item
defined in line
32; used 2 times
sxxx1
defined in line
64;
never used
sxxx2
defined in line
74;
never used
wset
defined in line
107;
never used
Defined macros