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
apstate defined in line 25; used 5 times
arrndx defined in line 71; used 2 times
clset defined in line 89; used 12 times
cnames defined in line 52; used 2 times
cnamp defined in line 54; used 7 times
cnamsz defined in line 53; used 1 times
ctokn defined in line 82; used 32 times
cwset defined in line 95; used 21 times
extval defined in line 50; used 2 times
fatfl defined in line 105; used 3 times
indgo defined in line 63; used 2 times
lastred defined in line 68; used 16 times
levprd defined in line 38; used 6 times
lineno defined in line 83; used 8 times
lkst defined in line 90; used 4 times
lsetsz defined in line 92; used 2 times
machine defined in line 106; used 4 times
maxtmp defined in line 55; never used
mem defined in line 30; used 26 times
memsiz defined in line 28; used 3 times
mstates defined in line 87; used 3 times
ndeFout defined in line 103; used 3 times
nlset defined in line 91; used 5 times
nolook defined in line 17; used 5 times
nstate defined in line 23; used 30 times
ntlim defined in line 62; used 3 times
ntstates defined in line 86; used 3 times
numbval defined in line 98; used 4 times
oflag defined in line 101; used 4 times
peekc defined in line 84; used 15 times
pempty defined in line 66; used 10 times
pfirst defined in line 65; used 4 times
prdlim defined in line 36; used 1 times
pres defined in line 64; used 10 times
pstate defined in line 24; used 27 times
rflag defined in line 99; used 12 times
sflag defined in line 100; used 2 times
stsize defined in line 27; used 2 times
tbitset defined in line 16; used 9 times
temp1 defined in line 56; used 39 times
temp2 defined in line 57; used 2 times
tlim defined in line 48; used 3 times
trmlev defined in line 58; used 5 times
trmset defined in line 51; used 23 times
tstates defined in line 85; used 3 times
tystate defined in line 26; used 28 times
wsets defined in line 94; used 37 times
wssize defined in line 96; used 2 times
zzacent defined in line 76; used 2 times
zzacsave defined in line 77; used 2 times
zzcwset defined in line 72; used 3 times
zzgobest defined in line 75; used 2 times
zzgoent defined in line 74; used 3 times
zznsave defined in line 78; used 2 times
zzpairs defined in line 73; never used
zzrrconf defined in line 81; used 6 times
zzsrconf defined in line 80; used 6 times

Defined struct's

item defined in line 19; used 2 times
  • in line 24(2)
looksets defined in line 18; used 6 times
sxxx1 defined in line 51; never used
sxxx2 defined in line 61; never used
wset defined in line 94; never used

Defined macros

_actsize defined in line 3; used 2 times
_cnamsz defined in line 10; used 2 times
_lsetsize defined in line 11; used 2 times
_memsize defined in line 4; used 2 times
_nnonterm defined in line 8; used 4 times
_nprod defined in line 7; used 3 times
_nstates defined in line 5; used 6 times
_nterms defined in line 6; used 4 times
_tbitset defined in line 14; used 2 times
_tempsize defined in line 9; used 2 times
_wsetsize defined in line 12; used 2 times
Last modified: 1995-02-18
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 3780
Valid CSS Valid XHTML 1.0 Strict