CMake Nightly Date Stamp
[kiteware-cmake.git] / Source / LexerParser / cmCommandArgumentLexer.cxx
blob4b7eb798189dcf8bbd53358ac5cce6113dcd3f6b
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 cmCommandArgument_yy_create_buffer_ALREADY_DEFINED
18 #else
19 #define yy_create_buffer cmCommandArgument_yy_create_buffer
20 #endif
22 #ifdef yy_delete_buffer
23 #define cmCommandArgument_yy_delete_buffer_ALREADY_DEFINED
24 #else
25 #define yy_delete_buffer cmCommandArgument_yy_delete_buffer
26 #endif
28 #ifdef yy_scan_buffer
29 #define cmCommandArgument_yy_scan_buffer_ALREADY_DEFINED
30 #else
31 #define yy_scan_buffer cmCommandArgument_yy_scan_buffer
32 #endif
34 #ifdef yy_scan_string
35 #define cmCommandArgument_yy_scan_string_ALREADY_DEFINED
36 #else
37 #define yy_scan_string cmCommandArgument_yy_scan_string
38 #endif
40 #ifdef yy_scan_bytes
41 #define cmCommandArgument_yy_scan_bytes_ALREADY_DEFINED
42 #else
43 #define yy_scan_bytes cmCommandArgument_yy_scan_bytes
44 #endif
46 #ifdef yy_init_buffer
47 #define cmCommandArgument_yy_init_buffer_ALREADY_DEFINED
48 #else
49 #define yy_init_buffer cmCommandArgument_yy_init_buffer
50 #endif
52 #ifdef yy_flush_buffer
53 #define cmCommandArgument_yy_flush_buffer_ALREADY_DEFINED
54 #else
55 #define yy_flush_buffer cmCommandArgument_yy_flush_buffer
56 #endif
58 #ifdef yy_load_buffer_state
59 #define cmCommandArgument_yy_load_buffer_state_ALREADY_DEFINED
60 #else
61 #define yy_load_buffer_state cmCommandArgument_yy_load_buffer_state
62 #endif
64 #ifdef yy_switch_to_buffer
65 #define cmCommandArgument_yy_switch_to_buffer_ALREADY_DEFINED
66 #else
67 #define yy_switch_to_buffer cmCommandArgument_yy_switch_to_buffer
68 #endif
70 #ifdef yypush_buffer_state
71 #define cmCommandArgument_yypush_buffer_state_ALREADY_DEFINED
72 #else
73 #define yypush_buffer_state cmCommandArgument_yypush_buffer_state
74 #endif
76 #ifdef yypop_buffer_state
77 #define cmCommandArgument_yypop_buffer_state_ALREADY_DEFINED
78 #else
79 #define yypop_buffer_state cmCommandArgument_yypop_buffer_state
80 #endif
82 #ifdef yyensure_buffer_stack
83 #define cmCommandArgument_yyensure_buffer_stack_ALREADY_DEFINED
84 #else
85 #define yyensure_buffer_stack cmCommandArgument_yyensure_buffer_stack
86 #endif
88 #ifdef yylex
89 #define cmCommandArgument_yylex_ALREADY_DEFINED
90 #else
91 #define yylex cmCommandArgument_yylex
92 #endif
94 #ifdef yyrestart
95 #define cmCommandArgument_yyrestart_ALREADY_DEFINED
96 #else
97 #define yyrestart cmCommandArgument_yyrestart
98 #endif
100 #ifdef yylex_init
101 #define cmCommandArgument_yylex_init_ALREADY_DEFINED
102 #else
103 #define yylex_init cmCommandArgument_yylex_init
104 #endif
106 #ifdef yylex_init_extra
107 #define cmCommandArgument_yylex_init_extra_ALREADY_DEFINED
108 #else
109 #define yylex_init_extra cmCommandArgument_yylex_init_extra
110 #endif
112 #ifdef yylex_destroy
113 #define cmCommandArgument_yylex_destroy_ALREADY_DEFINED
114 #else
115 #define yylex_destroy cmCommandArgument_yylex_destroy
116 #endif
118 #ifdef yyget_debug
119 #define cmCommandArgument_yyget_debug_ALREADY_DEFINED
120 #else
121 #define yyget_debug cmCommandArgument_yyget_debug
122 #endif
124 #ifdef yyset_debug
125 #define cmCommandArgument_yyset_debug_ALREADY_DEFINED
126 #else
127 #define yyset_debug cmCommandArgument_yyset_debug
128 #endif
130 #ifdef yyget_extra
131 #define cmCommandArgument_yyget_extra_ALREADY_DEFINED
132 #else
133 #define yyget_extra cmCommandArgument_yyget_extra
134 #endif
136 #ifdef yyset_extra
137 #define cmCommandArgument_yyset_extra_ALREADY_DEFINED
138 #else
139 #define yyset_extra cmCommandArgument_yyset_extra
140 #endif
142 #ifdef yyget_in
143 #define cmCommandArgument_yyget_in_ALREADY_DEFINED
144 #else
145 #define yyget_in cmCommandArgument_yyget_in
146 #endif
148 #ifdef yyset_in
149 #define cmCommandArgument_yyset_in_ALREADY_DEFINED
150 #else
151 #define yyset_in cmCommandArgument_yyset_in
152 #endif
154 #ifdef yyget_out
155 #define cmCommandArgument_yyget_out_ALREADY_DEFINED
156 #else
157 #define yyget_out cmCommandArgument_yyget_out
158 #endif
160 #ifdef yyset_out
161 #define cmCommandArgument_yyset_out_ALREADY_DEFINED
162 #else
163 #define yyset_out cmCommandArgument_yyset_out
164 #endif
166 #ifdef yyget_leng
167 #define cmCommandArgument_yyget_leng_ALREADY_DEFINED
168 #else
169 #define yyget_leng cmCommandArgument_yyget_leng
170 #endif
172 #ifdef yyget_text
173 #define cmCommandArgument_yyget_text_ALREADY_DEFINED
174 #else
175 #define yyget_text cmCommandArgument_yyget_text
176 #endif
178 #ifdef yyget_lineno
179 #define cmCommandArgument_yyget_lineno_ALREADY_DEFINED
180 #else
181 #define yyget_lineno cmCommandArgument_yyget_lineno
182 #endif
184 #ifdef yyset_lineno
185 #define cmCommandArgument_yyset_lineno_ALREADY_DEFINED
186 #else
187 #define yyset_lineno cmCommandArgument_yyset_lineno
188 #endif
190 #ifdef yyget_column
191 #define cmCommandArgument_yyget_column_ALREADY_DEFINED
192 #else
193 #define yyget_column cmCommandArgument_yyget_column
194 #endif
196 #ifdef yyset_column
197 #define cmCommandArgument_yyset_column_ALREADY_DEFINED
198 #else
199 #define yyset_column cmCommandArgument_yyset_column
200 #endif
202 #ifdef yywrap
203 #define cmCommandArgument_yywrap_ALREADY_DEFINED
204 #else
205 #define yywrap cmCommandArgument_yywrap
206 #endif
208 #ifdef yyalloc
209 #define cmCommandArgument_yyalloc_ALREADY_DEFINED
210 #else
211 #define yyalloc cmCommandArgument_yyalloc
212 #endif
214 #ifdef yyrealloc
215 #define cmCommandArgument_yyrealloc_ALREADY_DEFINED
216 #else
217 #define yyrealloc cmCommandArgument_yyrealloc
218 #endif
220 #ifdef yyfree
221 #define cmCommandArgument_yyfree_ALREADY_DEFINED
222 #else
223 #define yyfree cmCommandArgument_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 cmCommandArgument_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 14
552 #define YY_END_OF_BUFFER 15
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[30] =
561 { 0,
562 0, 0, 0, 0, 0, 0, 15, 9, 10, 7,
563 6, 14, 11, 5, 12, 13, 9, 0, 0, 4,
564 7, 0, 8, 2, 0, 3, 0, 1, 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, 3, 1, 1, 1, 1,
573 1, 1, 4, 1, 4, 4, 4, 4, 4, 4,
574 4, 4, 4, 4, 4, 4, 4, 1, 1, 1,
575 1, 1, 1, 5, 4, 4, 4, 4, 6, 4,
576 4, 4, 4, 4, 4, 4, 4, 7, 4, 4,
577 4, 4, 4, 4, 4, 8, 4, 4, 4, 4,
578 1, 9, 1, 1, 4, 1, 4, 4, 4, 4,
580 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
581 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
582 4, 4, 10, 1, 11, 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[12] =
600 { 0,
601 1, 2, 3, 4, 3, 4, 4, 4, 3, 5,
605 static const flex_int16_t yy_base[35] =
606 { 0,
607 0, 0, 31, 30, 29, 28, 36, 0, 6, 16,
608 0, 41, 41, 41, 0, 41, 0, 22, 22, 41,
609 18, 18, 41, 41, 7, 41, 4, 41, 41, 20,
610 21, 26, 9, 30
613 static const flex_int16_t yy_def[35] =
614 { 0,
615 29, 1, 1, 1, 1, 1, 29, 30, 31, 32,
616 33, 29, 29, 29, 34, 29, 30, 31, 18, 29,
617 32, 33, 29, 29, 18, 29, 18, 29, 0, 29,
618 29, 29, 29, 29
621 static const flex_int16_t yy_nxt[53] =
622 { 0,
623 8, 8, 9, 10, 11, 10, 10, 10, 12, 13,
624 14, 19, 22, 28, 27, 20, 17, 17, 17, 17,
625 17, 17, 26, 17, 18, 18, 21, 21, 25, 21,
626 23, 24, 23, 23, 23, 29, 16, 16, 15, 15,
627 7, 29, 29, 29, 29, 29, 29, 29, 29, 29,
628 29, 29
631 static const flex_int16_t yy_chk[53] =
632 { 0,
633 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
634 1, 9, 33, 27, 25, 9, 10, 10, 21, 21,
635 30, 30, 22, 30, 31, 31, 32, 32, 19, 32,
636 34, 18, 34, 34, 34, 7, 6, 5, 4, 3,
637 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
638 29, 29
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. */
652 This file must be translated to C++ and modified to build everywhere.
654 Run flex >= 2.6 like this:
656 flex --nounistd --never-interactive --batch -DFLEXINT_H --noline --header-file=cmCommandArgumentLexer.h -ocmCommandArgumentLexer.cxx cmCommandArgumentLexer.in.l
658 Modify cmCommandArgumentLexer.cxx:
659 - remove trailing whitespace: sed -i 's/\s*$//' cmCommandArgumentLexer.h cmCommandArgumentLexer.cxx
660 - remove blank lines at end of file: sed -i '${/^$/d;}' cmCommandArgumentLexer.h cmCommandArgumentLexer.cxx
661 - #include "cmStandardLexer.h" at the top: sed -i '1i#include "cmStandardLexer.h"' cmCommandArgumentLexer.cxx
665 /* IWYU pragma: no_forward_declare yyguts_t */
667 #ifndef __clang_analyzer__ /* Suppress clang-analyzer warnings */
669 #include "cmCommandArgumentParserHelper.h"
671 #define YY_USER_ACTION yyextra->UpdateInputPosition(yyleng);
673 /* Include the set of tokens from the parser. */
674 #include "cmCommandArgumentParserTokens.h"
676 static const char *DCURLYVariable = "${";
677 static const char *RCURLYVariable = "}";
678 static const char *ATVariable = "@";
679 static const char *DOLLARVariable = "$";
680 static const char *LCURLYVariable = "{";
681 static const char *BSLASHVariable = "\\";
683 /*--------------------------------------------------------------------------*/
685 #define INITIAL 0
686 #define ESCAPES 1
687 #define NOESCAPES 2
689 #ifndef YY_EXTRA_TYPE
690 #define YY_EXTRA_TYPE void *
691 #endif
693 /* Holds the entire state of the reentrant scanner. */
694 struct yyguts_t
697 /* User-defined. Not touched by flex. */
698 YY_EXTRA_TYPE yyextra_r;
700 /* The rest are the same as the globals declared in the non-reentrant scanner. */
701 FILE *yyin_r, *yyout_r;
702 size_t yy_buffer_stack_top; /**< index of top of stack. */
703 size_t yy_buffer_stack_max; /**< capacity of stack. */
704 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
705 char yy_hold_char;
706 int yy_n_chars;
707 int yyleng_r;
708 char *yy_c_buf_p;
709 int yy_init;
710 int yy_start;
711 int yy_did_buffer_switch_on_eof;
712 int yy_start_stack_ptr;
713 int yy_start_stack_depth;
714 int *yy_start_stack;
715 yy_state_type yy_last_accepting_state;
716 char* yy_last_accepting_cpos;
718 int yylineno_r;
719 int yy_flex_debug_r;
721 char *yytext_r;
722 int yy_more_flag;
723 int yy_more_len;
725 }; /* end struct yyguts_t */
727 static int yy_init_globals ( yyscan_t yyscanner );
729 int yylex_init (yyscan_t* scanner);
731 int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
733 /* Accessor methods to globals.
734 These are made visible to non-reentrant scanners for convenience. */
736 int yylex_destroy ( yyscan_t yyscanner );
738 int yyget_debug ( yyscan_t yyscanner );
740 void yyset_debug ( int debug_flag , yyscan_t yyscanner );
742 YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
744 void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
746 FILE *yyget_in ( yyscan_t yyscanner );
748 void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
750 FILE *yyget_out ( yyscan_t yyscanner );
752 void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
754 int yyget_leng ( yyscan_t yyscanner );
756 char *yyget_text ( yyscan_t yyscanner );
758 int yyget_lineno ( yyscan_t yyscanner );
760 void yyset_lineno ( int _line_number , yyscan_t yyscanner );
762 int yyget_column ( yyscan_t yyscanner );
764 void yyset_column ( int _column_no , yyscan_t yyscanner );
766 /* Macros after this point can all be overridden by user definitions in
767 * section 1.
770 #ifndef YY_SKIP_YYWRAP
771 #ifdef __cplusplus
772 extern "C" int yywrap ( yyscan_t yyscanner );
773 #else
774 extern int yywrap ( yyscan_t yyscanner );
775 #endif
776 #endif
778 #ifndef YY_NO_UNPUT
780 #endif
782 #ifndef yytext_ptr
783 static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
784 #endif
786 #ifdef YY_NEED_STRLEN
787 static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
788 #endif
790 #ifndef YY_NO_INPUT
791 #ifdef __cplusplus
792 static int yyinput ( yyscan_t yyscanner );
793 #else
794 static int input ( yyscan_t yyscanner );
795 #endif
797 #endif
799 /* Amount of stuff to slurp up with each read. */
800 #ifndef YY_READ_BUF_SIZE
801 #ifdef __ia64__
802 /* On IA-64, the buffer size is 16k, not 8k */
803 #define YY_READ_BUF_SIZE 16384
804 #else
805 #define YY_READ_BUF_SIZE 8192
806 #endif /* __ia64__ */
807 #endif
809 /* Copy whatever the last rule matched to the standard output. */
810 #ifndef ECHO
811 /* This used to be an fputs(), but since the string might contain NUL's,
812 * we now use fwrite().
814 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
815 #endif
817 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
818 * is returned in "result".
820 #ifndef YY_INPUT
821 #define YY_INPUT(buf,result,max_size) \
822 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
824 int c = '*'; \
825 int n; \
826 for ( n = 0; n < max_size && \
827 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
828 buf[n] = (char) c; \
829 if ( c == '\n' ) \
830 buf[n++] = (char) c; \
831 if ( c == EOF && ferror( yyin ) ) \
832 YY_FATAL_ERROR( "input in flex scanner failed" ); \
833 result = n; \
835 else \
837 errno=0; \
838 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
840 if( errno != EINTR) \
842 YY_FATAL_ERROR( "input in flex scanner failed" ); \
843 break; \
845 errno=0; \
846 clearerr(yyin); \
851 #endif
853 /* No semi-colon after return; correct usage is to write "yyterminate();" -
854 * we don't want an extra ';' after the "return" because that will cause
855 * some compilers to complain about unreachable statements.
857 #ifndef yyterminate
858 #define yyterminate() return YY_NULL
859 #endif
861 /* Number of entries by which start-condition stack grows. */
862 #ifndef YY_START_STACK_INCR
863 #define YY_START_STACK_INCR 25
864 #endif
866 /* Report a fatal error. */
867 #ifndef YY_FATAL_ERROR
868 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
869 #endif
871 /* end tables serialization structures and prototypes */
873 /* Default declaration of generated scanner - a define so the user can
874 * easily add parameters.
876 #ifndef YY_DECL
877 #define YY_DECL_IS_OURS 1
879 extern int yylex (yyscan_t yyscanner);
881 #define YY_DECL int yylex (yyscan_t yyscanner)
882 #endif /* !YY_DECL */
884 /* Code executed at the beginning of each rule, after yytext and yyleng
885 * have been set up.
887 #ifndef YY_USER_ACTION
888 #define YY_USER_ACTION
889 #endif
891 /* Code executed at the end of each rule. */
892 #ifndef YY_BREAK
893 #define YY_BREAK /*LINTED*/break;
894 #endif
896 #define YY_RULE_SETUP \
897 YY_USER_ACTION
899 /** The main scanner function which does all the work.
901 YY_DECL
903 yy_state_type yy_current_state;
904 char *yy_cp, *yy_bp;
905 int yy_act;
906 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
908 if ( !yyg->yy_init )
910 yyg->yy_init = 1;
912 #ifdef YY_USER_INIT
913 YY_USER_INIT;
914 #endif
916 if ( ! yyg->yy_start )
917 yyg->yy_start = 1; /* first start state */
919 if ( ! yyin )
920 yyin = stdin;
922 if ( ! yyout )
923 yyout = stdout;
925 if ( ! YY_CURRENT_BUFFER ) {
926 yyensure_buffer_stack (yyscanner);
927 YY_CURRENT_BUFFER_LVALUE =
928 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
931 yy_load_buffer_state( yyscanner );
936 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
938 yy_cp = yyg->yy_c_buf_p;
940 /* Support of yytext. */
941 *yy_cp = yyg->yy_hold_char;
943 /* yy_bp points to the position in yy_ch_buf of the start of
944 * the current run.
946 yy_bp = yy_cp;
948 yy_current_state = yyg->yy_start;
949 yy_match:
952 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
953 if ( yy_accept[yy_current_state] )
955 yyg->yy_last_accepting_state = yy_current_state;
956 yyg->yy_last_accepting_cpos = yy_cp;
958 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
960 yy_current_state = (int) yy_def[yy_current_state];
961 if ( yy_current_state >= 30 )
962 yy_c = yy_meta[yy_c];
964 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
965 ++yy_cp;
967 while ( yy_current_state != 29 );
968 yy_cp = yyg->yy_last_accepting_cpos;
969 yy_current_state = yyg->yy_last_accepting_state;
971 yy_find_action:
972 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 //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
991 yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2);
992 return cal_ENVCURLY;
994 YY_BREAK
995 case 2:
996 YY_RULE_SETUP
998 //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
999 yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2);
1000 return cal_NCURLY;
1002 YY_BREAK
1003 case 3:
1004 YY_RULE_SETUP
1006 //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
1007 yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2);
1008 return cal_ATNAME;
1010 YY_BREAK
1011 case 4:
1012 YY_RULE_SETUP
1014 //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
1015 //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
1016 yylvalp->str = DCURLYVariable;
1017 return cal_DCURLY;
1019 YY_BREAK
1020 case 5:
1021 YY_RULE_SETUP
1023 //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
1024 //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
1025 yylvalp->str = RCURLYVariable;
1026 return cal_RCURLY;
1028 YY_BREAK
1029 case 6:
1030 YY_RULE_SETUP
1032 //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
1033 //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
1034 yylvalp->str = ATVariable;
1035 return cal_AT;
1037 YY_BREAK
1038 case 7:
1039 YY_RULE_SETUP
1041 //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
1042 yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
1043 return cal_NAME;
1045 YY_BREAK
1046 case 8:
1047 YY_RULE_SETUP
1049 if ( !yyextra->HandleEscapeSymbol(yylvalp, *(yytext+1)) )
1051 return cal_ERROR;
1053 return cal_SYMBOL;
1055 YY_BREAK
1056 case 9:
1057 /* rule 9 can match eol */
1058 YY_RULE_SETUP
1060 //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
1061 yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
1062 return cal_SYMBOL;
1064 YY_BREAK
1065 case 10:
1066 YY_RULE_SETUP
1068 //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
1069 yylvalp->str = DOLLARVariable;
1070 return cal_DOLLAR;
1072 YY_BREAK
1073 case 11:
1074 YY_RULE_SETUP
1076 //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
1077 yylvalp->str = LCURLYVariable;
1078 return cal_LCURLY;
1080 YY_BREAK
1081 case 12:
1082 YY_RULE_SETUP
1084 //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
1085 yylvalp->str = BSLASHVariable;
1086 return cal_BSLASH;
1088 YY_BREAK
1089 case 13:
1090 YY_RULE_SETUP
1092 //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
1093 yylvalp->str = BSLASHVariable;
1094 return cal_SYMBOL;
1096 YY_BREAK
1097 case 14:
1098 YY_RULE_SETUP
1099 ECHO;
1100 YY_BREAK
1101 case YY_STATE_EOF(INITIAL):
1102 case YY_STATE_EOF(ESCAPES):
1103 case YY_STATE_EOF(NOESCAPES):
1104 yyterminate();
1106 case YY_END_OF_BUFFER:
1108 /* Amount of text matched not including the EOB char. */
1109 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1111 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1112 *yy_cp = yyg->yy_hold_char;
1113 YY_RESTORE_YY_MORE_OFFSET
1115 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1117 /* We're scanning a new file or input source. It's
1118 * possible that this happened because the user
1119 * just pointed yyin at a new source and called
1120 * yylex(). If so, then we have to assure
1121 * consistency between YY_CURRENT_BUFFER and our
1122 * globals. Here is the right place to do so, because
1123 * this is the first action (other than possibly a
1124 * back-up) that will match for the new input source.
1126 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1127 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1128 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1131 /* Note that here we test for yy_c_buf_p "<=" to the position
1132 * of the first EOB in the buffer, since yy_c_buf_p will
1133 * already have been incremented past the NUL character
1134 * (since all states make transitions on EOB to the
1135 * end-of-buffer state). Contrast this with the test
1136 * in input().
1138 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1139 { /* This was really a NUL. */
1140 yy_state_type yy_next_state;
1142 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1144 yy_current_state = yy_get_previous_state( yyscanner );
1146 /* Okay, we're now positioned to make the NUL
1147 * transition. We couldn't have
1148 * yy_get_previous_state() go ahead and do it
1149 * for us because it doesn't know how to deal
1150 * with the possibility of jamming (and we don't
1151 * want to build jamming into it because then it
1152 * will run more slowly).
1155 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1157 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1159 if ( yy_next_state )
1161 /* Consume the NUL. */
1162 yy_cp = ++yyg->yy_c_buf_p;
1163 yy_current_state = yy_next_state;
1164 goto yy_match;
1167 else
1169 yy_cp = yyg->yy_last_accepting_cpos;
1170 yy_current_state = yyg->yy_last_accepting_state;
1171 goto yy_find_action;
1175 else switch ( yy_get_next_buffer( yyscanner ) )
1177 case EOB_ACT_END_OF_FILE:
1179 yyg->yy_did_buffer_switch_on_eof = 0;
1181 if ( yywrap( yyscanner ) )
1183 /* Note: because we've taken care in
1184 * yy_get_next_buffer() to have set up
1185 * yytext, we can now set up
1186 * yy_c_buf_p so that if some total
1187 * hoser (like flex itself) wants to
1188 * call the scanner after we return the
1189 * YY_NULL, it'll still work - another
1190 * YY_NULL will get returned.
1192 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1194 yy_act = YY_STATE_EOF(YY_START);
1195 goto do_action;
1198 else
1200 if ( ! yyg->yy_did_buffer_switch_on_eof )
1201 YY_NEW_FILE;
1203 break;
1206 case EOB_ACT_CONTINUE_SCAN:
1207 yyg->yy_c_buf_p =
1208 yyg->yytext_ptr + yy_amount_of_matched_text;
1210 yy_current_state = yy_get_previous_state( yyscanner );
1212 yy_cp = yyg->yy_c_buf_p;
1213 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1214 goto yy_match;
1216 case EOB_ACT_LAST_MATCH:
1217 yyg->yy_c_buf_p =
1218 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1220 yy_current_state = yy_get_previous_state( yyscanner );
1222 yy_cp = yyg->yy_c_buf_p;
1223 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1224 goto yy_find_action;
1226 break;
1229 default:
1230 YY_FATAL_ERROR(
1231 "fatal flex scanner internal error--no action found" );
1232 } /* end of action switch */
1233 } /* end of scanning one token */
1234 } /* end of user's declarations */
1235 } /* end of yylex */
1237 /* yy_get_next_buffer - try to read in a new buffer
1239 * Returns a code representing an action:
1240 * EOB_ACT_LAST_MATCH -
1241 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1242 * EOB_ACT_END_OF_FILE - end of file
1244 static int yy_get_next_buffer (yyscan_t yyscanner)
1246 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1247 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1248 char *source = yyg->yytext_ptr;
1249 int number_to_move, i;
1250 int ret_val;
1252 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1253 YY_FATAL_ERROR(
1254 "fatal flex scanner internal error--end of buffer missed" );
1256 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1257 { /* Don't try to fill the buffer, so this is an EOF. */
1258 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1260 /* We matched a single character, the EOB, so
1261 * treat this as a final EOF.
1263 return EOB_ACT_END_OF_FILE;
1266 else
1268 /* We matched some text prior to the EOB, first
1269 * process it.
1271 return EOB_ACT_LAST_MATCH;
1275 /* Try to read more data. */
1277 /* First move last chars to start of buffer. */
1278 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
1280 for ( i = 0; i < number_to_move; ++i )
1281 *(dest++) = *(source++);
1283 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1284 /* don't do the read, it's not guaranteed to return an EOF,
1285 * just force an EOF
1287 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1289 else
1291 int num_to_read =
1292 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1294 while ( num_to_read <= 0 )
1295 { /* Not enough room in the buffer - grow it. */
1297 /* just a shorter name for the current buffer */
1298 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1300 int yy_c_buf_p_offset =
1301 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1303 if ( b->yy_is_our_buffer )
1305 int new_size = b->yy_buf_size * 2;
1307 if ( new_size <= 0 )
1308 b->yy_buf_size += b->yy_buf_size / 8;
1309 else
1310 b->yy_buf_size *= 2;
1312 b->yy_ch_buf = (char *)
1313 /* Include room in for 2 EOB chars. */
1314 yyrealloc( (void *) b->yy_ch_buf,
1315 (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
1317 else
1318 /* Can't grow it, we don't own it. */
1319 b->yy_ch_buf = NULL;
1321 if ( ! b->yy_ch_buf )
1322 YY_FATAL_ERROR(
1323 "fatal error - scanner input buffer overflow" );
1325 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1327 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1328 number_to_move - 1;
1332 if ( num_to_read > YY_READ_BUF_SIZE )
1333 num_to_read = YY_READ_BUF_SIZE;
1335 /* Read in more data. */
1336 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1337 yyg->yy_n_chars, num_to_read );
1339 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1342 if ( yyg->yy_n_chars == 0 )
1344 if ( number_to_move == YY_MORE_ADJ )
1346 ret_val = EOB_ACT_END_OF_FILE;
1347 yyrestart( yyin , yyscanner);
1350 else
1352 ret_val = EOB_ACT_LAST_MATCH;
1353 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1354 YY_BUFFER_EOF_PENDING;
1358 else
1359 ret_val = EOB_ACT_CONTINUE_SCAN;
1361 if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1362 /* Extend the array by 50%, plus the number we really need. */
1363 int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1364 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1365 (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
1366 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1367 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1368 /* "- 2" to take care of EOB's */
1369 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1372 yyg->yy_n_chars += number_to_move;
1373 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1374 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1376 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1378 return ret_val;
1381 /* yy_get_previous_state - get the state just before the EOB char was reached */
1383 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1385 yy_state_type yy_current_state;
1386 char *yy_cp;
1387 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1389 yy_current_state = yyg->yy_start;
1391 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1393 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1394 if ( yy_accept[yy_current_state] )
1396 yyg->yy_last_accepting_state = yy_current_state;
1397 yyg->yy_last_accepting_cpos = yy_cp;
1399 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1401 yy_current_state = (int) yy_def[yy_current_state];
1402 if ( yy_current_state >= 30 )
1403 yy_c = yy_meta[yy_c];
1405 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1408 return yy_current_state;
1411 /* yy_try_NUL_trans - try to make a transition on the NUL character
1413 * synopsis
1414 * next_state = yy_try_NUL_trans( current_state );
1416 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
1418 int yy_is_jam;
1419 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
1420 char *yy_cp = yyg->yy_c_buf_p;
1422 YY_CHAR yy_c = 1;
1423 if ( yy_accept[yy_current_state] )
1425 yyg->yy_last_accepting_state = yy_current_state;
1426 yyg->yy_last_accepting_cpos = yy_cp;
1428 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1430 yy_current_state = (int) yy_def[yy_current_state];
1431 if ( yy_current_state >= 30 )
1432 yy_c = yy_meta[yy_c];
1434 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1435 yy_is_jam = (yy_current_state == 29);
1437 (void)yyg;
1438 return yy_is_jam ? 0 : yy_current_state;
1441 #ifndef YY_NO_UNPUT
1443 #endif
1445 #ifndef YY_NO_INPUT
1446 #ifdef __cplusplus
1447 static int yyinput (yyscan_t yyscanner)
1448 #else
1449 static int input (yyscan_t yyscanner)
1450 #endif
1453 int c;
1454 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1456 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1458 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1460 /* yy_c_buf_p now points to the character we want to return.
1461 * If this occurs *before* the EOB characters, then it's a
1462 * valid NUL; if not, then we've hit the end of the buffer.
1464 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1465 /* This was really a NUL. */
1466 *yyg->yy_c_buf_p = '\0';
1468 else
1469 { /* need more input */
1470 int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
1471 ++yyg->yy_c_buf_p;
1473 switch ( yy_get_next_buffer( yyscanner ) )
1475 case EOB_ACT_LAST_MATCH:
1476 /* This happens because yy_g_n_b()
1477 * sees that we've accumulated a
1478 * token and flags that we need to
1479 * try matching the token before
1480 * proceeding. But for input(),
1481 * there's no matching to consider.
1482 * So convert the EOB_ACT_LAST_MATCH
1483 * to EOB_ACT_END_OF_FILE.
1486 /* Reset buffer status. */
1487 yyrestart( yyin , yyscanner);
1489 /*FALLTHROUGH*/
1491 case EOB_ACT_END_OF_FILE:
1493 if ( yywrap( yyscanner ) )
1494 return 0;
1496 if ( ! yyg->yy_did_buffer_switch_on_eof )
1497 YY_NEW_FILE;
1498 #ifdef __cplusplus
1499 return yyinput(yyscanner);
1500 #else
1501 return input(yyscanner);
1502 #endif
1505 case EOB_ACT_CONTINUE_SCAN:
1506 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
1507 break;
1512 c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
1513 *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
1514 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
1516 return c;
1518 #endif /* ifndef YY_NO_INPUT */
1520 /** Immediately switch to a different input stream.
1521 * @param input_file A readable stream.
1522 * @param yyscanner The scanner object.
1523 * @note This function does not reset the start condition to @c INITIAL .
1525 void yyrestart (FILE * input_file , yyscan_t yyscanner)
1527 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1529 if ( ! YY_CURRENT_BUFFER ){
1530 yyensure_buffer_stack (yyscanner);
1531 YY_CURRENT_BUFFER_LVALUE =
1532 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
1535 yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
1536 yy_load_buffer_state( yyscanner );
1539 /** Switch to a different input buffer.
1540 * @param new_buffer The new input buffer.
1541 * @param yyscanner The scanner object.
1543 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1545 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1547 /* TODO. We should be able to replace this entire function body
1548 * with
1549 * yypop_buffer_state();
1550 * yypush_buffer_state(new_buffer);
1552 yyensure_buffer_stack (yyscanner);
1553 if ( YY_CURRENT_BUFFER == new_buffer )
1554 return;
1556 if ( YY_CURRENT_BUFFER )
1558 /* Flush out information for old buffer. */
1559 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1560 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1561 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1564 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1565 yy_load_buffer_state( yyscanner );
1567 /* We don't actually know whether we did this switch during
1568 * EOF (yywrap()) processing, but the only time this flag
1569 * is looked at is after yywrap() is called, so it's safe
1570 * to go ahead and always set it.
1572 yyg->yy_did_buffer_switch_on_eof = 1;
1575 static void yy_load_buffer_state (yyscan_t yyscanner)
1577 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1578 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1579 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1580 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1581 yyg->yy_hold_char = *yyg->yy_c_buf_p;
1584 /** Allocate and initialize an input buffer state.
1585 * @param file A readable stream.
1586 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1587 * @param yyscanner The scanner object.
1588 * @return the allocated buffer state.
1590 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
1592 YY_BUFFER_STATE b;
1594 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
1595 if ( ! b )
1596 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1598 b->yy_buf_size = size;
1600 /* yy_ch_buf has to be 2 characters longer than the size given because
1601 * we need to put in 2 end-of-buffer characters.
1603 b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
1604 if ( ! b->yy_ch_buf )
1605 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1607 b->yy_is_our_buffer = 1;
1609 yy_init_buffer( b, file , yyscanner);
1611 return b;
1614 /** Destroy the buffer.
1615 * @param b a buffer created with yy_create_buffer()
1616 * @param yyscanner The scanner object.
1618 void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1620 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1622 if ( ! b )
1623 return;
1625 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1626 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1628 if ( b->yy_is_our_buffer )
1629 yyfree( (void *) b->yy_ch_buf , yyscanner );
1631 yyfree( (void *) b , yyscanner );
1634 /* Initializes or reinitializes a buffer.
1635 * This function is sometimes called more than once on the same buffer,
1636 * such as during a yyrestart() or at EOF.
1638 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
1641 int oerrno = errno;
1642 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1644 yy_flush_buffer( b , yyscanner);
1646 b->yy_input_file = file;
1647 b->yy_fill_buffer = 1;
1649 /* If b is the current buffer, then yy_init_buffer was _probably_
1650 * called from yyrestart() or through yy_get_next_buffer.
1651 * In that case, we don't want to reset the lineno or column.
1653 if (b != YY_CURRENT_BUFFER){
1654 b->yy_bs_lineno = 1;
1655 b->yy_bs_column = 0;
1658 b->yy_is_interactive = 0;
1660 errno = oerrno;
1663 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1664 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1665 * @param yyscanner The scanner object.
1667 void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1669 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1670 if ( ! b )
1671 return;
1673 b->yy_n_chars = 0;
1675 /* We always need two end-of-buffer characters. The first causes
1676 * a transition to the end-of-buffer state. The second causes
1677 * a jam in that state.
1679 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1680 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1682 b->yy_buf_pos = &b->yy_ch_buf[0];
1684 b->yy_at_bol = 1;
1685 b->yy_buffer_status = YY_BUFFER_NEW;
1687 if ( b == YY_CURRENT_BUFFER )
1688 yy_load_buffer_state( yyscanner );
1691 /** Pushes the new state onto the stack. The new state becomes
1692 * the current state. This function will allocate the stack
1693 * if necessary.
1694 * @param new_buffer The new state.
1695 * @param yyscanner The scanner object.
1697 void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1699 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1700 if (new_buffer == NULL)
1701 return;
1703 yyensure_buffer_stack(yyscanner);
1705 /* This block is copied from yy_switch_to_buffer. */
1706 if ( YY_CURRENT_BUFFER )
1708 /* Flush out information for old buffer. */
1709 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1710 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1711 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1714 /* Only push if top exists. Otherwise, replace top. */
1715 if (YY_CURRENT_BUFFER)
1716 yyg->yy_buffer_stack_top++;
1717 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1719 /* copied from yy_switch_to_buffer. */
1720 yy_load_buffer_state( yyscanner );
1721 yyg->yy_did_buffer_switch_on_eof = 1;
1724 /** Removes and deletes the top of the stack, if present.
1725 * The next element becomes the new top.
1726 * @param yyscanner The scanner object.
1728 void yypop_buffer_state (yyscan_t yyscanner)
1730 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1731 if (!YY_CURRENT_BUFFER)
1732 return;
1734 yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
1735 YY_CURRENT_BUFFER_LVALUE = NULL;
1736 if (yyg->yy_buffer_stack_top > 0)
1737 --yyg->yy_buffer_stack_top;
1739 if (YY_CURRENT_BUFFER) {
1740 yy_load_buffer_state( yyscanner );
1741 yyg->yy_did_buffer_switch_on_eof = 1;
1745 /* Allocates the stack if it does not exist.
1746 * Guarantees space for at least one push.
1748 static void yyensure_buffer_stack (yyscan_t yyscanner)
1750 yy_size_t num_to_alloc;
1751 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1753 if (!yyg->yy_buffer_stack) {
1755 /* First allocation is just for 2 elements, since we don't know if this
1756 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1757 * immediate realloc on the next call.
1759 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
1760 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
1761 (num_to_alloc * sizeof(struct yy_buffer_state*)
1762 , yyscanner);
1763 if ( ! yyg->yy_buffer_stack )
1764 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1766 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1768 yyg->yy_buffer_stack_max = num_to_alloc;
1769 yyg->yy_buffer_stack_top = 0;
1770 return;
1773 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
1775 /* Increase the buffer to prepare for a possible push. */
1776 yy_size_t grow_size = 8 /* arbitrary grow size */;
1778 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
1779 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
1780 (yyg->yy_buffer_stack,
1781 num_to_alloc * sizeof(struct yy_buffer_state*)
1782 , yyscanner);
1783 if ( ! yyg->yy_buffer_stack )
1784 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1786 /* zero only the new slots.*/
1787 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
1788 yyg->yy_buffer_stack_max = num_to_alloc;
1792 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1793 * @param base the character buffer
1794 * @param size the size in bytes of the character buffer
1795 * @param yyscanner The scanner object.
1796 * @return the newly allocated buffer state object.
1798 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
1800 YY_BUFFER_STATE b;
1802 if ( size < 2 ||
1803 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1804 base[size-1] != YY_END_OF_BUFFER_CHAR )
1805 /* They forgot to leave room for the EOB's. */
1806 return NULL;
1808 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
1809 if ( ! b )
1810 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1812 b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
1813 b->yy_buf_pos = b->yy_ch_buf = base;
1814 b->yy_is_our_buffer = 0;
1815 b->yy_input_file = NULL;
1816 b->yy_n_chars = b->yy_buf_size;
1817 b->yy_is_interactive = 0;
1818 b->yy_at_bol = 1;
1819 b->yy_fill_buffer = 0;
1820 b->yy_buffer_status = YY_BUFFER_NEW;
1822 yy_switch_to_buffer( b , yyscanner );
1824 return b;
1827 /** Setup the input buffer state to scan a string. The next call to yylex() will
1828 * scan from a @e copy of @a str.
1829 * @param yystr a NUL-terminated string to scan
1830 * @param yyscanner The scanner object.
1831 * @return the newly allocated buffer state object.
1832 * @note If you want to scan bytes that may contain NUL values, then use
1833 * yy_scan_bytes() instead.
1835 YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
1838 return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
1841 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1842 * scan from a @e copy of @a bytes.
1843 * @param yybytes the byte buffer to scan
1844 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1845 * @param yyscanner The scanner object.
1846 * @return the newly allocated buffer state object.
1848 YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner)
1850 YY_BUFFER_STATE b;
1851 char *buf;
1852 yy_size_t n;
1853 int i;
1855 /* Get memory for full buffer, including space for trailing EOB's. */
1856 n = (yy_size_t) (_yybytes_len + 2);
1857 buf = (char *) yyalloc( n , yyscanner );
1858 if ( ! buf )
1859 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1861 for ( i = 0; i < _yybytes_len; ++i )
1862 buf[i] = yybytes[i];
1864 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1866 b = yy_scan_buffer( buf, n , yyscanner);
1867 if ( ! b )
1868 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1870 /* It's okay to grow etc. this buffer, and we should throw it
1871 * away when we're done.
1873 b->yy_is_our_buffer = 1;
1875 return b;
1878 #ifndef YY_EXIT_FAILURE
1879 #define YY_EXIT_FAILURE 2
1880 #endif
1882 static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
1884 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1885 (void)yyg;
1886 fprintf( stderr, "%s\n", msg );
1887 exit( YY_EXIT_FAILURE );
1890 /* Redefine yyless() so it works in section 3 code. */
1892 #undef yyless
1893 #define yyless(n) \
1894 do \
1896 /* Undo effects of setting up yytext. */ \
1897 int yyless_macro_arg = (n); \
1898 YY_LESS_LINENO(yyless_macro_arg);\
1899 yytext[yyleng] = yyg->yy_hold_char; \
1900 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
1901 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
1902 *yyg->yy_c_buf_p = '\0'; \
1903 yyleng = yyless_macro_arg; \
1905 while ( 0 )
1907 /* Accessor methods (get/set functions) to struct members. */
1909 /** Get the user-defined data for this scanner.
1910 * @param yyscanner The scanner object.
1912 YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
1914 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1915 return yyextra;
1918 /** Get the current line number.
1919 * @param yyscanner The scanner object.
1921 int yyget_lineno (yyscan_t yyscanner)
1923 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1925 if (! YY_CURRENT_BUFFER)
1926 return 0;
1928 return yylineno;
1931 /** Get the current column number.
1932 * @param yyscanner The scanner object.
1934 int yyget_column (yyscan_t yyscanner)
1936 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1938 if (! YY_CURRENT_BUFFER)
1939 return 0;
1941 return yycolumn;
1944 /** Get the input stream.
1945 * @param yyscanner The scanner object.
1947 FILE *yyget_in (yyscan_t yyscanner)
1949 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1950 return yyin;
1953 /** Get the output stream.
1954 * @param yyscanner The scanner object.
1956 FILE *yyget_out (yyscan_t yyscanner)
1958 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1959 return yyout;
1962 /** Get the length of the current token.
1963 * @param yyscanner The scanner object.
1965 int yyget_leng (yyscan_t yyscanner)
1967 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1968 return yyleng;
1971 /** Get the current token.
1972 * @param yyscanner The scanner object.
1975 char *yyget_text (yyscan_t yyscanner)
1977 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1978 return yytext;
1981 /** Set the user-defined data. This data is never touched by the scanner.
1982 * @param user_defined The data to be associated with this scanner.
1983 * @param yyscanner The scanner object.
1985 void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
1987 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1988 yyextra = user_defined ;
1991 /** Set the current line number.
1992 * @param _line_number line number
1993 * @param yyscanner The scanner object.
1995 void yyset_lineno (int _line_number , yyscan_t yyscanner)
1997 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1999 /* lineno is only valid if an input buffer exists. */
2000 if (! YY_CURRENT_BUFFER )
2001 YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
2003 yylineno = _line_number;
2006 /** Set the current column.
2007 * @param _column_no column number
2008 * @param yyscanner The scanner object.
2010 void yyset_column (int _column_no , yyscan_t yyscanner)
2012 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2014 /* column is only valid if an input buffer exists. */
2015 if (! YY_CURRENT_BUFFER )
2016 YY_FATAL_ERROR( "yyset_column called with no buffer" );
2018 yycolumn = _column_no;
2021 /** Set the input stream. This does not discard the current
2022 * input buffer.
2023 * @param _in_str A readable stream.
2024 * @param yyscanner The scanner object.
2025 * @see yy_switch_to_buffer
2027 void yyset_in (FILE * _in_str , yyscan_t yyscanner)
2029 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2030 yyin = _in_str ;
2033 void yyset_out (FILE * _out_str , yyscan_t yyscanner)
2035 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2036 yyout = _out_str ;
2039 int yyget_debug (yyscan_t yyscanner)
2041 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2042 return yy_flex_debug;
2045 void yyset_debug (int _bdebug , yyscan_t yyscanner)
2047 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2048 yy_flex_debug = _bdebug ;
2051 /* Accessor methods for yylval and yylloc */
2053 /* User-visible API */
2055 /* yylex_init is special because it creates the scanner itself, so it is
2056 * the ONLY reentrant function that doesn't take the scanner as the last argument.
2057 * That's why we explicitly handle the declaration, instead of using our macros.
2059 int yylex_init(yyscan_t* ptr_yy_globals)
2061 if (ptr_yy_globals == NULL){
2062 errno = EINVAL;
2063 return 1;
2066 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
2068 if (*ptr_yy_globals == NULL){
2069 errno = ENOMEM;
2070 return 1;
2073 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
2074 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2076 return yy_init_globals ( *ptr_yy_globals );
2079 /* yylex_init_extra has the same functionality as yylex_init, but follows the
2080 * convention of taking the scanner as the last argument. Note however, that
2081 * this is a *pointer* to a scanner, as it will be allocated by this call (and
2082 * is the reason, too, why this function also must handle its own declaration).
2083 * The user defined value in the first argument will be available to yyalloc in
2084 * the yyextra field.
2086 int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
2088 struct yyguts_t dummy_yyguts;
2090 yyset_extra (yy_user_defined, &dummy_yyguts);
2092 if (ptr_yy_globals == NULL){
2093 errno = EINVAL;
2094 return 1;
2097 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
2099 if (*ptr_yy_globals == NULL){
2100 errno = ENOMEM;
2101 return 1;
2104 /* By setting to 0xAA, we expose bugs in
2105 yy_init_globals. Leave at 0x00 for releases. */
2106 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2108 yyset_extra (yy_user_defined, *ptr_yy_globals);
2110 return yy_init_globals ( *ptr_yy_globals );
2113 static int yy_init_globals (yyscan_t yyscanner)
2115 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2116 /* Initialization is the same as for the non-reentrant scanner.
2117 * This function is called from yylex_destroy(), so don't allocate here.
2120 yyg->yy_buffer_stack = NULL;
2121 yyg->yy_buffer_stack_top = 0;
2122 yyg->yy_buffer_stack_max = 0;
2123 yyg->yy_c_buf_p = NULL;
2124 yyg->yy_init = 0;
2125 yyg->yy_start = 0;
2127 yyg->yy_start_stack_ptr = 0;
2128 yyg->yy_start_stack_depth = 0;
2129 yyg->yy_start_stack = NULL;
2131 /* Defined in main.c */
2132 #ifdef YY_STDINIT
2133 yyin = stdin;
2134 yyout = stdout;
2135 #else
2136 yyin = NULL;
2137 yyout = NULL;
2138 #endif
2140 /* For future reference: Set errno on error, since we are called by
2141 * yylex_init()
2143 return 0;
2146 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2147 int yylex_destroy (yyscan_t yyscanner)
2149 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2151 /* Pop the buffer stack, destroying each element. */
2152 while(YY_CURRENT_BUFFER){
2153 yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
2154 YY_CURRENT_BUFFER_LVALUE = NULL;
2155 yypop_buffer_state(yyscanner);
2158 /* Destroy the stack itself. */
2159 yyfree(yyg->yy_buffer_stack , yyscanner);
2160 yyg->yy_buffer_stack = NULL;
2162 /* Destroy the start condition stack. */
2163 yyfree( yyg->yy_start_stack , yyscanner );
2164 yyg->yy_start_stack = NULL;
2166 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2167 * yylex() is called, initialization will occur. */
2168 yy_init_globals( yyscanner);
2170 /* Destroy the main struct (reentrant only). */
2171 yyfree ( yyscanner , yyscanner );
2172 yyscanner = NULL;
2173 return 0;
2177 * Internal utility routines.
2180 #ifndef yytext_ptr
2181 static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
2183 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2184 (void)yyg;
2186 int i;
2187 for ( i = 0; i < n; ++i )
2188 s1[i] = s2[i];
2190 #endif
2192 #ifdef YY_NEED_STRLEN
2193 static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
2195 int n;
2196 for ( n = 0; s[n]; ++n )
2199 return n;
2201 #endif
2203 void *yyalloc (yy_size_t size , yyscan_t yyscanner)
2205 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2206 (void)yyg;
2207 return malloc(size);
2210 void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
2212 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2213 (void)yyg;
2215 /* The cast to (char *) in the following accommodates both
2216 * implementations that use char* generic pointers, and those
2217 * that use void* generic pointers. It works with the latter
2218 * because both ANSI C and C++ allow castless assignment from
2219 * any pointer type to void*, and deal with argument conversions
2220 * as though doing an assignment.
2222 return realloc(ptr, size);
2225 void yyfree (void * ptr , yyscan_t yyscanner)
2227 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2228 (void)yyg;
2229 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2232 #define YYTABLES_NAME "yytables"
2234 /*--------------------------------------------------------------------------*/
2235 void cmCommandArgument_SetupEscapes(yyscan_t yyscanner, bool noEscapes)
2237 /* Hack into the internal flex-generated scanner to set the state. */
2238 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2239 if(noEscapes) {
2240 BEGIN(NOESCAPES);
2241 } else {
2242 BEGIN(ESCAPES);
2246 #endif /* __clang_analyzer__ */