Coverage Report

Created: 2025-11-14 06:35

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