YugabyteDB (2.13.0.0-b42, bfc6a6643e7399ac8a0e81d06a3ee6d6571b33ab)

Coverage Report

Created: 2022-03-09 17:30

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