Coverage Report

Created: 2026-11-12 07:33

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