home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / C / YACCUNX.ZIP / Y2IMP.C < prev    next >
Encoding:
C/C++ Source or Header  |  1983-12-23  |  1.6 KB  |  55 lines

  1. /* Impure data needed by routines pulled from Y2.C */
  2.  
  3. #define y2imp YES
  4. #include "dtxtrn.h"
  5.  
  6. /* communication variables between various I/O routines */
  7.  
  8. char *infile;   /* input file name */
  9. int numbval;    /* value of an input number */
  10. char tokname[NAMESIZE]; /* input token name */
  11.  
  12. /* storage of names */
  13.  
  14. char cnames[CNAMSZ];    /* place where token and nonterminal names are stored */
  15. int cnamsz = CNAMSZ;    /* size of cnames */
  16. char * cnamp = cnames;  /* place where next name is to be put in */
  17. int ndefout = 3;  /* number of defined symbols output */
  18.  
  19. /* storage of types */
  20. int ntypes;     /* number of types defined */
  21. char * typeset[NTYPES]; /* pointers to type tags */
  22.  
  23. /* symbol tables for tokens and nonterminals */
  24.  
  25. int ntokens = 0;
  26. struct toksymb tokset[NTERMS];
  27. int toklev[NTERMS];
  28. int nnonter = -1;
  29. struct ntsymb nontrst[NNONTERM];
  30. int start;      /* start symbol */
  31.  
  32. /* assigned token type values */
  33. int extval = 0;
  34.  
  35. /* input and output file descriptors */
  36.  
  37. FILE * finput;          /* yacc input file */
  38. FILE * faction;         /* file for saving actions */
  39. FILE * fdefine;         /* file for # defines */
  40. FILE * ftable;          /* y.tab.c file */
  41. FILE * ftemp;           /* tempfile to pass 2 */
  42. FILE * foutput;         /* y.output file */
  43.  
  44. /* storage for grammar rules */
  45.  
  46. int mem0[MEMSIZE] ; /* production storage */
  47. int *mem = mem0;
  48. int nprod= 1;   /* number of productions */
  49. int *prdptr[NPROD];     /* pointers to descriptions of productions */
  50. int levprd[NPROD] ;     /* precedence levels for the productions */
  51.  
  52. /* Statics pulled from modules */
  53.  
  54. int peekline;           /* from gettok() */
  55.