home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / OS2_LEX.ZIP / LEX.H < prev    next >
C/C++ Source or Header  |  1984-02-06  |  2KB  |  52 lines

  1. /*
  2.  * Bob Denny 28-Aug-82  Remove reference to FILE *lexin to
  3.  *                         eliminate dependency on standard I/O library. Only
  4.  *                         lexgetc() used it, and it's there now.
  5.  *                        Add EOF    definition for standalone uses.
  6.  *                        Corrected comment for llnxtmax.
  7.  *
  8.  * Scott Guthery 20-Nov-83    Adapt for IBM PC & DeSmet C.  Removed
  9.  *                            equivalence of yylval and lexval since
  10.  *                            a multi-typed parser wants yylval to be
  11.  *                            typed to be the union of the types (YYSTYPE).
  12.  */
  13.  
  14. /*
  15.  * lex library header file -- accessed through
  16.  *      #include <lex.h>
  17.  */
  18.  
  19. #include <stdio.h>
  20.  
  21. /*
  22.  * Description of scanning tables. The entries at the front of
  23.  * the struct must remain in place for the assembler routines to find.
  24.  */
  25. struct  lextab {
  26.         int     llendst;                /* Last state number            */
  27.         char    *lldefault;             /* Default state table          */
  28.         char    *llnext;                /* Next state table             */
  29.         char    *llcheck;               /* Check table                  */
  30.         int     *llbase;                /* Base table                   */
  31.         int     llnxtmax;               /* Last in next table           */
  32.         int     (*llmove)();            /* Move between states          */
  33.         int     *llfinal;               /* Final state descriptions     */
  34.         int     (*llactr)();            /* Action routine               */
  35.         int     *lllook;                /* Look ahead vector if != NULL */
  36.         char    *llign;                 /* Ignore char vec if != NULL   */
  37.         char    *llbrk;                 /* Break char vec if != NULL    */
  38.         char    *llill;                 /* Illegal char vec if != NULL  */
  39. };
  40.  
  41. #define NBPW         16
  42. #define LEXERR        256
  43. #define LEXSKIP        (-1)
  44. #define EOF            (-1)
  45. #define NULL         (0)
  46. #define LEXECHO(fp) {lexecho((fp));}
  47.  
  48. #define lextext llbuf
  49. #define lexlast llend
  50.  
  51. extern FILE lexin;
  52.