configfile.c

00001 
00002 #line 3 "configfile.c"
00003 
00004 #define  YY_INT_ALIGNED short int
00005 
00006 /* A lexical scanner generated by flex */
00007 
00008 #define FLEX_SCANNER
00009 #define YY_FLEX_MAJOR_VERSION 2
00010 #define YY_FLEX_MINOR_VERSION 5
00011 #define YY_FLEX_SUBMINOR_VERSION 33
00012 #if YY_FLEX_SUBMINOR_VERSION > 0
00013 #define FLEX_BETA
00014 #endif
00015 
00016 /* First, we deal with  platform-specific or compiler-specific issues. */
00017 
00018 /* begin standard C headers. */
00019 #include <stdio.h>
00020 #include <string.h>
00021 #include <errno.h>
00022 #include <stdlib.h>
00023 
00024 /* end standard C headers. */
00025 
00026 /* flex integer type definitions */
00027 
00028 #ifndef FLEXINT_H
00029 #define FLEXINT_H
00030 
00031 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
00032 
00033 #if __STDC_VERSION__ >= 199901L
00034 
00035 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
00036  * if you want the limit (max/min) macros for int types. 
00037  */
00038 #ifndef __STDC_LIMIT_MACROS
00039 #define __STDC_LIMIT_MACROS 1
00040 #endif
00041 
00042 #include <inttypes.h>
00043 typedef int8_t flex_int8_t;
00044 typedef uint8_t flex_uint8_t;
00045 typedef int16_t flex_int16_t;
00046 typedef uint16_t flex_uint16_t;
00047 typedef int32_t flex_int32_t;
00048 typedef uint32_t flex_uint32_t;
00049 #else
00050 typedef signed char flex_int8_t;
00051 typedef short int flex_int16_t;
00052 typedef int flex_int32_t;
00053 typedef unsigned char flex_uint8_t; 
00054 typedef unsigned short int flex_uint16_t;
00055 typedef unsigned int flex_uint32_t;
00056 #endif /* ! C99 */
00057 
00058 /* Limits of integral types. */
00059 #ifndef INT8_MIN
00060 #define INT8_MIN               (-128)
00061 #endif
00062 #ifndef INT16_MIN
00063 #define INT16_MIN              (-32767-1)
00064 #endif
00065 #ifndef INT32_MIN
00066 #define INT32_MIN              (-2147483647-1)
00067 #endif
00068 #ifndef INT8_MAX
00069 #define INT8_MAX               (127)
00070 #endif
00071 #ifndef INT16_MAX
00072 #define INT16_MAX              (32767)
00073 #endif
00074 #ifndef INT32_MAX
00075 #define INT32_MAX              (2147483647)
00076 #endif
00077 #ifndef UINT8_MAX
00078 #define UINT8_MAX              (255U)
00079 #endif
00080 #ifndef UINT16_MAX
00081 #define UINT16_MAX             (65535U)
00082 #endif
00083 #ifndef UINT32_MAX
00084 #define UINT32_MAX             (4294967295U)
00085 #endif
00086 
00087 #endif /* ! FLEXINT_H */
00088 
00089 #ifdef __cplusplus
00090 
00091 /* The "const" storage-class-modifier is valid. */
00092 #define YY_USE_CONST
00093 
00094 #else   /* ! __cplusplus */
00095 
00096 #if __STDC__
00097 
00098 #define YY_USE_CONST
00099 
00100 #endif  /* __STDC__ */
00101 #endif  /* ! __cplusplus */
00102 
00103 #ifdef YY_USE_CONST
00104 #define yyconst const
00105 #else
00106 #define yyconst
00107 #endif
00108 
00109 /* Returned upon end-of-file. */
00110 #define YY_NULL 0
00111 
00112 /* Promotes a possibly negative, possibly signed char to an unsigned
00113  * integer for use as an array index.  If the signed char is negative,
00114  * we want to instead treat it as an 8-bit unsigned char, hence the
00115  * double cast.
00116  */
00117 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
00118 
00119 /* Enter a start condition.  This macro really ought to take a parameter,
00120  * but we do it the disgusting crufty way forced on us by the ()-less
00121  * definition of BEGIN.
00122  */
00123 #define BEGIN (yy_start) = 1 + 2 *
00124 
00125 /* Translate the current start state into a value that can be later handed
00126  * to BEGIN to return to the state.  The YYSTATE alias is for lex
00127  * compatibility.
00128  */
00129 #define YY_START (((yy_start) - 1) / 2)
00130 #define YYSTATE YY_START
00131 
00132 /* Action number for EOF rule of a given start state. */
00133 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
00134 
00135 /* Special action meaning "start processing a new file". */
00136 #define YY_NEW_FILE yyrestart(yyin  )
00137 
00138 #define YY_END_OF_BUFFER_CHAR 0
00139 
00140 /* Size of default input buffer. */
00141 #ifndef YY_BUF_SIZE
00142 #define YY_BUF_SIZE 16384
00143 #endif
00144 
00145 /* The state buf must be large enough to hold one state per character in the main buffer.
00146  */
00147 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
00148 
00149 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
00150 #define YY_TYPEDEF_YY_BUFFER_STATE
00151 typedef struct yy_buffer_state *YY_BUFFER_STATE;
00152 #endif
00153 
00154 extern int yyleng;
00155 
00156 extern FILE *yyin, *yyout;
00157 
00158 #define EOB_ACT_CONTINUE_SCAN 0
00159 #define EOB_ACT_END_OF_FILE 1
00160 #define EOB_ACT_LAST_MATCH 2
00161 
00162     #define YY_LESS_LINENO(n)
00163     
00164 /* Return all but the first "n" matched characters back to the input stream. */
00165 #define yyless(n) \
00166     do \
00167         { \
00168         /* Undo effects of setting up yytext. */ \
00169         int yyless_macro_arg = (n); \
00170         YY_LESS_LINENO(yyless_macro_arg);\
00171         *yy_cp = (yy_hold_char); \
00172         YY_RESTORE_YY_MORE_OFFSET \
00173         (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
00174         YY_DO_BEFORE_ACTION; /* set up yytext again */ \
00175         } \
00176     while ( 0 )
00177 
00178 #define unput(c) yyunput( c, (yytext_ptr)  )
00179 
00180 /* The following is because we cannot portably get our hands on size_t
00181  * (without autoconf's help, which isn't available because we want
00182  * flex-generated scanners to compile on their own).
00183  */
00184 
00185 #ifndef YY_TYPEDEF_YY_SIZE_T
00186 #define YY_TYPEDEF_YY_SIZE_T
00187 typedef unsigned int yy_size_t;
00188 #endif
00189 
00190 #ifndef YY_STRUCT_YY_BUFFER_STATE
00191 #define YY_STRUCT_YY_BUFFER_STATE
00192 struct yy_buffer_state
00193     {
00194     FILE *yy_input_file;
00195 
00196     char *yy_ch_buf;        /* input buffer */
00197     char *yy_buf_pos;       /* current position in input buffer */
00198 
00199     /* Size of input buffer in bytes, not including room for EOB
00200      * characters.
00201      */
00202     yy_size_t yy_buf_size;
00203 
00204     /* Number of characters read into yy_ch_buf, not including EOB
00205      * characters.
00206      */
00207     int yy_n_chars;
00208 
00209     /* Whether we "own" the buffer - i.e., we know we created it,
00210      * and can realloc() it to grow it, and should free() it to
00211      * delete it.
00212      */
00213     int yy_is_our_buffer;
00214 
00215     /* Whether this is an "interactive" input source; if so, and
00216      * if we're using stdio for input, then we want to use getc()
00217      * instead of fread(), to make sure we stop fetching input after
00218      * each newline.
00219      */
00220     int yy_is_interactive;
00221 
00222     /* Whether we're considered to be at the beginning of a line.
00223      * If so, '^' rules will be active on the next match, otherwise
00224      * not.
00225      */
00226     int yy_at_bol;
00227 
00228     int yy_bs_lineno; 
00229     int yy_bs_column; 
00231     /* Whether to try to fill the input buffer when we reach the
00232      * end of it.
00233      */
00234     int yy_fill_buffer;
00235 
00236     int yy_buffer_status;
00237 
00238 #define YY_BUFFER_NEW 0
00239 #define YY_BUFFER_NORMAL 1
00240     /* When an EOF's been seen but there's still some text to process
00241      * then we mark the buffer as YY_EOF_PENDING, to indicate that we
00242      * shouldn't try reading from the input source any more.  We might
00243      * still have a bunch of tokens to match, though, because of
00244      * possible backing-up.
00245      *
00246      * When we actually see the EOF, we change the status to "new"
00247      * (via yyrestart()), so that the user can continue scanning by
00248      * just pointing yyin at a new input file.
00249      */
00250 #define YY_BUFFER_EOF_PENDING 2
00251 
00252     };
00253 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
00254 
00255 /* Stack of input buffers. */
00256 static size_t yy_buffer_stack_top = 0; 
00257 static size_t yy_buffer_stack_max = 0; 
00258 static YY_BUFFER_STATE * yy_buffer_stack = 0; 
00260 /* We provide macros for accessing buffer states in case in the
00261  * future we want to put the buffer states in a more general
00262  * "scanner state".
00263  *
00264  * Returns the top of the stack, or NULL.
00265  */
00266 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
00267                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
00268                           : NULL)
00269 
00270 /* Same as previous macro, but useful when we know that the buffer stack is not
00271  * NULL or when we need an lvalue. For internal use only.
00272  */
00273 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
00274 
00275 /* yy_hold_char holds the character lost when yytext is formed. */
00276 static char yy_hold_char;
00277 static int yy_n_chars;      /* number of characters read into yy_ch_buf */
00278 int yyleng;
00279 
00280 /* Points to current character in buffer. */
00281 static char *yy_c_buf_p = (char *) 0;
00282 static int yy_init = 0;     /* whether we need to initialize */
00283 static int yy_start = 0;    /* start state number */
00284 
00285 /* Flag which is used to allow yywrap()'s to do buffer switches
00286  * instead of setting up a fresh yyin.  A bit of a hack ...
00287  */
00288 static int yy_did_buffer_switch_on_eof;
00289 
00290 void yyrestart (FILE *input_file  );
00291 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
00292 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
00293 void yy_delete_buffer (YY_BUFFER_STATE b  );
00294 void yy_flush_buffer (YY_BUFFER_STATE b  );
00295 void yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
00296 void yypop_buffer_state (void );
00297 
00298 static void yyensure_buffer_stack (void );
00299 static void yy_load_buffer_state (void );
00300 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  );
00301 
00302 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
00303 
00304 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  );
00305 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
00306 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len  );
00307 
00308 void *yyalloc (yy_size_t  );
00309 void *yyrealloc (void *,yy_size_t  );
00310 void yyfree (void *  );
00311 
00312 #define yy_new_buffer yy_create_buffer
00313 
00314 #define yy_set_interactive(is_interactive) \
00315     { \
00316     if ( ! YY_CURRENT_BUFFER ){ \
00317         yyensure_buffer_stack (); \
00318         YY_CURRENT_BUFFER_LVALUE =    \
00319             yy_create_buffer(yyin,YY_BUF_SIZE ); \
00320     } \
00321     YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
00322     }
00323 
00324 #define yy_set_bol(at_bol) \
00325     { \
00326     if ( ! YY_CURRENT_BUFFER ){\
00327         yyensure_buffer_stack (); \
00328         YY_CURRENT_BUFFER_LVALUE =    \
00329             yy_create_buffer(yyin,YY_BUF_SIZE ); \
00330     } \
00331     YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
00332     }
00333 
00334 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
00335 
00336 /* Begin user sect3 */
00337 
00338 #define yywrap() 1
00339 #define YY_SKIP_YYWRAP
00340 
00341 typedef unsigned char YY_CHAR;
00342 
00343 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
00344 
00345 typedef int yy_state_type;
00346 
00347 extern int yylineno;
00348 
00349 int yylineno = 1;
00350 
00351 extern char *yytext;
00352 #define yytext_ptr yytext
00353 
00354 static yy_state_type yy_get_previous_state (void );
00355 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
00356 static int yy_get_next_buffer (void );
00357 static void yy_fatal_error (yyconst char msg[]  );
00358 
00359 /* Done after the current pattern has been matched and before the
00360  * corresponding action - sets up yytext.
00361  */
00362 #define YY_DO_BEFORE_ACTION \
00363     (yytext_ptr) = yy_bp; \
00364     yyleng = (size_t) (yy_cp - yy_bp); \
00365     (yy_hold_char) = *yy_cp; \
00366     *yy_cp = '\0'; \
00367     (yy_c_buf_p) = yy_cp;
00368 
00369 #define YY_NUM_RULES 7
00370 #define YY_END_OF_BUFFER 8
00371 /* This struct is not used in this scanner,
00372    but its presence is necessary. */
00373 struct yy_trans_info
00374     {
00375     flex_int32_t yy_verify;
00376     flex_int32_t yy_nxt;
00377     };
00378 static yyconst flex_int16_t yy_accept[17] =
00379     {   0,
00380         0,    0,    8,    6,    4,    2,    6,    1,    6,    5,
00381         0,    3,    1,    0,    5,    0
00382     } ;
00383 
00384 static yyconst flex_int32_t yy_ec[256] =
00385     {   0,
00386         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
00387         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00388         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00389         1,    2,    1,    4,    5,    1,    1,    1,    6,    1,
00390         1,    1,    1,    1,    7,    7,    7,    8,    8,    8,
00391         8,    8,    8,    8,    8,    8,    8,    7,    1,    1,
00392         1,    1,    1,    7,    9,    9,    9,    9,    9,    9,
00393         9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
00394         9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
00395         1,    7,    1,    1,    7,    1,   10,   10,   10,   10,
00396 
00397        10,   10,   10,   10,   10,   10,   10,   10,   10,   10,
00398        10,   10,   10,   10,   10,   10,   10,   10,   10,   10,
00399        10,   10,    1,    1,    1,    1,    1,    1,    1,    1,
00400         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00401         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00402         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00403         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00404         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00405         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00406         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00407 
00408         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00409         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00410         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00411         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00412         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00413         1,    1,    1,    1,    1
00414     } ;
00415 
00416 static yyconst flex_int32_t yy_meta[11] =
00417     {   0,
00418         1,    1,    2,    1,    1,    1,    1,    1,    1,    1
00419     } ;
00420 
00421 static yyconst flex_int16_t yy_base[20] =
00422     {   0,
00423         0,    0,   15,   31,   31,   31,    8,    0,   10,   10,
00424        18,   31,    0,   20,    0,   31,   26,   13,   28
00425     } ;
00426 
00427 static yyconst flex_int16_t yy_def[20] =
00428     {   0,
00429        16,    1,   16,   16,   16,   16,   17,   18,   19,   16,
00430        17,   16,   18,   19,   10,    0,   16,   16,   16
00431     } ;
00432 
00433 static yyconst flex_int16_t yy_nxt[42] =
00434     {   0,
00435         4,    5,    6,    7,    8,    9,   10,   10,   10,   10,
00436        12,   12,   12,   13,   16,   12,   15,   15,   15,   15,
00437        12,   12,   12,   16,   16,   12,   11,   11,   14,   14,
00438         3,   16,   16,   16,   16,   16,   16,   16,   16,   16,
00439        16
00440     } ;
00441 
00442 static yyconst flex_int16_t yy_chk[42] =
00443     {   0,
00444         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00445         7,    7,    9,   18,    3,    9,   10,   10,   10,   10,
00446        11,   11,   14,    0,    0,   14,   17,   17,   19,   19,
00447        16,   16,   16,   16,   16,   16,   16,   16,   16,   16,
00448        16
00449     } ;
00450 
00451 static yy_state_type yy_last_accepting_state;
00452 static char *yy_last_accepting_cpos;
00453 
00454 extern int yy_flex_debug;
00455 int yy_flex_debug = 0;
00456 
00457 /* The intent behind this definition is that it'll catch
00458  * any uses of REJECT which flex missed.
00459  */
00460 #define REJECT reject_used_but_not_detected
00461 #define yymore() yymore_used_but_not_detected
00462 #define YY_MORE_ADJ 0
00463 #define YY_RESTORE_YY_MORE_OFFSET
00464 char *yytext;
00465 #line 1 "configfile.l"
00466 /*
00467  * Reads lexical config files and updates database.
00468  *
00469  * MUSCLE SmartCard Development ( http://www.linuxnet.com )
00470  *
00471  * Copyright (C) 1999-2004
00472  *  David Corcoran <corcoran@linuxnet.com>
00473  *  Damien Sauveron <damien.sauveron@labri.fr>
00474  *  Ludovic Rousseau <ludovic.rousseau@free.fr>
00475  *
00476  * $Id: configfile.l 2718 2008-01-03 14:33:14Z rousseau $
00477  */
00478 #line 15 "configfile.l"
00479 #include "wintypes.h"
00480 #include "pcscd.h"
00481 #include "readerfactory.h"
00482 #include "configfile.h"
00483 
00484 int evaluatetoken(char *pcToken);
00485 
00486 static int iLinenumber;
00487 static int iOldLinenumber;
00488 static char *pcPrevious;
00489 static char *pcCurrent;
00490 static char *pcFriendlyname;
00491 static char *pcDevicename;
00492 static char *pcLibpath;
00493 static char *pcChannelid;
00494 static int badError;
00495 static SerialReader *reader_list;
00496 static int reader_list_size;
00497 
00498 void tok_error(char *pcToken_error);
00499 
00500 #line 501 "configfile.c"
00501 
00502 #define INITIAL 0
00503 
00504 #ifndef YY_NO_UNISTD_H
00505 /* Special case for "unistd.h", since it is non-ANSI. We include it way
00506  * down here because we want the user's section 1 to have been scanned first.
00507  * The user has a chance to override it with an option.
00508  */
00509 #include <unistd.h>
00510 #endif
00511 
00512 #ifndef YY_EXTRA_TYPE
00513 #define YY_EXTRA_TYPE void *
00514 #endif
00515 
00516 static int yy_init_globals (void );
00517 
00518 /* Macros after this point can all be overridden by user definitions in
00519  * section 1.
00520  */
00521 
00522 #ifndef YY_SKIP_YYWRAP
00523 #ifdef __cplusplus
00524 extern "C" int yywrap (void );
00525 #else
00526 extern int yywrap (void );
00527 #endif
00528 #endif
00529 
00530 #ifndef yytext_ptr
00531 static void yy_flex_strncpy (char *,yyconst char *,int );
00532 #endif
00533 
00534 #ifdef YY_NEED_STRLEN
00535 static int yy_flex_strlen (yyconst char * );
00536 #endif
00537 
00538 #ifndef YY_NO_INPUT
00539 
00540 #ifdef __cplusplus
00541 static int yyinput (void );
00542 #else
00543 static int input (void );
00544 #endif
00545 
00546 #endif
00547 
00548 /* Amount of stuff to slurp up with each read. */
00549 #ifndef YY_READ_BUF_SIZE
00550 #define YY_READ_BUF_SIZE 8192
00551 #endif
00552 
00553 /* Copy whatever the last rule matched to the standard output. */
00554 #ifndef ECHO
00555 /* This used to be an fputs(), but since the string might contain NUL's,
00556  * we now use fwrite().
00557  */
00558 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
00559 #endif
00560 
00561 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
00562  * is returned in "result".
00563  */
00564 #ifndef YY_INPUT
00565 #define YY_INPUT(buf,result,max_size) \
00566     if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
00567         { \
00568         int c = '*'; \
00569         size_t n; \
00570         for ( n = 0; n < max_size && \
00571                  (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
00572             buf[n] = (char) c; \
00573         if ( c == '\n' ) \
00574             buf[n++] = (char) c; \
00575         if ( c == EOF && ferror( yyin ) ) \
00576             YY_FATAL_ERROR( "input in flex scanner failed" ); \
00577         result = n; \
00578         } \
00579     else \
00580         { \
00581         errno=0; \
00582         while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
00583             { \
00584             if( errno != EINTR) \
00585                 { \
00586                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
00587                 break; \
00588                 } \
00589             errno=0; \
00590             clearerr(yyin); \
00591             } \
00592         }\
00593 \
00594 
00595 #endif
00596 
00597 /* No semi-colon after return; correct usage is to write "yyterminate();" -
00598  * we don't want an extra ';' after the "return" because that will cause
00599  * some compilers to complain about unreachable statements.
00600  */
00601 #ifndef yyterminate
00602 #define yyterminate() return YY_NULL
00603 #endif
00604 
00605 /* Number of entries by which start-condition stack grows. */
00606 #ifndef YY_START_STACK_INCR
00607 #define YY_START_STACK_INCR 25
00608 #endif
00609 
00610 /* Report a fatal error. */
00611 #ifndef YY_FATAL_ERROR
00612 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
00613 #endif
00614 
00615 /* end tables serialization structures and prototypes */
00616 
00617 /* Default declaration of generated scanner - a define so the user can
00618  * easily add parameters.
00619  */
00620 #ifndef YY_DECL
00621 #define YY_DECL_IS_OURS 1
00622 
00623 extern int yylex (void);
00624 
00625 #define YY_DECL int yylex (void)
00626 #endif /* !YY_DECL */
00627 
00628 /* Code executed at the beginning of each rule, after yytext and yyleng
00629  * have been set up.
00630  */
00631 #ifndef YY_USER_ACTION
00632 #define YY_USER_ACTION
00633 #endif
00634 
00635 /* Code executed at the end of each rule. */
00636 #ifndef YY_BREAK
00637 #define YY_BREAK break;
00638 #endif
00639 
00640 #define YY_RULE_SETUP \
00641     YY_USER_ACTION
00642 
00645 YY_DECL
00646 {
00647     register yy_state_type yy_current_state;
00648     register char *yy_cp, *yy_bp;
00649     register int yy_act;
00650     
00651 #line 41 "configfile.l"
00652 
00653 
00654 #line 655 "configfile.c"
00655 
00656     if ( !(yy_init) )
00657         {
00658         (yy_init) = 1;
00659 
00660 #ifdef YY_USER_INIT
00661         YY_USER_INIT;
00662 #endif
00663 
00664         if ( ! (yy_start) )
00665             (yy_start) = 1; /* first start state */
00666 
00667         if ( ! yyin )
00668             yyin = stdin;
00669 
00670         if ( ! yyout )
00671             yyout = stdout;
00672 
00673         if ( ! YY_CURRENT_BUFFER ) {
00674             yyensure_buffer_stack ();
00675             YY_CURRENT_BUFFER_LVALUE =
00676                 yy_create_buffer(yyin,YY_BUF_SIZE );
00677         }
00678 
00679         yy_load_buffer_state( );
00680         }
00681 
00682     while ( 1 )     /* loops until end-of-file is reached */
00683         {
00684         yy_cp = (yy_c_buf_p);
00685 
00686         /* Support of yytext. */
00687         *yy_cp = (yy_hold_char);
00688 
00689         /* yy_bp points to the position in yy_ch_buf of the start of
00690          * the current run.
00691          */
00692         yy_bp = yy_cp;
00693 
00694         yy_current_state = (yy_start);
00695 yy_match:
00696         do
00697             {
00698             register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
00699             if ( yy_accept[yy_current_state] )
00700                 {
00701                 (yy_last_accepting_state) = yy_current_state;
00702                 (yy_last_accepting_cpos) = yy_cp;
00703                 }
00704             while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
00705                 {
00706                 yy_current_state = (int) yy_def[yy_current_state];
00707                 if ( yy_current_state >= 17 )
00708                     yy_c = yy_meta[(unsigned int) yy_c];
00709                 }
00710             yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
00711             ++yy_cp;
00712             }
00713         while ( yy_base[yy_current_state] != 31 );
00714 
00715 yy_find_action:
00716         yy_act = yy_accept[yy_current_state];
00717         if ( yy_act == 0 )
00718             { /* have to back up */
00719             yy_cp = (yy_last_accepting_cpos);
00720             yy_current_state = (yy_last_accepting_state);
00721             yy_act = yy_accept[yy_current_state];
00722             }
00723 
00724         YY_DO_BEFORE_ACTION;
00725 
00726 do_action:  /* This label is used only to access EOF actions. */
00727 
00728         switch ( yy_act )
00729     { /* beginning of action switch */
00730             case 0: /* must back up */
00731             /* undo the effects of YY_DO_BEFORE_ACTION */
00732             *yy_cp = (yy_hold_char);
00733             yy_cp = (yy_last_accepting_cpos);
00734             yy_current_state = (yy_last_accepting_state);
00735             goto yy_find_action;
00736 
00737 case 1:
00738 YY_RULE_SETUP
00739 #line 43 "configfile.l"
00740 {}
00741     YY_BREAK
00742 case 2:
00743 /* rule 2 can match eol */
00744 YY_RULE_SETUP
00745 #line 44 "configfile.l"
00746 { iLinenumber++; }
00747     YY_BREAK
00748 case 3:
00749 /* rule 3 can match eol */
00750 YY_RULE_SETUP
00751 #line 45 "configfile.l"
00752 { evaluatetoken( yytext); }
00753     YY_BREAK
00754 case 4:
00755 YY_RULE_SETUP
00756 #line 46 "configfile.l"
00757 {}
00758     YY_BREAK
00759 case 5:
00760 YY_RULE_SETUP
00761 #line 47 "configfile.l"
00762 { evaluatetoken( yytext ); }
00763     YY_BREAK
00764 case 6:
00765 YY_RULE_SETUP
00766 #line 48 "configfile.l"
00767 { tok_error( yytext ); }
00768     YY_BREAK
00769 case 7:
00770 YY_RULE_SETUP
00771 #line 49 "configfile.l"
00772 ECHO;
00773     YY_BREAK
00774 #line 775 "configfile.c"
00775 case YY_STATE_EOF(INITIAL):
00776     yyterminate();
00777 
00778     case YY_END_OF_BUFFER:
00779         {
00780         /* Amount of text matched not including the EOB char. */
00781         int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
00782 
00783         /* Undo the effects of YY_DO_BEFORE_ACTION. */
00784         *yy_cp = (yy_hold_char);
00785         YY_RESTORE_YY_MORE_OFFSET
00786 
00787         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
00788             {
00789             /* We're scanning a new file or input source.  It's
00790              * possible that this happened because the user
00791              * just pointed yyin at a new source and called
00792              * yylex().  If so, then we have to assure
00793              * consistency between YY_CURRENT_BUFFER and our
00794              * globals.  Here is the right place to do so, because
00795              * this is the first action (other than possibly a
00796              * back-up) that will match for the new input source.
00797              */
00798             (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
00799             YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
00800             YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
00801             }
00802 
00803         /* Note that here we test for yy_c_buf_p "<=" to the position
00804          * of the first EOB in the buffer, since yy_c_buf_p will
00805          * already have been incremented past the NUL character
00806          * (since all states make transitions on EOB to the
00807          * end-of-buffer state).  Contrast this with the test
00808          * in input().
00809          */
00810         if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
00811             { /* This was really a NUL. */
00812             yy_state_type yy_next_state;
00813 
00814             (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
00815 
00816             yy_current_state = yy_get_previous_state(  );
00817 
00818             /* Okay, we're now positioned to make the NUL
00819              * transition.  We couldn't have
00820              * yy_get_previous_state() go ahead and do it
00821              * for us because it doesn't know how to deal
00822              * with the possibility of jamming (and we don't
00823              * want to build jamming into it because then it
00824              * will run more slowly).
00825              */
00826 
00827             yy_next_state = yy_try_NUL_trans( yy_current_state );
00828 
00829             yy_bp = (yytext_ptr) + YY_MORE_ADJ;
00830 
00831             if ( yy_next_state )
00832                 {
00833                 /* Consume the NUL. */
00834                 yy_cp = ++(yy_c_buf_p);
00835                 yy_current_state = yy_next_state;
00836                 goto yy_match;
00837                 }
00838 
00839             else
00840                 {
00841                 yy_cp = (yy_c_buf_p);
00842                 goto yy_find_action;
00843                 }
00844             }
00845 
00846         else switch ( yy_get_next_buffer(  ) )
00847             {
00848             case EOB_ACT_END_OF_FILE:
00849                 {
00850                 (yy_did_buffer_switch_on_eof) = 0;
00851 
00852                 if ( yywrap( ) )
00853                     {
00854                     /* Note: because we've taken care in
00855                      * yy_get_next_buffer() to have set up
00856                      * yytext, we can now set up
00857                      * yy_c_buf_p so that if some total
00858                      * hoser (like flex itself) wants to
00859                      * call the scanner after we return the
00860                      * YY_NULL, it'll still work - another
00861                      * YY_NULL will get returned.
00862                      */
00863                     (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
00864 
00865                     yy_act = YY_STATE_EOF(YY_START);
00866                     goto do_action;
00867                     }
00868 
00869                 else
00870                     {
00871                     if ( ! (yy_did_buffer_switch_on_eof) )
00872                         YY_NEW_FILE;
00873                     }
00874                 break;
00875                 }
00876 
00877             case EOB_ACT_CONTINUE_SCAN:
00878                 (yy_c_buf_p) =
00879                     (yytext_ptr) + yy_amount_of_matched_text;
00880 
00881                 yy_current_state = yy_get_previous_state(  );
00882 
00883                 yy_cp = (yy_c_buf_p);
00884                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
00885                 goto yy_match;
00886 
00887             case EOB_ACT_LAST_MATCH:
00888                 (yy_c_buf_p) =
00889                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
00890 
00891                 yy_current_state = yy_get_previous_state(  );
00892 
00893                 yy_cp = (yy_c_buf_p);
00894                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
00895                 goto yy_find_action;
00896             }
00897         break;
00898         }
00899 
00900     default:
00901         YY_FATAL_ERROR(
00902             "fatal flex scanner internal error--no action found" );
00903     } /* end of action switch */
00904         } /* end of scanning one token */
00905 } /* end of yylex */
00906 
00907 /* yy_get_next_buffer - try to read in a new buffer
00908  *
00909  * Returns a code representing an action:
00910  *  EOB_ACT_LAST_MATCH -
00911  *  EOB_ACT_CONTINUE_SCAN - continue scanning from current position
00912  *  EOB_ACT_END_OF_FILE - end of file
00913  */
00914 static int yy_get_next_buffer (void)
00915 {
00916         register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
00917     register char *source = (yytext_ptr);
00918     register int number_to_move, i;
00919     int ret_val;
00920 
00921     if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
00922         YY_FATAL_ERROR(
00923         "fatal flex scanner internal error--end of buffer missed" );
00924 
00925     if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
00926         { /* Don't try to fill the buffer, so this is an EOF. */
00927         if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
00928             {
00929             /* We matched a single character, the EOB, so
00930              * treat this as a final EOF.
00931              */
00932             return EOB_ACT_END_OF_FILE;
00933             }
00934 
00935         else
00936             {
00937             /* We matched some text prior to the EOB, first
00938              * process it.
00939              */
00940             return EOB_ACT_LAST_MATCH;
00941             }
00942         }
00943 
00944     /* Try to read more data. */
00945 
00946     /* First move last chars to start of buffer. */
00947     number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
00948 
00949     for ( i = 0; i < number_to_move; ++i )
00950         *(dest++) = *(source++);
00951 
00952     if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
00953         /* don't do the read, it's not guaranteed to return an EOF,
00954          * just force an EOF
00955          */
00956         YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
00957 
00958     else
00959         {
00960             int num_to_read =
00961             YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
00962 
00963         while ( num_to_read <= 0 )
00964             { /* Not enough room in the buffer - grow it. */
00965 
00966             /* just a shorter name for the current buffer */
00967             YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
00968 
00969             int yy_c_buf_p_offset =
00970                 (int) ((yy_c_buf_p) - b->yy_ch_buf);
00971 
00972             if ( b->yy_is_our_buffer )
00973                 {
00974                 int new_size = b->yy_buf_size * 2;
00975 
00976                 if ( new_size <= 0 )
00977                     b->yy_buf_size += b->yy_buf_size / 8;
00978                 else
00979                     b->yy_buf_size *= 2;
00980 
00981                 b->yy_ch_buf = (char *)
00982                     /* Include room in for 2 EOB chars. */
00983                     yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
00984                 }
00985             else
00986                 /* Can't grow it, we don't own it. */
00987                 b->yy_ch_buf = 0;
00988 
00989             if ( ! b->yy_ch_buf )
00990                 YY_FATAL_ERROR(
00991                 "fatal error - scanner input buffer overflow" );
00992 
00993             (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
00994 
00995             num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
00996                         number_to_move - 1;
00997 
00998             }
00999 
01000         if ( num_to_read > YY_READ_BUF_SIZE )
01001             num_to_read = YY_READ_BUF_SIZE;
01002 
01003         /* Read in more data. */
01004         YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
01005             (yy_n_chars), (size_t) num_to_read );
01006 
01007         YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
01008         }
01009 
01010     if ( (yy_n_chars) == 0 )
01011         {
01012         if ( number_to_move == YY_MORE_ADJ )
01013             {
01014             ret_val = EOB_ACT_END_OF_FILE;
01015             yyrestart(yyin  );
01016             }
01017 
01018         else
01019             {
01020             ret_val = EOB_ACT_LAST_MATCH;
01021             YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
01022                 YY_BUFFER_EOF_PENDING;
01023             }
01024         }
01025 
01026     else
01027         ret_val = EOB_ACT_CONTINUE_SCAN;
01028 
01029     (yy_n_chars) += number_to_move;
01030     YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
01031     YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
01032 
01033     (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
01034 
01035     return ret_val;
01036 }
01037 
01038 /* yy_get_previous_state - get the state just before the EOB char was reached */
01039 
01040     static yy_state_type yy_get_previous_state (void)
01041 {
01042     register yy_state_type yy_current_state;
01043     register char *yy_cp;
01044     
01045     yy_current_state = (yy_start);
01046 
01047     for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
01048         {
01049         register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
01050         if ( yy_accept[yy_current_state] )
01051             {
01052             (yy_last_accepting_state) = yy_current_state;
01053             (yy_last_accepting_cpos) = yy_cp;
01054             }
01055         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01056             {
01057             yy_current_state = (int) yy_def[yy_current_state];
01058             if ( yy_current_state >= 17 )
01059                 yy_c = yy_meta[(unsigned int) yy_c];
01060             }
01061         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01062         }
01063 
01064     return yy_current_state;
01065 }
01066 
01067 /* yy_try_NUL_trans - try to make a transition on the NUL character
01068  *
01069  * synopsis
01070  *  next_state = yy_try_NUL_trans( current_state );
01071  */
01072     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
01073 {
01074     register int yy_is_jam;
01075         register char *yy_cp = (yy_c_buf_p);
01076 
01077     register YY_CHAR yy_c = 1;
01078     if ( yy_accept[yy_current_state] )
01079         {
01080         (yy_last_accepting_state) = yy_current_state;
01081         (yy_last_accepting_cpos) = yy_cp;
01082         }
01083     while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01084         {
01085         yy_current_state = (int) yy_def[yy_current_state];
01086         if ( yy_current_state >= 17 )
01087             yy_c = yy_meta[(unsigned int) yy_c];
01088         }
01089     yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01090     yy_is_jam = (yy_current_state == 16);
01091 
01092     return yy_is_jam ? 0 : yy_current_state;
01093 }
01094 
01095 #ifndef YY_NO_INPUT
01096 #ifdef __cplusplus
01097     static int yyinput (void)
01098 #else
01099     static int input  (void)
01100 #endif
01101 
01102 {
01103     int c;
01104     
01105     *(yy_c_buf_p) = (yy_hold_char);
01106 
01107     if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
01108         {
01109         /* yy_c_buf_p now points to the character we want to return.
01110          * If this occurs *before* the EOB characters, then it's a
01111          * valid NUL; if not, then we've hit the end of the buffer.
01112          */
01113         if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
01114             /* This was really a NUL. */
01115             *(yy_c_buf_p) = '\0';
01116 
01117         else
01118             { /* need more input */
01119             int offset = (yy_c_buf_p) - (yytext_ptr);
01120             ++(yy_c_buf_p);
01121 
01122             switch ( yy_get_next_buffer(  ) )
01123                 {
01124                 case EOB_ACT_LAST_MATCH:
01125                     /* This happens because yy_g_n_b()
01126                      * sees that we've accumulated a
01127                      * token and flags that we need to
01128                      * try matching the token before
01129                      * proceeding.  But for input(),
01130                      * there's no matching to consider.
01131                      * So convert the EOB_ACT_LAST_MATCH
01132                      * to EOB_ACT_END_OF_FILE.
01133                      */
01134 
01135                     /* Reset buffer status. */
01136                     yyrestart(yyin );
01137 
01138                     /*FALLTHROUGH*/
01139 
01140                 case EOB_ACT_END_OF_FILE:
01141                     {
01142                     if ( yywrap( ) )
01143                         return EOF;
01144 
01145                     if ( ! (yy_did_buffer_switch_on_eof) )
01146                         YY_NEW_FILE;
01147 #ifdef __cplusplus
01148                     return yyinput();
01149 #else
01150                     return input();
01151 #endif
01152                     }
01153 
01154                 case EOB_ACT_CONTINUE_SCAN:
01155                     (yy_c_buf_p) = (yytext_ptr) + offset;
01156                     break;
01157                 }
01158             }
01159         }
01160 
01161     c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
01162     *(yy_c_buf_p) = '\0';   /* preserve yytext */
01163     (yy_hold_char) = *++(yy_c_buf_p);
01164 
01165     return c;
01166 }
01167 #endif  /* ifndef YY_NO_INPUT */
01168 
01174     void yyrestart  (FILE * input_file )
01175 {
01176     
01177     if ( ! YY_CURRENT_BUFFER ){
01178         yyensure_buffer_stack ();
01179         YY_CURRENT_BUFFER_LVALUE =
01180             yy_create_buffer(yyin,YY_BUF_SIZE );
01181     }
01182 
01183     yy_init_buffer(YY_CURRENT_BUFFER,input_file );
01184     yy_load_buffer_state( );
01185 }
01186 
01191     void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
01192 {
01193     
01194     /* TODO. We should be able to replace this entire function body
01195      * with
01196      *      yypop_buffer_state();
01197      *      yypush_buffer_state(new_buffer);
01198      */
01199     yyensure_buffer_stack ();
01200     if ( YY_CURRENT_BUFFER == new_buffer )
01201         return;
01202 
01203     if ( YY_CURRENT_BUFFER )
01204         {
01205         /* Flush out information for old buffer. */
01206         *(yy_c_buf_p) = (yy_hold_char);
01207         YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
01208         YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
01209         }
01210 
01211     YY_CURRENT_BUFFER_LVALUE = new_buffer;
01212     yy_load_buffer_state( );
01213 
01214     /* We don't actually know whether we did this switch during
01215      * EOF (yywrap()) processing, but the only time this flag
01216      * is looked at is after yywrap() is called, so it's safe
01217      * to go ahead and always set it.
01218      */
01219     (yy_did_buffer_switch_on_eof) = 1;
01220 }
01221 
01222 static void yy_load_buffer_state  (void)
01223 {
01224         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
01225     (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
01226     yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
01227     (yy_hold_char) = *(yy_c_buf_p);
01228 }
01229 
01236     YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
01237 {
01238     YY_BUFFER_STATE b;
01239     
01240     b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
01241     if ( ! b )
01242         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
01243 
01244     b->yy_buf_size = size;
01245 
01246     /* yy_ch_buf has to be 2 characters longer than the size given because
01247      * we need to put in 2 end-of-buffer characters.
01248      */
01249     b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  );
01250     if ( ! b->yy_ch_buf )
01251         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
01252 
01253     b->yy_is_our_buffer = 1;
01254 
01255     yy_init_buffer(b,file );
01256 
01257     return b;
01258 }
01259 
01264     void yy_delete_buffer (YY_BUFFER_STATE  b )
01265 {
01266     
01267     if ( ! b )
01268         return;
01269 
01270     if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
01271         YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
01272 
01273     if ( b->yy_is_our_buffer )
01274         yyfree((void *) b->yy_ch_buf  );
01275 
01276     yyfree((void *) b  );
01277 }
01278 
01279 #ifndef __cplusplus
01280 extern int isatty (int );
01281 #endif /* __cplusplus */
01282     
01283 /* Initializes or reinitializes a buffer.
01284  * This function is sometimes called more than once on the same buffer,
01285  * such as during a yyrestart() or at EOF.
01286  */
01287     static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
01288 
01289 {
01290     int oerrno = errno;
01291     
01292     yy_flush_buffer(b );
01293 
01294     b->yy_input_file = file;
01295     b->yy_fill_buffer = 1;
01296 
01297     /* If b is the current buffer, then yy_init_buffer was _probably_
01298      * called from yyrestart() or through yy_get_next_buffer.
01299      * In that case, we don't want to reset the lineno or column.
01300      */
01301     if (b != YY_CURRENT_BUFFER){
01302         b->yy_bs_lineno = 1;
01303         b->yy_bs_column = 0;
01304     }
01305 
01306         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
01307     
01308     errno = oerrno;
01309 }
01310 
01315     void yy_flush_buffer (YY_BUFFER_STATE  b )
01316 {
01317         if ( ! b )
01318         return;
01319 
01320     b->yy_n_chars = 0;
01321 
01322     /* We always need two end-of-buffer characters.  The first causes
01323      * a transition to the end-of-buffer state.  The second causes
01324      * a jam in that state.
01325      */
01326     b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
01327     b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
01328 
01329     b->yy_buf_pos = &b->yy_ch_buf[0];
01330 
01331     b->yy_at_bol = 1;
01332     b->yy_buffer_status = YY_BUFFER_NEW;
01333 
01334     if ( b == YY_CURRENT_BUFFER )
01335         yy_load_buffer_state( );
01336 }
01337 
01344 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
01345 {
01346         if (new_buffer == NULL)
01347         return;
01348 
01349     yyensure_buffer_stack();
01350 
01351     /* This block is copied from yy_switch_to_buffer. */
01352     if ( YY_CURRENT_BUFFER )
01353         {
01354         /* Flush out information for old buffer. */
01355         *(yy_c_buf_p) = (yy_hold_char);
01356         YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
01357         YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
01358         }
01359 
01360     /* Only push if top exists. Otherwise, replace top. */
01361     if (YY_CURRENT_BUFFER)
01362         (yy_buffer_stack_top)++;
01363     YY_CURRENT_BUFFER_LVALUE = new_buffer;
01364 
01365     /* copied from yy_switch_to_buffer. */
01366     yy_load_buffer_state( );
01367     (yy_did_buffer_switch_on_eof) = 1;
01368 }
01369 
01374 void yypop_buffer_state (void)
01375 {
01376         if (!YY_CURRENT_BUFFER)
01377         return;
01378 
01379     yy_delete_buffer(YY_CURRENT_BUFFER );
01380     YY_CURRENT_BUFFER_LVALUE = NULL;
01381     if ((yy_buffer_stack_top) > 0)
01382         --(yy_buffer_stack_top);
01383 
01384     if (YY_CURRENT_BUFFER) {
01385         yy_load_buffer_state( );
01386         (yy_did_buffer_switch_on_eof) = 1;
01387     }
01388 }
01389 
01390 /* Allocates the stack if it does not exist.
01391  *  Guarantees space for at least one push.
01392  */
01393 static void yyensure_buffer_stack (void)
01394 {
01395     int num_to_alloc;
01396     
01397     if (!(yy_buffer_stack)) {
01398 
01399         /* First allocation is just for 2 elements, since we don't know if this
01400          * scanner will even need a stack. We use 2 instead of 1 to avoid an
01401          * immediate realloc on the next call.
01402          */
01403         num_to_alloc = 1;
01404         (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
01405                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
01406                                 );
01407         
01408         memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
01409                 
01410         (yy_buffer_stack_max) = num_to_alloc;
01411         (yy_buffer_stack_top) = 0;
01412         return;
01413     }
01414 
01415     if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
01416 
01417         /* Increase the buffer to prepare for a possible push. */
01418         int grow_size = 8 /* arbitrary grow size */;
01419 
01420         num_to_alloc = (yy_buffer_stack_max) + grow_size;
01421         (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
01422                                 ((yy_buffer_stack),
01423                                 num_to_alloc * sizeof(struct yy_buffer_state*)
01424                                 );
01425 
01426         /* zero only the new slots.*/
01427         memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
01428         (yy_buffer_stack_max) = num_to_alloc;
01429     }
01430 }
01431 
01438 YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
01439 {
01440     YY_BUFFER_STATE b;
01441     
01442     if ( size < 2 ||
01443          base[size-2] != YY_END_OF_BUFFER_CHAR ||
01444          base[size-1] != YY_END_OF_BUFFER_CHAR )
01445         /* They forgot to leave room for the EOB's. */
01446         return 0;
01447 
01448     b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
01449     if ( ! b )
01450         YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
01451 
01452     b->yy_buf_size = size - 2;  /* "- 2" to take care of EOB's */
01453     b->yy_buf_pos = b->yy_ch_buf = base;
01454     b->yy_is_our_buffer = 0;
01455     b->yy_input_file = 0;
01456     b->yy_n_chars = b->yy_buf_size;
01457     b->yy_is_interactive = 0;
01458     b->yy_at_bol = 1;
01459     b->yy_fill_buffer = 0;
01460     b->yy_buffer_status = YY_BUFFER_NEW;
01461 
01462     yy_switch_to_buffer(b  );
01463 
01464     return b;
01465 }
01466 
01475 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
01476 {
01477     
01478     return yy_scan_bytes(yystr,strlen(yystr) );
01479 }
01480 
01488 YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
01489 {
01490     YY_BUFFER_STATE b;
01491     char *buf;
01492     yy_size_t n;
01493     int i;
01494     
01495     /* Get memory for full buffer, including space for trailing EOB's. */
01496     n = _yybytes_len + 2;
01497     buf = (char *) yyalloc(n  );
01498     if ( ! buf )
01499         YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
01500 
01501     for ( i = 0; i < _yybytes_len; ++i )
01502         buf[i] = yybytes[i];
01503 
01504     buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
01505 
01506     b = yy_scan_buffer(buf,n );
01507     if ( ! b )
01508         YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
01509 
01510     /* It's okay to grow etc. this buffer, and we should throw it
01511      * away when we're done.
01512      */
01513     b->yy_is_our_buffer = 1;
01514 
01515     return b;
01516 }
01517 
01518 #ifndef YY_EXIT_FAILURE
01519 #define YY_EXIT_FAILURE 2
01520 #endif
01521 
01522 static void yy_fatal_error (yyconst char* msg )
01523 {
01524         (void) fprintf( stderr, "%s\n", msg );
01525     exit( YY_EXIT_FAILURE );
01526 }
01527 
01528 /* Redefine yyless() so it works in section 3 code. */
01529 
01530 #undef yyless
01531 #define yyless(n) \
01532     do \
01533         { \
01534         /* Undo effects of setting up yytext. */ \
01535         int yyless_macro_arg = (n); \
01536         YY_LESS_LINENO(yyless_macro_arg);\
01537         yytext[yyleng] = (yy_hold_char); \
01538         (yy_c_buf_p) = yytext + yyless_macro_arg; \
01539         (yy_hold_char) = *(yy_c_buf_p); \
01540         *(yy_c_buf_p) = '\0'; \
01541         yyleng = yyless_macro_arg; \
01542         } \
01543     while ( 0 )
01544 
01545 /* Accessor  methods (get/set functions) to struct members. */
01546 
01550 int yyget_lineno  (void)
01551 {
01552         
01553     return yylineno;
01554 }
01555 
01559 FILE *yyget_in  (void)
01560 {
01561         return yyin;
01562 }
01563 
01567 FILE *yyget_out  (void)
01568 {
01569         return yyout;
01570 }
01571 
01575 int yyget_leng  (void)
01576 {
01577         return yyleng;
01578 }
01579 
01584 char *yyget_text  (void)
01585 {
01586         return yytext;
01587 }
01588 
01593 void yyset_lineno (int  line_number )
01594 {
01595     
01596     yylineno = line_number;
01597 }
01598 
01605 void yyset_in (FILE *  in_str )
01606 {
01607         yyin = in_str ;
01608 }
01609 
01610 void yyset_out (FILE *  out_str )
01611 {
01612         yyout = out_str ;
01613 }
01614 
01615 int yyget_debug  (void)
01616 {
01617         return yy_flex_debug;
01618 }
01619 
01620 void yyset_debug (int  bdebug )
01621 {
01622         yy_flex_debug = bdebug ;
01623 }
01624 
01625 static int yy_init_globals (void)
01626 {
01627         /* Initialization is the same as for the non-reentrant scanner.
01628      * This function is called from yylex_destroy(), so don't allocate here.
01629      */
01630 
01631     (yy_buffer_stack) = 0;
01632     (yy_buffer_stack_top) = 0;
01633     (yy_buffer_stack_max) = 0;
01634     (yy_c_buf_p) = (char *) 0;
01635     (yy_init) = 0;
01636     (yy_start) = 0;
01637 
01638 /* Defined in main.c */
01639 #ifdef YY_STDINIT
01640     yyin = stdin;
01641     yyout = stdout;
01642 #else
01643     yyin = (FILE *) 0;
01644     yyout = (FILE *) 0;
01645 #endif
01646 
01647     /* For future reference: Set errno on error, since we are called by
01648      * yylex_init()
01649      */
01650     return 0;
01651 }
01652 
01653 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
01654 int yylex_destroy  (void)
01655 {
01656     
01657     /* Pop the buffer stack, destroying each element. */
01658     while(YY_CURRENT_BUFFER){
01659         yy_delete_buffer(YY_CURRENT_BUFFER  );
01660         YY_CURRENT_BUFFER_LVALUE = NULL;
01661         yypop_buffer_state();
01662     }
01663 
01664     /* Destroy the stack itself. */
01665     yyfree((yy_buffer_stack) );
01666     (yy_buffer_stack) = NULL;
01667 
01668     /* Reset the globals. This is important in a non-reentrant scanner so the next time
01669      * yylex() is called, initialization will occur. */
01670     yy_init_globals( );
01671 
01672     return 0;
01673 }
01674 
01675 /*
01676  * Internal utility routines.
01677  */
01678 
01679 #ifndef yytext_ptr
01680 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
01681 {
01682     register int i;
01683     for ( i = 0; i < n; ++i )
01684         s1[i] = s2[i];
01685 }
01686 #endif
01687 
01688 #ifdef YY_NEED_STRLEN
01689 static int yy_flex_strlen (yyconst char * s )
01690 {