1: /* (c) 1979 Regents of the University of California */
   2: #include <stdio.h>
   3: /*  MANIFEST CONSTANT DEFINITIONS */
   4: 
   5: # define NTBASE 010000
   6: 
   7:   /* internal codes for error and accept actions */
   8: 
   9: # define ERRCODE  8190
  10: # define ACCEPTCODE 8191
  11: 
  12: # define errfileno stderr      /* file number for erros and reduction message */
  13: # define _tbitset 6  /* 16*_tbitset - 1 >= _nterms */
  14: 
  15: extern int tbitset;  /* number of wds of lookahead vector */
  16: extern int nolook;  /* flag to turn off lookahed computations */
  17: struct looksets { int lset[ _tbitset ]; } ;
  18: struct item { int *pitem; struct looksets *look; } ;
  19: 
  20:   /* output actions */
  21: 
  22: # define ERRACT 4096
  23: # define SHIFTACT 8192
  24: # define REDUCACT 12288
  25: # define ACCEPTACT 16384
  26: 
  27: # define _REGISTER register
  28: 
  29: extern int nstate ;     /* number of states */
  30: extern struct item *pstate[];   /* pointers to the descriptions of the states */
  31: extern int apstate[];       /* index to actions in amem by state */
  32: extern int actsiz;      /* size of the action table array */
  33: extern int tystate[];   /* contains type information about the states */
  34:   /* 0 = simple state, completely generated
  35:      1 = state awaiting generation
  36:      2 = state with an empty production in closure
  37:      */
  38: extern int stsize ; /* maximum number of states, at present */
  39: extern int memsiz ; /* maximum size for productions and states */
  40: extern int mem0[] ; /* added production */
  41: extern int *mem ;
  42: extern int amem[];  /* action table storage */
  43: extern int actsiz;  /* action table size */
  44: extern int memact ;     /* next free action table position */
  45: extern int nprod ;  /* number of productions */
  46: extern int *prdptr[];   /* pointers to descriptions of productions */
  47: extern int prdlim; /* the number of productions allowed */
  48: extern int levprd[] ;   /* contains production levels to break conflicts */
  49:   /* last two bits code associativity:
  50:        0 = no definition
  51:        1 = left associative
  52:        2 = binary
  53:        3 = right associative
  54:      bit 04 is 1 if the production has an action
  55:      the high 13 bits have the production level
  56:      */
  57: extern int nterms ; /* number of terminals */
  58: extern int nerrors; /* number of errors */
  59: extern int fatfl;   /* if on, error is fatal */
  60:   /*	the ascii representations of the terminals	*/
  61: extern int extval;  /* start of output values */
  62: extern struct sxxx1 {char *name; int value;} trmset[];
  63: extern char cnames[];
  64: extern int cnamsz;
  65: extern char *cnamp;
  66: extern int maxtmp ; /* the size of the temp arrays */
  67:  /* temporary vectors, indexable by states, terms, or nterms */
  68: extern int temp1[];
  69: extern int temp2[];
  70: extern int trmlev[];    /* vector with the precedence of the terminals */
  71:   /* The levels are the same as for levprd, but bit 04 is always 0 */
  72:   /* the ascii representations of the nonterminals */
  73: extern struct sxxx2 { char *name; } nontrst[];
  74: extern int indgo[];     /* index to the stored goto table */
  75: extern int ***pres; /* vector of pointers to the productions yielding each nonterminal */
  76: extern struct looksets **pfirst; /* vector of pointers to first sets for each nonterminal */
  77: extern int *pempty ; /* table of nonterminals nontrivially deriving e */
  78: extern int nnonter ;    /* the number of nonterminals */
  79: extern int lastred ;    /* the number of the last reduction of a state */
  80: extern FILE *ftable;        /* y.tab.c file */
  81: extern FILE *foutput;       /* y.output file */
  82: extern FILE *cin;       /* current input file */
  83: extern FILE *cout;      /* current output file */
  84: extern int arrndx;
  85: extern int zzcwset;
  86: extern int zzpairs ;
  87: extern int zzgoent ;
  88: extern int zzgobest ;
  89: extern int zzacent ;
  90: extern int zzacsave ;
  91: extern int zznsave ;
  92: extern int zzclose ;
  93: extern int zzrrconf ;
  94: extern int zzsrconf ;
  95: extern char *ctokn;
  96: struct {int **ppi;} ;
  97: extern int ntlim ;  /* maximum number of nonterminals */
  98: extern int tlim ;   /* maximum number of terminals */
  99: extern int lineno; /* current line number */
 100: extern int peekc; /* look-ahead character */
 101: extern int tstates[];
 102: extern int ntstates[];
 103: extern int mstates[];
 104: 
 105: extern struct looksets clset;
 106: extern struct looksets lkst[];
 107: extern int nlset;  /* next lookahead set index */
 108: extern int lsetsz; /* number of lookahead sets */
 109: 
 110: extern struct wset { int *pitem, flag, ws[ _tbitset ]; } wsets[];
 111: extern int cwset;
 112: extern int wssize;
 113: 
 114: extern int numbval;  /* the value of an input number */
 115: extern int rflag;  /* ratfor flag */
 116: extern int oflag;  /* optimization flag */
 117: extern int ndefout;  /* number of defined symbols output */
 118: 
 119: extern int machine;
 120: 
 121: # define UNIX 1
 122: # define GCOS 2
 123: # define IBM 3
 124: 
 125: struct looksets *flset();

Defined struct's

item defined in line 18; used 18 times
looksets defined in line 17; used 16 times
sxxx1 defined in line 62; never used
sxxx2 defined in line 73; never used
wset defined in line 110; never used

Defined macros

ACCEPTACT defined in line 25; used 1 times
ACCEPTCODE defined in line 10; used 3 times
ERRACT defined in line 22; used 2 times
ERRCODE defined in line 9; used 3 times
GCOS defined in line 122; used 1 times
IBM defined in line 123; used 1 times
NTBASE defined in line 5; used 42 times
REDUCACT defined in line 24; used 2 times
SHIFTACT defined in line 23; used 1 times
UNIX defined in line 121; used 1 times
_tbitset defined in line 13; used 2 times
errfileno defined in line 12; used 4 times

Usage of this include

Last modified: 1981-01-28
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2546
Valid CSS Valid XHTML 1.0 Strict