home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c100 / 4.ddi / COM.ZIP / FSKELDEF.H < prev    next >
Encoding:
C/C++ Source or Header  |  1990-07-05  |  1.4 KB  |  47 lines

  1. /* macro definitions for compressed-table C/FTL programs generated by flex */
  2.  
  3. #ifdef MSDOS
  4.  #include "\LIB\fskelcom.h"
  5. #else
  6.  #include "\LIB\flexskelcom.h"
  7. #endif
  8.  
  9. /* reinitializes everything except the current start condition.  The last
  10.  * input character is set to a newline so an initial beginning-of-line
  11.  * rule will match
  12.  */
  13. #define YY_INIT \
  14.     { \
  15.     yyleng = yy_c_buf_p = yy_e_buf_p = 0; \
  16.     yy_hold_char = yy_ch_buf[yy_c_buf_p] = '\n'; \
  17.     yytext = &yy_ch_buf[yy_c_buf_p]; \
  18.     yy_saw_eof = 0; \
  19.     }
  20.  
  21. /* returns the length of the matched text */
  22. #define YY_LENG (yy_c_buf_p - yy_b_buf_p + 1)
  23.  
  24. /* done before the next pattern has been matched action */
  25. #define YY_DO_BEFORE_SCAN \
  26.     yytext[yyleng] = yy_hold_char;
  27.  
  28. /* done after the current pattern has been matched and before the corresponding action */
  29. #define YY_DO_BEFORE_ACTION \
  30.     yytext = &yy_ch_buf[yy_b_buf_p]; \
  31.     yyleng = YY_LENG; \
  32.     yy_hold_char = yytext[yyleng]; \
  33.     yytext[yyleng] = '\0';
  34.  
  35. /* find the next rule matched */
  36. #ifdef FLEX_REJECT_ENABLED
  37. #define REJECT \
  38.         { \
  39.     YY_DO_BEFORE_SCAN; /* undo effects of setting up yytext */ \
  40.         ++yy_lp; \
  41.         goto find_rule; \
  42.         }
  43. #else
  44. #define REJECT YY_FATAL_ERROR( "REJECT used and scanner was not generated using -r" )
  45. #endif
  46.  
  47.