Coverage Report

Created: 2025-09-04 06:27

/src/igraph/build/src/io/parsers/pajek-lexer.c
Line
Count
Source (jump to first uncovered line)
1
#line 2 "/src/igraph/build/src/io/parsers/pajek-lexer.c"
2
3
#line 4 "/src/igraph/build/src/io/parsers/pajek-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_pajek_yy_create_buffer_ALREADY_DEFINED
19
#else
20
3.74k
#define yy_create_buffer igraph_pajek_yy_create_buffer
21
#endif
22
23
#ifdef yy_delete_buffer
24
#define igraph_pajek_yy_delete_buffer_ALREADY_DEFINED
25
#else
26
3.74k
#define yy_delete_buffer igraph_pajek_yy_delete_buffer
27
#endif
28
29
#ifdef yy_scan_buffer
30
#define igraph_pajek_yy_scan_buffer_ALREADY_DEFINED
31
#else
32
0
#define yy_scan_buffer igraph_pajek_yy_scan_buffer
33
#endif
34
35
#ifdef yy_scan_string
36
#define igraph_pajek_yy_scan_string_ALREADY_DEFINED
37
#else
38
#define yy_scan_string igraph_pajek_yy_scan_string
39
#endif
40
41
#ifdef yy_scan_bytes
42
#define igraph_pajek_yy_scan_bytes_ALREADY_DEFINED
43
#else
44
0
#define yy_scan_bytes igraph_pajek_yy_scan_bytes
45
#endif
46
47
#ifdef yy_init_buffer
48
#define igraph_pajek_yy_init_buffer_ALREADY_DEFINED
49
#else
50
8.81k
#define yy_init_buffer igraph_pajek_yy_init_buffer
51
#endif
52
53
#ifdef yy_flush_buffer
54
#define igraph_pajek_yy_flush_buffer_ALREADY_DEFINED
55
#else
56
8.81k
#define yy_flush_buffer igraph_pajek_yy_flush_buffer
57
#endif
58
59
#ifdef yy_load_buffer_state
60
#define igraph_pajek_yy_load_buffer_state_ALREADY_DEFINED
61
#else
62
13.8k
#define yy_load_buffer_state igraph_pajek_yy_load_buffer_state
63
#endif
64
65
#ifdef yy_switch_to_buffer
66
#define igraph_pajek_yy_switch_to_buffer_ALREADY_DEFINED
67
#else
68
0
#define yy_switch_to_buffer igraph_pajek_yy_switch_to_buffer
69
#endif
70
71
#ifdef yypush_buffer_state
72
#define igraph_pajek_yypush_buffer_state_ALREADY_DEFINED
73
#else
74
#define yypush_buffer_state igraph_pajek_yypush_buffer_state
75
#endif
76
77
#ifdef yypop_buffer_state
78
#define igraph_pajek_yypop_buffer_state_ALREADY_DEFINED
79
#else
80
3.74k
#define yypop_buffer_state igraph_pajek_yypop_buffer_state
81
#endif
82
83
#ifdef yyensure_buffer_stack
84
#define igraph_pajek_yyensure_buffer_stack_ALREADY_DEFINED
85
#else
86
3.74k
#define yyensure_buffer_stack igraph_pajek_yyensure_buffer_stack
87
#endif
88
89
#ifdef yylex
90
#define igraph_pajek_yylex_ALREADY_DEFINED
91
#else
92
#define yylex igraph_pajek_yylex
93
#endif
94
95
#ifdef yyrestart
96
#define igraph_pajek_yyrestart_ALREADY_DEFINED
97
#else
98
5.06k
#define yyrestart igraph_pajek_yyrestart
99
#endif
100
101
#ifdef yylex_init
102
#define igraph_pajek_yylex_init_ALREADY_DEFINED
103
#else
104
#define yylex_init igraph_pajek_yylex_init
105
#endif
106
107
#ifdef yylex_init_extra
108
#define igraph_pajek_yylex_init_extra_ALREADY_DEFINED
109
#else
110
#define yylex_init_extra igraph_pajek_yylex_init_extra
111
#endif
112
113
#ifdef yylex_destroy
114
#define igraph_pajek_yylex_destroy_ALREADY_DEFINED
115
#else
116
#define yylex_destroy igraph_pajek_yylex_destroy
117
#endif
118
119
#ifdef yyget_debug
120
#define igraph_pajek_yyget_debug_ALREADY_DEFINED
121
#else
122
#define yyget_debug igraph_pajek_yyget_debug
123
#endif
124
125
#ifdef yyset_debug
126
#define igraph_pajek_yyset_debug_ALREADY_DEFINED
127
#else
128
#define yyset_debug igraph_pajek_yyset_debug
129
#endif
130
131
#ifdef yyget_extra
132
#define igraph_pajek_yyget_extra_ALREADY_DEFINED
133
#else
134
#define yyget_extra igraph_pajek_yyget_extra
135
#endif
136
137
#ifdef yyset_extra
138
#define igraph_pajek_yyset_extra_ALREADY_DEFINED
139
#else
140
7.49k
#define yyset_extra igraph_pajek_yyset_extra
141
#endif
142
143
#ifdef yyget_in
144
#define igraph_pajek_yyget_in_ALREADY_DEFINED
145
#else
146
#define yyget_in igraph_pajek_yyget_in
147
#endif
148
149
#ifdef yyset_in
150
#define igraph_pajek_yyset_in_ALREADY_DEFINED
151
#else
152
#define yyset_in igraph_pajek_yyset_in
153
#endif
154
155
#ifdef yyget_out
156
#define igraph_pajek_yyget_out_ALREADY_DEFINED
157
#else
158
#define yyget_out igraph_pajek_yyget_out
159
#endif
160
161
#ifdef yyset_out
162
#define igraph_pajek_yyset_out_ALREADY_DEFINED
163
#else
164
#define yyset_out igraph_pajek_yyset_out
165
#endif
166
167
#ifdef yyget_leng
168
#define igraph_pajek_yyget_leng_ALREADY_DEFINED
169
#else
170
#define yyget_leng igraph_pajek_yyget_leng
171
#endif
172
173
#ifdef yyget_text
174
#define igraph_pajek_yyget_text_ALREADY_DEFINED
175
#else
176
#define yyget_text igraph_pajek_yyget_text
177
#endif
178
179
#ifdef yyget_lineno
180
#define igraph_pajek_yyget_lineno_ALREADY_DEFINED
181
#else
182
#define yyget_lineno igraph_pajek_yyget_lineno
183
#endif
184
185
#ifdef yyset_lineno
186
#define igraph_pajek_yyset_lineno_ALREADY_DEFINED
187
#else
188
#define yyset_lineno igraph_pajek_yyset_lineno
189
#endif
190
191
#ifdef yyget_column
192
#define igraph_pajek_yyget_column_ALREADY_DEFINED
193
#else
194
#define yyget_column igraph_pajek_yyget_column
195
#endif
196
197
#ifdef yyset_column
198
#define igraph_pajek_yyset_column_ALREADY_DEFINED
199
#else
200
#define yyset_column igraph_pajek_yyset_column
201
#endif
202
203
#ifdef yywrap
204
#define igraph_pajek_yywrap_ALREADY_DEFINED
205
#else
206
5.06k
#define yywrap igraph_pajek_yywrap
207
#endif
208
209
#ifdef yyget_lval
210
#define igraph_pajek_yyget_lval_ALREADY_DEFINED
211
#else
212
#define yyget_lval igraph_pajek_yyget_lval
213
#endif
214
215
#ifdef yyset_lval
216
#define igraph_pajek_yyset_lval_ALREADY_DEFINED
217
#else
218
#define yyset_lval igraph_pajek_yyset_lval
219
#endif
220
221
#ifdef yyget_lloc
222
#define igraph_pajek_yyget_lloc_ALREADY_DEFINED
223
#else
224
#define yyget_lloc igraph_pajek_yyget_lloc
225
#endif
226
227
#ifdef yyset_lloc
228
#define igraph_pajek_yyset_lloc_ALREADY_DEFINED
229
#else
230
#define yyset_lloc igraph_pajek_yyset_lloc
231
#endif
232
233
#ifdef yyalloc
234
#define igraph_pajek_yyalloc_ALREADY_DEFINED
235
#else
236
14.9k
#define yyalloc igraph_pajek_yyalloc
237
#endif
238
239
#ifdef yyrealloc
240
#define igraph_pajek_yyrealloc_ALREADY_DEFINED
241
#else
242
287
#define yyrealloc igraph_pajek_yyrealloc
243
#endif
244
245
#ifdef yyfree
246
#define igraph_pajek_yyfree_ALREADY_DEFINED
247
#else
248
18.7k
#define yyfree igraph_pajek_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
2.34k
#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
520M
#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
64.6k
#define yyin yyg->yyin_r
357
14.9k
#define yyout yyg->yyout_r
358
15.2k
#define yyextra yyg->yyextra_r
359
64.8M
#define yyleng yyg->yyleng_r
360
28.9M
#define yytext yyg->yytext_r
361
19.7M
#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
362
3.69M
#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
51.4k
#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
17.3k
#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
52.1k
#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
3.74k
#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
17.8k
#define EOB_ACT_CONTINUE_SCAN 0
410
10.1k
#define EOB_ACT_END_OF_FILE 1
411
6.54k
#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
12.1k
            do { \
422
12.1k
                int yyl;\
423
24.2k
                for ( yyl = n; yyl < yyleng; ++yyl )\
424
12.1k
                    if ( yytext[yyl] == '\n' )\
425
12.1k
                        --yylineno;\
426
12.1k
            }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
12.1k
  do \
438
12.1k
    { \
439
12.1k
    /* Undo effects of setting up yytext. */ \
440
12.1k
        int yyless_macro_arg = (n); \
441
12.1k
        YY_LESS_LINENO(yyless_macro_arg);\
442
12.1k
    *yy_cp = yyg->yy_hold_char; \
443
12.1k
    YY_RESTORE_YY_MORE_OFFSET \
444
12.1k
    yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
445
12.1k
    YY_DO_BEFORE_ACTION; /* set up yytext again */ \
446
12.1k
    } \
447
12.1k
  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
26.2k
#define YY_BUFFER_NEW 0
499
6.08k
#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
20.5k
#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
3.75M
#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
522
3.75M
                          ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
523
3.75M
                          : 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
59.5M
#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
3.70M
  { \
562
3.70M
  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
3.70M
  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
568
3.70M
  }
569
16.0M
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
570
571
/* Begin user sect3 */
572
573
5.06k
#define igraph_pajek_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
16.2M
#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
16.0M
  yyg->yytext_ptr = yy_bp; \
591
16.0M
  yyleng = (int) (yy_cp - yy_bp); \
592
16.0M
  yyg->yy_hold_char = *yy_cp; \
593
16.0M
  *yy_cp = '\0'; \
594
16.0M
  yyg->yy_c_buf_p = yy_cp;
595
#define YY_NUM_RULES 57
596
32.1M
#define YY_END_OF_BUFFER 58
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[161] =
605
    {   0,
606
        0,    0,    0,    0,    6,    6,    0,    0,    0,    0,
607
        0,    0,   58,   56,    8,   17,   17,   55,   56,   55,
608
       19,   55,   56,    4,    5,    5,    4,    3,    6,    6,
609
        2,    2,    2,    2,   55,   55,   55,   55,   55,   24,
610
       23,   55,   55,   55,   40,   38,   55,   55,   55,   47,
611
       39,   41,   37,    8,   17,   55,    0,   18,   19,   55,
612
       55,    0,    7,    7,   55,   16,   16,   16,   16,   16,
613
       16,    4,    4,    5,    6,    6,    0,   26,   27,   55,
614
       25,   29,   28,   55,   30,   55,   55,   55,   55,   42,
615
       44,   46,   55,   35,   36,   43,   45,   52,   51,   48,
616
617
       49,   19,   55,   19,    7,   16,   16,   16,   16,   16,
618
        1,   55,   32,   55,   22,   34,   55,   55,   55,   53,
619
       55,   16,   16,   16,   16,   16,   33,   31,   55,   55,
620
       54,   50,   11,   16,   16,   16,   16,   55,   55,   16,
621
       12,   16,   16,   16,   20,   21,   16,   16,   15,   16,
622
       16,   16,   16,    9,   16,   13,   16,   10,   14,    0
623
    } ;
624
625
static const YY_CHAR yy_ec[256] =
626
    {   0,
627
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
628
        1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
629
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
630
        1,    2,    5,    6,    5,    5,    7,    5,    5,    5,
631
        5,    8,    9,    5,   10,   11,    5,   12,   13,   14,
632
       12,   12,   12,   12,   12,   12,   12,    5,    5,    5,
633
        5,    5,    5,    5,   15,   16,   17,   18,   19,   20,
634
       21,   22,   23,    5,   24,   25,   26,   27,   28,   29,
635
       30,   31,   32,   33,   34,   35,   36,   37,   38,    5,
636
        5,    5,    5,    5,   39,    5,   40,   41,   42,   43,
637
638
       44,   45,   46,   47,   48,    5,   49,   50,   51,   52,
639
       53,   54,   55,   56,   57,   58,   59,   60,   61,   62,
640
       63,    5,    5,    5,    5,    5,    1,    5,    5,    5,
641
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
642
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
643
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
644
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
645
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
646
        5,    5,    5,    5,    5,    5,   64,    5,    5,    5,
647
       65,    5,    5,    5,    5,    5,    5,    5,    5,    5,
648
649
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
650
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
651
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
652
        5,    5,    5,    5,    5,    5,    5,    5,   66,    5,
653
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
654
        5,    5,    5,    5,    5
655
    } ;
656
657
static const YY_CHAR yy_meta[68] =
658
    {   0,
659
        1,    2,    3,    3,    4,    2,    4,    2,    4,    4,
660
        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
661
        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
662
        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
663
        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
664
        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
665
        4,    4,    4,    4,    4,    4,    5
666
    } ;
667
668
static const flex_int16_t yy_base[172] =
669
    {   0,
670
        0,   67,   15,   23,   31,   35,   18,   26,  134,   33,
671
      201,   35,  337,  392,  331,  328,  328,    0,  243,   32,
672
       39,   53,   69,  237,  208,  197,    0,  392,  196,    0,
673
      392,  178,  392,   94,   30,   32,   45,   99,   42,    0,
674
        0,   47,   93,   86,   97,    0,   65,   35,   86,  152,
675
        0,    0,    0,  115,  392,    0,  109,  392,  252,   93,
676
      164,  119,  108,   98,  232,    0,   63,   90,  109,  108,
677
      112,   95,    0,  392,   84,    0,    0,    0,    0,  134,
678
        0,    0,    0,  123,    0,  137,  137,  175,  179,    0,
679
        0,    0,  190,    0,    0,    0,    0,    0,    0,  197,
680
681
        0,  240,  215,  260,  392,  214,  211,  212,  227,  230,
682
      392,  234,    0,  246,    0,    0,  260,  261,  244,    0,
683
      255,  247,  261,  250,  246,  250,    0,    0,  270,  271,
684
        0,    0,  264,  258,  268,  265,  272,  264,  265,  276,
685
      284,  273,  280,  300,    0,    0,  287,  298,    0,  301,
686
      307,  294,  296,    0,  297,    0,  297,    0,    0,  392,
687
      355,  360,  365,  370,    3,  375,  378,    1,  381,  384,
688
      387
689
    } ;
690
691
static const flex_int16_t yy_def[172] =
692
    {   0,
693
      161,  161,  162,  162,  163,  163,  164,  164,  161,    9,
694
      161,   11,  160,  160,  160,  160,  160,  165,  166,  165,
695
      165,  167,  168,  169,  160,  160,  169,  160,  170,  170,
696
      160,  160,  160,  160,  165,  165,  165,  165,  165,  165,
697
      165,  165,  165,  165,  165,  165,  165,  165,  165,  165,
698
      165,  165,  165,  160,  160,  165,  166,  160,  165,  165,
699
      165,  171,  160,  160,  167,  168,  168,  168,  168,  168,
700
      168,  169,  169,  160,  170,  170,  160,  165,  165,  165,
701
      165,  165,  165,  165,  165,  165,  165,  165,  165,  165,
702
      165,  165,  165,  165,  165,  165,  165,  165,  165,  165,
703
704
      165,  165,  165,  165,  160,  168,  168,  168,  168,  168,
705
      160,  165,  165,  165,  165,  165,  165,  165,  165,  165,
706
      165,  168,  168,  168,  168,  168,  165,  165,  165,  165,
707
      165,  165,  168,  168,  168,  168,  168,  165,  165,  168,
708
      168,  168,  168,  168,  165,  165,  168,  168,  168,  168,
709
      168,  168,  168,  168,  168,  168,  168,  168,  168,    0,
710
      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
711
      160
712
    } ;
713
714
static const flex_int16_t yy_nxt[460] =
715
    {   0,
716
       14,   15,   16,   17,   66,   19,   56,   14,   20,   20,
717
      160,   21,   21,   21,  160,   14,   24,   25,   26,   32,
718
       33,  160,   14,   14,   24,   25,   26,   32,   33,  160,
719
       28,   14,   29,   25,   26,   14,   29,   25,   26,   22,
720
       23,   22,   23,   59,   59,   59,   78,   94,   95,   60,
721
       59,   59,   59,  160,   62,   63,   64,   61,   62,   80,
722
       62,   81,  160,   86,  111,   79,   14,   14,   15,   16,
723
       17,   78,   19,   22,   23,   20,   20,   87,   21,   21,
724
       21,   14,   61,   67,   80,   75,   81,   68,   86,   14,
725
       79,   34,   93,  106,   69,   70,   72,   14,   96,   97,
726
727
      105,   14,   87,   71,  102,  102,  102,  107,   67,   90,
728
       91,  105,   68,   82,   58,   83,   54,   93,  106,   69,
729
       70,   63,   64,  108,   89,   92,  109,   84,   71,   85,
730
      110,   88,  107,   14,   14,   15,   16,   17,   82,   19,
731
       83,   14,   20,   20,  114,   21,   21,   21,  108,   35,
732
       92,  109,   84,   36,   85,  110,   37,   77,   38,  115,
733
      112,  116,   39,   40,   41,  113,   98,   42,   99,  114,
734
       43,   44,  103,  103,   35,  104,  104,  104,   36,   54,
735
      100,   37,  101,   38,  115,  112,  116,   39,   40,   41,
736
      113,   98,   42,   99,  117,   43,   44,   75,  118,   74,
737
738
       14,   14,   15,   16,   17,  100,   19,  101,   14,   20,
739
       20,   74,   21,   21,   21,   45,  119,   46,  121,  117,
740
       47,  120,   48,  118,   49,   50,  104,  104,  104,   51,
741
      122,  123,   52,   62,   63,   64,   53,   62,   72,   62,
742
       45,  119,   46,  121,  124,   47,  120,   48,   58,   49,
743
       50,  102,  102,  102,   51,  122,  123,   52,   61,  125,
744
      126,   53,   60,   59,   59,   59,  127,   14,  128,  124,
745
       61,  104,  104,  104,  129,  130,  131,  132,  133,  134,
746
      135,  136,  137,   61,  125,  126,  138,  139,  140,  141,
747
      142,  127,  143,  128,  144,   61,  145,  146,  147,  129,
748
749
      130,  131,  132,  133,  134,  135,  136,  137,  148,  149,
750
      150,  138,  139,  140,  141,  142,  151,  143,  152,  144,
751
      153,  145,  146,  147,  154,  155,  156,  157,  158,  159,
752
       55,   55,   54,  148,  149,  150,  160,  160,  160,  160,
753
      160,  151,  160,  152,  160,  153,  160,  160,  160,  154,
754
      155,  156,  157,  158,  159,   18,   18,   18,   18,   18,
755
       27,   27,   27,   27,   27,   30,   30,   30,   30,   30,
756
       31,   31,   31,   31,   31,   57,   57,  160,   57,   65,
757
       65,   65,   73,  160,   73,   76,  160,   76,   62,   62,
758
       62,   13,  160,  160,  160,  160,  160,  160,  160,  160,
759
760
      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
761
      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
762
      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
763
      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
764
      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
765
      160,  160,  160,  160,  160,  160,  160,  160,  160
766
    } ;
767
768
static const flex_int16_t yy_chk[460] =
769
    {   0,
770
        1,    1,    1,    1,  168,    1,  165,    1,    1,    1,
771
        0,    1,    1,    1,    0,    3,    3,    3,    3,    7,
772
        7,    0,    3,    4,    4,    4,    4,    8,    8,    0,
773
        4,    5,    5,    5,    5,    6,    6,    6,    6,   10,
774
       10,   12,   12,   20,   20,   20,   35,   48,   48,   21,
775
       21,   21,   21,    0,   22,   22,   22,   21,   22,   36,
776
       22,   37,    0,   39,   77,   35,    1,    2,    2,    2,
777
        2,   35,    2,    2,    2,    2,    2,   42,    2,    2,
778
        2,    3,   21,   23,   36,   75,   37,   23,   39,    4,
779
       35,    8,   47,   67,   23,   23,   72,    5,   49,   49,
780
781
       64,    6,   42,   23,   60,   60,   60,   68,   23,   45,
782
       45,   63,   23,   38,   57,   38,   54,   47,   67,   23,
783
       23,   62,   62,   69,   44,   45,   70,   38,   23,   38,
784
       71,   43,   68,    2,    9,    9,    9,    9,   38,    9,
785
       38,    9,    9,    9,   84,    9,    9,    9,   69,    9,
786
       45,   70,   38,    9,   38,   71,    9,   34,    9,   86,
787
       80,   87,    9,    9,    9,   80,   50,    9,   50,   84,
788
        9,    9,   61,   61,    9,   61,   61,   61,    9,   32,
789
       50,    9,   50,    9,   86,   80,   87,    9,    9,    9,
790
       80,   50,    9,   50,   88,    9,    9,   29,   89,   26,
791
792
        9,   11,   11,   11,   11,   50,   11,   50,   11,   11,
793
       11,   25,   11,   11,   11,   11,   93,   11,  100,   88,
794
       11,   93,   11,   89,   11,   11,  103,  103,  103,   11,
795
      106,  107,   11,   65,   65,   65,   11,   65,   24,   65,
796
       11,   93,   11,  100,  108,   11,   93,   11,   19,   11,
797
       11,  102,  102,  102,   11,  106,  107,   11,  102,  109,
798
      110,   11,   59,   59,   59,   59,  112,   11,  114,  108,
799
       59,  104,  104,  104,  117,  118,  119,  121,  122,  123,
800
      124,  125,  126,  102,  109,  110,  129,  130,  133,  134,
801
      135,  112,  136,  114,  137,   59,  138,  139,  140,  117,
802
803
      118,  119,  121,  122,  123,  124,  125,  126,  141,  142,
804
      143,  129,  130,  133,  134,  135,  144,  136,  147,  137,
805
      148,  138,  139,  140,  150,  151,  152,  153,  155,  157,
806
       17,   16,   15,  141,  142,  143,   13,    0,    0,    0,
807
        0,  144,    0,  147,    0,  148,    0,    0,    0,  150,
808
      151,  152,  153,  155,  157,  161,  161,  161,  161,  161,
809
      162,  162,  162,  162,  162,  163,  163,  163,  163,  163,
810
      164,  164,  164,  164,  164,  166,  166,    0,  166,  167,
811
      167,  167,  169,    0,  169,  170,    0,  170,  171,  171,
812
      171,  160,  160,  160,  160,  160,  160,  160,  160,  160,
813
814
      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
815
      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
816
      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
817
      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
818
      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
819
      160,  160,  160,  160,  160,  160,  160,  160,  160
820
    } ;
821
822
/* Table of booleans, true if rule could match eol. */
823
static const flex_int32_t yy_rule_can_match_eol[58] =
824
    {   0,
825
0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 
826
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
827
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,     };
828
829
/* The intent behind this definition is that it'll catch
830
 * any uses of REJECT which flex missed.
831
 */
832
#define REJECT reject_used_but_not_detected
833
#define yymore() yymore_used_but_not_detected
834
50.3k
#define YY_MORE_ADJ 0
835
#define YY_RESTORE_YY_MORE_OFFSET
836
#line 1 "/src/igraph/src/io/pajek-lexer.l"
837
/*
838
   igraph library.
839
   Copyright (C) 2006-2012  Gabor Csardi <csardi.gabor@gmail.com>
840
   334 Harvard st, Cambridge, MA, 02138 USA
841
842
   This program is free software; you can redistribute it and/or modify
843
   it under the terms of the GNU General Public License as published by
844
   the Free Software Foundation; either version 2 of the License, or
845
   (at your option) any later version.
846
847
   This program is distributed in the hope that it will be useful,
848
   but WITHOUT ANY WARRANTY; without even the implied warranty of
849
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
850
   GNU General Public License for more details.
851
852
   You should have received a copy of the GNU General Public License
853
   along with this program; if not, write to the Free Software
854
   Foundation, Inc.,  51 Franklin Street, Fifth Floor, Boston, MA
855
   02110-1301 USA
856
857
*/
858
#line 24 "/src/igraph/src/io/pajek-lexer.l"
859
860
/*
861
   igraph library.
862
   Copyright (C) 2006-2012  Gabor Csardi <csardi.gabor@gmail.com>
863
   334 Harvard st, Cambridge, MA, 02138 USA
864
865
   This program is free software; you can redistribute it and/or modify
866
   it under the terms of the GNU General Public License as published by
867
   the Free Software Foundation; either version 2 of the License, or
868
   (at your option) any later version.
869
870
   This program is distributed in the hope that it will be useful,
871
   but WITHOUT ANY WARRANTY; without even the implied warranty of
872
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
873
   GNU General Public License for more details.
874
875
   You should have received a copy of the GNU General Public License
876
   along with this program; if not, write to the Free Software
877
   Foundation, Inc.,  51 Franklin Street, Fifth Floor, Boston, MA
878
   02110-1301 USA
879
880
*/
881
882
#include "io/pajek-header.h"
883
#include "io/parsers/pajek-parser.h"
884
885
#include <stdlib.h>
886
887
#define YY_EXTRA_TYPE igraph_i_pajek_parsedata_t*
888
16.0M
#define YY_USER_ACTION yylloc->first_line = yylineno;
889
0
#define YY_FATAL_ERROR(msg) IGRAPH_FATAL("Error in Pajek parser: " # msg)
890
3.74k
#define YY_USER_INIT BEGIN(bom) /* we start in the 'bom' start condition */
891
#ifdef USING_R
892
#define fprintf(file, msg, ...) (1)
893
#ifdef stdout
894
#  undef stdout
895
#endif
896
#define stdout 0
897
#endif
898
#line 899 "/src/igraph/build/src/io/parsers/pajek-lexer.c"
899
#define YY_NO_INPUT 1
900
/* Any use of {newline} below must use yy_set_bol(true) in order to mark the character
901
   following a single \r as the first on a new line, and allow the ^ pattern to match.
902
   This pattern must match single newlines only, in order to follow Pajek's "no newline
903
   after *Vertices" convention. */
904
/* Anything except non-printable (00-1F), space (20), del (7F), '"' and '*'. */
905
/* 'unknown' skips text at the beginning of the file, lines below an unknown *Word
906
 * 'unknown_line' skips the rest of the line after an unknown *Word. */
907
908
/* Notes:
909
  *  - Unquoted '*' characters may only appear at the start of a line-initial word.
910
  *  - Both LF and CR LF line endings are allowed.
911
  *  - Pajek files do not allow empty lines after *Vertices (empty lines should signify the end of the file),
912
  *    therefore we are careful not to skip newlines in the lexer.
913
  */
914
#line 915 "/src/igraph/build/src/io/parsers/pajek-lexer.c"
915
916
24.4k
#define INITIAL 0
917
8.62k
#define unknown 1
918
4.93k
#define unknown_line 2
919
3.74k
#define bom 3
920
3.45k
#define vert 4
921
6.21k
#define edge 5
922
923
#ifndef YY_NO_UNISTD_H
924
/* Special case for "unistd.h", since it is non-ANSI. We include it way
925
 * down here because we want the user's section 1 to have been scanned first.
926
 * The user has a chance to override it with an option.
927
 */
928
#include <unistd.h>
929
#endif
930
931
#ifndef YY_EXTRA_TYPE
932
#define YY_EXTRA_TYPE void *
933
#endif
934
935
/* Holds the entire state of the reentrant scanner. */
936
struct yyguts_t
937
    {
938
939
    /* User-defined. Not touched by flex. */
940
    YY_EXTRA_TYPE yyextra_r;
941
942
    /* The rest are the same as the globals declared in the non-reentrant scanner. */
943
    FILE *yyin_r, *yyout_r;
944
    size_t yy_buffer_stack_top; /**< index of top of stack. */
945
    size_t yy_buffer_stack_max; /**< capacity of stack. */
946
    YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
947
    char yy_hold_char;
948
    int yy_n_chars;
949
    int yyleng_r;
950
    char *yy_c_buf_p;
951
    int yy_init;
952
    int yy_start;
953
    int yy_did_buffer_switch_on_eof;
954
    int yy_start_stack_ptr;
955
    int yy_start_stack_depth;
956
    int *yy_start_stack;
957
    yy_state_type yy_last_accepting_state;
958
    char* yy_last_accepting_cpos;
959
960
    int yylineno_r;
961
    int yy_flex_debug_r;
962
963
    char *yytext_r;
964
    int yy_more_flag;
965
    int yy_more_len;
966
967
    YYSTYPE * yylval_r;
968
969
    YYLTYPE * yylloc_r;
970
971
    }; /* end struct yyguts_t */
972
973
static int yy_init_globals ( yyscan_t yyscanner );
974
975
    /* This must go here because YYSTYPE and YYLTYPE are included
976
     * from bison output in section 1.*/
977
11.3M
    #    define yylval yyg->yylval_r
978
    
979
27.3M
    #    define yylloc yyg->yylloc_r
980
    
981
int yylex_init (yyscan_t* scanner);
982
983
int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
984
985
/* Accessor methods to globals.
986
   These are made visible to non-reentrant scanners for convenience. */
987
988
int yylex_destroy ( yyscan_t yyscanner );
989
990
int yyget_debug ( yyscan_t yyscanner );
991
992
void yyset_debug ( int debug_flag , yyscan_t yyscanner );
993
994
YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
995
996
void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
997
998
FILE *yyget_in ( yyscan_t yyscanner );
999
1000
void yyset_in  ( FILE * _in_str , yyscan_t yyscanner );
1001
1002
FILE *yyget_out ( yyscan_t yyscanner );
1003
1004
void yyset_out  ( FILE * _out_str , yyscan_t yyscanner );
1005
1006
      int yyget_leng ( yyscan_t yyscanner );
1007
1008
char *yyget_text ( yyscan_t yyscanner );
1009
1010
int yyget_lineno ( yyscan_t yyscanner );
1011
1012
void yyset_lineno ( int _line_number , yyscan_t yyscanner );
1013
1014
int yyget_column  ( yyscan_t yyscanner );
1015
1016
void yyset_column ( int _column_no , yyscan_t yyscanner );
1017
1018
YYSTYPE * yyget_lval ( yyscan_t yyscanner );
1019
1020
void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
1021
1022
       YYLTYPE *yyget_lloc ( yyscan_t yyscanner );
1023
    
1024
        void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner );
1025
    
1026
/* Macros after this point can all be overridden by user definitions in
1027
 * section 1.
1028
 */
1029
1030
#ifndef YY_SKIP_YYWRAP
1031
#ifdef __cplusplus
1032
extern "C" int yywrap ( yyscan_t yyscanner );
1033
#else
1034
extern int yywrap ( yyscan_t yyscanner );
1035
#endif
1036
#endif
1037
1038
#ifndef YY_NO_UNPUT
1039
    
1040
#endif
1041
1042
#ifndef yytext_ptr
1043
static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
1044
#endif
1045
1046
#ifdef YY_NEED_STRLEN
1047
static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
1048
#endif
1049
1050
#ifndef YY_NO_INPUT
1051
#ifdef __cplusplus
1052
static int yyinput ( yyscan_t yyscanner );
1053
#else
1054
static int input ( yyscan_t yyscanner );
1055
#endif
1056
1057
#endif
1058
1059
/* Amount of stuff to slurp up with each read. */
1060
#ifndef YY_READ_BUF_SIZE
1061
#ifdef __ia64__
1062
/* On IA-64, the buffer size is 16k, not 8k */
1063
#define YY_READ_BUF_SIZE 16384
1064
#else
1065
29.0k
#define YY_READ_BUF_SIZE 8192
1066
#endif /* __ia64__ */
1067
#endif
1068
1069
/* Copy whatever the last rule matched to the standard output. */
1070
#ifndef ECHO
1071
/* This used to be an fputs(), but since the string might contain NUL's,
1072
 * we now use fwrite().
1073
 */
1074
#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1075
#endif
1076
1077
/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
1078
 * is returned in "result".
1079
 */
1080
#ifndef YY_INPUT
1081
#define YY_INPUT(buf,result,max_size) \
1082
14.9k
  if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1083
14.9k
    { \
1084
0
    int c = '*'; \
1085
0
    int n; \
1086
0
    for ( n = 0; n < max_size && \
1087
0
           (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1088
0
      buf[n] = (char) c; \
1089
0
    if ( c == '\n' ) \
1090
0
      buf[n++] = (char) c; \
1091
0
    if ( c == EOF && ferror( yyin ) ) \
1092
0
      YY_FATAL_ERROR( "input in flex scanner failed" ); \
1093
0
    result = n; \
1094
0
    } \
1095
14.9k
  else \
1096
14.9k
    { \
1097
14.9k
    errno=0; \
1098
14.9k
    while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1099
14.9k
      { \
1100
0
      if( errno != EINTR) \
1101
0
        { \
1102
0
        YY_FATAL_ERROR( "input in flex scanner failed" ); \
1103
0
        break; \
1104
0
        } \
1105
0
      errno=0; \
1106
0
      clearerr(yyin); \
1107
0
      } \
1108
14.9k
    }\
1109
\
1110
1111
#endif
1112
1113
/* No semi-colon after return; correct usage is to write "yyterminate();" -
1114
 * we don't want an extra ';' after the "return" because that will cause
1115
 * some compilers to complain about unreachable statements.
1116
 */
1117
#ifndef yyterminate
1118
2.34k
#define yyterminate() return YY_NULL
1119
#endif
1120
1121
/* Number of entries by which start-condition stack grows. */
1122
#ifndef YY_START_STACK_INCR
1123
#define YY_START_STACK_INCR 25
1124
#endif
1125
1126
/* Report a fatal error. */
1127
#ifndef YY_FATAL_ERROR
1128
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
1129
#endif
1130
1131
/* end tables serialization structures and prototypes */
1132
1133
/* Default declaration of generated scanner - a define so the user can
1134
 * easily add parameters.
1135
 */
1136
#ifndef YY_DECL
1137
#define YY_DECL_IS_OURS 1
1138
1139
extern int yylex \
1140
               (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner);
1141
1142
#define YY_DECL int yylex \
1143
               (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
1144
#endif /* !YY_DECL */
1145
1146
/* Code executed at the beginning of each rule, after yytext and yyleng
1147
 * have been set up.
1148
 */
1149
#ifndef YY_USER_ACTION
1150
#define YY_USER_ACTION
1151
#endif
1152
1153
/* Code executed at the end of each rule. */
1154
#ifndef YY_BREAK
1155
4.74M
#define YY_BREAK /*LINTED*/break;
1156
#endif
1157
1158
#define YY_RULE_SETUP \
1159
16.0M
  if ( yyleng > 0 ) \
1160
16.0M
    YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1161
16.0M
        (yytext[yyleng - 1] == '\n'); \
1162
16.0M
  YY_USER_ACTION
1163
1164
/** The main scanner function which does all the work.
1165
 */
1166
YY_DECL
1167
11.3M
{
1168
11.3M
  yy_state_type yy_current_state;
1169
11.3M
  char *yy_cp, *yy_bp;
1170
11.3M
  int yy_act;
1171
11.3M
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1172
1173
11.3M
    yylval = yylval_param;
1174
1175
11.3M
    yylloc = yylloc_param;
1176
1177
11.3M
  if ( !yyg->yy_init )
1178
3.74k
    {
1179
3.74k
    yyg->yy_init = 1;
1180
1181
3.74k
#ifdef YY_USER_INIT
1182
3.74k
    YY_USER_INIT;
1183
3.74k
#endif
1184
1185
3.74k
    if ( ! yyg->yy_start )
1186
0
      yyg->yy_start = 1; /* first start state */
1187
1188
3.74k
    if ( ! yyin )
1189
0
      yyin = stdin;
1190
1191
3.74k
    if ( ! yyout )
1192
3.74k
      yyout = stdout;
1193
1194
3.74k
    if ( ! YY_CURRENT_BUFFER ) {
1195
3.74k
      yyensure_buffer_stack (yyscanner);
1196
3.74k
      YY_CURRENT_BUFFER_LVALUE =
1197
3.74k
        yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
1198
3.74k
    }
1199
1200
3.74k
    yy_load_buffer_state( yyscanner );
1201
3.74k
    }
1202
1203
11.3M
  {
1204
11.3M
#line 104 "/src/igraph/src/io/pajek-lexer.l"
1205
1206
1207
11.3M
#line 107 "/src/igraph/src/io/pajek-lexer.l"
1208
 /* Skip a UTF-8 BOM at the very beginning of the file, if present, then immediately switch to 'unknown'. */
1209
11.3M
#line 1210 "/src/igraph/build/src/io/parsers/pajek-lexer.c"
1210
1211
16.0M
  while ( /*CONSTCOND*/1 )    /* loops until end-of-file is reached */
1212
16.0M
    {
1213
16.0M
    yy_cp = yyg->yy_c_buf_p;
1214
1215
    /* Support of yytext. */
1216
16.0M
    *yy_cp = yyg->yy_hold_char;
1217
1218
    /* yy_bp points to the position in yy_ch_buf of the start of
1219
     * the current run.
1220
     */
1221
16.0M
    yy_bp = yy_cp;
1222
1223
16.0M
    yy_current_state = yyg->yy_start;
1224
16.0M
    yy_current_state += YY_AT_BOL();
1225
16.0M
yy_match:
1226
16.0M
    do
1227
56.4M
      {
1228
56.4M
      YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1229
56.4M
      if ( yy_accept[yy_current_state] )
1230
37.4M
        {
1231
37.4M
        yyg->yy_last_accepting_state = yy_current_state;
1232
37.4M
        yyg->yy_last_accepting_cpos = yy_cp;
1233
37.4M
        }
1234
100M
      while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1235
44.1M
        {
1236
44.1M
        yy_current_state = (int) yy_def[yy_current_state];
1237
44.1M
        if ( yy_current_state >= 161 )
1238
28.3M
          yy_c = yy_meta[yy_c];
1239
44.1M
        }
1240
56.4M
      yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1241
56.4M
      ++yy_cp;
1242
56.4M
      }
1243
56.4M
    while ( yy_base[yy_current_state] != 392 );
1244
1245
16.0M
yy_find_action:
1246
16.0M
    yy_act = yy_accept[yy_current_state];
1247
16.0M
    if ( yy_act == 0 )
1248
15.7M
      { /* have to back up */
1249
15.7M
      yy_cp = yyg->yy_last_accepting_cpos;
1250
15.7M
      yy_current_state = yyg->yy_last_accepting_state;
1251
15.7M
      yy_act = yy_accept[yy_current_state];
1252
15.7M
      }
1253
1254
16.0M
    YY_DO_BEFORE_ACTION;
1255
1256
16.0M
    if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
1257
3.69M
      {
1258
3.69M
      int yyl;
1259
8.78M
      for ( yyl = 0; yyl < yyleng; ++yyl )
1260
5.08M
        if ( yytext[yyl] == '\n' )
1261
          
1262
3.69M
    do{ yylineno++;
1263
3.69M
        yycolumn=0;
1264
3.69M
    }while(0)
1265
3.69M
;
1266
3.69M
      }
1267
1268
16.0M
do_action:  /* This label is used only to access EOF actions. */
1269
1270
16.0M
    switch ( yy_act )
1271
16.0M
  { /* beginning of action switch */
1272
0
      case 0: /* must back up */
1273
      /* undo the effects of YY_DO_BEFORE_ACTION */
1274
0
      *yy_cp = yyg->yy_hold_char;
1275
0
      yy_cp = yyg->yy_last_accepting_cpos;
1276
0
      yy_current_state = yyg->yy_last_accepting_state;
1277
0
      goto yy_find_action;
1278
1279
1
case 1:
1280
1
YY_RULE_SETUP
1281
1
#line 108 "/src/igraph/src/io/pajek-lexer.l"
1282
1
{ }
1283
1
  YY_BREAK
1284
3.73k
case 2:
1285
/* rule 2 can match eol */
1286
3.73k
YY_RULE_SETUP
1287
3.73k
#line 109 "/src/igraph/src/io/pajek-lexer.l"
1288
3.73k
{ BEGIN(unknown); yyless(0); yy_set_bol(true); }
1289
3.73k
  YY_BREAK
1290
/* Skip all text until the next *Word at the beginning of a line. */
1291
8.39k
case 3:
1292
8.39k
YY_RULE_SETUP
1293
8.39k
#line 112 "/src/igraph/src/io/pajek-lexer.l"
1294
8.39k
{ BEGIN(INITIAL); yyless(0); yy_set_bol(true); }
1295
8.39k
  YY_BREAK
1296
17.6k
case 4:
1297
17.6k
YY_RULE_SETUP
1298
17.6k
#line 113 "/src/igraph/src/io/pajek-lexer.l"
1299
17.6k
{ } /* match cannot start with a * in order not to take precedence over ^\* above */
1300
17.6k
  YY_BREAK
1301
271k
case 5:
1302
/* rule 5 can match eol */
1303
271k
YY_RULE_SETUP
1304
271k
#line 114 "/src/igraph/src/io/pajek-lexer.l"
1305
271k
{ yy_set_bol(true); }
1306
271k
  YY_BREAK
1307
4.89k
case 6:
1308
4.89k
YY_RULE_SETUP
1309
4.89k
#line 115 "/src/igraph/src/io/pajek-lexer.l"
1310
4.89k
{ BEGIN(unknown); }
1311
4.89k
  YY_BREAK
1312
770
case 7:
1313
/* rule 7 can match eol */
1314
770
YY_RULE_SETUP
1315
770
#line 117 "/src/igraph/src/io/pajek-lexer.l"
1316
770
{ yy_set_bol(true); } /* comments */
1317
770
  YY_BREAK
1318
4.43M
case 8:
1319
4.43M
YY_RULE_SETUP
1320
4.43M
#line 119 "/src/igraph/src/io/pajek-lexer.l"
1321
4.43M
{ }
1322
4.43M
  YY_BREAK
1323
6
case 9:
1324
6
YY_RULE_SETUP
1325
6
#line 121 "/src/igraph/src/io/pajek-lexer.l"
1326
6
{ BEGIN(unknown_line); return NETWORKLINE; }
1327
0
  YY_BREAK
1328
3.45k
case 10:
1329
3.45k
YY_RULE_SETUP
1330
3.45k
#line 123 "/src/igraph/src/io/pajek-lexer.l"
1331
3.45k
{ BEGIN(vert); return VERTICESLINE; }
1332
0
  YY_BREAK
1333
4.67k
case 11:
1334
4.67k
YY_RULE_SETUP
1335
4.67k
#line 124 "/src/igraph/src/io/pajek-lexer.l"
1336
4.67k
{ BEGIN(edge); return ARCSLINE; }
1337
0
  YY_BREAK
1338
1.54k
case 12:
1339
1.54k
YY_RULE_SETUP
1340
1.54k
#line 125 "/src/igraph/src/io/pajek-lexer.l"
1341
1.54k
{ BEGIN(edge); return EDGESLINE; }
1342
0
  YY_BREAK
1343
511
case 13:
1344
511
YY_RULE_SETUP
1345
511
#line 126 "/src/igraph/src/io/pajek-lexer.l"
1346
511
{ BEGIN(INITIAL); return ARCSLISTLINE; }
1347
0
  YY_BREAK
1348
227
case 14:
1349
227
YY_RULE_SETUP
1350
227
#line 127 "/src/igraph/src/io/pajek-lexer.l"
1351
227
{ BEGIN(INITIAL);return EDGESLISTLINE; }
1352
0
  YY_BREAK
1353
15.2k
case 15:
1354
15.2k
YY_RULE_SETUP
1355
15.2k
#line 128 "/src/igraph/src/io/pajek-lexer.l"
1356
15.2k
{ BEGIN(INITIAL); return MATRIXLINE; }
1357
0
  YY_BREAK
1358
4.93k
case 16:
1359
4.93k
YY_RULE_SETUP
1360
4.93k
#line 130 "/src/igraph/src/io/pajek-lexer.l"
1361
4.93k
{ BEGIN(unknown_line); IGRAPH_WARNINGF("Skipping unknown section '%s' on line %d.", yytext, yylineno); }
1362
4.93k
  YY_BREAK
1363
3.42M
case 17:
1364
/* rule 17 can match eol */
1365
3.42M
YY_RULE_SETUP
1366
3.42M
#line 132 "/src/igraph/src/io/pajek-lexer.l"
1367
3.42M
{ yy_set_bol(true); return NEWLINE; }
1368
0
  YY_BREAK
1369
/* Newlines not allowed in strings. */
1370
72.8k
case 18:
1371
72.8k
YY_RULE_SETUP
1372
72.8k
#line 135 "/src/igraph/src/io/pajek-lexer.l"
1373
72.8k
{ return QSTR; }
1374
0
  YY_BREAK
1375
7.72M
case 19:
1376
7.72M
YY_RULE_SETUP
1377
7.72M
#line 137 "/src/igraph/src/io/pajek-lexer.l"
1378
7.72M
{ return NUM; }
1379
0
  YY_BREAK
1380
1381
/* http://mrvar.fdv.uni-lj.si/pajek/DrawEPS.htm */
1382
283
case 20:
1383
283
YY_RULE_SETUP
1384
283
#line 141 "/src/igraph/src/io/pajek-lexer.l"
1385
283
{ return VP_X_FACT; }
1386
0
  YY_BREAK
1387
222
case 21:
1388
222
YY_RULE_SETUP
1389
222
#line 142 "/src/igraph/src/io/pajek-lexer.l"
1390
222
{ return VP_Y_FACT; }
1391
0
  YY_BREAK
1392
347
case 22:
1393
347
YY_RULE_SETUP
1394
347
#line 143 "/src/igraph/src/io/pajek-lexer.l"
1395
347
{ return VP_PHI; }
1396
0
  YY_BREAK
1397
795
case 23:
1398
795
YY_RULE_SETUP
1399
795
#line 144 "/src/igraph/src/io/pajek-lexer.l"
1400
795
{ return VP_R; }
1401
0
  YY_BREAK
1402
387
case 24:
1403
387
YY_RULE_SETUP
1404
387
#line 145 "/src/igraph/src/io/pajek-lexer.l"
1405
387
{ return VP_Q; }
1406
0
  YY_BREAK
1407
288
case 25:
1408
288
YY_RULE_SETUP
1409
288
#line 146 "/src/igraph/src/io/pajek-lexer.l"
1410
288
{ return VP_IC; }
1411
0
  YY_BREAK
1412
282
case 26:
1413
282
YY_RULE_SETUP
1414
282
#line 147 "/src/igraph/src/io/pajek-lexer.l"
1415
282
{ return VP_BC; }
1416
0
  YY_BREAK
1417
280
case 27:
1418
280
YY_RULE_SETUP
1419
280
#line 148 "/src/igraph/src/io/pajek-lexer.l"
1420
280
{ return VP_BW; }
1421
0
  YY_BREAK
1422
526
case 28:
1423
526
YY_RULE_SETUP
1424
526
#line 149 "/src/igraph/src/io/pajek-lexer.l"
1425
526
{ return VP_LC; }
1426
0
  YY_BREAK
1427
679
case 29:
1428
679
YY_RULE_SETUP
1429
679
#line 150 "/src/igraph/src/io/pajek-lexer.l"
1430
679
{ return VP_LA; }
1431
0
  YY_BREAK
1432
350
case 30:
1433
350
YY_RULE_SETUP
1434
350
#line 151 "/src/igraph/src/io/pajek-lexer.l"
1435
350
{ return VP_LR; }
1436
0
  YY_BREAK
1437
890
case 31:
1438
890
YY_RULE_SETUP
1439
890
#line 152 "/src/igraph/src/io/pajek-lexer.l"
1440
890
{ return VP_LPHI; }
1441
0
  YY_BREAK
1442
777
case 32:
1443
777
YY_RULE_SETUP
1444
777
#line 153 "/src/igraph/src/io/pajek-lexer.l"
1445
777
{ return VP_FOS; }
1446
0
  YY_BREAK
1447
344
case 33:
1448
344
YY_RULE_SETUP
1449
344
#line 154 "/src/igraph/src/io/pajek-lexer.l"
1450
344
{ return VP_FONT; }
1451
0
  YY_BREAK
1452
/* http://mrvar.fdv.uni-lj.si/pajek/history.htm */
1453
9.47k
case 34:
1454
9.47k
YY_RULE_SETUP
1455
9.47k
#line 156 "/src/igraph/src/io/pajek-lexer.l"
1456
9.47k
{ return VP_URL; }
1457
0
  YY_BREAK
1458
1459
1460
/* http://mrvar.fdv.uni-lj.si/pajek/DrawEPS.htm */
1461
2.22k
case 35:
1462
2.22k
YY_RULE_SETUP
1463
2.22k
#line 161 "/src/igraph/src/io/pajek-lexer.l"
1464
2.22k
{ return EP_H1; }
1465
0
  YY_BREAK
1466
1.86k
case 36:
1467
1.86k
YY_RULE_SETUP
1468
1.86k
#line 162 "/src/igraph/src/io/pajek-lexer.l"
1469
1.86k
{ return EP_H2; }
1470
0
  YY_BREAK
1471
1.67k
case 37:
1472
1.67k
YY_RULE_SETUP
1473
1.67k
#line 163 "/src/igraph/src/io/pajek-lexer.l"
1474
1.67k
{ return EP_W; }
1475
0
  YY_BREAK
1476
546
case 38:
1477
546
YY_RULE_SETUP
1478
546
#line 164 "/src/igraph/src/io/pajek-lexer.l"
1479
546
{ return EP_C; }
1480
0
  YY_BREAK
1481
383
case 39:
1482
383
YY_RULE_SETUP
1483
383
#line 165 "/src/igraph/src/io/pajek-lexer.l"
1484
383
{ return EP_P; }
1485
0
  YY_BREAK
1486
444
case 40:
1487
444
YY_RULE_SETUP
1488
444
#line 166 "/src/igraph/src/io/pajek-lexer.l"
1489
444
{ return EP_A; }
1490
0
  YY_BREAK
1491
397
case 41:
1492
397
YY_RULE_SETUP
1493
397
#line 167 "/src/igraph/src/io/pajek-lexer.l"
1494
397
{ return EP_S; }
1495
0
  YY_BREAK
1496
3.21k
case 42:
1497
3.21k
YY_RULE_SETUP
1498
3.21k
#line 168 "/src/igraph/src/io/pajek-lexer.l"
1499
3.21k
{ return EP_A1; }
1500
0
  YY_BREAK
1501
1.66k
case 43:
1502
1.66k
YY_RULE_SETUP
1503
1.66k
#line 169 "/src/igraph/src/io/pajek-lexer.l"
1504
1.66k
{ return EP_K1; }
1505
0
  YY_BREAK
1506
1.87k
case 44:
1507
1.87k
YY_RULE_SETUP
1508
1.87k
#line 170 "/src/igraph/src/io/pajek-lexer.l"
1509
1.87k
{ return EP_A2; }
1510
0
  YY_BREAK
1511
2.29k
case 45:
1512
2.29k
YY_RULE_SETUP
1513
2.29k
#line 171 "/src/igraph/src/io/pajek-lexer.l"
1514
2.29k
{ return EP_K2; }
1515
0
  YY_BREAK
1516
1.53k
case 46:
1517
1.53k
YY_RULE_SETUP
1518
1.53k
#line 172 "/src/igraph/src/io/pajek-lexer.l"
1519
1.53k
{ return EP_AP; }
1520
0
  YY_BREAK
1521
429
case 47:
1522
429
YY_RULE_SETUP
1523
429
#line 173 "/src/igraph/src/io/pajek-lexer.l"
1524
429
{ return EP_L; }
1525
0
  YY_BREAK
1526
2.39k
case 48:
1527
2.39k
YY_RULE_SETUP
1528
2.39k
#line 174 "/src/igraph/src/io/pajek-lexer.l"
1529
2.39k
{ return EP_LP; }
1530
0
  YY_BREAK
1531
2.16k
case 49:
1532
2.16k
YY_RULE_SETUP
1533
2.16k
#line 175 "/src/igraph/src/io/pajek-lexer.l"
1534
2.16k
{ return EP_LR; }
1535
0
  YY_BREAK
1536
2.32k
case 50:
1537
2.32k
YY_RULE_SETUP
1538
2.32k
#line 176 "/src/igraph/src/io/pajek-lexer.l"
1539
2.32k
{ return EP_LPHI; }
1540
0
  YY_BREAK
1541
271
case 51:
1542
271
YY_RULE_SETUP
1543
271
#line 177 "/src/igraph/src/io/pajek-lexer.l"
1544
271
{ return EP_LC; }
1545
0
  YY_BREAK
1546
1.67k
case 52:
1547
1.67k
YY_RULE_SETUP
1548
1.67k
#line 178 "/src/igraph/src/io/pajek-lexer.l"
1549
1.67k
{ return EP_LA; }
1550
0
  YY_BREAK
1551
677
case 53:
1552
677
YY_RULE_SETUP
1553
677
#line 179 "/src/igraph/src/io/pajek-lexer.l"
1554
677
{ return EP_FOS; }
1555
0
  YY_BREAK
1556
8.45k
case 54:
1557
8.45k
YY_RULE_SETUP
1558
8.45k
#line 180 "/src/igraph/src/io/pajek-lexer.l"
1559
8.45k
{ return EP_FONT; }
1560
0
  YY_BREAK
1561
1562
15.7k
case 55:
1563
15.7k
YY_RULE_SETUP
1564
15.7k
#line 183 "/src/igraph/src/io/pajek-lexer.l"
1565
15.7k
{ return ALNUM; }
1566
0
  YY_BREAK
1567
765
case YY_STATE_EOF(INITIAL):
1568
958
case YY_STATE_EOF(unknown):
1569
997
case YY_STATE_EOF(unknown_line):
1570
1.00k
case YY_STATE_EOF(bom):
1571
3.47k
case YY_STATE_EOF(vert):
1572
5.06k
case YY_STATE_EOF(edge):
1573
5.06k
#line 185 "/src/igraph/src/io/pajek-lexer.l"
1574
5.06k
{ if (yyextra->eof) {
1575
2.34k
                       yyterminate();
1576
2.72k
                    } else {
1577
2.72k
                       yyextra->eof=true;
1578
2.72k
                       return NEWLINE;
1579
2.72k
                    }
1580
5.06k
                  }
1581
0
  YY_BREAK
1582
142
case 56:
1583
142
YY_RULE_SETUP
1584
142
#line 193 "/src/igraph/src/io/pajek-lexer.l"
1585
142
{ return ERROR; }
1586
0
  YY_BREAK
1587
0
case 57:
1588
0
YY_RULE_SETUP
1589
0
#line 195 "/src/igraph/src/io/pajek-lexer.l"
1590
0
YY_FATAL_ERROR( "flex scanner jammed" );
1591
0
  YY_BREAK
1592
0
#line 1593 "/src/igraph/build/src/io/parsers/pajek-lexer.c"
1593
1594
17.4k
  case YY_END_OF_BUFFER:
1595
17.4k
    {
1596
    /* Amount of text matched not including the EOB char. */
1597
17.4k
    int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1598
1599
    /* Undo the effects of YY_DO_BEFORE_ACTION. */
1600
17.4k
    *yy_cp = yyg->yy_hold_char;
1601
17.4k
    YY_RESTORE_YY_MORE_OFFSET
1602
1603
17.4k
    if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1604
6.08k
      {
1605
      /* We're scanning a new file or input source.  It's
1606
       * possible that this happened because the user
1607
       * just pointed yyin at a new source and called
1608
       * yylex().  If so, then we have to assure
1609
       * consistency between YY_CURRENT_BUFFER and our
1610
       * globals.  Here is the right place to do so, because
1611
       * this is the first action (other than possibly a
1612
       * back-up) that will match for the new input source.
1613
       */
1614
6.08k
      yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1615
6.08k
      YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1616
6.08k
      YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1617
6.08k
      }
1618
1619
    /* Note that here we test for yy_c_buf_p "<=" to the position
1620
     * of the first EOB in the buffer, since yy_c_buf_p will
1621
     * already have been incremented past the NUL character
1622
     * (since all states make transitions on EOB to the
1623
     * end-of-buffer state).  Contrast this with the test
1624
     * in input().
1625
     */
1626
17.4k
    if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1627
210
      { /* This was really a NUL. */
1628
210
      yy_state_type yy_next_state;
1629
1630
210
      yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1631
1632
210
      yy_current_state = yy_get_previous_state( yyscanner );
1633
1634
      /* Okay, we're now positioned to make the NUL
1635
       * transition.  We couldn't have
1636
       * yy_get_previous_state() go ahead and do it
1637
       * for us because it doesn't know how to deal
1638
       * with the possibility of jamming (and we don't
1639
       * want to build jamming into it because then it
1640
       * will run more slowly).
1641
       */
1642
1643
210
      yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1644
1645
210
      yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1646
1647
210
      if ( yy_next_state )
1648
95
        {
1649
        /* Consume the NUL. */
1650
95
        yy_cp = ++yyg->yy_c_buf_p;
1651
95
        yy_current_state = yy_next_state;
1652
95
        goto yy_match;
1653
95
        }
1654
1655
115
      else
1656
115
        {
1657
115
        yy_cp = yyg->yy_c_buf_p;
1658
115
        goto yy_find_action;
1659
115
        }
1660
210
      }
1661
1662
17.2k
    else switch ( yy_get_next_buffer( yyscanner ) )
1663
17.2k
      {
1664
5.06k
      case EOB_ACT_END_OF_FILE:
1665
5.06k
        {
1666
5.06k
        yyg->yy_did_buffer_switch_on_eof = 0;
1667
1668
5.06k
        if ( yywrap( yyscanner ) )
1669
5.06k
          {
1670
          /* Note: because we've taken care in
1671
           * yy_get_next_buffer() to have set up
1672
           * yytext, we can now set up
1673
           * yy_c_buf_p so that if some total
1674
           * hoser (like flex itself) wants to
1675
           * call the scanner after we return the
1676
           * YY_NULL, it'll still work - another
1677
           * YY_NULL will get returned.
1678
           */
1679
5.06k
          yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1680
1681
5.06k
          yy_act = YY_STATE_EOF(YY_START);
1682
5.06k
          goto do_action;
1683
5.06k
          }
1684
1685
0
        else
1686
0
          {
1687
0
          if ( ! yyg->yy_did_buffer_switch_on_eof )
1688
0
            YY_NEW_FILE;
1689
0
          }
1690
0
        break;
1691
5.06k
        }
1692
1693
8.92k
      case EOB_ACT_CONTINUE_SCAN:
1694
8.92k
        yyg->yy_c_buf_p =
1695
8.92k
          yyg->yytext_ptr + yy_amount_of_matched_text;
1696
1697
8.92k
        yy_current_state = yy_get_previous_state( yyscanner );
1698
1699
8.92k
        yy_cp = yyg->yy_c_buf_p;
1700
8.92k
        yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1701
8.92k
        goto yy_match;
1702
1703
3.27k
      case EOB_ACT_LAST_MATCH:
1704
3.27k
        yyg->yy_c_buf_p =
1705
3.27k
        &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1706
1707
3.27k
        yy_current_state = yy_get_previous_state( yyscanner );
1708
1709
3.27k
        yy_cp = yyg->yy_c_buf_p;
1710
3.27k
        yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1711
3.27k
        goto yy_find_action;
1712
17.2k
      }
1713
0
    break;
1714
17.4k
    }
1715
1716
0
  default:
1717
0
    YY_FATAL_ERROR(
1718
16.0M
      "fatal flex scanner internal error--no action found" );
1719
16.0M
  } /* end of action switch */
1720
16.0M
    } /* end of scanning one token */
1721
11.3M
  } /* end of user's declarations */
1722
11.3M
} /* end of yylex */
1723
1724
/* yy_get_next_buffer - try to read in a new buffer
1725
 *
1726
 * Returns a code representing an action:
1727
 *  EOB_ACT_LAST_MATCH -
1728
 *  EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1729
 *  EOB_ACT_END_OF_FILE - end of file
1730
 */
1731
static int yy_get_next_buffer (yyscan_t yyscanner)
1732
17.2k
{
1733
17.2k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1734
17.2k
  char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1735
17.2k
  char *source = yyg->yytext_ptr;
1736
17.2k
  int number_to_move, i;
1737
17.2k
  int ret_val;
1738
1739
17.2k
  if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1740
17.2k
    YY_FATAL_ERROR(
1741
17.2k
    "fatal flex scanner internal error--end of buffer missed" );
1742
1743
17.2k
  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1744
0
    { /* Don't try to fill the buffer, so this is an EOF. */
1745
0
    if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1746
0
      {
1747
      /* We matched a single character, the EOB, so
1748
       * treat this as a final EOF.
1749
       */
1750
0
      return EOB_ACT_END_OF_FILE;
1751
0
      }
1752
1753
0
    else
1754
0
      {
1755
      /* We matched some text prior to the EOB, first
1756
       * process it.
1757
       */
1758
0
      return EOB_ACT_LAST_MATCH;
1759
0
      }
1760
0
    }
1761
1762
  /* Try to read more data. */
1763
1764
  /* First move last chars to start of buffer. */
1765
17.2k
  number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
1766
1767
463M
  for ( i = 0; i < number_to_move; ++i )
1768
463M
    *(dest++) = *(source++);
1769
1770
17.2k
  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1771
    /* don't do the read, it's not guaranteed to return an EOF,
1772
     * just force an EOF
1773
     */
1774
2.37k
    YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1775
1776
14.9k
  else
1777
14.9k
    {
1778
14.9k
      int num_to_read =
1779
14.9k
      YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1780
1781
15.1k
    while ( num_to_read <= 0 )
1782
287
      { /* Not enough room in the buffer - grow it. */
1783
1784
      /* just a shorter name for the current buffer */
1785
287
      YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1786
1787
287
      int yy_c_buf_p_offset =
1788
287
        (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1789
1790
287
      if ( b->yy_is_our_buffer )
1791
287
        {
1792
287
        int new_size = b->yy_buf_size * 2;
1793
1794
287
        if ( new_size <= 0 )
1795
0
          b->yy_buf_size += b->yy_buf_size / 8;
1796
287
        else
1797
287
          b->yy_buf_size *= 2;
1798
1799
287
        b->yy_ch_buf = (char *)
1800
          /* Include room in for 2 EOB chars. */
1801
287
          yyrealloc( (void *) b->yy_ch_buf,
1802
287
               (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
1803
287
        }
1804
0
      else
1805
        /* Can't grow it, we don't own it. */
1806
0
        b->yy_ch_buf = NULL;
1807
1808
287
      if ( ! b->yy_ch_buf )
1809
287
        YY_FATAL_ERROR(
1810
287
        "fatal error - scanner input buffer overflow" );
1811
1812
287
      yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1813
1814
287
      num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1815
287
            number_to_move - 1;
1816
1817
287
      }
1818
1819
14.9k
    if ( num_to_read > YY_READ_BUF_SIZE )
1820
14.1k
      num_to_read = YY_READ_BUF_SIZE;
1821
1822
    /* Read in more data. */
1823
14.9k
    YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1824
14.9k
      yyg->yy_n_chars, num_to_read );
1825
1826
14.9k
    YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1827
14.9k
    }
1828
1829
17.2k
  if ( yyg->yy_n_chars == 0 )
1830
8.34k
    {
1831
8.34k
    if ( number_to_move == YY_MORE_ADJ )
1832
5.06k
      {
1833
5.06k
      ret_val = EOB_ACT_END_OF_FILE;
1834
5.06k
      yyrestart( yyin  , yyscanner);
1835
5.06k
      }
1836
1837
3.27k
    else
1838
3.27k
      {
1839
3.27k
      ret_val = EOB_ACT_LAST_MATCH;
1840
3.27k
      YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1841
3.27k
        YY_BUFFER_EOF_PENDING;
1842
3.27k
      }
1843
8.34k
    }
1844
1845
8.92k
  else
1846
8.92k
    ret_val = EOB_ACT_CONTINUE_SCAN;
1847
1848
17.2k
  if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1849
    /* Extend the array by 50%, plus the number we really need. */
1850
0
    int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1851
0
    YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1852
0
      (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
1853
0
    if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1854
0
      YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1855
    /* "- 2" to take care of EOB's */
1856
0
    YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1857
0
  }
1858
1859
17.2k
  yyg->yy_n_chars += number_to_move;
1860
17.2k
  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1861
17.2k
  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1862
1863
17.2k
  yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1864
1865
17.2k
  return ret_val;
1866
17.2k
}
1867
1868
/* yy_get_previous_state - get the state just before the EOB char was reached */
1869
1870
    static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1871
12.4k
{
1872
12.4k
  yy_state_type yy_current_state;
1873
12.4k
  char *yy_cp;
1874
12.4k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1875
1876
12.4k
  yy_current_state = yyg->yy_start;
1877
12.4k
  yy_current_state += YY_AT_BOL();
1878
1879
464M
  for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1880
464M
    {
1881
464M
    YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 67);
1882
464M
    if ( yy_accept[yy_current_state] )
1883
404M
      {
1884
404M
      yyg->yy_last_accepting_state = yy_current_state;
1885
404M
      yyg->yy_last_accepting_cpos = yy_cp;
1886
404M
      }
1887
832M
    while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1888
368M
      {
1889
368M
      yy_current_state = (int) yy_def[yy_current_state];
1890
368M
      if ( yy_current_state >= 161 )
1891
368M
        yy_c = yy_meta[yy_c];
1892
368M
      }
1893
464M
    yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1894
464M
    }
1895
1896
12.4k
  return yy_current_state;
1897
12.4k
}
1898
1899
/* yy_try_NUL_trans - try to make a transition on the NUL character
1900
 *
1901
 * synopsis
1902
 *  next_state = yy_try_NUL_trans( current_state );
1903
 */
1904
    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state , yyscan_t yyscanner)
1905
210
{
1906
210
  int yy_is_jam;
1907
210
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
1908
210
  char *yy_cp = yyg->yy_c_buf_p;
1909
1910
210
  YY_CHAR yy_c = 67;
1911
210
  if ( yy_accept[yy_current_state] )
1912
114
    {
1913
114
    yyg->yy_last_accepting_state = yy_current_state;
1914
114
    yyg->yy_last_accepting_cpos = yy_cp;
1915
114
    }
1916
420
  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1917
210
    {
1918
210
    yy_current_state = (int) yy_def[yy_current_state];
1919
210
    if ( yy_current_state >= 161 )
1920
91
      yy_c = yy_meta[yy_c];
1921
210
    }
1922
210
  yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1923
210
  yy_is_jam = (yy_current_state == 160);
1924
1925
210
  (void)yyg;
1926
210
  return yy_is_jam ? 0 : yy_current_state;
1927
210
}
1928
1929
#ifndef YY_NO_UNPUT
1930
1931
#endif
1932
1933
#ifndef YY_NO_INPUT
1934
#ifdef __cplusplus
1935
    static int yyinput (yyscan_t yyscanner)
1936
#else
1937
    static int input  (yyscan_t yyscanner)
1938
#endif
1939
1940
{
1941
  int c;
1942
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1943
1944
  *yyg->yy_c_buf_p = yyg->yy_hold_char;
1945
1946
  if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1947
    {
1948
    /* yy_c_buf_p now points to the character we want to return.
1949
     * If this occurs *before* the EOB characters, then it's a
1950
     * valid NUL; if not, then we've hit the end of the buffer.
1951
     */
1952
    if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1953
      /* This was really a NUL. */
1954
      *yyg->yy_c_buf_p = '\0';
1955
1956
    else
1957
      { /* need more input */
1958
      int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
1959
      ++yyg->yy_c_buf_p;
1960
1961
      switch ( yy_get_next_buffer( yyscanner ) )
1962
        {
1963
        case EOB_ACT_LAST_MATCH:
1964
          /* This happens because yy_g_n_b()
1965
           * sees that we've accumulated a
1966
           * token and flags that we need to
1967
           * try matching the token before
1968
           * proceeding.  But for input(),
1969
           * there's no matching to consider.
1970
           * So convert the EOB_ACT_LAST_MATCH
1971
           * to EOB_ACT_END_OF_FILE.
1972
           */
1973
1974
          /* Reset buffer status. */
1975
          yyrestart( yyin , yyscanner);
1976
1977
          /*FALLTHROUGH*/
1978
1979
        case EOB_ACT_END_OF_FILE:
1980
          {
1981
          if ( yywrap( yyscanner ) )
1982
            return 0;
1983
1984
          if ( ! yyg->yy_did_buffer_switch_on_eof )
1985
            YY_NEW_FILE;
1986
#ifdef __cplusplus
1987
          return yyinput(yyscanner);
1988
#else
1989
          return input(yyscanner);
1990
#endif
1991
          }
1992
1993
        case EOB_ACT_CONTINUE_SCAN:
1994
          yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
1995
          break;
1996
        }
1997
      }
1998
    }
1999
2000
  c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
2001
  *yyg->yy_c_buf_p = '\0';  /* preserve yytext */
2002
  yyg->yy_hold_char = *++yyg->yy_c_buf_p;
2003
2004
  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
2005
  if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol )
2006
    
2007
    do{ yylineno++;
2008
        yycolumn=0;
2009
    }while(0)
2010
;
2011
2012
  return c;
2013
}
2014
#endif  /* ifndef YY_NO_INPUT */
2015
2016
/** Immediately switch to a different input stream.
2017
 * @param input_file A readable stream.
2018
 * @param yyscanner The scanner object.
2019
 * @note This function does not reset the start condition to @c INITIAL .
2020
 */
2021
    void yyrestart  (FILE * input_file , yyscan_t yyscanner)
2022
5.06k
{
2023
5.06k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2024
2025
5.06k
  if ( ! YY_CURRENT_BUFFER ){
2026
0
        yyensure_buffer_stack (yyscanner);
2027
0
    YY_CURRENT_BUFFER_LVALUE =
2028
0
            yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
2029
0
  }
2030
2031
5.06k
  yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
2032
5.06k
  yy_load_buffer_state( yyscanner );
2033
5.06k
}
2034
2035
/** Switch to a different input buffer.
2036
 * @param new_buffer The new input buffer.
2037
 * @param yyscanner The scanner object.
2038
 */
2039
    void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)
2040
0
{
2041
0
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2042
2043
  /* TODO. We should be able to replace this entire function body
2044
   * with
2045
   *    yypop_buffer_state();
2046
   *    yypush_buffer_state(new_buffer);
2047
     */
2048
0
  yyensure_buffer_stack (yyscanner);
2049
0
  if ( YY_CURRENT_BUFFER == new_buffer )
2050
0
    return;
2051
2052
0
  if ( YY_CURRENT_BUFFER )
2053
0
    {
2054
    /* Flush out information for old buffer. */
2055
0
    *yyg->yy_c_buf_p = yyg->yy_hold_char;
2056
0
    YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2057
0
    YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2058
0
    }
2059
2060
0
  YY_CURRENT_BUFFER_LVALUE = new_buffer;
2061
0
  yy_load_buffer_state( yyscanner );
2062
2063
  /* We don't actually know whether we did this switch during
2064
   * EOF (yywrap()) processing, but the only time this flag
2065
   * is looked at is after yywrap() is called, so it's safe
2066
   * to go ahead and always set it.
2067
   */
2068
0
  yyg->yy_did_buffer_switch_on_eof = 1;
2069
0
}
2070
2071
static void yy_load_buffer_state  (yyscan_t yyscanner)
2072
13.8k
{
2073
13.8k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2074
13.8k
  yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2075
13.8k
  yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2076
13.8k
  yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2077
13.8k
  yyg->yy_hold_char = *yyg->yy_c_buf_p;
2078
13.8k
}
2079
2080
/** Allocate and initialize an input buffer state.
2081
 * @param file A readable stream.
2082
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2083
 * @param yyscanner The scanner object.
2084
 * @return the allocated buffer state.
2085
 */
2086
    YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size , yyscan_t yyscanner)
2087
3.74k
{
2088
3.74k
  YY_BUFFER_STATE b;
2089
    
2090
3.74k
  b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
2091
3.74k
  if ( ! b )
2092
3.74k
    YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2093
2094
3.74k
  b->yy_buf_size = size;
2095
2096
  /* yy_ch_buf has to be 2 characters longer than the size given because
2097
   * we need to put in 2 end-of-buffer characters.
2098
   */
2099
3.74k
  b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
2100
3.74k
  if ( ! b->yy_ch_buf )
2101
3.74k
    YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2102
2103
3.74k
  b->yy_is_our_buffer = 1;
2104
2105
3.74k
  yy_init_buffer( b, file , yyscanner);
2106
2107
3.74k
  return b;
2108
3.74k
}
2109
2110
/** Destroy the buffer.
2111
 * @param b a buffer created with yy_create_buffer()
2112
 * @param yyscanner The scanner object.
2113
 */
2114
    void yy_delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
2115
3.74k
{
2116
3.74k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2117
2118
3.74k
  if ( ! b )
2119
0
    return;
2120
2121
3.74k
  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2122
3.74k
    YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2123
2124
3.74k
  if ( b->yy_is_our_buffer )
2125
3.74k
    yyfree( (void *) b->yy_ch_buf , yyscanner );
2126
2127
3.74k
  yyfree( (void *) b , yyscanner );
2128
3.74k
}
2129
2130
/* Initializes or reinitializes a buffer.
2131
 * This function is sometimes called more than once on the same buffer,
2132
 * such as during a yyrestart() or at EOF.
2133
 */
2134
    static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)
2135
2136
8.81k
{
2137
8.81k
  int oerrno = errno;
2138
8.81k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2139
2140
8.81k
  yy_flush_buffer( b , yyscanner);
2141
2142
8.81k
  b->yy_input_file = file;
2143
8.81k
  b->yy_fill_buffer = 1;
2144
2145
    /* If b is the current buffer, then yy_init_buffer was _probably_
2146
     * called from yyrestart() or through yy_get_next_buffer.
2147
     * In that case, we don't want to reset the lineno or column.
2148
     */
2149
8.81k
    if (b != YY_CURRENT_BUFFER){
2150
3.74k
        b->yy_bs_lineno = 1;
2151
3.74k
        b->yy_bs_column = 0;
2152
3.74k
    }
2153
2154
8.81k
        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2155
    
2156
8.81k
  errno = oerrno;
2157
8.81k
}
2158
2159
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2160
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2161
 * @param yyscanner The scanner object.
2162
 */
2163
    void yy_flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
2164
8.81k
{
2165
8.81k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2166
8.81k
  if ( ! b )
2167
0
    return;
2168
2169
8.81k
  b->yy_n_chars = 0;
2170
2171
  /* We always need two end-of-buffer characters.  The first causes
2172
   * a transition to the end-of-buffer state.  The second causes
2173
   * a jam in that state.
2174
   */
2175
8.81k
  b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2176
8.81k
  b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2177
2178
8.81k
  b->yy_buf_pos = &b->yy_ch_buf[0];
2179
2180
8.81k
  b->yy_at_bol = 1;
2181
8.81k
  b->yy_buffer_status = YY_BUFFER_NEW;
2182
2183
8.81k
  if ( b == YY_CURRENT_BUFFER )
2184
5.06k
    yy_load_buffer_state( yyscanner );
2185
8.81k
}
2186
2187
/** Pushes the new state onto the stack. The new state becomes
2188
 *  the current state. This function will allocate the stack
2189
 *  if necessary.
2190
 *  @param new_buffer The new state.
2191
 *  @param yyscanner The scanner object.
2192
 */
2193
void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2194
0
{
2195
0
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2196
0
  if (new_buffer == NULL)
2197
0
    return;
2198
2199
0
  yyensure_buffer_stack(yyscanner);
2200
2201
  /* This block is copied from yy_switch_to_buffer. */
2202
0
  if ( YY_CURRENT_BUFFER )
2203
0
    {
2204
    /* Flush out information for old buffer. */
2205
0
    *yyg->yy_c_buf_p = yyg->yy_hold_char;
2206
0
    YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2207
0
    YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2208
0
    }
2209
2210
  /* Only push if top exists. Otherwise, replace top. */
2211
0
  if (YY_CURRENT_BUFFER)
2212
0
    yyg->yy_buffer_stack_top++;
2213
0
  YY_CURRENT_BUFFER_LVALUE = new_buffer;
2214
2215
  /* copied from yy_switch_to_buffer. */
2216
0
  yy_load_buffer_state( yyscanner );
2217
0
  yyg->yy_did_buffer_switch_on_eof = 1;
2218
0
}
2219
2220
/** Removes and deletes the top of the stack, if present.
2221
 *  The next element becomes the new top.
2222
 *  @param yyscanner The scanner object.
2223
 */
2224
void yypop_buffer_state (yyscan_t yyscanner)
2225
3.74k
{
2226
3.74k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2227
3.74k
  if (!YY_CURRENT_BUFFER)
2228
3.74k
    return;
2229
2230
0
  yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
2231
0
  YY_CURRENT_BUFFER_LVALUE = NULL;
2232
0
  if (yyg->yy_buffer_stack_top > 0)
2233
0
    --yyg->yy_buffer_stack_top;
2234
2235
0
  if (YY_CURRENT_BUFFER) {
2236
0
    yy_load_buffer_state( yyscanner );
2237
0
    yyg->yy_did_buffer_switch_on_eof = 1;
2238
0
  }
2239
0
}
2240
2241
/* Allocates the stack if it does not exist.
2242
 *  Guarantees space for at least one push.
2243
 */
2244
static void yyensure_buffer_stack (yyscan_t yyscanner)
2245
3.74k
{
2246
3.74k
  yy_size_t num_to_alloc;
2247
3.74k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2248
2249
3.74k
  if (!yyg->yy_buffer_stack) {
2250
2251
    /* First allocation is just for 2 elements, since we don't know if this
2252
     * scanner will even need a stack. We use 2 instead of 1 to avoid an
2253
     * immediate realloc on the next call.
2254
         */
2255
3.74k
      num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
2256
3.74k
    yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
2257
3.74k
                (num_to_alloc * sizeof(struct yy_buffer_state*)
2258
3.74k
                , yyscanner);
2259
3.74k
    if ( ! yyg->yy_buffer_stack )
2260
3.74k
      YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2261
2262
3.74k
    memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2263
2264
3.74k
    yyg->yy_buffer_stack_max = num_to_alloc;
2265
3.74k
    yyg->yy_buffer_stack_top = 0;
2266
3.74k
    return;
2267
3.74k
  }
2268
2269
0
  if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
2270
2271
    /* Increase the buffer to prepare for a possible push. */
2272
0
    yy_size_t grow_size = 8 /* arbitrary grow size */;
2273
2274
0
    num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
2275
0
    yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
2276
0
                (yyg->yy_buffer_stack,
2277
0
                num_to_alloc * sizeof(struct yy_buffer_state*)
2278
0
                , yyscanner);
2279
0
    if ( ! yyg->yy_buffer_stack )
2280
0
      YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2281
2282
    /* zero only the new slots.*/
2283
0
    memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
2284
0
    yyg->yy_buffer_stack_max = num_to_alloc;
2285
0
  }
2286
0
}
2287
2288
/** Setup the input buffer state to scan directly from a user-specified character buffer.
2289
 * @param base the character buffer
2290
 * @param size the size in bytes of the character buffer
2291
 * @param yyscanner The scanner object.
2292
 * @return the newly allocated buffer state object.
2293
 */
2294
YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)
2295
0
{
2296
0
  YY_BUFFER_STATE b;
2297
    
2298
0
  if ( size < 2 ||
2299
0
       base[size-2] != YY_END_OF_BUFFER_CHAR ||
2300
0
       base[size-1] != YY_END_OF_BUFFER_CHAR )
2301
    /* They forgot to leave room for the EOB's. */
2302
0
    return NULL;
2303
2304
0
  b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
2305
0
  if ( ! b )
2306
0
    YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2307
2308
0
  b->yy_buf_size = (int) (size - 2);  /* "- 2" to take care of EOB's */
2309
0
  b->yy_buf_pos = b->yy_ch_buf = base;
2310
0
  b->yy_is_our_buffer = 0;
2311
0
  b->yy_input_file = NULL;
2312
0
  b->yy_n_chars = b->yy_buf_size;
2313
0
  b->yy_is_interactive = 0;
2314
0
  b->yy_at_bol = 1;
2315
0
  b->yy_fill_buffer = 0;
2316
0
  b->yy_buffer_status = YY_BUFFER_NEW;
2317
2318
0
  yy_switch_to_buffer( b , yyscanner );
2319
2320
0
  return b;
2321
0
}
2322
2323
/** Setup the input buffer state to scan a string. The next call to yylex() will
2324
 * scan from a @e copy of @a str.
2325
 * @param yystr a NUL-terminated string to scan
2326
 * @param yyscanner The scanner object.
2327
 * @return the newly allocated buffer state object.
2328
 * @note If you want to scan bytes that may contain NUL values, then use
2329
 *       yy_scan_bytes() instead.
2330
 */
2331
YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
2332
0
{
2333
    
2334
0
  return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
2335
0
}
2336
2337
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2338
 * scan from a @e copy of @a bytes.
2339
 * @param yybytes the byte buffer to scan
2340
 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2341
 * @param yyscanner The scanner object.
2342
 * @return the newly allocated buffer state object.
2343
 */
2344
YY_BUFFER_STATE yy_scan_bytes  (const char * yybytes, int  _yybytes_len , yyscan_t yyscanner)
2345
0
{
2346
0
  YY_BUFFER_STATE b;
2347
0
  char *buf;
2348
0
  yy_size_t n;
2349
0
  int i;
2350
    
2351
  /* Get memory for full buffer, including space for trailing EOB's. */
2352
0
  n = (yy_size_t) (_yybytes_len + 2);
2353
0
  buf = (char *) yyalloc( n , yyscanner );
2354
0
  if ( ! buf )
2355
0
    YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2356
2357
0
  for ( i = 0; i < _yybytes_len; ++i )
2358
0
    buf[i] = yybytes[i];
2359
2360
0
  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2361
2362
0
  b = yy_scan_buffer( buf, n , yyscanner);
2363
0
  if ( ! b )
2364
0
    YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2365
2366
  /* It's okay to grow etc. this buffer, and we should throw it
2367
   * away when we're done.
2368
   */
2369
0
  b->yy_is_our_buffer = 1;
2370
2371
0
  return b;
2372
0
}
2373
2374
#ifndef YY_EXIT_FAILURE
2375
#define YY_EXIT_FAILURE 2
2376
#endif
2377
2378
static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
2379
0
{
2380
0
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2381
0
  (void)yyg;
2382
0
  fprintf( stderr, "%s\n", msg );
2383
0
  exit( YY_EXIT_FAILURE );
2384
0
}
2385
2386
/* Redefine yyless() so it works in section 3 code. */
2387
2388
#undef yyless
2389
#define yyless(n) \
2390
  do \
2391
    { \
2392
    /* Undo effects of setting up yytext. */ \
2393
        int yyless_macro_arg = (n); \
2394
        YY_LESS_LINENO(yyless_macro_arg);\
2395
    yytext[yyleng] = yyg->yy_hold_char; \
2396
    yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
2397
    yyg->yy_hold_char = *yyg->yy_c_buf_p; \
2398
    *yyg->yy_c_buf_p = '\0'; \
2399
    yyleng = yyless_macro_arg; \
2400
    } \
2401
  while ( 0 )
2402
2403
/* Accessor  methods (get/set functions) to struct members. */
2404
2405
/** Get the user-defined data for this scanner.
2406
 * @param yyscanner The scanner object.
2407
 */
2408
YY_EXTRA_TYPE yyget_extra  (yyscan_t yyscanner)
2409
0
{
2410
0
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2411
0
    return yyextra;
2412
0
}
2413
2414
/** Get the current line number.
2415
 * @param yyscanner The scanner object.
2416
 */
2417
int yyget_lineno  (yyscan_t yyscanner)
2418
0
{
2419
0
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2420
2421
0
        if (! YY_CURRENT_BUFFER)
2422
0
            return 0;
2423
    
2424
0
    return yylineno;
2425
0
}
2426
2427
/** Get the current column number.
2428
 * @param yyscanner The scanner object.
2429
 */
2430
int yyget_column  (yyscan_t yyscanner)
2431
0
{
2432
0
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2433
2434
0
        if (! YY_CURRENT_BUFFER)
2435
0
            return 0;
2436
    
2437
0
    return yycolumn;
2438
0
}
2439
2440
/** Get the input stream.
2441
 * @param yyscanner The scanner object.
2442
 */
2443
FILE *yyget_in  (yyscan_t yyscanner)
2444
0
{
2445
0
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2446
0
    return yyin;
2447
0
}
2448
2449
/** Get the output stream.
2450
 * @param yyscanner The scanner object.
2451
 */
2452
FILE *yyget_out  (yyscan_t yyscanner)
2453
0
{
2454
0
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2455
0
    return yyout;
2456
0
}
2457
2458
/** Get the length of the current token.
2459
 * @param yyscanner The scanner object.
2460
 */
2461
int yyget_leng  (yyscan_t yyscanner)
2462
7.81M
{
2463
7.81M
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2464
7.81M
    return yyleng;
2465
7.81M
}
2466
2467
/** Get the current token.
2468
 * @param yyscanner The scanner object.
2469
 */
2470
2471
char *yyget_text  (yyscan_t yyscanner)
2472
7.81M
{
2473
7.81M
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2474
7.81M
    return yytext;
2475
7.81M
}
2476
2477
/** Set the user-defined data. This data is never touched by the scanner.
2478
 * @param user_defined The data to be associated with this scanner.
2479
 * @param yyscanner The scanner object.
2480
 */
2481
void yyset_extra (YY_EXTRA_TYPE  user_defined , yyscan_t yyscanner)
2482
7.49k
{
2483
7.49k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2484
7.49k
    yyextra = user_defined ;
2485
7.49k
}
2486
2487
/** Set the current line number.
2488
 * @param _line_number line number
2489
 * @param yyscanner The scanner object.
2490
 */
2491
void yyset_lineno (int  _line_number , yyscan_t yyscanner)
2492
0
{
2493
0
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2494
2495
        /* lineno is only valid if an input buffer exists. */
2496
0
        if (! YY_CURRENT_BUFFER )
2497
0
           YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
2498
    
2499
0
    yylineno = _line_number;
2500
0
}
2501
2502
/** Set the current column.
2503
 * @param _column_no column number
2504
 * @param yyscanner The scanner object.
2505
 */
2506
void yyset_column (int  _column_no , yyscan_t yyscanner)
2507
0
{
2508
0
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2509
2510
        /* column is only valid if an input buffer exists. */
2511
0
        if (! YY_CURRENT_BUFFER )
2512
0
           YY_FATAL_ERROR( "yyset_column called with no buffer" );
2513
    
2514
0
    yycolumn = _column_no;
2515
0
}
2516
2517
/** Set the input stream. This does not discard the current
2518
 * input buffer.
2519
 * @param _in_str A readable stream.
2520
 * @param yyscanner The scanner object.
2521
 * @see yy_switch_to_buffer
2522
 */
2523
void yyset_in (FILE *  _in_str , yyscan_t yyscanner)
2524
3.74k
{
2525
3.74k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2526
3.74k
    yyin = _in_str ;
2527
3.74k
}
2528
2529
void yyset_out (FILE *  _out_str , yyscan_t yyscanner)
2530
0
{
2531
0
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2532
0
    yyout = _out_str ;
2533
0
}
2534
2535
int yyget_debug  (yyscan_t yyscanner)
2536
0
{
2537
0
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2538
0
    return yy_flex_debug;
2539
0
}
2540
2541
void yyset_debug (int  _bdebug , yyscan_t yyscanner)
2542
0
{
2543
0
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2544
0
    yy_flex_debug = _bdebug ;
2545
0
}
2546
2547
/* Accessor methods for yylval and yylloc */
2548
2549
YYSTYPE * yyget_lval  (yyscan_t yyscanner)
2550
0
{
2551
0
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2552
0
    return yylval;
2553
0
}
2554
2555
void yyset_lval (YYSTYPE *  yylval_param , yyscan_t yyscanner)
2556
0
{
2557
0
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2558
0
    yylval = yylval_param;
2559
0
}
2560
2561
YYLTYPE *yyget_lloc  (yyscan_t yyscanner)
2562
0
{
2563
0
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2564
0
    return yylloc;
2565
0
}
2566
    
2567
void yyset_lloc (YYLTYPE *  yylloc_param , yyscan_t yyscanner)
2568
0
{
2569
0
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2570
0
    yylloc = yylloc_param;
2571
0
}
2572
    
2573
/* User-visible API */
2574
2575
/* yylex_init is special because it creates the scanner itself, so it is
2576
 * the ONLY reentrant function that doesn't take the scanner as the last argument.
2577
 * That's why we explicitly handle the declaration, instead of using our macros.
2578
 */
2579
int yylex_init(yyscan_t* ptr_yy_globals)
2580
0
{
2581
0
    if (ptr_yy_globals == NULL){
2582
0
        errno = EINVAL;
2583
0
        return 1;
2584
0
    }
2585
2586
0
    *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
2587
2588
0
    if (*ptr_yy_globals == NULL){
2589
0
        errno = ENOMEM;
2590
0
        return 1;
2591
0
    }
2592
2593
    /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
2594
0
    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2595
2596
0
    return yy_init_globals ( *ptr_yy_globals );
2597
0
}
2598
2599
/* yylex_init_extra has the same functionality as yylex_init, but follows the
2600
 * convention of taking the scanner as the last argument. Note however, that
2601
 * this is a *pointer* to a scanner, as it will be allocated by this call (and
2602
 * is the reason, too, why this function also must handle its own declaration).
2603
 * The user defined value in the first argument will be available to yyalloc in
2604
 * the yyextra field.
2605
 */
2606
int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
2607
3.74k
{
2608
3.74k
    struct yyguts_t dummy_yyguts;
2609
2610
3.74k
    yyset_extra (yy_user_defined, &dummy_yyguts);
2611
2612
3.74k
    if (ptr_yy_globals == NULL){
2613
0
        errno = EINVAL;
2614
0
        return 1;
2615
0
    }
2616
2617
3.74k
    *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
2618
2619
3.74k
    if (*ptr_yy_globals == NULL){
2620
0
        errno = ENOMEM;
2621
0
        return 1;
2622
0
    }
2623
2624
    /* By setting to 0xAA, we expose bugs in
2625
    yy_init_globals. Leave at 0x00 for releases. */
2626
3.74k
    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2627
2628
3.74k
    yyset_extra (yy_user_defined, *ptr_yy_globals);
2629
2630
3.74k
    return yy_init_globals ( *ptr_yy_globals );
2631
3.74k
}
2632
2633
static int yy_init_globals (yyscan_t yyscanner)
2634
7.49k
{
2635
7.49k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2636
    /* Initialization is the same as for the non-reentrant scanner.
2637
     * This function is called from yylex_destroy(), so don't allocate here.
2638
     */
2639
2640
7.49k
    yyg->yy_buffer_stack = NULL;
2641
7.49k
    yyg->yy_buffer_stack_top = 0;
2642
7.49k
    yyg->yy_buffer_stack_max = 0;
2643
7.49k
    yyg->yy_c_buf_p = NULL;
2644
7.49k
    yyg->yy_init = 0;
2645
7.49k
    yyg->yy_start = 0;
2646
2647
7.49k
    yyg->yy_start_stack_ptr = 0;
2648
7.49k
    yyg->yy_start_stack_depth = 0;
2649
7.49k
    yyg->yy_start_stack =  NULL;
2650
2651
/* Defined in main.c */
2652
#ifdef YY_STDINIT
2653
    yyin = stdin;
2654
    yyout = stdout;
2655
#else
2656
7.49k
    yyin = NULL;
2657
7.49k
    yyout = NULL;
2658
7.49k
#endif
2659
2660
    /* For future reference: Set errno on error, since we are called by
2661
     * yylex_init()
2662
     */
2663
7.49k
    return 0;
2664
7.49k
}
2665
2666
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
2667
int yylex_destroy  (yyscan_t yyscanner)
2668
3.74k
{
2669
3.74k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2670
2671
    /* Pop the buffer stack, destroying each element. */
2672
7.49k
  while(YY_CURRENT_BUFFER){
2673
3.74k
    yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
2674
3.74k
    YY_CURRENT_BUFFER_LVALUE = NULL;
2675
3.74k
    yypop_buffer_state(yyscanner);
2676
3.74k
  }
2677
2678
  /* Destroy the stack itself. */
2679
3.74k
  yyfree(yyg->yy_buffer_stack , yyscanner);
2680
3.74k
  yyg->yy_buffer_stack = NULL;
2681
2682
    /* Destroy the start condition stack. */
2683
3.74k
        yyfree( yyg->yy_start_stack , yyscanner );
2684
3.74k
        yyg->yy_start_stack = NULL;
2685
2686
    /* Reset the globals. This is important in a non-reentrant scanner so the next time
2687
     * yylex() is called, initialization will occur. */
2688
3.74k
    yy_init_globals( yyscanner);
2689
2690
    /* Destroy the main struct (reentrant only). */
2691
3.74k
    yyfree ( yyscanner , yyscanner );
2692
3.74k
    yyscanner = NULL;
2693
3.74k
    return 0;
2694
3.74k
}
2695
2696
/*
2697
 * Internal utility routines.
2698
 */
2699
2700
#ifndef yytext_ptr
2701
static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
2702
{
2703
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2704
  (void)yyg;
2705
2706
  int i;
2707
  for ( i = 0; i < n; ++i )
2708
    s1[i] = s2[i];
2709
}
2710
#endif
2711
2712
#ifdef YY_NEED_STRLEN
2713
static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
2714
{
2715
  int n;
2716
  for ( n = 0; s[n]; ++n )
2717
    ;
2718
2719
  return n;
2720
}
2721
#endif
2722
2723
void *yyalloc (yy_size_t  size , yyscan_t yyscanner)
2724
14.9k
{
2725
14.9k
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2726
14.9k
  (void)yyg;
2727
14.9k
  return malloc(size);
2728
14.9k
}
2729
2730
void *yyrealloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
2731
287
{
2732
287
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2733
287
  (void)yyg;
2734
2735
  /* The cast to (char *) in the following accommodates both
2736
   * implementations that use char* generic pointers, and those
2737
   * that use void* generic pointers.  It works with the latter
2738
   * because both ANSI C and C++ allow castless assignment from
2739
   * any pointer type to void*, and deal with argument conversions
2740
   * as though doing an assignment.
2741
   */
2742
287
  return realloc(ptr, size);
2743
287
}
2744
2745
void yyfree (void * ptr , yyscan_t yyscanner)
2746
18.7k
{
2747
18.7k
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2748
18.7k
  (void)yyg;
2749
18.7k
  free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2750
18.7k
}
2751
2752
#define YYTABLES_NAME "yytables"
2753
2754
#line 195 "/src/igraph/src/io/pajek-lexer.l"
2755
2756