CMake Nightly Date Stamp
[kiteware-cmake.git] / Source / LexerParser / cmCTestResourceGroupsLexer.cxx
blobf1d351a574d3f86e1740440f45a011e3c7bc538f
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 cmCTestResourceGroups_yy_create_buffer_ALREADY_DEFINED
18 #else
19 #define yy_create_buffer cmCTestResourceGroups_yy_create_buffer
20 #endif
22 #ifdef yy_delete_buffer
23 #define cmCTestResourceGroups_yy_delete_buffer_ALREADY_DEFINED
24 #else
25 #define yy_delete_buffer cmCTestResourceGroups_yy_delete_buffer
26 #endif
28 #ifdef yy_scan_buffer
29 #define cmCTestResourceGroups_yy_scan_buffer_ALREADY_DEFINED
30 #else
31 #define yy_scan_buffer cmCTestResourceGroups_yy_scan_buffer
32 #endif
34 #ifdef yy_scan_string
35 #define cmCTestResourceGroups_yy_scan_string_ALREADY_DEFINED
36 #else
37 #define yy_scan_string cmCTestResourceGroups_yy_scan_string
38 #endif
40 #ifdef yy_scan_bytes
41 #define cmCTestResourceGroups_yy_scan_bytes_ALREADY_DEFINED
42 #else
43 #define yy_scan_bytes cmCTestResourceGroups_yy_scan_bytes
44 #endif
46 #ifdef yy_init_buffer
47 #define cmCTestResourceGroups_yy_init_buffer_ALREADY_DEFINED
48 #else
49 #define yy_init_buffer cmCTestResourceGroups_yy_init_buffer
50 #endif
52 #ifdef yy_flush_buffer
53 #define cmCTestResourceGroups_yy_flush_buffer_ALREADY_DEFINED
54 #else
55 #define yy_flush_buffer cmCTestResourceGroups_yy_flush_buffer
56 #endif
58 #ifdef yy_load_buffer_state
59 #define cmCTestResourceGroups_yy_load_buffer_state_ALREADY_DEFINED
60 #else
61 #define yy_load_buffer_state cmCTestResourceGroups_yy_load_buffer_state
62 #endif
64 #ifdef yy_switch_to_buffer
65 #define cmCTestResourceGroups_yy_switch_to_buffer_ALREADY_DEFINED
66 #else
67 #define yy_switch_to_buffer cmCTestResourceGroups_yy_switch_to_buffer
68 #endif
70 #ifdef yypush_buffer_state
71 #define cmCTestResourceGroups_yypush_buffer_state_ALREADY_DEFINED
72 #else
73 #define yypush_buffer_state cmCTestResourceGroups_yypush_buffer_state
74 #endif
76 #ifdef yypop_buffer_state
77 #define cmCTestResourceGroups_yypop_buffer_state_ALREADY_DEFINED
78 #else
79 #define yypop_buffer_state cmCTestResourceGroups_yypop_buffer_state
80 #endif
82 #ifdef yyensure_buffer_stack
83 #define cmCTestResourceGroups_yyensure_buffer_stack_ALREADY_DEFINED
84 #else
85 #define yyensure_buffer_stack cmCTestResourceGroups_yyensure_buffer_stack
86 #endif
88 #ifdef yylex
89 #define cmCTestResourceGroups_yylex_ALREADY_DEFINED
90 #else
91 #define yylex cmCTestResourceGroups_yylex
92 #endif
94 #ifdef yyrestart
95 #define cmCTestResourceGroups_yyrestart_ALREADY_DEFINED
96 #else
97 #define yyrestart cmCTestResourceGroups_yyrestart
98 #endif
100 #ifdef yylex_init
101 #define cmCTestResourceGroups_yylex_init_ALREADY_DEFINED
102 #else
103 #define yylex_init cmCTestResourceGroups_yylex_init
104 #endif
106 #ifdef yylex_init_extra
107 #define cmCTestResourceGroups_yylex_init_extra_ALREADY_DEFINED
108 #else
109 #define yylex_init_extra cmCTestResourceGroups_yylex_init_extra
110 #endif
112 #ifdef yylex_destroy
113 #define cmCTestResourceGroups_yylex_destroy_ALREADY_DEFINED
114 #else
115 #define yylex_destroy cmCTestResourceGroups_yylex_destroy
116 #endif
118 #ifdef yyget_debug
119 #define cmCTestResourceGroups_yyget_debug_ALREADY_DEFINED
120 #else
121 #define yyget_debug cmCTestResourceGroups_yyget_debug
122 #endif
124 #ifdef yyset_debug
125 #define cmCTestResourceGroups_yyset_debug_ALREADY_DEFINED
126 #else
127 #define yyset_debug cmCTestResourceGroups_yyset_debug
128 #endif
130 #ifdef yyget_extra
131 #define cmCTestResourceGroups_yyget_extra_ALREADY_DEFINED
132 #else
133 #define yyget_extra cmCTestResourceGroups_yyget_extra
134 #endif
136 #ifdef yyset_extra
137 #define cmCTestResourceGroups_yyset_extra_ALREADY_DEFINED
138 #else
139 #define yyset_extra cmCTestResourceGroups_yyset_extra
140 #endif
142 #ifdef yyget_in
143 #define cmCTestResourceGroups_yyget_in_ALREADY_DEFINED
144 #else
145 #define yyget_in cmCTestResourceGroups_yyget_in
146 #endif
148 #ifdef yyset_in
149 #define cmCTestResourceGroups_yyset_in_ALREADY_DEFINED
150 #else
151 #define yyset_in cmCTestResourceGroups_yyset_in
152 #endif
154 #ifdef yyget_out
155 #define cmCTestResourceGroups_yyget_out_ALREADY_DEFINED
156 #else
157 #define yyget_out cmCTestResourceGroups_yyget_out
158 #endif
160 #ifdef yyset_out
161 #define cmCTestResourceGroups_yyset_out_ALREADY_DEFINED
162 #else
163 #define yyset_out cmCTestResourceGroups_yyset_out
164 #endif
166 #ifdef yyget_leng
167 #define cmCTestResourceGroups_yyget_leng_ALREADY_DEFINED
168 #else
169 #define yyget_leng cmCTestResourceGroups_yyget_leng
170 #endif
172 #ifdef yyget_text
173 #define cmCTestResourceGroups_yyget_text_ALREADY_DEFINED
174 #else
175 #define yyget_text cmCTestResourceGroups_yyget_text
176 #endif
178 #ifdef yyget_lineno
179 #define cmCTestResourceGroups_yyget_lineno_ALREADY_DEFINED
180 #else
181 #define yyget_lineno cmCTestResourceGroups_yyget_lineno
182 #endif
184 #ifdef yyset_lineno
185 #define cmCTestResourceGroups_yyset_lineno_ALREADY_DEFINED
186 #else
187 #define yyset_lineno cmCTestResourceGroups_yyset_lineno
188 #endif
190 #ifdef yyget_column
191 #define cmCTestResourceGroups_yyget_column_ALREADY_DEFINED
192 #else
193 #define yyget_column cmCTestResourceGroups_yyget_column
194 #endif
196 #ifdef yyset_column
197 #define cmCTestResourceGroups_yyset_column_ALREADY_DEFINED
198 #else
199 #define yyset_column cmCTestResourceGroups_yyset_column
200 #endif
202 #ifdef yywrap
203 #define cmCTestResourceGroups_yywrap_ALREADY_DEFINED
204 #else
205 #define yywrap cmCTestResourceGroups_yywrap
206 #endif
208 #ifdef yyalloc
209 #define cmCTestResourceGroups_yyalloc_ALREADY_DEFINED
210 #else
211 #define yyalloc cmCTestResourceGroups_yyalloc
212 #endif
214 #ifdef yyrealloc
215 #define cmCTestResourceGroups_yyrealloc_ALREADY_DEFINED
216 #else
217 #define yyrealloc cmCTestResourceGroups_yyrealloc
218 #endif
220 #ifdef yyfree
221 #define cmCTestResourceGroups_yyfree_ALREADY_DEFINED
222 #else
223 #define yyfree cmCTestResourceGroups_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 cmCTestResourceGroups_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 8
552 #define YY_END_OF_BUFFER 9
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[29] =
561 { 0,
562 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
563 0, 0, 9, 7, 2, 5, 7, 4, 6, 3,
564 2, 5, 0, 1, 4, 6, 3, 0
567 static const YY_CHAR yy_ec[256] =
568 { 0,
569 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
570 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
571 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
572 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
573 1, 1, 1, 3, 1, 1, 1, 4, 4, 4,
574 4, 4, 4, 4, 4, 4, 4, 5, 6, 1,
575 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
576 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
577 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
578 1, 1, 1, 1, 7, 1, 7, 7, 7, 7,
580 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
581 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
582 7, 7, 1, 1, 1, 1, 1, 1, 1, 1,
583 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
584 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
585 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
586 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
587 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
588 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
589 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
591 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
592 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
593 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
594 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
595 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
596 1, 1, 1, 1, 1
599 static const YY_CHAR yy_meta[8] =
600 { 0,
601 1, 1, 1, 2, 2, 1, 2
604 static const flex_int16_t yy_base[30] =
605 { 0,
606 0, 0, 0, 0, 7, 0, 31, 12, 17, 0,
607 0, 0, 34, 36, 29, 26, 26, 27, 23, 24,
608 23, 20, 20, 36, 21, 16, 13, 36, 14
611 static const flex_int16_t yy_def[30] =
612 { 0,
613 28, 1, 1, 1, 28, 5, 1, 5, 5, 9,
614 5, 5, 28, 28, 28, 28, 29, 28, 28, 28,
615 28, 28, 29, 28, 28, 28, 28, 0, 28
618 static const flex_int16_t yy_nxt[44] =
619 { 0,
620 14, 14, 14, 15, 14, 16, 17, 14, 14, 18,
621 14, 14, 19, 14, 14, 23, 27, 16, 17, 14,
622 20, 26, 14, 25, 24, 22, 21, 27, 26, 25,
623 24, 22, 21, 28, 14, 13, 28, 28, 28, 28,
624 28, 28, 28
627 static const flex_int16_t yy_chk[44] =
628 { 0,
629 1, 1, 1, 1, 1, 1, 1, 5, 5, 5,
630 5, 5, 5, 5, 8, 29, 27, 8, 8, 9,
631 9, 26, 9, 25, 23, 22, 21, 20, 19, 18,
632 17, 16, 15, 13, 7, 28, 28, 28, 28, 28,
633 28, 28, 28
636 /* The intent behind this definition is that it'll catch
637 * any uses of REJECT which flex missed.
639 #define REJECT reject_used_but_not_detected
640 #define yymore() yymore_used_but_not_detected
641 #define YY_MORE_ADJ 0
642 #define YY_RESTORE_YY_MORE_OFFSET
643 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
644 file Copyright.txt or https://cmake.org/licensing for details. */
647 This file must be translated to C++ and modified to build everywhere.
649 Run flex >= 2.6 like this:
651 flex --nounistd -DFLEXINT_H --noline --header-file=cmCTestResourceGroupsLexer.h -ocmCTestResourceGroupsLexer.cxx cmCTestResourceGroupsLexer.in.l
653 Modify cmCTestResourceGroupsLexer.cxx:
654 - remove trailing whitespace: sed -i 's/\s*$//' cmCTestResourceGroupsLexer.h cmCTestResourceGroupsLexer.cxx
655 - remove blank lines at end of file: sed -i '${/^$/d;}' cmCTestResourceGroupsLexer.h cmCTestResourceGroupsLexer.cxx
656 - #include "cmStandardLexer.h" at the top: sed -i '1i#include "cmStandardLexer.h"' cmCTestResourceGroupsLexer.cxx
660 /* IWYU pragma: no_forward_declare yyguts_t */
662 #ifndef __clang_analyzer__ /* Suppress clang-analyzer warnings */
664 #include "cmCTestResourceGroupsLexerHelper.h"
666 #include <string>
668 #include <cstddef>
670 #ifndef _WIN32
671 # include <termios.h>
672 #endif
674 /*--------------------------------------------------------------------------*/
676 #define INITIAL 0
677 #define RESOURCE_GROUPS_START 1
678 #define RESOURCE_GROUPS_END 2
679 #define RESOURCE_START 3
680 #define RESOURCE_COUNT 4
681 #define RESOURCE_END 5
683 #ifndef YY_EXTRA_TYPE
684 #define YY_EXTRA_TYPE void *
685 #endif
687 /* Holds the entire state of the reentrant scanner. */
688 struct yyguts_t
691 /* User-defined. Not touched by flex. */
692 YY_EXTRA_TYPE yyextra_r;
694 /* The rest are the same as the globals declared in the non-reentrant scanner. */
695 FILE *yyin_r, *yyout_r;
696 size_t yy_buffer_stack_top; /**< index of top of stack. */
697 size_t yy_buffer_stack_max; /**< capacity of stack. */
698 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
699 char yy_hold_char;
700 int yy_n_chars;
701 int yyleng_r;
702 char *yy_c_buf_p;
703 int yy_init;
704 int yy_start;
705 int yy_did_buffer_switch_on_eof;
706 int yy_start_stack_ptr;
707 int yy_start_stack_depth;
708 int *yy_start_stack;
709 yy_state_type yy_last_accepting_state;
710 char* yy_last_accepting_cpos;
712 int yylineno_r;
713 int yy_flex_debug_r;
715 char *yytext_r;
716 int yy_more_flag;
717 int yy_more_len;
719 }; /* end struct yyguts_t */
721 static int yy_init_globals ( yyscan_t yyscanner );
723 int yylex_init (yyscan_t* scanner);
725 int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
727 /* Accessor methods to globals.
728 These are made visible to non-reentrant scanners for convenience. */
730 int yylex_destroy ( yyscan_t yyscanner );
732 int yyget_debug ( yyscan_t yyscanner );
734 void yyset_debug ( int debug_flag , yyscan_t yyscanner );
736 YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
738 void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
740 FILE *yyget_in ( yyscan_t yyscanner );
742 void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
744 FILE *yyget_out ( yyscan_t yyscanner );
746 void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
748 int yyget_leng ( yyscan_t yyscanner );
750 char *yyget_text ( yyscan_t yyscanner );
752 int yyget_lineno ( yyscan_t yyscanner );
754 void yyset_lineno ( int _line_number , yyscan_t yyscanner );
756 int yyget_column ( yyscan_t yyscanner );
758 void yyset_column ( int _column_no , yyscan_t yyscanner );
760 /* Macros after this point can all be overridden by user definitions in
761 * section 1.
764 #ifndef YY_SKIP_YYWRAP
765 #ifdef __cplusplus
766 extern "C" int yywrap ( yyscan_t yyscanner );
767 #else
768 extern int yywrap ( yyscan_t yyscanner );
769 #endif
770 #endif
772 #ifndef YY_NO_UNPUT
774 static void yyunput ( int c, char *buf_ptr , yyscan_t yyscanner);
776 #endif
778 #ifndef yytext_ptr
779 static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
780 #endif
782 #ifdef YY_NEED_STRLEN
783 static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
784 #endif
786 #ifndef YY_NO_INPUT
787 #ifdef __cplusplus
788 static int yyinput ( yyscan_t yyscanner );
789 #else
790 static int input ( yyscan_t yyscanner );
791 #endif
793 #endif
795 /* Amount of stuff to slurp up with each read. */
796 #ifndef YY_READ_BUF_SIZE
797 #ifdef __ia64__
798 /* On IA-64, the buffer size is 16k, not 8k */
799 #define YY_READ_BUF_SIZE 16384
800 #else
801 #define YY_READ_BUF_SIZE 8192
802 #endif /* __ia64__ */
803 #endif
805 /* Copy whatever the last rule matched to the standard output. */
806 #ifndef ECHO
807 /* This used to be an fputs(), but since the string might contain NUL's,
808 * we now use fwrite().
810 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
811 #endif
813 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
814 * is returned in "result".
816 #ifndef YY_INPUT
817 #define YY_INPUT(buf,result,max_size) \
818 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
820 int c = '*'; \
821 int n; \
822 for ( n = 0; n < max_size && \
823 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
824 buf[n] = (char) c; \
825 if ( c == '\n' ) \
826 buf[n++] = (char) c; \
827 if ( c == EOF && ferror( yyin ) ) \
828 YY_FATAL_ERROR( "input in flex scanner failed" ); \
829 result = n; \
831 else \
833 errno=0; \
834 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
836 if( errno != EINTR) \
838 YY_FATAL_ERROR( "input in flex scanner failed" ); \
839 break; \
841 errno=0; \
842 clearerr(yyin); \
847 #endif
849 /* No semi-colon after return; correct usage is to write "yyterminate();" -
850 * we don't want an extra ';' after the "return" because that will cause
851 * some compilers to complain about unreachable statements.
853 #ifndef yyterminate
854 #define yyterminate() return YY_NULL
855 #endif
857 /* Number of entries by which start-condition stack grows. */
858 #ifndef YY_START_STACK_INCR
859 #define YY_START_STACK_INCR 25
860 #endif
862 /* Report a fatal error. */
863 #ifndef YY_FATAL_ERROR
864 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
865 #endif
867 /* end tables serialization structures and prototypes */
869 /* Default declaration of generated scanner - a define so the user can
870 * easily add parameters.
872 #ifndef YY_DECL
873 #define YY_DECL_IS_OURS 1
875 extern int yylex (yyscan_t yyscanner);
877 #define YY_DECL int yylex (yyscan_t yyscanner)
878 #endif /* !YY_DECL */
880 /* Code executed at the beginning of each rule, after yytext and yyleng
881 * have been set up.
883 #ifndef YY_USER_ACTION
884 #define YY_USER_ACTION
885 #endif
887 /* Code executed at the end of each rule. */
888 #ifndef YY_BREAK
889 #define YY_BREAK /*LINTED*/break;
890 #endif
892 #define YY_RULE_SETUP \
893 YY_USER_ACTION
895 /** The main scanner function which does all the work.
897 YY_DECL
899 yy_state_type yy_current_state;
900 char *yy_cp, *yy_bp;
901 int yy_act;
902 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
904 if ( !yyg->yy_init )
906 yyg->yy_init = 1;
908 #ifdef YY_USER_INIT
909 YY_USER_INIT;
910 #endif
912 if ( ! yyg->yy_start )
913 yyg->yy_start = 1; /* first start state */
915 if ( ! yyin )
916 yyin = stdin;
918 if ( ! yyout )
919 yyout = stdout;
921 if ( ! YY_CURRENT_BUFFER ) {
922 yyensure_buffer_stack (yyscanner);
923 YY_CURRENT_BUFFER_LVALUE =
924 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
927 yy_load_buffer_state( yyscanner );
932 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
934 yy_cp = yyg->yy_c_buf_p;
936 /* Support of yytext. */
937 *yy_cp = yyg->yy_hold_char;
939 /* yy_bp points to the position in yy_ch_buf of the start of
940 * the current run.
942 yy_bp = yy_cp;
944 yy_current_state = yyg->yy_start;
945 yy_match:
948 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
949 if ( yy_accept[yy_current_state] )
951 yyg->yy_last_accepting_state = yy_current_state;
952 yyg->yy_last_accepting_cpos = yy_cp;
954 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
956 yy_current_state = (int) yy_def[yy_current_state];
957 if ( yy_current_state >= 29 )
958 yy_c = yy_meta[yy_c];
960 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
961 ++yy_cp;
963 while ( yy_base[yy_current_state] != 36 );
965 yy_find_action:
966 yy_act = yy_accept[yy_current_state];
967 if ( yy_act == 0 )
968 { /* have to back up */
969 yy_cp = yyg->yy_last_accepting_cpos;
970 yy_current_state = yyg->yy_last_accepting_state;
971 yy_act = yy_accept[yy_current_state];
974 YY_DO_BEFORE_ACTION;
976 do_action: /* This label is used only to access EOF actions. */
978 switch ( yy_act )
979 { /* beginning of action switch */
980 case 0: /* must back up */
981 /* undo the effects of YY_DO_BEFORE_ACTION */
982 *yy_cp = yyg->yy_hold_char;
983 yy_cp = yyg->yy_last_accepting_cpos;
984 yy_current_state = yyg->yy_last_accepting_state;
985 goto yy_find_action;
987 case 1:
988 YY_RULE_SETUP
990 BEGIN(RESOURCE_COUNT);
991 yyextra->SetResourceType(std::string(yytext, yyleng - 1));
993 YY_BREAK
994 case 2:
995 YY_RULE_SETUP
997 BEGIN(RESOURCE_GROUPS_END);
998 std::size_t len = yyleng;
999 yyextra->SetProcessCount(std::stoll(yytext, &len, 10));
1001 YY_BREAK
1002 case 3:
1003 YY_RULE_SETUP
1005 BEGIN(RESOURCE_END);
1006 std::size_t len = yyleng;
1007 yyextra->SetNeededSlots(std::stoll(yytext, &len, 10));
1008 yyextra->WriteRequirement();
1010 YY_BREAK
1011 case 4:
1012 YY_RULE_SETUP
1014 BEGIN(RESOURCE_START);
1016 YY_BREAK
1017 case 5:
1018 YY_RULE_SETUP
1020 BEGIN(RESOURCE_GROUPS_START);
1022 YY_BREAK
1023 case 6:
1024 YY_RULE_SETUP
1026 BEGIN(RESOURCE_GROUPS_START);
1027 yyextra->WriteProcess();
1029 YY_BREAK
1030 case YY_STATE_EOF(RESOURCE_START):
1031 case YY_STATE_EOF(RESOURCE_GROUPS_END):
1032 case YY_STATE_EOF(RESOURCE_END):
1034 yyextra->WriteProcess();
1035 return 0;
1037 YY_BREAK
1038 case YY_STATE_EOF(INITIAL):
1039 case YY_STATE_EOF(RESOURCE_GROUPS_START):
1041 return 0;
1043 YY_BREAK
1044 case YY_STATE_EOF(RESOURCE_COUNT):
1046 return 1;
1048 YY_BREAK
1049 case 7:
1050 /* rule 7 can match eol */
1051 YY_RULE_SETUP
1053 return 1;
1055 YY_BREAK
1056 case 8:
1057 YY_RULE_SETUP
1058 YY_FATAL_ERROR( "flex scanner jammed" );
1059 YY_BREAK
1061 case YY_END_OF_BUFFER:
1063 /* Amount of text matched not including the EOB char. */
1064 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1066 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1067 *yy_cp = yyg->yy_hold_char;
1068 YY_RESTORE_YY_MORE_OFFSET
1070 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1072 /* We're scanning a new file or input source. It's
1073 * possible that this happened because the user
1074 * just pointed yyin at a new source and called
1075 * yylex(). If so, then we have to assure
1076 * consistency between YY_CURRENT_BUFFER and our
1077 * globals. Here is the right place to do so, because
1078 * this is the first action (other than possibly a
1079 * back-up) that will match for the new input source.
1081 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1082 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1083 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1086 /* Note that here we test for yy_c_buf_p "<=" to the position
1087 * of the first EOB in the buffer, since yy_c_buf_p will
1088 * already have been incremented past the NUL character
1089 * (since all states make transitions on EOB to the
1090 * end-of-buffer state). Contrast this with the test
1091 * in input().
1093 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1094 { /* This was really a NUL. */
1095 yy_state_type yy_next_state;
1097 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1099 yy_current_state = yy_get_previous_state( yyscanner );
1101 /* Okay, we're now positioned to make the NUL
1102 * transition. We couldn't have
1103 * yy_get_previous_state() go ahead and do it
1104 * for us because it doesn't know how to deal
1105 * with the possibility of jamming (and we don't
1106 * want to build jamming into it because then it
1107 * will run more slowly).
1110 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1112 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1114 if ( yy_next_state )
1116 /* Consume the NUL. */
1117 yy_cp = ++yyg->yy_c_buf_p;
1118 yy_current_state = yy_next_state;
1119 goto yy_match;
1122 else
1124 yy_cp = yyg->yy_c_buf_p;
1125 goto yy_find_action;
1129 else switch ( yy_get_next_buffer( yyscanner ) )
1131 case EOB_ACT_END_OF_FILE:
1133 yyg->yy_did_buffer_switch_on_eof = 0;
1135 if ( yywrap( yyscanner ) )
1137 /* Note: because we've taken care in
1138 * yy_get_next_buffer() to have set up
1139 * yytext, we can now set up
1140 * yy_c_buf_p so that if some total
1141 * hoser (like flex itself) wants to
1142 * call the scanner after we return the
1143 * YY_NULL, it'll still work - another
1144 * YY_NULL will get returned.
1146 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1148 yy_act = YY_STATE_EOF(YY_START);
1149 goto do_action;
1152 else
1154 if ( ! yyg->yy_did_buffer_switch_on_eof )
1155 YY_NEW_FILE;
1157 break;
1160 case EOB_ACT_CONTINUE_SCAN:
1161 yyg->yy_c_buf_p =
1162 yyg->yytext_ptr + yy_amount_of_matched_text;
1164 yy_current_state = yy_get_previous_state( yyscanner );
1166 yy_cp = yyg->yy_c_buf_p;
1167 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1168 goto yy_match;
1170 case EOB_ACT_LAST_MATCH:
1171 yyg->yy_c_buf_p =
1172 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1174 yy_current_state = yy_get_previous_state( yyscanner );
1176 yy_cp = yyg->yy_c_buf_p;
1177 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1178 goto yy_find_action;
1180 break;
1183 default:
1184 YY_FATAL_ERROR(
1185 "fatal flex scanner internal error--no action found" );
1186 } /* end of action switch */
1187 } /* end of scanning one token */
1188 } /* end of user's declarations */
1189 } /* end of yylex */
1191 /* yy_get_next_buffer - try to read in a new buffer
1193 * Returns a code representing an action:
1194 * EOB_ACT_LAST_MATCH -
1195 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1196 * EOB_ACT_END_OF_FILE - end of file
1198 static int yy_get_next_buffer (yyscan_t yyscanner)
1200 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1201 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1202 char *source = yyg->yytext_ptr;
1203 int number_to_move, i;
1204 int ret_val;
1206 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1207 YY_FATAL_ERROR(
1208 "fatal flex scanner internal error--end of buffer missed" );
1210 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1211 { /* Don't try to fill the buffer, so this is an EOF. */
1212 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1214 /* We matched a single character, the EOB, so
1215 * treat this as a final EOF.
1217 return EOB_ACT_END_OF_FILE;
1220 else
1222 /* We matched some text prior to the EOB, first
1223 * process it.
1225 return EOB_ACT_LAST_MATCH;
1229 /* Try to read more data. */
1231 /* First move last chars to start of buffer. */
1232 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
1234 for ( i = 0; i < number_to_move; ++i )
1235 *(dest++) = *(source++);
1237 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1238 /* don't do the read, it's not guaranteed to return an EOF,
1239 * just force an EOF
1241 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1243 else
1245 int num_to_read =
1246 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1248 while ( num_to_read <= 0 )
1249 { /* Not enough room in the buffer - grow it. */
1251 /* just a shorter name for the current buffer */
1252 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1254 int yy_c_buf_p_offset =
1255 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1257 if ( b->yy_is_our_buffer )
1259 int new_size = b->yy_buf_size * 2;
1261 if ( new_size <= 0 )
1262 b->yy_buf_size += b->yy_buf_size / 8;
1263 else
1264 b->yy_buf_size *= 2;
1266 b->yy_ch_buf = (char *)
1267 /* Include room in for 2 EOB chars. */
1268 yyrealloc( (void *) b->yy_ch_buf,
1269 (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
1271 else
1272 /* Can't grow it, we don't own it. */
1273 b->yy_ch_buf = NULL;
1275 if ( ! b->yy_ch_buf )
1276 YY_FATAL_ERROR(
1277 "fatal error - scanner input buffer overflow" );
1279 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1281 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1282 number_to_move - 1;
1286 if ( num_to_read > YY_READ_BUF_SIZE )
1287 num_to_read = YY_READ_BUF_SIZE;
1289 /* Read in more data. */
1290 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1291 yyg->yy_n_chars, num_to_read );
1293 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1296 if ( yyg->yy_n_chars == 0 )
1298 if ( number_to_move == YY_MORE_ADJ )
1300 ret_val = EOB_ACT_END_OF_FILE;
1301 yyrestart( yyin , yyscanner);
1304 else
1306 ret_val = EOB_ACT_LAST_MATCH;
1307 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1308 YY_BUFFER_EOF_PENDING;
1312 else
1313 ret_val = EOB_ACT_CONTINUE_SCAN;
1315 if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1316 /* Extend the array by 50%, plus the number we really need. */
1317 int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1318 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1319 (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
1320 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1321 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1322 /* "- 2" to take care of EOB's */
1323 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1326 yyg->yy_n_chars += number_to_move;
1327 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1328 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1330 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1332 return ret_val;
1335 /* yy_get_previous_state - get the state just before the EOB char was reached */
1337 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1339 yy_state_type yy_current_state;
1340 char *yy_cp;
1341 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1343 yy_current_state = yyg->yy_start;
1345 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1347 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1348 if ( yy_accept[yy_current_state] )
1350 yyg->yy_last_accepting_state = yy_current_state;
1351 yyg->yy_last_accepting_cpos = yy_cp;
1353 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1355 yy_current_state = (int) yy_def[yy_current_state];
1356 if ( yy_current_state >= 29 )
1357 yy_c = yy_meta[yy_c];
1359 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1362 return yy_current_state;
1365 /* yy_try_NUL_trans - try to make a transition on the NUL character
1367 * synopsis
1368 * next_state = yy_try_NUL_trans( current_state );
1370 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
1372 int yy_is_jam;
1373 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
1374 char *yy_cp = yyg->yy_c_buf_p;
1376 YY_CHAR yy_c = 1;
1377 if ( yy_accept[yy_current_state] )
1379 yyg->yy_last_accepting_state = yy_current_state;
1380 yyg->yy_last_accepting_cpos = yy_cp;
1382 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1384 yy_current_state = (int) yy_def[yy_current_state];
1385 if ( yy_current_state >= 29 )
1386 yy_c = yy_meta[yy_c];
1388 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1389 yy_is_jam = (yy_current_state == 28);
1391 (void)yyg;
1392 return yy_is_jam ? 0 : yy_current_state;
1395 #ifndef YY_NO_UNPUT
1397 static void yyunput (int c, char * yy_bp , yyscan_t yyscanner)
1399 char *yy_cp;
1400 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1402 yy_cp = yyg->yy_c_buf_p;
1404 /* undo effects of setting up yytext */
1405 *yy_cp = yyg->yy_hold_char;
1407 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1408 { /* need to shift things up to make room */
1409 /* +2 for EOB chars. */
1410 int number_to_move = yyg->yy_n_chars + 2;
1411 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1412 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1413 char *source =
1414 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1416 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1417 *--dest = *--source;
1419 yy_cp += (int) (dest - source);
1420 yy_bp += (int) (dest - source);
1421 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1422 yyg->yy_n_chars = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1424 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1425 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1428 *--yy_cp = (char) c;
1430 yyg->yytext_ptr = yy_bp;
1431 yyg->yy_hold_char = *yy_cp;
1432 yyg->yy_c_buf_p = yy_cp;
1435 #endif
1437 #ifndef YY_NO_INPUT
1438 #ifdef __cplusplus
1439 static int yyinput (yyscan_t yyscanner)
1440 #else
1441 static int input (yyscan_t yyscanner)
1442 #endif
1445 int c;
1446 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1448 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1450 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1452 /* yy_c_buf_p now points to the character we want to return.
1453 * If this occurs *before* the EOB characters, then it's a
1454 * valid NUL; if not, then we've hit the end of the buffer.
1456 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1457 /* This was really a NUL. */
1458 *yyg->yy_c_buf_p = '\0';
1460 else
1461 { /* need more input */
1462 int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
1463 ++yyg->yy_c_buf_p;
1465 switch ( yy_get_next_buffer( yyscanner ) )
1467 case EOB_ACT_LAST_MATCH:
1468 /* This happens because yy_g_n_b()
1469 * sees that we've accumulated a
1470 * token and flags that we need to
1471 * try matching the token before
1472 * proceeding. But for input(),
1473 * there's no matching to consider.
1474 * So convert the EOB_ACT_LAST_MATCH
1475 * to EOB_ACT_END_OF_FILE.
1478 /* Reset buffer status. */
1479 yyrestart( yyin , yyscanner);
1481 /*FALLTHROUGH*/
1483 case EOB_ACT_END_OF_FILE:
1485 if ( yywrap( yyscanner ) )
1486 return 0;
1488 if ( ! yyg->yy_did_buffer_switch_on_eof )
1489 YY_NEW_FILE;
1490 #ifdef __cplusplus
1491 return yyinput(yyscanner);
1492 #else
1493 return input(yyscanner);
1494 #endif
1497 case EOB_ACT_CONTINUE_SCAN:
1498 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
1499 break;
1504 c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
1505 *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
1506 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
1508 return c;
1510 #endif /* ifndef YY_NO_INPUT */
1512 /** Immediately switch to a different input stream.
1513 * @param input_file A readable stream.
1514 * @param yyscanner The scanner object.
1515 * @note This function does not reset the start condition to @c INITIAL .
1517 void yyrestart (FILE * input_file , yyscan_t yyscanner)
1519 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1521 if ( ! YY_CURRENT_BUFFER ){
1522 yyensure_buffer_stack (yyscanner);
1523 YY_CURRENT_BUFFER_LVALUE =
1524 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
1527 yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
1528 yy_load_buffer_state( yyscanner );
1531 /** Switch to a different input buffer.
1532 * @param new_buffer The new input buffer.
1533 * @param yyscanner The scanner object.
1535 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1537 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1539 /* TODO. We should be able to replace this entire function body
1540 * with
1541 * yypop_buffer_state();
1542 * yypush_buffer_state(new_buffer);
1544 yyensure_buffer_stack (yyscanner);
1545 if ( YY_CURRENT_BUFFER == new_buffer )
1546 return;
1548 if ( YY_CURRENT_BUFFER )
1550 /* Flush out information for old buffer. */
1551 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1552 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1553 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1556 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1557 yy_load_buffer_state( yyscanner );
1559 /* We don't actually know whether we did this switch during
1560 * EOF (yywrap()) processing, but the only time this flag
1561 * is looked at is after yywrap() is called, so it's safe
1562 * to go ahead and always set it.
1564 yyg->yy_did_buffer_switch_on_eof = 1;
1567 static void yy_load_buffer_state (yyscan_t yyscanner)
1569 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1570 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1571 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1572 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1573 yyg->yy_hold_char = *yyg->yy_c_buf_p;
1576 /** Allocate and initialize an input buffer state.
1577 * @param file A readable stream.
1578 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1579 * @param yyscanner The scanner object.
1580 * @return the allocated buffer state.
1582 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
1584 YY_BUFFER_STATE b;
1586 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
1587 if ( ! b )
1588 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1590 b->yy_buf_size = size;
1592 /* yy_ch_buf has to be 2 characters longer than the size given because
1593 * we need to put in 2 end-of-buffer characters.
1595 b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
1596 if ( ! b->yy_ch_buf )
1597 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1599 b->yy_is_our_buffer = 1;
1601 yy_init_buffer( b, file , yyscanner);
1603 return b;
1606 /** Destroy the buffer.
1607 * @param b a buffer created with yy_create_buffer()
1608 * @param yyscanner The scanner object.
1610 void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1612 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1614 if ( ! b )
1615 return;
1617 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1618 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1620 if ( b->yy_is_our_buffer )
1621 yyfree( (void *) b->yy_ch_buf , yyscanner );
1623 yyfree( (void *) b , yyscanner );
1626 /* Initializes or reinitializes a buffer.
1627 * This function is sometimes called more than once on the same buffer,
1628 * such as during a yyrestart() or at EOF.
1630 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
1633 int oerrno = errno;
1634 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1636 yy_flush_buffer( b , yyscanner);
1638 b->yy_input_file = file;
1639 b->yy_fill_buffer = 1;
1641 /* If b is the current buffer, then yy_init_buffer was _probably_
1642 * called from yyrestart() or through yy_get_next_buffer.
1643 * In that case, we don't want to reset the lineno or column.
1645 if (b != YY_CURRENT_BUFFER){
1646 b->yy_bs_lineno = 1;
1647 b->yy_bs_column = 0;
1650 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1652 errno = oerrno;
1655 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1656 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1657 * @param yyscanner The scanner object.
1659 void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1661 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1662 if ( ! b )
1663 return;
1665 b->yy_n_chars = 0;
1667 /* We always need two end-of-buffer characters. The first causes
1668 * a transition to the end-of-buffer state. The second causes
1669 * a jam in that state.
1671 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1672 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1674 b->yy_buf_pos = &b->yy_ch_buf[0];
1676 b->yy_at_bol = 1;
1677 b->yy_buffer_status = YY_BUFFER_NEW;
1679 if ( b == YY_CURRENT_BUFFER )
1680 yy_load_buffer_state( yyscanner );
1683 /** Pushes the new state onto the stack. The new state becomes
1684 * the current state. This function will allocate the stack
1685 * if necessary.
1686 * @param new_buffer The new state.
1687 * @param yyscanner The scanner object.
1689 void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1691 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1692 if (new_buffer == NULL)
1693 return;
1695 yyensure_buffer_stack(yyscanner);
1697 /* This block is copied from yy_switch_to_buffer. */
1698 if ( YY_CURRENT_BUFFER )
1700 /* Flush out information for old buffer. */
1701 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1702 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1703 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1706 /* Only push if top exists. Otherwise, replace top. */
1707 if (YY_CURRENT_BUFFER)
1708 yyg->yy_buffer_stack_top++;
1709 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1711 /* copied from yy_switch_to_buffer. */
1712 yy_load_buffer_state( yyscanner );
1713 yyg->yy_did_buffer_switch_on_eof = 1;
1716 /** Removes and deletes the top of the stack, if present.
1717 * The next element becomes the new top.
1718 * @param yyscanner The scanner object.
1720 void yypop_buffer_state (yyscan_t yyscanner)
1722 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1723 if (!YY_CURRENT_BUFFER)
1724 return;
1726 yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
1727 YY_CURRENT_BUFFER_LVALUE = NULL;
1728 if (yyg->yy_buffer_stack_top > 0)
1729 --yyg->yy_buffer_stack_top;
1731 if (YY_CURRENT_BUFFER) {
1732 yy_load_buffer_state( yyscanner );
1733 yyg->yy_did_buffer_switch_on_eof = 1;
1737 /* Allocates the stack if it does not exist.
1738 * Guarantees space for at least one push.
1740 static void yyensure_buffer_stack (yyscan_t yyscanner)
1742 yy_size_t num_to_alloc;
1743 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1745 if (!yyg->yy_buffer_stack) {
1747 /* First allocation is just for 2 elements, since we don't know if this
1748 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1749 * immediate realloc on the next call.
1751 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
1752 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
1753 (num_to_alloc * sizeof(struct yy_buffer_state*)
1754 , yyscanner);
1755 if ( ! yyg->yy_buffer_stack )
1756 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1758 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1760 yyg->yy_buffer_stack_max = num_to_alloc;
1761 yyg->yy_buffer_stack_top = 0;
1762 return;
1765 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
1767 /* Increase the buffer to prepare for a possible push. */
1768 yy_size_t grow_size = 8 /* arbitrary grow size */;
1770 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
1771 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
1772 (yyg->yy_buffer_stack,
1773 num_to_alloc * sizeof(struct yy_buffer_state*)
1774 , yyscanner);
1775 if ( ! yyg->yy_buffer_stack )
1776 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1778 /* zero only the new slots.*/
1779 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
1780 yyg->yy_buffer_stack_max = num_to_alloc;
1784 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1785 * @param base the character buffer
1786 * @param size the size in bytes of the character buffer
1787 * @param yyscanner The scanner object.
1788 * @return the newly allocated buffer state object.
1790 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
1792 YY_BUFFER_STATE b;
1794 if ( size < 2 ||
1795 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1796 base[size-1] != YY_END_OF_BUFFER_CHAR )
1797 /* They forgot to leave room for the EOB's. */
1798 return NULL;
1800 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
1801 if ( ! b )
1802 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1804 b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
1805 b->yy_buf_pos = b->yy_ch_buf = base;
1806 b->yy_is_our_buffer = 0;
1807 b->yy_input_file = NULL;
1808 b->yy_n_chars = b->yy_buf_size;
1809 b->yy_is_interactive = 0;
1810 b->yy_at_bol = 1;
1811 b->yy_fill_buffer = 0;
1812 b->yy_buffer_status = YY_BUFFER_NEW;
1814 yy_switch_to_buffer( b , yyscanner );
1816 return b;
1819 /** Setup the input buffer state to scan a string. The next call to yylex() will
1820 * scan from a @e copy of @a str.
1821 * @param yystr a NUL-terminated string to scan
1822 * @param yyscanner The scanner object.
1823 * @return the newly allocated buffer state object.
1824 * @note If you want to scan bytes that may contain NUL values, then use
1825 * yy_scan_bytes() instead.
1827 YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
1830 return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
1833 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1834 * scan from a @e copy of @a bytes.
1835 * @param yybytes the byte buffer to scan
1836 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1837 * @param yyscanner The scanner object.
1838 * @return the newly allocated buffer state object.
1840 YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner)
1842 YY_BUFFER_STATE b;
1843 char *buf;
1844 yy_size_t n;
1845 int i;
1847 /* Get memory for full buffer, including space for trailing EOB's. */
1848 n = (yy_size_t) (_yybytes_len + 2);
1849 buf = (char *) yyalloc( n , yyscanner );
1850 if ( ! buf )
1851 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1853 for ( i = 0; i < _yybytes_len; ++i )
1854 buf[i] = yybytes[i];
1856 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1858 b = yy_scan_buffer( buf, n , yyscanner);
1859 if ( ! b )
1860 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1862 /* It's okay to grow etc. this buffer, and we should throw it
1863 * away when we're done.
1865 b->yy_is_our_buffer = 1;
1867 return b;
1870 #ifndef YY_EXIT_FAILURE
1871 #define YY_EXIT_FAILURE 2
1872 #endif
1874 static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
1876 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1877 (void)yyg;
1878 fprintf( stderr, "%s\n", msg );
1879 exit( YY_EXIT_FAILURE );
1882 /* Redefine yyless() so it works in section 3 code. */
1884 #undef yyless
1885 #define yyless(n) \
1886 do \
1888 /* Undo effects of setting up yytext. */ \
1889 int yyless_macro_arg = (n); \
1890 YY_LESS_LINENO(yyless_macro_arg);\
1891 yytext[yyleng] = yyg->yy_hold_char; \
1892 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
1893 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
1894 *yyg->yy_c_buf_p = '\0'; \
1895 yyleng = yyless_macro_arg; \
1897 while ( 0 )
1899 /* Accessor methods (get/set functions) to struct members. */
1901 /** Get the user-defined data for this scanner.
1902 * @param yyscanner The scanner object.
1904 YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
1906 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1907 return yyextra;
1910 /** Get the current line number.
1911 * @param yyscanner The scanner object.
1913 int yyget_lineno (yyscan_t yyscanner)
1915 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1917 if (! YY_CURRENT_BUFFER)
1918 return 0;
1920 return yylineno;
1923 /** Get the current column number.
1924 * @param yyscanner The scanner object.
1926 int yyget_column (yyscan_t yyscanner)
1928 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1930 if (! YY_CURRENT_BUFFER)
1931 return 0;
1933 return yycolumn;
1936 /** Get the input stream.
1937 * @param yyscanner The scanner object.
1939 FILE *yyget_in (yyscan_t yyscanner)
1941 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1942 return yyin;
1945 /** Get the output stream.
1946 * @param yyscanner The scanner object.
1948 FILE *yyget_out (yyscan_t yyscanner)
1950 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1951 return yyout;
1954 /** Get the length of the current token.
1955 * @param yyscanner The scanner object.
1957 int yyget_leng (yyscan_t yyscanner)
1959 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1960 return yyleng;
1963 /** Get the current token.
1964 * @param yyscanner The scanner object.
1967 char *yyget_text (yyscan_t yyscanner)
1969 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1970 return yytext;
1973 /** Set the user-defined data. This data is never touched by the scanner.
1974 * @param user_defined The data to be associated with this scanner.
1975 * @param yyscanner The scanner object.
1977 void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
1979 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1980 yyextra = user_defined ;
1983 /** Set the current line number.
1984 * @param _line_number line number
1985 * @param yyscanner The scanner object.
1987 void yyset_lineno (int _line_number , yyscan_t yyscanner)
1989 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1991 /* lineno is only valid if an input buffer exists. */
1992 if (! YY_CURRENT_BUFFER )
1993 YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
1995 yylineno = _line_number;
1998 /** Set the current column.
1999 * @param _column_no column number
2000 * @param yyscanner The scanner object.
2002 void yyset_column (int _column_no , yyscan_t yyscanner)
2004 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2006 /* column is only valid if an input buffer exists. */
2007 if (! YY_CURRENT_BUFFER )
2008 YY_FATAL_ERROR( "yyset_column called with no buffer" );
2010 yycolumn = _column_no;
2013 /** Set the input stream. This does not discard the current
2014 * input buffer.
2015 * @param _in_str A readable stream.
2016 * @param yyscanner The scanner object.
2017 * @see yy_switch_to_buffer
2019 void yyset_in (FILE * _in_str , yyscan_t yyscanner)
2021 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2022 yyin = _in_str ;
2025 void yyset_out (FILE * _out_str , yyscan_t yyscanner)
2027 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2028 yyout = _out_str ;
2031 int yyget_debug (yyscan_t yyscanner)
2033 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2034 return yy_flex_debug;
2037 void yyset_debug (int _bdebug , yyscan_t yyscanner)
2039 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2040 yy_flex_debug = _bdebug ;
2043 /* Accessor methods for yylval and yylloc */
2045 /* User-visible API */
2047 /* yylex_init is special because it creates the scanner itself, so it is
2048 * the ONLY reentrant function that doesn't take the scanner as the last argument.
2049 * That's why we explicitly handle the declaration, instead of using our macros.
2051 int yylex_init(yyscan_t* ptr_yy_globals)
2053 if (ptr_yy_globals == NULL){
2054 errno = EINVAL;
2055 return 1;
2058 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
2060 if (*ptr_yy_globals == NULL){
2061 errno = ENOMEM;
2062 return 1;
2065 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
2066 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2068 return yy_init_globals ( *ptr_yy_globals );
2071 /* yylex_init_extra has the same functionality as yylex_init, but follows the
2072 * convention of taking the scanner as the last argument. Note however, that
2073 * this is a *pointer* to a scanner, as it will be allocated by this call (and
2074 * is the reason, too, why this function also must handle its own declaration).
2075 * The user defined value in the first argument will be available to yyalloc in
2076 * the yyextra field.
2078 int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
2080 struct yyguts_t dummy_yyguts;
2082 yyset_extra (yy_user_defined, &dummy_yyguts);
2084 if (ptr_yy_globals == NULL){
2085 errno = EINVAL;
2086 return 1;
2089 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
2091 if (*ptr_yy_globals == NULL){
2092 errno = ENOMEM;
2093 return 1;
2096 /* By setting to 0xAA, we expose bugs in
2097 yy_init_globals. Leave at 0x00 for releases. */
2098 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2100 yyset_extra (yy_user_defined, *ptr_yy_globals);
2102 return yy_init_globals ( *ptr_yy_globals );
2105 static int yy_init_globals (yyscan_t yyscanner)
2107 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2108 /* Initialization is the same as for the non-reentrant scanner.
2109 * This function is called from yylex_destroy(), so don't allocate here.
2112 yyg->yy_buffer_stack = NULL;
2113 yyg->yy_buffer_stack_top = 0;
2114 yyg->yy_buffer_stack_max = 0;
2115 yyg->yy_c_buf_p = NULL;
2116 yyg->yy_init = 0;
2117 yyg->yy_start = 0;
2119 yyg->yy_start_stack_ptr = 0;
2120 yyg->yy_start_stack_depth = 0;
2121 yyg->yy_start_stack = NULL;
2123 /* Defined in main.c */
2124 #ifdef YY_STDINIT
2125 yyin = stdin;
2126 yyout = stdout;
2127 #else
2128 yyin = NULL;
2129 yyout = NULL;
2130 #endif
2132 /* For future reference: Set errno on error, since we are called by
2133 * yylex_init()
2135 return 0;
2138 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2139 int yylex_destroy (yyscan_t yyscanner)
2141 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2143 /* Pop the buffer stack, destroying each element. */
2144 while(YY_CURRENT_BUFFER){
2145 yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
2146 YY_CURRENT_BUFFER_LVALUE = NULL;
2147 yypop_buffer_state(yyscanner);
2150 /* Destroy the stack itself. */
2151 yyfree(yyg->yy_buffer_stack , yyscanner);
2152 yyg->yy_buffer_stack = NULL;
2154 /* Destroy the start condition stack. */
2155 yyfree( yyg->yy_start_stack , yyscanner );
2156 yyg->yy_start_stack = NULL;
2158 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2159 * yylex() is called, initialization will occur. */
2160 yy_init_globals( yyscanner);
2162 /* Destroy the main struct (reentrant only). */
2163 yyfree ( yyscanner , yyscanner );
2164 yyscanner = NULL;
2165 return 0;
2169 * Internal utility routines.
2172 #ifndef yytext_ptr
2173 static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
2175 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2176 (void)yyg;
2178 int i;
2179 for ( i = 0; i < n; ++i )
2180 s1[i] = s2[i];
2182 #endif
2184 #ifdef YY_NEED_STRLEN
2185 static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
2187 int n;
2188 for ( n = 0; s[n]; ++n )
2191 return n;
2193 #endif
2195 void *yyalloc (yy_size_t size , yyscan_t yyscanner)
2197 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2198 (void)yyg;
2199 return malloc(size);
2202 void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
2204 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2205 (void)yyg;
2207 /* The cast to (char *) in the following accommodates both
2208 * implementations that use char* generic pointers, and those
2209 * that use void* generic pointers. It works with the latter
2210 * because both ANSI C and C++ allow castless assignment from
2211 * any pointer type to void*, and deal with argument conversions
2212 * as though doing an assignment.
2214 return realloc(ptr, size);
2217 void yyfree (void * ptr , yyscan_t yyscanner)
2219 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2220 (void)yyg;
2221 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2224 #define YYTABLES_NAME "yytables"
2226 /*--------------------------------------------------------------------------*/
2228 #endif /* __clang_analyzer__ */