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