home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / program / c / yaccsrc2 / ydata.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-05-19  |  2.1 KB  |  61 lines

  1. /*
  2.  * 26-Apr-91 (AE)  Moved part of YMAIN data to YDATA because of segment overflow
  3.  *                 for HUGETAB configuration of YACC.
  4.  */
  5.  
  6. # include <stdlib.h> 
  7. # define y1imp yes
  8. # define y2imp YES
  9. # define y3imp YES
  10. # include "dtxtrn.h" 
  11.  
  12. /* externals for data that is left behind in YMAIN, but referenced here */
  13.  
  14. extern struct looksets lkst[ ];
  15. extern struct wset     wsets[ ];
  16. extern struct ntsymb   nontrst[ ];
  17.  
  18. /* storage for grammar rules */
  19.  
  20. int                    mem0[ MEMSIZE ];   /* production storage */
  21. int                  * mem      = mem0;
  22. int                    nprod    = 1;      /* number of productions */
  23. int                  * prdptr[ NPROD ];   /* pointers to descriptions of productions */
  24. int                    levprd[ NPROD ];   /* precedence levels for the productions */
  25.  
  26. /* storage for the actions in the parser */
  27.  
  28. int                    amem[ ACTSIZE ];   /* action table storage */
  29. int                  * memp     = amem;   /* next free action table position */
  30.  
  31. /* accumulators for statistics information */
  32.  
  33. struct wset          * zzcwp    = wsets;
  34. int                    zzgoent  = 0;
  35. int                    zzgobest = 0;
  36. int                    zzacent  = 0;
  37. int                    zzexcp   = 0;
  38. int                    zzclose  = 0;
  39. int                    zzsrconf = 0;
  40. int                  * zzmemsz  = mem0;
  41. int                    zzrrconf = 0;
  42.  
  43. /* Statics pulled from modules */
  44.  
  45. int                    peekline;          /* from gettok() */
  46. int                    lastred;           /* the number of the last reduction of a state */
  47.  
  48. int                    defact[ NSTATES ]; /* the default actions of states */
  49.  
  50. int                  * ggreed   = lkst[ 0 ].lset;
  51. int                  * pgo      = wsets[ 0 ].ws.lset;
  52. int                  * yypgo    = &nontrst[ 0 ].tvalue;
  53.  
  54. int                    maxspr   = 0;      /* maximum spread of any entry */
  55. int                    maxoff   = 0;      /* maximum offset into a array */
  56. int                  * pmem     = mem0;
  57. int                  * maxa;
  58. int                    nxdb     = 0;
  59. int                    adb      = 0;
  60.  
  61.