LCOV - code coverage report
Current view: top level - bin/default/third_party/heimdal/lib/com_err - lex.lex.c (source / functions) Hit Total Coverage
Test: coverage report for master 98b443d9 Lines: 235 489 48.1 %
Date: 2024-05-31 13:13:24 Functions: 13 37 35.1 %

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

Generated by: LCOV version 1.14