Imported Upstream version 2.8.9
[platform/upstream/cmake.git] / Source / cmListFileLexer.c
1 #line 2 "cmListFileLexer.c"
2
3 #line 4 "cmListFileLexer.c"
4
5 #define  YY_INT_ALIGNED short int
6
7 /* A lexical scanner generated by flex */
8
9 #define FLEX_SCANNER
10 #define YY_FLEX_MAJOR_VERSION 2
11 #define YY_FLEX_MINOR_VERSION 5
12 #define YY_FLEX_SUBMINOR_VERSION 31
13 #if YY_FLEX_SUBMINOR_VERSION > 0
14 #define FLEX_BETA
15 #endif
16
17 /* First, we deal with  platform-specific or compiler-specific issues. */
18
19 /* begin standard C headers. */
20 #include <stdio.h>
21 #include <string.h>
22 #include <errno.h>
23 #include <stdlib.h>
24
25 /* end standard C headers. */
26
27 /* flex integer type definitions */
28
29 #ifndef FLEXINT_H
30 #define FLEXINT_H
31
32 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33
34 #if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
35 #include <inttypes.h>
36 typedef int8_t flex_int8_t;
37 typedef uint8_t flex_uint8_t;
38 typedef int16_t flex_int16_t;
39 typedef uint16_t flex_uint16_t;
40 typedef int32_t flex_int32_t;
41 typedef uint32_t flex_uint32_t;
42 #else
43 typedef signed char flex_int8_t;
44 typedef short int flex_int16_t;
45 typedef int flex_int32_t;
46 typedef unsigned char flex_uint8_t; 
47 typedef unsigned short int flex_uint16_t;
48 typedef unsigned int flex_uint32_t;
49 #endif /* ! C99 */
50
51 /* Limits of integral types. */
52 #ifndef INT8_MIN
53 #define INT8_MIN               (-128)
54 #endif
55 #ifndef INT16_MIN
56 #define INT16_MIN              (-32767-1)
57 #endif
58 #ifndef INT32_MIN
59 #define INT32_MIN              (-2147483647-1)
60 #endif
61 #ifndef INT8_MAX
62 #define INT8_MAX               (127)
63 #endif
64 #ifndef INT16_MAX
65 #define INT16_MAX              (32767)
66 #endif
67 #ifndef INT32_MAX
68 #define INT32_MAX              (2147483647)
69 #endif
70 #ifndef UINT8_MAX
71 #define UINT8_MAX              (255U)
72 #endif
73 #ifndef UINT16_MAX
74 #define UINT16_MAX             (65535U)
75 #endif
76 #ifndef UINT32_MAX
77 #define UINT32_MAX             (4294967295U)
78 #endif
79
80 #endif /* ! FLEXINT_H */
81
82 #ifdef __cplusplus
83
84 /* The "const" storage-class-modifier is valid. */
85 #define YY_USE_CONST
86
87 #else   /* ! __cplusplus */
88
89 #if __STDC__
90
91 #define YY_USE_CONST
92
93 #endif  /* __STDC__ */
94 #endif  /* ! __cplusplus */
95
96 #ifdef YY_USE_CONST
97 #define yyconst const
98 #else
99 #define yyconst
100 #endif
101
102 /* Returned upon end-of-file. */
103 #define YY_NULL 0
104
105 /* Promotes a possibly negative, possibly signed char to an unsigned
106  * integer for use as an array index.  If the signed char is negative,
107  * we want to instead treat it as an 8-bit unsigned char, hence the
108  * double cast.
109  */
110 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
111
112 /* An opaque pointer. */
113 #ifndef YY_TYPEDEF_YY_SCANNER_T
114 #define YY_TYPEDEF_YY_SCANNER_T
115 typedef void* yyscan_t;
116 #endif
117
118 /* For convenience, these vars (plus the bison vars far below)
119    are macros in the reentrant scanner. */
120 #define yyin yyg->yyin_r
121 #define yyout yyg->yyout_r
122 #define yyextra yyg->yyextra_r
123 #define yyleng yyg->yyleng_r
124 #define yytext yyg->yytext_r
125 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
126 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
127 #define yy_flex_debug yyg->yy_flex_debug_r
128
129 int cmListFileLexer_yylex_init (yyscan_t* scanner);
130
131 /* Enter a start condition.  This macro really ought to take a parameter,
132  * but we do it the disgusting crufty way forced on us by the ()-less
133  * definition of BEGIN.
134  */
135 #define BEGIN yyg->yy_start = 1 + 2 *
136
137 /* Translate the current start state into a value that can be later handed
138  * to BEGIN to return to the state.  The YYSTATE alias is for lex
139  * compatibility.
140  */
141 #define YY_START ((yyg->yy_start - 1) / 2)
142 #define YYSTATE YY_START
143
144 /* Action number for EOF rule of a given start state. */
145 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
146
147 /* Special action meaning "start processing a new file". */
148 #define YY_NEW_FILE cmListFileLexer_yyrestart(yyin ,yyscanner )
149
150 #define YY_END_OF_BUFFER_CHAR 0
151
152 /* Size of default input buffer. */
153 #ifndef YY_BUF_SIZE
154 #define YY_BUF_SIZE 16384
155 #endif
156
157 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
158 #define YY_TYPEDEF_YY_BUFFER_STATE
159 typedef struct yy_buffer_state *YY_BUFFER_STATE;
160 #endif
161
162 #define EOB_ACT_CONTINUE_SCAN 0
163 #define EOB_ACT_END_OF_FILE 1
164 #define EOB_ACT_LAST_MATCH 2
165
166     /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
167      *       access to the local variable yy_act. Since yyless() is a macro, it would break
168      *       existing scanners that call yyless() from OUTSIDE cmListFileLexer_yylex. 
169      *       One obvious solution it to make yy_act a global. I tried that, and saw
170      *       a 5% performance hit in a non-yylineno scanner, because yy_act is
171      *       normally declared as a register variable-- so it is not worth it.
172      */
173     #define  YY_LESS_LINENO(n) \
174             do { \
175                 int yyl;\
176                 for ( yyl = n; yyl < yyleng; ++yyl )\
177                     if ( yytext[yyl] == '\n' )\
178                         --yylineno;\
179             }while(0)
180     
181 /* Return all but the first "n" matched characters back to the input stream. */
182 #define yyless(n) \
183         do \
184                 { \
185                 /* Undo effects of setting up yytext. */ \
186         int yyless_macro_arg = (n); \
187         YY_LESS_LINENO(yyless_macro_arg);\
188                 *yy_cp = yyg->yy_hold_char; \
189                 YY_RESTORE_YY_MORE_OFFSET \
190                 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
191                 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
192                 } \
193         while ( 0 )
194
195 /* The following is because we cannot portably get our hands on size_t
196  * (without autoconf's help, which isn't available because we want
197  * flex-generated scanners to compile on their own).
198  */
199
200 #ifndef YY_TYPEDEF_YY_SIZE_T
201 #define YY_TYPEDEF_YY_SIZE_T
202 typedef unsigned int yy_size_t;
203 #endif
204
205 #ifndef YY_STRUCT_YY_BUFFER_STATE
206 #define YY_STRUCT_YY_BUFFER_STATE
207 struct yy_buffer_state
208         {
209         FILE *yy_input_file;
210
211         char *yy_ch_buf;                /* input buffer */
212         char *yy_buf_pos;               /* current position in input buffer */
213
214         /* Size of input buffer in bytes, not including room for EOB
215          * characters.
216          */
217         yy_size_t yy_buf_size;
218
219         /* Number of characters read into yy_ch_buf, not including EOB
220          * characters.
221          */
222         int yy_n_chars;
223
224         /* Whether we "own" the buffer - i.e., we know we created it,
225          * and can realloc() it to grow it, and should free() it to
226          * delete it.
227          */
228         int yy_is_our_buffer;
229
230         /* Whether this is an "interactive" input source; if so, and
231          * if we're using stdio for input, then we want to use getc()
232          * instead of fread(), to make sure we stop fetching input after
233          * each newline.
234          */
235         int yy_is_interactive;
236
237         /* Whether we're considered to be at the beginning of a line.
238          * If so, '^' rules will be active on the next match, otherwise
239          * not.
240          */
241         int yy_at_bol;
242
243     int yy_bs_lineno; /**< The line count. */
244     int yy_bs_column; /**< The column count. */
245     
246         /* Whether to try to fill the input buffer when we reach the
247          * end of it.
248          */
249         int yy_fill_buffer;
250
251         int yy_buffer_status;
252
253 #define YY_BUFFER_NEW 0
254 #define YY_BUFFER_NORMAL 1
255         /* When an EOF's been seen but there's still some text to process
256          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
257          * shouldn't try reading from the input source any more.  We might
258          * still have a bunch of tokens to match, though, because of
259          * possible backing-up.
260          *
261          * When we actually see the EOF, we change the status to "new"
262          * (via cmListFileLexer_yyrestart()), so that the user can continue scanning by
263          * just pointing yyin at a new input file.
264          */
265 #define YY_BUFFER_EOF_PENDING 2
266
267         };
268 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
269
270 /* We provide macros for accessing buffer states in case in the
271  * future we want to put the buffer states in a more general
272  * "scanner state".
273  *
274  * Returns the top of the stack, or NULL.
275  */
276 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
277                           ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
278                           : NULL)
279
280 /* Same as previous macro, but useful when we know that the buffer stack is not
281  * NULL or when we need an lvalue. For internal use only.
282  */
283 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
284
285 void cmListFileLexer_yyrestart (FILE *input_file ,yyscan_t yyscanner );
286 void cmListFileLexer_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
287 YY_BUFFER_STATE cmListFileLexer_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
288 void cmListFileLexer_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
289 void cmListFileLexer_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
290 void cmListFileLexer_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
291 void cmListFileLexer_yypop_buffer_state (yyscan_t yyscanner );
292
293 static void cmListFileLexer_yyensure_buffer_stack (yyscan_t yyscanner );
294 static void cmListFileLexer_yy_load_buffer_state (yyscan_t yyscanner );
295 static void cmListFileLexer_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
296
297 #define YY_FLUSH_BUFFER cmListFileLexer_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
298
299 YY_BUFFER_STATE cmListFileLexer_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
300 YY_BUFFER_STATE cmListFileLexer_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
301 YY_BUFFER_STATE cmListFileLexer_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
302
303 void *cmListFileLexer_yyalloc (yy_size_t ,yyscan_t yyscanner );
304 void *cmListFileLexer_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
305 void cmListFileLexer_yyfree (void * ,yyscan_t yyscanner );
306
307 #define yy_new_buffer cmListFileLexer_yy_create_buffer
308
309 #define yy_set_interactive(is_interactive) \
310         { \
311         if ( ! YY_CURRENT_BUFFER ){ \
312         cmListFileLexer_yyensure_buffer_stack (yyscanner); \
313                 YY_CURRENT_BUFFER_LVALUE =    \
314             cmListFileLexer_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
315         } \
316         YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
317         }
318
319 #define yy_set_bol(at_bol) \
320         { \
321         if ( ! YY_CURRENT_BUFFER ){\
322         cmListFileLexer_yyensure_buffer_stack (yyscanner); \
323                 YY_CURRENT_BUFFER_LVALUE =    \
324             cmListFileLexer_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
325         } \
326         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
327         }
328
329 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
330
331 /* Begin user sect3 */
332
333 #define cmListFileLexer_yywrap(n) 1
334 #define YY_SKIP_YYWRAP
335
336 typedef unsigned char YY_CHAR;
337
338 typedef int yy_state_type;
339
340 #define yytext_ptr yytext_r
341
342 static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
343 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  ,yyscan_t yyscanner);
344 static int yy_get_next_buffer (yyscan_t yyscanner );
345 static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
346
347 /* Done after the current pattern has been matched and before the
348  * corresponding action - sets up yytext.
349  */
350 #define YY_DO_BEFORE_ACTION \
351         yyg->yytext_ptr = yy_bp; \
352         yyleng = (size_t) (yy_cp - yy_bp); \
353         yyg->yy_hold_char = *yy_cp; \
354         *yy_cp = '\0'; \
355         yyg->yy_c_buf_p = yy_cp;
356
357 #define YY_NUM_RULES 14
358 #define YY_END_OF_BUFFER 15
359 /* This struct is not used in this scanner,
360    but its presence is necessary. */
361 struct yy_trans_info
362         {
363         flex_int32_t yy_verify;
364         flex_int32_t yy_nxt;
365         };
366 static yyconst flex_int16_t yy_accept[39] =
367     {   0,
368         0,    0,    0,    0,   15,    6,   12,    1,    7,    2,
369         6,    3,    4,    6,   13,    8,    9,   10,   11,    6,
370         0,    6,    0,    2,    0,    5,    6,    8,    0,    0,
371         0,    0,    0,    0,    0,    0,    0,    0
372     } ;
373
374 static yyconst flex_int32_t yy_ec[256] =
375     {   0,
376         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
377         1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
378         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
379         1,    2,    1,    5,    6,    7,    1,    1,    1,    8,
380         9,    1,    1,    1,    1,    1,    1,   10,   10,   10,
381        10,   10,   10,   10,   10,   10,   10,    1,    1,    1,
382         1,    1,    1,    1,   11,   11,   11,   11,   11,   11,
383        11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
384        11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
385         1,   12,    1,    1,   11,    1,   11,   11,   11,   11,
386
387        11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
388        11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
389        11,   11,    1,    1,    1,    1,    1,    1,    1,    1,
390         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
391         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
392         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
393         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
394         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
395         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
396         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
397
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
404     } ;
405
406 static yyconst flex_int32_t yy_meta[13] =
407     {   0,
408         1,    1,    2,    1,    3,    1,    1,    1,    4,    4,
409         4,    1
410     } ;
411
412 static yyconst flex_int16_t yy_base[48] =
413     {   0,
414         0,    0,   10,   20,   34,   32,   89,   89,   89,    0,
415        23,   89,   89,   35,    0,   18,   89,   89,   44,    0,
416        49,   21,    0,    0,   19,    0,    0,   15,   59,    0,
417        18,    0,   15,   12,   11,   10,    9,   89,   64,   68,
418        72,   76,   80,   13,   84,   12,   10
419     } ;
420
421 static yyconst flex_int16_t yy_def[48] =
422     {   0,
423        38,    1,   39,   39,   38,   38,   38,   38,   38,   40,
424         6,   38,   38,    6,   41,   42,   38,   38,   42,    6,
425        38,    6,   43,   40,   44,   14,    6,   42,   42,   21,
426        21,   45,   46,   44,   47,   46,   47,    0,   38,   38,
427        38,   38,   38,   38,   38,   38,   38
428     } ;
429
430 static yyconst flex_int16_t yy_nxt[102] =
431     {   0,
432         6,    7,    8,    7,    9,   10,   11,   12,   13,    6,
433        14,   15,   17,   37,   18,   36,   34,   30,   20,   30,
434        27,   19,   17,   20,   18,   35,   29,   27,   33,   29,
435        25,   19,   20,   38,   38,   38,   21,   38,   22,   38,
436        38,   20,   20,   23,   26,   26,   28,   38,   28,   30,
437        30,   38,   38,   20,   38,   31,   38,   38,   30,   30,
438        32,   28,   38,   28,   16,   16,   16,   16,   24,   38,
439        24,   24,   27,   38,   27,   27,   28,   38,   38,   28,
440        20,   38,   20,   20,   30,   38,   30,   30,    5,   38,
441        38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
442
443        38
444     } ;
445
446 static yyconst flex_int16_t yy_chk[102] =
447     {   0,
448         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
449         1,    1,    3,   47,    3,   46,   44,   37,   36,   35,
450        34,    3,    4,   33,    4,   31,   28,   25,   22,   16,
451        11,    4,    6,    5,    0,    0,    6,    0,    6,    0,
452         0,    6,    6,    6,   14,   14,   19,    0,   19,   21,
453        21,    0,    0,   21,    0,   21,    0,    0,   21,   21,
454        21,   29,    0,   29,   39,   39,   39,   39,   40,    0,
455        40,   40,   41,    0,   41,   41,   42,    0,    0,   42,
456        43,    0,   43,   43,   45,    0,   45,   45,   38,   38,
457        38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
458
459        38
460     } ;
461
462 /* Table of booleans, true if rule could match eol. */
463 static yyconst flex_int32_t yy_rule_can_match_eol[15] =
464     {   0,
465 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0,     };
466
467 /* The intent behind this definition is that it'll catch
468  * any uses of REJECT which flex missed.
469  */
470 #define REJECT reject_used_but_not_detected
471 #define yymore() yymore_used_but_not_detected
472 #define YY_MORE_ADJ 0
473 #define YY_RESTORE_YY_MORE_OFFSET
474 #line 1 "cmListFileLexer.in.l"
475 #line 2 "cmListFileLexer.in.l"
476 /*============================================================================
477   CMake - Cross Platform Makefile Generator
478   Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
479
480   Distributed under the OSI-approved BSD License (the "License");
481   see accompanying file Copyright.txt for details.
482
483   This software is distributed WITHOUT ANY WARRANTY; without even the
484   implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
485   See the License for more information.
486 ============================================================================*/
487 /*
488
489 This file must be translated to C and modified to build everywhere.
490
491 Run flex like this:
492
493   flex --prefix=cmListFileLexer_yy -ocmListFileLexer.c cmListFileLexer.in.l
494
495 Modify cmListFileLexer.c:
496   - remove TABs
497   - remove the yyunput function
498   - add a statement "(void)yyscanner;" to the top of these methods:
499       yy_fatal_error, cmListFileLexer_yyalloc, cmListFileLexer_yyrealloc, cmListFileLexer_yyfree
500   - remove all YY_BREAK lines occurring right after return statements
501   - remove the isatty forward declaration
502
503 */
504
505 #include "cmStandardLexer.h"
506
507 /* Setup the proper cmListFileLexer_yylex declaration.  */
508 #define YY_EXTRA_TYPE cmListFileLexer*
509 #define YY_DECL int cmListFileLexer_yylex (yyscan_t yyscanner, cmListFileLexer* lexer)
510
511 #include "cmListFileLexer.h"
512
513 /*--------------------------------------------------------------------------*/
514 struct cmListFileLexer_s
515 {
516   cmListFileLexer_Token token;
517   int line;
518   int column;
519   int size;
520   FILE* file;
521   char* string_buffer;
522   char* string_position;
523   int string_left;
524   yyscan_t scanner;
525 };
526
527 static void cmListFileLexerSetToken(cmListFileLexer* lexer, const char* text,
528                                     int length);
529 static void cmListFileLexerAppend(cmListFileLexer* lexer, const char* text,
530                                   int length);
531 static int cmListFileLexerInput(cmListFileLexer* lexer, char* buffer,
532                                 size_t bufferSize);
533 static void cmListFileLexerInit(cmListFileLexer* lexer);
534 static void cmListFileLexerDestroy(cmListFileLexer* lexer);
535
536 /* Replace the lexer input function.  */
537 #undef YY_INPUT
538 #define YY_INPUT(buf, result, max_size) \
539   { result = cmListFileLexerInput(cmListFileLexer_yyget_extra(yyscanner), buf, max_size); }
540
541 /*--------------------------------------------------------------------------*/
542
543 #line 568 "cmListFileLexer.c"
544
545 #define INITIAL 0
546 #define STRING 1
547
548 #ifndef YY_NO_UNISTD_H
549 /* Special case for "unistd.h", since it is non-ANSI. We include it way
550  * down here because we want the user's section 1 to have been scanned first.
551  * The user has a chance to override it with an option.
552  */
553 #include <unistd.h>
554 #endif
555
556 #ifndef YY_EXTRA_TYPE
557 #define YY_EXTRA_TYPE void *
558 #endif
559
560 /* Holds the entire state of the reentrant scanner. */
561 struct yyguts_t
562     {
563
564     /* User-defined. Not touched by flex. */
565     YY_EXTRA_TYPE yyextra_r;
566
567     /* The rest are the same as the globals declared in the non-reentrant scanner. */
568     FILE *yyin_r, *yyout_r;
569     size_t yy_buffer_stack_top; /**< index of top of stack. */
570     size_t yy_buffer_stack_max; /**< capacity of stack. */
571     YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
572     char yy_hold_char;
573     int yy_n_chars;
574     int yyleng_r;
575     char *yy_c_buf_p;
576     int yy_init;
577     int yy_start;
578     int yy_did_buffer_switch_on_eof;
579     int yy_start_stack_ptr;
580     int yy_start_stack_depth;
581     int *yy_start_stack;
582     yy_state_type yy_last_accepting_state;
583     char* yy_last_accepting_cpos;
584
585     int yylineno_r;
586     int yy_flex_debug_r;
587
588     char *yytext_r;
589     int yy_more_flag;
590     int yy_more_len;
591
592     }; /* end struct yyguts_t */
593
594 /* Accessor methods to globals.
595    These are made visible to non-reentrant scanners for convenience. */
596
597 int cmListFileLexer_yylex_destroy (yyscan_t yyscanner );
598
599 int cmListFileLexer_yyget_debug (yyscan_t yyscanner );
600
601 void cmListFileLexer_yyset_debug (int debug_flag ,yyscan_t yyscanner );
602
603 YY_EXTRA_TYPE cmListFileLexer_yyget_extra (yyscan_t yyscanner );
604
605 void cmListFileLexer_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
606
607 FILE *cmListFileLexer_yyget_in (yyscan_t yyscanner );
608
609 void cmListFileLexer_yyset_in  (FILE * in_str ,yyscan_t yyscanner );
610
611 FILE *cmListFileLexer_yyget_out (yyscan_t yyscanner );
612
613 void cmListFileLexer_yyset_out  (FILE * out_str ,yyscan_t yyscanner );
614
615 int cmListFileLexer_yyget_leng (yyscan_t yyscanner );
616
617 char *cmListFileLexer_yyget_text (yyscan_t yyscanner );
618
619 int cmListFileLexer_yyget_lineno (yyscan_t yyscanner );
620
621 void cmListFileLexer_yyset_lineno (int line_number ,yyscan_t yyscanner );
622
623 /* Macros after this point can all be overridden by user definitions in
624  * section 1.
625  */
626
627 #ifndef YY_SKIP_YYWRAP
628 #ifdef __cplusplus
629 extern "C" int cmListFileLexer_yywrap (yyscan_t yyscanner );
630 #else
631 extern int cmListFileLexer_yywrap (yyscan_t yyscanner );
632 #endif
633 #endif
634
635 #ifndef yytext_ptr
636 static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
637 #endif
638
639 #ifdef YY_NEED_STRLEN
640 static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
641 #endif
642
643 #ifndef YY_NO_INPUT
644
645 #ifdef __cplusplus
646 static int yyinput (yyscan_t yyscanner );
647 #else
648 static int input (yyscan_t yyscanner );
649 #endif
650
651 #endif
652
653 /* Amount of stuff to slurp up with each read. */
654 #ifndef YY_READ_BUF_SIZE
655 #define YY_READ_BUF_SIZE 8192
656 #endif
657
658 /* Copy whatever the last rule matched to the standard output. */
659 #ifndef ECHO
660 /* This used to be an fputs(), but since the string might contain NUL's,
661  * we now use fwrite().
662  */
663 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
664 #endif
665
666 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
667  * is returned in "result".
668  */
669 #ifndef YY_INPUT
670 #define YY_INPUT(buf,result,max_size) \
671         if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
672                 { \
673                 int c = '*'; \
674                 size_t n; \
675                 for ( n = 0; n < max_size && \
676                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
677                         buf[n] = (char) c; \
678                 if ( c == '\n' ) \
679                         buf[n++] = (char) c; \
680                 if ( c == EOF && ferror( yyin ) ) \
681                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
682                 result = n; \
683                 } \
684         else \
685                 { \
686                 errno=0; \
687                 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
688                         { \
689                         if( errno != EINTR) \
690                                 { \
691                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
692                                 break; \
693                                 } \
694                         errno=0; \
695                         clearerr(yyin); \
696                         } \
697                 }\
698 \
699
700 #endif
701
702 /* No semi-colon after return; correct usage is to write "yyterminate();" -
703  * we don't want an extra ';' after the "return" because that will cause
704  * some compilers to complain about unreachable statements.
705  */
706 #ifndef yyterminate
707 #define yyterminate() return YY_NULL
708 #endif
709
710 /* Number of entries by which start-condition stack grows. */
711 #ifndef YY_START_STACK_INCR
712 #define YY_START_STACK_INCR 25
713 #endif
714
715 /* Report a fatal error. */
716 #ifndef YY_FATAL_ERROR
717 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
718 #endif
719
720 /* end tables serialization structures and prototypes */
721
722 /* Default declaration of generated scanner - a define so the user can
723  * easily add parameters.
724  */
725 #ifndef YY_DECL
726 #define YY_DECL_IS_OURS 1
727
728 extern int cmListFileLexer_yylex (yyscan_t yyscanner);
729
730 #define YY_DECL int cmListFileLexer_yylex (yyscan_t yyscanner)
731 #endif /* !YY_DECL */
732
733 /* Code executed at the beginning of each rule, after yytext and yyleng
734  * have been set up.
735  */
736 #ifndef YY_USER_ACTION
737 #define YY_USER_ACTION
738 #endif
739
740 /* Code executed at the end of each rule. */
741 #ifndef YY_BREAK
742 #define YY_BREAK break;
743 #endif
744
745 #define YY_RULE_SETUP \
746         YY_USER_ACTION
747
748 /** The main scanner function which does all the work.
749  */
750 YY_DECL
751 {
752         register yy_state_type yy_current_state;
753         register char *yy_cp, *yy_bp;
754         register int yy_act;
755     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
756
757 #line 100 "cmListFileLexer.in.l"
758
759
760 #line 787 "cmListFileLexer.c"
761
762         if ( yyg->yy_init )
763                 {
764                 yyg->yy_init = 0;
765
766 #ifdef YY_USER_INIT
767                 YY_USER_INIT;
768 #endif
769
770                 if ( ! yyg->yy_start )
771                         yyg->yy_start = 1;      /* first start state */
772
773                 if ( ! yyin )
774                         yyin = stdin;
775
776                 if ( ! yyout )
777                         yyout = stdout;
778
779                 if ( ! YY_CURRENT_BUFFER ) {
780                         cmListFileLexer_yyensure_buffer_stack (yyscanner);
781                         YY_CURRENT_BUFFER_LVALUE =
782                                 cmListFileLexer_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
783                 }
784
785                 cmListFileLexer_yy_load_buffer_state(yyscanner );
786                 }
787
788         while ( 1 )             /* loops until end-of-file is reached */
789                 {
790                 yy_cp = yyg->yy_c_buf_p;
791
792                 /* Support of yytext. */
793                 *yy_cp = yyg->yy_hold_char;
794
795                 /* yy_bp points to the position in yy_ch_buf of the start of
796                  * the current run.
797                  */
798                 yy_bp = yy_cp;
799
800                 yy_current_state = yyg->yy_start;
801 yy_match:
802                 do
803                         {
804                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
805                         if ( yy_accept[yy_current_state] )
806                                 {
807                                 yyg->yy_last_accepting_state = yy_current_state;
808                                 yyg->yy_last_accepting_cpos = yy_cp;
809                                 }
810                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
811                                 {
812                                 yy_current_state = (int) yy_def[yy_current_state];
813                                 if ( yy_current_state >= 39 )
814                                         yy_c = yy_meta[(unsigned int) yy_c];
815                                 }
816                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
817                         ++yy_cp;
818                         }
819                 while ( yy_base[yy_current_state] != 89 );
820
821 yy_find_action:
822                 yy_act = yy_accept[yy_current_state];
823                 if ( yy_act == 0 )
824                         { /* have to back up */
825                         yy_cp = yyg->yy_last_accepting_cpos;
826                         yy_current_state = yyg->yy_last_accepting_state;
827                         yy_act = yy_accept[yy_current_state];
828                         }
829
830                 YY_DO_BEFORE_ACTION;
831
832                 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
833                         {
834                         int yyl;
835                         for ( yyl = 0; yyl < yyleng; ++yyl )
836                                 if ( yytext[yyl] == '\n' )
837                                            
838     do{ yylineno++;
839         yycolumn=0;
840     }while(0)
841 ;
842                         }
843
844 do_action:      /* This label is used only to access EOF actions. */
845
846                 switch ( yy_act )
847         { /* beginning of action switch */
848                         case 0: /* must back up */
849                         /* undo the effects of YY_DO_BEFORE_ACTION */
850                         *yy_cp = yyg->yy_hold_char;
851                         yy_cp = yyg->yy_last_accepting_cpos;
852                         yy_current_state = yyg->yy_last_accepting_state;
853                         goto yy_find_action;
854
855 case 1:
856 /* rule 1 can match eol */
857 YY_RULE_SETUP
858 #line 102 "cmListFileLexer.in.l"
859 {
860   lexer->token.type = cmListFileLexer_Token_Newline;
861   cmListFileLexerSetToken(lexer, yytext, yyleng);
862   ++lexer->line;
863   lexer->column = 1;
864   return 1;
865 }
866 case 2:
867 YY_RULE_SETUP
868 #line 110 "cmListFileLexer.in.l"
869 {
870   lexer->column += yyleng;
871 }
872         YY_BREAK
873 case 3:
874 YY_RULE_SETUP
875 #line 114 "cmListFileLexer.in.l"
876 {
877   lexer->token.type = cmListFileLexer_Token_ParenLeft;
878   cmListFileLexerSetToken(lexer, yytext, yyleng);
879   lexer->column += yyleng;
880   return 1;
881 }
882 case 4:
883 YY_RULE_SETUP
884 #line 121 "cmListFileLexer.in.l"
885 {
886   lexer->token.type = cmListFileLexer_Token_ParenRight;
887   cmListFileLexerSetToken(lexer, yytext, yyleng);
888   lexer->column += yyleng;
889   return 1;
890 }
891 case 5:
892 YY_RULE_SETUP
893 #line 128 "cmListFileLexer.in.l"
894 {
895   lexer->token.type = cmListFileLexer_Token_Identifier;
896   cmListFileLexerSetToken(lexer, yytext, yyleng);
897   lexer->column += yyleng;
898   return 1;
899 }
900 case 6:
901 YY_RULE_SETUP
902 #line 135 "cmListFileLexer.in.l"
903 {
904   lexer->token.type = cmListFileLexer_Token_ArgumentUnquoted;
905   cmListFileLexerSetToken(lexer, yytext, yyleng);
906   lexer->column += yyleng;
907   return 1;
908 }
909 case 7:
910 YY_RULE_SETUP
911 #line 142 "cmListFileLexer.in.l"
912 {
913   lexer->token.type = cmListFileLexer_Token_ArgumentQuoted;
914   cmListFileLexerSetToken(lexer, "", 0);
915   lexer->column += yyleng;
916   BEGIN(STRING);
917 }
918         YY_BREAK
919 case 8:
920 /* rule 8 can match eol */
921 YY_RULE_SETUP
922 #line 149 "cmListFileLexer.in.l"
923 {
924   cmListFileLexerAppend(lexer, yytext, yyleng);
925   lexer->column += yyleng;
926 }
927         YY_BREAK
928 case 9:
929 /* rule 9 can match eol */
930 YY_RULE_SETUP
931 #line 154 "cmListFileLexer.in.l"
932 {
933   cmListFileLexerAppend(lexer, yytext, yyleng);
934   ++lexer->line;
935   lexer->column = 1;
936 }
937         YY_BREAK
938 case 10:
939 YY_RULE_SETUP
940 #line 160 "cmListFileLexer.in.l"
941 {
942   lexer->column += yyleng;
943   BEGIN(INITIAL);
944   return 1;
945 }
946 case 11:
947 YY_RULE_SETUP
948 #line 166 "cmListFileLexer.in.l"
949 {
950   cmListFileLexerAppend(lexer, yytext, yyleng);
951   lexer->column += yyleng;
952 }
953         YY_BREAK
954 case YY_STATE_EOF(STRING):
955 #line 171 "cmListFileLexer.in.l"
956 {
957   lexer->token.type = cmListFileLexer_Token_BadString;
958   BEGIN(INITIAL);
959   return 1;
960 }
961 case 12:
962 YY_RULE_SETUP
963 #line 177 "cmListFileLexer.in.l"
964 {
965   lexer->column += yyleng;
966 }
967         YY_BREAK
968 case 13:
969 YY_RULE_SETUP
970 #line 181 "cmListFileLexer.in.l"
971 {
972   lexer->token.type = cmListFileLexer_Token_BadCharacter;
973   cmListFileLexerSetToken(lexer, yytext, yyleng);
974   lexer->column += yyleng;
975   return 1;
976 }
977 case YY_STATE_EOF(INITIAL):
978 #line 188 "cmListFileLexer.in.l"
979 {
980   lexer->token.type = cmListFileLexer_Token_None;
981   cmListFileLexerSetToken(lexer, 0, 0);
982   return 0;
983 }
984 case 14:
985 YY_RULE_SETUP
986 #line 194 "cmListFileLexer.in.l"
987 ECHO;
988         YY_BREAK
989 #line 1025 "cmListFileLexer.c"
990
991         case YY_END_OF_BUFFER:
992                 {
993                 /* Amount of text matched not including the EOB char. */
994                 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
995
996                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
997                 *yy_cp = yyg->yy_hold_char;
998                 YY_RESTORE_YY_MORE_OFFSET
999
1000                 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1001                         {
1002                         /* We're scanning a new file or input source.  It's
1003                          * possible that this happened because the user
1004                          * just pointed yyin at a new source and called
1005                          * cmListFileLexer_yylex().  If so, then we have to assure
1006                          * consistency between YY_CURRENT_BUFFER and our
1007                          * globals.  Here is the right place to do so, because
1008                          * this is the first action (other than possibly a
1009                          * back-up) that will match for the new input source.
1010                          */
1011                         yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1012                         YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1013                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1014                         }
1015
1016                 /* Note that here we test for yy_c_buf_p "<=" to the position
1017                  * of the first EOB in the buffer, since yy_c_buf_p will
1018                  * already have been incremented past the NUL character
1019                  * (since all states make transitions on EOB to the
1020                  * end-of-buffer state).  Contrast this with the test
1021                  * in input().
1022                  */
1023                 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1024                         { /* This was really a NUL. */
1025                         yy_state_type yy_next_state;
1026
1027                         yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1028
1029                         yy_current_state = yy_get_previous_state( yyscanner );
1030
1031                         /* Okay, we're now positioned to make the NUL
1032                          * transition.  We couldn't have
1033                          * yy_get_previous_state() go ahead and do it
1034                          * for us because it doesn't know how to deal
1035                          * with the possibility of jamming (and we don't
1036                          * want to build jamming into it because then it
1037                          * will run more slowly).
1038                          */
1039
1040                         yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1041
1042                         yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1043
1044                         if ( yy_next_state )
1045                                 {
1046                                 /* Consume the NUL. */
1047                                 yy_cp = ++yyg->yy_c_buf_p;
1048                                 yy_current_state = yy_next_state;
1049                                 goto yy_match;
1050                                 }
1051
1052                         else
1053                                 {
1054                                 yy_cp = yyg->yy_c_buf_p;
1055                                 goto yy_find_action;
1056                                 }
1057                         }
1058
1059                 else switch ( yy_get_next_buffer( yyscanner ) )
1060                         {
1061                         case EOB_ACT_END_OF_FILE:
1062                                 {
1063                                 yyg->yy_did_buffer_switch_on_eof = 0;
1064
1065                                 if ( cmListFileLexer_yywrap(yyscanner ) )
1066                                         {
1067                                         /* Note: because we've taken care in
1068                                          * yy_get_next_buffer() to have set up
1069                                          * yytext, we can now set up
1070                                          * yy_c_buf_p so that if some total
1071                                          * hoser (like flex itself) wants to
1072                                          * call the scanner after we return the
1073                                          * YY_NULL, it'll still work - another
1074                                          * YY_NULL will get returned.
1075                                          */
1076                                         yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1077
1078                                         yy_act = YY_STATE_EOF(YY_START);
1079                                         goto do_action;
1080                                         }
1081
1082                                 else
1083                                         {
1084                                         if ( ! yyg->yy_did_buffer_switch_on_eof )
1085                                                 YY_NEW_FILE;
1086                                         }
1087                                 break;
1088                                 }
1089
1090                         case EOB_ACT_CONTINUE_SCAN:
1091                                 yyg->yy_c_buf_p =
1092                                         yyg->yytext_ptr + yy_amount_of_matched_text;
1093
1094                                 yy_current_state = yy_get_previous_state( yyscanner );
1095
1096                                 yy_cp = yyg->yy_c_buf_p;
1097                                 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1098                                 goto yy_match;
1099
1100                         case EOB_ACT_LAST_MATCH:
1101                                 yyg->yy_c_buf_p =
1102                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1103
1104                                 yy_current_state = yy_get_previous_state( yyscanner );
1105
1106                                 yy_cp = yyg->yy_c_buf_p;
1107                                 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1108                                 goto yy_find_action;
1109                         }
1110                 break;
1111                 }
1112
1113         default:
1114                 YY_FATAL_ERROR(
1115                         "fatal flex scanner internal error--no action found" );
1116         } /* end of action switch */
1117                 } /* end of scanning one token */
1118 } /* end of cmListFileLexer_yylex */
1119
1120 /* yy_get_next_buffer - try to read in a new buffer
1121  *
1122  * Returns a code representing an action:
1123  *      EOB_ACT_LAST_MATCH -
1124  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1125  *      EOB_ACT_END_OF_FILE - end of file
1126  */
1127 static int yy_get_next_buffer (yyscan_t yyscanner)
1128 {
1129     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1130         register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1131         register char *source = yyg->yytext_ptr;
1132         register int number_to_move, i;
1133         int ret_val;
1134
1135         if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1136                 YY_FATAL_ERROR(
1137                 "fatal flex scanner internal error--end of buffer missed" );
1138
1139         if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1140                 { /* Don't try to fill the buffer, so this is an EOF. */
1141                 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1142                         {
1143                         /* We matched a single character, the EOB, so
1144                          * treat this as a final EOF.
1145                          */
1146                         return EOB_ACT_END_OF_FILE;
1147                         }
1148
1149                 else
1150                         {
1151                         /* We matched some text prior to the EOB, first
1152                          * process it.
1153                          */
1154                         return EOB_ACT_LAST_MATCH;
1155                         }
1156                 }
1157
1158         /* Try to read more data. */
1159
1160         /* First move last chars to start of buffer. */
1161         number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
1162
1163         for ( i = 0; i < number_to_move; ++i )
1164                 *(dest++) = *(source++);
1165
1166         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1167                 /* don't do the read, it's not guaranteed to return an EOF,
1168                  * just force an EOF
1169                  */
1170                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1171
1172         else
1173                 {
1174                         size_t num_to_read =
1175                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1176
1177                 while ( num_to_read <= 0 )
1178                         { /* Not enough room in the buffer - grow it. */
1179
1180                         /* just a shorter name for the current buffer */
1181                         YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1182
1183                         int yy_c_buf_p_offset =
1184                                 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1185
1186                         if ( b->yy_is_our_buffer )
1187                                 {
1188                                 int new_size = b->yy_buf_size * 2;
1189
1190                                 if ( new_size <= 0 )
1191                                         b->yy_buf_size += b->yy_buf_size / 8;
1192                                 else
1193                                         b->yy_buf_size *= 2;
1194
1195                                 b->yy_ch_buf = (char *)
1196                                         /* Include room in for 2 EOB chars. */
1197                                         cmListFileLexer_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
1198                                 }
1199                         else
1200                                 /* Can't grow it, we don't own it. */
1201                                 b->yy_ch_buf = 0;
1202
1203                         if ( ! b->yy_ch_buf )
1204                                 YY_FATAL_ERROR(
1205                                 "fatal error - scanner input buffer overflow" );
1206
1207                         yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1208
1209                         num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1210                                                 number_to_move - 1;
1211
1212                         }
1213
1214                 if ( num_to_read > YY_READ_BUF_SIZE )
1215                         num_to_read = YY_READ_BUF_SIZE;
1216
1217                 /* Read in more data. */
1218                 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1219                         yyg->yy_n_chars, num_to_read );
1220
1221                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1222                 }
1223
1224         if ( yyg->yy_n_chars == 0 )
1225                 {
1226                 if ( number_to_move == YY_MORE_ADJ )
1227                         {
1228                         ret_val = EOB_ACT_END_OF_FILE;
1229                         cmListFileLexer_yyrestart(yyin  ,yyscanner);
1230                         }
1231
1232                 else
1233                         {
1234                         ret_val = EOB_ACT_LAST_MATCH;
1235                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1236                                 YY_BUFFER_EOF_PENDING;
1237                         }
1238                 }
1239
1240         else
1241                 ret_val = EOB_ACT_CONTINUE_SCAN;
1242
1243         yyg->yy_n_chars += number_to_move;
1244         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1245         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1246
1247         yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1248
1249         return ret_val;
1250 }
1251
1252 /* yy_get_previous_state - get the state just before the EOB char was reached */
1253
1254     static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1255 {
1256         register yy_state_type yy_current_state;
1257         register char *yy_cp;
1258     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1259
1260         yy_current_state = yyg->yy_start;
1261
1262         for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1263                 {
1264                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1265                 if ( yy_accept[yy_current_state] )
1266                         {
1267                         yyg->yy_last_accepting_state = yy_current_state;
1268                         yyg->yy_last_accepting_cpos = yy_cp;
1269                         }
1270                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1271                         {
1272                         yy_current_state = (int) yy_def[yy_current_state];
1273                         if ( yy_current_state >= 39 )
1274                                 yy_c = yy_meta[(unsigned int) yy_c];
1275                         }
1276                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1277                 }
1278
1279         return yy_current_state;
1280 }
1281
1282 /* yy_try_NUL_trans - try to make a transition on the NUL character
1283  *
1284  * synopsis
1285  *      next_state = yy_try_NUL_trans( current_state );
1286  */
1287     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state , yyscan_t yyscanner)
1288 {
1289         register int yy_is_jam;
1290     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1291         register char *yy_cp = yyg->yy_c_buf_p;
1292
1293         register YY_CHAR yy_c = 1;
1294         if ( yy_accept[yy_current_state] )
1295                 {
1296                 yyg->yy_last_accepting_state = yy_current_state;
1297                 yyg->yy_last_accepting_cpos = yy_cp;
1298                 }
1299         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1300                 {
1301                 yy_current_state = (int) yy_def[yy_current_state];
1302                 if ( yy_current_state >= 39 )
1303                         yy_c = yy_meta[(unsigned int) yy_c];
1304                 }
1305         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1306         yy_is_jam = (yy_current_state == 38);
1307
1308         return yy_is_jam ? 0 : yy_current_state;
1309 }
1310
1311 #ifndef YY_NO_INPUT
1312 #ifdef __cplusplus
1313     static int yyinput (yyscan_t yyscanner)
1314 #else
1315     static int input  (yyscan_t yyscanner)
1316 #endif
1317
1318 {
1319         int c;
1320     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1321
1322         *yyg->yy_c_buf_p = yyg->yy_hold_char;
1323
1324         if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1325                 {
1326                 /* yy_c_buf_p now points to the character we want to return.
1327                  * If this occurs *before* the EOB characters, then it's a
1328                  * valid NUL; if not, then we've hit the end of the buffer.
1329                  */
1330                 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1331                         /* This was really a NUL. */
1332                         *yyg->yy_c_buf_p = '\0';
1333
1334                 else
1335                         { /* need more input */
1336                         int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
1337                         ++yyg->yy_c_buf_p;
1338
1339                         switch ( yy_get_next_buffer( yyscanner ) )
1340                                 {
1341                                 case EOB_ACT_LAST_MATCH:
1342                                         /* This happens because yy_g_n_b()
1343                                          * sees that we've accumulated a
1344                                          * token and flags that we need to
1345                                          * try matching the token before
1346                                          * proceeding.  But for input(),
1347                                          * there's no matching to consider.
1348                                          * So convert the EOB_ACT_LAST_MATCH
1349                                          * to EOB_ACT_END_OF_FILE.
1350                                          */
1351
1352                                         /* Reset buffer status. */
1353                                         cmListFileLexer_yyrestart(yyin ,yyscanner);
1354
1355                                         /*FALLTHROUGH*/
1356
1357                                 case EOB_ACT_END_OF_FILE:
1358                                         {
1359                                         if ( cmListFileLexer_yywrap(yyscanner ) )
1360                                                 return EOF;
1361
1362                                         if ( ! yyg->yy_did_buffer_switch_on_eof )
1363                                                 YY_NEW_FILE;
1364 #ifdef __cplusplus
1365                                         return yyinput(yyscanner);
1366 #else
1367                                         return input(yyscanner);
1368 #endif
1369                                         }
1370
1371                                 case EOB_ACT_CONTINUE_SCAN:
1372                                         yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
1373                                         break;
1374                                 }
1375                         }
1376                 }
1377
1378         c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
1379         *yyg->yy_c_buf_p = '\0';        /* preserve yytext */
1380         yyg->yy_hold_char = *++yyg->yy_c_buf_p;
1381
1382         if ( c == '\n' )
1383                    
1384     do{ yylineno++;
1385         yycolumn=0;
1386     }while(0)
1387 ;
1388
1389         return c;
1390 }
1391 #endif  /* ifndef YY_NO_INPUT */
1392
1393 /** Immediately switch to a different input stream.
1394  * @param input_file A readable stream.
1395  * @param yyscanner The scanner object.
1396  * @note This function does not reset the start condition to @c INITIAL .
1397  */
1398     void cmListFileLexer_yyrestart  (FILE * input_file , yyscan_t yyscanner)
1399 {
1400     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1401
1402         if ( ! YY_CURRENT_BUFFER ){
1403         cmListFileLexer_yyensure_buffer_stack (yyscanner);
1404                 YY_CURRENT_BUFFER_LVALUE =
1405             cmListFileLexer_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1406         }
1407
1408         cmListFileLexer_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
1409         cmListFileLexer_yy_load_buffer_state(yyscanner );
1410 }
1411
1412 /** Switch to a different input buffer.
1413  * @param new_buffer The new input buffer.
1414  * @param yyscanner The scanner object.
1415  */
1416     void cmListFileLexer_yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)
1417 {
1418     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1419
1420         /* TODO. We should be able to replace this entire function body
1421          * with
1422          *              cmListFileLexer_yypop_buffer_state();
1423          *              cmListFileLexer_yypush_buffer_state(new_buffer);
1424      */
1425         cmListFileLexer_yyensure_buffer_stack (yyscanner);
1426         if ( YY_CURRENT_BUFFER == new_buffer )
1427                 return;
1428
1429         if ( YY_CURRENT_BUFFER )
1430                 {
1431                 /* Flush out information for old buffer. */
1432                 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1433                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1434                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1435                 }
1436
1437         YY_CURRENT_BUFFER_LVALUE = new_buffer;
1438         cmListFileLexer_yy_load_buffer_state(yyscanner );
1439
1440         /* We don't actually know whether we did this switch during
1441          * EOF (cmListFileLexer_yywrap()) processing, but the only time this flag
1442          * is looked at is after cmListFileLexer_yywrap() is called, so it's safe
1443          * to go ahead and always set it.
1444          */
1445         yyg->yy_did_buffer_switch_on_eof = 1;
1446 }
1447
1448 static void cmListFileLexer_yy_load_buffer_state  (yyscan_t yyscanner)
1449 {
1450     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1451         yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1452         yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1453         yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1454         yyg->yy_hold_char = *yyg->yy_c_buf_p;
1455 }
1456
1457 /** Allocate and initialize an input buffer state.
1458  * @param file A readable stream.
1459  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1460  * @param yyscanner The scanner object.
1461  * @return the allocated buffer state.
1462  */
1463     YY_BUFFER_STATE cmListFileLexer_yy_create_buffer  (FILE * file, int  size , yyscan_t yyscanner)
1464 {
1465         YY_BUFFER_STATE b;
1466     
1467         b = (YY_BUFFER_STATE) cmListFileLexer_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
1468         if ( ! b )
1469                 YY_FATAL_ERROR( "out of dynamic memory in cmListFileLexer_yy_create_buffer()" );
1470
1471         b->yy_buf_size = size;
1472
1473         /* yy_ch_buf has to be 2 characters longer than the size given because
1474          * we need to put in 2 end-of-buffer characters.
1475          */
1476         b->yy_ch_buf = (char *) cmListFileLexer_yyalloc(b->yy_buf_size + 2 ,yyscanner );
1477         if ( ! b->yy_ch_buf )
1478                 YY_FATAL_ERROR( "out of dynamic memory in cmListFileLexer_yy_create_buffer()" );
1479
1480         b->yy_is_our_buffer = 1;
1481
1482         cmListFileLexer_yy_init_buffer(b,file ,yyscanner);
1483
1484         return b;
1485 }
1486
1487 /** Destroy the buffer.
1488  * @param b a buffer created with cmListFileLexer_yy_create_buffer()
1489  * @param yyscanner The scanner object.
1490  */
1491     void cmListFileLexer_yy_delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
1492 {
1493     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1494
1495         if ( ! b )
1496                 return;
1497
1498         if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1499                 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1500
1501         if ( b->yy_is_our_buffer )
1502                 cmListFileLexer_yyfree((void *) b->yy_ch_buf ,yyscanner );
1503
1504         cmListFileLexer_yyfree((void *) b ,yyscanner );
1505 }
1506
1507 /* Initializes or reinitializes a buffer.
1508  * This function is sometimes called more than once on the same buffer,
1509  * such as during a cmListFileLexer_yyrestart() or at EOF.
1510  */
1511     static void cmListFileLexer_yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)
1512
1513 {
1514         int oerrno = errno;
1515     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1516
1517         cmListFileLexer_yy_flush_buffer(b ,yyscanner);
1518
1519         b->yy_input_file = file;
1520         b->yy_fill_buffer = 1;
1521
1522     /* If b is the current buffer, then cmListFileLexer_yy_init_buffer was _probably_
1523      * called from cmListFileLexer_yyrestart() or through yy_get_next_buffer.
1524      * In that case, we don't want to reset the lineno or column.
1525      */
1526     if (b != YY_CURRENT_BUFFER){
1527         b->yy_bs_lineno = 1;
1528         b->yy_bs_column = 0;
1529     }
1530
1531         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1532     
1533         errno = oerrno;
1534 }
1535
1536 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1537  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1538  * @param yyscanner The scanner object.
1539  */
1540     void cmListFileLexer_yy_flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
1541 {
1542     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1543         if ( ! b )
1544                 return;
1545
1546         b->yy_n_chars = 0;
1547
1548         /* We always need two end-of-buffer characters.  The first causes
1549          * a transition to the end-of-buffer state.  The second causes
1550          * a jam in that state.
1551          */
1552         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1553         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1554
1555         b->yy_buf_pos = &b->yy_ch_buf[0];
1556
1557         b->yy_at_bol = 1;
1558         b->yy_buffer_status = YY_BUFFER_NEW;
1559
1560         if ( b == YY_CURRENT_BUFFER )
1561                 cmListFileLexer_yy_load_buffer_state(yyscanner );
1562 }
1563
1564 /** Pushes the new state onto the stack. The new state becomes
1565  *  the current state. This function will allocate the stack
1566  *  if necessary.
1567  *  @param new_buffer The new state.
1568  *  @param yyscanner The scanner object.
1569  */
1570 void cmListFileLexer_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1571 {
1572     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1573         if (new_buffer == NULL)
1574                 return;
1575
1576         cmListFileLexer_yyensure_buffer_stack(yyscanner);
1577
1578         /* This block is copied from cmListFileLexer_yy_switch_to_buffer. */
1579         if ( YY_CURRENT_BUFFER )
1580                 {
1581                 /* Flush out information for old buffer. */
1582                 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1583                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1584                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1585                 }
1586
1587         /* Only push if top exists. Otherwise, replace top. */
1588         if (YY_CURRENT_BUFFER)
1589                 yyg->yy_buffer_stack_top++;
1590         YY_CURRENT_BUFFER_LVALUE = new_buffer;
1591
1592         /* copied from cmListFileLexer_yy_switch_to_buffer. */
1593         cmListFileLexer_yy_load_buffer_state(yyscanner );
1594         yyg->yy_did_buffer_switch_on_eof = 1;
1595 }
1596
1597 /** Removes and deletes the top of the stack, if present.
1598  *  The next element becomes the new top.
1599  *  @param yyscanner The scanner object.
1600  */
1601 void cmListFileLexer_yypop_buffer_state (yyscan_t yyscanner)
1602 {
1603     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1604         if (!YY_CURRENT_BUFFER)
1605                 return;
1606
1607         cmListFileLexer_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
1608         YY_CURRENT_BUFFER_LVALUE = NULL;
1609         if (yyg->yy_buffer_stack_top > 0)
1610                 --yyg->yy_buffer_stack_top;
1611
1612         if (YY_CURRENT_BUFFER) {
1613                 cmListFileLexer_yy_load_buffer_state(yyscanner );
1614                 yyg->yy_did_buffer_switch_on_eof = 1;
1615         }
1616 }
1617
1618 /* Allocates the stack if it does not exist.
1619  *  Guarantees space for at least one push.
1620  */
1621 static void cmListFileLexer_yyensure_buffer_stack (yyscan_t yyscanner)
1622 {
1623         int num_to_alloc;
1624     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1625
1626         if (!yyg->yy_buffer_stack) {
1627
1628                 /* First allocation is just for 2 elements, since we don't know if this
1629                  * scanner will even need a stack. We use 2 instead of 1 to avoid an
1630                  * immediate realloc on the next call.
1631          */
1632                 num_to_alloc = 1;
1633                 yyg->yy_buffer_stack = (struct yy_buffer_state**)cmListFileLexer_yyalloc
1634                                                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
1635                                                                 , yyscanner);
1636                 
1637                 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1638                                 
1639                 yyg->yy_buffer_stack_max = num_to_alloc;
1640                 yyg->yy_buffer_stack_top = 0;
1641                 return;
1642         }
1643
1644         if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
1645
1646                 /* Increase the buffer to prepare for a possible push. */
1647                 int grow_size = 8 /* arbitrary grow size */;
1648
1649                 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
1650                 yyg->yy_buffer_stack = (struct yy_buffer_state**)cmListFileLexer_yyrealloc
1651                                                                 (yyg->yy_buffer_stack,
1652                                                                 num_to_alloc * sizeof(struct yy_buffer_state*)
1653                                                                 , yyscanner);
1654
1655                 /* zero only the new slots.*/
1656                 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
1657                 yyg->yy_buffer_stack_max = num_to_alloc;
1658         }
1659 }
1660
1661 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1662  * @param base the character buffer
1663  * @param size the size in bytes of the character buffer
1664  * @param yyscanner The scanner object.
1665  * @return the newly allocated buffer state object. 
1666  */
1667 YY_BUFFER_STATE cmListFileLexer_yy_scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)
1668 {
1669         YY_BUFFER_STATE b;
1670     
1671         if ( size < 2 ||
1672              base[size-2] != YY_END_OF_BUFFER_CHAR ||
1673              base[size-1] != YY_END_OF_BUFFER_CHAR )
1674                 /* They forgot to leave room for the EOB's. */
1675                 return 0;
1676
1677         b = (YY_BUFFER_STATE) cmListFileLexer_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
1678         if ( ! b )
1679                 YY_FATAL_ERROR( "out of dynamic memory in cmListFileLexer_yy_scan_buffer()" );
1680
1681         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
1682         b->yy_buf_pos = b->yy_ch_buf = base;
1683         b->yy_is_our_buffer = 0;
1684         b->yy_input_file = 0;
1685         b->yy_n_chars = b->yy_buf_size;
1686         b->yy_is_interactive = 0;
1687         b->yy_at_bol = 1;
1688         b->yy_fill_buffer = 0;
1689         b->yy_buffer_status = YY_BUFFER_NEW;
1690
1691         cmListFileLexer_yy_switch_to_buffer(b ,yyscanner );
1692
1693         return b;
1694 }
1695
1696 /** Setup the input buffer state to scan a string. The next call to cmListFileLexer_yylex() will
1697  * scan from a @e copy of @a str.
1698  * @param str a NUL-terminated string to scan
1699  * @param yyscanner The scanner object.
1700  * @return the newly allocated buffer state object.
1701  * @note If you want to scan bytes that may contain NUL values, then use
1702  *       cmListFileLexer_yy_scan_bytes() instead.
1703  */
1704 YY_BUFFER_STATE cmListFileLexer_yy_scan_string (yyconst char * yy_str , yyscan_t yyscanner)
1705 {
1706     
1707         return cmListFileLexer_yy_scan_bytes(yy_str,strlen(yy_str) ,yyscanner);
1708 }
1709
1710 /** Setup the input buffer state to scan the given bytes. The next call to cmListFileLexer_yylex() will
1711  * scan from a @e copy of @a bytes.
1712  * @param bytes the byte buffer to scan
1713  * @param len the number of bytes in the buffer pointed to by @a bytes.
1714  * @param yyscanner The scanner object.
1715  * @return the newly allocated buffer state object.
1716  */
1717 YY_BUFFER_STATE cmListFileLexer_yy_scan_bytes  (yyconst char * bytes, int  len , yyscan_t yyscanner)
1718 {
1719         YY_BUFFER_STATE b;
1720         char *buf;
1721         yy_size_t n;
1722         int i;
1723     
1724         /* Get memory for full buffer, including space for trailing EOB's. */
1725         n = len + 2;
1726         buf = (char *) cmListFileLexer_yyalloc(n ,yyscanner );
1727         if ( ! buf )
1728                 YY_FATAL_ERROR( "out of dynamic memory in cmListFileLexer_yy_scan_bytes()" );
1729
1730         for ( i = 0; i < len; ++i )
1731                 buf[i] = bytes[i];
1732
1733         buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1734
1735         b = cmListFileLexer_yy_scan_buffer(buf,n ,yyscanner);
1736         if ( ! b )
1737                 YY_FATAL_ERROR( "bad buffer in cmListFileLexer_yy_scan_bytes()" );
1738
1739         /* It's okay to grow etc. this buffer, and we should throw it
1740          * away when we're done.
1741          */
1742         b->yy_is_our_buffer = 1;
1743
1744         return b;
1745 }
1746
1747 #ifndef YY_EXIT_FAILURE
1748 #define YY_EXIT_FAILURE 2
1749 #endif
1750
1751 static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
1752 {
1753         (void)yyscanner;
1754         (void) fprintf( stderr, "%s\n", msg );
1755         exit( YY_EXIT_FAILURE );
1756 }
1757
1758 /* Redefine yyless() so it works in section 3 code. */
1759
1760 #undef yyless
1761 #define yyless(n) \
1762         do \
1763                 { \
1764                 /* Undo effects of setting up yytext. */ \
1765         int yyless_macro_arg = (n); \
1766         YY_LESS_LINENO(yyless_macro_arg);\
1767                 yytext[yyleng] = yyg->yy_hold_char; \
1768                 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
1769                 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
1770                 *yyg->yy_c_buf_p = '\0'; \
1771                 yyleng = yyless_macro_arg; \
1772                 } \
1773         while ( 0 )
1774
1775 /* Accessor  methods (get/set functions) to struct members. */
1776
1777 /** Get the user-defined data for this scanner.
1778  * @param yyscanner The scanner object.
1779  */
1780 YY_EXTRA_TYPE cmListFileLexer_yyget_extra  (yyscan_t yyscanner)
1781 {
1782     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1783     return yyextra;
1784 }
1785
1786 /** Get the current line number.
1787  * @param yyscanner The scanner object.
1788  */
1789 int cmListFileLexer_yyget_lineno  (yyscan_t yyscanner)
1790 {
1791     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1792     
1793         if (! YY_CURRENT_BUFFER)
1794             return 0;
1795     
1796     return yylineno;
1797 }
1798
1799 /** Get the current column number.
1800  * @param yyscanner The scanner object.
1801  */
1802 int cmListFileLexer_yyget_column  (yyscan_t yyscanner)
1803 {
1804     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1805     
1806         if (! YY_CURRENT_BUFFER)
1807             return 0;
1808     
1809     return yycolumn;
1810 }
1811
1812 /** Get the input stream.
1813  * @param yyscanner The scanner object.
1814  */
1815 FILE *cmListFileLexer_yyget_in  (yyscan_t yyscanner)
1816 {
1817     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1818     return yyin;
1819 }
1820
1821 /** Get the output stream.
1822  * @param yyscanner The scanner object.
1823  */
1824 FILE *cmListFileLexer_yyget_out  (yyscan_t yyscanner)
1825 {
1826     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1827     return yyout;
1828 }
1829
1830 /** Get the length of the current token.
1831  * @param yyscanner The scanner object.
1832  */
1833 int cmListFileLexer_yyget_leng  (yyscan_t yyscanner)
1834 {
1835     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1836     return yyleng;
1837 }
1838
1839 /** Get the current token.
1840  * @param yyscanner The scanner object.
1841  */
1842
1843 char *cmListFileLexer_yyget_text  (yyscan_t yyscanner)
1844 {
1845     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1846     return yytext;
1847 }
1848
1849 /** Set the user-defined data. This data is never touched by the scanner.
1850  * @param user_defined The data to be associated with this scanner.
1851  * @param yyscanner The scanner object.
1852  */
1853 void cmListFileLexer_yyset_extra (YY_EXTRA_TYPE  user_defined , yyscan_t yyscanner)
1854 {
1855     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1856     yyextra = user_defined ;
1857 }
1858
1859 /** Set the current line number.
1860  * @param line_number
1861  * @param yyscanner The scanner object.
1862  */
1863 void cmListFileLexer_yyset_lineno (int  line_number , yyscan_t yyscanner)
1864 {
1865     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1866
1867         /* lineno is only valid if an input buffer exists. */
1868         if (! YY_CURRENT_BUFFER )
1869            yy_fatal_error( "cmListFileLexer_yyset_lineno called with no buffer" , yyscanner); 
1870     
1871     yylineno = line_number;
1872 }
1873
1874 /** Set the current column.
1875  * @param line_number
1876  * @param yyscanner The scanner object.
1877  */
1878 void cmListFileLexer_yyset_column (int  column_no , yyscan_t yyscanner)
1879 {
1880     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1881
1882         /* column is only valid if an input buffer exists. */
1883         if (! YY_CURRENT_BUFFER )
1884            yy_fatal_error( "cmListFileLexer_yyset_column called with no buffer" , yyscanner); 
1885     
1886     yycolumn = column_no;
1887 }
1888
1889 /** Set the input stream. This does not discard the current
1890  * input buffer.
1891  * @param in_str A readable stream.
1892  * @param yyscanner The scanner object.
1893  * @see cmListFileLexer_yy_switch_to_buffer
1894  */
1895 void cmListFileLexer_yyset_in (FILE *  in_str , yyscan_t yyscanner)
1896 {
1897     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1898     yyin = in_str ;
1899 }
1900
1901 void cmListFileLexer_yyset_out (FILE *  out_str , yyscan_t yyscanner)
1902 {
1903     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1904     yyout = out_str ;
1905 }
1906
1907 int cmListFileLexer_yyget_debug  (yyscan_t yyscanner)
1908 {
1909     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1910     return yy_flex_debug;
1911 }
1912
1913 void cmListFileLexer_yyset_debug (int  bdebug , yyscan_t yyscanner)
1914 {
1915     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1916     yy_flex_debug = bdebug ;
1917 }
1918
1919 /* Accessor methods for yylval and yylloc */
1920
1921 static int yy_init_globals (yyscan_t yyscanner)
1922 {
1923     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1924     /* Initialization is the same as for the non-reentrant scanner.
1925        This function is called once per scanner lifetime. */
1926
1927     yyg->yy_buffer_stack = 0;
1928     yyg->yy_buffer_stack_top = 0;
1929     yyg->yy_buffer_stack_max = 0;
1930     yyg->yy_c_buf_p = (char *) 0;
1931     yyg->yy_init = 1;
1932     yyg->yy_start = 0;
1933     yyg->yy_start_stack_ptr = 0;
1934     yyg->yy_start_stack_depth = 0;
1935     yyg->yy_start_stack = (int *) 0;
1936
1937 /* Defined in main.c */
1938 #ifdef YY_STDINIT
1939     yyin = stdin;
1940     yyout = stdout;
1941 #else
1942     yyin = (FILE *) 0;
1943     yyout = (FILE *) 0;
1944 #endif
1945
1946     /* For future reference: Set errno on error, since we are called by
1947      * cmListFileLexer_yylex_init()
1948      */
1949     return 0;
1950 }
1951
1952 /* User-visible API */
1953
1954 /* cmListFileLexer_yylex_init is special because it creates the scanner itself, so it is
1955  * the ONLY reentrant function that doesn't take the scanner as the last argument.
1956  * That's why we explicitly handle the declaration, instead of using our macros.
1957  */
1958
1959 int cmListFileLexer_yylex_init(yyscan_t* ptr_yy_globals)
1960
1961 {
1962     if (ptr_yy_globals == NULL){
1963         errno = EINVAL;
1964         return 1;
1965     }
1966
1967     *ptr_yy_globals = (yyscan_t) cmListFileLexer_yyalloc ( sizeof( struct yyguts_t ), NULL );
1968
1969     if (*ptr_yy_globals == NULL){
1970         errno = ENOMEM;
1971         return 1;
1972     }
1973
1974     memset(*ptr_yy_globals,0,sizeof(struct yyguts_t));
1975
1976     return yy_init_globals ( *ptr_yy_globals );
1977 }
1978
1979 /* cmListFileLexer_yylex_destroy is for both reentrant and non-reentrant scanners. */
1980 int cmListFileLexer_yylex_destroy  (yyscan_t yyscanner)
1981 {
1982     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1983
1984     /* Pop the buffer stack, destroying each element. */
1985         while(YY_CURRENT_BUFFER){
1986                 cmListFileLexer_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
1987                 YY_CURRENT_BUFFER_LVALUE = NULL;
1988                 cmListFileLexer_yypop_buffer_state(yyscanner);
1989         }
1990
1991         /* Destroy the stack itself. */
1992         cmListFileLexer_yyfree(yyg->yy_buffer_stack ,yyscanner);
1993         yyg->yy_buffer_stack = NULL;
1994
1995     /* Destroy the start condition stack. */
1996         cmListFileLexer_yyfree(yyg->yy_start_stack ,yyscanner );
1997         yyg->yy_start_stack = NULL;
1998
1999     /* Destroy the main struct (reentrant only). */
2000     cmListFileLexer_yyfree ( yyscanner , yyscanner );
2001     return 0;
2002 }
2003
2004 /*
2005  * Internal utility routines.
2006  */
2007
2008 #ifndef yytext_ptr
2009 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
2010 {
2011         register int i;
2012     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2013         for ( i = 0; i < n; ++i )
2014                 s1[i] = s2[i];
2015 }
2016 #endif
2017
2018 #ifdef YY_NEED_STRLEN
2019 static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
2020 {
2021         register int n;
2022     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2023         for ( n = 0; s[n]; ++n )
2024                 ;
2025
2026         return n;
2027 }
2028 #endif
2029
2030 void *cmListFileLexer_yyalloc (yy_size_t  size , yyscan_t yyscanner)
2031 {
2032         (void)yyscanner;
2033         return (void *) malloc( size );
2034 }
2035
2036 void *cmListFileLexer_yyrealloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
2037 {
2038         /* The cast to (char *) in the following accommodates both
2039          * implementations that use char* generic pointers, and those
2040          * that use void* generic pointers.  It works with the latter
2041          * because both ANSI C and C++ allow castless assignment from
2042          * any pointer type to void*, and deal with argument conversions
2043          * as though doing an assignment.
2044          */
2045         (void)yyscanner;
2046         return (void *) realloc( (char *) ptr, size );
2047 }
2048
2049 void cmListFileLexer_yyfree (void * ptr , yyscan_t yyscanner)
2050 {
2051         (void)yyscanner;
2052         free( (char *) ptr );   /* see cmListFileLexer_yyrealloc() for (char *) cast */
2053 }
2054
2055 #define YYTABLES_NAME "yytables"
2056
2057 #undef YY_NEW_FILE
2058 #undef YY_FLUSH_BUFFER
2059 #undef yy_set_bol
2060 #undef yy_new_buffer
2061 #undef yy_set_interactive
2062 #undef yytext_ptr
2063 #undef YY_DO_BEFORE_ACTION
2064
2065 #ifdef YY_DECL_IS_OURS
2066 #undef YY_DECL_IS_OURS
2067 #undef YY_DECL
2068 #endif
2069 #line 194 "cmListFileLexer.in.l"
2070
2071
2072
2073 /*--------------------------------------------------------------------------*/
2074 static void cmListFileLexerSetToken(cmListFileLexer* lexer, const char* text,
2075                                     int length)
2076 {
2077   /* Set the token line and column number.  */
2078   lexer->token.line = lexer->line;
2079   lexer->token.column = lexer->column;
2080
2081   /* Use the same buffer if possible.  */
2082   if(lexer->token.text)
2083     {
2084     if(text && length < lexer->size)
2085       {
2086       strcpy(lexer->token.text, text);
2087       lexer->token.length = length;
2088       return;
2089       }
2090     free(lexer->token.text);
2091     lexer->token.text = 0;
2092     lexer->size = 0;
2093     }
2094
2095   /* Need to extend the buffer.  */
2096   if(text)
2097     {
2098     lexer->token.text = strdup(text);
2099     lexer->token.length = length;
2100     lexer->size = length+1;
2101     }
2102   else
2103     {
2104     lexer->token.length = 0;
2105     }
2106 }
2107
2108 /*--------------------------------------------------------------------------*/
2109 static void cmListFileLexerAppend(cmListFileLexer* lexer, const char* text,
2110                                   int length)
2111 {
2112   char* temp;
2113   int newSize;
2114
2115   /* If the appended text will fit in the buffer, do not reallocate.  */
2116   newSize = lexer->token.length + length + 1;
2117   if(lexer->token.text && newSize <= lexer->size)
2118     {
2119     strcpy(lexer->token.text+lexer->token.length, text);
2120     lexer->token.length += length;
2121     return;
2122     }
2123
2124   /* We need to extend the buffer.  */
2125   temp = (char*)malloc(newSize);
2126   if(lexer->token.text)
2127     {
2128     memcpy(temp, lexer->token.text, lexer->token.length);
2129     free(lexer->token.text);
2130     }
2131   memcpy(temp+lexer->token.length, text, length);
2132   temp[lexer->token.length+length] = 0;
2133   lexer->token.text = temp;
2134   lexer->token.length += length;
2135   lexer->size = newSize;
2136 }
2137
2138 /*--------------------------------------------------------------------------*/
2139 static int cmListFileLexerInput(cmListFileLexer* lexer, char* buffer,
2140                                 size_t bufferSize)
2141 {
2142   if(lexer)
2143     {
2144     if(lexer->file)
2145       {
2146       return (int)fread(buffer, 1, bufferSize, lexer->file);
2147       }
2148     else if(lexer->string_left)
2149       {
2150       int length = lexer->string_left;
2151       if((int)bufferSize < length) { length = (int)bufferSize; }
2152       memcpy(buffer, lexer->string_position, length);
2153       lexer->string_position += length;
2154       lexer->string_left -= length;
2155       return length;
2156       }
2157     }
2158   return 0;
2159 }
2160
2161 /*--------------------------------------------------------------------------*/
2162 static void cmListFileLexerInit(cmListFileLexer* lexer)
2163 {
2164   if(lexer->file || lexer->string_buffer)
2165     {
2166     cmListFileLexer_yylex_init(&lexer->scanner);
2167     cmListFileLexer_yyset_extra(lexer, lexer->scanner);
2168     }
2169 }
2170
2171 /*--------------------------------------------------------------------------*/
2172 static void cmListFileLexerDestroy(cmListFileLexer* lexer)
2173 {
2174   if(lexer->file || lexer->string_buffer)
2175     {
2176     cmListFileLexer_yylex_destroy(lexer->scanner);
2177     if(lexer->file)
2178       {
2179       fclose(lexer->file);
2180       lexer->file = 0;
2181       }
2182     if(lexer->string_buffer)
2183       {
2184       free(lexer->string_buffer);
2185       lexer->string_buffer = 0;
2186       lexer->string_left = 0;
2187       lexer->string_position = 0;
2188       }
2189     }
2190 }
2191
2192 /*--------------------------------------------------------------------------*/
2193 cmListFileLexer* cmListFileLexer_New()
2194 {
2195   cmListFileLexer* lexer = (cmListFileLexer*)malloc(sizeof(cmListFileLexer));
2196   if(!lexer)
2197     {
2198     return 0;
2199     }
2200   memset(lexer, 0, sizeof(*lexer));
2201   lexer->line = 1;
2202   lexer->column = 1;
2203   return lexer;
2204 }
2205
2206 /*--------------------------------------------------------------------------*/
2207 void cmListFileLexer_Delete(cmListFileLexer* lexer)
2208 {
2209   cmListFileLexer_SetFileName(lexer, 0);
2210   free(lexer);
2211 }
2212
2213 /*--------------------------------------------------------------------------*/
2214 int cmListFileLexer_SetFileName(cmListFileLexer* lexer, const char* name)
2215 {
2216   int result = 1;
2217   cmListFileLexerDestroy(lexer);
2218   if(name)
2219     {
2220     lexer->file = fopen(name, "r");
2221     if(!lexer->file)
2222       {
2223       result = 0;
2224       }
2225     }
2226   cmListFileLexerInit(lexer);
2227   return result;
2228 }
2229
2230 /*--------------------------------------------------------------------------*/
2231 int cmListFileLexer_SetString(cmListFileLexer* lexer, const char* text)
2232 {
2233   int result = 1;
2234   cmListFileLexerDestroy(lexer);
2235   if(text)
2236     {
2237     int length = (int)strlen(text);
2238     lexer->string_buffer = (char*)malloc(length+1);
2239     if(lexer->string_buffer)
2240       {
2241       strcpy(lexer->string_buffer, text);
2242       lexer->string_position = lexer->string_buffer;
2243       lexer->string_left = length;
2244       }
2245     else
2246       {
2247       result = 0;
2248       }
2249     }
2250   cmListFileLexerInit(lexer);
2251   return result;
2252 }
2253
2254 /*--------------------------------------------------------------------------*/
2255 cmListFileLexer_Token* cmListFileLexer_Scan(cmListFileLexer* lexer)
2256 {
2257   if(!lexer->file)
2258     {
2259     return 0;
2260     }
2261   if(cmListFileLexer_yylex(lexer->scanner, lexer))
2262     {
2263     return &lexer->token;
2264     }
2265   else
2266     {
2267     cmListFileLexer_SetFileName(lexer, 0);
2268     return 0;
2269     }
2270 }
2271
2272 /*--------------------------------------------------------------------------*/
2273 long cmListFileLexer_GetCurrentLine(cmListFileLexer* lexer)
2274 {
2275   if(lexer->file)
2276     {
2277     return lexer->line;
2278     }
2279   else
2280     {
2281     return 0;
2282     }
2283 }
2284
2285 /*--------------------------------------------------------------------------*/
2286 long cmListFileLexer_GetCurrentColumn(cmListFileLexer* lexer)
2287 {
2288   if(lexer->file)
2289     {
2290     return lexer->column;
2291     }
2292   else
2293     {
2294     return 0;
2295     }
2296 }
2297
2298 /*--------------------------------------------------------------------------*/
2299 const char* cmListFileLexer_GetTypeAsString(cmListFileLexer* lexer,
2300                                             cmListFileLexer_Type type)
2301 {
2302   (void)lexer;
2303   switch(type)
2304     {
2305     case cmListFileLexer_Token_None: return "nothing";
2306     case cmListFileLexer_Token_Newline: return "newline";
2307     case cmListFileLexer_Token_Identifier: return "identifier";
2308     case cmListFileLexer_Token_ParenLeft: return "left paren";
2309     case cmListFileLexer_Token_ParenRight: return "right paren";
2310     case cmListFileLexer_Token_ArgumentUnquoted: return "unquoted argument";
2311     case cmListFileLexer_Token_ArgumentQuoted: return "quoted argument";
2312     case cmListFileLexer_Token_BadCharacter: return "bad character";
2313     case cmListFileLexer_Token_BadString: return "unterminated string";
2314     }
2315   return "unknown token";
2316 }