home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.7z / ftp.whtech.com / emulators / v9t9 / linux / sources / V9t9 / source / command_lexer.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-10-19  |  864 b   |  41 lines

  1. #ifndef __COMMAND_LEXER_H__
  2. #define __COMMAND_LEXER_H__
  3.  
  4. #include "OSLib.h"
  5.  
  6. #include "centry.h"
  7.  
  8. #ifdef __COMMAND_L__
  9.  
  10. typedef struct command_context {
  11.     const struct command_context 
  12.             *outer;            /* encasing context */
  13.     char     *name;            /* name of this buffer */
  14.     OSHandle hand;            /* text data */
  15.     OSSize    len;            /* length of data */
  16.     int        offs;            /* current offset in data */
  17.     int        line;            /* current line number */
  18.     YY_BUFFER_STATE    yybuf;    /* yybuffer */
  19. }    command_context;
  20.  
  21. #else
  22.  
  23. typedef struct command_context command_context;
  24.  
  25. #endif
  26.  
  27. /*    Defined in command.l */
  28.  
  29. void lexer_error(const char *format, ...);
  30. void lexer_include(char *yy);
  31.  
  32. command_context    *lexer_push_text(const char *name, const char *data, int len);
  33. command_context *lexer_push_file(const char *filename);
  34. command_context *lexer_pop_context(void);
  35.  
  36. int yylex(void);
  37.  
  38. #include "cexit.h"    
  39.  
  40. #endif
  41.