1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
12 #include "cmStandardIncludes.h"
14 #line 2 "cmCommandArgumentLexer.cxx"
16 #line 4 "cmCommandArgumentLexer.cxx"
18 #define YY_INT_ALIGNED short int
20 /* A lexical scanner generated by flex */
23 #define YY_FLEX_MAJOR_VERSION 2
24 #define YY_FLEX_MINOR_VERSION 5
25 #define YY_FLEX_SUBMINOR_VERSION 35
26 #if YY_FLEX_SUBMINOR_VERSION > 0
30 /* First, we deal with platform-specific or compiler-specific issues. */
32 /* begin standard C headers. */
38 /* end standard C headers. */
40 /* flex integer type definitions */
45 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
47 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
49 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
50 * if you want the limit (max/min) macros for int types.
52 #ifndef __STDC_LIMIT_MACROS
53 #define __STDC_LIMIT_MACROS 1
57 typedef int8_t flex_int8_t;
58 typedef uint8_t flex_uint8_t;
59 typedef int16_t flex_int16_t;
60 typedef uint16_t flex_uint16_t;
61 typedef int32_t flex_int32_t;
62 typedef uint32_t flex_uint32_t;
64 typedef signed char flex_int8_t;
65 typedef short int flex_int16_t;
66 typedef int flex_int32_t;
67 typedef unsigned char flex_uint8_t;
68 typedef unsigned short int flex_uint16_t;
69 typedef unsigned int flex_uint32_t;
71 /* Limits of integral types. */
73 #define INT8_MIN (-128)
76 #define INT16_MIN (-32767-1)
79 #define INT32_MIN (-2147483647-1)
82 #define INT8_MAX (127)
85 #define INT16_MAX (32767)
88 #define INT32_MAX (2147483647)
91 #define UINT8_MAX (255U)
94 #define UINT16_MAX (65535U)
97 #define UINT32_MAX (4294967295U)
102 #endif /* ! FLEXINT_H */
106 /* The "const" storage-class-modifier is valid. */
109 #else /* ! __cplusplus */
111 /* C99 requires __STDC__ to be defined as 1. */
112 #if defined (__STDC__)
116 #endif /* defined (__STDC__) */
117 #endif /* ! __cplusplus */
120 #define yyconst const
125 /* Returned upon end-of-file. */
128 /* Promotes a possibly negative, possibly signed char to an unsigned
129 * integer for use as an array index. If the signed char is negative,
130 * we want to instead treat it as an 8-bit unsigned char, hence the
133 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
135 /* An opaque pointer. */
136 #ifndef YY_TYPEDEF_YY_SCANNER_T
137 #define YY_TYPEDEF_YY_SCANNER_T
138 typedef void* yyscan_t;
141 /* For convenience, these vars (plus the bison vars far below)
142 are macros in the reentrant scanner. */
143 #define yyin yyg->yyin_r
144 #define yyout yyg->yyout_r
145 #define yyextra yyg->yyextra_r
146 #define yyleng yyg->yyleng_r
147 #define yytext yyg->yytext_r
148 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
149 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
150 #define yy_flex_debug yyg->yy_flex_debug_r
152 /* Enter a start condition. This macro really ought to take a parameter,
153 * but we do it the disgusting crufty way forced on us by the ()-less
154 * definition of BEGIN.
156 #define BEGIN yyg->yy_start = 1 + 2 *
158 /* Translate the current start state into a value that can be later handed
159 * to BEGIN to return to the state. The YYSTATE alias is for lex
162 #define YY_START ((yyg->yy_start - 1) / 2)
163 #define YYSTATE YY_START
165 /* Action number for EOF rule of a given start state. */
166 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
168 /* Special action meaning "start processing a new file". */
169 #define YY_NEW_FILE cmCommandArgument_yyrestart(yyin ,yyscanner )
171 #define YY_END_OF_BUFFER_CHAR 0
173 /* Size of default input buffer. */
175 #define YY_BUF_SIZE 16384
178 /* The state buf must be large enough to hold one state per character in the main buffer.
180 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
182 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
183 #define YY_TYPEDEF_YY_BUFFER_STATE
184 typedef struct yy_buffer_state *YY_BUFFER_STATE;
187 #define EOB_ACT_CONTINUE_SCAN 0
188 #define EOB_ACT_END_OF_FILE 1
189 #define EOB_ACT_LAST_MATCH 2
191 #define YY_LESS_LINENO(n)
193 /* Return all but the first "n" matched characters back to the input stream. */
197 /* Undo effects of setting up yytext. */ \
198 int yyless_macro_arg = (n); \
199 YY_LESS_LINENO(yyless_macro_arg);\
200 *yy_cp = yyg->yy_hold_char; \
201 YY_RESTORE_YY_MORE_OFFSET \
202 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
203 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
207 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
209 #ifndef YY_TYPEDEF_YY_SIZE_T
210 #define YY_TYPEDEF_YY_SIZE_T
211 typedef size_t yy_size_t;
214 #ifndef YY_STRUCT_YY_BUFFER_STATE
215 #define YY_STRUCT_YY_BUFFER_STATE
216 struct yy_buffer_state
220 char *yy_ch_buf; /* input buffer */
221 char *yy_buf_pos; /* current position in input buffer */
223 /* Size of input buffer in bytes, not including room for EOB
226 yy_size_t yy_buf_size;
228 /* Number of characters read into yy_ch_buf, not including EOB
233 /* Whether we "own" the buffer - i.e., we know we created it,
234 * and can realloc() it to grow it, and should free() it to
237 int yy_is_our_buffer;
239 /* Whether this is an "interactive" input source; if so, and
240 * if we're using stdio for input, then we want to use getc()
241 * instead of fread(), to make sure we stop fetching input after
244 int yy_is_interactive;
246 /* Whether we're considered to be at the beginning of a line.
247 * If so, '^' rules will be active on the next match, otherwise
252 int yy_bs_lineno; /**< The line count. */
253 int yy_bs_column; /**< The column count. */
255 /* Whether to try to fill the input buffer when we reach the
260 int yy_buffer_status;
262 #define YY_BUFFER_NEW 0
263 #define YY_BUFFER_NORMAL 1
264 /* When an EOF's been seen but there's still some text to process
265 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
266 * shouldn't try reading from the input source any more. We might
267 * still have a bunch of tokens to match, though, because of
268 * possible backing-up.
270 * When we actually see the EOF, we change the status to "new"
271 * (via cmCommandArgument_yyrestart()), so that the user can continue scanning by
272 * just pointing yyin at a new input file.
274 #define YY_BUFFER_EOF_PENDING 2
277 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
279 /* We provide macros for accessing buffer states in case in the
280 * future we want to put the buffer states in a more general
283 * Returns the top of the stack, or NULL.
285 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
286 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
289 /* Same as previous macro, but useful when we know that the buffer stack is not
290 * NULL or when we need an lvalue. For internal use only.
292 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
294 void cmCommandArgument_yyrestart (FILE *input_file ,yyscan_t yyscanner );
295 void cmCommandArgument_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
296 YY_BUFFER_STATE cmCommandArgument_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
297 void cmCommandArgument_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
298 void cmCommandArgument_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
299 void cmCommandArgument_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
300 void cmCommandArgument_yypop_buffer_state (yyscan_t yyscanner );
302 static void cmCommandArgument_yyensure_buffer_stack (yyscan_t yyscanner );
303 static void cmCommandArgument_yy_load_buffer_state (yyscan_t yyscanner );
304 static void cmCommandArgument_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
306 #define YY_FLUSH_BUFFER cmCommandArgument_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
308 YY_BUFFER_STATE cmCommandArgument_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
309 YY_BUFFER_STATE cmCommandArgument_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
310 YY_BUFFER_STATE cmCommandArgument_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
312 void *cmCommandArgument_yyalloc (yy_size_t ,yyscan_t yyscanner );
313 void *cmCommandArgument_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
314 void cmCommandArgument_yyfree (void * ,yyscan_t yyscanner );
316 #define yy_new_buffer cmCommandArgument_yy_create_buffer
318 #define yy_set_interactive(is_interactive) \
320 if ( ! YY_CURRENT_BUFFER ){ \
321 cmCommandArgument_yyensure_buffer_stack (yyscanner); \
322 YY_CURRENT_BUFFER_LVALUE = \
323 cmCommandArgument_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
325 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
328 #define yy_set_bol(at_bol) \
330 if ( ! YY_CURRENT_BUFFER ){\
331 cmCommandArgument_yyensure_buffer_stack (yyscanner); \
332 YY_CURRENT_BUFFER_LVALUE = \
333 cmCommandArgument_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
335 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
338 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
340 /* Begin user sect3 */
342 #define cmCommandArgument_yywrap(n) 1
343 #define YY_SKIP_YYWRAP
345 typedef unsigned char YY_CHAR;
347 typedef int yy_state_type;
349 #define yytext_ptr yytext_r
351 static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
352 static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
353 static int yy_get_next_buffer (yyscan_t yyscanner );
354 static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
356 /* Done after the current pattern has been matched and before the
357 * corresponding action - sets up yytext.
359 #define YY_DO_BEFORE_ACTION \
360 yyg->yytext_ptr = yy_bp; \
361 yyleng = (size_t) (yy_cp - yy_bp); \
362 yyg->yy_hold_char = *yy_cp; \
364 yyg->yy_c_buf_p = yy_cp;
366 #define YY_NUM_RULES 14
367 #define YY_END_OF_BUFFER 15
368 /* This struct is not used in this scanner,
369 but its presence is necessary. */
372 flex_int32_t yy_verify;
375 static yyconst flex_int16_t yy_accept[30] =
377 0, 0, 0, 0, 0, 0, 15, 9, 10, 7,
378 6, 14, 11, 5, 12, 13, 9, 0, 0, 4,
379 7, 0, 8, 2, 0, 3, 0, 1, 0
382 static yyconst flex_int32_t yy_ec[256] =
384 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
385 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
386 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
387 1, 1, 1, 1, 1, 3, 1, 1, 1, 1,
388 1, 1, 4, 1, 4, 4, 4, 4, 4, 4,
389 4, 4, 4, 4, 4, 4, 4, 1, 1, 1,
390 1, 1, 1, 5, 4, 4, 4, 4, 6, 4,
391 4, 4, 4, 4, 4, 4, 4, 7, 4, 4,
392 4, 4, 4, 4, 4, 8, 4, 4, 4, 4,
393 1, 9, 1, 1, 4, 1, 4, 4, 4, 4,
395 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
396 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
397 4, 4, 10, 1, 11, 1, 1, 1, 1, 1,
398 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
399 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
400 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
401 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
402 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
403 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
404 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
406 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
407 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
408 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
409 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
410 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
414 static yyconst flex_int32_t yy_meta[12] =
416 1, 2, 3, 4, 3, 4, 4, 4, 3, 5,
420 static yyconst flex_int16_t yy_base[35] =
422 0, 0, 31, 30, 29, 28, 36, 0, 6, 16,
423 0, 41, 41, 41, 0, 41, 0, 22, 22, 41,
424 18, 18, 41, 41, 7, 41, 4, 41, 41, 20,
428 static yyconst flex_int16_t yy_def[35] =
430 29, 1, 1, 1, 1, 1, 29, 30, 31, 32,
431 33, 29, 29, 29, 34, 29, 30, 31, 18, 29,
432 32, 33, 29, 29, 18, 29, 18, 29, 0, 29,
436 static yyconst flex_int16_t yy_nxt[53] =
438 8, 8, 9, 10, 11, 10, 10, 10, 12, 13,
439 14, 19, 22, 28, 27, 20, 17, 17, 17, 17,
440 17, 17, 26, 17, 18, 18, 21, 21, 25, 21,
441 23, 24, 23, 23, 23, 29, 16, 16, 15, 15,
442 7, 29, 29, 29, 29, 29, 29, 29, 29, 29,
446 static yyconst flex_int16_t yy_chk[53] =
448 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
449 1, 9, 33, 27, 25, 9, 10, 10, 21, 21,
450 30, 30, 22, 30, 31, 31, 32, 32, 19, 32,
451 34, 18, 34, 34, 34, 7, 6, 5, 4, 3,
452 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
456 /* The intent behind this definition is that it'll catch
457 * any uses of REJECT which flex missed.
459 #define REJECT reject_used_but_not_detected
460 #define yymore() yymore_used_but_not_detected
461 #define YY_MORE_ADJ 0
462 #define YY_RESTORE_YY_MORE_OFFSET
463 #line 1 "cmCommandArgumentLexer.in.l"
464 #line 2 "cmCommandArgumentLexer.in.l"
465 /*============================================================================
466 CMake - Cross Platform Makefile Generator
467 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
469 Distributed under the OSI-approved BSD License (the "License");
470 see accompanying file Copyright.txt for details.
472 This software is distributed WITHOUT ANY WARRANTY; without even the
473 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
474 See the License for more information.
475 ============================================================================*/
478 This file must be translated to C and modified to build everywhere.
482 flex --prefix=cmCommandArgument_yy --header-file=cmCommandArgumentLexer.h -ocmCommandArgumentLexer.cxx cmCommandArgumentLexer.in.l
484 Modify cmCommandArgumentLexer.cxx:
485 - add #include "cmStandardIncludes.h" to top of file
486 - put header block at top of file
488 - remove "yyscanner" argument from these methods:
489 yy_fatal_error, cmCommandArgument_yyalloc, cmCommandArgument_yyrealloc, cmCommandArgument_yyfree
490 - remove all YY_BREAK lines occurring right after return statements
491 - change while ( 1 ) to for(;;)
492 - add "return 0;" to end of cmCommandArgument_yylex
494 Modify cmCommandArgumentLexer.h:
496 - remove the yy_init_globals function
497 - remove the block that includes unistd.h
498 - remove #line directives (avoids bogus warning on old Sun)
502 #include "cmStandardLexer.h"
504 #include "cmCommandArgumentParserHelper.h"
506 /* Replace the lexer input function. */
508 #define YY_INPUT(buf, result, max_size) \
509 { result = yyextra->LexInput(buf, max_size); }
511 /* Include the set of tokens from the parser. */
512 #include "cmCommandArgumentParserTokens.h"
514 /*--------------------------------------------------------------------------*/
517 #line 508 "cmCommandArgumentLexer.cxx"
523 #ifndef YY_NO_UNISTD_H
524 /* Special case for "unistd.h", since it is non-ANSI. We include it way
525 * down here because we want the user's section 1 to have been scanned first.
526 * The user has a chance to override it with an option.
531 #ifndef YY_EXTRA_TYPE
532 #define YY_EXTRA_TYPE void *
535 /* Holds the entire state of the reentrant scanner. */
539 /* User-defined. Not touched by flex. */
540 YY_EXTRA_TYPE yyextra_r;
542 /* The rest are the same as the globals declared in the non-reentrant scanner. */
543 FILE *yyin_r, *yyout_r;
544 size_t yy_buffer_stack_top; /**< index of top of stack. */
545 size_t yy_buffer_stack_max; /**< capacity of stack. */
546 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
553 int yy_did_buffer_switch_on_eof;
554 int yy_start_stack_ptr;
555 int yy_start_stack_depth;
557 yy_state_type yy_last_accepting_state;
558 char* yy_last_accepting_cpos;
567 }; /* end struct yyguts_t */
569 static int yy_init_globals (yyscan_t yyscanner );
571 int cmCommandArgument_yylex_init (yyscan_t* scanner);
573 int cmCommandArgument_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
575 /* Accessor methods to globals.
576 These are made visible to non-reentrant scanners for convenience. */
578 int cmCommandArgument_yylex_destroy (yyscan_t yyscanner );
580 int cmCommandArgument_yyget_debug (yyscan_t yyscanner );
582 void cmCommandArgument_yyset_debug (int debug_flag ,yyscan_t yyscanner );
584 YY_EXTRA_TYPE cmCommandArgument_yyget_extra (yyscan_t yyscanner );
586 void cmCommandArgument_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
588 FILE *cmCommandArgument_yyget_in (yyscan_t yyscanner );
590 void cmCommandArgument_yyset_in (FILE * in_str ,yyscan_t yyscanner );
592 FILE *cmCommandArgument_yyget_out (yyscan_t yyscanner );
594 void cmCommandArgument_yyset_out (FILE * out_str ,yyscan_t yyscanner );
596 int cmCommandArgument_yyget_leng (yyscan_t yyscanner );
598 char *cmCommandArgument_yyget_text (yyscan_t yyscanner );
600 int cmCommandArgument_yyget_lineno (yyscan_t yyscanner );
602 void cmCommandArgument_yyset_lineno (int line_number ,yyscan_t yyscanner );
604 /* Macros after this point can all be overridden by user definitions in
608 #ifndef YY_SKIP_YYWRAP
610 extern "C" int cmCommandArgument_yywrap (yyscan_t yyscanner );
612 extern int cmCommandArgument_yywrap (yyscan_t yyscanner );
617 static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
620 #ifdef YY_NEED_STRLEN
621 static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
627 static int yyinput (yyscan_t yyscanner );
629 static int input (yyscan_t yyscanner );
634 /* Amount of stuff to slurp up with each read. */
635 #ifndef YY_READ_BUF_SIZE
636 #define YY_READ_BUF_SIZE 8192
639 /* Copy whatever the last rule matched to the standard output. */
641 /* This used to be an fputs(), but since the string might contain NUL's,
642 * we now use fwrite().
644 #define ECHO fwrite( yytext, yyleng, 1, yyout )
647 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
648 * is returned in "result".
651 #define YY_INPUT(buf,result,max_size) \
652 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
656 for ( n = 0; n < max_size && \
657 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
660 buf[n++] = (char) c; \
661 if ( c == EOF && ferror( yyin ) ) \
662 YY_FATAL_ERROR( "input in flex scanner failed" ); \
668 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
670 if( errno != EINTR) \
672 YY_FATAL_ERROR( "input in flex scanner failed" ); \
683 /* No semi-colon after return; correct usage is to write "yyterminate();" -
684 * we don't want an extra ';' after the "return" because that will cause
685 * some compilers to complain about unreachable statements.
688 #define yyterminate() return YY_NULL
691 /* Number of entries by which start-condition stack grows. */
692 #ifndef YY_START_STACK_INCR
693 #define YY_START_STACK_INCR 25
696 /* Report a fatal error. */
697 #ifndef YY_FATAL_ERROR
698 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
701 /* end tables serialization structures and prototypes */
703 /* Default declaration of generated scanner - a define so the user can
704 * easily add parameters.
707 #define YY_DECL_IS_OURS 1
709 extern int cmCommandArgument_yylex (yyscan_t yyscanner);
711 #define YY_DECL int cmCommandArgument_yylex (yyscan_t yyscanner)
712 #endif /* !YY_DECL */
714 /* Code executed at the beginning of each rule, after yytext and yyleng
717 #ifndef YY_USER_ACTION
718 #define YY_USER_ACTION
721 /* Code executed at the end of each rule. */
723 #define YY_BREAK break;
726 #define YY_RULE_SETUP \
729 /** The main scanner function which does all the work.
733 register yy_state_type yy_current_state;
734 register char *yy_cp, *yy_bp;
736 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
738 #line 64 "cmCommandArgumentLexer.in.l"
741 #line 732 "cmCommandArgumentLexer.cxx"
751 if ( ! yyg->yy_start )
752 yyg->yy_start = 1; /* first start state */
760 if ( ! YY_CURRENT_BUFFER ) {
761 cmCommandArgument_yyensure_buffer_stack (yyscanner);
762 YY_CURRENT_BUFFER_LVALUE =
763 cmCommandArgument_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
766 cmCommandArgument_yy_load_buffer_state(yyscanner );
769 for(;;) /* loops until end-of-file is reached */
771 yy_cp = yyg->yy_c_buf_p;
773 /* Support of yytext. */
774 *yy_cp = yyg->yy_hold_char;
776 /* yy_bp points to the position in yy_ch_buf of the start of
781 yy_current_state = yyg->yy_start;
785 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
786 if ( yy_accept[yy_current_state] )
788 yyg->yy_last_accepting_state = yy_current_state;
789 yyg->yy_last_accepting_cpos = yy_cp;
791 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
793 yy_current_state = (int) yy_def[yy_current_state];
794 if ( yy_current_state >= 30 )
795 yy_c = yy_meta[(unsigned int) yy_c];
797 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
800 while ( yy_base[yy_current_state] != 41 );
803 yy_act = yy_accept[yy_current_state];
805 { /* have to back up */
806 yy_cp = yyg->yy_last_accepting_cpos;
807 yy_current_state = yyg->yy_last_accepting_state;
808 yy_act = yy_accept[yy_current_state];
813 do_action: /* This label is used only to access EOF actions. */
816 { /* beginning of action switch */
817 case 0: /* must back up */
818 /* undo the effects of YY_DO_BEFORE_ACTION */
819 *yy_cp = yyg->yy_hold_char;
820 yy_cp = yyg->yy_last_accepting_cpos;
821 yy_current_state = yyg->yy_last_accepting_state;
826 #line 66 "cmCommandArgumentLexer.in.l"
828 //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
829 yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2);
834 #line 72 "cmCommandArgumentLexer.in.l"
836 //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
837 yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2);
842 #line 78 "cmCommandArgumentLexer.in.l"
844 //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
845 yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2);
850 #line 84 "cmCommandArgumentLexer.in.l"
852 //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
853 //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
854 yylvalp->str = yyextra->DCURLYVariable;
859 #line 91 "cmCommandArgumentLexer.in.l"
861 //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
862 //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
863 yylvalp->str = yyextra->RCURLYVariable;
868 #line 98 "cmCommandArgumentLexer.in.l"
870 //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
871 //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
872 yylvalp->str = yyextra->ATVariable;
877 #line 105 "cmCommandArgumentLexer.in.l"
879 //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
880 yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
885 #line 111 "cmCommandArgumentLexer.in.l"
887 if ( !yyextra->HandleEscapeSymbol(yylvalp, *(yytext+1)) )
894 /* rule 9 can match eol */
896 #line 119 "cmCommandArgumentLexer.in.l"
898 //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
899 yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
904 #line 125 "cmCommandArgumentLexer.in.l"
906 //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
907 yylvalp->str = yyextra->DOLLARVariable;
912 #line 131 "cmCommandArgumentLexer.in.l"
914 //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
915 yylvalp->str = yyextra->LCURLYVariable;
920 #line 137 "cmCommandArgumentLexer.in.l"
922 //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
923 yylvalp->str = yyextra->BSLASHVariable;
928 #line 143 "cmCommandArgumentLexer.in.l"
930 //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
931 yylvalp->str = yyextra->BSLASHVariable;
936 #line 149 "cmCommandArgumentLexer.in.l"
939 #line 943 "cmCommandArgumentLexer.cxx"
940 case YY_STATE_EOF(INITIAL):
941 case YY_STATE_EOF(ESCAPES):
942 case YY_STATE_EOF(NOESCAPES):
945 case YY_END_OF_BUFFER:
947 /* Amount of text matched not including the EOB char. */
948 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
950 /* Undo the effects of YY_DO_BEFORE_ACTION. */
951 *yy_cp = yyg->yy_hold_char;
952 YY_RESTORE_YY_MORE_OFFSET
954 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
956 /* We're scanning a new file or input source. It's
957 * possible that this happened because the user
958 * just pointed yyin at a new source and called
959 * cmCommandArgument_yylex(). If so, then we have to assure
960 * consistency between YY_CURRENT_BUFFER and our
961 * globals. Here is the right place to do so, because
962 * this is the first action (other than possibly a
963 * back-up) that will match for the new input source.
965 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
966 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
967 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
970 /* Note that here we test for yy_c_buf_p "<=" to the position
971 * of the first EOB in the buffer, since yy_c_buf_p will
972 * already have been incremented past the NUL character
973 * (since all states make transitions on EOB to the
974 * end-of-buffer state). Contrast this with the test
977 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
978 { /* This was really a NUL. */
979 yy_state_type yy_next_state;
981 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
983 yy_current_state = yy_get_previous_state( yyscanner );
985 /* Okay, we're now positioned to make the NUL
986 * transition. We couldn't have
987 * yy_get_previous_state() go ahead and do it
988 * for us because it doesn't know how to deal
989 * with the possibility of jamming (and we don't
990 * want to build jamming into it because then it
991 * will run more slowly).
994 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
996 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1000 /* Consume the NUL. */
1001 yy_cp = ++yyg->yy_c_buf_p;
1002 yy_current_state = yy_next_state;
1008 yy_cp = yyg->yy_c_buf_p;
1009 goto yy_find_action;
1013 else switch ( yy_get_next_buffer( yyscanner ) )
1015 case EOB_ACT_END_OF_FILE:
1017 yyg->yy_did_buffer_switch_on_eof = 0;
1019 if ( cmCommandArgument_yywrap(yyscanner ) )
1021 /* Note: because we've taken care in
1022 * yy_get_next_buffer() to have set up
1023 * yytext, we can now set up
1024 * yy_c_buf_p so that if some total
1025 * hoser (like flex itself) wants to
1026 * call the scanner after we return the
1027 * YY_NULL, it'll still work - another
1028 * YY_NULL will get returned.
1030 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1032 yy_act = YY_STATE_EOF(YY_START);
1038 if ( ! yyg->yy_did_buffer_switch_on_eof )
1044 case EOB_ACT_CONTINUE_SCAN:
1046 yyg->yytext_ptr + yy_amount_of_matched_text;
1048 yy_current_state = yy_get_previous_state( yyscanner );
1050 yy_cp = yyg->yy_c_buf_p;
1051 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1054 case EOB_ACT_LAST_MATCH:
1056 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1058 yy_current_state = yy_get_previous_state( yyscanner );
1060 yy_cp = yyg->yy_c_buf_p;
1061 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1062 goto yy_find_action;
1069 "fatal flex scanner internal error--no action found" );
1070 } /* end of action switch */
1071 } /* end of scanning one token */
1072 return 0; /* this should not happend but it should silence a warning */
1073 } /* end of cmCommandArgument_yylex */
1075 /* yy_get_next_buffer - try to read in a new buffer
1077 * Returns a code representing an action:
1078 * EOB_ACT_LAST_MATCH -
1079 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1080 * EOB_ACT_END_OF_FILE - end of file
1082 static int yy_get_next_buffer (yyscan_t yyscanner)
1084 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1085 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1086 register char *source = yyg->yytext_ptr;
1087 register int number_to_move, i;
1090 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1092 "fatal flex scanner internal error--end of buffer missed" );
1094 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1095 { /* Don't try to fill the buffer, so this is an EOF. */
1096 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1098 /* We matched a single character, the EOB, so
1099 * treat this as a final EOF.
1101 return EOB_ACT_END_OF_FILE;
1106 /* We matched some text prior to the EOB, first
1109 return EOB_ACT_LAST_MATCH;
1113 /* Try to read more data. */
1115 /* First move last chars to start of buffer. */
1116 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
1118 for ( i = 0; i < number_to_move; ++i )
1119 *(dest++) = *(source++);
1121 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1122 /* don't do the read, it's not guaranteed to return an EOF,
1125 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1130 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1132 while ( num_to_read <= 0 )
1133 { /* Not enough room in the buffer - grow it. */
1135 /* just a shorter name for the current buffer */
1136 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1138 int yy_c_buf_p_offset =
1139 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1141 if ( b->yy_is_our_buffer )
1143 int new_size = b->yy_buf_size * 2;
1145 if ( new_size <= 0 )
1146 b->yy_buf_size += b->yy_buf_size / 8;
1148 b->yy_buf_size *= 2;
1150 b->yy_ch_buf = (char *)
1151 /* Include room in for 2 EOB chars. */
1152 cmCommandArgument_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
1155 /* Can't grow it, we don't own it. */
1158 if ( ! b->yy_ch_buf )
1160 "fatal error - scanner input buffer overflow" );
1162 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1164 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1169 if ( num_to_read > YY_READ_BUF_SIZE )
1170 num_to_read = YY_READ_BUF_SIZE;
1172 /* Read in more data. */
1173 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1174 yyg->yy_n_chars, (size_t) num_to_read );
1176 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1179 if ( yyg->yy_n_chars == 0 )
1181 if ( number_to_move == YY_MORE_ADJ )
1183 ret_val = EOB_ACT_END_OF_FILE;
1184 cmCommandArgument_yyrestart(yyin ,yyscanner);
1189 ret_val = EOB_ACT_LAST_MATCH;
1190 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1191 YY_BUFFER_EOF_PENDING;
1196 ret_val = EOB_ACT_CONTINUE_SCAN;
1198 if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1199 /* Extend the array by 50%, plus the number we really need. */
1200 yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1201 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) cmCommandArgument_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
1202 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1203 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1206 yyg->yy_n_chars += number_to_move;
1207 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1208 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1210 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1215 /* yy_get_previous_state - get the state just before the EOB char was reached */
1217 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1219 register yy_state_type yy_current_state;
1220 register char *yy_cp;
1221 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1223 yy_current_state = yyg->yy_start;
1225 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1227 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1228 if ( yy_accept[yy_current_state] )
1230 yyg->yy_last_accepting_state = yy_current_state;
1231 yyg->yy_last_accepting_cpos = yy_cp;
1233 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1235 yy_current_state = (int) yy_def[yy_current_state];
1236 if ( yy_current_state >= 30 )
1237 yy_c = yy_meta[(unsigned int) yy_c];
1239 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1242 return yy_current_state;
1245 /* yy_try_NUL_trans - try to make a transition on the NUL character
1248 * next_state = yy_try_NUL_trans( current_state );
1250 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
1252 register int yy_is_jam;
1253 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
1254 register char *yy_cp = yyg->yy_c_buf_p;
1256 register YY_CHAR yy_c = 1;
1257 if ( yy_accept[yy_current_state] )
1259 yyg->yy_last_accepting_state = yy_current_state;
1260 yyg->yy_last_accepting_cpos = yy_cp;
1262 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1264 yy_current_state = (int) yy_def[yy_current_state];
1265 if ( yy_current_state >= 30 )
1266 yy_c = yy_meta[(unsigned int) yy_c];
1268 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1269 yy_is_jam = (yy_current_state == 29);
1271 return yy_is_jam ? 0 : yy_current_state;
1276 static int yyinput (yyscan_t yyscanner)
1278 static int input (yyscan_t yyscanner)
1283 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1285 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1287 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1289 /* yy_c_buf_p now points to the character we want to return.
1290 * If this occurs *before* the EOB characters, then it's a
1291 * valid NUL; if not, then we've hit the end of the buffer.
1293 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1294 /* This was really a NUL. */
1295 *yyg->yy_c_buf_p = '\0';
1298 { /* need more input */
1299 int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
1302 switch ( yy_get_next_buffer( yyscanner ) )
1304 case EOB_ACT_LAST_MATCH:
1305 /* This happens because yy_g_n_b()
1306 * sees that we've accumulated a
1307 * token and flags that we need to
1308 * try matching the token before
1309 * proceeding. But for input(),
1310 * there's no matching to consider.
1311 * So convert the EOB_ACT_LAST_MATCH
1312 * to EOB_ACT_END_OF_FILE.
1315 /* Reset buffer status. */
1316 cmCommandArgument_yyrestart(yyin ,yyscanner);
1320 case EOB_ACT_END_OF_FILE:
1322 if ( cmCommandArgument_yywrap(yyscanner ) )
1325 if ( ! yyg->yy_did_buffer_switch_on_eof )
1328 return yyinput(yyscanner);
1330 return input(yyscanner);
1334 case EOB_ACT_CONTINUE_SCAN:
1335 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
1341 c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
1342 *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
1343 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
1347 #endif /* ifndef YY_NO_INPUT */
1349 /** Immediately switch to a different input stream.
1350 * @param input_file A readable stream.
1351 * @param yyscanner The scanner object.
1352 * @note This function does not reset the start condition to @c INITIAL .
1354 void cmCommandArgument_yyrestart (FILE * input_file , yyscan_t yyscanner)
1356 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1358 if ( ! YY_CURRENT_BUFFER ){
1359 cmCommandArgument_yyensure_buffer_stack (yyscanner);
1360 YY_CURRENT_BUFFER_LVALUE =
1361 cmCommandArgument_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1364 cmCommandArgument_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
1365 cmCommandArgument_yy_load_buffer_state(yyscanner );
1368 /** Switch to a different input buffer.
1369 * @param new_buffer The new input buffer.
1370 * @param yyscanner The scanner object.
1372 void cmCommandArgument_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1374 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1376 /* TODO. We should be able to replace this entire function body
1378 * cmCommandArgument_yypop_buffer_state();
1379 * cmCommandArgument_yypush_buffer_state(new_buffer);
1381 cmCommandArgument_yyensure_buffer_stack (yyscanner);
1382 if ( YY_CURRENT_BUFFER == new_buffer )
1385 if ( YY_CURRENT_BUFFER )
1387 /* Flush out information for old buffer. */
1388 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1389 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1390 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1393 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1394 cmCommandArgument_yy_load_buffer_state(yyscanner );
1396 /* We don't actually know whether we did this switch during
1397 * EOF (cmCommandArgument_yywrap()) processing, but the only time this flag
1398 * is looked at is after cmCommandArgument_yywrap() is called, so it's safe
1399 * to go ahead and always set it.
1401 yyg->yy_did_buffer_switch_on_eof = 1;
1404 static void cmCommandArgument_yy_load_buffer_state (yyscan_t yyscanner)
1406 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1407 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1408 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1409 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1410 yyg->yy_hold_char = *yyg->yy_c_buf_p;
1413 /** Allocate and initialize an input buffer state.
1414 * @param file A readable stream.
1415 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1416 * @param yyscanner The scanner object.
1417 * @return the allocated buffer state.
1419 YY_BUFFER_STATE cmCommandArgument_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
1423 b = (YY_BUFFER_STATE) cmCommandArgument_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
1425 YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yy_create_buffer()" );
1427 b->yy_buf_size = size;
1429 /* yy_ch_buf has to be 2 characters longer than the size given because
1430 * we need to put in 2 end-of-buffer characters.
1432 b->yy_ch_buf = (char *) cmCommandArgument_yyalloc(b->yy_buf_size + 2 ,yyscanner );
1433 if ( ! b->yy_ch_buf )
1434 YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yy_create_buffer()" );
1436 b->yy_is_our_buffer = 1;
1438 cmCommandArgument_yy_init_buffer(b,file ,yyscanner);
1443 /** Destroy the buffer.
1444 * @param b a buffer created with cmCommandArgument_yy_create_buffer()
1445 * @param yyscanner The scanner object.
1447 void cmCommandArgument_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1449 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1454 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1455 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1457 if ( b->yy_is_our_buffer )
1458 cmCommandArgument_yyfree((void *) b->yy_ch_buf ,yyscanner );
1460 cmCommandArgument_yyfree((void *) b ,yyscanner );
1464 extern int isatty (int );
1465 #endif /* __cplusplus */
1467 /* Initializes or reinitializes a buffer.
1468 * This function is sometimes called more than once on the same buffer,
1469 * such as during a cmCommandArgument_yyrestart() or at EOF.
1471 static void cmCommandArgument_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
1475 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1477 cmCommandArgument_yy_flush_buffer(b ,yyscanner);
1479 b->yy_input_file = file;
1480 b->yy_fill_buffer = 1;
1482 /* If b is the current buffer, then cmCommandArgument_yy_init_buffer was _probably_
1483 * called from cmCommandArgument_yyrestart() or through yy_get_next_buffer.
1484 * In that case, we don't want to reset the lineno or column.
1486 if (b != YY_CURRENT_BUFFER){
1487 b->yy_bs_lineno = 1;
1488 b->yy_bs_column = 0;
1491 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1496 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1497 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1498 * @param yyscanner The scanner object.
1500 void cmCommandArgument_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1502 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1508 /* We always need two end-of-buffer characters. The first causes
1509 * a transition to the end-of-buffer state. The second causes
1510 * a jam in that state.
1512 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1513 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1515 b->yy_buf_pos = &b->yy_ch_buf[0];
1518 b->yy_buffer_status = YY_BUFFER_NEW;
1520 if ( b == YY_CURRENT_BUFFER )
1521 cmCommandArgument_yy_load_buffer_state(yyscanner );
1524 /** Pushes the new state onto the stack. The new state becomes
1525 * the current state. This function will allocate the stack
1527 * @param new_buffer The new state.
1528 * @param yyscanner The scanner object.
1530 void cmCommandArgument_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1532 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1533 if (new_buffer == NULL)
1536 cmCommandArgument_yyensure_buffer_stack(yyscanner);
1538 /* This block is copied from cmCommandArgument_yy_switch_to_buffer. */
1539 if ( YY_CURRENT_BUFFER )
1541 /* Flush out information for old buffer. */
1542 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1543 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1544 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1547 /* Only push if top exists. Otherwise, replace top. */
1548 if (YY_CURRENT_BUFFER)
1549 yyg->yy_buffer_stack_top++;
1550 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1552 /* copied from cmCommandArgument_yy_switch_to_buffer. */
1553 cmCommandArgument_yy_load_buffer_state(yyscanner );
1554 yyg->yy_did_buffer_switch_on_eof = 1;
1557 /** Removes and deletes the top of the stack, if present.
1558 * The next element becomes the new top.
1559 * @param yyscanner The scanner object.
1561 void cmCommandArgument_yypop_buffer_state (yyscan_t yyscanner)
1563 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1564 if (!YY_CURRENT_BUFFER)
1567 cmCommandArgument_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
1568 YY_CURRENT_BUFFER_LVALUE = NULL;
1569 if (yyg->yy_buffer_stack_top > 0)
1570 --yyg->yy_buffer_stack_top;
1572 if (YY_CURRENT_BUFFER) {
1573 cmCommandArgument_yy_load_buffer_state(yyscanner );
1574 yyg->yy_did_buffer_switch_on_eof = 1;
1578 /* Allocates the stack if it does not exist.
1579 * Guarantees space for at least one push.
1581 static void cmCommandArgument_yyensure_buffer_stack (yyscan_t yyscanner)
1584 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1586 if (!yyg->yy_buffer_stack) {
1588 /* First allocation is just for 2 elements, since we don't know if this
1589 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1590 * immediate realloc on the next call.
1593 yyg->yy_buffer_stack = (struct yy_buffer_state**)cmCommandArgument_yyalloc
1594 (num_to_alloc * sizeof(struct yy_buffer_state*)
1596 if ( ! yyg->yy_buffer_stack )
1597 YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yyensure_buffer_stack()" );
1599 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1601 yyg->yy_buffer_stack_max = num_to_alloc;
1602 yyg->yy_buffer_stack_top = 0;
1606 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
1608 /* Increase the buffer to prepare for a possible push. */
1609 int grow_size = 8 /* arbitrary grow size */;
1611 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
1612 yyg->yy_buffer_stack = (struct yy_buffer_state**)cmCommandArgument_yyrealloc
1613 (yyg->yy_buffer_stack,
1614 num_to_alloc * sizeof(struct yy_buffer_state*)
1616 if ( ! yyg->yy_buffer_stack )
1617 YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yyensure_buffer_stack()" );
1619 /* zero only the new slots.*/
1620 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
1621 yyg->yy_buffer_stack_max = num_to_alloc;
1625 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1626 * @param base the character buffer
1627 * @param size the size in bytes of the character buffer
1628 * @param yyscanner The scanner object.
1629 * @return the newly allocated buffer state object.
1631 YY_BUFFER_STATE cmCommandArgument_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
1636 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1637 base[size-1] != YY_END_OF_BUFFER_CHAR )
1638 /* They forgot to leave room for the EOB's. */
1641 b = (YY_BUFFER_STATE) cmCommandArgument_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
1643 YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yy_scan_buffer()" );
1645 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1646 b->yy_buf_pos = b->yy_ch_buf = base;
1647 b->yy_is_our_buffer = 0;
1648 b->yy_input_file = 0;
1649 b->yy_n_chars = b->yy_buf_size;
1650 b->yy_is_interactive = 0;
1652 b->yy_fill_buffer = 0;
1653 b->yy_buffer_status = YY_BUFFER_NEW;
1655 cmCommandArgument_yy_switch_to_buffer(b ,yyscanner );
1660 /** Setup the input buffer state to scan a string. The next call to cmCommandArgument_yylex() will
1661 * scan from a @e copy of @a str.
1662 * @param yystr a NUL-terminated string to scan
1663 * @param yyscanner The scanner object.
1664 * @return the newly allocated buffer state object.
1665 * @note If you want to scan bytes that may contain NUL values, then use
1666 * cmCommandArgument_yy_scan_bytes() instead.
1668 YY_BUFFER_STATE cmCommandArgument_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
1671 return cmCommandArgument_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
1674 /** Setup the input buffer state to scan the given bytes. The next call to cmCommandArgument_yylex() will
1675 * scan from a @e copy of @a yybytes.
1676 * @param yybytes the byte buffer to scan
1677 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1678 * @param yyscanner The scanner object.
1679 * @return the newly allocated buffer state object.
1681 YY_BUFFER_STATE cmCommandArgument_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
1688 /* Get memory for full buffer, including space for trailing EOB's. */
1689 n = _yybytes_len + 2;
1690 buf = (char *) cmCommandArgument_yyalloc(n ,yyscanner );
1692 YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yy_scan_bytes()" );
1694 for ( i = 0; i < _yybytes_len; ++i )
1695 buf[i] = yybytes[i];
1697 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1699 b = cmCommandArgument_yy_scan_buffer(buf,n ,yyscanner);
1701 YY_FATAL_ERROR( "bad buffer in cmCommandArgument_yy_scan_bytes()" );
1703 /* It's okay to grow etc. this buffer, and we should throw it
1704 * away when we're done.
1706 b->yy_is_our_buffer = 1;
1711 #ifndef YY_EXIT_FAILURE
1712 #define YY_EXIT_FAILURE 2
1715 static void yy_fatal_error (yyconst char* msg , yyscan_t)
1717 (void) fprintf( stderr, "%s\n", msg );
1718 exit( YY_EXIT_FAILURE );
1721 /* Redefine yyless() so it works in section 3 code. */
1727 /* Undo effects of setting up yytext. */ \
1728 int yyless_macro_arg = (n); \
1729 YY_LESS_LINENO(yyless_macro_arg);\
1730 yytext[yyleng] = yyg->yy_hold_char; \
1731 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
1732 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
1733 *yyg->yy_c_buf_p = '\0'; \
1734 yyleng = yyless_macro_arg; \
1738 /* Accessor methods (get/set functions) to struct members. */
1740 /** Get the user-defined data for this scanner.
1741 * @param yyscanner The scanner object.
1743 YY_EXTRA_TYPE cmCommandArgument_yyget_extra (yyscan_t yyscanner)
1745 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1749 /** Get the current line number.
1750 * @param yyscanner The scanner object.
1752 int cmCommandArgument_yyget_lineno (yyscan_t yyscanner)
1754 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1756 if (! YY_CURRENT_BUFFER)
1762 /** Get the current column number.
1763 * @param yyscanner The scanner object.
1765 int cmCommandArgument_yyget_column (yyscan_t yyscanner)
1767 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1769 if (! YY_CURRENT_BUFFER)
1775 /** Get the input stream.
1776 * @param yyscanner The scanner object.
1778 FILE *cmCommandArgument_yyget_in (yyscan_t yyscanner)
1780 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1784 /** Get the output stream.
1785 * @param yyscanner The scanner object.
1787 FILE *cmCommandArgument_yyget_out (yyscan_t yyscanner)
1789 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1793 /** Get the length of the current token.
1794 * @param yyscanner The scanner object.
1796 int cmCommandArgument_yyget_leng (yyscan_t yyscanner)
1798 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1802 /** Get the current token.
1803 * @param yyscanner The scanner object.
1806 char *cmCommandArgument_yyget_text (yyscan_t yyscanner)
1808 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1812 /** Set the user-defined data. This data is never touched by the scanner.
1813 * @param user_defined The data to be associated with this scanner.
1814 * @param yyscanner The scanner object.
1816 void cmCommandArgument_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
1818 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1819 yyextra = user_defined ;
1822 /** Set the current line number.
1823 * @param line_number
1824 * @param yyscanner The scanner object.
1826 void cmCommandArgument_yyset_lineno (int line_number , yyscan_t yyscanner)
1828 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1830 /* lineno is only valid if an input buffer exists. */
1831 if (! YY_CURRENT_BUFFER )
1832 yy_fatal_error( "cmCommandArgument_yyset_lineno called with no buffer" , yyscanner);
1834 yylineno = line_number;
1837 /** Set the current column.
1839 * @param yyscanner The scanner object.
1841 void cmCommandArgument_yyset_column (int column_no , yyscan_t yyscanner)
1843 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1845 /* column is only valid if an input buffer exists. */
1846 if (! YY_CURRENT_BUFFER )
1847 yy_fatal_error( "cmCommandArgument_yyset_column called with no buffer" , yyscanner);
1849 yycolumn = column_no;
1852 /** Set the input stream. This does not discard the current
1854 * @param in_str A readable stream.
1855 * @param yyscanner The scanner object.
1856 * @see cmCommandArgument_yy_switch_to_buffer
1858 void cmCommandArgument_yyset_in (FILE * in_str , yyscan_t yyscanner)
1860 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1864 void cmCommandArgument_yyset_out (FILE * out_str , yyscan_t yyscanner)
1866 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1870 int cmCommandArgument_yyget_debug (yyscan_t yyscanner)
1872 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1873 return yy_flex_debug;
1876 void cmCommandArgument_yyset_debug (int bdebug , yyscan_t yyscanner)
1878 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1879 yy_flex_debug = bdebug ;
1882 /* Accessor methods for yylval and yylloc */
1884 /* User-visible API */
1886 /* cmCommandArgument_yylex_init is special because it creates the scanner itself, so it is
1887 * the ONLY reentrant function that doesn't take the scanner as the last argument.
1888 * That's why we explicitly handle the declaration, instead of using our macros.
1891 int cmCommandArgument_yylex_init(yyscan_t* ptr_yy_globals)
1894 if (ptr_yy_globals == NULL){
1899 *ptr_yy_globals = (yyscan_t) cmCommandArgument_yyalloc ( sizeof( struct yyguts_t ), NULL );
1901 if (*ptr_yy_globals == NULL){
1906 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
1907 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
1909 return yy_init_globals ( *ptr_yy_globals );
1912 /* cmCommandArgument_yylex_init_extra has the same functionality as cmCommandArgument_yylex_init, but follows the
1913 * convention of taking the scanner as the last argument. Note however, that
1914 * this is a *pointer* to a scanner, as it will be allocated by this call (and
1915 * is the reason, too, why this function also must handle its own declaration).
1916 * The user defined value in the first argument will be available to cmCommandArgument_yyalloc in
1917 * the yyextra field.
1920 int cmCommandArgument_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
1923 struct yyguts_t dummy_yyguts;
1925 cmCommandArgument_yyset_extra (yy_user_defined, &dummy_yyguts);
1927 if (ptr_yy_globals == NULL){
1932 *ptr_yy_globals = (yyscan_t) cmCommandArgument_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
1934 if (*ptr_yy_globals == NULL){
1939 /* By setting to 0xAA, we expose bugs in
1940 yy_init_globals. Leave at 0x00 for releases. */
1941 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
1943 cmCommandArgument_yyset_extra (yy_user_defined, *ptr_yy_globals);
1945 return yy_init_globals ( *ptr_yy_globals );
1948 static int yy_init_globals (yyscan_t yyscanner)
1950 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1951 /* Initialization is the same as for the non-reentrant scanner.
1952 * This function is called from cmCommandArgument_yylex_destroy(), so don't allocate here.
1955 yyg->yy_buffer_stack = 0;
1956 yyg->yy_buffer_stack_top = 0;
1957 yyg->yy_buffer_stack_max = 0;
1958 yyg->yy_c_buf_p = (char *) 0;
1962 yyg->yy_start_stack_ptr = 0;
1963 yyg->yy_start_stack_depth = 0;
1964 yyg->yy_start_stack = NULL;
1966 /* Defined in main.c */
1975 /* For future reference: Set errno on error, since we are called by
1976 * cmCommandArgument_yylex_init()
1981 /* cmCommandArgument_yylex_destroy is for both reentrant and non-reentrant scanners. */
1982 int cmCommandArgument_yylex_destroy (yyscan_t yyscanner)
1984 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1986 /* Pop the buffer stack, destroying each element. */
1987 while(YY_CURRENT_BUFFER){
1988 cmCommandArgument_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
1989 YY_CURRENT_BUFFER_LVALUE = NULL;
1990 cmCommandArgument_yypop_buffer_state(yyscanner);
1993 /* Destroy the stack itself. */
1994 cmCommandArgument_yyfree(yyg->yy_buffer_stack ,yyscanner);
1995 yyg->yy_buffer_stack = NULL;
1997 /* Destroy the start condition stack. */
1998 cmCommandArgument_yyfree(yyg->yy_start_stack ,yyscanner );
1999 yyg->yy_start_stack = NULL;
2001 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2002 * cmCommandArgument_yylex() is called, initialization will occur. */
2003 yy_init_globals( yyscanner);
2005 /* Destroy the main struct (reentrant only). */
2006 cmCommandArgument_yyfree ( yyscanner , yyscanner );
2012 * Internal utility routines.
2016 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
2019 for ( i = 0; i < n; ++i )
2024 #ifdef YY_NEED_STRLEN
2025 static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
2028 for ( n = 0; s[n]; ++n )
2035 void *cmCommandArgument_yyalloc (yy_size_t size , yyscan_t)
2037 return (void *) malloc( size );
2040 void *cmCommandArgument_yyrealloc (void * ptr, yy_size_t size , yyscan_t)
2042 /* The cast to (char *) in the following accommodates both
2043 * implementations that use char* generic pointers, and those
2044 * that use void* generic pointers. It works with the latter
2045 * because both ANSI C and C++ allow castless assignment from
2046 * any pointer type to void*, and deal with argument conversions
2047 * as though doing an assignment.
2049 return (void *) realloc( (char *) ptr, size );
2052 void cmCommandArgument_yyfree (void * ptr , yyscan_t)
2054 free( (char *) ptr ); /* see cmCommandArgument_yyrealloc() for (char *) cast */
2057 #define YYTABLES_NAME "yytables"
2059 #line 149 "cmCommandArgumentLexer.in.l"
2063 /*--------------------------------------------------------------------------*/
2064 void cmCommandArgument_SetupEscapes(yyscan_t yyscanner, bool noEscapes)
2066 /* Hack into the internal flex-generated scanner to set the state. */
2067 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;