# 2.11BSD#431 - /usr/src/ucb/PORT/pascal/eyacc/ey.h

##### Macros

    ACCEPTACT         X
    ACCEPTCODE        X
    ERRACT            X
    ERRCODE           X
    GCOS              X
    GENLAMBDA         X
    IBM               X
    NEEDSREDUCE       X
    NTBASE            X
    REDUCACT          X
    SHIFTACT          X
    SINGLE_NT         X
    UNIX              X
    _REGISTER         X
    _tbitset          X
    errfileno         X

##### struct's

    item              X
    looksets          X
    sxxx1             X
    sxxx2             X
    wset              X

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

#### Defined struct's

item defined in line 25; used 20 times

- in line 37(2)
- in /usr/src/ucb/PORT/pascal/eyacc/ey1.c line 173(2)
- in /usr/src/ucb/PORT/pascal/eyacc/ey3.c line 85(2), 146(2), 201(2), 266-267(4)
- in /usr/src/ucb/PORT/pascal/eyacc/ey4.c line 238(2), 310(2), 461(2)

looksets defined in line 24; used 24 times

- in line 25(2), 83(2), 89(2), 120-121(4), 141(2)
- in /usr/src/ucb/PORT/pascal/eyacc/ey1.c line 319(2)
- in /usr/src/ucb/PORT/pascal/eyacc/ey3.c line 40(2), 83(2), 144(2), 382-383(4)

sxxx1 defined in line 69; never used
sxxx2 defined in line 80; never used
wset defined in line 125; never used

#### Defined macros

ACCEPTACT defined in line 32; used 1 times

- in /usr/src/ucb/PORT/pascal/eyacc/ey4.c line 447

ACCEPTCODE defined in line 17; used 3 times

- in /usr/src/ucb/PORT/pascal/eyacc/ey4.c line 30, 447, 477

ERRACT defined in line 29; used 2 times

- in /usr/src/ucb/PORT/pascal/eyacc/ey4.c line 448-453(2)

ERRCODE defined in line 16; used 3 times

- in /usr/src/ucb/PORT/pascal/eyacc/ey4.c line 71, 448, 478

GCOS defined in line 138; used 1 times

- in /usr/src/ucb/PORT/pascal/eyacc/ey1.c line 109

GENLAMBDA defined in line 86; used 4 times

- in /usr/src/ucb/PORT/pascal/eyacc/ey4.c line 379(2), 418-419(2)

IBM defined in line 139; used 1 times

- in /usr/src/ucb/PORT/pascal/eyacc/ey1.c line 106

NEEDSREDUCE defined in line 88; used 6 times

- in /usr/src/ucb/PORT/pascal/eyacc/ey4.c line 319, 379(2), 385, 418-419(2)

NTBASE defined in line 12; used 43 times

- in /usr/src/ucb/PORT/pascal/eyacc/ey1.c line 180, 196(2)
- in /usr/src/ucb/PORT/pascal/eyacc/ey2.c line 118-119(2), 136, 142, 173(2), 213, 416
- in /usr/src/ucb/PORT/pascal/eyacc/ey3.c line 18, 46-50(2), 63, 102(2), 131-133(3), 175, 183-186(4), 238-239(2), 296, 312, 319-321(2), 330
- in /usr/src/ucb/PORT/pascal/eyacc/ey4.c line 27, 114, 124-125(2), 249-251(2), 278-279(2), 349-358(3)

REDUCACT defined in line 31; used 2 times

- in /usr/src/ucb/PORT/pascal/eyacc/ey4.c line 446, 452

SHIFTACT defined in line 30; used 1 times

- in /usr/src/ucb/PORT/pascal/eyacc/ey4.c line 449

SINGLE_NT defined in line 87; used 4 times

- in /usr/src/ucb/PORT/pascal/eyacc/ey4.c line 353, 373, 418-419(2)

UNIX defined in line 137; used 1 times

- in /usr/src/ucb/PORT/pascal/eyacc/ey1.c line 101

_REGISTER defined in line 34; used 8 times

- in /usr/src/ucb/PORT/pascal/eyacc/ey1.c line 308
- in /usr/src/ucb/PORT/pascal/eyacc/ey2.c line 252-253(2)
- in /usr/src/ucb/PORT/pascal/eyacc/ey3.c line 84, 263-267(2), 389
- in /usr/src/ucb/PORT/pascal/eyacc/ey4.c line 130

_tbitset defined in line 20; used 2 times

- in line 24, 125

errfileno defined in line 19; used 4 times

- in /usr/src/ucb/PORT/pascal/eyacc/ey1.c line 236-237(2), 250-251(2)

#### Usage of this include

ey.h used 4 times

- in /usr/src/ucb/PORT/pascal/eyacc/ey1.c line 11
- in /usr/src/ucb/PORT/pascal/eyacc/ey2.c line 11
- in /usr/src/ucb/PORT/pascal/eyacc/ey3.c line 11
- in /usr/src/ucb/PORT/pascal/eyacc/ey4.c line 11

Last modified: 1985-04-30 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1066 |