Coverage Report

Created: 2025-07-14 06:48

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