PageRenderTime 36ms CodeModel.GetById 17ms app.highlight 14ms RepoModel.GetById 1ms app.codeStats 0ms

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