CMake Nightly Date Stamp
[kiteware-cmake.git] / Source / LexerParser / cmGccDepfileLexer.cxx
blobd926c8bb1831600ea21cf6891c95f1575e15c93e
1 #include "cmStandardLexer.h"
3 #define FLEXINT_H 1
4 #define YY_INT_ALIGNED short int
6 /* A lexical scanner generated by flex */
8 #define FLEX_SCANNER
9 #define YY_FLEX_MAJOR_VERSION 2
10 #define YY_FLEX_MINOR_VERSION 6
11 #define YY_FLEX_SUBMINOR_VERSION 4
12 #if YY_FLEX_SUBMINOR_VERSION > 0
13 #define FLEX_BETA
14 #endif
16 #ifdef yy_create_buffer
17 #define cmGccDepfile_yy_create_buffer_ALREADY_DEFINED
18 #else
19 #define yy_create_buffer cmGccDepfile_yy_create_buffer
20 #endif
22 #ifdef yy_delete_buffer
23 #define cmGccDepfile_yy_delete_buffer_ALREADY_DEFINED
24 #else
25 #define yy_delete_buffer cmGccDepfile_yy_delete_buffer
26 #endif
28 #ifdef yy_scan_buffer
29 #define cmGccDepfile_yy_scan_buffer_ALREADY_DEFINED
30 #else
31 #define yy_scan_buffer cmGccDepfile_yy_scan_buffer
32 #endif
34 #ifdef yy_scan_string
35 #define cmGccDepfile_yy_scan_string_ALREADY_DEFINED
36 #else
37 #define yy_scan_string cmGccDepfile_yy_scan_string
38 #endif
40 #ifdef yy_scan_bytes
41 #define cmGccDepfile_yy_scan_bytes_ALREADY_DEFINED
42 #else
43 #define yy_scan_bytes cmGccDepfile_yy_scan_bytes
44 #endif
46 #ifdef yy_init_buffer
47 #define cmGccDepfile_yy_init_buffer_ALREADY_DEFINED
48 #else
49 #define yy_init_buffer cmGccDepfile_yy_init_buffer
50 #endif
52 #ifdef yy_flush_buffer
53 #define cmGccDepfile_yy_flush_buffer_ALREADY_DEFINED
54 #else
55 #define yy_flush_buffer cmGccDepfile_yy_flush_buffer
56 #endif
58 #ifdef yy_load_buffer_state
59 #define cmGccDepfile_yy_load_buffer_state_ALREADY_DEFINED
60 #else
61 #define yy_load_buffer_state cmGccDepfile_yy_load_buffer_state
62 #endif
64 #ifdef yy_switch_to_buffer
65 #define cmGccDepfile_yy_switch_to_buffer_ALREADY_DEFINED
66 #else
67 #define yy_switch_to_buffer cmGccDepfile_yy_switch_to_buffer
68 #endif
70 #ifdef yypush_buffer_state
71 #define cmGccDepfile_yypush_buffer_state_ALREADY_DEFINED
72 #else
73 #define yypush_buffer_state cmGccDepfile_yypush_buffer_state
74 #endif
76 #ifdef yypop_buffer_state
77 #define cmGccDepfile_yypop_buffer_state_ALREADY_DEFINED
78 #else
79 #define yypop_buffer_state cmGccDepfile_yypop_buffer_state
80 #endif
82 #ifdef yyensure_buffer_stack
83 #define cmGccDepfile_yyensure_buffer_stack_ALREADY_DEFINED
84 #else
85 #define yyensure_buffer_stack cmGccDepfile_yyensure_buffer_stack
86 #endif
88 #ifdef yylex
89 #define cmGccDepfile_yylex_ALREADY_DEFINED
90 #else
91 #define yylex cmGccDepfile_yylex
92 #endif
94 #ifdef yyrestart
95 #define cmGccDepfile_yyrestart_ALREADY_DEFINED
96 #else
97 #define yyrestart cmGccDepfile_yyrestart
98 #endif
100 #ifdef yylex_init
101 #define cmGccDepfile_yylex_init_ALREADY_DEFINED
102 #else
103 #define yylex_init cmGccDepfile_yylex_init
104 #endif
106 #ifdef yylex_init_extra
107 #define cmGccDepfile_yylex_init_extra_ALREADY_DEFINED
108 #else
109 #define yylex_init_extra cmGccDepfile_yylex_init_extra
110 #endif
112 #ifdef yylex_destroy
113 #define cmGccDepfile_yylex_destroy_ALREADY_DEFINED
114 #else
115 #define yylex_destroy cmGccDepfile_yylex_destroy
116 #endif
118 #ifdef yyget_debug
119 #define cmGccDepfile_yyget_debug_ALREADY_DEFINED
120 #else
121 #define yyget_debug cmGccDepfile_yyget_debug
122 #endif
124 #ifdef yyset_debug
125 #define cmGccDepfile_yyset_debug_ALREADY_DEFINED
126 #else
127 #define yyset_debug cmGccDepfile_yyset_debug
128 #endif
130 #ifdef yyget_extra
131 #define cmGccDepfile_yyget_extra_ALREADY_DEFINED
132 #else
133 #define yyget_extra cmGccDepfile_yyget_extra
134 #endif
136 #ifdef yyset_extra
137 #define cmGccDepfile_yyset_extra_ALREADY_DEFINED
138 #else
139 #define yyset_extra cmGccDepfile_yyset_extra
140 #endif
142 #ifdef yyget_in
143 #define cmGccDepfile_yyget_in_ALREADY_DEFINED
144 #else
145 #define yyget_in cmGccDepfile_yyget_in
146 #endif
148 #ifdef yyset_in
149 #define cmGccDepfile_yyset_in_ALREADY_DEFINED
150 #else
151 #define yyset_in cmGccDepfile_yyset_in
152 #endif
154 #ifdef yyget_out
155 #define cmGccDepfile_yyget_out_ALREADY_DEFINED
156 #else
157 #define yyget_out cmGccDepfile_yyget_out
158 #endif
160 #ifdef yyset_out
161 #define cmGccDepfile_yyset_out_ALREADY_DEFINED
162 #else
163 #define yyset_out cmGccDepfile_yyset_out
164 #endif
166 #ifdef yyget_leng
167 #define cmGccDepfile_yyget_leng_ALREADY_DEFINED
168 #else
169 #define yyget_leng cmGccDepfile_yyget_leng
170 #endif
172 #ifdef yyget_text
173 #define cmGccDepfile_yyget_text_ALREADY_DEFINED
174 #else
175 #define yyget_text cmGccDepfile_yyget_text
176 #endif
178 #ifdef yyget_lineno
179 #define cmGccDepfile_yyget_lineno_ALREADY_DEFINED
180 #else
181 #define yyget_lineno cmGccDepfile_yyget_lineno
182 #endif
184 #ifdef yyset_lineno
185 #define cmGccDepfile_yyset_lineno_ALREADY_DEFINED
186 #else
187 #define yyset_lineno cmGccDepfile_yyset_lineno
188 #endif
190 #ifdef yyget_column
191 #define cmGccDepfile_yyget_column_ALREADY_DEFINED
192 #else
193 #define yyget_column cmGccDepfile_yyget_column
194 #endif
196 #ifdef yyset_column
197 #define cmGccDepfile_yyset_column_ALREADY_DEFINED
198 #else
199 #define yyset_column cmGccDepfile_yyset_column
200 #endif
202 #ifdef yywrap
203 #define cmGccDepfile_yywrap_ALREADY_DEFINED
204 #else
205 #define yywrap cmGccDepfile_yywrap
206 #endif
208 #ifdef yyalloc
209 #define cmGccDepfile_yyalloc_ALREADY_DEFINED
210 #else
211 #define yyalloc cmGccDepfile_yyalloc
212 #endif
214 #ifdef yyrealloc
215 #define cmGccDepfile_yyrealloc_ALREADY_DEFINED
216 #else
217 #define yyrealloc cmGccDepfile_yyrealloc
218 #endif
220 #ifdef yyfree
221 #define cmGccDepfile_yyfree_ALREADY_DEFINED
222 #else
223 #define yyfree cmGccDepfile_yyfree
224 #endif
226 /* First, we deal with platform-specific or compiler-specific issues. */
228 /* begin standard C headers. */
229 #include <stdio.h>
230 #include <string.h>
231 #include <errno.h>
232 #include <stdlib.h>
234 /* end standard C headers. */
236 /* flex integer type definitions */
238 #ifndef FLEXINT_H
239 #define FLEXINT_H
241 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
243 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
245 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
246 * if you want the limit (max/min) macros for int types.
248 #ifndef __STDC_LIMIT_MACROS
249 #define __STDC_LIMIT_MACROS 1
250 #endif
252 #include <inttypes.h>
253 typedef int8_t flex_int8_t;
254 typedef uint8_t flex_uint8_t;
255 typedef int16_t flex_int16_t;
256 typedef uint16_t flex_uint16_t;
257 typedef int32_t flex_int32_t;
258 typedef uint32_t flex_uint32_t;
259 #else
260 typedef signed char flex_int8_t;
261 typedef short int flex_int16_t;
262 typedef int flex_int32_t;
263 typedef unsigned char flex_uint8_t;
264 typedef unsigned short int flex_uint16_t;
265 typedef unsigned int flex_uint32_t;
267 /* Limits of integral types. */
268 #ifndef INT8_MIN
269 #define INT8_MIN (-128)
270 #endif
271 #ifndef INT16_MIN
272 #define INT16_MIN (-32767-1)
273 #endif
274 #ifndef INT32_MIN
275 #define INT32_MIN (-2147483647-1)
276 #endif
277 #ifndef INT8_MAX
278 #define INT8_MAX (127)
279 #endif
280 #ifndef INT16_MAX
281 #define INT16_MAX (32767)
282 #endif
283 #ifndef INT32_MAX
284 #define INT32_MAX (2147483647)
285 #endif
286 #ifndef UINT8_MAX
287 #define UINT8_MAX (255U)
288 #endif
289 #ifndef UINT16_MAX
290 #define UINT16_MAX (65535U)
291 #endif
292 #ifndef UINT32_MAX
293 #define UINT32_MAX (4294967295U)
294 #endif
296 #ifndef SIZE_MAX
297 #define SIZE_MAX (~(size_t)0)
298 #endif
300 #endif /* ! C99 */
302 #endif /* ! FLEXINT_H */
304 /* begin standard C++ headers. */
306 /* TODO: this is always defined, so inline it */
307 #define yyconst const
309 #if defined(__GNUC__) && __GNUC__ >= 3
310 #define yynoreturn __attribute__((__noreturn__))
311 #else
312 #define yynoreturn
313 #endif
315 /* Returned upon end-of-file. */
316 #define YY_NULL 0
318 /* Promotes a possibly negative, possibly signed char to an
319 * integer in range [0..255] for use as an array index.
321 #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
323 /* An opaque pointer. */
324 #ifndef YY_TYPEDEF_YY_SCANNER_T
325 #define YY_TYPEDEF_YY_SCANNER_T
326 typedef void* yyscan_t;
327 #endif
329 /* For convenience, these vars (plus the bison vars far below)
330 are macros in the reentrant scanner. */
331 #define yyin yyg->yyin_r
332 #define yyout yyg->yyout_r
333 #define yyextra yyg->yyextra_r
334 #define yyleng yyg->yyleng_r
335 #define yytext yyg->yytext_r
336 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
337 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
338 #define yy_flex_debug yyg->yy_flex_debug_r
340 /* Enter a start condition. This macro really ought to take a parameter,
341 * but we do it the disgusting crufty way forced on us by the ()-less
342 * definition of BEGIN.
344 #define BEGIN yyg->yy_start = 1 + 2 *
345 /* Translate the current start state into a value that can be later handed
346 * to BEGIN to return to the state. The YYSTATE alias is for lex
347 * compatibility.
349 #define YY_START ((yyg->yy_start - 1) / 2)
350 #define YYSTATE YY_START
351 /* Action number for EOF rule of a given start state. */
352 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
353 /* Special action meaning "start processing a new file". */
354 #define YY_NEW_FILE yyrestart( yyin , yyscanner )
355 #define YY_END_OF_BUFFER_CHAR 0
357 /* Size of default input buffer. */
358 #ifndef YY_BUF_SIZE
359 #ifdef __ia64__
360 /* On IA-64, the buffer size is 16k, not 8k.
361 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
362 * Ditto for the __ia64__ case accordingly.
364 #define YY_BUF_SIZE 32768
365 #else
366 #define YY_BUF_SIZE 16384
367 #endif /* __ia64__ */
368 #endif
370 /* The state buf must be large enough to hold one state per character in the main buffer.
372 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
374 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
375 #define YY_TYPEDEF_YY_BUFFER_STATE
376 typedef struct yy_buffer_state *YY_BUFFER_STATE;
377 #endif
379 #ifndef YY_TYPEDEF_YY_SIZE_T
380 #define YY_TYPEDEF_YY_SIZE_T
381 typedef size_t yy_size_t;
382 #endif
384 #define EOB_ACT_CONTINUE_SCAN 0
385 #define EOB_ACT_END_OF_FILE 1
386 #define EOB_ACT_LAST_MATCH 2
388 #define YY_LESS_LINENO(n)
389 #define YY_LINENO_REWIND_TO(ptr)
391 /* Return all but the first "n" matched characters back to the input stream. */
392 #define yyless(n) \
393 do \
395 /* Undo effects of setting up yytext. */ \
396 int yyless_macro_arg = (n); \
397 YY_LESS_LINENO(yyless_macro_arg);\
398 *yy_cp = yyg->yy_hold_char; \
399 YY_RESTORE_YY_MORE_OFFSET \
400 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
401 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
403 while ( 0 )
404 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
406 #ifndef YY_STRUCT_YY_BUFFER_STATE
407 #define YY_STRUCT_YY_BUFFER_STATE
408 struct yy_buffer_state
410 FILE *yy_input_file;
412 char *yy_ch_buf; /* input buffer */
413 char *yy_buf_pos; /* current position in input buffer */
415 /* Size of input buffer in bytes, not including room for EOB
416 * characters.
418 int yy_buf_size;
420 /* Number of characters read into yy_ch_buf, not including EOB
421 * characters.
423 int yy_n_chars;
425 /* Whether we "own" the buffer - i.e., we know we created it,
426 * and can realloc() it to grow it, and should free() it to
427 * delete it.
429 int yy_is_our_buffer;
431 /* Whether this is an "interactive" input source; if so, and
432 * if we're using stdio for input, then we want to use getc()
433 * instead of fread(), to make sure we stop fetching input after
434 * each newline.
436 int yy_is_interactive;
438 /* Whether we're considered to be at the beginning of a line.
439 * If so, '^' rules will be active on the next match, otherwise
440 * not.
442 int yy_at_bol;
444 int yy_bs_lineno; /**< The line count. */
445 int yy_bs_column; /**< The column count. */
447 /* Whether to try to fill the input buffer when we reach the
448 * end of it.
450 int yy_fill_buffer;
452 int yy_buffer_status;
454 #define YY_BUFFER_NEW 0
455 #define YY_BUFFER_NORMAL 1
456 /* When an EOF's been seen but there's still some text to process
457 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
458 * shouldn't try reading from the input source any more. We might
459 * still have a bunch of tokens to match, though, because of
460 * possible backing-up.
462 * When we actually see the EOF, we change the status to "new"
463 * (via yyrestart()), so that the user can continue scanning by
464 * just pointing yyin at a new input file.
466 #define YY_BUFFER_EOF_PENDING 2
469 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
471 /* We provide macros for accessing buffer states in case in the
472 * future we want to put the buffer states in a more general
473 * "scanner state".
475 * Returns the top of the stack, or NULL.
477 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
478 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
479 : NULL)
480 /* Same as previous macro, but useful when we know that the buffer stack is not
481 * NULL or when we need an lvalue. For internal use only.
483 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
485 void yyrestart ( FILE *input_file , yyscan_t yyscanner );
486 void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
487 YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
488 void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
489 void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
490 void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
491 void yypop_buffer_state ( yyscan_t yyscanner );
493 static void yyensure_buffer_stack ( yyscan_t yyscanner );
494 static void yy_load_buffer_state ( yyscan_t yyscanner );
495 static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner );
496 #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner)
498 YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
499 YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
500 YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
502 void *yyalloc ( yy_size_t , yyscan_t yyscanner );
503 void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
504 void yyfree ( void * , yyscan_t yyscanner );
506 #define yy_new_buffer yy_create_buffer
507 #define yy_set_interactive(is_interactive) \
509 if ( ! YY_CURRENT_BUFFER ){ \
510 yyensure_buffer_stack (yyscanner); \
511 YY_CURRENT_BUFFER_LVALUE = \
512 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
514 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
516 #define yy_set_bol(at_bol) \
518 if ( ! YY_CURRENT_BUFFER ){\
519 yyensure_buffer_stack (yyscanner); \
520 YY_CURRENT_BUFFER_LVALUE = \
521 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
523 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
525 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
527 /* Begin user sect3 */
529 #define cmGccDepfile_yywrap(yyscanner) (/*CONSTCOND*/1)
530 #define YY_SKIP_YYWRAP
531 typedef flex_uint8_t YY_CHAR;
533 typedef int yy_state_type;
535 #define yytext_ptr yytext_r
537 static yy_state_type yy_get_previous_state ( yyscan_t yyscanner );
538 static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner);
539 static int yy_get_next_buffer ( yyscan_t yyscanner );
540 static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner );
542 /* Done after the current pattern has been matched and before the
543 * corresponding action - sets up yytext.
545 #define YY_DO_BEFORE_ACTION \
546 yyg->yytext_ptr = yy_bp; \
547 yyleng = (int) (yy_cp - yy_bp); \
548 yyg->yy_hold_char = *yy_cp; \
549 *yy_cp = '\0'; \
550 yyg->yy_c_buf_p = yy_cp;
551 #define YY_NUM_RULES 13
552 #define YY_END_OF_BUFFER 14
553 /* This struct is not used in this scanner,
554 but its presence is necessary. */
555 struct yy_trans_info
557 flex_int32_t yy_verify;
558 flex_int32_t yy_nxt;
560 static const flex_int16_t yy_accept[32] =
561 { 0,
562 0, 0, 14, 12, 10, 7, 12, 11, 12, 12,
563 12, 10, 0, 7, 11, 1, 9, 8, 0, 0,
564 6, 0, 4, 2, 3, 0, 9, 0, 5, 0,
568 static const YY_CHAR yy_ec[256] =
569 { 0,
570 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
571 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
572 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
573 1, 5, 6, 1, 7, 8, 6, 1, 1, 6,
574 6, 1, 6, 6, 6, 6, 6, 6, 6, 6,
575 6, 6, 6, 6, 6, 6, 6, 9, 1, 1,
576 6, 1, 1, 6, 6, 6, 6, 6, 6, 6,
577 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
578 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
579 6, 10, 6, 1, 6, 1, 6, 6, 6, 6,
581 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
582 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
583 6, 6, 6, 1, 6, 6, 1, 6, 6, 6,
584 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
585 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
586 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
587 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
588 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
589 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
590 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
592 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
593 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
594 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
595 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
596 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
597 6, 6, 6, 6, 6
600 static const YY_CHAR yy_meta[11] =
601 { 0,
602 1, 2, 1, 1, 2, 1, 1, 1, 1, 3
605 static const flex_int16_t yy_base[34] =
606 { 0,
607 0, 0, 39, 46, 26, 46, 32, 28, 25, 9,
608 17, 15, 25, 46, 17, 46, 0, 46, 15, 27,
609 46, 14, 46, 46, 46, 27, 46, 13, 46, 33,
610 46, 42, 13
613 static const flex_int16_t yy_def[34] =
614 { 0,
615 31, 1, 31, 31, 32, 31, 31, 31, 31, 31,
616 31, 32, 31, 31, 31, 31, 33, 31, 31, 31,
617 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
618 0, 31, 31
621 static const flex_int16_t yy_nxt[57] =
622 { 0,
623 4, 5, 6, 7, 5, 8, 4, 9, 10, 11,
624 17, 18, 19, 17, 17, 27, 21, 18, 20, 21,
625 22, 23, 15, 24, 13, 25, 26, 21, 22, 27,
626 28, 29, 16, 15, 14, 13, 30, 23, 31, 31,
627 31, 31, 26, 12, 12, 3, 31, 31, 31, 31,
628 31, 31, 31, 31, 31, 31
631 static const flex_int16_t yy_chk[57] =
632 { 0,
633 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
634 10, 10, 10, 10, 33, 28, 22, 19, 10, 11,
635 11, 11, 15, 11, 12, 11, 11, 13, 13, 20,
636 20, 26, 9, 8, 7, 5, 26, 30, 3, 0,
637 0, 0, 30, 32, 32, 31, 31, 31, 31, 31,
638 31, 31, 31, 31, 31, 31
641 /* The intent behind this definition is that it'll catch
642 * any uses of REJECT which flex missed.
644 #define REJECT reject_used_but_not_detected
645 #define yymore() yymore_used_but_not_detected
646 #define YY_MORE_ADJ 0
647 #define YY_RESTORE_YY_MORE_OFFSET
648 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
649 file Copyright.txt or https://cmake.org/licensing for details. */
651 /* IWYU pragma: no_forward_declare yyguts_t */
653 #ifndef __clang_analyzer__ /* Suppress clang-analyzer warnings */
655 #include <cmGccDepfileLexerHelper.h>
656 #include <string>
658 #define INITIAL 0
660 #ifndef YY_EXTRA_TYPE
661 #define YY_EXTRA_TYPE void *
662 #endif
664 /* Holds the entire state of the reentrant scanner. */
665 struct yyguts_t
668 /* User-defined. Not touched by flex. */
669 YY_EXTRA_TYPE yyextra_r;
671 /* The rest are the same as the globals declared in the non-reentrant scanner. */
672 FILE *yyin_r, *yyout_r;
673 size_t yy_buffer_stack_top; /**< index of top of stack. */
674 size_t yy_buffer_stack_max; /**< capacity of stack. */
675 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
676 char yy_hold_char;
677 int yy_n_chars;
678 int yyleng_r;
679 char *yy_c_buf_p;
680 int yy_init;
681 int yy_start;
682 int yy_did_buffer_switch_on_eof;
683 int yy_start_stack_ptr;
684 int yy_start_stack_depth;
685 int *yy_start_stack;
686 yy_state_type yy_last_accepting_state;
687 char* yy_last_accepting_cpos;
689 int yylineno_r;
690 int yy_flex_debug_r;
692 char *yytext_r;
693 int yy_more_flag;
694 int yy_more_len;
696 }; /* end struct yyguts_t */
698 static int yy_init_globals ( yyscan_t yyscanner );
700 int yylex_init (yyscan_t* scanner);
702 int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
704 /* Accessor methods to globals.
705 These are made visible to non-reentrant scanners for convenience. */
707 int yylex_destroy ( yyscan_t yyscanner );
709 int yyget_debug ( yyscan_t yyscanner );
711 void yyset_debug ( int debug_flag , yyscan_t yyscanner );
713 YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
715 void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
717 FILE *yyget_in ( yyscan_t yyscanner );
719 void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
721 FILE *yyget_out ( yyscan_t yyscanner );
723 void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
725 int yyget_leng ( yyscan_t yyscanner );
727 char *yyget_text ( yyscan_t yyscanner );
729 int yyget_lineno ( yyscan_t yyscanner );
731 void yyset_lineno ( int _line_number , yyscan_t yyscanner );
733 int yyget_column ( yyscan_t yyscanner );
735 void yyset_column ( int _column_no , yyscan_t yyscanner );
737 /* Macros after this point can all be overridden by user definitions in
738 * section 1.
741 #ifndef YY_SKIP_YYWRAP
742 #ifdef __cplusplus
743 extern "C" int yywrap ( yyscan_t yyscanner );
744 #else
745 extern int yywrap ( yyscan_t yyscanner );
746 #endif
747 #endif
749 #ifndef YY_NO_UNPUT
751 static void yyunput ( int c, char *buf_ptr , yyscan_t yyscanner);
753 #endif
755 #ifndef yytext_ptr
756 static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
757 #endif
759 #ifdef YY_NEED_STRLEN
760 static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
761 #endif
763 #ifndef YY_NO_INPUT
764 #ifdef __cplusplus
765 static int yyinput ( yyscan_t yyscanner );
766 #else
767 static int input ( yyscan_t yyscanner );
768 #endif
770 #endif
772 /* Amount of stuff to slurp up with each read. */
773 #ifndef YY_READ_BUF_SIZE
774 #ifdef __ia64__
775 /* On IA-64, the buffer size is 16k, not 8k */
776 #define YY_READ_BUF_SIZE 16384
777 #else
778 #define YY_READ_BUF_SIZE 8192
779 #endif /* __ia64__ */
780 #endif
782 /* Copy whatever the last rule matched to the standard output. */
783 #ifndef ECHO
784 /* This used to be an fputs(), but since the string might contain NUL's,
785 * we now use fwrite().
787 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
788 #endif
790 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
791 * is returned in "result".
793 #ifndef YY_INPUT
794 #define YY_INPUT(buf,result,max_size) \
795 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
797 int c = '*'; \
798 int n; \
799 for ( n = 0; n < max_size && \
800 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
801 buf[n] = (char) c; \
802 if ( c == '\n' ) \
803 buf[n++] = (char) c; \
804 if ( c == EOF && ferror( yyin ) ) \
805 YY_FATAL_ERROR( "input in flex scanner failed" ); \
806 result = n; \
808 else \
810 errno=0; \
811 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
813 if( errno != EINTR) \
815 YY_FATAL_ERROR( "input in flex scanner failed" ); \
816 break; \
818 errno=0; \
819 clearerr(yyin); \
824 #endif
826 /* No semi-colon after return; correct usage is to write "yyterminate();" -
827 * we don't want an extra ';' after the "return" because that will cause
828 * some compilers to complain about unreachable statements.
830 #ifndef yyterminate
831 #define yyterminate() return YY_NULL
832 #endif
834 /* Number of entries by which start-condition stack grows. */
835 #ifndef YY_START_STACK_INCR
836 #define YY_START_STACK_INCR 25
837 #endif
839 /* Report a fatal error. */
840 #ifndef YY_FATAL_ERROR
841 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
842 #endif
844 /* end tables serialization structures and prototypes */
846 /* Default declaration of generated scanner - a define so the user can
847 * easily add parameters.
849 #ifndef YY_DECL
850 #define YY_DECL_IS_OURS 1
852 extern int yylex (yyscan_t yyscanner);
854 #define YY_DECL int yylex (yyscan_t yyscanner)
855 #endif /* !YY_DECL */
857 /* Code executed at the beginning of each rule, after yytext and yyleng
858 * have been set up.
860 #ifndef YY_USER_ACTION
861 #define YY_USER_ACTION
862 #endif
864 /* Code executed at the end of each rule. */
865 #ifndef YY_BREAK
866 #define YY_BREAK /*LINTED*/break;
867 #endif
869 #define YY_RULE_SETUP \
870 YY_USER_ACTION
872 /** The main scanner function which does all the work.
874 YY_DECL
876 yy_state_type yy_current_state;
877 char *yy_cp, *yy_bp;
878 int yy_act;
879 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
881 if ( !yyg->yy_init )
883 yyg->yy_init = 1;
885 #ifdef YY_USER_INIT
886 YY_USER_INIT;
887 #endif
889 if ( ! yyg->yy_start )
890 yyg->yy_start = 1; /* first start state */
892 if ( ! yyin )
893 yyin = stdin;
895 if ( ! yyout )
896 yyout = stdout;
898 if ( ! YY_CURRENT_BUFFER ) {
899 yyensure_buffer_stack (yyscanner);
900 YY_CURRENT_BUFFER_LVALUE =
901 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
904 yy_load_buffer_state( yyscanner );
909 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
911 yy_cp = yyg->yy_c_buf_p;
913 /* Support of yytext. */
914 *yy_cp = yyg->yy_hold_char;
916 /* yy_bp points to the position in yy_ch_buf of the start of
917 * the current run.
919 yy_bp = yy_cp;
921 yy_current_state = yyg->yy_start;
922 yy_match:
925 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
926 if ( yy_accept[yy_current_state] )
928 yyg->yy_last_accepting_state = yy_current_state;
929 yyg->yy_last_accepting_cpos = yy_cp;
931 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
933 yy_current_state = (int) yy_def[yy_current_state];
934 if ( yy_current_state >= 32 )
935 yy_c = yy_meta[yy_c];
937 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
938 ++yy_cp;
940 while ( yy_base[yy_current_state] != 46 );
942 yy_find_action:
943 yy_act = yy_accept[yy_current_state];
944 if ( yy_act == 0 )
945 { /* have to back up */
946 yy_cp = yyg->yy_last_accepting_cpos;
947 yy_current_state = yyg->yy_last_accepting_state;
948 yy_act = yy_accept[yy_current_state];
951 YY_DO_BEFORE_ACTION;
953 do_action: /* This label is used only to access EOF actions. */
955 switch ( yy_act )
956 { /* beginning of action switch */
957 case 0: /* must back up */
958 /* undo the effects of YY_DO_BEFORE_ACTION */
959 *yy_cp = yyg->yy_hold_char;
960 yy_cp = yyg->yy_last_accepting_cpos;
961 yy_current_state = yyg->yy_last_accepting_state;
962 goto yy_find_action;
964 case 1:
965 YY_RULE_SETUP
967 // Unescape the dollar sign.
968 yyextra->addToCurrentPath("$");
970 YY_BREAK
971 case 2:
972 YY_RULE_SETUP
974 // Unescape the hash.
975 yyextra->addToCurrentPath("#");
977 YY_BREAK
978 case 3:
979 YY_RULE_SETUP
981 // Unescape the colon.
982 yyextra->addToCurrentPath(":");
984 YY_BREAK
985 case 4:
986 YY_RULE_SETUP
988 // 2N+1 backslashes plus space -> N backslashes plus space.
989 size_t c = (strlen(yytext) - 1) / 2;
990 std::string s(c, '\\');
991 s.push_back(' ');
992 yyextra->addToCurrentPath(s.c_str());
994 YY_BREAK
995 case 5:
996 YY_RULE_SETUP
998 // 2N backslashes plus space -> 2N backslashes, end of filename.
999 yytext[strlen(yytext) - 1] = 0;
1000 yyextra->addToCurrentPath(yytext);
1001 yyextra->newDependency();
1003 YY_BREAK
1004 case 6:
1005 /* rule 6 can match eol */
1006 YY_RULE_SETUP
1008 // A line continuation ends the current file name.
1009 yyextra->newRuleOrDependency();
1011 YY_BREAK
1012 case 7:
1013 /* rule 7 can match eol */
1014 YY_RULE_SETUP
1016 // A newline ends the current file name and the current rule.
1017 yyextra->newEntry();
1019 YY_BREAK
1020 case 8:
1021 /* rule 8 can match eol */
1022 YY_RULE_SETUP
1024 // A colon ends the rules
1025 yyextra->newDependency();
1026 // A newline after colon terminates current rule.
1027 yyextra->newEntry();
1029 YY_BREAK
1030 case 9:
1031 /* rule 9 can match eol */
1032 YY_RULE_SETUP
1034 // A colon followed by space or line continuation ends the rules
1035 // and starts a new dependency.
1036 yyextra->newDependency();
1038 YY_BREAK
1039 case 10:
1040 YY_RULE_SETUP
1042 // Rules and dependencies are separated by blocks of whitespace.
1043 yyextra->newRuleOrDependency();
1045 YY_BREAK
1046 case 11:
1047 YY_RULE_SETUP
1049 // Got a span of plain text.
1050 yyextra->addToCurrentPath(yytext);
1052 YY_BREAK
1053 case 12:
1054 YY_RULE_SETUP
1056 // Got an otherwise unmatched character.
1057 yyextra->addToCurrentPath(yytext);
1059 YY_BREAK
1060 case 13:
1061 YY_RULE_SETUP
1062 ECHO;
1063 YY_BREAK
1064 case YY_STATE_EOF(INITIAL):
1065 yyterminate();
1067 case YY_END_OF_BUFFER:
1069 /* Amount of text matched not including the EOB char. */
1070 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1072 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1073 *yy_cp = yyg->yy_hold_char;
1074 YY_RESTORE_YY_MORE_OFFSET
1076 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1078 /* We're scanning a new file or input source. It's
1079 * possible that this happened because the user
1080 * just pointed yyin at a new source and called
1081 * yylex(). If so, then we have to assure
1082 * consistency between YY_CURRENT_BUFFER and our
1083 * globals. Here is the right place to do so, because
1084 * this is the first action (other than possibly a
1085 * back-up) that will match for the new input source.
1087 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1088 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1089 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1092 /* Note that here we test for yy_c_buf_p "<=" to the position
1093 * of the first EOB in the buffer, since yy_c_buf_p will
1094 * already have been incremented past the NUL character
1095 * (since all states make transitions on EOB to the
1096 * end-of-buffer state). Contrast this with the test
1097 * in input().
1099 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1100 { /* This was really a NUL. */
1101 yy_state_type yy_next_state;
1103 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1105 yy_current_state = yy_get_previous_state( yyscanner );
1107 /* Okay, we're now positioned to make the NUL
1108 * transition. We couldn't have
1109 * yy_get_previous_state() go ahead and do it
1110 * for us because it doesn't know how to deal
1111 * with the possibility of jamming (and we don't
1112 * want to build jamming into it because then it
1113 * will run more slowly).
1116 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1118 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1120 if ( yy_next_state )
1122 /* Consume the NUL. */
1123 yy_cp = ++yyg->yy_c_buf_p;
1124 yy_current_state = yy_next_state;
1125 goto yy_match;
1128 else
1130 yy_cp = yyg->yy_c_buf_p;
1131 goto yy_find_action;
1135 else switch ( yy_get_next_buffer( yyscanner ) )
1137 case EOB_ACT_END_OF_FILE:
1139 yyg->yy_did_buffer_switch_on_eof = 0;
1141 if ( yywrap( yyscanner ) )
1143 /* Note: because we've taken care in
1144 * yy_get_next_buffer() to have set up
1145 * yytext, we can now set up
1146 * yy_c_buf_p so that if some total
1147 * hoser (like flex itself) wants to
1148 * call the scanner after we return the
1149 * YY_NULL, it'll still work - another
1150 * YY_NULL will get returned.
1152 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1154 yy_act = YY_STATE_EOF(YY_START);
1155 goto do_action;
1158 else
1160 if ( ! yyg->yy_did_buffer_switch_on_eof )
1161 YY_NEW_FILE;
1163 break;
1166 case EOB_ACT_CONTINUE_SCAN:
1167 yyg->yy_c_buf_p =
1168 yyg->yytext_ptr + yy_amount_of_matched_text;
1170 yy_current_state = yy_get_previous_state( yyscanner );
1172 yy_cp = yyg->yy_c_buf_p;
1173 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1174 goto yy_match;
1176 case EOB_ACT_LAST_MATCH:
1177 yyg->yy_c_buf_p =
1178 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1180 yy_current_state = yy_get_previous_state( yyscanner );
1182 yy_cp = yyg->yy_c_buf_p;
1183 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1184 goto yy_find_action;
1186 break;
1189 default:
1190 YY_FATAL_ERROR(
1191 "fatal flex scanner internal error--no action found" );
1192 } /* end of action switch */
1193 } /* end of scanning one token */
1194 } /* end of user's declarations */
1195 } /* end of yylex */
1197 /* yy_get_next_buffer - try to read in a new buffer
1199 * Returns a code representing an action:
1200 * EOB_ACT_LAST_MATCH -
1201 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1202 * EOB_ACT_END_OF_FILE - end of file
1204 static int yy_get_next_buffer (yyscan_t yyscanner)
1206 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1207 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1208 char *source = yyg->yytext_ptr;
1209 int number_to_move, i;
1210 int ret_val;
1212 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1213 YY_FATAL_ERROR(
1214 "fatal flex scanner internal error--end of buffer missed" );
1216 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1217 { /* Don't try to fill the buffer, so this is an EOF. */
1218 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1220 /* We matched a single character, the EOB, so
1221 * treat this as a final EOF.
1223 return EOB_ACT_END_OF_FILE;
1226 else
1228 /* We matched some text prior to the EOB, first
1229 * process it.
1231 return EOB_ACT_LAST_MATCH;
1235 /* Try to read more data. */
1237 /* First move last chars to start of buffer. */
1238 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
1240 for ( i = 0; i < number_to_move; ++i )
1241 *(dest++) = *(source++);
1243 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1244 /* don't do the read, it's not guaranteed to return an EOF,
1245 * just force an EOF
1247 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1249 else
1251 int num_to_read =
1252 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1254 while ( num_to_read <= 0 )
1255 { /* Not enough room in the buffer - grow it. */
1257 /* just a shorter name for the current buffer */
1258 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1260 int yy_c_buf_p_offset =
1261 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1263 if ( b->yy_is_our_buffer )
1265 int new_size = b->yy_buf_size * 2;
1267 if ( new_size <= 0 )
1268 b->yy_buf_size += b->yy_buf_size / 8;
1269 else
1270 b->yy_buf_size *= 2;
1272 b->yy_ch_buf = (char *)
1273 /* Include room in for 2 EOB chars. */
1274 yyrealloc( (void *) b->yy_ch_buf,
1275 (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
1277 else
1278 /* Can't grow it, we don't own it. */
1279 b->yy_ch_buf = NULL;
1281 if ( ! b->yy_ch_buf )
1282 YY_FATAL_ERROR(
1283 "fatal error - scanner input buffer overflow" );
1285 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1287 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1288 number_to_move - 1;
1292 if ( num_to_read > YY_READ_BUF_SIZE )
1293 num_to_read = YY_READ_BUF_SIZE;
1295 /* Read in more data. */
1296 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1297 yyg->yy_n_chars, num_to_read );
1299 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1302 if ( yyg->yy_n_chars == 0 )
1304 if ( number_to_move == YY_MORE_ADJ )
1306 ret_val = EOB_ACT_END_OF_FILE;
1307 yyrestart( yyin , yyscanner);
1310 else
1312 ret_val = EOB_ACT_LAST_MATCH;
1313 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1314 YY_BUFFER_EOF_PENDING;
1318 else
1319 ret_val = EOB_ACT_CONTINUE_SCAN;
1321 if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1322 /* Extend the array by 50%, plus the number we really need. */
1323 int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1324 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1325 (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
1326 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1327 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1328 /* "- 2" to take care of EOB's */
1329 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1332 yyg->yy_n_chars += number_to_move;
1333 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1334 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1336 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1338 return ret_val;
1341 /* yy_get_previous_state - get the state just before the EOB char was reached */
1343 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1345 yy_state_type yy_current_state;
1346 char *yy_cp;
1347 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1349 yy_current_state = yyg->yy_start;
1351 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1353 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1354 if ( yy_accept[yy_current_state] )
1356 yyg->yy_last_accepting_state = yy_current_state;
1357 yyg->yy_last_accepting_cpos = yy_cp;
1359 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1361 yy_current_state = (int) yy_def[yy_current_state];
1362 if ( yy_current_state >= 32 )
1363 yy_c = yy_meta[yy_c];
1365 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1368 return yy_current_state;
1371 /* yy_try_NUL_trans - try to make a transition on the NUL character
1373 * synopsis
1374 * next_state = yy_try_NUL_trans( current_state );
1376 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
1378 int yy_is_jam;
1379 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
1380 char *yy_cp = yyg->yy_c_buf_p;
1382 YY_CHAR yy_c = 1;
1383 if ( yy_accept[yy_current_state] )
1385 yyg->yy_last_accepting_state = yy_current_state;
1386 yyg->yy_last_accepting_cpos = yy_cp;
1388 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1390 yy_current_state = (int) yy_def[yy_current_state];
1391 if ( yy_current_state >= 32 )
1392 yy_c = yy_meta[yy_c];
1394 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1395 yy_is_jam = (yy_current_state == 31);
1397 (void)yyg;
1398 return yy_is_jam ? 0 : yy_current_state;
1401 #ifndef YY_NO_UNPUT
1403 static void yyunput (int c, char * yy_bp , yyscan_t yyscanner)
1405 char *yy_cp;
1406 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1408 yy_cp = yyg->yy_c_buf_p;
1410 /* undo effects of setting up yytext */
1411 *yy_cp = yyg->yy_hold_char;
1413 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1414 { /* need to shift things up to make room */
1415 /* +2 for EOB chars. */
1416 int number_to_move = yyg->yy_n_chars + 2;
1417 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1418 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1419 char *source =
1420 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1422 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1423 *--dest = *--source;
1425 yy_cp += (int) (dest - source);
1426 yy_bp += (int) (dest - source);
1427 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1428 yyg->yy_n_chars = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1430 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1431 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1434 *--yy_cp = (char) c;
1436 yyg->yytext_ptr = yy_bp;
1437 yyg->yy_hold_char = *yy_cp;
1438 yyg->yy_c_buf_p = yy_cp;
1441 #endif
1443 #ifndef YY_NO_INPUT
1444 #ifdef __cplusplus
1445 static int yyinput (yyscan_t yyscanner)
1446 #else
1447 static int input (yyscan_t yyscanner)
1448 #endif
1451 int c;
1452 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1454 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1456 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1458 /* yy_c_buf_p now points to the character we want to return.
1459 * If this occurs *before* the EOB characters, then it's a
1460 * valid NUL; if not, then we've hit the end of the buffer.
1462 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1463 /* This was really a NUL. */
1464 *yyg->yy_c_buf_p = '\0';
1466 else
1467 { /* need more input */
1468 int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
1469 ++yyg->yy_c_buf_p;
1471 switch ( yy_get_next_buffer( yyscanner ) )
1473 case EOB_ACT_LAST_MATCH:
1474 /* This happens because yy_g_n_b()
1475 * sees that we've accumulated a
1476 * token and flags that we need to
1477 * try matching the token before
1478 * proceeding. But for input(),
1479 * there's no matching to consider.
1480 * So convert the EOB_ACT_LAST_MATCH
1481 * to EOB_ACT_END_OF_FILE.
1484 /* Reset buffer status. */
1485 yyrestart( yyin , yyscanner);
1487 /*FALLTHROUGH*/
1489 case EOB_ACT_END_OF_FILE:
1491 if ( yywrap( yyscanner ) )
1492 return 0;
1494 if ( ! yyg->yy_did_buffer_switch_on_eof )
1495 YY_NEW_FILE;
1496 #ifdef __cplusplus
1497 return yyinput(yyscanner);
1498 #else
1499 return input(yyscanner);
1500 #endif
1503 case EOB_ACT_CONTINUE_SCAN:
1504 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
1505 break;
1510 c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
1511 *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
1512 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
1514 return c;
1516 #endif /* ifndef YY_NO_INPUT */
1518 /** Immediately switch to a different input stream.
1519 * @param input_file A readable stream.
1520 * @param yyscanner The scanner object.
1521 * @note This function does not reset the start condition to @c INITIAL .
1523 void yyrestart (FILE * input_file , yyscan_t yyscanner)
1525 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1527 if ( ! YY_CURRENT_BUFFER ){
1528 yyensure_buffer_stack (yyscanner);
1529 YY_CURRENT_BUFFER_LVALUE =
1530 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
1533 yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
1534 yy_load_buffer_state( yyscanner );
1537 /** Switch to a different input buffer.
1538 * @param new_buffer The new input buffer.
1539 * @param yyscanner The scanner object.
1541 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1543 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1545 /* TODO. We should be able to replace this entire function body
1546 * with
1547 * yypop_buffer_state();
1548 * yypush_buffer_state(new_buffer);
1550 yyensure_buffer_stack (yyscanner);
1551 if ( YY_CURRENT_BUFFER == new_buffer )
1552 return;
1554 if ( YY_CURRENT_BUFFER )
1556 /* Flush out information for old buffer. */
1557 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1558 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1559 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1562 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1563 yy_load_buffer_state( yyscanner );
1565 /* We don't actually know whether we did this switch during
1566 * EOF (yywrap()) processing, but the only time this flag
1567 * is looked at is after yywrap() is called, so it's safe
1568 * to go ahead and always set it.
1570 yyg->yy_did_buffer_switch_on_eof = 1;
1573 static void yy_load_buffer_state (yyscan_t yyscanner)
1575 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1576 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1577 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1578 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1579 yyg->yy_hold_char = *yyg->yy_c_buf_p;
1582 /** Allocate and initialize an input buffer state.
1583 * @param file A readable stream.
1584 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1585 * @param yyscanner The scanner object.
1586 * @return the allocated buffer state.
1588 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
1590 YY_BUFFER_STATE b;
1592 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
1593 if ( ! b )
1594 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1596 b->yy_buf_size = size;
1598 /* yy_ch_buf has to be 2 characters longer than the size given because
1599 * we need to put in 2 end-of-buffer characters.
1601 b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
1602 if ( ! b->yy_ch_buf )
1603 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1605 b->yy_is_our_buffer = 1;
1607 yy_init_buffer( b, file , yyscanner);
1609 return b;
1612 /** Destroy the buffer.
1613 * @param b a buffer created with yy_create_buffer()
1614 * @param yyscanner The scanner object.
1616 void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1618 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1620 if ( ! b )
1621 return;
1623 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1624 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1626 if ( b->yy_is_our_buffer )
1627 yyfree( (void *) b->yy_ch_buf , yyscanner );
1629 yyfree( (void *) b , yyscanner );
1632 /* Initializes or reinitializes a buffer.
1633 * This function is sometimes called more than once on the same buffer,
1634 * such as during a yyrestart() or at EOF.
1636 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
1639 int oerrno = errno;
1640 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1642 yy_flush_buffer( b , yyscanner);
1644 b->yy_input_file = file;
1645 b->yy_fill_buffer = 1;
1647 /* If b is the current buffer, then yy_init_buffer was _probably_
1648 * called from yyrestart() or through yy_get_next_buffer.
1649 * In that case, we don't want to reset the lineno or column.
1651 if (b != YY_CURRENT_BUFFER){
1652 b->yy_bs_lineno = 1;
1653 b->yy_bs_column = 0;
1656 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1658 errno = oerrno;
1661 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1662 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1663 * @param yyscanner The scanner object.
1665 void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1667 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1668 if ( ! b )
1669 return;
1671 b->yy_n_chars = 0;
1673 /* We always need two end-of-buffer characters. The first causes
1674 * a transition to the end-of-buffer state. The second causes
1675 * a jam in that state.
1677 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1678 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1680 b->yy_buf_pos = &b->yy_ch_buf[0];
1682 b->yy_at_bol = 1;
1683 b->yy_buffer_status = YY_BUFFER_NEW;
1685 if ( b == YY_CURRENT_BUFFER )
1686 yy_load_buffer_state( yyscanner );
1689 /** Pushes the new state onto the stack. The new state becomes
1690 * the current state. This function will allocate the stack
1691 * if necessary.
1692 * @param new_buffer The new state.
1693 * @param yyscanner The scanner object.
1695 void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1697 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1698 if (new_buffer == NULL)
1699 return;
1701 yyensure_buffer_stack(yyscanner);
1703 /* This block is copied from yy_switch_to_buffer. */
1704 if ( YY_CURRENT_BUFFER )
1706 /* Flush out information for old buffer. */
1707 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1708 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1709 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1712 /* Only push if top exists. Otherwise, replace top. */
1713 if (YY_CURRENT_BUFFER)
1714 yyg->yy_buffer_stack_top++;
1715 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1717 /* copied from yy_switch_to_buffer. */
1718 yy_load_buffer_state( yyscanner );
1719 yyg->yy_did_buffer_switch_on_eof = 1;
1722 /** Removes and deletes the top of the stack, if present.
1723 * The next element becomes the new top.
1724 * @param yyscanner The scanner object.
1726 void yypop_buffer_state (yyscan_t yyscanner)
1728 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1729 if (!YY_CURRENT_BUFFER)
1730 return;
1732 yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
1733 YY_CURRENT_BUFFER_LVALUE = NULL;
1734 if (yyg->yy_buffer_stack_top > 0)
1735 --yyg->yy_buffer_stack_top;
1737 if (YY_CURRENT_BUFFER) {
1738 yy_load_buffer_state( yyscanner );
1739 yyg->yy_did_buffer_switch_on_eof = 1;
1743 /* Allocates the stack if it does not exist.
1744 * Guarantees space for at least one push.
1746 static void yyensure_buffer_stack (yyscan_t yyscanner)
1748 yy_size_t num_to_alloc;
1749 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1751 if (!yyg->yy_buffer_stack) {
1753 /* First allocation is just for 2 elements, since we don't know if this
1754 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1755 * immediate realloc on the next call.
1757 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
1758 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
1759 (num_to_alloc * sizeof(struct yy_buffer_state*)
1760 , yyscanner);
1761 if ( ! yyg->yy_buffer_stack )
1762 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1764 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1766 yyg->yy_buffer_stack_max = num_to_alloc;
1767 yyg->yy_buffer_stack_top = 0;
1768 return;
1771 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
1773 /* Increase the buffer to prepare for a possible push. */
1774 yy_size_t grow_size = 8 /* arbitrary grow size */;
1776 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
1777 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
1778 (yyg->yy_buffer_stack,
1779 num_to_alloc * sizeof(struct yy_buffer_state*)
1780 , yyscanner);
1781 if ( ! yyg->yy_buffer_stack )
1782 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1784 /* zero only the new slots.*/
1785 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
1786 yyg->yy_buffer_stack_max = num_to_alloc;
1790 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1791 * @param base the character buffer
1792 * @param size the size in bytes of the character buffer
1793 * @param yyscanner The scanner object.
1794 * @return the newly allocated buffer state object.
1796 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
1798 YY_BUFFER_STATE b;
1800 if ( size < 2 ||
1801 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1802 base[size-1] != YY_END_OF_BUFFER_CHAR )
1803 /* They forgot to leave room for the EOB's. */
1804 return NULL;
1806 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
1807 if ( ! b )
1808 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1810 b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
1811 b->yy_buf_pos = b->yy_ch_buf = base;
1812 b->yy_is_our_buffer = 0;
1813 b->yy_input_file = NULL;
1814 b->yy_n_chars = b->yy_buf_size;
1815 b->yy_is_interactive = 0;
1816 b->yy_at_bol = 1;
1817 b->yy_fill_buffer = 0;
1818 b->yy_buffer_status = YY_BUFFER_NEW;
1820 yy_switch_to_buffer( b , yyscanner );
1822 return b;
1825 /** Setup the input buffer state to scan a string. The next call to yylex() will
1826 * scan from a @e copy of @a str.
1827 * @param yystr a NUL-terminated string to scan
1828 * @param yyscanner The scanner object.
1829 * @return the newly allocated buffer state object.
1830 * @note If you want to scan bytes that may contain NUL values, then use
1831 * yy_scan_bytes() instead.
1833 YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
1836 return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
1839 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1840 * scan from a @e copy of @a bytes.
1841 * @param yybytes the byte buffer to scan
1842 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1843 * @param yyscanner The scanner object.
1844 * @return the newly allocated buffer state object.
1846 YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner)
1848 YY_BUFFER_STATE b;
1849 char *buf;
1850 yy_size_t n;
1851 int i;
1853 /* Get memory for full buffer, including space for trailing EOB's. */
1854 n = (yy_size_t) (_yybytes_len + 2);
1855 buf = (char *) yyalloc( n , yyscanner );
1856 if ( ! buf )
1857 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1859 for ( i = 0; i < _yybytes_len; ++i )
1860 buf[i] = yybytes[i];
1862 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1864 b = yy_scan_buffer( buf, n , yyscanner);
1865 if ( ! b )
1866 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1868 /* It's okay to grow etc. this buffer, and we should throw it
1869 * away when we're done.
1871 b->yy_is_our_buffer = 1;
1873 return b;
1876 #ifndef YY_EXIT_FAILURE
1877 #define YY_EXIT_FAILURE 2
1878 #endif
1880 static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
1882 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1883 (void)yyg;
1884 fprintf( stderr, "%s\n", msg );
1885 exit( YY_EXIT_FAILURE );
1888 /* Redefine yyless() so it works in section 3 code. */
1890 #undef yyless
1891 #define yyless(n) \
1892 do \
1894 /* Undo effects of setting up yytext. */ \
1895 int yyless_macro_arg = (n); \
1896 YY_LESS_LINENO(yyless_macro_arg);\
1897 yytext[yyleng] = yyg->yy_hold_char; \
1898 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
1899 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
1900 *yyg->yy_c_buf_p = '\0'; \
1901 yyleng = yyless_macro_arg; \
1903 while ( 0 )
1905 /* Accessor methods (get/set functions) to struct members. */
1907 /** Get the user-defined data for this scanner.
1908 * @param yyscanner The scanner object.
1910 YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
1912 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1913 return yyextra;
1916 /** Get the current line number.
1917 * @param yyscanner The scanner object.
1919 int yyget_lineno (yyscan_t yyscanner)
1921 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1923 if (! YY_CURRENT_BUFFER)
1924 return 0;
1926 return yylineno;
1929 /** Get the current column number.
1930 * @param yyscanner The scanner object.
1932 int yyget_column (yyscan_t yyscanner)
1934 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1936 if (! YY_CURRENT_BUFFER)
1937 return 0;
1939 return yycolumn;
1942 /** Get the input stream.
1943 * @param yyscanner The scanner object.
1945 FILE *yyget_in (yyscan_t yyscanner)
1947 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1948 return yyin;
1951 /** Get the output stream.
1952 * @param yyscanner The scanner object.
1954 FILE *yyget_out (yyscan_t yyscanner)
1956 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1957 return yyout;
1960 /** Get the length of the current token.
1961 * @param yyscanner The scanner object.
1963 int yyget_leng (yyscan_t yyscanner)
1965 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1966 return yyleng;
1969 /** Get the current token.
1970 * @param yyscanner The scanner object.
1973 char *yyget_text (yyscan_t yyscanner)
1975 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1976 return yytext;
1979 /** Set the user-defined data. This data is never touched by the scanner.
1980 * @param user_defined The data to be associated with this scanner.
1981 * @param yyscanner The scanner object.
1983 void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
1985 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1986 yyextra = user_defined ;
1989 /** Set the current line number.
1990 * @param _line_number line number
1991 * @param yyscanner The scanner object.
1993 void yyset_lineno (int _line_number , yyscan_t yyscanner)
1995 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1997 /* lineno is only valid if an input buffer exists. */
1998 if (! YY_CURRENT_BUFFER )
1999 YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
2001 yylineno = _line_number;
2004 /** Set the current column.
2005 * @param _column_no column number
2006 * @param yyscanner The scanner object.
2008 void yyset_column (int _column_no , yyscan_t yyscanner)
2010 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2012 /* column is only valid if an input buffer exists. */
2013 if (! YY_CURRENT_BUFFER )
2014 YY_FATAL_ERROR( "yyset_column called with no buffer" );
2016 yycolumn = _column_no;
2019 /** Set the input stream. This does not discard the current
2020 * input buffer.
2021 * @param _in_str A readable stream.
2022 * @param yyscanner The scanner object.
2023 * @see yy_switch_to_buffer
2025 void yyset_in (FILE * _in_str , yyscan_t yyscanner)
2027 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2028 yyin = _in_str ;
2031 void yyset_out (FILE * _out_str , yyscan_t yyscanner)
2033 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2034 yyout = _out_str ;
2037 int yyget_debug (yyscan_t yyscanner)
2039 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2040 return yy_flex_debug;
2043 void yyset_debug (int _bdebug , yyscan_t yyscanner)
2045 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2046 yy_flex_debug = _bdebug ;
2049 /* Accessor methods for yylval and yylloc */
2051 /* User-visible API */
2053 /* yylex_init is special because it creates the scanner itself, so it is
2054 * the ONLY reentrant function that doesn't take the scanner as the last argument.
2055 * That's why we explicitly handle the declaration, instead of using our macros.
2057 int yylex_init(yyscan_t* ptr_yy_globals)
2059 if (ptr_yy_globals == NULL){
2060 errno = EINVAL;
2061 return 1;
2064 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
2066 if (*ptr_yy_globals == NULL){
2067 errno = ENOMEM;
2068 return 1;
2071 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
2072 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2074 return yy_init_globals ( *ptr_yy_globals );
2077 /* yylex_init_extra has the same functionality as yylex_init, but follows the
2078 * convention of taking the scanner as the last argument. Note however, that
2079 * this is a *pointer* to a scanner, as it will be allocated by this call (and
2080 * is the reason, too, why this function also must handle its own declaration).
2081 * The user defined value in the first argument will be available to yyalloc in
2082 * the yyextra field.
2084 int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
2086 struct yyguts_t dummy_yyguts;
2088 yyset_extra (yy_user_defined, &dummy_yyguts);
2090 if (ptr_yy_globals == NULL){
2091 errno = EINVAL;
2092 return 1;
2095 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
2097 if (*ptr_yy_globals == NULL){
2098 errno = ENOMEM;
2099 return 1;
2102 /* By setting to 0xAA, we expose bugs in
2103 yy_init_globals. Leave at 0x00 for releases. */
2104 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2106 yyset_extra (yy_user_defined, *ptr_yy_globals);
2108 return yy_init_globals ( *ptr_yy_globals );
2111 static int yy_init_globals (yyscan_t yyscanner)
2113 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2114 /* Initialization is the same as for the non-reentrant scanner.
2115 * This function is called from yylex_destroy(), so don't allocate here.
2118 yyg->yy_buffer_stack = NULL;
2119 yyg->yy_buffer_stack_top = 0;
2120 yyg->yy_buffer_stack_max = 0;
2121 yyg->yy_c_buf_p = NULL;
2122 yyg->yy_init = 0;
2123 yyg->yy_start = 0;
2125 yyg->yy_start_stack_ptr = 0;
2126 yyg->yy_start_stack_depth = 0;
2127 yyg->yy_start_stack = NULL;
2129 /* Defined in main.c */
2130 #ifdef YY_STDINIT
2131 yyin = stdin;
2132 yyout = stdout;
2133 #else
2134 yyin = NULL;
2135 yyout = NULL;
2136 #endif
2138 /* For future reference: Set errno on error, since we are called by
2139 * yylex_init()
2141 return 0;
2144 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2145 int yylex_destroy (yyscan_t yyscanner)
2147 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2149 /* Pop the buffer stack, destroying each element. */
2150 while(YY_CURRENT_BUFFER){
2151 yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
2152 YY_CURRENT_BUFFER_LVALUE = NULL;
2153 yypop_buffer_state(yyscanner);
2156 /* Destroy the stack itself. */
2157 yyfree(yyg->yy_buffer_stack , yyscanner);
2158 yyg->yy_buffer_stack = NULL;
2160 /* Destroy the start condition stack. */
2161 yyfree( yyg->yy_start_stack , yyscanner );
2162 yyg->yy_start_stack = NULL;
2164 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2165 * yylex() is called, initialization will occur. */
2166 yy_init_globals( yyscanner);
2168 /* Destroy the main struct (reentrant only). */
2169 yyfree ( yyscanner , yyscanner );
2170 yyscanner = NULL;
2171 return 0;
2175 * Internal utility routines.
2178 #ifndef yytext_ptr
2179 static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
2181 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2182 (void)yyg;
2184 int i;
2185 for ( i = 0; i < n; ++i )
2186 s1[i] = s2[i];
2188 #endif
2190 #ifdef YY_NEED_STRLEN
2191 static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
2193 int n;
2194 for ( n = 0; s[n]; ++n )
2197 return n;
2199 #endif
2201 void *yyalloc (yy_size_t size , yyscan_t yyscanner)
2203 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2204 (void)yyg;
2205 return malloc(size);
2208 void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
2210 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2211 (void)yyg;
2213 /* The cast to (char *) in the following accommodates both
2214 * implementations that use char* generic pointers, and those
2215 * that use void* generic pointers. It works with the latter
2216 * because both ANSI C and C++ allow castless assignment from
2217 * any pointer type to void*, and deal with argument conversions
2218 * as though doing an assignment.
2220 return realloc(ptr, size);
2223 void yyfree (void * ptr , yyscan_t yyscanner)
2225 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2226 (void)yyg;
2227 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2230 #define YYTABLES_NAME "yytables"
2232 /*--------------------------------------------------------------------------*/
2234 #endif /* __clang_analyzer__ */