LCOV - code coverage report
Current view: top level - src/backend/replication - syncrep_scanner.c (source / functions) Hit Total Coverage
Test: PostgreSQL Lines: 0 351 0.0 %
Date: 2017-09-29 15:12:54 Functions: 0 33 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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_flex_debug syncrep_yy_flex_debug
      12             : #define yy_init_buffer syncrep_yy_init_buffer
      13             : #define yy_flush_buffer syncrep_yy_flush_buffer
      14             : #define yy_load_buffer_state syncrep_yy_load_buffer_state
      15             : #define yy_switch_to_buffer syncrep_yy_switch_to_buffer
      16             : #define yyin syncrep_yyin
      17             : #define yyleng syncrep_yyleng
      18             : #define yylex syncrep_yylex
      19             : #define yylineno syncrep_yylineno
      20             : #define yyout syncrep_yyout
      21             : #define yyrestart syncrep_yyrestart
      22             : #define yytext syncrep_yytext
      23             : #define yywrap syncrep_yywrap
      24             : #define yyalloc syncrep_yyalloc
      25             : #define yyrealloc syncrep_yyrealloc
      26             : #define yyfree syncrep_yyfree
      27             : 
      28             : #define FLEX_SCANNER
      29             : #define YY_FLEX_MAJOR_VERSION 2
      30             : #define YY_FLEX_MINOR_VERSION 5
      31             : #define YY_FLEX_SUBMINOR_VERSION 39
      32             : #if YY_FLEX_SUBMINOR_VERSION > 0
      33             : #define FLEX_BETA
      34             : #endif
      35             : 
      36             : /* First, we deal with  platform-specific or compiler-specific issues. */
      37             : 
      38             : /* begin standard C headers. */
      39             : #include <stdio.h>
      40             : #include <string.h>
      41             : #include <errno.h>
      42             : #include <stdlib.h>
      43             : 
      44             : /* end standard C headers. */
      45             : 
      46             : /* flex integer type definitions */
      47             : 
      48             : #ifndef FLEXINT_H
      49             : #define FLEXINT_H
      50             : 
      51             : /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
      52             : 
      53             : #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
      54             : 
      55             : /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
      56             :  * if you want the limit (max/min) macros for int types. 
      57             :  */
      58             : #ifndef __STDC_LIMIT_MACROS
      59             : #define __STDC_LIMIT_MACROS 1
      60             : #endif
      61             : 
      62             : #include <inttypes.h>
      63             : typedef int8_t flex_int8_t;
      64             : typedef uint8_t flex_uint8_t;
      65             : typedef int16_t flex_int16_t;
      66             : typedef uint16_t flex_uint16_t;
      67             : typedef int32_t flex_int32_t;
      68             : typedef uint32_t flex_uint32_t;
      69             : #else
      70             : typedef signed char flex_int8_t;
      71             : typedef short int flex_int16_t;
      72             : typedef int flex_int32_t;
      73             : typedef unsigned char flex_uint8_t; 
      74             : typedef unsigned short int flex_uint16_t;
      75             : typedef unsigned int flex_uint32_t;
      76             : 
      77             : /* Limits of integral types. */
      78             : #ifndef INT8_MIN
      79             : #define INT8_MIN               (-128)
      80             : #endif
      81             : #ifndef INT16_MIN
      82             : #define INT16_MIN              (-32767-1)
      83             : #endif
      84             : #ifndef INT32_MIN
      85             : #define INT32_MIN              (-2147483647-1)
      86             : #endif
      87             : #ifndef INT8_MAX
      88             : #define INT8_MAX               (127)
      89             : #endif
      90             : #ifndef INT16_MAX
      91             : #define INT16_MAX              (32767)
      92             : #endif
      93             : #ifndef INT32_MAX
      94             : #define INT32_MAX              (2147483647)
      95             : #endif
      96             : #ifndef UINT8_MAX
      97             : #define UINT8_MAX              (255U)
      98             : #endif
      99             : #ifndef UINT16_MAX
     100             : #define UINT16_MAX             (65535U)
     101             : #endif
     102             : #ifndef UINT32_MAX
     103             : #define UINT32_MAX             (4294967295U)
     104             : #endif
     105             : 
     106             : #endif /* ! C99 */
     107             : 
     108             : #endif /* ! FLEXINT_H */
     109             : 
     110             : #ifdef __cplusplus
     111             : 
     112             : /* The "const" storage-class-modifier is valid. */
     113             : #define YY_USE_CONST
     114             : 
     115             : #else   /* ! __cplusplus */
     116             : 
     117             : /* C99 requires __STDC__ to be defined as 1. */
     118             : #if defined (__STDC__)
     119             : 
     120             : #define YY_USE_CONST
     121             : 
     122             : #endif  /* defined (__STDC__) */
     123             : #endif  /* ! __cplusplus */
     124             : 
     125             : #ifdef YY_USE_CONST
     126             : #define yyconst const
     127             : #else
     128             : #define yyconst
     129             : #endif
     130             : 
     131             : /* Returned upon end-of-file. */
     132             : #define YY_NULL 0
     133             : 
     134             : /* Promotes a possibly negative, possibly signed char to an unsigned
     135             :  * integer for use as an array index.  If the signed char is negative,
     136             :  * we want to instead treat it as an 8-bit unsigned char, hence the
     137             :  * double cast.
     138             :  */
     139             : #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
     140             : 
     141             : /* Enter a start condition.  This macro really ought to take a parameter,
     142             :  * but we do it the disgusting crufty way forced on us by the ()-less
     143             :  * definition of BEGIN.
     144             :  */
     145             : #define BEGIN (yy_start) = 1 + 2 *
     146             : 
     147             : /* Translate the current start state into a value that can be later handed
     148             :  * to BEGIN to return to the state.  The YYSTATE alias is for lex
     149             :  * compatibility.
     150             :  */
     151             : #define YY_START (((yy_start) - 1) / 2)
     152             : #define YYSTATE YY_START
     153             : 
     154             : /* Action number for EOF rule of a given start state. */
     155             : #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
     156             : 
     157             : /* Special action meaning "start processing a new file". */
     158             : #define YY_NEW_FILE syncrep_yyrestart(syncrep_yyin  )
     159             : 
     160             : #define YY_END_OF_BUFFER_CHAR 0
     161             : 
     162             : /* Size of default input buffer. */
     163             : #ifndef YY_BUF_SIZE
     164             : #ifdef __ia64__
     165             : /* On IA-64, the buffer size is 16k, not 8k.
     166             :  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
     167             :  * Ditto for the __ia64__ case accordingly.
     168             :  */
     169             : #define YY_BUF_SIZE 32768
     170             : #else
     171             : #define YY_BUF_SIZE 16384
     172             : #endif /* __ia64__ */
     173             : #endif
     174             : 
     175             : /* The state buf must be large enough to hold one state per character in the main buffer.
     176             :  */
     177             : #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
     178             : 
     179             : #ifndef YY_TYPEDEF_YY_BUFFER_STATE
     180             : #define YY_TYPEDEF_YY_BUFFER_STATE
     181             : typedef struct yy_buffer_state *YY_BUFFER_STATE;
     182             : #endif
     183             : 
     184             : #ifndef YY_TYPEDEF_YY_SIZE_T
     185             : #define YY_TYPEDEF_YY_SIZE_T
     186             : typedef size_t yy_size_t;
     187             : #endif
     188             : 
     189             : extern yy_size_t syncrep_yyleng;
     190             : 
     191             : extern FILE *syncrep_yyin, *syncrep_yyout;
     192             : 
     193             : #define EOB_ACT_CONTINUE_SCAN 0
     194             : #define EOB_ACT_END_OF_FILE 1
     195             : #define EOB_ACT_LAST_MATCH 2
     196             : 
     197             :     #define YY_LESS_LINENO(n)
     198             :     #define YY_LINENO_REWIND_TO(ptr)
     199             :     
     200             : /* Return all but the first "n" matched characters back to the input stream. */
     201             : #define yyless(n) \
     202             :     do \
     203             :         { \
     204             :         /* Undo effects of setting up syncrep_yytext. */ \
     205             :         int yyless_macro_arg = (n); \
     206             :         YY_LESS_LINENO(yyless_macro_arg);\
     207             :         *yy_cp = (yy_hold_char); \
     208             :         YY_RESTORE_YY_MORE_OFFSET \
     209             :         (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
     210             :         YY_DO_BEFORE_ACTION; /* set up syncrep_yytext again */ \
     211             :         } \
     212             :     while ( 0 )
     213             : 
     214             : #define unput(c) yyunput( c, (yytext_ptr)  )
     215             : 
     216             : #ifndef YY_STRUCT_YY_BUFFER_STATE
     217             : #define YY_STRUCT_YY_BUFFER_STATE
     218             : struct yy_buffer_state
     219             :     {
     220             :     FILE *yy_input_file;
     221             : 
     222             :     char *yy_ch_buf;        /* input buffer */
     223             :     char *yy_buf_pos;       /* current position in input buffer */
     224             : 
     225             :     /* Size of input buffer in bytes, not including room for EOB
     226             :      * characters.
     227             :      */
     228             :     yy_size_t yy_buf_size;
     229             : 
     230             :     /* Number of characters read into yy_ch_buf, not including EOB
     231             :      * characters.
     232             :      */
     233             :     yy_size_t yy_n_chars;
     234             : 
     235             :     /* Whether we "own" the buffer - i.e., we know we created it,
     236             :      * and can realloc() it to grow it, and should free() it to
     237             :      * delete it.
     238             :      */
     239             :     int yy_is_our_buffer;
     240             : 
     241             :     /* Whether this is an "interactive" input source; if so, and
     242             :      * if we're using stdio for input, then we want to use getc()
     243             :      * instead of fread(), to make sure we stop fetching input after
     244             :      * each newline.
     245             :      */
     246             :     int yy_is_interactive;
     247             : 
     248             :     /* Whether we're considered to be at the beginning of a line.
     249             :      * If so, '^' rules will be active on the next match, otherwise
     250             :      * not.
     251             :      */
     252             :     int yy_at_bol;
     253             : 
     254             :     int yy_bs_lineno; /**< The line count. */
     255             :     int yy_bs_column; /**< The column count. */
     256             :     
     257             :     /* Whether to try to fill the input buffer when we reach the
     258             :      * end of it.
     259             :      */
     260             :     int yy_fill_buffer;
     261             : 
     262             :     int yy_buffer_status;
     263             : 
     264             : #define YY_BUFFER_NEW 0
     265             : #define YY_BUFFER_NORMAL 1
     266             :     /* When an EOF's been seen but there's still some text to process
     267             :      * then we mark the buffer as YY_EOF_PENDING, to indicate that we
     268             :      * shouldn't try reading from the input source any more.  We might
     269             :      * still have a bunch of tokens to match, though, because of
     270             :      * possible backing-up.
     271             :      *
     272             :      * When we actually see the EOF, we change the status to "new"
     273             :      * (via syncrep_yyrestart()), so that the user can continue scanning by
     274             :      * just pointing syncrep_yyin at a new input file.
     275             :      */
     276             : #define YY_BUFFER_EOF_PENDING 2
     277             : 
     278             :     };
     279             : #endif /* !YY_STRUCT_YY_BUFFER_STATE */
     280             : 
     281             : /* Stack of input buffers. */
     282             : static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
     283             : static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
     284             : static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
     285             : 
     286             : /* We provide macros for accessing buffer states in case in the
     287             :  * future we want to put the buffer states in a more general
     288             :  * "scanner state".
     289             :  *
     290             :  * Returns the top of the stack, or NULL.
     291             :  */
     292             : #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
     293             :                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
     294             :                           : NULL)
     295             : 
     296             : /* Same as previous macro, but useful when we know that the buffer stack is not
     297             :  * NULL or when we need an lvalue. For internal use only.
     298             :  */
     299             : #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
     300             : 
     301             : /* yy_hold_char holds the character lost when syncrep_yytext is formed. */
     302             : static char yy_hold_char;
     303             : static yy_size_t yy_n_chars;        /* number of characters read into yy_ch_buf */
     304             : yy_size_t syncrep_yyleng;
     305             : 
     306             : /* Points to current character in buffer. */
     307             : static char *yy_c_buf_p = (char *) 0;
     308             : static int yy_init = 0;     /* whether we need to initialize */
     309             : static int yy_start = 0;    /* start state number */
     310             : 
     311             : /* Flag which is used to allow syncrep_yywrap()'s to do buffer switches
     312             :  * instead of setting up a fresh syncrep_yyin.  A bit of a hack ...
     313             :  */
     314             : static int yy_did_buffer_switch_on_eof;
     315             : 
     316             : void syncrep_yyrestart (FILE *input_file  );
     317             : void syncrep_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
     318             : YY_BUFFER_STATE syncrep_yy_create_buffer (FILE *file,int size  );
     319             : void syncrep_yy_delete_buffer (YY_BUFFER_STATE b  );
     320             : void syncrep_yy_flush_buffer (YY_BUFFER_STATE b  );
     321             : void syncrep_yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
     322             : void syncrep_yypop_buffer_state (void );
     323             : 
     324             : static void syncrep_yyensure_buffer_stack (void );
     325             : static void syncrep_yy_load_buffer_state (void );
     326             : static void syncrep_yy_init_buffer (YY_BUFFER_STATE b,FILE *file  );
     327             : 
     328             : #define YY_FLUSH_BUFFER syncrep_yy_flush_buffer(YY_CURRENT_BUFFER )
     329             : 
     330             : YY_BUFFER_STATE syncrep_yy_scan_buffer (char *base,yy_size_t size  );
     331             : YY_BUFFER_STATE syncrep_yy_scan_string (yyconst char *yy_str  );
     332             : YY_BUFFER_STATE syncrep_yy_scan_bytes (yyconst char *bytes,yy_size_t len  );
     333             : 
     334             : void *syncrep_yyalloc (yy_size_t  );
     335             : void *syncrep_yyrealloc (void *,yy_size_t  );
     336             : void syncrep_yyfree (void *  );
     337             : 
     338             : #define yy_new_buffer syncrep_yy_create_buffer
     339             : 
     340             : #define yy_set_interactive(is_interactive) \
     341             :     { \
     342             :     if ( ! YY_CURRENT_BUFFER ){ \
     343             :         syncrep_yyensure_buffer_stack (); \
     344             :         YY_CURRENT_BUFFER_LVALUE =    \
     345             :             syncrep_yy_create_buffer(syncrep_yyin,YY_BUF_SIZE ); \
     346             :     } \
     347             :     YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
     348             :     }
     349             : 
     350             : #define yy_set_bol(at_bol) \
     351             :     { \
     352             :     if ( ! YY_CURRENT_BUFFER ){\
     353             :         syncrep_yyensure_buffer_stack (); \
     354             :         YY_CURRENT_BUFFER_LVALUE =    \
     355             :             syncrep_yy_create_buffer(syncrep_yyin,YY_BUF_SIZE ); \
     356             :     } \
     357             :     YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
     358             :     }
     359             : 
     360             : #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
     361             : 
     362             : /* Begin user sect3 */
     363             : 
     364             : #define syncrep_yywrap() 1
     365             : #define YY_SKIP_YYWRAP
     366             : 
     367             : typedef unsigned char YY_CHAR;
     368             : 
     369             : FILE *syncrep_yyin = (FILE *) 0, *syncrep_yyout = (FILE *) 0;
     370             : 
     371             : typedef int yy_state_type;
     372             : 
     373             : extern int syncrep_yylineno;
     374             : 
     375             : int syncrep_yylineno = 1;
     376             : 
     377             : extern char *syncrep_yytext;
     378             : #define yytext_ptr syncrep_yytext
     379             : 
     380             : static yy_state_type yy_get_previous_state (void );
     381             : static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
     382             : static int yy_get_next_buffer (void );
     383             : static void yy_fatal_error (yyconst char msg[]  );
     384             : 
     385             : /* Done after the current pattern has been matched and before the
     386             :  * corresponding action - sets up syncrep_yytext.
     387             :  */
     388             : #define YY_DO_BEFORE_ACTION \
     389             :     (yytext_ptr) = yy_bp; \
     390             :     syncrep_yyleng = (size_t) (yy_cp - yy_bp); \
     391             :     (yy_hold_char) = *yy_cp; \
     392             :     *yy_cp = '\0'; \
     393             :     (yy_c_buf_p) = yy_cp;
     394             : 
     395             : #define YY_NUM_RULES 15
     396             : #define YY_END_OF_BUFFER 16
     397             : /* This struct is not used in this scanner,
     398             :    but its presence is necessary. */
     399             : struct yy_trans_info
     400             :     {
     401             :     flex_int32_t yy_verify;
     402             :     flex_int32_t yy_nxt;
     403             :     };
     404             : static yyconst flex_int16_t yy_accept[32] =
     405             :     {   0,
     406             :         0,    0,    0,    0,   16,   14,    1,    1,    4,   12,
     407             :        13,   10,   11,    9,    8,    8,    8,    6,    7,    1,
     408             :         9,    8,    8,    8,    6,    5,    2,    8,    8,    3,
     409             :         0
     410             :     } ;
     411             : 
     412             : static yyconst flex_int32_t yy_ec[256] =
     413             :     {   0,
     414             :         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
     415             :         2,    2,    2,    1,    1,    1,    1,    1,    1,    1,
     416             :         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
     417             :         1,    2,    1,    4,    1,    5,    1,    1,    1,    6,
     418             :         7,    8,    1,    9,    1,    1,    1,   10,   10,   10,
     419             :        10,   10,   10,   10,   10,   10,   10,    1,    1,    1,
     420             :         1,    1,    1,    1,   11,   12,   12,   12,   12,   13,
     421             :        12,   12,   14,   12,   12,   12,   12,   15,   12,   12,
     422             :        12,   16,   17,   18,   12,   12,   12,   12,   19,   12,
     423             :         1,    1,    1,    1,   12,    1,   11,   12,   12,   12,
     424             : 
     425             :        12,   13,   12,   12,   14,   12,   12,   12,   12,   15,
     426             :        12,   12,   12,   16,   17,   18,   12,   12,   12,   12,
     427             :        19,   12,    1,    1,    1,    1,    1,   12,   12,   12,
     428             :        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
     429             :        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
     430             :        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
     431             :        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
     432             :        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
     433             :        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
     434             :        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
     435             : 
     436             :        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
     437             :        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
     438             :        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
     439             :        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
     440             :        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
     441             :        12,   12,   12,   12,   12
     442             :     } ;
     443             : 
     444             : static yyconst flex_int32_t yy_meta[20] =
     445             :     {   0,
     446             :         1,    1,    1,    2,    3,    1,    1,    1,    1,    3,
     447             :         3,    3,    3,    3,    3,    3,    3,    3,    3
     448             :     } ;
     449             : 
     450             : static yyconst flex_int16_t yy_base[35] =
     451             :     {   0,
     452             :         0,    0,   39,   38,   41,   44,   18,   20,   44,   44,
     453             :        44,   44,   44,   30,   24,    0,   24,    0,   33,   22,
     454             :        26,    0,   16,   18,    0,   44,    0,   16,   14,    0,
     455             :        44,   25,   27,   28
     456             :     } ;
     457             : 
     458             : static yyconst flex_int16_t yy_def[35] =
     459             :     {   0,
     460             :        31,    1,   32,   32,   31,   31,   31,   31,   31,   31,
     461             :        31,   31,   31,   31,   33,   33,   33,   34,   31,   31,
     462             :        31,   33,   33,   33,   34,   31,   33,   33,   33,   33,
     463             :         0,   31,   31,   31
     464             :     } ;
     465             : 
     466             : static yyconst flex_int16_t yy_nxt[64] =
     467             :     {   0,
     468             :         6,    7,    8,    9,    6,   10,   11,   12,   13,   14,
     469             :        15,   16,   17,   16,   16,   16,   16,   16,   16,   20,
     470             :        20,   20,   20,   20,   20,   18,   18,   18,   25,   22,
     471             :        25,   30,   29,   28,   27,   21,   26,   24,   23,   21,
     472             :        31,   19,   19,    5,   31,   31,   31,   31,   31,   31,
     473             :        31,   31,   31,   31,   31,   31,   31,   31,   31,   31,
     474             :        31,   31,   31
     475             :     } ;
     476             : 
     477             : static yyconst flex_int16_t yy_chk[64] =
     478             :     {   0,
     479             :         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
     480             :         1,    1,    1,    1,    1,    1,    1,    1,    1,    7,
     481             :         7,    8,    8,   20,   20,   32,   32,   32,   34,   33,
     482             :        34,   29,   28,   24,   23,   21,   19,   17,   15,   14,
     483             :         5,    4,    3,   31,   31,   31,   31,   31,   31,   31,
     484             :        31,   31,   31,   31,   31,   31,   31,   31,   31,   31,
     485             :        31,   31,   31
     486             :     } ;
     487             : 
     488             : static yy_state_type yy_last_accepting_state;
     489             : static char *yy_last_accepting_cpos;
     490             : 
     491             : extern int syncrep_yy_flex_debug;
     492             : int syncrep_yy_flex_debug = 0;
     493             : 
     494             : /* The intent behind this definition is that it'll catch
     495             :  * any uses of REJECT which flex missed.
     496             :  */
     497             : #define REJECT reject_used_but_not_detected
     498             : #define yymore() yymore_used_but_not_detected
     499             : #define YY_MORE_ADJ 0
     500             : #define YY_RESTORE_YY_MORE_OFFSET
     501             : char *syncrep_yytext;
     502             : #line 1 "syncrep_scanner.l"
     503             : #line 2 "syncrep_scanner.l"
     504             : /*-------------------------------------------------------------------------
     505             :  *
     506             :  * syncrep_scanner.l
     507             :  *    a lexical scanner for synchronous_standby_names
     508             :  *
     509             :  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
     510             :  * Portions Copyright (c) 1994, Regents of the University of California
     511             :  *
     512             :  *
     513             :  * IDENTIFICATION
     514             :  *    src/backend/replication/syncrep_scanner.l
     515             :  *
     516             :  *-------------------------------------------------------------------------
     517             :  */
     518             : #include "postgres.h"
     519             : 
     520             : #include "lib/stringinfo.h"
     521             : 
     522             : /* Avoid exit() on fatal scanner errors (a bit ugly -- see yy_fatal_error) */
     523             : #undef fprintf
     524             : #define fprintf(file, fmt, msg)  fprintf_to_ereport(fmt, msg)
     525             : 
     526             : static void
     527             : fprintf_to_ereport(const char *fmt, const char *msg)
     528             : {
     529             :     ereport(ERROR, (errmsg_internal("%s", msg)));
     530             : }
     531             : 
     532             : /* Handles to the buffer that the lexer uses internally */
     533             : static YY_BUFFER_STATE scanbufhandle;
     534             : 
     535             : static StringInfoData xdbuf;
     536             : 
     537             : #define YY_NO_INPUT 1
     538             : /*
     539             :  * <xd> delimited identifiers (double-quoted identifiers)
     540             :  */
     541             : 
     542             : #line 543 "syncrep_scanner.c"
     543             : 
     544             : #define INITIAL 0
     545             : #define xd 1
     546             : 
     547             : #ifndef YY_NO_UNISTD_H
     548             : /* Special case for "unistd.h", since it is non-ANSI. We include it way
     549             :  * down here because we want the user's section 1 to have been scanned first.
     550             :  * The user has a chance to override it with an option.
     551             :  */
     552             : #include <unistd.h>
     553             : #endif
     554             : 
     555             : #ifndef YY_EXTRA_TYPE
     556             : #define YY_EXTRA_TYPE void *
     557             : #endif
     558             : 
     559             : static int yy_init_globals (void );
     560             : 
     561             : /* Accessor methods to globals.
     562             :    These are made visible to non-reentrant scanners for convenience. */
     563             : 
     564             : int syncrep_yylex_destroy (void );
     565             : 
     566             : int syncrep_yyget_debug (void );
     567             : 
     568             : void syncrep_yyset_debug (int debug_flag  );
     569             : 
     570             : YY_EXTRA_TYPE syncrep_yyget_extra (void );
     571             : 
     572             : void syncrep_yyset_extra (YY_EXTRA_TYPE user_defined  );
     573             : 
     574             : FILE *syncrep_yyget_in (void );
     575             : 
     576             : void syncrep_yyset_in  (FILE * in_str  );
     577             : 
     578             : FILE *syncrep_yyget_out (void );
     579             : 
     580             : void syncrep_yyset_out  (FILE * out_str  );
     581             : 
     582             : yy_size_t syncrep_yyget_leng (void );
     583             : 
     584             : char *syncrep_yyget_text (void );
     585             : 
     586             : int syncrep_yyget_lineno (void );
     587             : 
     588             : void syncrep_yyset_lineno (int line_number  );
     589             : 
     590             : /* Macros after this point can all be overridden by user definitions in
     591             :  * section 1.
     592             :  */
     593             : 
     594             : #ifndef YY_SKIP_YYWRAP
     595             : #ifdef __cplusplus
     596             : extern "C" int syncrep_yywrap (void );
     597             : #else
     598             : extern int syncrep_yywrap (void );
     599             : #endif
     600             : #endif
     601             : 
     602             : #ifndef yytext_ptr
     603             : static void yy_flex_strncpy (char *,yyconst char *,int );
     604             : #endif
     605             : 
     606             : #ifdef YY_NEED_STRLEN
     607             : static int yy_flex_strlen (yyconst char * );
     608             : #endif
     609             : 
     610             : #ifndef YY_NO_INPUT
     611             : 
     612             : #ifdef __cplusplus
     613             : static int yyinput (void );
     614             : #else
     615             : static int input (void );
     616             : #endif
     617             : 
     618             : #endif
     619             : 
     620             : /* Amount of stuff to slurp up with each read. */
     621             : #ifndef YY_READ_BUF_SIZE
     622             : #ifdef __ia64__
     623             : /* On IA-64, the buffer size is 16k, not 8k */
     624             : #define YY_READ_BUF_SIZE 16384
     625             : #else
     626             : #define YY_READ_BUF_SIZE 8192
     627             : #endif /* __ia64__ */
     628             : #endif
     629             : 
     630             : /* Copy whatever the last rule matched to the standard output. */
     631             : #ifndef ECHO
     632             : /* This used to be an fputs(), but since the string might contain NUL's,
     633             :  * we now use fwrite().
     634             :  */
     635             : #define ECHO do { if (fwrite( syncrep_yytext, syncrep_yyleng, 1, syncrep_yyout )) {} } while (0)
     636             : #endif
     637             : 
     638             : /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
     639             :  * is returned in "result".
     640             :  */
     641             : #ifndef YY_INPUT
     642             : #define YY_INPUT(buf,result,max_size) \
     643             :     if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
     644             :         { \
     645             :         int c = '*'; \
     646             :         int n; \
     647             :         for ( n = 0; n < max_size && \
     648             :                  (c = getc( syncrep_yyin )) != EOF && c != '\n'; ++n ) \
     649             :             buf[n] = (char) c; \
     650             :         if ( c == '\n' ) \
     651             :             buf[n++] = (char) c; \
     652             :         if ( c == EOF && ferror( syncrep_yyin ) ) \
     653             :             YY_FATAL_ERROR( "input in flex scanner failed" ); \
     654             :         result = n; \
     655             :         } \
     656             :     else \
     657             :         { \
     658             :         errno=0; \
     659             :         while ( (result = fread(buf, 1, (yy_size_t) max_size, syncrep_yyin)) == 0 && ferror(syncrep_yyin)) \
     660             :             { \
     661             :             if( errno != EINTR) \
     662             :                 { \
     663             :                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
     664             :                 break; \
     665             :                 } \
     666             :             errno=0; \
     667             :             clearerr(syncrep_yyin); \
     668             :             } \
     669             :         }\
     670             : \
     671             : 
     672             : #endif
     673             : 
     674             : /* No semi-colon after return; correct usage is to write "yyterminate();" -
     675             :  * we don't want an extra ';' after the "return" because that will cause
     676             :  * some compilers to complain about unreachable statements.
     677             :  */
     678             : #ifndef yyterminate
     679             : #define yyterminate() return YY_NULL
     680             : #endif
     681             : 
     682             : /* Number of entries by which start-condition stack grows. */
     683             : #ifndef YY_START_STACK_INCR
     684             : #define YY_START_STACK_INCR 25
     685             : #endif
     686             : 
     687             : /* Report a fatal error. */
     688             : #ifndef YY_FATAL_ERROR
     689             : #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
     690             : #endif
     691             : 
     692             : /* end tables serialization structures and prototypes */
     693             : 
     694             : /* Default declaration of generated scanner - a define so the user can
     695             :  * easily add parameters.
     696             :  */
     697             : #ifndef YY_DECL
     698             : #define YY_DECL_IS_OURS 1
     699             : 
     700             : extern int syncrep_yylex (void);
     701             : 
     702             : #define YY_DECL int syncrep_yylex (void)
     703             : #endif /* !YY_DECL */
     704             : 
     705             : /* Code executed at the beginning of each rule, after syncrep_yytext and syncrep_yyleng
     706             :  * have been set up.
     707             :  */
     708             : #ifndef YY_USER_ACTION
     709             : #define YY_USER_ACTION
     710             : #endif
     711             : 
     712             : /* Code executed at the end of each rule. */
     713             : #ifndef YY_BREAK
     714             : #define YY_BREAK break;
     715             : #endif
     716             : 
     717             : #define YY_RULE_SETUP \
     718             :     YY_USER_ACTION
     719             : 
     720             : /** The main scanner function which does all the work.
     721             :  */
     722           0 : YY_DECL
     723             : {
     724             :     register yy_state_type yy_current_state;
     725             :     register char *yy_cp, *yy_bp;
     726             :     register int yy_act;
     727             :     
     728           0 :     if ( !(yy_init) )
     729             :         {
     730           0 :         (yy_init) = 1;
     731             : 
     732             : #ifdef YY_USER_INIT
     733             :         YY_USER_INIT;
     734             : #endif
     735             : 
     736           0 :         if ( ! (yy_start) )
     737           0 :             (yy_start) = 1; /* first start state */
     738             : 
     739           0 :         if ( ! syncrep_yyin )
     740           0 :             syncrep_yyin = stdin;
     741             : 
     742           0 :         if ( ! syncrep_yyout )
     743           0 :             syncrep_yyout = stdout;
     744             : 
     745           0 :         if ( ! YY_CURRENT_BUFFER ) {
     746           0 :             syncrep_yyensure_buffer_stack ();
     747           0 :             YY_CURRENT_BUFFER_LVALUE =
     748           0 :                 syncrep_yy_create_buffer(syncrep_yyin,YY_BUF_SIZE );
     749             :         }
     750             : 
     751           0 :         syncrep_yy_load_buffer_state( );
     752             :         }
     753             : 
     754             :     {
     755             : #line 64 "syncrep_scanner.l"
     756             : 
     757             : #line 758 "syncrep_scanner.c"
     758             : 
     759             :     while ( 1 )     /* loops until end-of-file is reached */
     760             :         {
     761           0 :         yy_cp = (yy_c_buf_p);
     762             : 
     763             :         /* Support of syncrep_yytext. */
     764           0 :         *yy_cp = (yy_hold_char);
     765             : 
     766             :         /* yy_bp points to the position in yy_ch_buf of the start of
     767             :          * the current run.
     768             :          */
     769           0 :         yy_bp = yy_cp;
     770             : 
     771           0 :         yy_current_state = (yy_start);
     772             : yy_match:
     773             :         do
     774             :             {
     775           0 :             register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
     776           0 :             if ( yy_accept[yy_current_state] )
     777             :                 {
     778           0 :                 (yy_last_accepting_state) = yy_current_state;
     779           0 :                 (yy_last_accepting_cpos) = yy_cp;
     780             :                 }
     781           0 :             while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
     782             :                 {
     783           0 :                 yy_current_state = (int) yy_def[yy_current_state];
     784           0 :                 if ( yy_current_state >= 32 )
     785           0 :                     yy_c = yy_meta[(unsigned int) yy_c];
     786             :                 }
     787           0 :             yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
     788           0 :             ++yy_cp;
     789             :             }
     790           0 :         while ( yy_current_state != 31 );
     791           0 :         yy_cp = (yy_last_accepting_cpos);
     792           0 :         yy_current_state = (yy_last_accepting_state);
     793             : 
     794             : yy_find_action:
     795           0 :         yy_act = yy_accept[yy_current_state];
     796             : 
     797           0 :         YY_DO_BEFORE_ACTION;
     798             : 
     799             : do_action:  /* This label is used only to access EOF actions. */
     800             : 
     801           0 :         switch ( yy_act )
     802             :     { /* beginning of action switch */
     803             :             case 0: /* must back up */
     804             :             /* undo the effects of YY_DO_BEFORE_ACTION */
     805           0 :             *yy_cp = (yy_hold_char);
     806           0 :             yy_cp = (yy_last_accepting_cpos);
     807           0 :             yy_current_state = (yy_last_accepting_state);
     808           0 :             goto yy_find_action;
     809             : 
     810             : case 1:
     811             : /* rule 1 can match eol */
     812             : YY_RULE_SETUP
     813             : #line 65 "syncrep_scanner.l"
     814             : { /* ignore */ }
     815             :     YY_BREAK
     816             : /* brute-force case insensitivity is safer than relying on flex -i */
     817             : case 2:
     818             : YY_RULE_SETUP
     819             : #line 69 "syncrep_scanner.l"
     820             : { return ANY; }
     821             :     YY_BREAK
     822             : case 3:
     823             : YY_RULE_SETUP
     824             : #line 70 "syncrep_scanner.l"
     825             : { return FIRST; }
     826             :     YY_BREAK
     827             : case 4:
     828             : YY_RULE_SETUP
     829             : #line 72 "syncrep_scanner.l"
     830             : {
     831             :                 initStringInfo(&xdbuf);
     832             :                 BEGIN(xd);
     833             :         }
     834             :     YY_BREAK
     835             : case 5:
     836             : YY_RULE_SETUP
     837             : #line 76 "syncrep_scanner.l"
     838             : {
     839             :                 appendStringInfoChar(&xdbuf, '"');
     840             :         }
     841             :     YY_BREAK
     842             : case 6:
     843             : /* rule 6 can match eol */
     844             : YY_RULE_SETUP
     845             : #line 79 "syncrep_scanner.l"
     846             : {
     847             :                 appendStringInfoString(&xdbuf, syncrep_yytext);
     848             :         }
     849             :     YY_BREAK
     850             : case 7:
     851             : YY_RULE_SETUP
     852             : #line 82 "syncrep_scanner.l"
     853             : {
     854             :                 yylval.str = xdbuf.data;
     855             :                 xdbuf.data = NULL;
     856             :                 BEGIN(INITIAL);
     857             :                 return NAME;
     858             :         }
     859             :     YY_BREAK
     860             : case YY_STATE_EOF(xd):
     861             : #line 88 "syncrep_scanner.l"
     862             : {
     863             :                 yyerror("unterminated quoted identifier");
     864             :                 return JUNK;
     865             :         }
     866             :     YY_BREAK
     867             : case 8:
     868             : YY_RULE_SETUP
     869             : #line 93 "syncrep_scanner.l"
     870             : {
     871             :                 yylval.str = pstrdup(syncrep_yytext);
     872             :                 return NAME;
     873             :         }
     874             :     YY_BREAK
     875             : case 9:
     876             : YY_RULE_SETUP
     877             : #line 98 "syncrep_scanner.l"
     878             : {
     879             :                 yylval.str = pstrdup(syncrep_yytext);
     880             :                 return NUM;
     881             :         }
     882             :     YY_BREAK
     883             : case 10:
     884             : YY_RULE_SETUP
     885             : #line 103 "syncrep_scanner.l"
     886             : {
     887             :                 yylval.str = "*";
     888             :                 return NAME;
     889             :         }
     890             :     YY_BREAK
     891             : case 11:
     892             : YY_RULE_SETUP
     893             : #line 108 "syncrep_scanner.l"
     894             : { return ','; }
     895             :     YY_BREAK
     896             : case 12:
     897             : YY_RULE_SETUP
     898             : #line 109 "syncrep_scanner.l"
     899             : { return '('; }
     900             :     YY_BREAK
     901             : case 13:
     902             : YY_RULE_SETUP
     903             : #line 110 "syncrep_scanner.l"
     904             : { return ')'; }
     905             :     YY_BREAK
     906             : case 14:
     907             : YY_RULE_SETUP
     908             : #line 112 "syncrep_scanner.l"
     909             : { return JUNK; }
     910             :     YY_BREAK
     911             : case 15:
     912             : YY_RULE_SETUP
     913             : #line 113 "syncrep_scanner.l"
     914             : YY_FATAL_ERROR( "flex scanner jammed" );
     915             :     YY_BREAK
     916             : #line 917 "syncrep_scanner.c"
     917             : case YY_STATE_EOF(INITIAL):
     918           0 :     yyterminate();
     919             : 
     920             :     case YY_END_OF_BUFFER:
     921             :         {
     922             :         /* Amount of text matched not including the EOB char. */
     923           0 :         int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
     924             : 
     925             :         /* Undo the effects of YY_DO_BEFORE_ACTION. */
     926           0 :         *yy_cp = (yy_hold_char);
     927             :         YY_RESTORE_YY_MORE_OFFSET
     928             : 
     929           0 :         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
     930             :             {
     931             :             /* We're scanning a new file or input source.  It's
     932             :              * possible that this happened because the user
     933             :              * just pointed syncrep_yyin at a new source and called
     934             :              * syncrep_yylex().  If so, then we have to assure
     935             :              * consistency between YY_CURRENT_BUFFER and our
     936             :              * globals.  Here is the right place to do so, because
     937             :              * this is the first action (other than possibly a
     938             :              * back-up) that will match for the new input source.
     939             :              */
     940           0 :             (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
     941           0 :             YY_CURRENT_BUFFER_LVALUE->yy_input_file = syncrep_yyin;
     942           0 :             YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
     943             :             }
     944             : 
     945             :         /* Note that here we test for yy_c_buf_p "<=" to the position
     946             :          * of the first EOB in the buffer, since yy_c_buf_p will
     947             :          * already have been incremented past the NUL character
     948             :          * (since all states make transitions on EOB to the
     949             :          * end-of-buffer state).  Contrast this with the test
     950             :          * in input().
     951             :          */
     952           0 :         if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
     953             :             { /* This was really a NUL. */
     954             :             yy_state_type yy_next_state;
     955             : 
     956           0 :             (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
     957             : 
     958           0 :             yy_current_state = yy_get_previous_state(  );
     959             : 
     960             :             /* Okay, we're now positioned to make the NUL
     961             :              * transition.  We couldn't have
     962             :              * yy_get_previous_state() go ahead and do it
     963             :              * for us because it doesn't know how to deal
     964             :              * with the possibility of jamming (and we don't
     965             :              * want to build jamming into it because then it
     966             :              * will run more slowly).
     967             :              */
     968             : 
     969           0 :             yy_next_state = yy_try_NUL_trans( yy_current_state );
     970             : 
     971           0 :             yy_bp = (yytext_ptr) + YY_MORE_ADJ;
     972             : 
     973           0 :             if ( yy_next_state )
     974             :                 {
     975             :                 /* Consume the NUL. */
     976           0 :                 yy_cp = ++(yy_c_buf_p);
     977           0 :                 yy_current_state = yy_next_state;
     978           0 :                 goto yy_match;
     979             :                 }
     980             : 
     981             :             else
     982             :                 {
     983           0 :                 yy_cp = (yy_last_accepting_cpos);
     984           0 :                 yy_current_state = (yy_last_accepting_state);
     985           0 :                 goto yy_find_action;
     986             :                 }
     987             :             }
     988             : 
     989           0 :         else switch ( yy_get_next_buffer(  ) )
     990             :             {
     991             :             case EOB_ACT_END_OF_FILE:
     992             :                 {
     993           0 :                 (yy_did_buffer_switch_on_eof) = 0;
     994             : 
     995             :                 if ( syncrep_yywrap( ) )
     996             :                     {
     997             :                     /* Note: because we've taken care in
     998             :                      * yy_get_next_buffer() to have set up
     999             :                      * syncrep_yytext, we can now set up
    1000             :                      * yy_c_buf_p so that if some total
    1001             :                      * hoser (like flex itself) wants to
    1002             :                      * call the scanner after we return the
    1003             :                      * YY_NULL, it'll still work - another
    1004             :                      * YY_NULL will get returned.
    1005             :                      */
    1006           0 :                     (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
    1007             : 
    1008           0 :                     yy_act = YY_STATE_EOF(YY_START);
    1009           0 :                     goto do_action;
    1010             :                     }
    1011             : 
    1012             :                 else
    1013             :                     {
    1014             :                     if ( ! (yy_did_buffer_switch_on_eof) )
    1015             :                         YY_NEW_FILE;
    1016             :                     }
    1017             :                 break;
    1018             :                 }
    1019             : 
    1020             :             case EOB_ACT_CONTINUE_SCAN:
    1021           0 :                 (yy_c_buf_p) =
    1022           0 :                     (yytext_ptr) + yy_amount_of_matched_text;
    1023             : 
    1024           0 :                 yy_current_state = yy_get_previous_state(  );
    1025             : 
    1026           0 :                 yy_cp = (yy_c_buf_p);
    1027           0 :                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
    1028           0 :                 goto yy_match;
    1029             : 
    1030             :             case EOB_ACT_LAST_MATCH:
    1031           0 :                 (yy_c_buf_p) =
    1032           0 :                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
    1033             : 
    1034           0 :                 yy_current_state = yy_get_previous_state(  );
    1035             : 
    1036           0 :                 yy_cp = (yy_c_buf_p);
    1037           0 :                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
    1038           0 :                 goto yy_find_action;
    1039             :             }
    1040           0 :         break;
    1041             :         }
    1042             : 
    1043             :     default:
    1044           0 :         YY_FATAL_ERROR(
    1045             :             "fatal flex scanner internal error--no action found" );
    1046             :     } /* end of action switch */
    1047           0 :         } /* end of scanning one token */
    1048             :     } /* end of user's declarations */
    1049             : } /* end of syncrep_yylex */
    1050             : 
    1051             : /* yy_get_next_buffer - try to read in a new buffer
    1052             :  *
    1053             :  * Returns a code representing an action:
    1054             :  *  EOB_ACT_LAST_MATCH -
    1055             :  *  EOB_ACT_CONTINUE_SCAN - continue scanning from current position
    1056             :  *  EOB_ACT_END_OF_FILE - end of file
    1057             :  */
    1058           0 : static int yy_get_next_buffer (void)
    1059             : {
    1060           0 :         register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
    1061           0 :     register char *source = (yytext_ptr);
    1062             :     register int number_to_move, i;
    1063             :     int ret_val;
    1064             : 
    1065           0 :     if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
    1066           0 :         YY_FATAL_ERROR(
    1067             :         "fatal flex scanner internal error--end of buffer missed" );
    1068             : 
    1069           0 :     if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
    1070             :         { /* Don't try to fill the buffer, so this is an EOF. */
    1071           0 :         if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
    1072             :             {
    1073             :             /* We matched a single character, the EOB, so
    1074             :              * treat this as a final EOF.
    1075             :              */
    1076           0 :             return EOB_ACT_END_OF_FILE;
    1077             :             }
    1078             : 
    1079             :         else
    1080             :             {
    1081             :             /* We matched some text prior to the EOB, first
    1082             :              * process it.
    1083             :              */
    1084           0 :             return EOB_ACT_LAST_MATCH;
    1085             :             }
    1086             :         }
    1087             : 
    1088             :     /* Try to read more data. */
    1089             : 
    1090             :     /* First move last chars to start of buffer. */
    1091           0 :     number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
    1092             : 
    1093           0 :     for ( i = 0; i < number_to_move; ++i )
    1094           0 :         *(dest++) = *(source++);
    1095             : 
    1096           0 :     if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
    1097             :         /* don't do the read, it's not guaranteed to return an EOF,
    1098             :          * just force an EOF
    1099             :          */
    1100           0 :         YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
    1101             : 
    1102             :     else
    1103             :         {
    1104           0 :             int num_to_read =
    1105           0 :             YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
    1106             : 
    1107           0 :         while ( num_to_read <= 0 )
    1108             :             { /* Not enough room in the buffer - grow it. */
    1109             : 
    1110             :             /* just a shorter name for the current buffer */
    1111           0 :             YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
    1112             : 
    1113           0 :             int yy_c_buf_p_offset =
    1114           0 :                 (int) ((yy_c_buf_p) - b->yy_ch_buf);
    1115             : 
    1116           0 :             if ( b->yy_is_our_buffer )
    1117             :                 {
    1118           0 :                 yy_size_t new_size = b->yy_buf_size * 2;
    1119             : 
    1120           0 :                 if ( new_size <= 0 )
    1121           0 :                     b->yy_buf_size += b->yy_buf_size / 8;
    1122             :                 else
    1123           0 :                     b->yy_buf_size *= 2;
    1124             : 
    1125           0 :                 b->yy_ch_buf = (char *)
    1126             :                     /* Include room in for 2 EOB chars. */
    1127           0 :                     syncrep_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
    1128             :                 }
    1129             :             else
    1130             :                 /* Can't grow it, we don't own it. */
    1131           0 :                 b->yy_ch_buf = 0;
    1132             : 
    1133           0 :             if ( ! b->yy_ch_buf )
    1134           0 :                 YY_FATAL_ERROR(
    1135             :                 "fatal error - scanner input buffer overflow" );
    1136             : 
    1137           0 :             (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
    1138             : 
    1139           0 :             num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
    1140           0 :                         number_to_move - 1;
    1141             : 
    1142             :             }
    1143             : 
    1144           0 :         if ( num_to_read > YY_READ_BUF_SIZE )
    1145           0 :             num_to_read = YY_READ_BUF_SIZE;
    1146             : 
    1147             :         /* Read in more data. */
    1148           0 :         YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
    1149             :             (yy_n_chars), num_to_read );
    1150             : 
    1151           0 :         YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
    1152             :         }
    1153             : 
    1154           0 :     if ( (yy_n_chars) == 0 )
    1155             :         {
    1156           0 :         if ( number_to_move == YY_MORE_ADJ )
    1157             :             {
    1158           0 :             ret_val = EOB_ACT_END_OF_FILE;
    1159           0 :             syncrep_yyrestart(syncrep_yyin  );
    1160             :             }
    1161             : 
    1162             :         else
    1163             :             {
    1164           0 :             ret_val = EOB_ACT_LAST_MATCH;
    1165           0 :             YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
    1166             :                 YY_BUFFER_EOF_PENDING;
    1167             :             }
    1168             :         }
    1169             : 
    1170             :     else
    1171           0 :         ret_val = EOB_ACT_CONTINUE_SCAN;
    1172             : 
    1173           0 :     if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
    1174             :         /* Extend the array by 50%, plus the number we really need. */
    1175           0 :         yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
    1176           0 :         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) syncrep_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
    1177           0 :         if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
    1178           0 :             YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
    1179             :     }
    1180             : 
    1181           0 :     (yy_n_chars) += number_to_move;
    1182           0 :     YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
    1183           0 :     YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
    1184             : 
    1185           0 :     (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
    1186             : 
    1187           0 :     return ret_val;
    1188             : }
    1189             : 
    1190             : /* yy_get_previous_state - get the state just before the EOB char was reached */
    1191             : 
    1192           0 :     static yy_state_type yy_get_previous_state (void)
    1193             : {
    1194             :     register yy_state_type yy_current_state;
    1195             :     register char *yy_cp;
    1196             :     
    1197           0 :     yy_current_state = (yy_start);
    1198             : 
    1199           0 :     for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
    1200             :         {
    1201           0 :         register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
    1202           0 :         if ( yy_accept[yy_current_state] )
    1203             :             {
    1204           0 :             (yy_last_accepting_state) = yy_current_state;
    1205           0 :             (yy_last_accepting_cpos) = yy_cp;
    1206             :             }
    1207           0 :         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
    1208             :             {
    1209           0 :             yy_current_state = (int) yy_def[yy_current_state];
    1210           0 :             if ( yy_current_state >= 32 )
    1211           0 :                 yy_c = yy_meta[(unsigned int) yy_c];
    1212             :             }
    1213           0 :         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
    1214             :         }
    1215             : 
    1216           0 :     return yy_current_state;
    1217             : }
    1218             : 
    1219             : /* yy_try_NUL_trans - try to make a transition on the NUL character
    1220             :  *
    1221             :  * synopsis
    1222             :  *  next_state = yy_try_NUL_trans( current_state );
    1223             :  */
    1224           0 :     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
    1225             : {
    1226             :     register int yy_is_jam;
    1227           0 :         register char *yy_cp = (yy_c_buf_p);
    1228             : 
    1229           0 :     register YY_CHAR yy_c = 1;
    1230           0 :     if ( yy_accept[yy_current_state] )
    1231             :         {
    1232           0 :         (yy_last_accepting_state) = yy_current_state;
    1233           0 :         (yy_last_accepting_cpos) = yy_cp;
    1234             :         }
    1235           0 :     while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
    1236             :         {
    1237           0 :         yy_current_state = (int) yy_def[yy_current_state];
    1238           0 :         if ( yy_current_state >= 32 )
    1239           0 :             yy_c = yy_meta[(unsigned int) yy_c];
    1240             :         }
    1241           0 :     yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
    1242           0 :     yy_is_jam = (yy_current_state == 31);
    1243             : 
    1244           0 :         return yy_is_jam ? 0 : yy_current_state;
    1245             : }
    1246             : 
    1247             : #ifndef YY_NO_INPUT
    1248             : #ifdef __cplusplus
    1249             :     static int yyinput (void)
    1250             : #else
    1251             :     static int input  (void)
    1252             : #endif
    1253             : 
    1254             : {
    1255             :     int c;
    1256             :     
    1257             :     *(yy_c_buf_p) = (yy_hold_char);
    1258             : 
    1259             :     if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
    1260             :         {
    1261             :         /* yy_c_buf_p now points to the character we want to return.
    1262             :          * If this occurs *before* the EOB characters, then it's a
    1263             :          * valid NUL; if not, then we've hit the end of the buffer.
    1264             :          */
    1265             :         if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
    1266             :             /* This was really a NUL. */
    1267             :             *(yy_c_buf_p) = '\0';
    1268             : 
    1269             :         else
    1270             :             { /* need more input */
    1271             :             yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
    1272             :             ++(yy_c_buf_p);
    1273             : 
    1274             :             switch ( yy_get_next_buffer(  ) )
    1275             :                 {
    1276             :                 case EOB_ACT_LAST_MATCH:
    1277             :                     /* This happens because yy_g_n_b()
    1278             :                      * sees that we've accumulated a
    1279             :                      * token and flags that we need to
    1280             :                      * try matching the token before
    1281             :                      * proceeding.  But for input(),
    1282             :                      * there's no matching to consider.
    1283             :                      * So convert the EOB_ACT_LAST_MATCH
    1284             :                      * to EOB_ACT_END_OF_FILE.
    1285             :                      */
    1286             : 
    1287             :                     /* Reset buffer status. */
    1288             :                     syncrep_yyrestart(syncrep_yyin );
    1289             : 
    1290             :                     /*FALLTHROUGH*/
    1291             : 
    1292             :                 case EOB_ACT_END_OF_FILE:
    1293             :                     {
    1294             :                     if ( syncrep_yywrap( ) )
    1295             :                         return EOF;
    1296             : 
    1297             :                     if ( ! (yy_did_buffer_switch_on_eof) )
    1298             :                         YY_NEW_FILE;
    1299             : #ifdef __cplusplus
    1300             :                     return yyinput();
    1301             : #else
    1302             :                     return input();
    1303             : #endif
    1304             :                     }
    1305             : 
    1306             :                 case EOB_ACT_CONTINUE_SCAN:
    1307             :                     (yy_c_buf_p) = (yytext_ptr) + offset;
    1308             :                     break;
    1309             :                 }
    1310             :             }
    1311             :         }
    1312             : 
    1313             :     c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
    1314             :     *(yy_c_buf_p) = '\0';   /* preserve syncrep_yytext */
    1315             :     (yy_hold_char) = *++(yy_c_buf_p);
    1316             : 
    1317             :     return c;
    1318             : }
    1319             : #endif  /* ifndef YY_NO_INPUT */
    1320             : 
    1321             : /** Immediately switch to a different input stream.
    1322             :  * @param input_file A readable stream.
    1323             :  * 
    1324             :  * @note This function does not reset the start condition to @c INITIAL .
    1325             :  */
    1326           0 :     void syncrep_yyrestart  (FILE * input_file )
    1327             : {
    1328             :     
    1329           0 :     if ( ! YY_CURRENT_BUFFER ){
    1330           0 :         syncrep_yyensure_buffer_stack ();
    1331           0 :         YY_CURRENT_BUFFER_LVALUE =
    1332           0 :             syncrep_yy_create_buffer(syncrep_yyin,YY_BUF_SIZE );
    1333             :     }
    1334             : 
    1335           0 :     syncrep_yy_init_buffer(YY_CURRENT_BUFFER,input_file );
    1336           0 :     syncrep_yy_load_buffer_state( );
    1337           0 : }
    1338             : 
    1339             : /** Switch to a different input buffer.
    1340             :  * @param new_buffer The new input buffer.
    1341             :  * 
    1342             :  */
    1343           0 :     void syncrep_yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
    1344             : {
    1345             :     
    1346             :     /* TODO. We should be able to replace this entire function body
    1347             :      * with
    1348             :      *      syncrep_yypop_buffer_state();
    1349             :      *      syncrep_yypush_buffer_state(new_buffer);
    1350             :      */
    1351           0 :     syncrep_yyensure_buffer_stack ();
    1352           0 :     if ( YY_CURRENT_BUFFER == new_buffer )
    1353           0 :         return;
    1354             : 
    1355           0 :     if ( YY_CURRENT_BUFFER )
    1356             :         {
    1357             :         /* Flush out information for old buffer. */
    1358           0 :         *(yy_c_buf_p) = (yy_hold_char);
    1359           0 :         YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
    1360           0 :         YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
    1361             :         }
    1362             : 
    1363           0 :     YY_CURRENT_BUFFER_LVALUE = new_buffer;
    1364           0 :     syncrep_yy_load_buffer_state( );
    1365             : 
    1366             :     /* We don't actually know whether we did this switch during
    1367             :      * EOF (syncrep_yywrap()) processing, but the only time this flag
    1368             :      * is looked at is after syncrep_yywrap() is called, so it's safe
    1369             :      * to go ahead and always set it.
    1370             :      */
    1371           0 :     (yy_did_buffer_switch_on_eof) = 1;
    1372             : }
    1373             : 
    1374           0 : static void syncrep_yy_load_buffer_state  (void)
    1375             : {
    1376           0 :         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
    1377           0 :     (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
    1378           0 :     syncrep_yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
    1379           0 :     (yy_hold_char) = *(yy_c_buf_p);
    1380           0 : }
    1381             : 
    1382             : /** Allocate and initialize an input buffer state.
    1383             :  * @param file A readable stream.
    1384             :  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
    1385             :  * 
    1386             :  * @return the allocated buffer state.
    1387             :  */
    1388           0 :     YY_BUFFER_STATE syncrep_yy_create_buffer  (FILE * file, int  size )
    1389             : {
    1390             :     YY_BUFFER_STATE b;
    1391             :     
    1392           0 :     b = (YY_BUFFER_STATE) syncrep_yyalloc(sizeof( struct yy_buffer_state )  );
    1393           0 :     if ( ! b )
    1394           0 :         YY_FATAL_ERROR( "out of dynamic memory in syncrep_yy_create_buffer()" );
    1395             : 
    1396           0 :     b->yy_buf_size = size;
    1397             : 
    1398             :     /* yy_ch_buf has to be 2 characters longer than the size given because
    1399             :      * we need to put in 2 end-of-buffer characters.
    1400             :      */
    1401           0 :     b->yy_ch_buf = (char *) syncrep_yyalloc(b->yy_buf_size + 2  );
    1402           0 :     if ( ! b->yy_ch_buf )
    1403           0 :         YY_FATAL_ERROR( "out of dynamic memory in syncrep_yy_create_buffer()" );
    1404             : 
    1405           0 :     b->yy_is_our_buffer = 1;
    1406             : 
    1407           0 :     syncrep_yy_init_buffer(b,file );
    1408             : 
    1409           0 :     return b;
    1410             : }
    1411             : 
    1412             : /** Destroy the buffer.
    1413             :  * @param b a buffer created with syncrep_yy_create_buffer()
    1414             :  * 
    1415             :  */
    1416           0 :     void syncrep_yy_delete_buffer (YY_BUFFER_STATE  b )
    1417             : {
    1418             :     
    1419           0 :     if ( ! b )
    1420           0 :         return;
    1421             : 
    1422           0 :     if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
    1423           0 :         YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
    1424             : 
    1425           0 :     if ( b->yy_is_our_buffer )
    1426           0 :         syncrep_yyfree((void *) b->yy_ch_buf  );
    1427             : 
    1428           0 :     syncrep_yyfree((void *) b  );
    1429             : }
    1430             : 
    1431             : /* Initializes or reinitializes a buffer.
    1432             :  * This function is sometimes called more than once on the same buffer,
    1433             :  * such as during a syncrep_yyrestart() or at EOF.
    1434             :  */
    1435           0 :     static void syncrep_yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
    1436             : 
    1437             : {
    1438           0 :     int oerrno = errno;
    1439             :     
    1440           0 :     syncrep_yy_flush_buffer(b );
    1441             : 
    1442           0 :     b->yy_input_file = file;
    1443           0 :     b->yy_fill_buffer = 1;
    1444             : 
    1445             :     /* If b is the current buffer, then syncrep_yy_init_buffer was _probably_
    1446             :      * called from syncrep_yyrestart() or through yy_get_next_buffer.
    1447             :      * In that case, we don't want to reset the lineno or column.
    1448             :      */
    1449           0 :     if (b != YY_CURRENT_BUFFER){
    1450           0 :         b->yy_bs_lineno = 1;
    1451           0 :         b->yy_bs_column = 0;
    1452             :     }
    1453             : 
    1454           0 :         b->yy_is_interactive = 0;
    1455             :     
    1456           0 :     errno = oerrno;
    1457           0 : }
    1458             : 
    1459             : /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
    1460             :  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
    1461             :  * 
    1462             :  */
    1463           0 :     void syncrep_yy_flush_buffer (YY_BUFFER_STATE  b )
    1464             : {
    1465           0 :         if ( ! b )
    1466           0 :         return;
    1467             : 
    1468           0 :     b->yy_n_chars = 0;
    1469             : 
    1470             :     /* We always need two end-of-buffer characters.  The first causes
    1471             :      * a transition to the end-of-buffer state.  The second causes
    1472             :      * a jam in that state.
    1473             :      */
    1474           0 :     b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
    1475           0 :     b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
    1476             : 
    1477           0 :     b->yy_buf_pos = &b->yy_ch_buf[0];
    1478             : 
    1479           0 :     b->yy_at_bol = 1;
    1480           0 :     b->yy_buffer_status = YY_BUFFER_NEW;
    1481             : 
    1482           0 :     if ( b == YY_CURRENT_BUFFER )
    1483           0 :         syncrep_yy_load_buffer_state( );
    1484             : }
    1485             : 
    1486             : /** Pushes the new state onto the stack. The new state becomes
    1487             :  *  the current state. This function will allocate the stack
    1488             :  *  if necessary.
    1489             :  *  @param new_buffer The new state.
    1490             :  *  
    1491             :  */
    1492           0 : void syncrep_yypush_buffer_state (YY_BUFFER_STATE new_buffer )
    1493             : {
    1494           0 :         if (new_buffer == NULL)
    1495           0 :         return;
    1496             : 
    1497           0 :     syncrep_yyensure_buffer_stack();
    1498             : 
    1499             :     /* This block is copied from syncrep_yy_switch_to_buffer. */
    1500           0 :     if ( YY_CURRENT_BUFFER )
    1501             :         {
    1502             :         /* Flush out information for old buffer. */
    1503           0 :         *(yy_c_buf_p) = (yy_hold_char);
    1504           0 :         YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
    1505           0 :         YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
    1506             :         }
    1507             : 
    1508             :     /* Only push if top exists. Otherwise, replace top. */
    1509           0 :     if (YY_CURRENT_BUFFER)
    1510           0 :         (yy_buffer_stack_top)++;
    1511           0 :     YY_CURRENT_BUFFER_LVALUE = new_buffer;
    1512             : 
    1513             :     /* copied from syncrep_yy_switch_to_buffer. */
    1514           0 :     syncrep_yy_load_buffer_state( );
    1515           0 :     (yy_did_buffer_switch_on_eof) = 1;
    1516             : }
    1517             : 
    1518             : /** Removes and deletes the top of the stack, if present.
    1519             :  *  The next element becomes the new top.
    1520             :  *  
    1521             :  */
    1522           0 : void syncrep_yypop_buffer_state (void)
    1523             : {
    1524           0 :         if (!YY_CURRENT_BUFFER)
    1525           0 :         return;
    1526             : 
    1527           0 :     syncrep_yy_delete_buffer(YY_CURRENT_BUFFER );
    1528           0 :     YY_CURRENT_BUFFER_LVALUE = NULL;
    1529           0 :     if ((yy_buffer_stack_top) > 0)
    1530           0 :         --(yy_buffer_stack_top);
    1531             : 
    1532           0 :     if (YY_CURRENT_BUFFER) {
    1533           0 :         syncrep_yy_load_buffer_state( );
    1534           0 :         (yy_did_buffer_switch_on_eof) = 1;
    1535             :     }
    1536             : }
    1537             : 
    1538             : /* Allocates the stack if it does not exist.
    1539             :  *  Guarantees space for at least one push.
    1540             :  */
    1541           0 : static void syncrep_yyensure_buffer_stack (void)
    1542             : {
    1543             :     yy_size_t num_to_alloc;
    1544             :     
    1545           0 :     if (!(yy_buffer_stack)) {
    1546             : 
    1547             :         /* First allocation is just for 2 elements, since we don't know if this
    1548             :          * scanner will even need a stack. We use 2 instead of 1 to avoid an
    1549             :          * immediate realloc on the next call.
    1550             :          */
    1551           0 :         num_to_alloc = 1;
    1552           0 :         (yy_buffer_stack) = (struct yy_buffer_state**)syncrep_yyalloc
    1553             :                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
    1554             :                                 );
    1555           0 :         if ( ! (yy_buffer_stack) )
    1556           0 :             YY_FATAL_ERROR( "out of dynamic memory in syncrep_yyensure_buffer_stack()" );
    1557             :                                   
    1558           0 :         memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
    1559             :                 
    1560           0 :         (yy_buffer_stack_max) = num_to_alloc;
    1561           0 :         (yy_buffer_stack_top) = 0;
    1562           0 :         return;
    1563             :     }
    1564             : 
    1565           0 :     if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
    1566             : 
    1567             :         /* Increase the buffer to prepare for a possible push. */
    1568           0 :         int grow_size = 8 /* arbitrary grow size */;
    1569             : 
    1570           0 :         num_to_alloc = (yy_buffer_stack_max) + grow_size;
    1571           0 :         (yy_buffer_stack) = (struct yy_buffer_state**)syncrep_yyrealloc
    1572             :                                 ((yy_buffer_stack),
    1573             :                                 num_to_alloc * sizeof(struct yy_buffer_state*)
    1574             :                                 );
    1575           0 :         if ( ! (yy_buffer_stack) )
    1576           0 :             YY_FATAL_ERROR( "out of dynamic memory in syncrep_yyensure_buffer_stack()" );
    1577             : 
    1578             :         /* zero only the new slots.*/
    1579           0 :         memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
    1580           0 :         (yy_buffer_stack_max) = num_to_alloc;
    1581             :     }
    1582             : }
    1583             : 
    1584             : /** Setup the input buffer state to scan directly from a user-specified character buffer.
    1585             :  * @param base the character buffer
    1586             :  * @param size the size in bytes of the character buffer
    1587             :  * 
    1588             :  * @return the newly allocated buffer state object. 
    1589             :  */
    1590           0 : YY_BUFFER_STATE syncrep_yy_scan_buffer  (char * base, yy_size_t  size )
    1591             : {
    1592             :     YY_BUFFER_STATE b;
    1593             :     
    1594           0 :     if ( size < 2 ||
    1595           0 :          base[size-2] != YY_END_OF_BUFFER_CHAR ||
    1596           0 :          base[size-1] != YY_END_OF_BUFFER_CHAR )
    1597             :         /* They forgot to leave room for the EOB's. */
    1598           0 :         return 0;
    1599             : 
    1600           0 :     b = (YY_BUFFER_STATE) syncrep_yyalloc(sizeof( struct yy_buffer_state )  );
    1601           0 :     if ( ! b )
    1602           0 :         YY_FATAL_ERROR( "out of dynamic memory in syncrep_yy_scan_buffer()" );
    1603             : 
    1604           0 :     b->yy_buf_size = size - 2;   /* "- 2" to take care of EOB's */
    1605           0 :     b->yy_buf_pos = b->yy_ch_buf = base;
    1606           0 :     b->yy_is_our_buffer = 0;
    1607           0 :     b->yy_input_file = 0;
    1608           0 :     b->yy_n_chars = b->yy_buf_size;
    1609           0 :     b->yy_is_interactive = 0;
    1610           0 :     b->yy_at_bol = 1;
    1611           0 :     b->yy_fill_buffer = 0;
    1612           0 :     b->yy_buffer_status = YY_BUFFER_NEW;
    1613             : 
    1614           0 :     syncrep_yy_switch_to_buffer(b  );
    1615             : 
    1616           0 :     return b;
    1617             : }
    1618             : 
    1619             : /** Setup the input buffer state to scan a string. The next call to syncrep_yylex() will
    1620             :  * scan from a @e copy of @a str.
    1621             :  * @param yystr a NUL-terminated string to scan
    1622             :  * 
    1623             :  * @return the newly allocated buffer state object.
    1624             :  * @note If you want to scan bytes that may contain NUL values, then use
    1625             :  *       syncrep_yy_scan_bytes() instead.
    1626             :  */
    1627           0 : YY_BUFFER_STATE syncrep_yy_scan_string (yyconst char * yystr )
    1628             : {
    1629             :     
    1630           0 :     return syncrep_yy_scan_bytes(yystr,strlen(yystr) );
    1631             : }
    1632             : 
    1633             : /** Setup the input buffer state to scan the given bytes. The next call to syncrep_yylex() will
    1634             :  * scan from a @e copy of @a bytes.
    1635             :  * @param yybytes the byte buffer to scan
    1636             :  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
    1637             :  * 
    1638             :  * @return the newly allocated buffer state object.
    1639             :  */
    1640           0 : YY_BUFFER_STATE syncrep_yy_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len )
    1641             : {
    1642             :     YY_BUFFER_STATE b;
    1643             :     char *buf;
    1644             :     yy_size_t n;
    1645             :     yy_size_t i;
    1646             :     
    1647             :     /* Get memory for full buffer, including space for trailing EOB's. */
    1648           0 :     n = _yybytes_len + 2;
    1649           0 :     buf = (char *) syncrep_yyalloc(n  );
    1650           0 :     if ( ! buf )
    1651           0 :         YY_FATAL_ERROR( "out of dynamic memory in syncrep_yy_scan_bytes()" );
    1652             : 
    1653           0 :     for ( i = 0; i < _yybytes_len; ++i )
    1654           0 :         buf[i] = yybytes[i];
    1655             : 
    1656           0 :     buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
    1657             : 
    1658           0 :     b = syncrep_yy_scan_buffer(buf,n );
    1659           0 :     if ( ! b )
    1660           0 :         YY_FATAL_ERROR( "bad buffer in syncrep_yy_scan_bytes()" );
    1661             : 
    1662             :     /* It's okay to grow etc. this buffer, and we should throw it
    1663             :      * away when we're done.
    1664             :      */
    1665           0 :     b->yy_is_our_buffer = 1;
    1666             : 
    1667           0 :     return b;
    1668             : }
    1669             : 
    1670             : #ifndef YY_EXIT_FAILURE
    1671             : #define YY_EXIT_FAILURE 2
    1672             : #endif
    1673             : 
    1674           0 : static void yy_fatal_error (yyconst char* msg )
    1675             : {
    1676           0 :         (void) fprintf( stderr, "%s\n", msg );
    1677           0 :     exit( YY_EXIT_FAILURE );
    1678             : }
    1679             : 
    1680             : /* Redefine yyless() so it works in section 3 code. */
    1681             : 
    1682             : #undef yyless
    1683             : #define yyless(n) \
    1684             :     do \
    1685             :         { \
    1686             :         /* Undo effects of setting up syncrep_yytext. */ \
    1687             :         int yyless_macro_arg = (n); \
    1688             :         YY_LESS_LINENO(yyless_macro_arg);\
    1689             :         syncrep_yytext[syncrep_yyleng] = (yy_hold_char); \
    1690             :         (yy_c_buf_p) = syncrep_yytext + yyless_macro_arg; \
    1691             :         (yy_hold_char) = *(yy_c_buf_p); \
    1692             :         *(yy_c_buf_p) = '\0'; \
    1693             :         syncrep_yyleng = yyless_macro_arg; \
    1694             :         } \
    1695             :     while ( 0 )
    1696             : 
    1697             : /* Accessor  methods (get/set functions) to struct members. */
    1698             : 
    1699             : /** Get the current line number.
    1700             :  * 
    1701             :  */
    1702           0 : int syncrep_yyget_lineno  (void)
    1703             : {
    1704             :         
    1705           0 :     return syncrep_yylineno;
    1706             : }
    1707             : 
    1708             : /** Get the input stream.
    1709             :  * 
    1710             :  */
    1711           0 : FILE *syncrep_yyget_in  (void)
    1712             : {
    1713           0 :         return syncrep_yyin;
    1714             : }
    1715             : 
    1716             : /** Get the output stream.
    1717             :  * 
    1718             :  */
    1719           0 : FILE *syncrep_yyget_out  (void)
    1720             : {
    1721           0 :         return syncrep_yyout;
    1722             : }
    1723             : 
    1724             : /** Get the length of the current token.
    1725             :  * 
    1726             :  */
    1727           0 : yy_size_t syncrep_yyget_leng  (void)
    1728             : {
    1729           0 :         return syncrep_yyleng;
    1730             : }
    1731             : 
    1732             : /** Get the current token.
    1733             :  * 
    1734             :  */
    1735             : 
    1736           0 : char *syncrep_yyget_text  (void)
    1737             : {
    1738           0 :         return syncrep_yytext;
    1739             : }
    1740             : 
    1741             : /** Set the current line number.
    1742             :  * @param line_number
    1743             :  * 
    1744             :  */
    1745           0 : void syncrep_yyset_lineno (int  line_number )
    1746             : {
    1747             :     
    1748           0 :     syncrep_yylineno = line_number;
    1749           0 : }
    1750             : 
    1751             : /** Set the input stream. This does not discard the current
    1752             :  * input buffer.
    1753             :  * @param in_str A readable stream.
    1754             :  * 
    1755             :  * @see syncrep_yy_switch_to_buffer
    1756             :  */
    1757           0 : void syncrep_yyset_in (FILE *  in_str )
    1758             : {
    1759           0 :         syncrep_yyin = in_str ;
    1760           0 : }
    1761             : 
    1762           0 : void syncrep_yyset_out (FILE *  out_str )
    1763             : {
    1764           0 :         syncrep_yyout = out_str ;
    1765           0 : }
    1766             : 
    1767           0 : int syncrep_yyget_debug  (void)
    1768             : {
    1769           0 :         return syncrep_yy_flex_debug;
    1770             : }
    1771             : 
    1772           0 : void syncrep_yyset_debug (int  bdebug )
    1773             : {
    1774           0 :         syncrep_yy_flex_debug = bdebug ;
    1775           0 : }
    1776             : 
    1777           0 : static int yy_init_globals (void)
    1778             : {
    1779             :         /* Initialization is the same as for the non-reentrant scanner.
    1780             :      * This function is called from syncrep_yylex_destroy(), so don't allocate here.
    1781             :      */
    1782             : 
    1783           0 :     (yy_buffer_stack) = 0;
    1784           0 :     (yy_buffer_stack_top) = 0;
    1785           0 :     (yy_buffer_stack_max) = 0;
    1786           0 :     (yy_c_buf_p) = (char *) 0;
    1787           0 :     (yy_init) = 0;
    1788           0 :     (yy_start) = 0;
    1789             : 
    1790             : /* Defined in main.c */
    1791             : #ifdef YY_STDINIT
    1792             :     syncrep_yyin = stdin;
    1793             :     syncrep_yyout = stdout;
    1794             : #else
    1795           0 :     syncrep_yyin = (FILE *) 0;
    1796           0 :     syncrep_yyout = (FILE *) 0;
    1797             : #endif
    1798             : 
    1799             :     /* For future reference: Set errno on error, since we are called by
    1800             :      * syncrep_yylex_init()
    1801             :      */
    1802           0 :     return 0;
    1803             : }
    1804             : 
    1805             : /* syncrep_yylex_destroy is for both reentrant and non-reentrant scanners. */
    1806           0 : int syncrep_yylex_destroy  (void)
    1807             : {
    1808             :     
    1809             :     /* Pop the buffer stack, destroying each element. */
    1810           0 :     while(YY_CURRENT_BUFFER){
    1811           0 :         syncrep_yy_delete_buffer(YY_CURRENT_BUFFER  );
    1812           0 :         YY_CURRENT_BUFFER_LVALUE = NULL;
    1813           0 :         syncrep_yypop_buffer_state();
    1814             :     }
    1815             : 
    1816             :     /* Destroy the stack itself. */
    1817           0 :     syncrep_yyfree((yy_buffer_stack) );
    1818           0 :     (yy_buffer_stack) = NULL;
    1819             : 
    1820             :     /* Reset the globals. This is important in a non-reentrant scanner so the next time
    1821             :      * syncrep_yylex() is called, initialization will occur. */
    1822           0 :     yy_init_globals( );
    1823             : 
    1824           0 :     return 0;
    1825             : }
    1826             : 
    1827             : /*
    1828             :  * Internal utility routines.
    1829             :  */
    1830             : 
    1831             : #ifndef yytext_ptr
    1832             : static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
    1833             : {
    1834             :     register int i;
    1835             :     for ( i = 0; i < n; ++i )
    1836             :         s1[i] = s2[i];
    1837             : }
    1838             : #endif
    1839             : 
    1840             : #ifdef YY_NEED_STRLEN
    1841             : static int yy_flex_strlen (yyconst char * s )
    1842             : {
    1843             :     register int n;
    1844             :     for ( n = 0; s[n]; ++n )
    1845             :         ;
    1846             : 
    1847             :     return n;
    1848             : }
    1849             : #endif
    1850             : 
    1851           0 : void *syncrep_yyalloc (yy_size_t  size )
    1852             : {
    1853           0 :     return (void *) malloc( size );
    1854             : }
    1855             : 
    1856           0 : void *syncrep_yyrealloc  (void * ptr, yy_size_t  size )
    1857             : {
    1858             :     /* The cast to (char *) in the following accommodates both
    1859             :      * implementations that use char* generic pointers, and those
    1860             :      * that use void* generic pointers.  It works with the latter
    1861             :      * because both ANSI C and C++ allow castless assignment from
    1862             :      * any pointer type to void*, and deal with argument conversions
    1863             :      * as though doing an assignment.
    1864             :      */
    1865           0 :     return (void *) realloc( (char *) ptr, size );
    1866             : }
    1867             : 
    1868           0 : void syncrep_yyfree (void * ptr )
    1869             : {
    1870           0 :     free( (char *) ptr );   /* see syncrep_yyrealloc() for (char *) cast */
    1871           0 : }
    1872             : 
    1873             : #define YYTABLES_NAME "yytables"
    1874             : 
    1875             : #line 112 "syncrep_scanner.l"
    1876             : 
    1877             : 
    1878             : 
    1879             : 
    1880             : /* Needs to be here for access to syncrep_yytext */
    1881             : void
    1882             : syncrep_yyerror(const char *message)
    1883             : {
    1884             :     /* report only the first error in a parse operation */
    1885             :     if (syncrep_parse_error_msg)
    1886             :         return;
    1887             :     if (syncrep_yytext[0])
    1888             :         syncrep_parse_error_msg = psprintf("%s at or near \"%s\"",
    1889             :                                            message, syncrep_yytext);
    1890             :     else
    1891             :         syncrep_parse_error_msg = psprintf("%s at end of input",
    1892             :                                            message);
    1893             : }
    1894             : 
    1895             : void
    1896             : syncrep_scanner_init(const char *str)
    1897             : {
    1898             :     Size        slen = strlen(str);
    1899             :     char       *scanbuf;
    1900             : 
    1901             :     /*
    1902             :      * Might be left over after ereport()
    1903             :      */
    1904             :     if (YY_CURRENT_BUFFER)
    1905             :         syncrep_yy_delete_buffer(YY_CURRENT_BUFFER);
    1906             : 
    1907             :     /*
    1908             :      * Make a scan buffer with special termination needed by flex.
    1909             :      */
    1910             :     scanbuf = (char *) palloc(slen + 2);
    1911             :     memcpy(scanbuf, str, slen);
    1912             :     scanbuf[slen] = scanbuf[slen + 1] = YY_END_OF_BUFFER_CHAR;
    1913             :     scanbufhandle = syncrep_yy_scan_buffer(scanbuf,slen + 2);
    1914             : 
    1915             :     /* Make sure we start in proper state */
    1916             :     BEGIN(INITIAL);
    1917             : }
    1918             : 
    1919             : void
    1920             : syncrep_scanner_finish(void)
    1921             : {
    1922             :     syncrep_yy_delete_buffer(scanbufhandle);
    1923             :     scanbufhandle = NULL;
    1924             : }
    1925             : 

Generated by: LCOV version 1.11