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

actsiz defined in line 45; used 4 times
amem defined in line 44; used 8 times
apstate defined in line 38; used 5 times
arrndx defined in line 84; used 2 times
clset defined in line 102; used 12 times
cnames defined in line 65; used 2 times
cnamp defined in line 67; used 7 times
cnamsz defined in line 66; used 1 times
ctokn defined in line 95; used 32 times
cwset defined in line 108; used 21 times
extval defined in line 63; used 2 times
fatfl defined in line 117; used 3 times
indgo defined in line 76; used 2 times
lastred defined in line 81; used 16 times
levprd defined in line 51; used 6 times
lineno defined in line 96; used 8 times
lkst defined in line 103; used 4 times
lsetsz defined in line 105; used 2 times
machine defined in line 118; used 4 times
maxtmp defined in line 68; never used
mem defined in line 43; used 26 times
mem0 defined in line 42; used 5 times
memact defined in line 46; used 5 times
memsiz defined in line 41; used 3 times
mstates defined in line 100; used 3 times
ndefout defined in line 115; used 3 times
nerrors defined in line 116; used 2 times
nlset defined in line 104; used 5 times
nnonter defined in line 80; used 24 times
nolook defined in line 30; used 5 times
nontrst defined in line 74; used 14 times
nprod defined in line 47; used 16 times
nstate defined in line 36; used 30 times
nterms defined in line 60; used 38 times
ntlim defined in line 75; used 3 times
ntstates defined in line 99; used 3 times
numbval defined in line 111; used 4 times
oflag defined in line 113; used 4 times
peekc defined in line 97; used 16 times
pempty defined in line 79; used 10 times
pfirst defined in line 78; used 4 times
prdlim defined in line 49; used 1 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
rflag defined in line 112; used 12 times
stsize defined in line 40; used 2 times
tbitset defined in line 29; used 9 times
temp1 defined in line 69; used 40 times
temp2 defined in line 70; used 2 times
tlim defined in line 61; used 3 times
trmlev defined in line 71; used 5 times
trmset defined in line 64; used 23 times
tstates defined in line 98; used 3 times
tystate defined in line 39; used 28 times
wsets defined in line 107; used 37 times
wssize defined in line 109; used 2 times
zzacent defined in line 89; used 2 times
zzacsave defined in line 90; used 2 times
zzclose defined in line 92; used 2 times
zzcwset defined in line 85; used 3 times
zzgobest defined in line 88; used 2 times
zzgoent defined in line 87; used 3 times
zznsave defined in line 91; used 2 times
zzpairs defined in line 86; never used
zzrrconf defined in line 94; used 6 times
zzsrconf defined in line 93; used 6 times

Defined struct's

item defined in line 32; used 2 times
  • in line 37(2)
looksets defined in line 31; used 6 times
sxxx1 defined in line 64; never used
sxxx2 defined in line 74; never used
wset defined in line 107; never used

Defined macros

_actsize defined in line 15; used 2 times
_cnamsz defined in line 22; used 2 times
_lsetsize defined in line 23; used 2 times
_memsize defined in line 16; used 2 times
_nnonterm defined in line 20; used 4 times
_nprod defined in line 19; used 3 times
_nstates defined in line 17; used 6 times
_nterms defined in line 18; used 4 times
_tbitset defined in line 27; used 2 times
_tempsize defined in line 21; used 2 times
_wsetsize defined in line 24; used 2 times
Last modified: 1983-02-24
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1385
Valid CSS Valid XHTML 1.0 Strict