home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d1xx / d156 / flex.lha / Flex / Flex2 / fastskeldef.h < prev    next >
C/C++ Source or Header  |  1988-10-02  |  3KB  |  114 lines

  1. /*  macro definitions for fast/full-table  C/FTL programs generated by flex */
  2.  
  3. #include "flexskelcom.h"
  4.  
  5. #define YY_END_OF_BUFFER_CHAR 0
  6.  
  7. /* action number for "not an accepting state; back-track (not implemented)" */
  8. #define YY_BACK_TRACK 0
  9.  
  10. /* action number for end-of-buffer was seen */
  11. #define YY_END_OF_BUFFER -3
  12.  
  13. /* reinitializes everything except the current start condition.  The last
  14.  * input character is set to a newline so an initial beginning-of-line
  15.  * rule will match
  16.  */
  17. #define YY_FAST_INIT \
  18.     { \
  19.     yytext = yy_c_buf_p = &yy_ch_buf[1]; \
  20.     yyleng = 0; \
  21.     yy_hold_char = *yy_c_buf_p; \
  22.     }
  23.  
  24. /* done before the next pattern has been matched action
  25.  * change both of these if you change them at all!
  26.  */
  27. #define YY_DO_BEFORE_SCAN \
  28.     *yy_c_buf_p = yy_hold_char
  29. #define YY_DO_BEFORE_RESTART \
  30.     yy_hold_char = *yy_c_buf_p
  31.  
  32. /* done after the current pattern has been matched and before the
  33.  * corresponding action
  34.  */
  35. #define YY_DO_BEFORE_ACTION \
  36.     yytext = yy_b_buf_p; \
  37.     yyleng = YY_LENG; \
  38.     yy_hold_char = *yy_c_buf_p; \
  39.     *yy_c_buf_p = '\0'
  40.  
  41. /* returns the length of the matched text */
  42. #define YY_LENG (yy_c_buf_p - yy_b_buf_p)
  43.  
  44. #ifdef FLEX_FULL_TABLE
  45. #define YY_CS_TYPE int
  46. #else
  47. #define YY_CS_TYPE struct yy_trans_info *
  48. #endif
  49.  
  50. /* find starting state */
  51. #ifdef FLEX_FULL_TABLE
  52. #    define YY_FIND_START_STATE( x ) \
  53.         x = yy_start; \
  54.         if ( yy_b_buf_p[-1] == '\n' ) \
  55.         ++x
  56. #else
  57. #    define YY_FIND_START_STATE( x ) \
  58.         x = yy_state_ptr[yy_start]; \
  59.         if ( yy_b_buf_p[-1] == '\n' ) \
  60.         x = yy_state_ptr[yy_start + 1]
  61. #endif
  62.  
  63. # ifdef FLEX_USE_ECS
  64. #     define yy_eq(x) e[x]
  65. # else
  66. #     define yy_eq(x) x
  67. # endif
  68.  
  69. /* get next jam state from packed table */
  70. #ifdef FLEX_FULL_TABLE
  71. #    define YY_FIND_NEXT_MATCH \
  72.         { \
  73.         register int yy_state_info; \
  74.         while ( (yy_state_info = n[yy_current_state][yy_eq(*yy_c_buf_p)] ) != YY_JAM ) \
  75.         { \
  76.         yy_current_state = yy_state_info; \
  77.         YY_BACKTRACKING_ACTION \
  78.         yy_c_buf_p++; \
  79.         } \
  80.         }
  81. #else
  82. #    define YY_FIND_NEXT_MATCH \
  83.         for ( yy_c = yy_eq(*yy_c_buf_p); \
  84.           (yy_trans_info = &yy_current_state[yy_c])->v == yy_c; \
  85.           yy_c = yy_eq(*++yy_c_buf_p) ) \
  86.         { \
  87.         yy_current_state += yy_trans_info->n; \
  88.         YY_BACKTRACKING_ACTION \
  89.         }
  90. #endif
  91.  
  92. #ifdef FLEX_FULL_TABLE
  93. #    define YY_FIND_ACTION( x ) x = l[yy_current_state]
  94. #else
  95. #    define YY_FIND_ACTION( x ) x = yy_current_state[-1].n
  96. #endif
  97.  
  98.  
  99. #ifdef FLEX_FULL_TABLE
  100. #    define YY_GET_NEXT_STATE yy_cur_state = n[yy_cur_state][*(yy_temp_char_ptr++)]
  101. #else
  102. #    define YY_GET_NEXT_STATE yy_cur_state += yy_cur_state[*(yy_temp_char_ptr++)].n
  103. #endif
  104.  
  105. #define EOB_ACT_RESTART_SCAN 2
  106. #define EOB_ACT_END_OF_FILE 3
  107. #define EOB_ACT_LAST_MATCH 4
  108.  
  109. #ifdef FLEX_FULL_TABLE
  110. #define YY_DECLARE_YY_CS_PARAM int *yy_current_state
  111. #else
  112. #define YY_DECLARE_YY_CS_PARAM struct yy_trans_info *yy_current_state
  113. #endif
  114.