Coverage Report

Created: 2025-12-08 06:12

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