1 #line 2 "syncrep_scanner.c"
2 
3 #line 4 "syncrep_scanner.c"
4 
5 #define  YY_INT_ALIGNED short int
6 
7 /* A lexical scanner generated by flex */
8 
9 #define yy_create_buffer syncrep_yy_create_buffer
10 #define yy_delete_buffer syncrep_yy_delete_buffer
11 #define yy_scan_buffer syncrep_yy_scan_buffer
12 #define yy_scan_string syncrep_yy_scan_string
13 #define yy_scan_bytes syncrep_yy_scan_bytes
14 #define yy_init_buffer syncrep_yy_init_buffer
15 #define yy_flush_buffer syncrep_yy_flush_buffer
16 #define yy_load_buffer_state syncrep_yy_load_buffer_state
17 #define yy_switch_to_buffer syncrep_yy_switch_to_buffer
18 #define yypush_buffer_state syncrep_yypush_buffer_state
19 #define yypop_buffer_state syncrep_yypop_buffer_state
20 #define yyensure_buffer_stack syncrep_yyensure_buffer_stack
21 #define yy_flex_debug syncrep_yy_flex_debug
22 #define yyin syncrep_yyin
23 #define yyleng syncrep_yyleng
24 #define yylex syncrep_yylex
25 #define yylineno syncrep_yylineno
26 #define yyout syncrep_yyout
27 #define yyrestart syncrep_yyrestart
28 #define yytext syncrep_yytext
29 #define yywrap syncrep_yywrap
30 #define yyalloc syncrep_yyalloc
31 #define yyrealloc syncrep_yyrealloc
32 #define yyfree syncrep_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 syncrep_yy_create_buffer_ALREADY_DEFINED
44 #else
45 #define yy_create_buffer syncrep_yy_create_buffer
46 #endif
47 
48 #ifdef yy_delete_buffer
49 #define syncrep_yy_delete_buffer_ALREADY_DEFINED
50 #else
51 #define yy_delete_buffer syncrep_yy_delete_buffer
52 #endif
53 
54 #ifdef yy_scan_buffer
55 #define syncrep_yy_scan_buffer_ALREADY_DEFINED
56 #else
57 #define yy_scan_buffer syncrep_yy_scan_buffer
58 #endif
59 
60 #ifdef yy_scan_string
61 #define syncrep_yy_scan_string_ALREADY_DEFINED
62 #else
63 #define yy_scan_string syncrep_yy_scan_string
64 #endif
65 
66 #ifdef yy_scan_bytes
67 #define syncrep_yy_scan_bytes_ALREADY_DEFINED
68 #else
69 #define yy_scan_bytes syncrep_yy_scan_bytes
70 #endif
71 
72 #ifdef yy_init_buffer
73 #define syncrep_yy_init_buffer_ALREADY_DEFINED
74 #else
75 #define yy_init_buffer syncrep_yy_init_buffer
76 #endif
77 
78 #ifdef yy_flush_buffer
79 #define syncrep_yy_flush_buffer_ALREADY_DEFINED
80 #else
81 #define yy_flush_buffer syncrep_yy_flush_buffer
82 #endif
83 
84 #ifdef yy_load_buffer_state
85 #define syncrep_yy_load_buffer_state_ALREADY_DEFINED
86 #else
87 #define yy_load_buffer_state syncrep_yy_load_buffer_state
88 #endif
89 
90 #ifdef yy_switch_to_buffer
91 #define syncrep_yy_switch_to_buffer_ALREADY_DEFINED
92 #else
93 #define yy_switch_to_buffer syncrep_yy_switch_to_buffer
94 #endif
95 
96 #ifdef yypush_buffer_state
97 #define syncrep_yypush_buffer_state_ALREADY_DEFINED
98 #else
99 #define yypush_buffer_state syncrep_yypush_buffer_state
100 #endif
101 
102 #ifdef yypop_buffer_state
103 #define syncrep_yypop_buffer_state_ALREADY_DEFINED
104 #else
105 #define yypop_buffer_state syncrep_yypop_buffer_state
106 #endif
107 
108 #ifdef yyensure_buffer_stack
109 #define syncrep_yyensure_buffer_stack_ALREADY_DEFINED
110 #else
111 #define yyensure_buffer_stack syncrep_yyensure_buffer_stack
112 #endif
113 
114 #ifdef yylex
115 #define syncrep_yylex_ALREADY_DEFINED
116 #else
117 #define yylex syncrep_yylex
118 #endif
119 
120 #ifdef yyrestart
121 #define syncrep_yyrestart_ALREADY_DEFINED
122 #else
123 #define yyrestart syncrep_yyrestart
124 #endif
125 
126 #ifdef yylex_init
127 #define syncrep_yylex_init_ALREADY_DEFINED
128 #else
129 #define yylex_init syncrep_yylex_init
130 #endif
131 
132 #ifdef yylex_init_extra
133 #define syncrep_yylex_init_extra_ALREADY_DEFINED
134 #else
135 #define yylex_init_extra syncrep_yylex_init_extra
136 #endif
137 
138 #ifdef yylex_destroy
139 #define syncrep_yylex_destroy_ALREADY_DEFINED
140 #else
141 #define yylex_destroy syncrep_yylex_destroy
142 #endif
143 
144 #ifdef yyget_debug
145 #define syncrep_yyget_debug_ALREADY_DEFINED
146 #else
147 #define yyget_debug syncrep_yyget_debug
148 #endif
149 
150 #ifdef yyset_debug
151 #define syncrep_yyset_debug_ALREADY_DEFINED
152 #else
153 #define yyset_debug syncrep_yyset_debug
154 #endif
155 
156 #ifdef yyget_extra
157 #define syncrep_yyget_extra_ALREADY_DEFINED
158 #else
159 #define yyget_extra syncrep_yyget_extra
160 #endif
161 
162 #ifdef yyset_extra
163 #define syncrep_yyset_extra_ALREADY_DEFINED
164 #else
165 #define yyset_extra syncrep_yyset_extra
166 #endif
167 
168 #ifdef yyget_in
169 #define syncrep_yyget_in_ALREADY_DEFINED
170 #else
171 #define yyget_in syncrep_yyget_in
172 #endif
173 
174 #ifdef yyset_in
175 #define syncrep_yyset_in_ALREADY_DEFINED
176 #else
177 #define yyset_in syncrep_yyset_in
178 #endif
179 
180 #ifdef yyget_out
181 #define syncrep_yyget_out_ALREADY_DEFINED
182 #else
183 #define yyget_out syncrep_yyget_out
184 #endif
185 
186 #ifdef yyset_out
187 #define syncrep_yyset_out_ALREADY_DEFINED
188 #else
189 #define yyset_out syncrep_yyset_out
190 #endif
191 
192 #ifdef yyget_leng
193 #define syncrep_yyget_leng_ALREADY_DEFINED
194 #else
195 #define yyget_leng syncrep_yyget_leng
196 #endif
197 
198 #ifdef yyget_text
199 #define syncrep_yyget_text_ALREADY_DEFINED
200 #else
201 #define yyget_text syncrep_yyget_text
202 #endif
203 
204 #ifdef yyget_lineno
205 #define syncrep_yyget_lineno_ALREADY_DEFINED
206 #else
207 #define yyget_lineno syncrep_yyget_lineno
208 #endif
209 
210 #ifdef yyset_lineno
211 #define syncrep_yyset_lineno_ALREADY_DEFINED
212 #else
213 #define yyset_lineno syncrep_yyset_lineno
214 #endif
215 
216 #ifdef yywrap
217 #define syncrep_yywrap_ALREADY_DEFINED
218 #else
219 #define yywrap syncrep_yywrap
220 #endif
221 
222 #ifdef yyalloc
223 #define syncrep_yyalloc_ALREADY_DEFINED
224 #else
225 #define yyalloc syncrep_yyalloc
226 #endif
227 
228 #ifdef yyrealloc
229 #define syncrep_yyrealloc_ALREADY_DEFINED
230 #else
231 #define yyrealloc syncrep_yyrealloc
232 #endif
233 
234 #ifdef yyfree
235 #define syncrep_yyfree_ALREADY_DEFINED
236 #else
237 #define yyfree syncrep_yyfree
238 #endif
239 
240 #ifdef yytext
241 #define syncrep_yytext_ALREADY_DEFINED
242 #else
243 #define yytext syncrep_yytext
244 #endif
245 
246 #ifdef yyleng
247 #define syncrep_yyleng_ALREADY_DEFINED
248 #else
249 #define yyleng syncrep_yyleng
250 #endif
251 
252 #ifdef yyin
253 #define syncrep_yyin_ALREADY_DEFINED
254 #else
255 #define yyin syncrep_yyin
256 #endif
257 
258 #ifdef yyout
259 #define syncrep_yyout_ALREADY_DEFINED
260 #else
261 #define yyout syncrep_yyout
262 #endif
263 
264 #ifdef yy_flex_debug
265 #define syncrep_yy_flex_debug_ALREADY_DEFINED
266 #else
267 #define yy_flex_debug syncrep_yy_flex_debug
268 #endif
269 
270 #ifdef yylineno
271 #define syncrep_yylineno_ALREADY_DEFINED
272 #else
273 #define yylineno syncrep_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 syncrep_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 15
618 #define YY_END_OF_BUFFER 16
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[32] =
627     {   0,
628         0,    0,    0,    0,   16,   14,    1,    1,    4,   12,
629        13,   10,   11,    9,    8,    8,    8,    6,    7,    1,
630         9,    8,    8,    8,    6,    5,    2,    8,    8,    3,
631         0
632     } ;
633 
634 static const YY_CHAR yy_ec[256] =
635     {   0,
636         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
637         2,    2,    2,    1,    1,    1,    1,    1,    1,    1,
638         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
639         1,    2,    1,    4,    1,    5,    1,    1,    1,    6,
640         7,    8,    1,    9,    1,    1,    1,   10,   10,   10,
641        10,   10,   10,   10,   10,   10,   10,    1,    1,    1,
642         1,    1,    1,    1,   11,   12,   12,   12,   12,   13,
643        12,   12,   14,   12,   12,   12,   12,   15,   12,   12,
644        12,   16,   17,   18,   12,   12,   12,   12,   19,   12,
645         1,    1,    1,    1,   12,    1,   11,   12,   12,   12,
646 
647        12,   13,   12,   12,   14,   12,   12,   12,   12,   15,
648        12,   12,   12,   16,   17,   18,   12,   12,   12,   12,
649        19,   12,    1,    1,    1,    1,    1,   12,   12,   12,
650        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
651        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
652        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
653        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
654        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
655        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
656        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
657 
658        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
659        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
660        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
661        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
662        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
663        12,   12,   12,   12,   12
664     } ;
665 
666 static const YY_CHAR yy_meta[20] =
667     {   0,
668         1,    1,    1,    2,    3,    1,    1,    1,    1,    3,
669         3,    3,    3,    3,    3,    3,    3,    3,    3
670     } ;
671 
672 static const flex_int16_t yy_base[35] =
673     {   0,
674         0,    0,   39,   38,   41,   44,   18,   20,   44,   44,
675        44,   44,   44,   30,   24,    0,   24,    0,   33,   22,
676        26,    0,   16,   18,    0,   44,    0,   16,   14,    0,
677        44,   25,   27,   28
678     } ;
679 
680 static const flex_int16_t yy_def[35] =
681     {   0,
682        31,    1,   32,   32,   31,   31,   31,   31,   31,   31,
683        31,   31,   31,   31,   33,   33,   33,   34,   31,   31,
684        31,   33,   33,   33,   34,   31,   33,   33,   33,   33,
685         0,   31,   31,   31
686     } ;
687 
688 static const flex_int16_t yy_nxt[64] =
689     {   0,
690         6,    7,    8,    9,    6,   10,   11,   12,   13,   14,
691        15,   16,   17,   16,   16,   16,   16,   16,   16,   20,
692        20,   20,   20,   20,   20,   18,   18,   18,   25,   22,
693        25,   30,   29,   28,   27,   21,   26,   24,   23,   21,
694        31,   19,   19,    5,   31,   31,   31,   31,   31,   31,
695        31,   31,   31,   31,   31,   31,   31,   31,   31,   31,
696        31,   31,   31
697     } ;
698 
699 static const flex_int16_t yy_chk[64] =
700     {   0,
701         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
702         1,    1,    1,    1,    1,    1,    1,    1,    1,    7,
703         7,    8,    8,   20,   20,   32,   32,   32,   34,   33,
704        34,   29,   28,   24,   23,   21,   19,   17,   15,   14,
705         5,    4,    3,   31,   31,   31,   31,   31,   31,   31,
706        31,   31,   31,   31,   31,   31,   31,   31,   31,   31,
707        31,   31,   31
708     } ;
709 
710 static yy_state_type yy_last_accepting_state;
711 static char *yy_last_accepting_cpos;
712 
713 extern int yy_flex_debug;
714 int yy_flex_debug = 0;
715 
716 /* The intent behind this definition is that it'll catch
717  * any uses of REJECT which flex missed.
718  */
719 #define REJECT reject_used_but_not_detected
720 #define yymore() yymore_used_but_not_detected
721 #define YY_MORE_ADJ 0
722 #define YY_RESTORE_YY_MORE_OFFSET
723 char *yytext;
724 #line 1 "syncrep_scanner.l"
725 #line 2 "syncrep_scanner.l"
726 /*-------------------------------------------------------------------------
727  *
728  * syncrep_scanner.l
729  *	  a lexical scanner for synchronous_standby_names
730  *
731  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
732  * Portions Copyright (c) 1994, Regents of the University of California
733  *
734  *
735  * IDENTIFICATION
736  *	  src/backend/replication/syncrep_scanner.l
737  *
738  *-------------------------------------------------------------------------
739  */
740 #include "postgres.h"
741 
742 #include "lib/stringinfo.h"
743 
744 /* Avoid exit() on fatal scanner errors (a bit ugly -- see yy_fatal_error) */
745 #undef fprintf
746 #define fprintf(file, fmt, msg)  fprintf_to_ereport(fmt, msg)
747 
748 static void
fprintf_to_ereport(const char * fmt,const char * msg)749 fprintf_to_ereport(const char *fmt, const char *msg)
750 {
751 	ereport(ERROR, (errmsg_internal("%s", msg)));
752 }
753 
754 /* Handles to the buffer that the lexer uses internally */
755 static YY_BUFFER_STATE scanbufhandle;
756 
757 static StringInfoData xdbuf;
758 
759 /* LCOV_EXCL_START */
760 
761 #line 762 "syncrep_scanner.c"
762 #define YY_NO_INPUT 1
763 /*
764  * <xd> delimited identifiers (double-quoted identifiers)
765  */
766 
767 #line 768 "syncrep_scanner.c"
768 
769 #define INITIAL 0
770 #define xd 1
771 
772 #ifndef YY_NO_UNISTD_H
773 /* Special case for "unistd.h", since it is non-ANSI. We include it way
774  * down here because we want the user's section 1 to have been scanned first.
775  * The user has a chance to override it with an option.
776  */
777 #include <unistd.h>
778 #endif
779 
780 #ifndef YY_EXTRA_TYPE
781 #define YY_EXTRA_TYPE void *
782 #endif
783 
784 static int yy_init_globals ( void );
785 
786 /* Accessor methods to globals.
787    These are made visible to non-reentrant scanners for convenience. */
788 
789 int yylex_destroy ( void );
790 
791 int yyget_debug ( void );
792 
793 void yyset_debug ( int debug_flag  );
794 
795 YY_EXTRA_TYPE yyget_extra ( void );
796 
797 void yyset_extra ( YY_EXTRA_TYPE user_defined  );
798 
799 FILE *yyget_in ( void );
800 
801 void yyset_in  ( FILE * _in_str  );
802 
803 FILE *yyget_out ( void );
804 
805 void yyset_out  ( FILE * _out_str  );
806 
807 			int yyget_leng ( void );
808 
809 char *yyget_text ( void );
810 
811 int yyget_lineno ( void );
812 
813 void yyset_lineno ( int _line_number  );
814 
815 /* Macros after this point can all be overridden by user definitions in
816  * section 1.
817  */
818 
819 #ifndef YY_SKIP_YYWRAP
820 #ifdef __cplusplus
821 extern "C" int yywrap ( void );
822 #else
823 extern int yywrap ( void );
824 #endif
825 #endif
826 
827 #ifndef YY_NO_UNPUT
828 
829 #endif
830 
831 #ifndef yytext_ptr
832 static void yy_flex_strncpy ( char *, const char *, int );
833 #endif
834 
835 #ifdef YY_NEED_STRLEN
836 static int yy_flex_strlen ( const char * );
837 #endif
838 
839 #ifndef YY_NO_INPUT
840 #ifdef __cplusplus
841 static int yyinput ( void );
842 #else
843 static int input ( void );
844 #endif
845 
846 #endif
847 
848 /* Amount of stuff to slurp up with each read. */
849 #ifndef YY_READ_BUF_SIZE
850 #ifdef __ia64__
851 /* On IA-64, the buffer size is 16k, not 8k */
852 #define YY_READ_BUF_SIZE 16384
853 #else
854 #define YY_READ_BUF_SIZE 8192
855 #endif /* __ia64__ */
856 #endif
857 
858 /* Copy whatever the last rule matched to the standard output. */
859 #ifndef ECHO
860 /* This used to be an fputs(), but since the string might contain NUL's,
861  * we now use fwrite().
862  */
863 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
864 #endif
865 
866 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
867  * is returned in "result".
868  */
869 #ifndef YY_INPUT
870 #define YY_INPUT(buf,result,max_size) \
871 	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
872 		{ \
873 		int c = '*'; \
874 		int n; \
875 		for ( n = 0; n < max_size && \
876 			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
877 			buf[n] = (char) c; \
878 		if ( c == '\n' ) \
879 			buf[n++] = (char) c; \
880 		if ( c == EOF && ferror( yyin ) ) \
881 			YY_FATAL_ERROR( "input in flex scanner failed" ); \
882 		result = n; \
883 		} \
884 	else \
885 		{ \
886 		errno=0; \
887 		while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
888 			{ \
889 			if( errno != EINTR) \
890 				{ \
891 				YY_FATAL_ERROR( "input in flex scanner failed" ); \
892 				break; \
893 				} \
894 			errno=0; \
895 			clearerr(yyin); \
896 			} \
897 		}\
898 \
899 
900 #endif
901 
902 /* No semi-colon after return; correct usage is to write "yyterminate();" -
903  * we don't want an extra ';' after the "return" because that will cause
904  * some compilers to complain about unreachable statements.
905  */
906 #ifndef yyterminate
907 #define yyterminate() return YY_NULL
908 #endif
909 
910 /* Number of entries by which start-condition stack grows. */
911 #ifndef YY_START_STACK_INCR
912 #define YY_START_STACK_INCR 25
913 #endif
914 
915 /* Report a fatal error. */
916 #ifndef YY_FATAL_ERROR
917 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
918 #endif
919 
920 /* end tables serialization structures and prototypes */
921 
922 /* Default declaration of generated scanner - a define so the user can
923  * easily add parameters.
924  */
925 #ifndef YY_DECL
926 #define YY_DECL_IS_OURS 1
927 
928 extern int yylex (void);
929 
930 #define YY_DECL int yylex (void)
931 #endif /* !YY_DECL */
932 
933 /* Code executed at the beginning of each rule, after yytext and yyleng
934  * have been set up.
935  */
936 #ifndef YY_USER_ACTION
937 #define YY_USER_ACTION
938 #endif
939 
940 /* Code executed at the end of each rule. */
941 #ifndef YY_BREAK
942 #define YY_BREAK /*LINTED*/break;
943 #endif
944 
945 #define YY_RULE_SETUP \
946 	YY_USER_ACTION
947 
948 /** The main scanner function which does all the work.
949  */
950 YY_DECL
951 {
952 	yy_state_type yy_current_state;
953 	char *yy_cp, *yy_bp;
954 	int yy_act;
955 
956 	if ( !(yy_init) )
957 		{
958 		(yy_init) = 1;
959 
960 #ifdef YY_USER_INIT
961 		YY_USER_INIT;
962 #endif
963 
964 		if ( ! (yy_start) )
965 			(yy_start) = 1;	/* first start state */
966 
967 		if ( ! yyin )
968 			yyin = stdin;
969 
970 		if ( ! yyout )
971 			yyout = stdout;
972 
973 		if ( ! YY_CURRENT_BUFFER ) {
974 			yyensure_buffer_stack ();
975 			YY_CURRENT_BUFFER_LVALUE =
976 				yy_create_buffer( yyin, YY_BUF_SIZE );
977 		}
978 
979 		yy_load_buffer_state(  );
980 		}
981 
982 	{
983 #line 66 "syncrep_scanner.l"
984 
985 #line 986 "syncrep_scanner.c"
986 
987 	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
988 		{
989 		yy_cp = (yy_c_buf_p);
990 
991 		/* Support of yytext. */
992 		*yy_cp = (yy_hold_char);
993 
994 		/* yy_bp points to the position in yy_ch_buf of the start of
995 		 * the current run.
996 		 */
997 		yy_bp = yy_cp;
998 
999 		yy_current_state = (yy_start);
1000 yy_match:
1001 		do
1002 			{
1003 			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1004 			if ( yy_accept[yy_current_state] )
1005 				{
1006 				(yy_last_accepting_state) = yy_current_state;
1007 				(yy_last_accepting_cpos) = yy_cp;
1008 				}
1009 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1010 				{
1011 				yy_current_state = (int) yy_def[yy_current_state];
1012 				if ( yy_current_state >= 32 )
1013 					yy_c = yy_meta[yy_c];
1014 				}
1015 			yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1016 			++yy_cp;
1017 			}
1018 		while ( yy_current_state != 31 );
1019 		yy_cp = (yy_last_accepting_cpos);
1020 		yy_current_state = (yy_last_accepting_state);
1021 
1022 yy_find_action:
1023 		yy_act = yy_accept[yy_current_state];
1024 
1025 		YY_DO_BEFORE_ACTION;
1026 
1027 do_action:	/* This label is used only to access EOF actions. */
1028 
1029 		switch ( yy_act )
1030 	{ /* beginning of action switch */
1031 			case 0: /* must back up */
1032 			/* undo the effects of YY_DO_BEFORE_ACTION */
1033 			*yy_cp = (yy_hold_char);
1034 			yy_cp = (yy_last_accepting_cpos);
1035 			yy_current_state = (yy_last_accepting_state);
1036 			goto yy_find_action;
1037 
1038 case 1:
1039 /* rule 1 can match eol */
1040 YY_RULE_SETUP
1041 #line 67 "syncrep_scanner.l"
1042 { /* ignore */ }
1043 	YY_BREAK
1044 /* brute-force case insensitivity is safer than relying on flex -i */
1045 case 2:
1046 YY_RULE_SETUP
1047 #line 71 "syncrep_scanner.l"
1048 { return ANY; }
1049 	YY_BREAK
1050 case 3:
1051 YY_RULE_SETUP
1052 #line 72 "syncrep_scanner.l"
1053 { return FIRST; }
1054 	YY_BREAK
1055 case 4:
1056 YY_RULE_SETUP
1057 #line 74 "syncrep_scanner.l"
1058 {
1059 				initStringInfo(&xdbuf);
1060 				BEGIN(xd);
1061 		}
1062 	YY_BREAK
1063 case 5:
1064 YY_RULE_SETUP
1065 #line 78 "syncrep_scanner.l"
1066 {
1067 				appendStringInfoChar(&xdbuf, '"');
1068 		}
1069 	YY_BREAK
1070 case 6:
1071 /* rule 6 can match eol */
1072 YY_RULE_SETUP
1073 #line 81 "syncrep_scanner.l"
1074 {
1075 				appendStringInfoString(&xdbuf, yytext);
1076 		}
1077 	YY_BREAK
1078 case 7:
1079 YY_RULE_SETUP
1080 #line 84 "syncrep_scanner.l"
1081 {
1082 				yylval.str = xdbuf.data;
1083 				xdbuf.data = NULL;
1084 				BEGIN(INITIAL);
1085 				return NAME;
1086 		}
1087 	YY_BREAK
1088 case YY_STATE_EOF(xd):
1089 #line 90 "syncrep_scanner.l"
1090 {
1091 				yyerror("unterminated quoted identifier");
1092 				return JUNK;
1093 		}
1094 	YY_BREAK
1095 case 8:
1096 YY_RULE_SETUP
1097 #line 95 "syncrep_scanner.l"
1098 {
1099 				yylval.str = pstrdup(yytext);
1100 				return NAME;
1101 		}
1102 	YY_BREAK
1103 case 9:
1104 YY_RULE_SETUP
1105 #line 100 "syncrep_scanner.l"
1106 {
1107 				yylval.str = pstrdup(yytext);
1108 				return NUM;
1109 		}
1110 	YY_BREAK
1111 case 10:
1112 YY_RULE_SETUP
1113 #line 105 "syncrep_scanner.l"
1114 {
1115 				yylval.str = "*";
1116 				return NAME;
1117 		}
1118 	YY_BREAK
1119 case 11:
1120 YY_RULE_SETUP
1121 #line 110 "syncrep_scanner.l"
1122 { return ','; }
1123 	YY_BREAK
1124 case 12:
1125 YY_RULE_SETUP
1126 #line 111 "syncrep_scanner.l"
1127 { return '('; }
1128 	YY_BREAK
1129 case 13:
1130 YY_RULE_SETUP
1131 #line 112 "syncrep_scanner.l"
1132 { return ')'; }
1133 	YY_BREAK
1134 case 14:
1135 YY_RULE_SETUP
1136 #line 114 "syncrep_scanner.l"
1137 { return JUNK; }
1138 	YY_BREAK
1139 case 15:
1140 YY_RULE_SETUP
1141 #line 115 "syncrep_scanner.l"
1142 YY_FATAL_ERROR( "flex scanner jammed" );
1143 	YY_BREAK
1144 #line 1145 "syncrep_scanner.c"
1145 case YY_STATE_EOF(INITIAL):
1146 	yyterminate();
1147 
1148 	case YY_END_OF_BUFFER:
1149 		{
1150 		/* Amount of text matched not including the EOB char. */
1151 		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1152 
1153 		/* Undo the effects of YY_DO_BEFORE_ACTION. */
1154 		*yy_cp = (yy_hold_char);
1155 		YY_RESTORE_YY_MORE_OFFSET
1156 
1157 		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1158 			{
1159 			/* We're scanning a new file or input source.  It's
1160 			 * possible that this happened because the user
1161 			 * just pointed yyin at a new source and called
1162 			 * yylex().  If so, then we have to assure
1163 			 * consistency between YY_CURRENT_BUFFER and our
1164 			 * globals.  Here is the right place to do so, because
1165 			 * this is the first action (other than possibly a
1166 			 * back-up) that will match for the new input source.
1167 			 */
1168 			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1169 			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1170 			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1171 			}
1172 
1173 		/* Note that here we test for yy_c_buf_p "<=" to the position
1174 		 * of the first EOB in the buffer, since yy_c_buf_p will
1175 		 * already have been incremented past the NUL character
1176 		 * (since all states make transitions on EOB to the
1177 		 * end-of-buffer state).  Contrast this with the test
1178 		 * in input().
1179 		 */
1180 		if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1181 			{ /* This was really a NUL. */
1182 			yy_state_type yy_next_state;
1183 
1184 			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1185 
1186 			yy_current_state = yy_get_previous_state(  );
1187 
1188 			/* Okay, we're now positioned to make the NUL
1189 			 * transition.  We couldn't have
1190 			 * yy_get_previous_state() go ahead and do it
1191 			 * for us because it doesn't know how to deal
1192 			 * with the possibility of jamming (and we don't
1193 			 * want to build jamming into it because then it
1194 			 * will run more slowly).
1195 			 */
1196 
1197 			yy_next_state = yy_try_NUL_trans( yy_current_state );
1198 
1199 			yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1200 
1201 			if ( yy_next_state )
1202 				{
1203 				/* Consume the NUL. */
1204 				yy_cp = ++(yy_c_buf_p);
1205 				yy_current_state = yy_next_state;
1206 				goto yy_match;
1207 				}
1208 
1209 			else
1210 				{
1211 				yy_cp = (yy_last_accepting_cpos);
1212 				yy_current_state = (yy_last_accepting_state);
1213 				goto yy_find_action;
1214 				}
1215 			}
1216 
1217 		else switch ( yy_get_next_buffer(  ) )
1218 			{
1219 			case EOB_ACT_END_OF_FILE:
1220 				{
1221 				(yy_did_buffer_switch_on_eof) = 0;
1222 
1223 				if ( yywrap(  ) )
1224 					{
1225 					/* Note: because we've taken care in
1226 					 * yy_get_next_buffer() to have set up
1227 					 * yytext, we can now set up
1228 					 * yy_c_buf_p so that if some total
1229 					 * hoser (like flex itself) wants to
1230 					 * call the scanner after we return the
1231 					 * YY_NULL, it'll still work - another
1232 					 * YY_NULL will get returned.
1233 					 */
1234 					(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1235 
1236 					yy_act = YY_STATE_EOF(YY_START);
1237 					goto do_action;
1238 					}
1239 
1240 				else
1241 					{
1242 					if ( ! (yy_did_buffer_switch_on_eof) )
1243 						YY_NEW_FILE;
1244 					}
1245 				break;
1246 				}
1247 
1248 			case EOB_ACT_CONTINUE_SCAN:
1249 				(yy_c_buf_p) =
1250 					(yytext_ptr) + yy_amount_of_matched_text;
1251 
1252 				yy_current_state = yy_get_previous_state(  );
1253 
1254 				yy_cp = (yy_c_buf_p);
1255 				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1256 				goto yy_match;
1257 
1258 			case EOB_ACT_LAST_MATCH:
1259 				(yy_c_buf_p) =
1260 				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1261 
1262 				yy_current_state = yy_get_previous_state(  );
1263 
1264 				yy_cp = (yy_c_buf_p);
1265 				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1266 				goto yy_find_action;
1267 			}
1268 		break;
1269 		}
1270 
1271 	default:
1272 		YY_FATAL_ERROR(
1273 			"fatal flex scanner internal error--no action found" );
1274 	} /* end of action switch */
1275 		} /* end of scanning one token */
1276 	} /* end of user's declarations */
1277 } /* end of yylex */
1278 
1279 /* yy_get_next_buffer - try to read in a new buffer
1280  *
1281  * Returns a code representing an action:
1282  *	EOB_ACT_LAST_MATCH -
1283  *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1284  *	EOB_ACT_END_OF_FILE - end of file
1285  */
yy_get_next_buffer(void)1286 static int yy_get_next_buffer (void)
1287 {
1288     	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1289 	char *source = (yytext_ptr);
1290 	int number_to_move, i;
1291 	int ret_val;
1292 
1293 	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1294 		YY_FATAL_ERROR(
1295 		"fatal flex scanner internal error--end of buffer missed" );
1296 
1297 	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1298 		{ /* Don't try to fill the buffer, so this is an EOF. */
1299 		if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1300 			{
1301 			/* We matched a single character, the EOB, so
1302 			 * treat this as a final EOF.
1303 			 */
1304 			return EOB_ACT_END_OF_FILE;
1305 			}
1306 
1307 		else
1308 			{
1309 			/* We matched some text prior to the EOB, first
1310 			 * process it.
1311 			 */
1312 			return EOB_ACT_LAST_MATCH;
1313 			}
1314 		}
1315 
1316 	/* Try to read more data. */
1317 
1318 	/* First move last chars to start of buffer. */
1319 	number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
1320 
1321 	for ( i = 0; i < number_to_move; ++i )
1322 		*(dest++) = *(source++);
1323 
1324 	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1325 		/* don't do the read, it's not guaranteed to return an EOF,
1326 		 * just force an EOF
1327 		 */
1328 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1329 
1330 	else
1331 		{
1332 			int num_to_read =
1333 			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1334 
1335 		while ( num_to_read <= 0 )
1336 			{ /* Not enough room in the buffer - grow it. */
1337 
1338 			/* just a shorter name for the current buffer */
1339 			YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1340 
1341 			int yy_c_buf_p_offset =
1342 				(int) ((yy_c_buf_p) - b->yy_ch_buf);
1343 
1344 			if ( b->yy_is_our_buffer )
1345 				{
1346 				int new_size = b->yy_buf_size * 2;
1347 
1348 				if ( new_size <= 0 )
1349 					b->yy_buf_size += b->yy_buf_size / 8;
1350 				else
1351 					b->yy_buf_size *= 2;
1352 
1353 				b->yy_ch_buf = (char *)
1354 					/* Include room in for 2 EOB chars. */
1355 					yyrealloc( (void *) b->yy_ch_buf,
1356 							 (yy_size_t) (b->yy_buf_size + 2)  );
1357 				}
1358 			else
1359 				/* Can't grow it, we don't own it. */
1360 				b->yy_ch_buf = NULL;
1361 
1362 			if ( ! b->yy_ch_buf )
1363 				YY_FATAL_ERROR(
1364 				"fatal error - scanner input buffer overflow" );
1365 
1366 			(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1367 
1368 			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1369 						number_to_move - 1;
1370 
1371 			}
1372 
1373 		if ( num_to_read > YY_READ_BUF_SIZE )
1374 			num_to_read = YY_READ_BUF_SIZE;
1375 
1376 		/* Read in more data. */
1377 		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1378 			(yy_n_chars), num_to_read );
1379 
1380 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1381 		}
1382 
1383 	if ( (yy_n_chars) == 0 )
1384 		{
1385 		if ( number_to_move == YY_MORE_ADJ )
1386 			{
1387 			ret_val = EOB_ACT_END_OF_FILE;
1388 			yyrestart( yyin  );
1389 			}
1390 
1391 		else
1392 			{
1393 			ret_val = EOB_ACT_LAST_MATCH;
1394 			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1395 				YY_BUFFER_EOF_PENDING;
1396 			}
1397 		}
1398 
1399 	else
1400 		ret_val = EOB_ACT_CONTINUE_SCAN;
1401 
1402 	if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1403 		/* Extend the array by 50%, plus the number we really need. */
1404 		int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1405 		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1406 			(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size  );
1407 		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1408 			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1409 		/* "- 2" to take care of EOB's */
1410 		YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1411 	}
1412 
1413 	(yy_n_chars) += number_to_move;
1414 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1415 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1416 
1417 	(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1418 
1419 	return ret_val;
1420 }
1421 
1422 /* yy_get_previous_state - get the state just before the EOB char was reached */
1423 
yy_get_previous_state(void)1424     static yy_state_type yy_get_previous_state (void)
1425 {
1426 	yy_state_type yy_current_state;
1427 	char *yy_cp;
1428 
1429 	yy_current_state = (yy_start);
1430 
1431 	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1432 		{
1433 		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1434 		if ( yy_accept[yy_current_state] )
1435 			{
1436 			(yy_last_accepting_state) = yy_current_state;
1437 			(yy_last_accepting_cpos) = yy_cp;
1438 			}
1439 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1440 			{
1441 			yy_current_state = (int) yy_def[yy_current_state];
1442 			if ( yy_current_state >= 32 )
1443 				yy_c = yy_meta[yy_c];
1444 			}
1445 		yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1446 		}
1447 
1448 	return yy_current_state;
1449 }
1450 
1451 /* yy_try_NUL_trans - try to make a transition on the NUL character
1452  *
1453  * synopsis
1454  *	next_state = yy_try_NUL_trans( current_state );
1455  */
yy_try_NUL_trans(yy_state_type yy_current_state)1456     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
1457 {
1458 	int yy_is_jam;
1459     	char *yy_cp = (yy_c_buf_p);
1460 
1461 	YY_CHAR yy_c = 1;
1462 	if ( yy_accept[yy_current_state] )
1463 		{
1464 		(yy_last_accepting_state) = yy_current_state;
1465 		(yy_last_accepting_cpos) = yy_cp;
1466 		}
1467 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1468 		{
1469 		yy_current_state = (int) yy_def[yy_current_state];
1470 		if ( yy_current_state >= 32 )
1471 			yy_c = yy_meta[yy_c];
1472 		}
1473 	yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1474 	yy_is_jam = (yy_current_state == 31);
1475 
1476 		return yy_is_jam ? 0 : yy_current_state;
1477 }
1478 
1479 #ifndef YY_NO_UNPUT
1480 
1481 #endif
1482 
1483 #ifndef YY_NO_INPUT
1484 #ifdef __cplusplus
yyinput(void)1485     static int yyinput (void)
1486 #else
1487     static int input  (void)
1488 #endif
1489 
1490 {
1491 	int c;
1492 
1493 	*(yy_c_buf_p) = (yy_hold_char);
1494 
1495 	if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1496 		{
1497 		/* yy_c_buf_p now points to the character we want to return.
1498 		 * If this occurs *before* the EOB characters, then it's a
1499 		 * valid NUL; if not, then we've hit the end of the buffer.
1500 		 */
1501 		if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1502 			/* This was really a NUL. */
1503 			*(yy_c_buf_p) = '\0';
1504 
1505 		else
1506 			{ /* need more input */
1507 			int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
1508 			++(yy_c_buf_p);
1509 
1510 			switch ( yy_get_next_buffer(  ) )
1511 				{
1512 				case EOB_ACT_LAST_MATCH:
1513 					/* This happens because yy_g_n_b()
1514 					 * sees that we've accumulated a
1515 					 * token and flags that we need to
1516 					 * try matching the token before
1517 					 * proceeding.  But for input(),
1518 					 * there's no matching to consider.
1519 					 * So convert the EOB_ACT_LAST_MATCH
1520 					 * to EOB_ACT_END_OF_FILE.
1521 					 */
1522 
1523 					/* Reset buffer status. */
1524 					yyrestart( yyin );
1525 
1526 					/*FALLTHROUGH*/
1527 
1528 				case EOB_ACT_END_OF_FILE:
1529 					{
1530 					if ( yywrap(  ) )
1531 						return 0;
1532 
1533 					if ( ! (yy_did_buffer_switch_on_eof) )
1534 						YY_NEW_FILE;
1535 #ifdef __cplusplus
1536 					return yyinput();
1537 #else
1538 					return input();
1539 #endif
1540 					}
1541 
1542 				case EOB_ACT_CONTINUE_SCAN:
1543 					(yy_c_buf_p) = (yytext_ptr) + offset;
1544 					break;
1545 				}
1546 			}
1547 		}
1548 
1549 	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
1550 	*(yy_c_buf_p) = '\0';	/* preserve yytext */
1551 	(yy_hold_char) = *++(yy_c_buf_p);
1552 
1553 	return c;
1554 }
1555 #endif	/* ifndef YY_NO_INPUT */
1556 
1557 /** Immediately switch to a different input stream.
1558  * @param input_file A readable stream.
1559  *
1560  * @note This function does not reset the start condition to @c INITIAL .
1561  */
yyrestart(FILE * input_file)1562     void yyrestart  (FILE * input_file )
1563 {
1564 
1565 	if ( ! YY_CURRENT_BUFFER ){
1566         yyensure_buffer_stack ();
1567 		YY_CURRENT_BUFFER_LVALUE =
1568             yy_create_buffer( yyin, YY_BUF_SIZE );
1569 	}
1570 
1571 	yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1572 	yy_load_buffer_state(  );
1573 }
1574 
1575 /** Switch to a different input buffer.
1576  * @param new_buffer The new input buffer.
1577  *
1578  */
yy_switch_to_buffer(YY_BUFFER_STATE new_buffer)1579     void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
1580 {
1581 
1582 	/* TODO. We should be able to replace this entire function body
1583 	 * with
1584 	 *		yypop_buffer_state();
1585 	 *		yypush_buffer_state(new_buffer);
1586      */
1587 	yyensure_buffer_stack ();
1588 	if ( YY_CURRENT_BUFFER == new_buffer )
1589 		return;
1590 
1591 	if ( YY_CURRENT_BUFFER )
1592 		{
1593 		/* Flush out information for old buffer. */
1594 		*(yy_c_buf_p) = (yy_hold_char);
1595 		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1596 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1597 		}
1598 
1599 	YY_CURRENT_BUFFER_LVALUE = new_buffer;
1600 	yy_load_buffer_state(  );
1601 
1602 	/* We don't actually know whether we did this switch during
1603 	 * EOF (yywrap()) processing, but the only time this flag
1604 	 * is looked at is after yywrap() is called, so it's safe
1605 	 * to go ahead and always set it.
1606 	 */
1607 	(yy_did_buffer_switch_on_eof) = 1;
1608 }
1609 
yy_load_buffer_state(void)1610 static void yy_load_buffer_state  (void)
1611 {
1612     	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1613 	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1614 	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1615 	(yy_hold_char) = *(yy_c_buf_p);
1616 }
1617 
1618 /** Allocate and initialize an input buffer state.
1619  * @param file A readable stream.
1620  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1621  *
1622  * @return the allocated buffer state.
1623  */
yy_create_buffer(FILE * file,int size)1624     YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
1625 {
1626 	YY_BUFFER_STATE b;
1627 
1628 	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state )  );
1629 	if ( ! b )
1630 		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1631 
1632 	b->yy_buf_size = size;
1633 
1634 	/* yy_ch_buf has to be 2 characters longer than the size given because
1635 	 * we need to put in 2 end-of-buffer characters.
1636 	 */
1637 	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2)  );
1638 	if ( ! b->yy_ch_buf )
1639 		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1640 
1641 	b->yy_is_our_buffer = 1;
1642 
1643 	yy_init_buffer( b, file );
1644 
1645 	return b;
1646 }
1647 
1648 /** Destroy the buffer.
1649  * @param b a buffer created with yy_create_buffer()
1650  *
1651  */
yy_delete_buffer(YY_BUFFER_STATE b)1652     void yy_delete_buffer (YY_BUFFER_STATE  b )
1653 {
1654 
1655 	if ( ! b )
1656 		return;
1657 
1658 	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1659 		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1660 
1661 	if ( b->yy_is_our_buffer )
1662 		yyfree( (void *) b->yy_ch_buf  );
1663 
1664 	yyfree( (void *) b  );
1665 }
1666 
1667 /* Initializes or reinitializes a buffer.
1668  * This function is sometimes called more than once on the same buffer,
1669  * such as during a yyrestart() or at EOF.
1670  */
yy_init_buffer(YY_BUFFER_STATE b,FILE * file)1671     static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
1672 
1673 {
1674 	int oerrno = errno;
1675 
1676 	yy_flush_buffer( b );
1677 
1678 	b->yy_input_file = file;
1679 	b->yy_fill_buffer = 1;
1680 
1681     /* If b is the current buffer, then yy_init_buffer was _probably_
1682      * called from yyrestart() or through yy_get_next_buffer.
1683      * In that case, we don't want to reset the lineno or column.
1684      */
1685     if (b != YY_CURRENT_BUFFER){
1686         b->yy_bs_lineno = 1;
1687         b->yy_bs_column = 0;
1688     }
1689 
1690         b->yy_is_interactive = 0;
1691 
1692 	errno = oerrno;
1693 }
1694 
1695 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1696  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1697  *
1698  */
yy_flush_buffer(YY_BUFFER_STATE b)1699     void yy_flush_buffer (YY_BUFFER_STATE  b )
1700 {
1701     	if ( ! b )
1702 		return;
1703 
1704 	b->yy_n_chars = 0;
1705 
1706 	/* We always need two end-of-buffer characters.  The first causes
1707 	 * a transition to the end-of-buffer state.  The second causes
1708 	 * a jam in that state.
1709 	 */
1710 	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1711 	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1712 
1713 	b->yy_buf_pos = &b->yy_ch_buf[0];
1714 
1715 	b->yy_at_bol = 1;
1716 	b->yy_buffer_status = YY_BUFFER_NEW;
1717 
1718 	if ( b == YY_CURRENT_BUFFER )
1719 		yy_load_buffer_state(  );
1720 }
1721 
1722 /** Pushes the new state onto the stack. The new state becomes
1723  *  the current state. This function will allocate the stack
1724  *  if necessary.
1725  *  @param new_buffer The new state.
1726  *
1727  */
yypush_buffer_state(YY_BUFFER_STATE new_buffer)1728 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1729 {
1730     	if (new_buffer == NULL)
1731 		return;
1732 
1733 	yyensure_buffer_stack();
1734 
1735 	/* This block is copied from yy_switch_to_buffer. */
1736 	if ( YY_CURRENT_BUFFER )
1737 		{
1738 		/* Flush out information for old buffer. */
1739 		*(yy_c_buf_p) = (yy_hold_char);
1740 		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1741 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1742 		}
1743 
1744 	/* Only push if top exists. Otherwise, replace top. */
1745 	if (YY_CURRENT_BUFFER)
1746 		(yy_buffer_stack_top)++;
1747 	YY_CURRENT_BUFFER_LVALUE = new_buffer;
1748 
1749 	/* copied from yy_switch_to_buffer. */
1750 	yy_load_buffer_state(  );
1751 	(yy_did_buffer_switch_on_eof) = 1;
1752 }
1753 
1754 /** Removes and deletes the top of the stack, if present.
1755  *  The next element becomes the new top.
1756  *
1757  */
yypop_buffer_state(void)1758 void yypop_buffer_state (void)
1759 {
1760     	if (!YY_CURRENT_BUFFER)
1761 		return;
1762 
1763 	yy_delete_buffer(YY_CURRENT_BUFFER );
1764 	YY_CURRENT_BUFFER_LVALUE = NULL;
1765 	if ((yy_buffer_stack_top) > 0)
1766 		--(yy_buffer_stack_top);
1767 
1768 	if (YY_CURRENT_BUFFER) {
1769 		yy_load_buffer_state(  );
1770 		(yy_did_buffer_switch_on_eof) = 1;
1771 	}
1772 }
1773 
1774 /* Allocates the stack if it does not exist.
1775  *  Guarantees space for at least one push.
1776  */
yyensure_buffer_stack(void)1777 static void yyensure_buffer_stack (void)
1778 {
1779 	yy_size_t num_to_alloc;
1780 
1781 	if (!(yy_buffer_stack)) {
1782 
1783 		/* First allocation is just for 2 elements, since we don't know if this
1784 		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1785 		 * immediate realloc on the next call.
1786          */
1787       num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
1788 		(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1789 								(num_to_alloc * sizeof(struct yy_buffer_state*)
1790 								);
1791 		if ( ! (yy_buffer_stack) )
1792 			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1793 
1794 		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1795 
1796 		(yy_buffer_stack_max) = num_to_alloc;
1797 		(yy_buffer_stack_top) = 0;
1798 		return;
1799 	}
1800 
1801 	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1802 
1803 		/* Increase the buffer to prepare for a possible push. */
1804 		yy_size_t grow_size = 8 /* arbitrary grow size */;
1805 
1806 		num_to_alloc = (yy_buffer_stack_max) + grow_size;
1807 		(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1808 								((yy_buffer_stack),
1809 								num_to_alloc * sizeof(struct yy_buffer_state*)
1810 								);
1811 		if ( ! (yy_buffer_stack) )
1812 			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1813 
1814 		/* zero only the new slots.*/
1815 		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1816 		(yy_buffer_stack_max) = num_to_alloc;
1817 	}
1818 }
1819 
1820 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1821  * @param base the character buffer
1822  * @param size the size in bytes of the character buffer
1823  *
1824  * @return the newly allocated buffer state object.
1825  */
yy_scan_buffer(char * base,yy_size_t size)1826 YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
1827 {
1828 	YY_BUFFER_STATE b;
1829 
1830 	if ( size < 2 ||
1831 	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
1832 	     base[size-1] != YY_END_OF_BUFFER_CHAR )
1833 		/* They forgot to leave room for the EOB's. */
1834 		return NULL;
1835 
1836 	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state )  );
1837 	if ( ! b )
1838 		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1839 
1840 	b->yy_buf_size = (int) (size - 2);	/* "- 2" to take care of EOB's */
1841 	b->yy_buf_pos = b->yy_ch_buf = base;
1842 	b->yy_is_our_buffer = 0;
1843 	b->yy_input_file = NULL;
1844 	b->yy_n_chars = b->yy_buf_size;
1845 	b->yy_is_interactive = 0;
1846 	b->yy_at_bol = 1;
1847 	b->yy_fill_buffer = 0;
1848 	b->yy_buffer_status = YY_BUFFER_NEW;
1849 
1850 	yy_switch_to_buffer( b  );
1851 
1852 	return b;
1853 }
1854 
1855 /** Setup the input buffer state to scan a string. The next call to yylex() will
1856  * scan from a @e copy of @a str.
1857  * @param yystr a NUL-terminated string to scan
1858  *
1859  * @return the newly allocated buffer state object.
1860  * @note If you want to scan bytes that may contain NUL values, then use
1861  *       yy_scan_bytes() instead.
1862  */
yy_scan_string(const char * yystr)1863 YY_BUFFER_STATE yy_scan_string (const char * yystr )
1864 {
1865 
1866 	return yy_scan_bytes( yystr, (int) strlen(yystr) );
1867 }
1868 
1869 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1870  * scan from a @e copy of @a bytes.
1871  * @param yybytes the byte buffer to scan
1872  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1873  *
1874  * @return the newly allocated buffer state object.
1875  */
yy_scan_bytes(const char * yybytes,int _yybytes_len)1876 YY_BUFFER_STATE yy_scan_bytes  (const char * yybytes, int  _yybytes_len )
1877 {
1878 	YY_BUFFER_STATE b;
1879 	char *buf;
1880 	yy_size_t n;
1881 	int i;
1882 
1883 	/* Get memory for full buffer, including space for trailing EOB's. */
1884 	n = (yy_size_t) (_yybytes_len + 2);
1885 	buf = (char *) yyalloc( n  );
1886 	if ( ! buf )
1887 		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1888 
1889 	for ( i = 0; i < _yybytes_len; ++i )
1890 		buf[i] = yybytes[i];
1891 
1892 	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1893 
1894 	b = yy_scan_buffer( buf, n );
1895 	if ( ! b )
1896 		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1897 
1898 	/* It's okay to grow etc. this buffer, and we should throw it
1899 	 * away when we're done.
1900 	 */
1901 	b->yy_is_our_buffer = 1;
1902 
1903 	return b;
1904 }
1905 
1906 #ifndef YY_EXIT_FAILURE
1907 #define YY_EXIT_FAILURE 2
1908 #endif
1909 
yy_fatal_error(const char * msg)1910 static void yynoreturn yy_fatal_error (const char* msg )
1911 {
1912 			fprintf( stderr, "%s\n", msg );
1913 	exit( YY_EXIT_FAILURE );
1914 }
1915 
1916 /* Redefine yyless() so it works in section 3 code. */
1917 
1918 #undef yyless
1919 #define yyless(n) \
1920 	do \
1921 		{ \
1922 		/* Undo effects of setting up yytext. */ \
1923         int yyless_macro_arg = (n); \
1924         YY_LESS_LINENO(yyless_macro_arg);\
1925 		yytext[yyleng] = (yy_hold_char); \
1926 		(yy_c_buf_p) = yytext + yyless_macro_arg; \
1927 		(yy_hold_char) = *(yy_c_buf_p); \
1928 		*(yy_c_buf_p) = '\0'; \
1929 		yyleng = yyless_macro_arg; \
1930 		} \
1931 	while ( 0 )
1932 
1933 /* Accessor  methods (get/set functions) to struct members. */
1934 
1935 /** Get the current line number.
1936  *
1937  */
yyget_lineno(void)1938 int yyget_lineno  (void)
1939 {
1940 
1941     return yylineno;
1942 }
1943 
1944 /** Get the input stream.
1945  *
1946  */
yyget_in(void)1947 FILE *yyget_in  (void)
1948 {
1949         return yyin;
1950 }
1951 
1952 /** Get the output stream.
1953  *
1954  */
yyget_out(void)1955 FILE *yyget_out  (void)
1956 {
1957         return yyout;
1958 }
1959 
1960 /** Get the length of the current token.
1961  *
1962  */
yyget_leng(void)1963 int yyget_leng  (void)
1964 {
1965         return yyleng;
1966 }
1967 
1968 /** Get the current token.
1969  *
1970  */
1971 
yyget_text(void)1972 char *yyget_text  (void)
1973 {
1974         return yytext;
1975 }
1976 
1977 /** Set the current line number.
1978  * @param _line_number line number
1979  *
1980  */
yyset_lineno(int _line_number)1981 void yyset_lineno (int  _line_number )
1982 {
1983 
1984     yylineno = _line_number;
1985 }
1986 
1987 /** Set the input stream. This does not discard the current
1988  * input buffer.
1989  * @param _in_str A readable stream.
1990  *
1991  * @see yy_switch_to_buffer
1992  */
yyset_in(FILE * _in_str)1993 void yyset_in (FILE *  _in_str )
1994 {
1995         yyin = _in_str ;
1996 }
1997 
yyset_out(FILE * _out_str)1998 void yyset_out (FILE *  _out_str )
1999 {
2000         yyout = _out_str ;
2001 }
2002 
yyget_debug(void)2003 int yyget_debug  (void)
2004 {
2005         return yy_flex_debug;
2006 }
2007 
yyset_debug(int _bdebug)2008 void yyset_debug (int  _bdebug )
2009 {
2010         yy_flex_debug = _bdebug ;
2011 }
2012 
yy_init_globals(void)2013 static int yy_init_globals (void)
2014 {
2015         /* Initialization is the same as for the non-reentrant scanner.
2016      * This function is called from yylex_destroy(), so don't allocate here.
2017      */
2018 
2019     (yy_buffer_stack) = NULL;
2020     (yy_buffer_stack_top) = 0;
2021     (yy_buffer_stack_max) = 0;
2022     (yy_c_buf_p) = NULL;
2023     (yy_init) = 0;
2024     (yy_start) = 0;
2025 
2026 /* Defined in main.c */
2027 #ifdef YY_STDINIT
2028     yyin = stdin;
2029     yyout = stdout;
2030 #else
2031     yyin = NULL;
2032     yyout = NULL;
2033 #endif
2034 
2035     /* For future reference: Set errno on error, since we are called by
2036      * yylex_init()
2037      */
2038     return 0;
2039 }
2040 
2041 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
yylex_destroy(void)2042 int yylex_destroy  (void)
2043 {
2044 
2045     /* Pop the buffer stack, destroying each element. */
2046 	while(YY_CURRENT_BUFFER){
2047 		yy_delete_buffer( YY_CURRENT_BUFFER  );
2048 		YY_CURRENT_BUFFER_LVALUE = NULL;
2049 		yypop_buffer_state();
2050 	}
2051 
2052 	/* Destroy the stack itself. */
2053 	yyfree((yy_buffer_stack) );
2054 	(yy_buffer_stack) = NULL;
2055 
2056     /* Reset the globals. This is important in a non-reentrant scanner so the next time
2057      * yylex() is called, initialization will occur. */
2058     yy_init_globals( );
2059 
2060     return 0;
2061 }
2062 
2063 /*
2064  * Internal utility routines.
2065  */
2066 
2067 #ifndef yytext_ptr
yy_flex_strncpy(char * s1,const char * s2,int n)2068 static void yy_flex_strncpy (char* s1, const char * s2, int n )
2069 {
2070 
2071 	int i;
2072 	for ( i = 0; i < n; ++i )
2073 		s1[i] = s2[i];
2074 }
2075 #endif
2076 
2077 #ifdef YY_NEED_STRLEN
yy_flex_strlen(const char * s)2078 static int yy_flex_strlen (const char * s )
2079 {
2080 	int n;
2081 	for ( n = 0; s[n]; ++n )
2082 		;
2083 
2084 	return n;
2085 }
2086 #endif
2087 
yyalloc(yy_size_t size)2088 void *yyalloc (yy_size_t  size )
2089 {
2090 			return malloc(size);
2091 }
2092 
yyrealloc(void * ptr,yy_size_t size)2093 void *yyrealloc  (void * ptr, yy_size_t  size )
2094 {
2095 
2096 	/* The cast to (char *) in the following accommodates both
2097 	 * implementations that use char* generic pointers, and those
2098 	 * that use void* generic pointers.  It works with the latter
2099 	 * because both ANSI C and C++ allow castless assignment from
2100 	 * any pointer type to void*, and deal with argument conversions
2101 	 * as though doing an assignment.
2102 	 */
2103 	return realloc(ptr, size);
2104 }
2105 
yyfree(void * ptr)2106 void yyfree (void * ptr )
2107 {
2108 			free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
2109 }
2110 
2111 #define YYTABLES_NAME "yytables"
2112 
2113 #line 115 "syncrep_scanner.l"
2114 
2115 
2116 /* LCOV_EXCL_STOP */
2117 
2118 /* Needs to be here for access to yytext */
2119 void
syncrep_yyerror(const char * message)2120 syncrep_yyerror(const char *message)
2121 {
2122 	/* report only the first error in a parse operation */
2123 	if (syncrep_parse_error_msg)
2124 		return;
2125 	if (yytext[0])
2126 		syncrep_parse_error_msg = psprintf("%s at or near \"%s\"",
2127 										   message, yytext);
2128 	else
2129 		syncrep_parse_error_msg = psprintf("%s at end of input",
2130 										   message);
2131 }
2132 
2133 void
syncrep_scanner_init(const char * str)2134 syncrep_scanner_init(const char *str)
2135 {
2136 	Size		slen = strlen(str);
2137 	char	   *scanbuf;
2138 
2139 	/*
2140 	 * Might be left over after ereport()
2141 	 */
2142 	if (YY_CURRENT_BUFFER)
2143 		yy_delete_buffer(YY_CURRENT_BUFFER);
2144 
2145 	/*
2146 	 * Make a scan buffer with special termination needed by flex.
2147 	 */
2148 	scanbuf = (char *) palloc(slen + 2);
2149 	memcpy(scanbuf, str, slen);
2150 	scanbuf[slen] = scanbuf[slen + 1] = YY_END_OF_BUFFER_CHAR;
2151 	scanbufhandle = yy_scan_buffer(scanbuf, slen + 2);
2152 
2153 	/* Make sure we start in proper state */
2154 	BEGIN(INITIAL);
2155 }
2156 
2157 void
syncrep_scanner_finish(void)2158 syncrep_scanner_finish(void)
2159 {
2160 	yy_delete_buffer(scanbufhandle);
2161 	scanbufhandle = NULL;
2162 }
2163 
2164