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