home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / OS2-YACC.ZIP / Y2.H < prev    next >
C/C++ Source or Header  |  1989-09-29  |  3KB  |  88 lines

  1. /*
  2.   HEADER: CUG     nnn.nn;
  3.   TITLE:     YACC - Yet Another Compilier-Compilier
  4.   VERSION:     1.0 for IBM-PC
  5.   DATE:      JAN 28, 1985
  6.   DESCRIPTION:     LALR(1) Parser Generator. From UNIX
  7.   KEYWORDS:     Parser Generator Compilier-Compilier YACC
  8.   SYSTEM:     IBM-PC and Compatiables
  9.   FILENAME:      Y2.H
  10.   WARNINGS:     This program is not for the casual user. It will
  11.          be useful primarily to expert developers.
  12.   CRC:         N/A
  13.   SEE-ALSO:     LEX and PREP
  14.   AUTHORS:     Scott Guthery 11100 leafwood lane Austin, TX 78750
  15.   COMPILERS:     DESMET-C
  16.   REFERENCES:     UNIX Systems Manuals
  17. */
  18.  
  19. /********************************************************************************/
  20. /*                              *************                                   */
  21. /*                              *  Y 2 . H  *                                   */
  22. /*                              *************                                   */
  23. /*                                                                              */
  24. /*  This file contains the external declarations needed to hook Yacc modules    */
  25. /* which were originally in Y2.C to their impure data in Y2IMP.2C. Also does    */
  26. /* the include of the original data/external file DTXTRN.H.                     */
  27. /*                                                                              */
  28. /********************************************************************************/
  29.  
  30. # include <ctype.h>
  31. # include "dtxtrn.h"
  32.  
  33. # define IDENTIFIER 257
  34. # define MARK 258
  35. # define TERM 259
  36. # define LEFT 260
  37. # define RIGHT 261
  38. # define BINARY 262
  39. # define PREC 263
  40. # define LCURLY 264
  41. # define C_IDENTIFIER 265  /* name followed by colon */
  42. # define NUMBER 266
  43. # define START 267
  44. # define TYPEDEF 268
  45. # define TYPENAME 269
  46. # define UNION 270
  47. # define ENDFILE 0
  48.  
  49. /* communication variables between various I/O routines */
  50.  
  51. extern char *infile;            /* input file name */
  52. extern int numbval;             /* value of an input number */
  53. extern char tokname[ ];         /* input token name */
  54.  
  55. /* storage of names */
  56.  
  57. extern char cnames[ ];          /* place where token and nonterminal names are stored */
  58. extern int cnamsz;              /* size of cnames */
  59. extern char * cnamp;            /* place where next name is to be put in */
  60. extern int ndefout;             /* number of defined symbols output */
  61.  
  62. /* storage of types */
  63. extern int ntypes;              /* number of types defined */
  64. extern char * typeset[ ];       /* pointers to type tags */
  65.  
  66. /* symbol tables for tokens and nonterminals */
  67.  
  68. extern int start;               /* start symbol */
  69.  
  70. /* assigned token type values */
  71. extern int extval;
  72.  
  73. void setup( int, char ** );
  74. int chfind( int, register char * );
  75. int defin( int, register char * );
  76. void cpyact( int );
  77. int gettok( void );
  78. int fdtype( int );
  79. void cpyunion( void );
  80. char *cstash( register char * );
  81. void defout( void );
  82. void finact( void );
  83. int skipcom( void );
  84. void usage( void );
  85. void yyparse( void );
  86. void cpycode( void );
  87.  
  88.