/usr.bin/csup/rcstokenizer.h

https://bitbucket.org/freebsd/freebsd-head/ · C++ Header · 333 lines · 198 code · 81 blank · 54 comment · 1 complexity · 4835179b64135989f9263de654a18bd6 MD5 · raw file

  1. #ifndef rcsHEADER_H
  2. #define rcsHEADER_H 1
  3. #define rcsIN_HEADER 1
  4. #line 6 "rcstokenizer.h"
  5. #define YY_INT_ALIGNED short int
  6. /* A lexical scanner generated by flex */
  7. #define FLEX_SCANNER
  8. #define YY_FLEX_MAJOR_VERSION 2
  9. #define YY_FLEX_MINOR_VERSION 5
  10. #define YY_FLEX_SUBMINOR_VERSION 35
  11. #if YY_FLEX_SUBMINOR_VERSION > 0
  12. #define FLEX_BETA
  13. #endif
  14. /* First, we deal with platform-specific or compiler-specific issues. */
  15. /* begin standard C headers. */
  16. #include <stdio.h>
  17. #include <string.h>
  18. #include <errno.h>
  19. #include <stdlib.h>
  20. /* end standard C headers. */
  21. /* flex integer type definitions */
  22. #ifndef FLEXINT_H
  23. #define FLEXINT_H
  24. /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
  25. #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  26. /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
  27. * if you want the limit (max/min) macros for int types.
  28. */
  29. #ifndef __STDC_LIMIT_MACROS
  30. #define __STDC_LIMIT_MACROS 1
  31. #endif
  32. #include <inttypes.h>
  33. typedef int8_t flex_int8_t;
  34. typedef uint8_t flex_uint8_t;
  35. typedef int16_t flex_int16_t;
  36. typedef uint16_t flex_uint16_t;
  37. typedef int32_t flex_int32_t;
  38. typedef uint32_t flex_uint32_t;
  39. #else
  40. typedef signed char flex_int8_t;
  41. typedef short int flex_int16_t;
  42. typedef int flex_int32_t;
  43. typedef unsigned char flex_uint8_t;
  44. typedef unsigned short int flex_uint16_t;
  45. typedef unsigned int flex_uint32_t;
  46. #endif /* ! C99 */
  47. /* Limits of integral types. */
  48. #ifndef INT8_MIN
  49. #define INT8_MIN (-128)
  50. #endif
  51. #ifndef INT16_MIN
  52. #define INT16_MIN (-32767-1)
  53. #endif
  54. #ifndef INT32_MIN
  55. #define INT32_MIN (-2147483647-1)
  56. #endif
  57. #ifndef INT8_MAX
  58. #define INT8_MAX (127)
  59. #endif
  60. #ifndef INT16_MAX
  61. #define INT16_MAX (32767)
  62. #endif
  63. #ifndef INT32_MAX
  64. #define INT32_MAX (2147483647)
  65. #endif
  66. #ifndef UINT8_MAX
  67. #define UINT8_MAX (255U)
  68. #endif
  69. #ifndef UINT16_MAX
  70. #define UINT16_MAX (65535U)
  71. #endif
  72. #ifndef UINT32_MAX
  73. #define UINT32_MAX (4294967295U)
  74. #endif
  75. #endif /* ! FLEXINT_H */
  76. #ifdef __cplusplus
  77. /* The "const" storage-class-modifier is valid. */
  78. #define YY_USE_CONST
  79. #else /* ! __cplusplus */
  80. /* C99 requires __STDC__ to be defined as 1. */
  81. #if defined (__STDC__)
  82. #define YY_USE_CONST
  83. #endif /* defined (__STDC__) */
  84. #endif /* ! __cplusplus */
  85. #ifdef YY_USE_CONST
  86. #define yyconst const
  87. #else
  88. #define yyconst
  89. #endif
  90. /* An opaque pointer. */
  91. #ifndef YY_TYPEDEF_YY_SCANNER_T
  92. #define YY_TYPEDEF_YY_SCANNER_T
  93. typedef void* yyscan_t;
  94. #endif
  95. /* For convenience, these vars (plus the bison vars far below)
  96. are macros in the reentrant scanner. */
  97. #define yyin yyg->yyin_r
  98. #define yyout yyg->yyout_r
  99. #define yyextra yyg->yyextra_r
  100. #define yyleng yyg->yyleng_r
  101. #define yytext yyg->yytext_r
  102. #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
  103. #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
  104. #define yy_flex_debug yyg->yy_flex_debug_r
  105. /* Size of default input buffer. */
  106. #ifndef YY_BUF_SIZE
  107. #define YY_BUF_SIZE 16384
  108. #endif
  109. #ifndef YY_TYPEDEF_YY_BUFFER_STATE
  110. #define YY_TYPEDEF_YY_BUFFER_STATE
  111. typedef struct yy_buffer_state *YY_BUFFER_STATE;
  112. #endif
  113. #ifndef YY_TYPEDEF_YY_SIZE_T
  114. #define YY_TYPEDEF_YY_SIZE_T
  115. typedef size_t yy_size_t;
  116. #endif
  117. #ifndef YY_STRUCT_YY_BUFFER_STATE
  118. #define YY_STRUCT_YY_BUFFER_STATE
  119. struct yy_buffer_state
  120. {
  121. FILE *yy_input_file;
  122. char *yy_ch_buf; /* input buffer */
  123. char *yy_buf_pos; /* current position in input buffer */
  124. /* Size of input buffer in bytes, not including room for EOB
  125. * characters.
  126. */
  127. yy_size_t yy_buf_size;
  128. /* Number of characters read into yy_ch_buf, not including EOB
  129. * characters.
  130. */
  131. int yy_n_chars;
  132. /* Whether we "own" the buffer - i.e., we know we created it,
  133. * and can realloc() it to grow it, and should free() it to
  134. * delete it.
  135. */
  136. int yy_is_our_buffer;
  137. /* Whether this is an "interactive" input source; if so, and
  138. * if we're using stdio for input, then we want to use getc()
  139. * instead of fread(), to make sure we stop fetching input after
  140. * each newline.
  141. */
  142. int yy_is_interactive;
  143. /* Whether we're considered to be at the beginning of a line.
  144. * If so, '^' rules will be active on the next match, otherwise
  145. * not.
  146. */
  147. int yy_at_bol;
  148. int yy_bs_lineno; /**< The line count. */
  149. int yy_bs_column; /**< The column count. */
  150. /* Whether to try to fill the input buffer when we reach the
  151. * end of it.
  152. */
  153. int yy_fill_buffer;
  154. int yy_buffer_status;
  155. };
  156. #endif /* !YY_STRUCT_YY_BUFFER_STATE */
  157. void rcsrestart (FILE *input_file ,yyscan_t yyscanner );
  158. void rcs_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
  159. YY_BUFFER_STATE rcs_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
  160. void rcs_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
  161. void rcs_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
  162. void rcspush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
  163. void rcspop_buffer_state (yyscan_t yyscanner );
  164. YY_BUFFER_STATE rcs_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
  165. YY_BUFFER_STATE rcs_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
  166. YY_BUFFER_STATE rcs_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
  167. void *rcsalloc (yy_size_t ,yyscan_t yyscanner );
  168. void *rcsrealloc (void *,yy_size_t ,yyscan_t yyscanner );
  169. void rcsfree (void * ,yyscan_t yyscanner );
  170. /* Begin user sect3 */
  171. #define rcswrap(n) 1
  172. #define YY_SKIP_YYWRAP
  173. #define yytext_ptr yytext_r
  174. #ifdef YY_HEADER_EXPORT_START_CONDITIONS
  175. #define INITIAL 0
  176. #endif
  177. #ifndef YY_NO_UNISTD_H
  178. /* Special case for "unistd.h", since it is non-ANSI. We include it way
  179. * down here because we want the user's section 1 to have been scanned first.
  180. * The user has a chance to override it with an option.
  181. */
  182. #include <unistd.h>
  183. #endif
  184. #ifndef YY_EXTRA_TYPE
  185. #define YY_EXTRA_TYPE void *
  186. #endif
  187. int rcslex_init (yyscan_t* scanner);
  188. int rcslex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
  189. /* Accessor methods to globals.
  190. These are made visible to non-reentrant scanners for convenience. */
  191. int rcslex_destroy (yyscan_t yyscanner );
  192. int rcsget_debug (yyscan_t yyscanner );
  193. void rcsset_debug (int debug_flag ,yyscan_t yyscanner );
  194. YY_EXTRA_TYPE rcsget_extra (yyscan_t yyscanner );
  195. void rcsset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
  196. FILE *rcsget_in (yyscan_t yyscanner );
  197. void rcsset_in (FILE * in_str ,yyscan_t yyscanner );
  198. FILE *rcsget_out (yyscan_t yyscanner );
  199. void rcsset_out (FILE * out_str ,yyscan_t yyscanner );
  200. int rcsget_leng (yyscan_t yyscanner );
  201. char *rcsget_text (yyscan_t yyscanner );
  202. int rcsget_lineno (yyscan_t yyscanner );
  203. void rcsset_lineno (int line_number ,yyscan_t yyscanner );
  204. /* Macros after this point can all be overridden by user definitions in
  205. * section 1.
  206. */
  207. #ifndef YY_SKIP_YYWRAP
  208. #ifdef __cplusplus
  209. extern "C" int rcswrap (yyscan_t yyscanner );
  210. #else
  211. extern int rcswrap (yyscan_t yyscanner );
  212. #endif
  213. #endif
  214. #ifndef yytext_ptr
  215. static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
  216. #endif
  217. #ifdef YY_NEED_STRLEN
  218. static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
  219. #endif
  220. #ifndef YY_NO_INPUT
  221. #endif
  222. /* Amount of stuff to slurp up with each read. */
  223. #ifndef YY_READ_BUF_SIZE
  224. #define YY_READ_BUF_SIZE 8192
  225. #endif
  226. /* Number of entries by which start-condition stack grows. */
  227. #ifndef YY_START_STACK_INCR
  228. #define YY_START_STACK_INCR 25
  229. #endif
  230. /* Default declaration of generated scanner - a define so the user can
  231. * easily add parameters.
  232. */
  233. #ifndef YY_DECL
  234. #define YY_DECL_IS_OURS 1
  235. extern int rcslex (yyscan_t yyscanner);
  236. #define YY_DECL int rcslex (yyscan_t yyscanner)
  237. #endif /* !YY_DECL */
  238. /* yy_get_previous_state - get the state just before the EOB char was reached */
  239. #undef YY_NEW_FILE
  240. #undef YY_FLUSH_BUFFER
  241. #undef yy_set_bol
  242. #undef yy_new_buffer
  243. #undef yy_set_interactive
  244. #undef YY_DO_BEFORE_ACTION
  245. #ifdef YY_DECL_IS_OURS
  246. #undef YY_DECL_IS_OURS
  247. #undef YY_DECL
  248. #endif
  249. #line 73 "rcstokenizer.l"
  250. #line 332 "rcstokenizer.h"
  251. #undef rcsIN_HEADER
  252. #endif /* rcsHEADER_H */