LCOV - code coverage report
Current view: top level - bin/default/source3/rpc_server/mdssvc - es_lexer.lex.c (source / functions) Hit Total Coverage
Test: coverage report for master 6248eab5 Lines: 165 415 39.8 %
Date: 2021-08-25 13:27:56 Functions: 11 32 34.4 %

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

Generated by: LCOV version 1.13