"Fossies" - the Fresh Open Source Software Archive

Member "portfwd-0.29/src/lexconf.c" (28 Jan 2004, 51872 Bytes) of package /linux/privat/old/portfwd-0.29.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

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