home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_progs / fileutil / scan.lha / src / lex.h < prev    next >
C/C++ Source or Header  |  1992-05-21  |  2KB  |  57 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. #ifndef LEXH
  19. #define LEXH
  20.  
  21. #include <stdio.h>
  22.  
  23. /*
  24.  * Description of scanning tables. The entries at the front of
  25.  * the struct must remain in place for the assembler routines to find.
  26.  */
  27. struct  lextab {
  28.         int     llendst;                /* Last state number            */
  29.         char    *lldefault;             /* Default state table          */
  30.         char    *llnext;                /* Next state table             */
  31.         char    *llcheck;               /* Check table                  */
  32.         int     *llbase;                /* Base table                   */
  33.         int     llnxtmax;               /* Last in next table           */
  34.         int     (*llmove)();            /* Move between states          */
  35.         int     *llfinal;               /* Final state descriptions     */
  36.         int     (*llactr)();            /* Action routine               */
  37.         int     *lllook;                /* Look ahead vector if != NULL */
  38.         char    *llign;                 /* Ignore char vec if != NULL   */
  39.         char    *llbrk;                 /* Break char vec if != NULL    */
  40.         char    *llill;                 /* Illegal char vec if != NULL  */
  41. };
  42.  
  43. #define NBPW             16
  44. #define LEXERR          256
  45. #define LEXSKIP         (-1)
  46. #define EOF                     (-1)
  47. #ifndef NULL
  48. #define NULL             (0)
  49. #endif
  50. #define LEXECHO(fp) {lexecho((fp));}
  51.  
  52. #define lextext llbuf
  53. #define lexlast llend
  54.  
  55. extern FILE *lexin;
  56. #endif
  57.