YugabyteDB (2.13.1.0-b60, 21121d69985fbf76aa6958d8f04a9bfa936293b5)

Coverage Report

Created: 2022-03-22 16:43

/Users/deen/code/yugabyte-db/build/debugcov-clang-dynamic-arm64-ninja/src/yb/yql/cql/ql/parser/scanner_lex.l.cc
Line
Count
Source (jump to first uncovered line)
1
#line 1 "/Users/deen/code/yugabyte-db/build/debugcov-clang-dynamic-arm64-ninja/src/yb/yql/cql/ql/parser/scanner_lex.l.cc"
2
3
#line 3 "/Users/deen/code/yugabyte-db/build/debugcov-clang-dynamic-arm64-ninja/src/yb/yql/cql/ql/parser/scanner_lex.l.cc"
4
5
#define  YY_INT_ALIGNED short int
6
7
/* A lexical scanner generated by flex */
8
9
#define FLEX_SCANNER
10
#define YY_FLEX_MAJOR_VERSION 2
11
#define YY_FLEX_MINOR_VERSION 6
12
#define YY_FLEX_SUBMINOR_VERSION 3
13
#if YY_FLEX_SUBMINOR_VERSION > 0
14
#define FLEX_BETA
15
#endif
16
17
    /* The c++ scanner is a mess. The FlexLexer.h header file relies on the
18
     * following macro. This is required in order to pass the c++-multiple-scanners
19
     * test in the regression suite. We get reports that it breaks inheritance.
20
     * We will address this in a future release of flex, or omit the C++ scanner
21
     * altogether.
22
     */
23
    #define yyFlexLexer yyFlexLexer
24
25
53.9k
    #define yyalloc yyalloc
26
27
0
    #define yyrealloc yyrealloc
28
29
4
    #define yyfree yyfree
30
31
/* First, we deal with  platform-specific or compiler-specific issues. */
32
33
/* begin standard C headers. */
34
35
/* end standard C headers. */
36
37
/* flex integer type definitions */
38
39
#ifndef FLEXINT_H
40
#define FLEXINT_H
41
42
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
43
44
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
45
46
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
47
 * if you want the limit (max/min) macros for int types. 
48
 */
49
#ifndef __STDC_LIMIT_MACROS
50
#define __STDC_LIMIT_MACROS 1
51
#endif
52
53
#include <inttypes.h>
54
typedef int8_t flex_int8_t;
55
typedef uint8_t flex_uint8_t;
56
typedef int16_t flex_int16_t;
57
typedef uint16_t flex_uint16_t;
58
typedef int32_t flex_int32_t;
59
typedef uint32_t flex_uint32_t;
60
#else
61
typedef signed char flex_int8_t;
62
typedef short int flex_int16_t;
63
typedef int flex_int32_t;
64
typedef unsigned char flex_uint8_t; 
65
typedef unsigned short int flex_uint16_t;
66
typedef unsigned int flex_uint32_t;
67
68
/* Limits of integral types. */
69
#ifndef INT8_MIN
70
#define INT8_MIN               (-128)
71
#endif
72
#ifndef INT16_MIN
73
#define INT16_MIN              (-32767-1)
74
#endif
75
#ifndef INT32_MIN
76
#define INT32_MIN              (-2147483647-1)
77
#endif
78
#ifndef INT8_MAX
79
#define INT8_MAX               (127)
80
#endif
81
#ifndef INT16_MAX
82
#define INT16_MAX              (32767)
83
#endif
84
#ifndef INT32_MAX
85
#define INT32_MAX              (2147483647)
86
#endif
87
#ifndef UINT8_MAX
88
#define UINT8_MAX              (255U)
89
#endif
90
#ifndef UINT16_MAX
91
#define UINT16_MAX             (65535U)
92
#endif
93
#ifndef UINT32_MAX
94
#define UINT32_MAX             (4294967295U)
95
#endif
96
97
#endif /* ! C99 */
98
99
#endif /* ! FLEXINT_H */
100
101
/* begin standard C++ headers. */
102
#include <iostream>
103
#include <errno.h>
104
#include <cstdlib>
105
#include <cstdio>
106
#include <cstring>
107
/* end standard C++ headers. */
108
109
/* TODO: this is always defined, so inline it */
110
#define yyconst const
111
112
#if defined(__GNUC__) && __GNUC__ >= 3
113
#define yynoreturn __attribute__((__noreturn__))
114
#else
115
#define yynoreturn
116
#endif
117
118
/* Returned upon end-of-file. */
119
#define YY_NULL 0
120
121
/* Promotes a possibly negative, possibly signed char to an
122
 *   integer in range [0..255] for use as an array index.
123
 */
124
30.9M
#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
125
126
/* Enter a start condition.  This macro really ought to take a parameter,
127
 * but we do it the disgusting crufty way forced on us by the ()-less
128
 * definition of BEGIN.
129
 */
130
432k
#define BEGIN (yy_start) = 1 + 2 *
131
/* Translate the current start state into a value that can be later handed
132
 * to BEGIN to return to the state.  The YYSTATE alias is for lex
133
 * compatibility.
134
 */
135
0
#define YY_START (((yy_start) - 1) / 2)
136
#define YYSTATE YY_START
137
/* Action number for EOF rule of a given start state. */
138
683k
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
139
/* Special action meaning "start processing a new file". */
140
0
#define YY_NEW_FILE yyrestart( yyin  )
141
3.45M
#define YY_END_OF_BUFFER_CHAR 0
142
143
/* Size of default input buffer. */
144
#ifndef YY_BUF_SIZE
145
#ifdef __ia64__
146
/* On IA-64, the buffer size is 16k, not 8k.
147
 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
148
 * Ditto for the __ia64__ case accordingly.
149
 */
150
#define YY_BUF_SIZE 32768
151
#else
152
18.0k
#define YY_BUF_SIZE 16384
153
#endif /* __ia64__ */
154
#endif
155
156
/* The state buf must be large enough to hold one state per character in the main buffer.
157
 */
158
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
159
160
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
161
#define YY_TYPEDEF_YY_BUFFER_STATE
162
typedef struct yy_buffer_state *YY_BUFFER_STATE;
163
#endif
164
165
#ifndef YY_TYPEDEF_YY_SIZE_T
166
#define YY_TYPEDEF_YY_SIZE_T
167
typedef size_t yy_size_t;
168
#endif
169
170
extern int yyleng;
171
172
680k
#define EOB_ACT_CONTINUE_SCAN 0
173
683k
#define EOB_ACT_END_OF_FILE 1
174
682k
#define EOB_ACT_LAST_MATCH 2
175
    
176
    #define YY_LESS_LINENO(n)
177
    #define YY_LINENO_REWIND_TO(ptr)
178
    
179
/* Return all but the first "n" matched characters back to the input stream. */
180
#define yyless(n) \
181
189k
  do \
182
189k
    { \
183
189k
    /* Undo effects of setting up yytext. */ \
184
189k
        int yyless_macro_arg = (n); \
185
189k
        YY_LESS_LINENO(yyless_macro_arg);\
186
189k
    *yy_cp = (yy_hold_char); \
187
189k
    YY_RESTORE_YY_MORE_OFFSET \
188
189k
    (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
189
189k
    YY_DO_BEFORE_ACTION; /* set up yytext again */ \
190
189k
    } \
191
189k
  while ( 0 )
192
#define unput(c) yyunput( c, (yytext_ptr)  )
193
194
#ifndef YY_STRUCT_YY_BUFFER_STATE
195
#define YY_STRUCT_YY_BUFFER_STATE
196
struct yy_buffer_state
197
  {
198
199
  std::streambuf* yy_input_file;
200
201
  char *yy_ch_buf;    /* input buffer */
202
  char *yy_buf_pos;   /* current position in input buffer */
203
204
  /* Size of input buffer in bytes, not including room for EOB
205
   * characters.
206
   */
207
  int yy_buf_size;
208
209
  /* Number of characters read into yy_ch_buf, not including EOB
210
   * characters.
211
   */
212
  int yy_n_chars;
213
214
  /* Whether we "own" the buffer - i.e., we know we created it,
215
   * and can realloc() it to grow it, and should free() it to
216
   * delete it.
217
   */
218
  int yy_is_our_buffer;
219
220
  /* Whether this is an "interactive" input source; if so, and
221
   * if we're using stdio for input, then we want to use getc()
222
   * instead of fread(), to make sure we stop fetching input after
223
   * each newline.
224
   */
225
  int yy_is_interactive;
226
227
  /* Whether we're considered to be at the beginning of a line.
228
   * If so, '^' rules will be active on the next match, otherwise
229
   * not.
230
   */
231
  int yy_at_bol;
232
233
    int yy_bs_lineno; /**< The line count. */
234
    int yy_bs_column; /**< The column count. */
235
236
  /* Whether to try to fill the input buffer when we reach the
237
   * end of it.
238
   */
239
  int yy_fill_buffer;
240
241
  int yy_buffer_status;
242
243
1.72M
#define YY_BUFFER_NEW 0
244
339k
#define YY_BUFFER_NORMAL 1
245
  /* When an EOF's been seen but there's still some text to process
246
   * then we mark the buffer as YY_EOF_PENDING, to indicate that we
247
   * shouldn't try reading from the input source any more.  We might
248
   * still have a bunch of tokens to match, though, because of
249
   * possible backing-up.
250
   *
251
   * When we actually see the EOF, we change the status to "new"
252
   * (via yyrestart()), so that the user can continue scanning by
253
   * just pointing yyin at a new input file.
254
   */
255
1.36M
#define YY_BUFFER_EOF_PENDING 2
256
257
  };
258
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
259
260
/* We provide macros for accessing buffer states in case in the
261
 * future we want to put the buffer states in a more general
262
 * "scanner state".
263
 *
264
 * Returns the top of the stack, or NULL.
265
 */
266
2.78M
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
267
2.78M
                          ? 
(yy_buffer_stack)[(yy_buffer_stack_top)]2.76M
\
268
2.78M
                          : NULL)
269
/* Same as previous macro, but useful when we know that the buffer stack is not
270
 * NULL or when we need an lvalue. For internal use only.
271
 */
272
17.8M
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
273
274
void *yyalloc ( yy_size_t  );
275
void *yyrealloc ( void *, yy_size_t  );
276
void yyfree ( void *  );
277
278
#define yy_new_buffer yy_create_buffer
279
#define yy_set_interactive(is_interactive) \
280
  { \
281
  if ( ! YY_CURRENT_BUFFER ){ \
282
        yyensure_buffer_stack (); \
283
    YY_CURRENT_BUFFER_LVALUE =    \
284
            yy_create_buffer( yyin, YY_BUF_SIZE ); \
285
  } \
286
  YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
287
  }
288
#define yy_set_bol(at_bol) \
289
  { \
290
  if ( ! YY_CURRENT_BUFFER ){\
291
        yyensure_buffer_stack (); \
292
    YY_CURRENT_BUFFER_LVALUE =    \
293
            yy_create_buffer( yyin, YY_BUF_SIZE ); \
294
  } \
295
  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
296
  }
297
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
298
299
/* Begin user sect3 */
300
#define YY_SKIP_YYWRAP
301
typedef flex_uint8_t YY_CHAR;
302
303
15.3M
#define yytext_ptr yytext
304
305
#include <FlexLexer.h>
306
307
342k
int yyFlexLexer::yywrap() { return 1; }
308
int yyFlexLexer::yylex()
309
0
  {
310
0
  LexerError( "yyFlexLexer::yylex invoked but %option yyclass used" );
311
0
  return 0;
312
0
  }
313
314
#define YY_DECL int yb::ql::LexProcessor::yylex()
315
316
/* Done after the current pattern has been matched and before the
317
 * corresponding action - sets up yytext.
318
 */
319
#define YY_DO_BEFORE_ACTION \
320
7.82M
  (yytext_ptr) = yy_bp; \
321
7.82M
  yyleng = (int) (yy_cp - yy_bp); \
322
7.82M
  (yy_hold_char) = *yy_cp; \
323
7.82M
  *yy_cp = '\0'; \
324
7.82M
  (yy_c_buf_p) = yy_cp;
325
#define YY_NUM_RULES 84
326
1.70M
#define YY_END_OF_BUFFER 85
327
/* This struct is not used in this scanner,
328
   but its presence is necessary. */
329
struct yy_trans_info
330
  {
331
  flex_int32_t yy_verify;
332
  flex_int32_t yy_nxt;
333
  };
334
static const flex_int16_t yy_accept[364] =
335
    {   0,
336
        0,    0,   13,   13,    0,    0,    0,    0,   12,   12,
337
        0,    0,    0,    0,    0,    0,    0,    0,   56,   56,
338
        0,    0,   29,   29,    0,    0,   85,   83,    2,    1,
339
        1,   72,   50,   72,   83,   71,   20,   71,   71,   71,
340
       71,   74,   74,   71,   71,   71,   71,   82,   82,   82,
341
       82,   82,   82,   82,   13,   10,    6,    6,    7,    7,
342
       59,   52,   12,   17,   33,   33,   23,   43,   32,   23,
343
       47,   47,   49,   53,   55,   54,   54,   55,   55,   25,
344
       28,   27,   27,   28,   28,   36,   37,   36,    2,   72,
345
       70,   44,   73,   45,    2,   64,   62,   75,    3,   75,
346
347
       74,    0,   79,   77,   61,   63,   67,   69,   66,   68,
348
       82,   82,    9,   21,   19,   60,   16,   13,   10,   10,
349
       11,    6,    8,    5,    4,   59,   58,   12,   17,   17,
350
       18,   33,   23,   23,   31,   24,   39,   40,   38,   38,
351
       39,   32,   47,   46,   48,   54,   54,   56,   25,   25,
352
       26,   27,   27,   29,   38,   38,   45,    2,    2,   65,
353
       79,    3,   76,   75,   74,    0,   79,   80,   78,   77,
354
       82,   51,   22,   10,   15,   11,   10,    4,   17,   14,
355
       18,   17,   23,   42,   24,   23,   40,   38,   38,   41,
356
       48,   54,   56,   25,   26,   25,   27,   29,   38,   38,
357
358
       78,   74,    0,   79,   78,   82,   10,   10,   10,   10,
359
       17,   17,   17,   17,   23,   23,   23,   23,   40,   38,
360
       38,   41,   56,   25,   25,   25,   25,   29,   38,   38,
361
       74,    0,   79,   78,   82,   10,   10,   10,   10,   10,
362
       17,   17,   17,   17,   17,   23,   23,   23,   23,   23,
363
       38,   38,   56,   25,   25,   25,   25,   25,   29,   38,
364
       38,   74,    0,   79,   78,   82,   10,   17,   23,   38,
365
       34,   56,   25,   29,   38,   35,   74,    0,   79,   78,
366
       82,   38,   56,   29,   38,   74,    0,   79,   78,   82,
367
       38,   56,   56,   56,   29,   29,   29,   38,    0,   74,
368
369
       80,   38,   56,   56,   29,   29,   38,    0,   78,   57,
370
       56,   56,   56,   56,   30,   29,   29,   29,   29,    0,
371
       78,   56,   56,   56,   56,   56,   29,   29,   29,   29,
372
       29,    0,   78,   56,   56,   29,   29,    0,   78,    0,
373
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
374
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
375
        0,   81,    0
376
    } ;
377
378
static const YY_CHAR yy_ec[256] =
379
    {   0,
380
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
381
        1,    2,    4,    1,    1,    1,    1,    1,    1,    1,
382
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
383
        1,    2,    5,    6,    7,    8,    9,   10,   11,   12,
384
       12,   13,   14,   12,   15,   16,   17,   18,   19,   19,
385
       19,   19,   19,   19,   19,   20,   20,   21,   12,   22,
386
       23,   24,    9,    7,   25,   26,   27,   28,   29,   28,
387
       30,   30,   30,   30,   30,   30,   30,   31,   30,   32,
388
       30,   30,   33,   30,   34,   30,   30,   35,   30,   30,
389
       12,   36,   12,    9,   30,    7,   25,   26,   27,   28,
390
391
       29,   28,   30,   30,   30,   30,   30,   30,   30,   31,
392
       30,   32,   30,   30,   33,   30,   37,   30,   30,   38,
393
       30,   30,    1,    7,    1,    7,    1,   30,   30,   30,
394
       30,   30,   30,   30,   30,   30,   30,   30,   30,   30,
395
       30,   30,   30,   30,   30,   30,   30,   30,   30,   30,
396
       30,   30,   30,   30,   30,   30,   30,   30,   30,   30,
397
       30,   30,   30,   30,   30,   30,   30,   30,   30,   30,
398
       30,   30,   30,   30,   30,   30,   30,   30,   30,   30,
399
       30,   30,   30,   30,   30,   30,   30,   30,   30,   30,
400
       30,   30,   30,   30,   30,   30,   30,   30,   30,   30,
401
402
       30,   30,   30,   30,   30,   30,   30,   30,   30,   30,
403
       30,   30,   30,   30,   30,   30,   30,   30,   30,   30,
404
       30,   30,   30,   30,   30,   30,   30,   30,   30,   30,
405
       30,   30,   30,   30,   30,   30,   30,   30,   30,   30,
406
       30,   30,   30,   30,   30,   30,   30,   30,   30,   30,
407
       30,   30,   30,   30,   30
408
    } ;
409
410
static const YY_CHAR yy_meta[39] =
411
    {   0,
412
        1,    1,    2,    2,    3,    4,    3,    5,    3,    3,
413
        6,    1,    7,    3,    3,    1,    7,    8,    8,    8,
414
        1,    1,    3,    1,    9,    9,    9,    9,    9,   10,
415
       10,   10,   10,   10,   10,   11,   10,   10
416
    } ;
417
418
static const flex_int16_t yy_base[461] =
419
    {   0,
420
        0,    0,  476,  458,   34,   53,  462,  460,  446,  439,
421
       39,   42,  436,  435,   51,   53,  425,  419,   77,  113,
422
      413,  411,  149,  185,   37,   49,  421, 1523,   80,   84,
423
       87,  391, 1523,    0,   85,    0, 1523, 1523,   31,   78,
424
      400,  207,   34,   78,   41,  382,  372,  238,  374,  373,
425
      259,  365,  359,  355,    0,  104,    0,    0,   96,  352,
426
        0,  354,    0,  118,    0,    0,  121,  108,    0,  152,
427
        0,    0,  348,  349, 1523,  127,  135,  337,  321,  155,
428
     1523,  158,  169,  328,  311, 1523, 1523,   37,  172,    0,
429
        0, 1523,  159,  331,  284,  304, 1523,  162,    0,  174,
430
431
      292,    0,  187,    0, 1523, 1523, 1523, 1523, 1523, 1523,
432
        0,  304, 1523, 1523, 1523,   89, 1523,    0,  193,  209,
433
      301,    0,  127, 1523,    0,    0, 1523,    0,  213,  236,
434
      299,    0,  246,  323, 1523,  298, 1523,  116,    0,    0,
435
        0,    0,    0, 1523,  301,  227,    0,  273,  300,  333,
436
      290,  250,    0,  267,    0,    0,  288,    0,  344, 1523,
437
      327,    0, 1523,  263,  352,    0,  368,  344,  134,    0,
438
      371, 1523, 1523,  390, 1523,  280,  400,    0,  405, 1523,
439
      275,  408,  415, 1523,  265,  425,  150,    0,    0,    0,
440
      266,    0,  235,  430,  245,  433,    0,  232,    0,    0,
441
442
      355,  433,    0,  424,  170,  445,  452,  473,  476,  479,
443
      482,  496,  499,  502,  505,  519,  522,  525, 1523,    0,
444
        0, 1523,  230,  528,  542,  545,  548,  216,    0,    0,
445
      548,    0,  564,  184,  567,  586,  595,  600,  603,  610,
446
      617,  620,  625,  635,  639,  642,  645,  659,  649,  663,
447
        0,    0,  205,  669,  673,  678,  683,  688,  189,    0,
448
        0,  688,    0,  681,  195,  700,  707,  728,  731,    0,
449
     1523,  189,  734,  185,    0, 1523,  734,    0,  750,  229,
450
      753,    0,  772,  782,    0,  783,  189,  776,  789,  150,
451
        0,  811,    0,  128,  814,    0,  126,    0,    0,  812,
452
453
      535,    0,  107,  831,  101,  834,    0,    0,  551, 1523,
454
      848,  851,  854,  868, 1523,  871,  874,  888,  891,    0,
455
      721,  894,  908,  911,  914,  928,  931,  934,  948,  951,
456
      954,    0,  737,  968,    0,  971,    0,   95,  969,    0,
457
        0,    0,    0,   87,    0,    0,    0,    0,   62,    0,
458
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
459
        0, 1523, 1523,  989, 1000, 1011, 1022, 1033, 1044, 1055,
460
     1066, 1077, 1088, 1097, 1100, 1110, 1121, 1132, 1143, 1154,
461
     1164, 1175, 1186, 1193, 1199, 1209, 1218, 1218, 1220, 1227,
462
     1227, 1229, 1231, 1236, 1246, 1257, 1261, 1263, 1265, 1274,
463
464
     1285, 1296, 1300, 1302, 1304, 1313, 1317, 1319, 1321, 1330,
465
     1341, 1352, 1356, 1358, 1367, 1371, 1373, 1375, 1377, 1379,
466
     1381, 1383, 1385, 1387, 1389, 1391, 1393, 1395, 1397, 1406,
467
     1417, 1421, 1423, 1432, 1443, 1447, 1456, 1467, 1471, 1473,
468
     1475, 1477, 1479, 1481, 1483, 1485, 1487, 1489, 1491, 1493,
469
     1495, 1497, 1499, 1501, 1503, 1505, 1507, 1509, 1511, 1513
470
    } ;
471
472
static const flex_int16_t yy_def[461] =
473
    {   0,
474
      363,    1,  364,  364,  365,  365,  366,  366,  367,  367,
475
      368,  368,  369,  369,  370,  370,  366,  366,  371,  371,
476
      369,  369,  372,  372,  373,  373,  363,  363,  363,  363,
477
      363,  374,  363,  374,  375,  374,  363,  363,  374,  363,
478
      374,  363,   42,  363,  363,  374,  363,  363,   48,   48,
479
       48,   51,   51,   51,  376,  363,  377,  377,  363,  363,
480
      378,  363,  379,  363,  380,  380,  363,  381,  382,  363,
481
      383,  383,  384,  363,  363,  363,  363,  363,  363,  363,
482
      363,  363,  363,  363,  363,  363,  363,  363,  363,  374,
483
      374,  363,  363,  385,  386,  363,  363,  363,  387,  363,
484
485
      363,  388,  388,  389,  363,  363,  363,  363,  363,  363,
486
       51,   51,  363,  363,  363,  363,  363,  376,  363,  363,
487
      363,  377,  363,  363,  390,  378,  363,  379,  363,  363,
488
      363,  380,  363,  363,  363,  363,  363,  363,  391,  392,
489
      393,  382,  383,  363,  394,  363,  395,  363,  363,  363,
490
      363,  363,  396,  363,  397,  398,  385,  386,  386,  363,
491
      363,  387,  363,  363,  363,  399,  399,  363,  167,  389,
492
       51,  363,  363,  363,  363,  363,  400,  390,  363,  363,
493
      363,  401,  363,  363,  363,  402,  363,  403,  404,  405,
494
      394,  395,  363,  363,  363,  406,  396,  363,  407,  408,
495
496
      363,  363,  409,  409,  204,   51,  410,  400,  400,  400,
497
      411,  401,  401,  401,  412,  402,  402,  402,  363,  413,
498
      414,  363,  363,  415,  406,  406,  406,  363,  416,  417,
499
      363,  418,  418,  233,   51,  410,  410,  363,  410,  400,
500
      411,  411,  363,  411,  401,  412,  412,  363,  412,  402,
501
      419,  420,  363,  415,  415,  363,  415,  406,  363,  421,
502
      422,  363,  423,  423,  264,   51,  410,  411,  412,  424,
503
      363,  363,  415,  363,  425,  363,  363,  426,  426,  279,
504
       51,  427,  363,  363,  428,  363,  363,  363,  363,   51,
505
      429,  363,  430,  363,  363,  431,  363,  432,  433,  363,
506
507
      433,  420,  363,  434,  363,  435,  422,  436,  436,  363,
508
      434,  434,  437,  434,  363,  435,  435,  438,  435,  439,
509
      439,  434,  434,  363,  434,  434,  435,  435,  363,  435,
510
      435,  440,  440,  437,  430,  438,  431,  363,  363,  441,
511
      442,  443,  444,  363,  445,  446,  447,  448,  363,  449,
512
      450,  451,  452,  453,  454,  455,  456,  457,  458,  459,
513
      460,  363,    0,  363,  363,  363,  363,  363,  363,  363,
514
      363,  363,  363,  363,  363,  363,  363,  363,  363,  363,
515
      363,  363,  363,  363,  363,  363,  363,  363,  363,  363,
516
      363,  363,  363,  363,  363,  363,  363,  363,  363,  363,
517
518
      363,  363,  363,  363,  363,  363,  363,  363,  363,  363,
519
      363,  363,  363,  363,  363,  363,  363,  363,  363,  363,
520
      363,  363,  363,  363,  363,  363,  363,  363,  363,  363,
521
      363,  363,  363,  363,  363,  363,  363,  363,  363,  363,
522
      363,  363,  363,  363,  363,  363,  363,  363,  363,  363,
523
      363,  363,  363,  363,  363,  363,  363,  363,  363,  363
524
    } ;
525
526
static const flex_int16_t yy_nxt[1562] =
527
    {   0,
528
       28,   29,   30,   31,   32,   33,   34,   35,   36,   34,
529
       37,   38,   36,   36,   39,   40,   41,   42,   43,   43,
530
       44,   45,   46,   47,   48,   49,   48,   48,   50,   51,
531
       52,   51,   51,   53,   54,   28,   53,   54,   58,   87,
532
       58,   66,   58,   58,   66,   95,   59,   58,   58,   67,
533
       60,   87,   67,   72,   96,   72,   58,   58,   73,   58,
534
       73,   58,   58,  107,  108,   59,   58,   58,  363,   60,
535
      155,  363,   88,  156,   68,   58,  350,   68,   76,   77,
536
       76,   89,   89,   89,   88,   89,   89,   89,   89,   89,
537
       89,   78,   92,   97,  172,   98,   98,   98,  105,  173,
538
539
      106,  345,   93,   93,   93,  119,  120,  120,  123,  340,
540
       79,  315,  124,   79,   76,   77,   76,  310,  121,  129,
541
      130,  130,  133,  134,  134,  138,  138,   78,  146,  146,
542
      146,  135,  131,  187,  187,  136,  146,  146,  146,  123,
543
      306,  139,  304,  124,  140,  141,   79,  363,  363,   79,
544
       82,   83,   82,  133,  134,  134,  149,  150,  150,  152,
545
      152,  152,  135,   84,  299,  135,  136,  219,  219,  151,
546
      152,  152,  152,   89,   89,   89,   93,   93,   93,   98,
547
       98,   98,   85,  363,  363,   85,   82,   83,   82,  163,
548
      161,  164,  164,  164,  119,  120,  120,  363,  363,   84,
549
550
      168,  168,  161,  299,  169,  169,  169,  121,  363,  363,
551
      174,  174,  174,  284,  129,  130,  130,  283,   85,  175,
552
      274,   85,  100,  176,  101,  101,  101,  131,  146,  146,
553
      146,  102,  102,  102,  102,  103,  272,  179,  179,  179,
554
      259,  104,  363,  363,  104,  111,  180,  133,  134,  134,
555
      181,  152,  152,  152,  253,  112,  112,  112,  228,  224,
556
      136,  223,  112,  112,  112,  112,  112,  111,  111,  111,
557
      111,  111,  111,  144,  111,  111,  111,  111,  111,  215,
558
      164,  164,  164,  111,  111,  111,  111,  111,  159,  211,
559
      159,  161,  159,  159,  207,   92,  159,  159,  159,  198,
560
561
      159,  149,  150,  150,  196,  193,  159,  100,  144,  165,
562
      165,  165,  186,  182,  151,  177,  166,  166,  166,  166,
563
      167,  171,  171,  171,  183,  183,  183,  160,  171,  171,
564
      171,  171,  171,  184,  194,  194,  194,  185,   92,  154,
565
      168,  168,  153,  184,  201,  201,  201,  195,  159,  148,
566
      159,  147,  159,  159,  127,  144,  159,  159,  159,  127,
567
      159,  201,  201,  201,  125,  117,  159,  100,  116,  202,
568
      202,  202,  201,  201,  201,  115,  203,  203,  203,  203,
569
      204,  168,  168,  114,  113,  205,  205,  205,  206,  206,
570
      206,  174,  174,  174,  110,  206,  206,  206,  206,  206,
571
572
      175,  209,  120,  120,  176,  109,  179,  179,  179,  213,
573
      130,  130,   99,   91,  210,  180,  183,  183,  183,  181,
574
      363,   80,  214,   80,   74,  184,  217,  134,  134,  185,
575
       74,  194,  194,  194,  226,  150,  150,  168,  168,  218,
576
      184,  234,  234,  234,  195,   70,   70,  227,  100,   64,
577
      231,  231,  231,  237,  238,  238,   64,  232,  232,  232,
578
      232,  233,  235,  235,  235,   62,  239,   62,   56,  235,
579
      235,  235,  235,  235,  209,  120,  120,  209,  120,  120,
580
      209,  120,  120,  242,  243,  243,   56,  210,  363,  363,
581
      210,  363,  363,  240,  363,  363,  244,  213,  130,  130,
582
583
      213,  130,  130,  213,  130,  130,  247,  248,  248,  363,
584
      214,  363,  363,  214,  363,  363,  245,  363,  363,  249,
585
      217,  134,  134,  217,  134,  134,  217,  134,  134,  255,
586
      256,  256,  363,  218,  363,  363,  218,  363,  363,  250,
587
      363,  363,  257,  226,  150,  150,  226,  150,  150,  226,
588
      150,  150,  309,  309,  309,  363,  227,  363,  363,  227,
589
      363,  363,  258,  100,  363,  262,  262,  262,  321,  321,
590
      321,  363,  263,  263,  263,  263,  264,  168,  168,  363,
591
      363,  265,  265,  265,  266,  266,  266,  237,  238,  238,
592
      363,  266,  266,  266,  266,  266,  237,  238,  238,  363,
593
594
      239,  174,  174,  174,  237,  238,  238,  363,  363,  239,
595
      175,  209,  120,  120,  176,  363,  363,  267,  242,  243,
596
      243,  242,  243,  243,  240,  363,  179,  179,  179,  363,
597
      363,  244,  363,  363,  244,  180,  242,  243,  243,  181,
598
      213,  130,  130,  247,  248,  248,  247,  248,  248,  268,
599
      247,  248,  248,  245,  363,  363,  249,  363,  363,  249,
600
      183,  183,  183,  269,  217,  134,  134,  363,  363,  184,
601
      255,  256,  256,  185,  255,  256,  256,  250,  363,  194,
602
      194,  194,  363,  257,  255,  256,  256,  257,  184,  226,
603
      150,  150,  195,  363,  168,  168,  363,  273,  280,  280,
604
605
      280,  363,  258,  100,  363,  277,  277,  277,  237,  238,
606
      238,  363,  278,  278,  278,  278,  279,  281,  281,  281,
607
      363,  267,  363,  363,  281,  281,  281,  281,  281,  242,
608
      243,  243,  247,  248,  248,  255,  256,  256,  333,  333,
609
      333,  363,  268,  363,  363,  269,  363,  363,  273,  100,
610
      363,  286,  286,  286,  339,  339,  339,  363,  287,  287,
611
      287,  287,  288,  168,  168,  363,  363,  289,  289,  289,
612
      290,  290,  290,  292,  292,  292,  363,  290,  290,  290,
613
      290,  290,  293,  295,  295,  295,  294,  363,  363,  168,
614
      301,  363,  296,  201,  201,  201,  297,  299,  100,  363,
615
616
      300,  300,  300,  299,  363,  363,  201,  201,  201,  363,
617
      363,  161,  292,  292,  292,  295,  295,  295,  363,  363,
618
      363,  293,  363,  363,  296,  294,  363,  100,  297,  300,
619
      300,  300,  312,  292,  292,  317,  295,  295,  363,  363,
620
      161,  313,  363,  363,  318,  314,  363,  363,  319,  312,
621
      292,  292,  312,  292,  292,  323,  324,  324,  313,  363,
622
      363,  313,  314,  363,  313,  314,  363,  363,  325,  312,
623
      292,  292,  317,  295,  295,  317,  295,  295,  313,  363,
624
      363,  318,  326,  363,  318,  319,  363,  363,  319,  328,
625
      329,  329,  317,  295,  295,  312,  292,  292,  318,  363,
626
627
      363,  318,  330,  363,  334,  331,  363,  363,  314,  312,
628
      292,  292,  292,  292,  292,  312,  292,  292,  334,  363,
629
      363,  335,  314,  363,  334,  294,  363,  363,  326,  312,
630
      292,  292,  317,  295,  295,  317,  295,  295,  313,  363,
631
      363,  336,  326,  363,  336,  319,  363,  363,  319,  295,
632
      295,  295,  317,  295,  295,  317,  295,  295,  337,  363,
633
      363,  336,  297,  363,  318,  331,  363,  363,  331,  323,
634
      324,  324,  328,  329,  329,  363,  363,  363,  313,  363,
635
      363,  318,  325,  340,  363,  330,  201,  201,  201,   55,
636
       55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
637
638
       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
639
       57,   61,   61,   61,   61,   61,   61,   61,   61,   61,
640
       61,   61,   63,   63,   63,   63,   63,   63,   63,   63,
641
       63,   63,   63,   65,   65,   65,   65,   65,   65,   65,
642
       65,   65,   65,   65,   69,   69,   69,   69,   69,   69,
643
       69,   69,   69,   69,   69,   71,   71,   71,   71,   71,
644
       71,   71,   71,   71,   71,   71,   75,   75,   75,   75,
645
       75,   75,   75,   75,   75,   75,   75,   81,   81,   81,
646
       81,   81,   81,   81,   81,   81,   81,   81,   86,   86,
647
       86,   86,   86,   86,   86,   86,   86,   86,   86,   90,
648
649
      363,  363,  363,   90,   94,  363,  363,   94,   94,   94,
650
      118,  118,  118,  118,  118,  363,  118,  118,  118,  118,
651
      118,  122,  122,  122,  122,  122,  122,  363,  122,  122,
652
      122,  122,  126,  126,  126,  363,  126,  126,  126,  126,
653
      126,  126,  126,  128,  128,  128,  128,  128,  363,  128,
654
      128,  128,  128,  128,  132,  132,  132,  132,  132,  363,
655
      132,  132,  132,  132,  137,  137,  137,  137,  137,  137,
656
      137,  137,  137,  137,  137,  142,  142,  142,  142,  142,
657
      363,  142,  142,  142,  142,  142,  143,  143,  143,  143,
658
      363,  143,  143,  143,  143,  143,  143,  145,  363,  363,
659
660
      363,  145,  145,  157,  363,  363,  157,  157,  157,  158,
661
      363,  158,  158,  158,  158,  158,  158,  158,  158,  158,
662
      162,  363,  363,  363,  162,  166,  166,  170,  170,  178,
663
      363,  363,  363,  178,  188,  188,  189,  189,  190,  190,
664
      191,  363,  363,  191,  191,  191,  192,  363,  192,  192,
665
      192,  192,  192,  192,  192,  192,  192,  197,  363,  197,
666
      197,  197,  197,  197,  197,  197,  197,  197,  199,  199,
667
      200,  200,  203,  203,  208,  208,  208,  208,  208,  208,
668
      208,  208,  208,  208,  208,  212,  212,  212,  212,  212,
669
      212,  212,  212,  212,  212,  212,  216,  216,  216,  216,
670
671
      216,  216,  216,  216,  216,  216,  216,  220,  220,  221,
672
      221,  222,  222,  225,  225,  225,  225,  225,  225,  225,
673
      225,  225,  225,  225,  229,  229,  230,  230,  232,  232,
674
      236,  236,  236,  236,  236,  236,  236,  236,  236,  236,
675
      236,  241,  241,  241,  241,  241,  241,  241,  241,  241,
676
      241,  241,  246,  246,  246,  246,  246,  246,  246,  246,
677
      246,  246,  246,  251,  251,  252,  252,  254,  254,  254,
678
      254,  254,  254,  254,  254,  254,  254,  254,  260,  260,
679
      261,  261,  263,  263,  270,  270,  271,  271,  275,  275,
680
      276,  276,  278,  278,  282,  282,  285,  285,  287,  287,
681
682
      291,  291,  298,  298,  302,  302,  303,  303,  303,  303,
683
      303,  363,  303,  303,  303,  303,  303,  305,  305,  305,
684
      305,  305,  363,  305,  305,  305,  305,  305,  307,  307,
685
      308,  308,  311,  311,  311,  311,  311,  311,  311,  311,
686
      311,  311,  311,  316,  316,  316,  316,  316,  316,  316,
687
      316,  316,  316,  316,  320,  320,  322,  322,  322,  322,
688
      322,  322,  322,  322,  322,  322,  322,  327,  327,  327,
689
      327,  327,  327,  327,  327,  327,  327,  327,  332,  332,
690
      338,  338,  341,  341,  342,  342,  343,  343,  344,  344,
691
      346,  346,  347,  347,  348,  348,  349,  349,  351,  351,
692
693
      352,  352,  353,  353,  354,  354,  355,  355,  356,  356,
694
      357,  357,  358,  358,  359,  359,  360,  360,  361,  361,
695
      362,  362,   27,  363,  363,  363,  363,  363,  363,  363,
696
      363,  363,  363,  363,  363,  363,  363,  363,  363,  363,
697
      363,  363,  363,  363,  363,  363,  363,  363,  363,  363,
698
      363,  363,  363,  363,  363,  363,  363,  363,  363,  363,
699
      363
700
    } ;
701
702
static const flex_int16_t yy_chk[1562] =
703
    {   0,
704
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
705
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
706
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
707
        1,    1,    1,    1,    1,    1,    1,    1,    5,   25,
708
        5,   11,    5,    5,   12,   39,    5,    5,    5,   11,
709
        5,   26,   12,   15,   39,   16,    5,    6,   15,    6,
710
       16,    6,    6,   45,   45,    6,    6,    6,   43,    6,
711
       88,   43,   25,   88,   11,    6,  349,   12,   19,   19,
712
       19,   29,   29,   29,   26,   30,   30,   30,   31,   31,
713
       31,   19,   35,   40,  116,   40,   40,   40,   44,  116,
714
715
       44,  344,   35,   35,   35,   56,   56,   56,   59,  338,
716
       19,  305,   59,   19,   20,   20,   20,  303,   56,   64,
717
       64,   64,   67,   67,   67,   68,   68,   20,   76,   76,
718
       76,   67,   64,  138,  138,   67,   77,   77,   77,  123,
719
      297,   68,  294,  123,   68,   68,   20,  169,  169,   20,
720
       23,   23,   23,   70,   70,   70,   80,   80,   80,   82,
721
       82,   82,   70,   23,  290,   80,   70,  187,  187,   80,
722
       83,   83,   83,   89,   89,   89,   93,   93,   93,   98,
723
       98,   98,   23,  205,  205,   23,   24,   24,   24,  100,
724
       98,  100,  100,  100,  119,  119,  119,  234,  234,   24,
725
726
      103,  103,  100,  287,  103,  103,  103,  119,  265,  265,
727
      120,  120,  120,  274,  129,  129,  129,  272,   24,  120,
728
      259,   24,   42,  120,   42,   42,   42,  129,  146,  146,
729
      146,   42,   42,   42,   42,   42,  253,  130,  130,  130,
730
      228,   42,  280,  280,   42,   48,  130,  133,  133,  133,
731
      130,  152,  152,  152,  223,   48,   48,   48,  198,  195,
732
      133,  193,   48,   48,   48,   48,   48,   48,   48,   48,
733
       48,   48,   48,  191,   48,   48,   51,   51,   51,  185,
734
      164,  164,  164,   51,   51,   51,   51,   51,   95,  181,
735
       95,  164,   95,   95,  176,  157,   95,   95,   95,  154,
736
737
       95,  149,  149,  149,  151,  148,   95,  101,  145,  101,
738
      101,  101,  136,  131,  149,  121,  101,  101,  101,  101,
739
      101,  112,  112,  112,  134,  134,  134,   96,  112,  112,
740
      112,  112,  112,  134,  150,  150,  150,  134,   94,   85,
741
      161,  161,   84,  150,  161,  161,  161,  150,  159,   79,
742
      159,   78,  159,  159,   74,   73,  159,  159,  159,   62,
743
      159,  168,  168,  168,   60,   54,  159,  165,   53,  165,
744
      165,  165,  201,  201,  201,   52,  165,  165,  165,  165,
745
      165,  167,  167,   50,   49,  167,  167,  167,  171,  171,
746
      171,  174,  174,  174,   47,  171,  171,  171,  171,  171,
747
748
      174,  177,  177,  177,  174,   46,  179,  179,  179,  182,
749
      182,  182,   41,   32,  177,  179,  183,  183,  183,  179,
750
       27,   22,  182,   21,   18,  183,  186,  186,  186,  183,
751
       17,  194,  194,  194,  196,  196,  196,  204,  204,  186,
752
      194,  204,  204,  204,  194,   14,   13,  196,  202,   10,
753
      202,  202,  202,  207,  207,  207,    9,  202,  202,  202,
754
      202,  202,  206,  206,  206,    8,  207,    7,    4,  206,
755
      206,  206,  206,  206,  208,  208,  208,  209,  209,  209,
756
      210,  210,  210,  211,  211,  211,    3,  208,    0,    0,
757
      209,    0,    0,  210,    0,    0,  211,  212,  212,  212,
758
759
      213,  213,  213,  214,  214,  214,  215,  215,  215,    0,
760
      212,    0,    0,  213,    0,    0,  214,    0,    0,  215,
761
      216,  216,  216,  217,  217,  217,  218,  218,  218,  224,
762
      224,  224,    0,  216,    0,    0,  217,    0,    0,  218,
763
        0,    0,  224,  225,  225,  225,  226,  226,  226,  227,
764
      227,  227,  301,  301,  301,    0,  225,    0,    0,  226,
765
        0,    0,  227,  231,    0,  231,  231,  231,  309,  309,
766
      309,    0,  231,  231,  231,  231,  231,  233,  233,    0,
767
        0,  233,  233,  233,  235,  235,  235,  236,  236,  236,
768
        0,  235,  235,  235,  235,  235,  237,  237,  237,    0,
769
770
      236,  238,  238,  238,  239,  239,  239,    0,    0,  237,
771
      238,  240,  240,  240,  238,    0,    0,  239,  241,  241,
772
      241,  242,  242,  242,  240,    0,  243,  243,  243,    0,
773
        0,  241,    0,    0,  242,  243,  244,  244,  244,  243,
774
      245,  245,  245,  246,  246,  246,  247,  247,  247,  244,
775
      249,  249,  249,  245,    0,    0,  246,    0,    0,  247,
776
      248,  248,  248,  249,  250,  250,  250,    0,    0,  248,
777
      254,  254,  254,  248,  255,  255,  255,  250,    0,  256,
778
      256,  256,    0,  254,  257,  257,  257,  255,  256,  258,
779
      258,  258,  256,    0,  264,  264,    0,  257,  264,  264,
780
781
      264,    0,  258,  262,    0,  262,  262,  262,  267,  267,
782
      267,    0,  262,  262,  262,  262,  262,  266,  266,  266,
783
        0,  267,    0,    0,  266,  266,  266,  266,  266,  268,
784
      268,  268,  269,  269,  269,  273,  273,  273,  321,  321,
785
      321,    0,  268,    0,    0,  269,    0,    0,  273,  277,
786
        0,  277,  277,  277,  333,  333,  333,    0,  277,  277,
787
      277,  277,  277,  279,  279,    0,    0,  279,  279,  279,
788
      281,  281,  281,  283,  283,  283,    0,  281,  281,  281,
789
      281,  281,  283,  284,  284,  284,  283,    0,    0,  288,
790
      288,    0,  284,  288,  288,  288,  284,  286,  286,    0,
791
792
      286,  286,  286,  289,    0,    0,  289,  289,  289,    0,
793
        0,  286,  292,  292,  292,  295,  295,  295,    0,    0,
794
        0,  292,    0,    0,  295,  292,    0,  300,  295,  300,
795
      300,  300,  304,  304,  304,  306,  306,  306,    0,    0,
796
      300,  304,    0,    0,  306,  304,    0,    0,  306,  311,
797
      311,  311,  312,  312,  312,  313,  313,  313,  311,    0,
798
        0,  312,  311,    0,  313,  312,    0,    0,  313,  314,
799
      314,  314,  316,  316,  316,  317,  317,  317,  314,    0,
800
        0,  316,  314,    0,  317,  316,    0,    0,  317,  318,
801
      318,  318,  319,  319,  319,  322,  322,  322,  318,    0,
802
803
        0,  319,  318,    0,  322,  319,    0,    0,  322,  323,
804
      323,  323,  324,  324,  324,  325,  325,  325,  323,    0,
805
        0,  324,  323,    0,  325,  324,    0,    0,  325,  326,
806
      326,  326,  327,  327,  327,  328,  328,  328,  326,    0,
807
        0,  327,  326,    0,  328,  327,    0,    0,  328,  329,
808
      329,  329,  330,  330,  330,  331,  331,  331,  329,    0,
809
        0,  330,  329,    0,  331,  330,    0,    0,  331,  334,
810
      334,  334,  336,  336,  336,    0,    0,    0,  334,    0,
811
        0,  336,  334,  339,    0,  336,  339,  339,  339,  364,
812
      364,  364,  364,  364,  364,  364,  364,  364,  364,  364,
813
814
      365,  365,  365,  365,  365,  365,  365,  365,  365,  365,
815
      365,  366,  366,  366,  366,  366,  366,  366,  366,  366,
816
      366,  366,  367,  367,  367,  367,  367,  367,  367,  367,
817
      367,  367,  367,  368,  368,  368,  368,  368,  368,  368,
818
      368,  368,  368,  368,  369,  369,  369,  369,  369,  369,
819
      369,  369,  369,  369,  369,  370,  370,  370,  370,  370,
820
      370,  370,  370,  370,  370,  370,  371,  371,  371,  371,
821
      371,  371,  371,  371,  371,  371,  371,  372,  372,  372,
822
      372,  372,  372,  372,  372,  372,  372,  372,  373,  373,
823
      373,  373,  373,  373,  373,  373,  373,  373,  373,  374,
824
825
        0,    0,    0,  374,  375,    0,    0,  375,  375,  375,
826
      376,  376,  376,  376,  376,    0,  376,  376,  376,  376,
827
      376,  377,  377,  377,  377,  377,  377,    0,  377,  377,
828
      377,  377,  378,  378,  378,    0,  378,  378,  378,  378,
829
      378,  378,  378,  379,  379,  379,  379,  379,    0,  379,
830
      379,  379,  379,  379,  380,  380,  380,  380,  380,    0,
831
      380,  380,  380,  380,  381,  381,  381,  381,  381,  381,
832
      381,  381,  381,  381,  381,  382,  382,  382,  382,  382,
833
        0,  382,  382,  382,  382,  382,  383,  383,  383,  383,
834
        0,  383,  383,  383,  383,  383,  383,  384,    0,    0,
835
836
        0,  384,  384,  385,    0,    0,  385,  385,  385,  386,
837
        0,  386,  386,  386,  386,  386,  386,  386,  386,  386,
838
      387,    0,    0,    0,  387,  388,  388,  389,  389,  390,
839
        0,    0,    0,  390,  391,  391,  392,  392,  393,  393,
840
      394,    0,    0,  394,  394,  394,  395,    0,  395,  395,
841
      395,  395,  395,  395,  395,  395,  395,  396,    0,  396,
842
      396,  396,  396,  396,  396,  396,  396,  396,  397,  397,
843
      398,  398,  399,  399,  400,  400,  400,  400,  400,  400,
844
      400,  400,  400,  400,  400,  401,  401,  401,  401,  401,
845
      401,  401,  401,  401,  401,  401,  402,  402,  402,  402,
846
847
      402,  402,  402,  402,  402,  402,  402,  403,  403,  404,
848
      404,  405,  405,  406,  406,  406,  406,  406,  406,  406,
849
      406,  406,  406,  406,  407,  407,  408,  408,  409,  409,
850
      410,  410,  410,  410,  410,  410,  410,  410,  410,  410,
851
      410,  411,  411,  411,  411,  411,  411,  411,  411,  411,
852
      411,  411,  412,  412,  412,  412,  412,  412,  412,  412,
853
      412,  412,  412,  413,  413,  414,  414,  415,  415,  415,
854
      415,  415,  415,  415,  415,  415,  415,  415,  416,  416,
855
      417,  417,  418,  418,  419,  419,  420,  420,  421,  421,
856
      422,  422,  423,  423,  424,  424,  425,  425,  426,  426,
857
858
      427,  427,  428,  428,  429,  429,  430,  430,  430,  430,
859
      430,    0,  430,  430,  430,  430,  430,  431,  431,  431,
860
      431,  431,    0,  431,  431,  431,  431,  431,  432,  432,
861
      433,  433,  434,  434,  434,  434,  434,  434,  434,  434,
862
      434,  434,  434,  435,  435,  435,  435,  435,  435,  435,
863
      435,  435,  435,  435,  436,  436,  437,  437,  437,  437,
864
      437,  437,  437,  437,  437,  437,  437,  438,  438,  438,
865
      438,  438,  438,  438,  438,  438,  438,  438,  439,  439,
866
      440,  440,  441,  441,  442,  442,  443,  443,  444,  444,
867
      445,  445,  446,  446,  447,  447,  448,  448,  449,  449,
868
869
      450,  450,  451,  451,  452,  452,  453,  453,  454,  454,
870
      455,  455,  456,  456,  457,  457,  458,  458,  459,  459,
871
      460,  460,  363,  363,  363,  363,  363,  363,  363,  363,
872
      363,  363,  363,  363,  363,  363,  363,  363,  363,  363,
873
      363,  363,  363,  363,  363,  363,  363,  363,  363,  363,
874
      363,  363,  363,  363,  363,  363,  363,  363,  363,  363,
875
      363
876
    } ;
877
878
/* The intent behind this definition is that it'll catch
879
 * any uses of REJECT which flex missed.
880
 */
881
#define REJECT reject_used_but_not_detected
882
#define yymore() yymore_used_but_not_detected
883
2.57M
#define YY_MORE_ADJ 0
884
#define YY_RESTORE_YY_MORE_OFFSET
885
#line 1 "scanner_lex.l"
886
#line 2 "scanner_lex.l"
887
/*--------------------------------------------------------------------------------------------------
888
 * NOTE:
889
 * - All entities in this modules are copies of PostgreQL's code. We made some minor changes
890
 *   to avoid lint errors such as using '{' for if blocks.
891
 * - Do not use c++ commenting style (//) here because MAC Flex 2.6.2 has problem processing it.
892
 *   Example: Flex raise error for the following comment
893
 *            // processing a single quote (') in c++ comment within a rule action.
894
 * -------------------------------------------------------------------------------------------------
895
 */
896
897
/*--------------------------------------------------------------------------------------------------
898
 * Portions Copyright (c) YugaByte, Inc.
899
 * Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group
900
 * Portions Copyright (c) 1994, Regents of the University of California
901
 *
902
 * Lexical scanner for PostgreSQL
903
 *
904
 * The rules in this file must be kept in sync with psql's lexer!!!
905
 *
906
 * The rules are designed so that the scanner never has to backtrack,
907
 * in the sense that there is always a rule that can match the input
908
 * consumed so far (the rule action may internally throw back some input
909
 * with yyless(), however).  As explained in the flex manual, this makes
910
 * for a useful speed increase --- about a third faster than a plain -CF
911
 * lexer, in simple testing.  The extra complexity is mostly in the rules
912
 * for handling float numbers and continued string literals.  If you change
913
 * the lexical rules, verify that you haven't broken the no-backtrack
914
 * property by running flex with the "-b" option and checking that the
915
 * resulting "lex.backup" file says that no backing up is needed.  (As of
916
 * Postgres 9.2, this check is made automatically by the Makefile.)
917
 *--------------------------------------------------------------------------------------------------
918
 */
919
920
#include "yb/yql/cql/ql/parser/parser.h"
921
#include "yb/yql/cql/ql/parser/parse_context.h"
922
#include "yb/yql/cql/ql/parser/scanner.h"
923
#include "yb/yql/cql/ql/parser/scanner_util.h"
924
#include "yb/gutil/casts.h"
925
#include "yb/util/logging.h"
926
927
/* Not including unistd. */
928
#define YY_NO_UNISTD_H
929
930
using namespace std;
931
using namespace yb::ql;
932
933
/*
934
 * Flex 2.6.3 generates cc file which raises warning wile compilation by gcc 7.5.x
935
 * scanner_lex.l.cc:3318:28: error: the compiler can assume that the address of ‘file’ will never be NULL [-Werror=address]
936
 */
937
#if defined(__GNUC__)
938
#pragma GCC diagnostic ignored "-Waddress"
939
#endif
940
941
#undef YY_DECL
942
#define YY_DECL \
943
  GramProcessor::symbol_type LexProcessor::yylex(const ScanState& scan_state)
944
945
/* yyterminate is called to end yylex. */
946
342k
#define yyterminate() return GramProcessor::make_END(cursor_)
947
948
/* YY_USER_ACTION is called to advance location after each time a pattern is matched. */
949
6.62M
#define YY_USER_ACTION cursor_.columns(yyleng);
950
951
/* Lexxer "yyerror" is used only when the scanner failed to understand the input string when
952
 * translating it into tokens. When this serious error occurs, the compilation stops immediately.
953
 *
954
 * yyerror stops the scanning process, resets the scan state to INITIAL, ignores the input string
955
 * entirely, and return SCAN_ERROR. If the input string has more than one statements, all statements
956
 * are ignored if one of them failes to compile.
957
 */
958
0
#define yyerror(msg) \
959
0
do { \
960
0
  BEGIN(INITIAL); \
961
0
  return ScanError(msg); \
962
0
} while (false)
963
964
/* Each call to yylex must set yylloc to the location of the found token. When we parse a token
965
 * that requires multiple lexer rules to process, this should be done in the first such rule, else
966
 * yylloc will point into the middle of the token.
967
 */
968
4.47M
#define SET_YYLLOC() (token_loc_ = cursor_)
969
970
/* Advance yylloc by the given number of bytes. */
971
0
#define ADVANCE_YYLLOC(delta) AdvanceCursor(delta)
972
#line 972 "/Users/deen/code/yugabyte-db/build/debugcov-clang-dynamic-arm64-ninja/src/yb/yql/cql/ql/parser/scanner_lex.l.cc"
973
/*------------------------------------------------------------------------------------------------*/
974
/* Flex options. */
975
#define YY_NO_INPUT 1
976
/*------------------------------------------------------------------------------------------------*/
977
/* LEX definitions */
978
/*
979
 * OK, here is a short description of lex/flex rules behavior.
980
 * The longest pattern which matches an input string is always chosen.
981
 * For equal-length patterns, the first occurring in the rules list is chosen.
982
 * INITIAL is the starting state, to which all non-conditional rules apply.
983
 * Exclusive states change parsing rules while the state is active.  When in
984
 * an exclusive state, only those rules defined for that state apply.
985
 *
986
 * We use exclusive states for quoted strings, extended comments,
987
 * and to eliminate parsing troubles for numeric strings.
988
 * Exclusive states:
989
 *  <xb> bit string literal
990
 *  <xc> extended C-style comments
991
 *  <xd> delimited identifiers (double-quoted identifiers)
992
 *  <xh> hexadecimal numeric string
993
 *  <xq> standard quoted strings
994
 *  <xe> extended quoted strings (support backslash escape sequences)
995
 *  <xdolq> $foo$ quoted strings
996
 *  <xui> quoted identifier with Unicode escapes
997
 *  <xuiend> end of a quoted identifier with Unicode escapes, UESCAPE can follow
998
 *  <xus> quoted string with Unicode escapes
999
 *  <xusend> end of a quoted string with Unicode escapes, UESCAPE can follow
1000
 *  <xeu> Unicode surrogate pair in extended quoted string
1001
 *
1002
 * Remember to add an <<EOF>> case whenever you add a new exclusive state!
1003
 * The default one is probably not the right thing.
1004
 */
1005
1006
/*
1007
 * In order to make the world safe for Windows and Mac clients as well as
1008
 * Unix ones, we accept either \n or \r as a newline.  A DOS-style \r\n
1009
 * sequence will be seen as two successive newlines, but that doesn't cause
1010
 * any problems.  Comments that start with -- and extend to the next
1011
 * newline are treated as equivalent to a single whitespace character.
1012
 *
1013
 * NOTE a fine point: if there is no newline following --, we will absorb
1014
 * everything to the end of the input as a comment.  This is correct.  Older
1015
 * versions of Postgres failed to recognize -- as a comment if the input
1016
 * did not end with a newline.
1017
 *
1018
 * XXX perhaps \f (formfeed) should be treated as a newline as well?
1019
 *
1020
 * XXX if you change the set of whitespace characters, fix scanner_isspace()
1021
 * to agree, and see also the plpgsql lexer.
1022
 */
1023
/*
1024
 * SQL requires at least one newline in the whitespace separating
1025
 * string literals that are to be concatenated.  Silly, but who are we
1026
 * to argue?  Note that {whitespace_with_newline} should not have * after
1027
 * it, whereas {whitespace} should generally have a * after it...
1028
 */
1029
/*
1030
 * To ensure that {quotecontinue} can be scanned without having to back up
1031
 * if the full pattern isn't matched, we include trailing whitespace in
1032
 * {quotestop}.  This matches all cases where {quotecontinue} fails to match,
1033
 * except for {quote} followed by whitespace and just one "-" (not two,
1034
 * which would start a {comment}).  To cover that we have {quotefail}.
1035
 * The actions for {quotestop} and {quotefail} must throw back characters
1036
 * beyond the quote (') proper.
1037
 */
1038
/* Bit string
1039
 * It is tempting to scan the string for only those characters
1040
 * which are allowed. However, this leads to silently swallowed
1041
 * characters if illegal characters are included in the string.
1042
 * For example, if xbinside is [01] then B'ABCD' is interpreted
1043
 * as a zero-length string, and the ABCD' is lost!
1044
 * Better to pass the string forward and let the input routines
1045
 * validate the contents.
1046
 */
1047
/* Hexadecimal number */
1048
/* National character */
1049
/* Quoted string that allows backslash escapes */
1050
/* Extended quote
1051
 * xqdouble implements embedded quote, ''''
1052
 */
1053
/* $foo$ style quotes ("dollar quoting")
1054
 * The quoted string starts with $foo$ where "foo" is an optional string
1055
 * in the form of an identifier, except that it may not contain "$",
1056
 * and extends to the first occurrence of an identical string.
1057
 * There is *no* processing of the quoted text.
1058
 *
1059
 * {dolqfailed} is an error rule to avoid scanner backup when {dolqdelim}
1060
 * fails to match its trailing "$".
1061
 */
1062
/* Double quote
1063
 * Allows embedded spaces and other special characters into identifiers.
1064
 */
1065
/* Unicode escapes */
1066
/* error rule to avoid backup */
1067
/* Quoted identifier with Unicode escapes */
1068
/* Quoted string with Unicode escapes */
1069
/* Optional UESCAPE after a quoted string or identifier with Unicode escapes. */
1070
/* error rule to avoid backup */
1071
/* C-style comments
1072
 *
1073
 * The "extended comment" syntax closely resembles allowable operator syntax.
1074
 * The tricky part here is to get lex to recognize a string starting with
1075
 * slash-star as a comment, when interpreting it as an operator would produce
1076
 * a longer match --- remember lex will prefer a longer match!  Also, if we
1077
 * have something like plus-slash-star, lex will think this is a 3-character
1078
 * operator whereas we want to see it as a + operator and a comment start.
1079
 * The solution is two-fold:
1080
 * 1. append {op_chars}* to xcstart so that it matches as much text as
1081
 *    {operator} would. Then the tie-breaker (first matching rule of same
1082
 *    length) ensures xcstart wins.  We put back the extra stuff with yyless()
1083
 *    in case it contains a star-slash that should terminate the comment.
1084
 * 2. In the operator rule, check for slash-star within the operator, and
1085
 *    if found throw it back with yyless().  This handles the plus-slash-star
1086
 *    problem.
1087
 * Dash-dash comments have similar interactions with the operator rule.
1088
 *
1089
 * Add " to negate quote.
1090
 */
1091
/* Assorted special-case operators and operator-like tokens */
1092
/*
1093
 * "self" is the set of chars that should be returned as single-character
1094
 * tokens.  "op_chars" is the set of chars that can make up "Op" tokens,
1095
 * which can be one or more characters long (but if a single-char token
1096
 * appears in the "self" set, it is not to be returned as an Op).  Note
1097
 * that the sets overlap, but each has some chars that are not in the other.
1098
 *
1099
 * If you change either set, adjust the character lists appearing in the
1100
 * rule for "operator"!
1101
 */
1102
/* we no longer allow unary minus in numbers.
1103
 * instead we pass it separately to parser. there it gets
1104
 * coerced via doNegate() -- Leon aug 20 1999
1105
 *
1106
 * {decimalfail} is used because we would like "1..10" to lex as 1, dot_dot, 10.
1107
 *
1108
 * {realfail1} and {realfail2} are added to prevent the need for scanner
1109
 * backup when the {real} rule fails to match completely.
1110
 */
1111
/*
1112
 * Dollar quoted strings are totally opaque, and no escaping is done on them.
1113
 * Other quoted strings must allow some special characters such as single-quote
1114
 *  and newline.
1115
 * Embedded single-quotes are implemented both in the SQL standard
1116
 *  style of two adjacent single quotes "''" and in the Postgres/Java style
1117
 *  of escaped-quote "\'".
1118
 * Other embedded escaped characters are matched explicitly and the leading
1119
 *  backslash is dropped from the string.
1120
 * Note that xcstart must appear before operator, as explained above!
1121
 *  Also whitespace (comment) must appear before operator.
1122
 */
1123
/*------------------------------------------------------------------------------------------------*/
1124
/* FLEX rules. */
1125
#line 1125 "/Users/deen/code/yugabyte-db/build/debugcov-clang-dynamic-arm64-ninja/src/yb/yql/cql/ql/parser/scanner_lex.l.cc"
1126
1127
216k
#define INITIAL 0
1128
0
#define xb 1
1129
0
#define xc 2
1130
26.7k
#define xd 3
1131
0
#define xh 4
1132
893
#define xe 5
1133
188k
#define xq 6
1134
0
#define xdolq 7
1135
0
#define xui 8
1136
0
#define xuiend 9
1137
0
#define xus 10
1138
0
#define xusend 11
1139
0
#define xeu 12
1140
1141
#ifndef YY_NO_UNISTD_H
1142
/* Special case for "unistd.h", since it is non-ANSI. We include it way
1143
 * down here because we want the user's section 1 to have been scanned first.
1144
 * The user has a chance to override it with an option.
1145
 */
1146
#include <unistd.h>
1147
#endif
1148
1149
#ifndef YY_EXTRA_TYPE
1150
#define YY_EXTRA_TYPE void *
1151
#endif
1152
1153
#ifndef yytext_ptr
1154
static void yy_flex_strncpy ( char *, const char *, int );
1155
#endif
1156
1157
#ifdef YY_NEED_STRLEN
1158
static int yy_flex_strlen ( const char * );
1159
#endif
1160
1161
#ifndef YY_NO_INPUT
1162
1163
#endif
1164
1165
/* Amount of stuff to slurp up with each read. */
1166
#ifndef YY_READ_BUF_SIZE
1167
#ifdef __ia64__
1168
/* On IA-64, the buffer size is 16k, not 8k */
1169
#define YY_READ_BUF_SIZE 16384
1170
#else
1171
1.36M
#define YY_READ_BUF_SIZE 8192
1172
#endif /* __ia64__ */
1173
#endif
1174
1175
/* Copy whatever the last rule matched to the standard output. */
1176
#ifndef ECHO
1177
#define ECHO LexerOutput( yytext, yyleng )
1178
#endif
1179
1180
/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
1181
 * is returned in "result".
1182
 */
1183
#ifndef YY_INPUT
1184
#define YY_INPUT(buf,result,max_size) \
1185
\
1186
682k
  if ( (int)(result = LexerInput( (char *) buf, max_size )) < 0 ) \
1187
682k
    
YY_FATAL_ERROR0
( "input in flex scanner failed" );
1188
1189
#endif
1190
1191
/* No semi-colon after return; correct usage is to write "yyterminate();" -
1192
 * we don't want an extra ';' after the "return" because that will cause
1193
 * some compilers to complain about unreachable statements.
1194
 */
1195
#ifndef yyterminate
1196
#define yyterminate() return YY_NULL
1197
#endif
1198
1199
/* Number of entries by which start-condition stack grows. */
1200
#ifndef YY_START_STACK_INCR
1201
0
#define YY_START_STACK_INCR 25
1202
#endif
1203
1204
/* Report a fatal error. */
1205
#ifndef YY_FATAL_ERROR
1206
0
#define YY_FATAL_ERROR(msg) LexerError( msg )
1207
#endif
1208
1209
/* end tables serialization structures and prototypes */
1210
1211
/* Default declaration of generated scanner - a define so the user can
1212
 * easily add parameters.
1213
 */
1214
#ifndef YY_DECL
1215
#define YY_DECL_IS_OURS 1
1216
#define YY_DECL int yyFlexLexer::yylex()
1217
#endif /* !YY_DECL */
1218
1219
/* Code executed at the beginning of each rule, after yytext and yyleng
1220
 * have been set up.
1221
 */
1222
#ifndef YY_USER_ACTION
1223
#define YY_USER_ACTION
1224
#endif
1225
1226
/* Code executed at the end of each rule. */
1227
#ifndef YY_BREAK
1228
2.49M
#define YY_BREAK /*LINTED*/break;
1229
#endif
1230
1231
#define YY_RULE_SETUP \
1232
6.62M
  YY_USER_ACTION
1233
1234
/** The main scanner function which does all the work.
1235
 */
1236
YY_DECL
1237
4.45M
{
1238
4.45M
  yy_state_type yy_current_state;
1239
4.45M
  char *yy_cp, *yy_bp;
1240
4.45M
  int yy_act;
1241
    
1242
4.45M
  if ( !(yy_init) )
1243
18.0k
    {
1244
18.0k
    (yy_init) = 1;
1245
1246
#ifdef YY_USER_INIT
1247
    YY_USER_INIT;
1248
#endif
1249
1250
18.0k
    if ( ! (yy_start) )
1251
18.0k
      (yy_start) = 1; /* first start state */
1252
1253
18.0k
    if ( ! yyin )
1254
17.9k
      yyin.rdbuf(std::cin.rdbuf());
1255
1256
18.0k
    if ( ! yyout )
1257
0
      yyout.rdbuf(std::cout.rdbuf());
1258
1259
18.0k
    if ( ! YY_CURRENT_BUFFER ) {
1260
0
      yyensure_buffer_stack ();
1261
0
      YY_CURRENT_BUFFER_LVALUE =
1262
0
        yy_create_buffer( yyin, YY_BUF_SIZE );
1263
0
    }
1264
1265
18.0k
    yy_load_buffer_state(  );
1266
18.0k
    }
1267
1268
4.45M
  {
1269
4.45M
#line 361 "scanner_lex.l"
1270
1271
1272
1273
4.45M
#line 365 "scanner_lex.l"
1274
  /* FLEX initial code: The following code block is executed every time yylex is called.
1275
   * Reset the current scanning locations each time yylex is called to match new pattern.
1276
   */
1277
4.45M
  cursor_.step();
1278
1279
1280
4.45M
#line 1280 "/Users/deen/code/yugabyte-db/build/debugcov-clang-dynamic-arm64-ninja/src/yb/yql/cql/ql/parser/scanner_lex.l.cc"
1281
1282
6.94M
  while ( /*CONSTCOND*/1 )    /* loops until end-of-file is reached */
1283
6.93M
    {
1284
6.93M
    yy_cp = (yy_c_buf_p);
1285
1286
    /* Support of yytext. */
1287
6.93M
    *yy_cp = (yy_hold_char);
1288
1289
    /* yy_bp points to the position in yy_ch_buf of the start of
1290
     * the current run.
1291
     */
1292
6.93M
    yy_bp = yy_cp;
1293
1294
6.93M
    yy_current_state = (yy_start);
1295
7.27M
yy_match:
1296
7.27M
    do
1297
29.3M
      {
1298
29.3M
      YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1299
29.3M
      if ( yy_accept[yy_current_state] )
1300
22.0M
        {
1301
22.0M
        (yy_last_accepting_state) = yy_current_state;
1302
22.0M
        (yy_last_accepting_cpos) = yy_cp;
1303
22.0M
        }
1304
60.4M
      while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1305
31.0M
        {
1306
31.0M
        yy_current_state = (int) yy_def[yy_current_state];
1307
31.0M
        if ( yy_current_state >= 364 )
1308
2.64M
          yy_c = yy_meta[yy_c];
1309
31.0M
        }
1310
29.3M
      yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1311
29.3M
      ++yy_cp;
1312
29.3M
      }
1313
29.3M
    while ( yy_current_state != 363 );
1314
7.27M
    yy_cp = (yy_last_accepting_cpos);
1315
7.27M
    yy_current_state = (yy_last_accepting_state);
1316
1317
7.63M
yy_find_action:
1318
7.63M
    yy_act = yy_accept[yy_current_state];
1319
1320
7.63M
    YY_DO_BEFORE_ACTION;
1321
1322
7.97M
do_action:  /* This label is used only to access EOF actions. */
1323
1324
7.97M
    switch ( yy_act )
1325
7.97M
  { /* beginning of action switch */
1326
0
      case 0: /* must back up */
1327
      /* undo the effects of YY_DO_BEFORE_ACTION */
1328
0
      *yy_cp = (yy_hold_char);
1329
0
      yy_cp = (yy_last_accepting_cpos);
1330
0
      yy_current_state = (yy_last_accepting_state);
1331
0
      goto yy_find_action;
1332
1333
9
case 1:
1334
/* rule 1 can match eol */
1335
9
YY_RULE_SETUP
1336
9
#line 371 "scanner_lex.l"
1337
9
{
1338
9
  cursor_.lines();
1339
9
}
1340
9
  YY_BREAK
1341
2.06M
case 2:
1342
/* rule 2 can match eol */
1343
2.06M
YY_RULE_SETUP
1344
2.06M
#line 375 "scanner_lex.l"
1345
2.06M
{
1346
  /* Increase line number and ignore this token. */
1347
2.06M
  CountNewlineInToken(yytext);
1348
2.06M
}
1349
2.06M
  YY_BREAK
1350
0
case 3:
1351
0
YY_RULE_SETUP
1352
0
#line 380 "scanner_lex.l"
1353
0
{
1354
  /* Save the location where token starts. */
1355
0
  SET_YYLLOC();
1356
0
  xcdepth_ = 0;
1357
0
  BEGIN(xc);
1358
  /* Put back any characters past slash-star; see above. */
1359
0
  yyless(2);
1360
0
}
1361
0
  YY_BREAK
1362
0
case 4:
1363
0
YY_RULE_SETUP
1364
0
#line 389 "scanner_lex.l"
1365
0
{
1366
0
  xcdepth_++;
1367
  /* Put back any characters past slash-star; see above. */
1368
0
  yyless(2);
1369
0
}
1370
0
  YY_BREAK
1371
0
case 5:
1372
0
YY_RULE_SETUP
1373
0
#line 395 "scanner_lex.l"
1374
0
{
1375
0
  if (xcdepth_ <= 0) {
1376
0
    BEGIN(INITIAL);
1377
0
  } else {
1378
0
    xcdepth_--;
1379
0
  }
1380
0
}
1381
0
  YY_BREAK
1382
0
case 6:
1383
/* rule 6 can match eol */
1384
0
YY_RULE_SETUP
1385
0
#line 403 "scanner_lex.l"
1386
0
{
1387
  /* Ignore. */
1388
0
}
1389
0
  YY_BREAK
1390
0
case 7:
1391
0
YY_RULE_SETUP
1392
0
#line 407 "scanner_lex.l"
1393
0
{
1394
  /* Ignore. */
1395
0
}
1396
0
  YY_BREAK
1397
0
case 8:
1398
0
YY_RULE_SETUP
1399
0
#line 411 "scanner_lex.l"
1400
0
{
1401
  /* Ignore. */
1402
0
}
1403
0
  YY_BREAK
1404
0
case YY_STATE_EOF(xc):
1405
0
#line 415 "scanner_lex.l"
1406
0
{
1407
0
  yyerror("unterminated /* comment");
1408
0
}
1409
0
  YY_BREAK
1410
0
case 9:
1411
0
YY_RULE_SETUP
1412
0
#line 419 "scanner_lex.l"
1413
0
{
1414
  /* Binary bit type.
1415
   * At some point we should simply pass the string
1416
   * forward to the parser and label it there.
1417
   * In the meantime, place a leading "b" on the string
1418
   * to mark it for the input routine as a binary string.
1419
   */
1420
0
  SET_YYLLOC();
1421
0
  BEGIN(xb);
1422
0
  startlit();
1423
0
  addlitchar('b');
1424
0
}
1425
0
  YY_BREAK
1426
0
case 10:
1427
/* rule 10 can match eol */
1428
0
#line 433 "scanner_lex.l"
1429
0
case 11:
1430
/* rule 11 can match eol */
1431
0
YY_RULE_SETUP
1432
0
#line 433 "scanner_lex.l"
1433
0
{
1434
0
  yyless(1);
1435
0
  BEGIN(INITIAL);
1436
0
  return GramProcessor::make_BCONST(ScanLiteral(), cursor_);
1437
0
}
1438
0
  YY_BREAK
1439
0
case 12:
1440
/* rule 12 can match eol */
1441
0
#line 440 "scanner_lex.l"
1442
0
case 13:
1443
/* rule 13 can match eol */
1444
0
YY_RULE_SETUP
1445
0
#line 440 "scanner_lex.l"
1446
0
{
1447
0
  addlit(yytext, yyleng);
1448
0
}
1449
0
  YY_BREAK
1450
0
case 14:
1451
/* rule 14 can match eol */
1452
0
#line 445 "scanner_lex.l"
1453
0
case 15:
1454
/* rule 15 can match eol */
1455
0
YY_RULE_SETUP
1456
0
#line 445 "scanner_lex.l"
1457
0
{
1458
  /* Increase line number and ignore this token. */
1459
0
  CountNewlineInToken(yytext);
1460
0
}
1461
0
  YY_BREAK
1462
0
case YY_STATE_EOF(xb):
1463
0
#line 450 "scanner_lex.l"
1464
0
{
1465
0
  yyerror("unterminated bit string literal");
1466
0
}
1467
0
  YY_BREAK
1468
0
case 16:
1469
0
YY_RULE_SETUP
1470
0
#line 454 "scanner_lex.l"
1471
0
{
1472
  /* Hexadecimal bit type.
1473
   * At some point we should simply pass the string
1474
   * forward to the parser and label it there.
1475
   * In the meantime, place a leading "x" on the string
1476
   * to mark it for the input routine as a hex string.
1477
   */
1478
0
  SET_YYLLOC();
1479
0
  BEGIN(xh);
1480
0
  startlit();
1481
0
  addlitchar('x');
1482
0
}
1483
0
  YY_BREAK
1484
0
case 17:
1485
/* rule 17 can match eol */
1486
0
#line 468 "scanner_lex.l"
1487
0
case 18:
1488
/* rule 18 can match eol */
1489
0
YY_RULE_SETUP
1490
0
#line 468 "scanner_lex.l"
1491
0
{
1492
0
  yyless(1);
1493
0
  BEGIN(INITIAL);
1494
0
  return GramProcessor::make_XCONST(ScanLiteral(), cursor_);
1495
0
}
1496
0
  YY_BREAK
1497
0
case YY_STATE_EOF(xh):
1498
0
#line 474 "scanner_lex.l"
1499
0
{
1500
0
  yyerror("unterminated hexadecimal string literal");
1501
0
}
1502
0
  YY_BREAK
1503
0
case 19:
1504
0
YY_RULE_SETUP
1505
0
#line 478 "scanner_lex.l"
1506
0
{
1507
  /* National character.
1508
   * We will pass this along as a normal character string,
1509
   * but preceded with an internally-generated "NCHAR".
1510
   */
1511
0
  SET_YYLLOC();
1512
0
  yyless(1);        /* eat only 'n' this time */
1513
1514
0
  const ScanKeyword &keyword = ScanKeywordLookup("nchar");
1515
0
  if (keyword.is_valid()) {
1516
0
    return GramProcessor::make_NCHAR(keyword.name(), cursor_);
1517
0
  } else {
1518
    /* If NCHAR isn't a keyword, just return "n" */
1519
0
    return GramProcessor::make_IDENT(MakeString("n"), cursor_);
1520
0
  }
1521
0
}
1522
0
  YY_BREAK
1523
189k
case 20:
1524
189k
YY_RULE_SETUP
1525
189k
#line 495 "scanner_lex.l"
1526
189k
{
1527
189k
  warn_on_first_escape_ = true;
1528
189k
  saw_non_ascii_ = false;
1529
189k
  SET_YYLLOC();
1530
189k
  if (standard_conforming_strings_)
1531
188k
    BEGIN(xq);
1532
893
  else
1533
893
    BEGIN(xe);
1534
189k
  startlit();
1535
189k
}
1536
189k
  YY_BREAK
1537
0
case 21:
1538
0
YY_RULE_SETUP
1539
0
#line 506 "scanner_lex.l"
1540
0
{
1541
0
  warn_on_first_escape_ = false;
1542
0
  saw_non_ascii_ = false;
1543
0
  SET_YYLLOC();
1544
0
  BEGIN(xe);
1545
0
  startlit();
1546
0
}
1547
0
  YY_BREAK
1548
0
case 22:
1549
0
YY_RULE_SETUP
1550
0
#line 514 "scanner_lex.l"
1551
0
{
1552
0
  SET_YYLLOC();
1553
0
  if (!standard_conforming_strings_) {
1554
0
    ScanError("Unsafe use of string constant with Unicode escapes. String constants "
1555
0
              "with Unicode escapes cannot be used when standard_conforming_strings_ "
1556
0
              "is off",
1557
0
              ErrorCode::FEATURE_NOT_SUPPORTED);
1558
0
  }
1559
0
  BEGIN(xus);
1560
0
  startlit();
1561
0
}
1562
0
  YY_BREAK
1563
189k
case 23:
1564
/* rule 23 can match eol */
1565
189k
#line 527 "scanner_lex.l"
1566
189k
case 24:
1567
/* rule 24 can match eol */
1568
189k
YY_RULE_SETUP
1569
189k
#line 527 "scanner_lex.l"
1570
189k
{
1571
189k
  yyless(1);
1572
189k
  BEGIN(INITIAL);
1573
1574
  /* Check that data remains valid if it might have been made invalid by unescaping any chars. */
1575
189k
  if (saw_non_ascii_)
1576
0
    pg_verify_mbstr_len(literalbuf_, literallen_, false);
1577
189k
  return GramProcessor::make_SCONST(ScanLiteral(), cursor_);
1578
189k
}
1579
0
  YY_BREAK
1580
0
case 25:
1581
/* rule 25 can match eol */
1582
0
#line 538 "scanner_lex.l"
1583
0
case 26:
1584
/* rule 26 can match eol */
1585
0
YY_RULE_SETUP
1586
0
#line 538 "scanner_lex.l"
1587
0
{
1588
  /* throw back all but the quote */
1589
0
  yyless(1);
1590
  /* xusend state looks for possible UESCAPE */
1591
0
  BEGIN(xusend);
1592
0
}
1593
0
  YY_BREAK
1594
0
case 27:
1595
/* rule 27 can match eol */
1596
0
YY_RULE_SETUP
1597
0
#line 545 "scanner_lex.l"
1598
0
{
1599
  /* Stay in xusend state over whitespace.
1600
   * Increase line number and ignore this token.
1601
   */
1602
0
  CountNewlineInToken(yytext);
1603
0
}
1604
0
  YY_BREAK
1605
0
case 28:
1606
0
#line 553 "scanner_lex.l"
1607
0
case 29:
1608
/* rule 29 can match eol */
1609
0
#line 554 "scanner_lex.l"
1610
0
YY_RULE_SETUP
1611
0
case YY_STATE_EOF(xusend):
1612
0
#line 554 "scanner_lex.l"
1613
0
{
1614
  /* Increase line number. */
1615
0
  CountNewlineInToken(yytext);
1616
1617
  /* no UESCAPE after the quote, throw back everything */
1618
0
  yyless(0);
1619
0
  BEGIN(INITIAL);
1620
0
  char *str = litbuf_udeescape('\\');
1621
0
  return GramProcessor::make_SCONST(MakeString(str), cursor_);
1622
0
}
1623
0
  YY_BREAK
1624
0
case 30:
1625
/* rule 30 can match eol */
1626
0
YY_RULE_SETUP
1627
0
#line 565 "scanner_lex.l"
1628
0
{
1629
  /* Increase line number. */
1630
0
  CountNewlineInToken(yytext);
1631
1632
  /* found UESCAPE after the end quote */
1633
0
  BEGIN(INITIAL);
1634
0
  if (!check_uescapechar(yytext[yyleng-2])) {
1635
0
    SET_YYLLOC();
1636
0
    ADVANCE_YYLLOC(yyleng-2);
1637
0
    yyerror("invalid Unicode escape character");
1638
0
  }
1639
0
  char *str = litbuf_udeescape(yytext[yyleng-2]);
1640
0
  return GramProcessor::make_SCONST(MakeString(str), cursor_);
1641
0
}
1642
0
  YY_BREAK
1643
0
case 31:
1644
0
YY_RULE_SETUP
1645
0
#line 580 "scanner_lex.l"
1646
0
{
1647
0
  addlitchar('\'');
1648
0
}
1649
0
  YY_BREAK
1650
189k
case 32:
1651
/* rule 32 can match eol */
1652
189k
YY_RULE_SETUP
1653
189k
#line 584 "scanner_lex.l"
1654
189k
{
1655
189k
  addlit(yytext, yyleng);
1656
189k
}
1657
189k
  YY_BREAK
1658
0
case 33:
1659
/* rule 33 can match eol */
1660
0
YY_RULE_SETUP
1661
0
#line 588 "scanner_lex.l"
1662
0
{
1663
0
  addlit(yytext, yyleng);
1664
0
}
1665
0
  YY_BREAK
1666
0
case 34:
1667
0
YY_RULE_SETUP
1668
0
#line 592 "scanner_lex.l"
1669
0
{
1670
0
  pg_wchar c = narrow_cast<pg_wchar>(strtoul(yytext+2, NULL, 16));
1671
1672
0
  check_escape_warning();
1673
1674
0
  if (is_utf16_surrogate_first(c)) {
1675
0
    utf16_first_part_ = c;
1676
0
    BEGIN(xeu);
1677
0
  } else if (is_utf16_surrogate_second(c)) {
1678
0
    yyerror("invalid Unicode surrogate pair");
1679
0
  } else {
1680
0
    addunicode(c);
1681
0
  }
1682
0
}
1683
0
  YY_BREAK
1684
0
case 35:
1685
0
YY_RULE_SETUP
1686
0
#line 607 "scanner_lex.l"
1687
0
{
1688
0
  pg_wchar c = narrow_cast<pg_wchar>(strtoul(yytext+2, NULL, 16));
1689
1690
0
  if (!is_utf16_surrogate_second(c)) {
1691
0
    yyerror("invalid Unicode surrogate pair");
1692
0
  }
1693
1694
0
  c = surrogate_pair_to_codepoint(utf16_first_part_, c);
1695
0
  addunicode(c);
1696
0
  BEGIN(xe);
1697
0
}
1698
0
  YY_BREAK
1699
0
case 36:
1700
0
YY_RULE_SETUP
1701
0
#line 619 "scanner_lex.l"
1702
0
{ yyerror("invalid Unicode surrogate pair"); }
1703
0
  YY_BREAK
1704
0
case 37:
1705
/* rule 37 can match eol */
1706
0
YY_RULE_SETUP
1707
0
#line 620 "scanner_lex.l"
1708
0
{ yyerror("invalid Unicode surrogate pair"); }
1709
0
  YY_BREAK
1710
0
case YY_STATE_EOF(xeu):
1711
0
#line 621 "scanner_lex.l"
1712
0
{ yyerror("invalid Unicode surrogate pair"); }
1713
0
  YY_BREAK
1714
0
case 38:
1715
0
YY_RULE_SETUP
1716
0
#line 623 "scanner_lex.l"
1717
0
{
1718
0
  ScanError("Invalid Unicode escape. Unicode escapes must be \\uXXXX or \\UXXXXXXXX",
1719
0
             ErrorCode::INVALID_ESCAPE_SEQUENCE);
1720
0
}
1721
0
  YY_BREAK
1722
0
case 39:
1723
/* rule 39 can match eol */
1724
0
YY_RULE_SETUP
1725
0
#line 628 "scanner_lex.l"
1726
0
{
1727
0
  if (yytext[1] == '\'') {
1728
0
    if (backslash_quote_ == BackslashQuoteType::OFF ||
1729
0
        (backslash_quote_ == BackslashQuoteType::SAFE_ENCODING)) {
1730
0
      ScanError("Unsafe use of \\' in a string literal. Use '' to write quotes in "
1731
0
                 "strings. \\' is insecure in client-only encodings",
1732
0
                 ErrorCode::NONSTANDARD_USE_OF_ESCAPE_CHARACTER);
1733
0
    }
1734
0
  }
1735
0
  check_string_escape_warning(yytext[1]);
1736
0
  addlitchar(unescape_single_char(yytext[1]));
1737
0
}
1738
0
  YY_BREAK
1739
0
case 40:
1740
0
YY_RULE_SETUP
1741
0
#line 641 "scanner_lex.l"
1742
0
{
1743
0
  unsigned char c = strtoul(yytext+1, NULL, 8);
1744
1745
0
  check_escape_warning();
1746
0
  addlitchar(c);
1747
0
  if (c == '\0' || is_utf_highbit_set(c)) {
1748
0
    saw_non_ascii_ = true;
1749
0
  }
1750
0
}
1751
0
  YY_BREAK
1752
0
case 41:
1753
0
YY_RULE_SETUP
1754
0
#line 651 "scanner_lex.l"
1755
0
{
1756
0
  unsigned char c = strtoul(yytext+2, NULL, 16);
1757
1758
0
  check_escape_warning();
1759
0
  addlitchar(c);
1760
0
  if (c == '\0' || is_utf_highbit_set(c)) {
1761
0
    saw_non_ascii_ = true;
1762
0
  }
1763
0
}
1764
0
  YY_BREAK
1765
0
case 42:
1766
/* rule 42 can match eol */
1767
0
YY_RULE_SETUP
1768
0
#line 660 "scanner_lex.l"
1769
0
{
1770
  /* Increase line number and ignore this token. */
1771
0
  CountNewlineInToken(yytext);
1772
0
}
1773
0
  YY_BREAK
1774
0
case 43:
1775
0
YY_RULE_SETUP
1776
0
#line 665 "scanner_lex.l"
1777
0
{
1778
  /* This is only needed for \ just before EOF */
1779
0
  addlitchar(yytext[0]);
1780
0
}
1781
0
  YY_BREAK
1782
0
case YY_STATE_EOF(xq):
1783
0
case YY_STATE_EOF(xe):
1784
0
case YY_STATE_EOF(xus):
1785
0
#line 670 "scanner_lex.l"
1786
0
{ yyerror("unterminated quoted string"); }
1787
0
  YY_BREAK
1788
0
case 44:
1789
0
YY_RULE_SETUP
1790
0
#line 672 "scanner_lex.l"
1791
0
{
1792
0
  SET_YYLLOC();
1793
0
  dolqstart_ = MCStrdup(PTempMem(), yytext);
1794
0
  BEGIN(xdolq);
1795
0
  startlit();
1796
0
}
1797
0
  YY_BREAK
1798
0
case 45:
1799
0
YY_RULE_SETUP
1800
0
#line 679 "scanner_lex.l"
1801
0
{
1802
0
  SET_YYLLOC();
1803
  /* throw back all but the initial "$" */
1804
0
  yyless(1);
1805
  /* and treat it as {other} */
1806
0
  return make_symbol(yytext[0], cursor_);
1807
0
}
1808
0
  YY_BREAK
1809
0
case 46:
1810
0
YY_RULE_SETUP
1811
0
#line 687 "scanner_lex.l"
1812
0
{
1813
0
  if (strcmp(yytext, dolqstart_) == 0) {
1814
0
    dolqstart_ = NULL;
1815
0
    BEGIN(INITIAL);
1816
0
    return GramProcessor::make_SCONST(ScanLiteral(), cursor_);
1817
0
  } else {
1818
    /* When we fail to match $...$ to dolqstart_, transfer
1819
     * the $... part to the output, but put back the final
1820
     * $ for rescanning.  Consider $delim$...$junk$delim$
1821
     */
1822
0
    addlit(yytext, yyleng-1);
1823
0
    yyless(yyleng-1);
1824
0
  }
1825
0
}
1826
0
  YY_BREAK
1827
0
case 47:
1828
/* rule 47 can match eol */
1829
0
YY_RULE_SETUP
1830
0
#line 702 "scanner_lex.l"
1831
0
{
1832
0
  addlit(yytext, yyleng);
1833
0
}
1834
0
  YY_BREAK
1835
0
case 48:
1836
0
YY_RULE_SETUP
1837
0
#line 706 "scanner_lex.l"
1838
0
{
1839
0
  addlit(yytext, yyleng);
1840
0
}
1841
0
  YY_BREAK
1842
0
case 49:
1843
0
YY_RULE_SETUP
1844
0
#line 710 "scanner_lex.l"
1845
0
{
1846
  /* This is only needed for $ inside the quoted text */
1847
0
  addlitchar(yytext[0]);
1848
0
}
1849
0
  YY_BREAK
1850
0
case YY_STATE_EOF(xdolq):
1851
0
#line 715 "scanner_lex.l"
1852
0
{ yyerror("unterminated dollar-quoted string"); }
1853
0
  YY_BREAK
1854
26.7k
case 50:
1855
26.7k
YY_RULE_SETUP
1856
26.7k
#line 717 "scanner_lex.l"
1857
26.7k
{
1858
26.7k
  SET_YYLLOC();
1859
26.7k
  BEGIN(xd);
1860
26.7k
  startlit();
1861
26.7k
}
1862
26.7k
  YY_BREAK
1863
0
case 51:
1864
0
YY_RULE_SETUP
1865
0
#line 723 "scanner_lex.l"
1866
0
{
1867
0
  SET_YYLLOC();
1868
0
  BEGIN(xui);
1869
0
  startlit();
1870
0
}
1871
0
  YY_BREAK
1872
26.7k
case 52:
1873
26.7k
YY_RULE_SETUP
1874
26.7k
#line 729 "scanner_lex.l"
1875
26.7k
{
1876
26.7k
  BEGIN(INITIAL);
1877
26.7k
  if (literallen_ == 0) {
1878
0
    yyerror("zero-length delimited identifier");
1879
0
  }
1880
26.7k
  const MCSharedPtr<MCString> ident = ScanLiteral();
1881
26.7k
  if (literallen_ >= NAMEDATALEN) {
1882
0
    TruncateIdentifier(ident, true);
1883
0
  }
1884
26.7k
  return GramProcessor::make_IDENT(ident, cursor_);
1885
26.7k
}
1886
0
  YY_BREAK
1887
0
case 53:
1888
0
YY_RULE_SETUP
1889
0
#line 741 "scanner_lex.l"
1890
0
{
1891
0
  yyless(1);
1892
  /* xuiend state looks for possible UESCAPE */
1893
0
  BEGIN(xuiend);
1894
0
}
1895
0
  YY_BREAK
1896
0
case 54:
1897
/* rule 54 can match eol */
1898
0
YY_RULE_SETUP
1899
0
#line 747 "scanner_lex.l"
1900
0
{
1901
  /* stay in xuiend state over whitespace.
1902
   * Increase line number and ignore this token.
1903
   */
1904
0
  CountNewlineInToken(yytext);
1905
0
}
1906
0
  YY_BREAK
1907
0
case 55:
1908
0
#line 755 "scanner_lex.l"
1909
0
case 56:
1910
/* rule 56 can match eol */
1911
0
#line 756 "scanner_lex.l"
1912
0
YY_RULE_SETUP
1913
0
case YY_STATE_EOF(xuiend):
1914
0
#line 756 "scanner_lex.l"
1915
0
{
1916
  /* Increase line number. */
1917
0
  CountNewlineInToken(yytext);
1918
1919
  /* no UESCAPE after the quote, throw back everything */
1920
0
  yyless(0);
1921
1922
0
  BEGIN(INITIAL);
1923
0
  if (literallen_ == 0) {
1924
0
    yyerror("zero-length delimited identifier");
1925
0
  }
1926
1927
0
  const MCSharedPtr<MCString> ident = MakeString(litbuf_udeescape('\\'));
1928
0
  TruncateIdentifier(ident, true);
1929
0
  return GramProcessor::make_IDENT(ident, cursor_);
1930
0
}
1931
0
  YY_BREAK
1932
0
case 57:
1933
/* rule 57 can match eol */
1934
0
YY_RULE_SETUP
1935
0
#line 773 "scanner_lex.l"
1936
0
{
1937
  /* Increase line number. */
1938
0
  CountNewlineInToken(yytext);
1939
1940
  /* found UESCAPE after the end quote */
1941
0
  BEGIN(INITIAL);
1942
0
  if (literallen_ == 0) {
1943
0
    yyerror("zero-length delimited identifier");
1944
0
  }
1945
0
  if (!check_uescapechar(yytext[yyleng-2])) {
1946
0
    SET_YYLLOC();
1947
0
    ADVANCE_YYLLOC(yyleng-2);
1948
0
    yyerror("invalid Unicode escape character");
1949
0
  }
1950
1951
0
  const MCSharedPtr<MCString> ident = MakeString(litbuf_udeescape(yytext[yyleng - 2]));
1952
0
  TruncateIdentifier(ident, true);
1953
0
  return GramProcessor::make_IDENT(ident, cursor_);
1954
0
}
1955
0
  YY_BREAK
1956
0
case 58:
1957
0
YY_RULE_SETUP
1958
0
#line 793 "scanner_lex.l"
1959
0
{
1960
0
  addlitchar('"');
1961
0
}
1962
0
  YY_BREAK
1963
26.7k
case 59:
1964
/* rule 59 can match eol */
1965
26.7k
YY_RULE_SETUP
1966
26.7k
#line 797 "scanner_lex.l"
1967
26.7k
{
1968
26.7k
  addlit(yytext, yyleng);
1969
26.7k
}
1970
26.7k
  YY_BREAK
1971
0
case YY_STATE_EOF(xd):
1972
0
case YY_STATE_EOF(xui):
1973
0
#line 801 "scanner_lex.l"
1974
0
{ yyerror("unterminated quoted identifier"); }
1975
0
  YY_BREAK
1976
0
case 60:
1977
0
YY_RULE_SETUP
1978
0
#line 803 "scanner_lex.l"
1979
0
{
1980
0
  SET_YYLLOC();
1981
1982
  /* Throw back all but the initial u/U. */
1983
0
  yyless(1);
1984
1985
  /* Treat it as {identifier}. Convert to lower-case and create IDENT token. */
1986
0
  const MCSharedPtr<MCString> ident = MakeIdentifier(yytext, yyleng, true);
1987
0
  return GramProcessor::make_IDENT(ident, cursor_);
1988
0
}
1989
0
  YY_BREAK
1990
0
case 61:
1991
0
YY_RULE_SETUP
1992
0
#line 814 "scanner_lex.l"
1993
0
{
1994
0
  SET_YYLLOC();
1995
0
  return GramProcessor::make_TYPECAST(cursor_);
1996
0
}
1997
0
  YY_BREAK
1998
0
case 62:
1999
0
YY_RULE_SETUP
2000
0
#line 819 "scanner_lex.l"
2001
0
{
2002
0
  SET_YYLLOC();
2003
0
  return GramProcessor::make_DOT_DOT(cursor_);
2004
0
}
2005
0
  YY_BREAK
2006
0
case 63:
2007
0
YY_RULE_SETUP
2008
0
#line 824 "scanner_lex.l"
2009
0
{
2010
0
  SET_YYLLOC();
2011
0
  return GramProcessor::make_COLON_EQUALS(cursor_);
2012
0
}
2013
0
  YY_BREAK
2014
953
case 64:
2015
953
YY_RULE_SETUP
2016
953
#line 829 "scanner_lex.l"
2017
953
{
2018
953
  SET_YYLLOC();
2019
953
  return GramProcessor::make_SINGLE_ARROW(cursor_);
2020
0
}
2021
0
  YY_BREAK
2022
781
case 65:
2023
781
YY_RULE_SETUP
2024
781
#line 834 "scanner_lex.l"
2025
781
{
2026
781
  SET_YYLLOC();
2027
781
  return GramProcessor::make_DOUBLE_ARROW(cursor_);
2028
0
}
2029
0
  YY_BREAK
2030
0
case 66:
2031
0
YY_RULE_SETUP
2032
0
#line 839 "scanner_lex.l"
2033
0
{
2034
0
  SET_YYLLOC();
2035
0
  return GramProcessor::make_EQUALS_GREATER(cursor_);
2036
0
}
2037
0
  YY_BREAK
2038
195
case 67:
2039
195
YY_RULE_SETUP
2040
195
#line 844 "scanner_lex.l"
2041
195
{
2042
195
  SET_YYLLOC();
2043
195
  return GramProcessor::make_LESS_EQUALS(cursor_);
2044
0
}
2045
0
  YY_BREAK
2046
303
case 68:
2047
303
YY_RULE_SETUP
2048
303
#line 849 "scanner_lex.l"
2049
303
{
2050
303
  SET_YYLLOC();
2051
303
  return GramProcessor::make_GREATER_EQUALS(cursor_);
2052
0
}
2053
0
  YY_BREAK
2054
9
case 69:
2055
9
YY_RULE_SETUP
2056
9
#line 854 "scanner_lex.l"
2057
9
{
2058
  /* We accept both "<>" and "!=" as meaning NOT_EQUALS */
2059
9
  SET_YYLLOC();
2060
9
  return GramProcessor::make_NOT_EQUALS(cursor_);
2061
0
}
2062
0
  YY_BREAK
2063
255
case 70:
2064
255
YY_RULE_SETUP
2065
255
#line 860 "scanner_lex.l"
2066
255
{
2067
  /* We accept both "<>" and "!=" as meaning NOT_EQUALS */
2068
255
  SET_YYLLOC();
2069
255
  return GramProcessor::make_NOT_EQUALS(cursor_);
2070
0
}
2071
0
  YY_BREAK
2072
1.51M
case 71:
2073
1.51M
YY_RULE_SETUP
2074
1.51M
#line 866 "scanner_lex.l"
2075
1.51M
{
2076
1.51M
  SET_YYLLOC();
2077
1.51M
  return make_symbol(yytext[0], cursor_);
2078
0
}
2079
0
  YY_BREAK
2080
34
case 72:
2081
34
YY_RULE_SETUP
2082
34
#line 871 "scanner_lex.l"
2083
34
{
2084
  /* Check for embedded slash-star or dash-dash; those
2085
   * are comment starts, so operator must stop there.
2086
   * Note that slash-star or dash-dash at the first
2087
   * character will match a prior rule, not this one.
2088
   */
2089
34
  int   nchars = yyleng;
2090
34
  char *slashstar = strstr(yytext, "/*");
2091
34
  char *dashdash = strstr(yytext, "--");
2092
2093
34
  if (slashstar && 
dashdash0
) {
2094
    /* if both appear, take the first one */
2095
0
    if (slashstar > dashdash)
2096
0
      slashstar = dashdash;
2097
34
  } else if (!slashstar) {
2098
34
    slashstar = dashdash;
2099
34
  }
2100
34
  if (slashstar) {
2101
0
    nchars = narrow_cast<int>(slashstar - yytext);
2102
0
  }
2103
2104
  /* For SQL compatibility, '+' and '-' cannot be the
2105
   * last char of a multi-char operator unless the operator
2106
   * contains chars that are not in SQL operators.
2107
   * The idea is to lex '=-' as two operators, but not
2108
   * to forbid operator names like '?-' that could not be
2109
   * sequences of SQL operators. Similarly for '?' to allow
2110
   * "... where c=?".
2111
   */
2112
67
  while (nchars > 1 && 
(33
yytext[nchars-1] == '+'33
||
2113
33
                        yytext[nchars-1] == '-' ||
2114
33
                        
yytext[nchars-1] == '?'32
)) {
2115
33
    int   ic;
2116
2117
    /* "!" is removed from the list below because
2118
     * "... WHERE col!=?" should be returned as two separate
2119
     * tokens ("!=" and "?").
2120
     */
2121
66
    for (ic = nchars-2; ic >= 0; 
ic--33
) {
2122
33
      if (strchr("~@#^&|`?%", yytext[ic]))
2123
0
        break;
2124
33
    }
2125
33
    if (ic >= 0)
2126
0
      break; /* found a char that makes it OK */
2127
33
    nchars--; /* else remove the +/-, and check again */
2128
33
  }
2129
2130
34
  SET_YYLLOC();
2131
2132
34
  if (nchars < yyleng) {
2133
    /* Strip the unwanted chars from the token */
2134
33
    yyless(nchars);
2135
    /* If what we have left is only one char, and it's
2136
     * one of the characters matching "self", then
2137
     * return it as a character token the same way
2138
     * that the "self" rule would have.
2139
     */
2140
33
    if (nchars == 1 && strchr(",()[].;:+-*/%^<>=", yytext[0])) {
2141
33
      return make_symbol(yytext[0], cursor_);
2142
33
    }
2143
2144
    /* If what we have left are two chars, see if
2145
     * it is one of the two-character operators.
2146
     */
2147
0
    if (nchars == 2) {
2148
0
      if (strncmp(yytext, "::", 2) == 0) {
2149
0
        return GramProcessor::make_TYPECAST(cursor_);
2150
0
      } else if (strncmp(yytext, "..", 2) == 0) {
2151
0
        return GramProcessor::make_DOT_DOT(cursor_);
2152
0
      } else if (strncmp(yytext, ":=", 2) == 0) {
2153
0
        return GramProcessor::make_COLON_EQUALS(cursor_);
2154
0
      } else if (strncmp(yytext, "=>", 2) == 0) {
2155
0
        return GramProcessor::make_EQUALS_GREATER(cursor_);
2156
0
      } else if (strncmp(yytext, "<=", 2) == 0) {
2157
0
        return GramProcessor::make_LESS_EQUALS(cursor_);
2158
0
      } else if (strncmp(yytext, ">=", 2) == 0) {
2159
0
        return GramProcessor::make_GREATER_EQUALS(cursor_);
2160
0
      } else if (strncmp(yytext, "<>", 2) == 0 ||
2161
0
                 strncmp(yytext, "!=", 2) == 0) {
2162
0
        return GramProcessor::make_NOT_EQUALS(cursor_);
2163
0
      }
2164
0
    }
2165
0
  }
2166
2167
  /* Complain if operator is too long.  Unlike the case
2168
   * for identifiers, we make this an error not a notice-
2169
   * and-truncate, because the odds are we are looking at
2170
   * a syntactic mistake anyway.
2171
   */
2172
1
  if (nchars >= NAMEDATALEN)
2173
0
    yyerror("operator too long");
2174
2175
1
  return GramProcessor::make_Op(MakeString(yytext), cursor_);
2176
1
}
2177
0
  YY_BREAK
2178
0
case 73:
2179
0
YY_RULE_SETUP
2180
0
#line 966 "scanner_lex.l"
2181
0
{
2182
0
  SET_YYLLOC();
2183
0
  int64_t ival = atol(yytext + 1);
2184
0
  return GramProcessor::make_PARAM(ival, cursor_);
2185
1
}
2186
0
  YY_BREAK
2187
157k
case 74:
2188
157k
YY_RULE_SETUP
2189
157k
#line 972 "scanner_lex.l"
2190
157k
{
2191
157k
  SET_YYLLOC();
2192
157k
  return GramProcessor::make_ICONST(MakeString(yytext), cursor_);
2193
1
}
2194
0
  YY_BREAK
2195
3.48k
case 75:
2196
3.48k
YY_RULE_SETUP
2197
3.48k
#line 977 "scanner_lex.l"
2198
3.48k
{
2199
3.48k
  SET_YYLLOC();
2200
3.48k
  return GramProcessor::make_FCONST(MakeString(yytext), cursor_);
2201
1
}
2202
0
  YY_BREAK
2203
0
case 76:
2204
0
YY_RULE_SETUP
2205
0
#line 982 "scanner_lex.l"
2206
0
{
2207
  /* throw back the .., and treat as integer */
2208
0
  yyless(yyleng-2);
2209
0
  SET_YYLLOC();
2210
0
  return GramProcessor::make_ICONST(MakeString(yytext), cursor_);
2211
1
}
2212
0
  YY_BREAK
2213
3.18k
case 77:
2214
3.18k
YY_RULE_SETUP
2215
3.18k
#line 989 "scanner_lex.l"
2216
3.18k
{
2217
3.18k
  SET_YYLLOC();
2218
  // skipping the first two chars (i.e. the '0x')
2219
3.18k
  return GramProcessor::make_BCONST(MakeString(yytext + 2), cursor_);
2220
1
}
2221
0
  YY_BREAK
2222
776
case 78:
2223
776
YY_RULE_SETUP
2224
776
#line 995 "scanner_lex.l"
2225
776
{
2226
776
  SET_YYLLOC();
2227
776
  return GramProcessor::make_FCONST(MakeString(yytext), cursor_);
2228
1
}
2229
0
  YY_BREAK
2230
2
case 79:
2231
2
YY_RULE_SETUP
2232
2
#line 1000 "scanner_lex.l"
2233
2
{
2234
  /* throw back the [Ee], and treat as {decimal}.  Note
2235
   * that it is possible the input is actually {integer},
2236
   * but since this case will almost certainly lead to a
2237
   * syntax error anyway, we don't bother to distinguish.
2238
   */
2239
2
  yyless(yyleng-1);
2240
2
  SET_YYLLOC();
2241
2
  return GramProcessor::make_FCONST(MakeString(yytext), cursor_);
2242
1
}
2243
0
  YY_BREAK
2244
0
case 80:
2245
0
YY_RULE_SETUP
2246
0
#line 1011 "scanner_lex.l"
2247
0
{
2248
  /* throw back the [Ee][+-], and proceed as above */
2249
0
  yyless(yyleng-2);
2250
0
  SET_YYLLOC();
2251
0
  return GramProcessor::make_FCONST(MakeString(yytext), cursor_);
2252
1
}
2253
0
  YY_BREAK
2254
1.01k
case 81:
2255
1.01k
YY_RULE_SETUP
2256
1.01k
#line 1018 "scanner_lex.l"
2257
1.01k
{
2258
1.01k
  SET_YYLLOC();
2259
  /* Trim the dashes from the UUID string. */
2260
1.01k
  return GramProcessor::make_UCONST(MakeString(yytext), cursor_);
2261
1
}
2262
0
  YY_BREAK
2263
2.23M
case 82:
2264
2.23M
YY_RULE_SETUP
2265
2.23M
#line 1024 "scanner_lex.l"
2266
2.23M
{
2267
2.23M
  SET_YYLLOC();
2268
2269
  /* Check against the keyword list. */
2270
2.23M
  const ScanKeyword &keyword = ScanKeywordLookup(yytext);
2271
2.23M
  if (keyword.is_valid()) {
2272
1.25M
    return make_symbol(keyword, cursor_);
2273
1.25M
  }
2274
2275
  /* Not a keyword.  Convert the identifier to lower case, and truncate if necessary. */
2276
985k
  const MCSharedPtr<MCString> ident = MakeIdentifier(yytext, yyleng, true);
2277
985k
  return GramProcessor::make_IDENT(ident, cursor_);
2278
2.23M
}
2279
0
  YY_BREAK
2280
2.95k
case 83:
2281
2.95k
YY_RULE_SETUP
2282
2.95k
#line 1038 "scanner_lex.l"
2283
2.95k
{
2284
2.95k
  SET_YYLLOC();
2285
2.95k
  return make_symbol(yytext[0], cursor_);
2286
2.23M
}
2287
0
  YY_BREAK
2288
342k
case YY_STATE_EOF(INITIAL):
2289
342k
#line 1043 "scanner_lex.l"
2290
342k
{
2291
342k
  SET_YYLLOC();
2292
342k
  yyterminate();
2293
2.23M
}
2294
0
  YY_BREAK
2295
0
case 84:
2296
0
YY_RULE_SETUP
2297
0
#line 1048 "scanner_lex.l"
2298
0
YY_FATAL_ERROR( "flex scanner jammed" );
2299
0
  YY_BREAK
2300
0
#line 2300 "/Users/deen/code/yugabyte-db/build/debugcov-clang-dynamic-arm64-ninja/src/yb/yql/cql/ql/parser/scanner_lex.l.cc"
2301
2302
1.02M
  case YY_END_OF_BUFFER:
2303
1.02M
    {
2304
    /* Amount of text matched not including the EOB char. */
2305
1.02M
    int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2306
2307
    /* Undo the effects of YY_DO_BEFORE_ACTION. */
2308
1.02M
    *yy_cp = (yy_hold_char);
2309
1.02M
    YY_RESTORE_YY_MORE_OFFSET
2310
2311
1.02M
    if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2312
339k
      {
2313
      /* We're scanning a new file or input source.  It's
2314
       * possible that this happened because the user
2315
       * just pointed yyin at a new source and called
2316
       * yylex().  If so, then we have to assure
2317
       * consistency between YY_CURRENT_BUFFER and our
2318
       * globals.  Here is the right place to do so, because
2319
       * this is the first action (other than possibly a
2320
       * back-up) that will match for the new input source.
2321
       */
2322
339k
      (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2323
339k
      YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin.rdbuf();
2324
339k
      YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2325
339k
      }
2326
2327
    /* Note that here we test for yy_c_buf_p "<=" to the position
2328
     * of the first EOB in the buffer, since yy_c_buf_p will
2329
     * already have been incremented past the NUL character
2330
     * (since all states make transitions on EOB to the
2331
     * end-of-buffer state).  Contrast this with the test
2332
     * in input().
2333
     */
2334
1.02M
    if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2335
0
      { /* This was really a NUL. */
2336
0
      yy_state_type yy_next_state;
2337
2338
0
      (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2339
2340
0
      yy_current_state = yy_get_previous_state(  );
2341
2342
      /* Okay, we're now positioned to make the NUL
2343
       * transition.  We couldn't have
2344
       * yy_get_previous_state() go ahead and do it
2345
       * for us because it doesn't know how to deal
2346
       * with the possibility of jamming (and we don't
2347
       * want to build jamming into it because then it
2348
       * will run more slowly).
2349
       */
2350
2351
0
      yy_next_state = yy_try_NUL_trans( yy_current_state );
2352
2353
0
      yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2354
2355
0
      if ( yy_next_state )
2356
0
        {
2357
        /* Consume the NUL. */
2358
0
        yy_cp = ++(yy_c_buf_p);
2359
0
        yy_current_state = yy_next_state;
2360
0
        goto yy_match;
2361
0
        }
2362
2363
0
      else
2364
0
        {
2365
0
        yy_cp = (yy_last_accepting_cpos);
2366
0
        yy_current_state = (yy_last_accepting_state);
2367
0
        goto yy_find_action;
2368
0
        }
2369
0
      }
2370
2371
1.02M
    else switch ( yy_get_next_buffer(  ) )
2372
1.02M
      {
2373
341k
      case EOB_ACT_END_OF_FILE:
2374
341k
        {
2375
341k
        (yy_did_buffer_switch_on_eof) = 0;
2376
2377
341k
        if ( yywrap(  ) )
2378
341k
          {
2379
          /* Note: because we've taken care in
2380
           * yy_get_next_buffer() to have set up
2381
           * yytext, we can now set up
2382
           * yy_c_buf_p so that if some total
2383
           * hoser (like flex itself) wants to
2384
           * call the scanner after we return the
2385
           * YY_NULL, it'll still work - another
2386
           * YY_NULL will get returned.
2387
           */
2388
341k
          (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2389
2390
341k
          yy_act = YY_STATE_EOF(YY_START);
2391
341k
          goto do_action;
2392
341k
          }
2393
2394
247
        else
2395
247
          {
2396
247
          if ( ! (yy_did_buffer_switch_on_eof) )
2397
0
            YY_NEW_FILE;
2398
247
          }
2399
247
        break;
2400
341k
        }
2401
2402
338k
      case EOB_ACT_CONTINUE_SCAN:
2403
338k
        (yy_c_buf_p) =
2404
338k
          (yytext_ptr) + yy_amount_of_matched_text;
2405
2406
338k
        yy_current_state = yy_get_previous_state(  );
2407
2408
338k
        yy_cp = (yy_c_buf_p);
2409
338k
        yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2410
338k
        goto yy_match;
2411
2412
341k
      case EOB_ACT_LAST_MATCH:
2413
341k
        (yy_c_buf_p) =
2414
341k
        &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2415
2416
341k
        yy_current_state = yy_get_previous_state(  );
2417
2418
341k
        yy_cp = (yy_c_buf_p);
2419
341k
        yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2420
341k
        goto yy_find_action;
2421
1.02M
      }
2422
0
    break;
2423
1.02M
    }
2424
2425
0
  default:
2426
0
    YY_FATAL_ERROR(
2427
7.97M
      "fatal flex scanner internal error--no action found" );
2428
7.97M
  } /* end of action switch */
2429
7.97M
    } /* end of scanning one token */
2430
4.45M
  } /* end of user's declarations */
2431
4.45M
} /* end of yylex */
2432
2433
/* The contents of this function are C++ specific, so the () macro is not used.
2434
 * This constructor simply maintains backward compatibility.
2435
 * DEPRECATED
2436
 */
2437
yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout ):
2438
  yyin(arg_yyin ? arg_yyin->rdbuf() : std::cin.rdbuf()),
2439
  yyout(arg_yyout ? arg_yyout->rdbuf() : std::cout.rdbuf())
2440
18.0k
{
2441
18.0k
  ctor_common();
2442
18.0k
}
2443
2444
/* The contents of this function are C++ specific, so the () macro is not used.
2445
 */
2446
yyFlexLexer::yyFlexLexer( std::istream& arg_yyin, std::ostream& arg_yyout ):
2447
  yyin(arg_yyin.rdbuf()),
2448
  yyout(arg_yyout.rdbuf())
2449
0
{
2450
0
  ctor_common();
2451
0
}
2452
2453
/* The contents of this function are C++ specific, so the () macro is not used.
2454
 */
2455
void yyFlexLexer::ctor_common()
2456
18.0k
{
2457
18.0k
  yy_c_buf_p = 0;
2458
18.0k
  yy_init = 0;
2459
18.0k
  yy_start = 0;
2460
18.0k
  yy_flex_debug = 0;
2461
18.0k
  yylineno = 1; // this will only get updated if %option yylineno
2462
2463
18.0k
  yy_did_buffer_switch_on_eof = 0;
2464
2465
18.0k
  yy_looking_for_trail_begin = 0;
2466
18.0k
  yy_more_flag = 0;
2467
18.0k
  yy_more_len = 0;
2468
18.0k
  yy_more_offset = yy_prev_more_offset = 0;
2469
2470
18.0k
  yy_start_stack_ptr = yy_start_stack_depth = 0;
2471
18.0k
  yy_start_stack = NULL;
2472
2473
18.0k
  yy_buffer_stack = NULL;
2474
18.0k
  yy_buffer_stack_top = 0;
2475
18.0k
  yy_buffer_stack_max = 0;
2476
2477
18.0k
  yy_state_buf = 0;
2478
2479
18.0k
}
2480
2481
/* The contents of this function are C++ specific, so the () macro is not used.
2482
 */
2483
yyFlexLexer::~yyFlexLexer()
2484
1
{
2485
1
  delete [] yy_state_buf;
2486
1
  yyfree(yy_start_stack  );
2487
1
  yy_delete_buffer( YY_CURRENT_BUFFER );
2488
1
  yyfree(yy_buffer_stack  );
2489
1
}
2490
2491
/* The contents of this function are C++ specific, so the () macro is not used.
2492
 */
2493
void yyFlexLexer::switch_streams( std::istream& new_in, std::ostream& new_out )
2494
0
{
2495
  // was if( new_in )
2496
0
  yy_delete_buffer( YY_CURRENT_BUFFER );
2497
0
  yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE  ) );
2498
2499
  // was if( new_out )
2500
0
  yyout.rdbuf(new_out.rdbuf());
2501
0
}
2502
2503
/* The contents of this function are C++ specific, so the () macro is not used.
2504
 */
2505
void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out )
2506
0
{
2507
0
  if( ! new_in ) {
2508
0
    new_in = &yyin;
2509
0
  }
2510
2511
0
  if ( ! new_out ) {
2512
0
    new_out = &yyout;
2513
0
  }
2514
2515
0
  switch_streams(*new_in, *new_out);
2516
0
}
2517
2518
#ifdef YY_INTERACTIVE
2519
int yyFlexLexer::LexerInput( char* buf, int /* max_size */ )
2520
#else
2521
int yyFlexLexer::LexerInput( char* buf, int max_size )
2522
#endif
2523
0
{
2524
0
  if ( yyin.eof() || yyin.fail() )
2525
0
    return 0;
2526
2527
#ifdef YY_INTERACTIVE
2528
  yyin.get( buf[0] );
2529
2530
  if ( yyin.eof() )
2531
    return 0;
2532
2533
  if ( yyin.bad() )
2534
    return -1;
2535
2536
  return 1;
2537
2538
#else
2539
0
  (void) yyin.read( buf, max_size );
2540
2541
0
  if ( yyin.bad() )
2542
0
    return -1;
2543
0
  else
2544
0
    return yyin.gcount();
2545
0
#endif
2546
0
}
2547
2548
void yyFlexLexer::LexerOutput( const char* buf, int size )
2549
0
{
2550
0
  (void) yyout.write( buf, size );
2551
0
}
2552
2553
/* yy_get_next_buffer - try to read in a new buffer
2554
 *
2555
 * Returns a code representing an action:
2556
 *  EOB_ACT_LAST_MATCH -
2557
 *  EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2558
 *  EOB_ACT_END_OF_FILE - end of file
2559
 */
2560
int yyFlexLexer::yy_get_next_buffer()
2561
1.02M
{
2562
1.02M
      char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2563
1.02M
  char *source = (yytext_ptr);
2564
1.02M
  int number_to_move, i;
2565
1.02M
  int ret_val;
2566
2567
1.02M
  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2568
0
    YY_FATAL_ERROR(
2569
1.02M
    "fatal flex scanner internal error--end of buffer missed" );
2570
2571
1.02M
  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2572
0
    { /* Don't try to fill the buffer, so this is an EOF. */
2573
0
    if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2574
0
      {
2575
      /* We matched a single character, the EOB, so
2576
       * treat this as a final EOF.
2577
       */
2578
0
      return EOB_ACT_END_OF_FILE;
2579
0
      }
2580
2581
0
    else
2582
0
      {
2583
      /* We matched some text prior to the EOB, first
2584
       * process it.
2585
       */
2586
0
      return EOB_ACT_LAST_MATCH;
2587
0
      }
2588
0
    }
2589
2590
  /* Try to read more data. */
2591
2592
  /* First move last chars to start of buffer. */
2593
1.02M
  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
2594
2595
2.57M
  for ( i = 0; i < number_to_move; 
++i1.55M
)
2596
1.55M
    *(dest++) = *(source++);
2597
2598
1.02M
  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2599
    /* don't do the read, it's not guaranteed to return an EOF,
2600
     * just force an EOF
2601
     */
2602
341k
    YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2603
2604
682k
  else
2605
682k
    {
2606
682k
      int num_to_read =
2607
682k
      YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2608
2609
682k
    while ( num_to_read <= 0 )
2610
0
      { /* Not enough room in the buffer - grow it. */
2611
2612
      /* just a shorter name for the current buffer */
2613
0
      YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
2614
2615
0
      int yy_c_buf_p_offset =
2616
0
        (int) ((yy_c_buf_p) - b->yy_ch_buf);
2617
2618
0
      if ( b->yy_is_our_buffer )
2619
0
        {
2620
0
        int new_size = b->yy_buf_size * 2;
2621
2622
0
        if ( new_size <= 0 )
2623
0
          b->yy_buf_size += b->yy_buf_size / 8;
2624
0
        else
2625
0
          b->yy_buf_size *= 2;
2626
2627
0
        b->yy_ch_buf = (char *)
2628
          /* Include room in for 2 EOB chars. */
2629
0
          yyrealloc((void *) b->yy_ch_buf,(yy_size_t) (b->yy_buf_size + 2)  );
2630
0
        }
2631
0
      else
2632
        /* Can't grow it, we don't own it. */
2633
0
        b->yy_ch_buf = NULL;
2634
2635
0
      if ( ! b->yy_ch_buf )
2636
0
        YY_FATAL_ERROR(
2637
0
        "fatal error - scanner input buffer overflow" );
2638
2639
0
      (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2640
2641
0
      num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2642
0
            number_to_move - 1;
2643
2644
0
      }
2645
2646
682k
    if ( num_to_read > YY_READ_BUF_SIZE )
2647
683k
      num_to_read = YY_READ_BUF_SIZE;
2648
2649
    /* Read in more data. */
2650
682k
    YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2651
682k
      (yy_n_chars), num_to_read );
2652
2653
682k
    YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2654
682k
    }
2655
2656
1.02M
  if ( (yy_n_chars) == 0 )
2657
682k
    {
2658
682k
    if ( number_to_move == YY_MORE_ADJ )
2659
342k
      {
2660
342k
      ret_val = EOB_ACT_END_OF_FILE;
2661
342k
      yyrestart( yyin  );
2662
342k
      }
2663
2664
340k
    else
2665
340k
      {
2666
340k
      ret_val = EOB_ACT_LAST_MATCH;
2667
340k
      YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2668
340k
        YY_BUFFER_EOF_PENDING;
2669
340k
      }
2670
682k
    }
2671
2672
341k
  else
2673
341k
    ret_val = EOB_ACT_CONTINUE_SCAN;
2674
2675
1.02M
  if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2676
    /* Extend the array by 50%, plus the number we really need. */
2677
0
    int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2678
0
    YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,(yy_size_t) new_size  );
2679
0
    if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2680
0
      YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2681
0
  }
2682
2683
1.02M
  (yy_n_chars) += number_to_move;
2684
1.02M
  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2685
1.02M
  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2686
2687
1.02M
  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2688
2689
1.02M
  return ret_val;
2690
1.02M
}
2691
2692
/* yy_get_previous_state - get the state just before the EOB char was reached */
2693
2694
    yy_state_type yyFlexLexer::yy_get_previous_state()
2695
682k
{
2696
682k
  yy_state_type yy_current_state;
2697
682k
  char *yy_cp;
2698
    
2699
682k
  yy_current_state = (yy_start);
2700
2701
2.23M
  for ( yy_cp = (
yytext_ptr682k
) +
YY_MORE_ADJ682k
; yy_cp < (yy_c_buf_p);
++yy_cp1.54M
)
2702
1.54M
    {
2703
18.4E
    YY_CHAR yy_c = (
*yy_cp1.54M
?
yy_ec[1.54M
YY_SC_TO_UI1.54M
(*yy_cp)] : 1);
2704
1.54M
    if ( yy_accept[yy_current_state] )
2705
1.20M
      {
2706
1.20M
      (yy_last_accepting_state) = yy_current_state;
2707
1.20M
      (yy_last_accepting_cpos) = yy_cp;
2708
1.20M
      }
2709
3.26M
    while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2710
1.71M
      {
2711
1.71M
      yy_current_state = (int) yy_def[yy_current_state];
2712
1.71M
      if ( yy_current_state >= 364 )
2713
125k
        yy_c = yy_meta[yy_c];
2714
1.71M
      }
2715
1.54M
    yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2716
1.54M
    }
2717
2718
682k
  return yy_current_state;
2719
682k
}
2720
2721
/* yy_try_NUL_trans - try to make a transition on the NUL character
2722
 *
2723
 * synopsis
2724
 *  next_state = yy_try_NUL_trans( current_state );
2725
 */
2726
    yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
2727
0
{
2728
0
  int yy_is_jam;
2729
0
      char *yy_cp = (yy_c_buf_p);
2730
2731
0
  YY_CHAR yy_c = 1;
2732
0
  if ( yy_accept[yy_current_state] )
2733
0
    {
2734
0
    (yy_last_accepting_state) = yy_current_state;
2735
0
    (yy_last_accepting_cpos) = yy_cp;
2736
0
    }
2737
0
  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2738
0
    {
2739
0
    yy_current_state = (int) yy_def[yy_current_state];
2740
0
    if ( yy_current_state >= 364 )
2741
0
      yy_c = yy_meta[yy_c];
2742
0
    }
2743
0
  yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2744
0
  yy_is_jam = (yy_current_state == 363);
2745
2746
0
    return yy_is_jam ? 0 : yy_current_state;
2747
0
}
2748
2749
#ifndef YY_NO_UNPUT
2750
    void yyFlexLexer::yyunput( int c, char* yy_bp)
2751
0
{
2752
0
  char *yy_cp;
2753
    
2754
0
    yy_cp = (yy_c_buf_p);
2755
2756
  /* undo effects of setting up yytext */
2757
0
  *yy_cp = (yy_hold_char);
2758
2759
0
  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2760
0
    { /* need to shift things up to make room */
2761
    /* +2 for EOB chars. */
2762
0
    int number_to_move = (yy_n_chars) + 2;
2763
0
    char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2764
0
          YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2765
0
    char *source =
2766
0
        &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2767
2768
0
    while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2769
0
      *--dest = *--source;
2770
2771
0
    yy_cp += (int) (dest - source);
2772
0
    yy_bp += (int) (dest - source);
2773
0
    YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2774
0
      (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2775
2776
0
    if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2777
0
      YY_FATAL_ERROR( "flex scanner push-back overflow" );
2778
0
    }
2779
2780
0
  *--yy_cp = (char) c;
2781
2782
0
  (yytext_ptr) = yy_bp;
2783
0
  (yy_hold_char) = *yy_cp;
2784
0
  (yy_c_buf_p) = yy_cp;
2785
0
}
2786
#endif
2787
2788
    int yyFlexLexer::yyinput()
2789
0
{
2790
0
  int c;
2791
    
2792
0
  *(yy_c_buf_p) = (yy_hold_char);
2793
2794
0
  if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2795
0
    {
2796
    /* yy_c_buf_p now points to the character we want to return.
2797
     * If this occurs *before* the EOB characters, then it's a
2798
     * valid NUL; if not, then we've hit the end of the buffer.
2799
     */
2800
0
    if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2801
      /* This was really a NUL. */
2802
0
      *(yy_c_buf_p) = '\0';
2803
2804
0
    else
2805
0
      { /* need more input */
2806
0
      int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
2807
0
      ++(yy_c_buf_p);
2808
2809
0
      switch ( yy_get_next_buffer(  ) )
2810
0
        {
2811
0
        case EOB_ACT_LAST_MATCH:
2812
          /* This happens because yy_g_n_b()
2813
           * sees that we've accumulated a
2814
           * token and flags that we need to
2815
           * try matching the token before
2816
           * proceeding.  But for input(),
2817
           * there's no matching to consider.
2818
           * So convert the EOB_ACT_LAST_MATCH
2819
           * to EOB_ACT_END_OF_FILE.
2820
           */
2821
2822
          /* Reset buffer status. */
2823
0
          yyrestart( yyin );
2824
2825
          /*FALLTHROUGH*/
2826
2827
0
        case EOB_ACT_END_OF_FILE:
2828
0
          {
2829
0
          if ( yywrap(  ) )
2830
0
            return 0;
2831
2832
0
          if ( ! (yy_did_buffer_switch_on_eof) )
2833
0
            YY_NEW_FILE;
2834
0
#ifdef __cplusplus
2835
0
          return yyinput();
2836
#else
2837
          return input();
2838
#endif
2839
0
          }
2840
2841
0
        case EOB_ACT_CONTINUE_SCAN:
2842
0
          (yy_c_buf_p) = (yytext_ptr) + offset;
2843
0
          break;
2844
0
        }
2845
0
      }
2846
0
    }
2847
2848
0
  c = *(unsigned char *) (yy_c_buf_p);  /* cast for 8-bit char's */
2849
0
  *(yy_c_buf_p) = '\0'; /* preserve yytext */
2850
0
  (yy_hold_char) = *++(yy_c_buf_p);
2851
2852
0
  return c;
2853
0
}
2854
2855
/** Immediately switch to a different input stream.
2856
 * @param input_file A readable stream.
2857
 * 
2858
 * @note This function does not reset the start condition to @c INITIAL .
2859
 */
2860
    void yyFlexLexer::yyrestart( std::istream& input_file )
2861
683k
{
2862
    
2863
683k
  if ( ! YY_CURRENT_BUFFER ){
2864
18.0k
        yyensure_buffer_stack ();
2865
18.0k
    YY_CURRENT_BUFFER_LVALUE =
2866
18.0k
            yy_create_buffer( yyin, YY_BUF_SIZE );
2867
18.0k
  }
2868
2869
683k
  yy_init_buffer( YY_CURRENT_BUFFER, input_file );
2870
683k
  yy_load_buffer_state(  );
2871
683k
}
2872
2873
/** Delegate to the new version that takes an istream reference.
2874
 * @param input_file A readable stream.
2875
 * 
2876
 * @note This function does not reset the start condition to @c INITIAL .
2877
 */
2878
void yyFlexLexer::yyrestart( std::istream* input_file )
2879
342k
{
2880
342k
  yyrestart( *input_file );
2881
342k
}
2882
2883
/** Switch to a different input buffer.
2884
 * @param new_buffer The new input buffer.
2885
 * 
2886
 */
2887
    void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2888
0
{
2889
    
2890
  /* TODO. We should be able to replace this entire function body
2891
   * with
2892
   *    yypop_buffer_state();
2893
   *    yypush_buffer_state(new_buffer);
2894
     */
2895
0
  yyensure_buffer_stack ();
2896
0
  if ( YY_CURRENT_BUFFER == new_buffer )
2897
0
    return;
2898
2899
0
  if ( YY_CURRENT_BUFFER )
2900
0
    {
2901
    /* Flush out information for old buffer. */
2902
0
    *(yy_c_buf_p) = (yy_hold_char);
2903
0
    YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2904
0
    YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2905
0
    }
2906
2907
0
  YY_CURRENT_BUFFER_LVALUE = new_buffer;
2908
0
  yy_load_buffer_state(  );
2909
2910
  /* We don't actually know whether we did this switch during
2911
   * EOF (yywrap()) processing, but the only time this flag
2912
   * is looked at is after yywrap() is called, so it's safe
2913
   * to go ahead and always set it.
2914
   */
2915
0
  (yy_did_buffer_switch_on_eof) = 1;
2916
0
}
2917
2918
    void yyFlexLexer::yy_load_buffer_state()
2919
1.37M
{
2920
1.37M
      (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2921
1.37M
  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2922
1.37M
  yyin.rdbuf(YY_CURRENT_BUFFER_LVALUE->yy_input_file);
2923
1.37M
  (yy_hold_char) = *(yy_c_buf_p);
2924
1.37M
}
2925
2926
/** Allocate and initialize an input buffer state.
2927
 * @param file A readable stream.
2928
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2929
 * 
2930
 * @return the allocated buffer state.
2931
 */
2932
    YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream& file, int size )
2933
17.9k
{
2934
17.9k
  YY_BUFFER_STATE b;
2935
    
2936
17.9k
  b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
2937
17.9k
  if ( ! b )
2938
0
    YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2939
2940
17.9k
  b->yy_buf_size = size;
2941
2942
  /* yy_ch_buf has to be 2 characters longer than the size given because
2943
   * we need to put in 2 end-of-buffer characters.
2944
   */
2945
17.9k
  b->yy_ch_buf = (char *) yyalloc((yy_size_t) (b->yy_buf_size + 2)  );
2946
17.9k
  if ( ! b->yy_ch_buf )
2947
0
    YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2948
2949
17.9k
  b->yy_is_our_buffer = 1;
2950
2951
17.9k
  yy_init_buffer( b, file );
2952
2953
17.9k
  return b;
2954
17.9k
}
2955
2956
/** Delegate creation of buffers to the new version that takes an istream reference.
2957
 * @param file A readable stream.
2958
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2959
 * 
2960
 * @return the allocated buffer state.
2961
 */
2962
  YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size )
2963
0
{
2964
0
  return yy_create_buffer( *file, size );
2965
0
}
2966
2967
/** Destroy the buffer.
2968
 * @param b a buffer created with yy_create_buffer()
2969
 * 
2970
 */
2971
    void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )
2972
1
{
2973
    
2974
1
  if ( ! b )
2975
0
    return;
2976
2977
1
  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2978
1
    YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2979
2980
1
  if ( b->yy_is_our_buffer )
2981
1
    yyfree((void *) b->yy_ch_buf  );
2982
2983
1
  yyfree((void *) b  );
2984
1
}
2985
2986
/* Initializes or reinitializes a buffer.
2987
 * This function is sometimes called more than once on the same buffer,
2988
 * such as during a yyrestart() or at EOF.
2989
 */
2990
    void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream& file )
2991
2992
701k
{
2993
701k
  int oerrno = errno;
2994
    
2995
701k
  yy_flush_buffer( b );
2996
2997
701k
  b->yy_input_file = (&file == 0) ? NULL : file.rdbuf();
2998
701k
  b->yy_fill_buffer = 1;
2999
3000
    /* If b is the current buffer, then yy_init_buffer was _probably_
3001
     * called from yyrestart() or through yy_get_next_buffer.
3002
     * In that case, we don't want to reset the lineno or column.
3003
     */
3004
701k
    if (b != YY_CURRENT_BUFFER){
3005
17.9k
        b->yy_bs_lineno = 1;
3006
17.9k
        b->yy_bs_column = 0;
3007
17.9k
    }
3008
3009
701k
  b->yy_is_interactive = 0;
3010
701k
  errno = oerrno;
3011
701k
}
3012
3013
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
3014
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
3015
 * 
3016
 */
3017
    void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )
3018
701k
{
3019
701k
      if ( ! b )
3020
0
    return;
3021
3022
701k
  b->yy_n_chars = 0;
3023
3024
  /* We always need two end-of-buffer characters.  The first causes
3025
   * a transition to the end-of-buffer state.  The second causes
3026
   * a jam in that state.
3027
   */
3028
701k
  b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
3029
701k
  b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
3030
3031
701k
  b->yy_buf_pos = &b->yy_ch_buf[0];
3032
3033
701k
  b->yy_at_bol = 1;
3034
701k
  b->yy_buffer_status = YY_BUFFER_NEW;
3035
3036
701k
  if ( b == YY_CURRENT_BUFFER )
3037
679k
    yy_load_buffer_state(  );
3038
701k
}
3039
3040
/** Pushes the new state onto the stack. The new state becomes
3041
 *  the current state. This function will allocate the stack
3042
 *  if necessary.
3043
 *  @param new_buffer The new state.
3044
 *  
3045
 */
3046
void yyFlexLexer::yypush_buffer_state (YY_BUFFER_STATE new_buffer)
3047
0
{
3048
0
      if (new_buffer == NULL)
3049
0
    return;
3050
3051
0
  yyensure_buffer_stack();
3052
3053
  /* This block is copied from yy_switch_to_buffer. */
3054
0
  if ( YY_CURRENT_BUFFER )
3055
0
    {
3056
    /* Flush out information for old buffer. */
3057
0
    *(yy_c_buf_p) = (yy_hold_char);
3058
0
    YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3059
0
    YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3060
0
    }
3061
3062
  /* Only push if top exists. Otherwise, replace top. */
3063
0
  if (YY_CURRENT_BUFFER)
3064
0
    (yy_buffer_stack_top)++;
3065
0
  YY_CURRENT_BUFFER_LVALUE = new_buffer;
3066
3067
  /* copied from yy_switch_to_buffer. */
3068
0
  yy_load_buffer_state(  );
3069
0
  (yy_did_buffer_switch_on_eof) = 1;
3070
0
}
3071
3072
/** Removes and deletes the top of the stack, if present.
3073
 *  The next element becomes the new top.
3074
 *  
3075
 */
3076
void yyFlexLexer::yypop_buffer_state (void)
3077
0
{
3078
0
      if (!YY_CURRENT_BUFFER)
3079
0
    return;
3080
3081
0
  yy_delete_buffer(YY_CURRENT_BUFFER );
3082
0
  YY_CURRENT_BUFFER_LVALUE = NULL;
3083
0
  if ((yy_buffer_stack_top) > 0)
3084
0
    --(yy_buffer_stack_top);
3085
3086
0
  if (YY_CURRENT_BUFFER) {
3087
0
    yy_load_buffer_state(  );
3088
0
    (yy_did_buffer_switch_on_eof) = 1;
3089
0
  }
3090
0
}
3091
3092
/* Allocates the stack if it does not exist.
3093
 *  Guarantees space for at least one push.
3094
 */
3095
void yyFlexLexer::yyensure_buffer_stack(void)
3096
17.9k
{
3097
17.9k
  yy_size_t num_to_alloc;
3098
    
3099
17.9k
  if (
!(yy_buffer_stack)17.9k
) {
3100
3101
    /* First allocation is just for 2 elements, since we don't know if this
3102
     * scanner will even need a stack. We use 2 instead of 1 to avoid an
3103
     * immediate realloc on the next call.
3104
         */
3105
17.9k
      num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
3106
17.9k
    (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
3107
17.9k
                (num_to_alloc * sizeof(struct yy_buffer_state*)
3108
17.9k
                );
3109
17.9k
    if ( ! (yy_buffer_stack) )
3110
0
      YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3111
3112
17.9k
    memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
3113
3114
17.9k
    (yy_buffer_stack_max) = num_to_alloc;
3115
17.9k
    (yy_buffer_stack_top) = 0;
3116
17.9k
    return;
3117
17.9k
  }
3118
3119
18.4E
  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
3120
3121
    /* Increase the buffer to prepare for a possible push. */
3122
0
    yy_size_t grow_size = 8 /* arbitrary grow size */;
3123
3124
0
    num_to_alloc = (yy_buffer_stack_max) + grow_size;
3125
0
    (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
3126
0
                ((yy_buffer_stack),
3127
0
                num_to_alloc * sizeof(struct yy_buffer_state*)
3128
0
                );
3129
0
    if ( ! (yy_buffer_stack) )
3130
0
      YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3131
3132
    /* zero only the new slots.*/
3133
0
    memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
3134
0
    (yy_buffer_stack_max) = num_to_alloc;
3135
0
  }
3136
18.4E
}
3137
3138
    void yyFlexLexer::yy_push_state( int _new_state )
3139
0
{
3140
0
      if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
3141
0
    {
3142
0
    yy_size_t new_size;
3143
3144
0
    (yy_start_stack_depth) += YY_START_STACK_INCR;
3145
0
    new_size = (yy_size_t) (yy_start_stack_depth) * sizeof( int );
3146
3147
0
    if ( ! (yy_start_stack) )
3148
0
      (yy_start_stack) = (int *) yyalloc(new_size  );
3149
3150
0
    else
3151
0
      (yy_start_stack) = (int *) yyrealloc((void *) (yy_start_stack),new_size  );
3152
3153
0
    if ( ! (yy_start_stack) )
3154
0
      YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
3155
0
    }
3156
3157
0
  (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;
3158
3159
0
  BEGIN(_new_state);
3160
0
}
3161
3162
    void yyFlexLexer::yy_pop_state()
3163
0
{
3164
0
      if ( --(yy_start_stack_ptr) < 0 )
3165
0
    YY_FATAL_ERROR( "start-condition stack underflow" );
3166
3167
0
  BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
3168
0
}
3169
3170
    int yyFlexLexer::yy_top_state()
3171
0
{
3172
0
      return (yy_start_stack)[(yy_start_stack_ptr) - 1];
3173
0
}
3174
3175
#ifndef YY_EXIT_FAILURE
3176
0
#define YY_EXIT_FAILURE 2
3177
#endif
3178
3179
void yyFlexLexer::LexerError( const char* msg )
3180
0
{
3181
0
      std::cerr << msg << std::endl;
3182
0
  exit( YY_EXIT_FAILURE );
3183
0
}
3184
3185
/* Redefine yyless() so it works in section 3 code. */
3186
3187
#undef yyless
3188
#define yyless(n) \
3189
  do \
3190
    { \
3191
    /* Undo effects of setting up yytext. */ \
3192
        int yyless_macro_arg = (n); \
3193
        YY_LESS_LINENO(yyless_macro_arg);\
3194
    yytext[yyleng] = (yy_hold_char); \
3195
    (yy_c_buf_p) = yytext + yyless_macro_arg; \
3196
    (yy_hold_char) = *(yy_c_buf_p); \
3197
    *(yy_c_buf_p) = '\0'; \
3198
    yyleng = yyless_macro_arg; \
3199
    } \
3200
  while ( 0 )
3201
3202
/* Accessor  methods (get/set functions) to struct members. */
3203
3204
/*
3205
 * Internal utility routines.
3206
 */
3207
3208
#ifndef yytext_ptr
3209
static void yy_flex_strncpy (char* s1, const char * s2, int n )
3210
{
3211
    
3212
  int i;
3213
  for ( i = 0; i < n; ++i )
3214
    s1[i] = s2[i];
3215
}
3216
#endif
3217
3218
#ifdef YY_NEED_STRLEN
3219
static int yy_flex_strlen (const char * s )
3220
{
3221
  int n;
3222
  for ( n = 0; s[n]; ++n )
3223
    ;
3224
3225
  return n;
3226
}
3227
#endif
3228
3229
#define YYTABLES_NAME "yytables"
3230
3231
#line 1048 "scanner_lex.l"
3232
3233
3234
/* FLEX C++ version doesn't allow us to change the specification of allocation routines, so we
3235
 * cannot insert our own memory context here. As a result, to avoid memory fragmentation, we just
3236
 * make sure that FLEX allocate its buffers by multiple of 4k.
3237
 */
3238
constexpr int kFlexBufferBlockSize = 4*1024;
3239
53.9k
static yy_size_t YYRoundUpFlexBuffer(yy_size_t size) {
3240
53.9k
  yy_size_t remainder = size % kFlexBufferBlockSize;
3241
53.9k
  if (remainder == 0) {
3242
0
    return size;
3243
53.9k
  } else {
3244
53.9k
    return size + (kFlexBufferBlockSize - remainder);
3245
53.9k
  }
3246
53.9k
}
3247
3248
53.9k
void *yyalloc(yy_size_t size) {
3249
  /* Round up size to multiple of kMinFlexBufferSize. */
3250
53.9k
  size = YYRoundUpFlexBuffer(size);
3251
53.9k
  return malloc(size);
3252
53.9k
}
3253
3254
0
void *yyrealloc(void *ptr, yy_size_t size) {
3255
  /* Round up size to multiple of kMinFlexBufferSize. */
3256
0
  size = YYRoundUpFlexBuffer(size);
3257
0
  return realloc(static_cast<char *>(ptr), size);
3258
0
}
3259
3260
4
void yyfree(void *ptr) {
3261
4
  free(static_cast<char *>(ptr));
3262
4
}
3263