Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

lex.yy.cc

Go to the documentation of this file.
00001 #line 2 "lex.yy.cc"
00002 /* A lexical scanner generated by flex */
00003 
00004 /* Scanner skeleton version:
00005  * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
00006  */
00007 
00008 #define FLEX_SCANNER
00009 #define YY_FLEX_MAJOR_VERSION 2
00010 #define YY_FLEX_MINOR_VERSION 5
00011 
00012 #include <stdio.h>
00013 #include <errno.h>
00014 
00015 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
00016 #ifdef c_plusplus
00017 #ifndef __cplusplus
00018 #define __cplusplus
00019 #endif
00020 #endif
00021 
00022 
00023 #ifdef __cplusplus
00024 
00025 #include <stdlib.h>
00026 #ifndef _WIN32
00027 #include <unistd.h>
00028 #else
00029 #ifndef YY_ALWAYS_INTERACTIVE
00030 #ifndef YY_NEVER_INTERACTIVE
00031 extern int isatty YY_PROTO(( int ));
00032 #endif
00033 #endif
00034 #endif
00035 
00036 /* Use prototypes in function declarations. */
00037 #define YY_USE_PROTOS
00038 
00039 /* The "const" storage-class-modifier is valid. */
00040 #define YY_USE_CONST
00041 
00042 #else   /* ! __cplusplus */
00043 
00044 #if __STDC__
00045 
00046 #define YY_USE_PROTOS
00047 #define YY_USE_CONST
00048 
00049 #endif  /* __STDC__ */
00050 #endif  /* ! __cplusplus */
00051 
00052 #ifdef __TURBOC__
00053  #pragma warn -rch
00054  #pragma warn -use
00055 #include <io.h>
00056 #include <stdlib.h>
00057 #define YY_USE_CONST
00058 #define YY_USE_PROTOS
00059 #endif
00060 
00061 #ifdef YY_USE_CONST
00062 #define yyconst const
00063 #else
00064 #define yyconst
00065 #endif
00066 
00067 
00068 #ifdef YY_USE_PROTOS
00069 #define YY_PROTO(proto) proto
00070 #else
00071 #define YY_PROTO(proto) ()
00072 #endif
00073 
00074 /* Returned upon end-of-file. */
00075 #define YY_NULL 0
00076 
00077 /* Promotes a possibly negative, possibly signed char to an unsigned
00078  * integer for use as an array index.  If the signed char is negative,
00079  * we want to instead treat it as an 8-bit unsigned char, hence the
00080  * double cast.
00081  */
00082 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
00083 
00084 /* Enter a start condition.  This macro really ought to take a parameter,
00085  * but we do it the disgusting crufty way forced on us by the ()-less
00086  * definition of BEGIN.
00087  */
00088 #define BEGIN yy_start = 1 + 2 *
00089 
00090 /* Translate the current start state into a value that can be later handed
00091  * to BEGIN to return to the state.  The YYSTATE alias is for lex
00092  * compatibility.
00093  */
00094 #define YY_START ((yy_start - 1) / 2)
00095 #define YYSTATE YY_START
00096 
00097 /* Action number for EOF rule of a given start state. */
00098 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
00099 
00100 /* Special action meaning "start processing a new file". */
00101 #define YY_NEW_FILE yyrestart( yyin )
00102 
00103 #define YY_END_OF_BUFFER_CHAR 0
00104 
00105 /* Size of default input buffer. */
00106 #define YY_BUF_SIZE 16384
00107 
00108 typedef struct yy_buffer_state *YY_BUFFER_STATE;
00109 
00110 extern int yyleng;
00111 extern FILE *yyin, *yyout;
00112 
00113 #define EOB_ACT_CONTINUE_SCAN 0
00114 #define EOB_ACT_END_OF_FILE 1
00115 #define EOB_ACT_LAST_MATCH 2
00116 
00117 /* The funky do-while in the following #define is used to turn the definition
00118  * int a single C statement (which needs a semi-colon terminator).  This
00119  * avoids problems with code like:
00120  *
00121  *      if ( condition_holds )
00122  *              yyless( 5 );
00123  *      else
00124  *              do_something_else();
00125  *
00126  * Prior to using the do-while the compiler would get upset at the
00127  * "else" because it interpreted the "if" statement as being all
00128  * done when it reached the ';' after the yyless() call.
00129  */
00130 
00131 /* Return all but the first 'n' matched characters back to the input stream. */
00132 
00133 #define yyless(n) \
00134         do \
00135                 { \
00136                 /* Undo effects of setting up yytext. */ \
00137                 *yy_cp = yy_hold_char; \
00138                 YY_RESTORE_YY_MORE_OFFSET \
00139                 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
00140                 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
00141                 } \
00142         while ( 0 )
00143 
00144 #define unput(c) yyunput( c, yytext_ptr )
00145 
00146 /* The following is because we cannot portably get our hands on size_t
00147  * (without autoconf's help, which isn't available because we want
00148  * flex-generated scanners to compile on their own).
00149  */
00150 typedef unsigned int yy_size_t;
00151 
00152 
00153 struct yy_buffer_state
00154         {
00155         FILE *yy_input_file;
00156 
00157         char *yy_ch_buf;                /* input buffer */
00158         char *yy_buf_pos;               /* current position in input buffer */
00159 
00160         /* Size of input buffer in bytes, not including room for EOB
00161          * characters.
00162          */
00163         yy_size_t yy_buf_size;
00164 
00165         /* Number of characters read into yy_ch_buf, not including EOB
00166          * characters.
00167          */
00168         int yy_n_chars;
00169 
00170         /* Whether we "own" the buffer - i.e., we know we created it,
00171          * and can realloc() it to grow it, and should free() it to
00172          * delete it.
00173          */
00174         int yy_is_our_buffer;
00175 
00176         /* Whether this is an "interactive" input source; if so, and
00177          * if we're using stdio for input, then we want to use getc()
00178          * instead of fread(), to make sure we stop fetching input after
00179          * each newline.
00180          */
00181         int yy_is_interactive;
00182 
00183         /* Whether we're considered to be at the beginning of a line.
00184          * If so, '^' rules will be active on the next match, otherwise
00185          * not.
00186          */
00187         int yy_at_bol;
00188 
00189         /* Whether to try to fill the input buffer when we reach the
00190          * end of it.
00191          */
00192         int yy_fill_buffer;
00193 
00194         int yy_buffer_status;
00195 #define YY_BUFFER_NEW 0
00196 #define YY_BUFFER_NORMAL 1
00197         /* When an EOF's been seen but there's still some text to process
00198          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
00199          * shouldn't try reading from the input source any more.  We might
00200          * still have a bunch of tokens to match, though, because of
00201          * possible backing-up.
00202          *
00203          * When we actually see the EOF, we change the status to "new"
00204          * (via yyrestart()), so that the user can continue scanning by
00205          * just pointing yyin at a new input file.
00206          */
00207 #define YY_BUFFER_EOF_PENDING 2
00208         };
00209 
00210 static YY_BUFFER_STATE yy_current_buffer = 0;
00211 
00212 /* We provide macros for accessing buffer states in case in the
00213  * future we want to put the buffer states in a more general
00214  * "scanner state".
00215  */
00216 #define YY_CURRENT_BUFFER yy_current_buffer
00217 
00218 
00219 /* yy_hold_char holds the character lost when yytext is formed. */
00220 static char yy_hold_char;
00221 
00222 static int yy_n_chars;          /* number of characters read into yy_ch_buf */
00223 
00224 
00225 int yyleng;
00226 
00227 /* Points to current character in buffer. */
00228 static char *yy_c_buf_p = (char *) 0;
00229 static int yy_init = 1;         /* whether we need to initialize */
00230 static int yy_start = 0;        /* start state number */
00231 
00232 /* Flag which is used to allow yywrap()'s to do buffer switches
00233  * instead of setting up a fresh yyin.  A bit of a hack ...
00234  */
00235 static int yy_did_buffer_switch_on_eof;
00236 
00237 void yyrestart YY_PROTO(( FILE *input_file ));
00238 
00239 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
00240 void yy_load_buffer_state YY_PROTO(( void ));
00241 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
00242 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
00243 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
00244 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
00245 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
00246 
00247 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
00248 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
00249 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
00250 
00251 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
00252 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
00253 static void yy_flex_free YY_PROTO(( void * ));
00254 
00255 #define yy_new_buffer yy_create_buffer
00256 
00257 #define yy_set_interactive(is_interactive) \
00258         { \
00259         if ( ! yy_current_buffer ) \
00260                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
00261         yy_current_buffer->yy_is_interactive = is_interactive; \
00262         }
00263 
00264 #define yy_set_bol(at_bol) \
00265         { \
00266         if ( ! yy_current_buffer ) \
00267                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
00268         yy_current_buffer->yy_at_bol = at_bol; \
00269         }
00270 
00271 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
00272 
00273 typedef unsigned char YY_CHAR;
00274 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
00275 typedef int yy_state_type;
00276 extern char *yytext;
00277 #define yytext_ptr yytext
00278 
00279 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
00280 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
00281 static int yy_get_next_buffer YY_PROTO(( void ));
00282 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
00283 
00284 /* Done after the current pattern has been matched and before the
00285  * corresponding action - sets up yytext.
00286  */
00287 #define YY_DO_BEFORE_ACTION \
00288         yytext_ptr = yy_bp; \
00289         yyleng = (int) (yy_cp - yy_bp); \
00290         yy_hold_char = *yy_cp; \
00291         *yy_cp = '\0'; \
00292         yy_c_buf_p = yy_cp;
00293 
00294 #define YY_NUM_RULES 28
00295 #define YY_END_OF_BUFFER 29
00296 static yyconst short int yy_accept[194] =
00297     {   0,
00298        21,   21,   29,   27,   25,   26,   27,   27,   21,   27,
00299        19,   17,   21,   21,   21,   21,   21,   21,   21,   21,
00300        21,   21,   21,   25,    0,   20,    0,   19,   17,   21,
00301        24,    0,   19,   21,   17,   21,   21,   21,   21,   21,
00302        21,   21,   21,   21,   21,   21,   21,   21,   19,    0,
00303        17,    0,   23,   18,   21,   10,   11,   21,   21,   21,
00304        21,   21,   21,   21,   21,   21,   21,   18,   21,   22,
00305        21,   21,    9,   21,   15,   21,   21,   21,   21,   21,
00306        16,   22,   21,   21,   21,   21,   21,   21,   21,   21,
00307        21,   21,   21,   21,   21,   21,   21,   21,   21,   21,
00308 
00309        21,   21,   21,   21,   21,   21,   21,   21,   21,   21,
00310        21,   21,   21,   21,   21,   21,   21,   21,   21,   21,
00311        21,   21,   21,   21,   21,   21,   21,   21,   21,   21,
00312        21,   21,   21,   21,   21,   21,   21,   21,   21,   21,
00313        21,   21,   21,   21,   21,   21,   21,   21,   21,   21,
00314        21,   21,   21,   21,   21,   21,   21,    2,   21,   21,
00315        21,   21,   21,   21,   21,   21,   21,    3,   21,   21,
00316        21,   21,    4,   21,   13,   21,    1,   21,   21,   21,
00317        21,   21,   12,    8,    7,    6,    5,   21,   21,   21,
00318        21,   14,    0
00319 
00320     } ;
00321 
00322 static yyconst int yy_ec[256] =
00323     {   0,
00324         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
00325         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00326         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00327         1,    2,    1,    4,    1,    1,    1,    1,    1,    1,
00328         1,    5,    1,    1,    6,    7,    8,    9,   10,   10,
00329        10,   10,   10,   10,   10,   11,   11,   12,    1,    1,
00330         1,    1,    1,    1,   13,   14,   15,   16,   17,   18,
00331        19,   20,   21,    7,   22,   23,   24,   25,   26,   27,
00332        28,   29,   30,   31,   32,   33,    7,   34,   35,    7,
00333         1,   36,    1,    1,    1,    1,   37,   38,   39,   40,
00334 
00335        41,   38,    7,   42,   43,    7,    7,   44,   45,   46,
00336        47,   48,    7,   49,   50,   51,   52,   53,    7,   54,
00337        55,    7,    1,    1,    1,    1,    1,    1,    1,    1,
00338         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00339         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00340         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00341         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00342         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00343         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00344         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00345 
00346         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00347         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00348         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00349         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00350         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00351         1,    1,    1,    1,    1
00352     } ;
00353 
00354 static yyconst int yy_meta[56] =
00355     {   0,
00356         1,    1,    1,    1,    1,    1,    2,    1,    3,    3,
00357         3,    1,    3,    3,    3,    3,    3,    3,    2,    2,
00358         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
00359         2,    2,    2,    2,    2,    1,    3,    3,    3,    3,
00360         3,    2,    2,    2,    2,    2,    2,    2,    2,    2,
00361         2,    2,    2,    2,    2
00362     } ;
00363 
00364 static yyconst short int yy_base[198] =
00365     {   0,
00366         0,    0,  282,  283,  279,  283,   52,   48,    0,   55,
00367        52,   55,  243,  253,  261,  264,   41,  227,   27,  222,
00368       231,  219,  220,  269,   64,  283,  267,   61,   66,    0,
00369       283,  266,   69,  107,   71,  224,  238,  231,  231,  235,
00370       240,  210,  224,  214,  218,  214,  202,  208,   74,    0,
00371        80,  252,  283,    0,  204,  241,    0,   68,  221,  228,
00372       209,  203,  198,  201,    0,  219,  197,    0,  203,   92,
00373       210,  210,    0,  212,    0,  194,  187,  187,  185,  192,
00374         0,   98,  218,  217,  216,  191,  186,  215,   43,  186,
00375       203,  195,  195,  181,  183,  181,  178,  179,  179,  188,
00376 
00377       201,  188,  198,  166,  177,   82,   83,  164,  182,  188,
00378       175,  172,  195,  161,  159,  153,  157,  151,  189,  174,
00379       183,  172,  159,  157,  150,  149,  146,  147,  144,  151,
00380       173,  164,  171,  136,  141,  144,  134,  135,  132,  133,
00381       135,  150,  159,  148,  129,  132,  130,  121,  128,  119,
00382       126,  126,  153,  136,  145,  116,  118,    0,  118,  119,
00383       116,  117,  113,  132,  137,  117,   87,    0,  100,   99,
00384        93,   87,    0,  102,    0,  110,    0,   70,   65,   62,
00385        61,   75,    0,    0,    0,    0,    0,   72,   75,   77,
00386        63,    0,  283,  148,  150,  153,   69
00387 
00388     } ;
00389 
00390 static yyconst short int yy_def[198] =
00391     {   0,
00392       193,    1,  193,  193,  193,  193,  194,  193,  195,  193,
00393       195,  195,  195,  195,  195,  195,  195,  195,  195,  195,
00394       195,  195,  195,  193,  194,  193,  194,  193,  193,  195,
00395       193,  196,  195,  195,  195,  195,  195,  195,  195,  195,
00396       195,  195,  195,  195,  195,  195,  195,  195,  193,  197,
00397       193,  196,  193,   34,  195,  195,  195,  195,  195,  195,
00398       195,  195,  195,  195,  195,  195,  195,  197,  195,  193,
00399       195,  195,  195,  195,  195,  195,  195,  195,  195,  195,
00400       195,  193,  195,  195,  195,  195,  195,  195,  195,  195,
00401       195,  195,  195,  195,  195,  195,  195,  195,  195,  195,
00402 
00403       195,  195,  195,  195,  195,  195,  195,  195,  195,  195,
00404       195,  195,  195,  195,  195,  195,  195,  195,  195,  195,
00405       195,  195,  195,  195,  195,  195,  195,  195,  195,  195,
00406       195,  195,  195,  195,  195,  195,  195,  195,  195,  195,
00407       195,  195,  195,  195,  195,  195,  195,  195,  195,  195,
00408       195,  195,  195,  195,  195,  195,  195,  195,  195,  195,
00409       195,  195,  195,  195,  195,  195,  195,  195,  195,  195,
00410       195,  195,  195,  195,  195,  195,  195,  195,  195,  195,
00411       195,  195,  195,  195,  195,  195,  195,  195,  195,  195,
00412       195,  195,    0,  193,  193,  193,  193
00413 
00414     } ;
00415 
00416 static yyconst short int yy_nxt[339] =
00417     {   0,
00418         4,    5,    6,    7,    4,    8,    9,   10,   11,   12,
00419        12,    4,    9,    9,    9,    9,    9,   13,    9,    9,
00420        14,   15,    9,   16,    9,    9,   17,    9,    9,    9,
00421        18,    9,    9,    9,    9,    4,    9,    9,   19,    9,
00422        20,    9,    9,    9,    9,   21,    9,   22,    9,   23,
00423         9,    9,    9,    9,    9,   26,   28,   29,   29,   31,
00424        33,   33,   32,   35,   35,   35,   40,   26,   43,   49,
00425        49,   68,   41,   44,   51,   51,   51,   33,   33,   35,
00426        35,   35,   49,   49,   71,   34,   97,   27,   51,   51,
00427        51,  192,   98,  191,   50,   72,  115,  117,  190,   27,
00428 
00429        82,   82,   82,  189,  188,   34,   82,   82,   82,  187,
00430       186,  116,  118,  185,   50,   54,   54,   54,  184,   54,
00431        54,   54,   54,   54,   54,  183,  182,  181,   82,   82,
00432        82,   82,   82,  180,   82,   82,   82,   82,   82,  179,
00433       178,  177,  176,   54,   54,   54,   54,   54,   25,   25,
00434        25,   30,   30,   52,   52,   52,  175,  174,  173,  172,
00435       171,  170,  169,  168,  167,  166,  165,  164,  163,  162,
00436       161,  160,  159,  158,  157,  156,  155,  154,  153,  152,
00437       151,  150,  149,  148,  147,  146,  145,  144,  143,  142,
00438       141,  140,  139,  138,  137,  136,  135,  134,  133,  132,
00439 
00440       131,  130,  129,  128,  127,  126,  125,  124,  123,  122,
00441       121,  120,  119,  114,  113,  112,  111,  110,  109,  108,
00442       107,  106,  105,  104,  103,  102,  101,  100,   99,   96,
00443        95,   94,   93,   92,   91,   90,   89,   88,   87,   86,
00444        85,   84,   83,   81,   80,   79,   78,   77,   76,   75,
00445        74,   73,   70,   69,   53,   67,   66,   65,   64,   63,
00446        62,   61,   60,   59,   58,   57,   56,   55,   53,  193,
00447        24,   48,   47,   46,   45,   42,   39,   38,   37,   36,
00448        24,  193,    3,  193,  193,  193,  193,  193,  193,  193,
00449       193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
00450 
00451       193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
00452       193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
00453       193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
00454       193,  193,  193,  193,  193,  193,  193,  193
00455     } ;
00456 
00457 static yyconst short int yy_chk[339] =
00458     {   0,
00459         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00460         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00461         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00462         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00463         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00464         1,    1,    1,    1,    1,    7,    8,    8,    8,   10,
00465        11,   11,   10,   12,   12,   12,   17,   25,   19,   28,
00466        28,  197,   17,   19,   29,   29,   29,   33,   33,   35,
00467        35,   35,   49,   49,   58,   11,   89,    7,   51,   51,
00468        51,  191,   89,  190,   28,   58,  106,  107,  189,   25,
00469 
00470        70,   70,   70,  188,  182,   11,   82,   82,   82,  181,
00471       180,  106,  107,  179,   28,   34,   34,   34,  178,   34,
00472        34,   34,   34,   34,   34,  176,  174,  172,   70,   70,
00473        70,   70,   70,  171,   82,   82,   82,   82,   82,  170,
00474       169,  167,  166,   34,   34,   34,   34,   34,  194,  194,
00475       194,  195,  195,  196,  196,  196,  165,  164,  163,  162,
00476       161,  160,  159,  157,  156,  155,  154,  153,  152,  151,
00477       150,  149,  148,  147,  146,  145,  144,  143,  142,  141,
00478       140,  139,  138,  137,  136,  135,  134,  133,  132,  131,
00479       130,  129,  128,  127,  126,  125,  124,  123,  122,  121,
00480 
00481       120,  119,  118,  117,  116,  115,  114,  113,  112,  111,
00482       110,  109,  108,  105,  104,  103,  102,  101,  100,   99,
00483        98,   97,   96,   95,   94,   93,   92,   91,   90,   88,
00484        87,   86,   85,   84,   83,   80,   79,   78,   77,   76,
00485        74,   72,   71,   69,   67,   66,   64,   63,   62,   61,
00486        60,   59,   56,   55,   52,   48,   47,   46,   45,   44,
00487        43,   42,   41,   40,   39,   38,   37,   36,   32,   27,
00488        24,   23,   22,   21,   20,   18,   16,   15,   14,   13,
00489         5,    3,  193,  193,  193,  193,  193,  193,  193,  193,
00490       193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
00491 
00492       193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
00493       193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
00494       193,  193,  193,  193,  193,  193,  193,  193,  193,  193,
00495       193,  193,  193,  193,  193,  193,  193,  193
00496     } ;
00497 
00498 static yy_state_type yy_last_accepting_state;
00499 static char *yy_last_accepting_cpos;
00500 
00501 /* The intent behind this definition is that it'll catch
00502  * any uses of REJECT which flex missed.
00503  */
00504 #define REJECT reject_used_but_not_detected
00505 #define yymore() yymore_used_but_not_detected
00506 #define YY_MORE_ADJ 0
00507 #define YY_RESTORE_YY_MORE_OFFSET
00508 char *yytext;
00509 #line 1 "oep.ll"
00510 #define INITIAL 0
00511 #define YY_NEVER_INTERACTIVE 1
00512 #line 4 "oep.ll"
00513 /*
00514 
00515 //                            Package   : omniEvents
00516 // oep.ll                     Created   : 27/9/99
00517 //                            Author    : Paul Nader (pwn)
00518 //
00519 //    Copyright (C) 1998 Paul Nader.
00520 //
00521 //    This file is part of the omniEvents application.
00522 //
00523 //    omniEvents is free software; you can redistribute it and/or
00524 //    modify it under the terms of the GNU Lesser General Public
00525 //    License as published by the Free Software Foundation; either
00526 //    version 2.1 of the License, or (at your option) any later version.
00527 //
00528 //    omniEvents is distributed in the hope that it will be useful,
00529 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
00530 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00531 //    Lesser General Public License for more details.
00532 //
00533 //    You should have received a copy of the GNU Lesser General Public
00534 //    License along with this library; if not, write to the Free Software
00535 //    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00536 //
00537 // Description:
00538 //    
00539 //    omniEvents persistency lexical scanner.
00540 //
00541 
00542 */
00543 
00544 /*
00545   $Log: oep.ll,v $
00546   Revision 1.2  2003/11/03 22:25:14  alextingle
00547   Updated License to GNU Lesser General Public v2.1
00548 
00549   Revision 1.1.1.1  2002/09/25 19:00:29  shamus13
00550   Import of OmniEvents source tree from release 2.1.1
00551 
00552   Revision 1.3  2000/09/05 00:59:44  naderp
00553   Added MaxQueueLength QOS.
00554 
00555   Revision 1.2  2000/03/06 13:09:20  naderp
00556   Removed common.
00557 
00558   Revision 1.1  2000/03/02 01:14:59  naderp
00559   Added nil IOR.
00560 
00561   Revision 1.0  1999/11/01 16:29:20  naderp
00562   Initial revision
00563 
00564 */
00565 
00566 #include "oep_types.h"
00567 #include "oep_global.h"
00568 #include <ctype.h>
00569 
00570 #if defined(__VMS)
00571 #include "y_tab.hh"
00572 #else
00573 #include "y.tab.hh"
00574 #endif
00575 
00576 static unsigned char oep_escape_reader(char *);
00577 static double oep_atof(char *);
00578 static long oep_atoi(char *, long);
00579 
00580 #line 581 "lex.yy.cc"
00581 
00582 /* Macros after this point can all be overridden by user definitions in
00583  * section 1.
00584  */
00585 
00586 #ifndef YY_SKIP_YYWRAP
00587 #ifdef __cplusplus
00588 extern "C" int yywrap YY_PROTO(( void ));
00589 #else
00590 extern int yywrap YY_PROTO(( void ));
00591 #endif
00592 #endif
00593 
00594 #ifndef YY_NO_UNPUT
00595 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
00596 #endif
00597 
00598 #ifndef yytext_ptr
00599 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
00600 #endif
00601 
00602 #ifdef YY_NEED_STRLEN
00603 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
00604 #endif
00605 
00606 #ifndef YY_NO_INPUT
00607 #ifdef __cplusplus
00608 static int yyinput YY_PROTO(( void ));
00609 #else
00610 static int input YY_PROTO(( void ));
00611 #endif
00612 #endif
00613 
00614 #if YY_STACK_USED
00615 static int yy_start_stack_ptr = 0;
00616 static int yy_start_stack_depth = 0;
00617 static int *yy_start_stack = 0;
00618 #ifndef YY_NO_PUSH_STATE
00619 static void yy_push_state YY_PROTO(( int new_state ));
00620 #endif
00621 #ifndef YY_NO_POP_STATE
00622 static void yy_pop_state YY_PROTO(( void ));
00623 #endif
00624 #ifndef YY_NO_TOP_STATE
00625 static int yy_top_state YY_PROTO(( void ));
00626 #endif
00627 
00628 #else
00629 #define YY_NO_PUSH_STATE 1
00630 #define YY_NO_POP_STATE 1
00631 #define YY_NO_TOP_STATE 1
00632 #endif
00633 
00634 #ifdef YY_MALLOC_DECL
00635 YY_MALLOC_DECL
00636 #else
00637 #if __STDC__
00638 #ifndef __cplusplus
00639 #include <stdlib.h>
00640 #endif
00641 #else
00642 /* Just try to get by without declaring the routines.  This will fail
00643  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
00644  * or sizeof(void*) != sizeof(int).
00645  */
00646 #endif
00647 #endif
00648 
00649 /* Amount of stuff to slurp up with each read. */
00650 #ifndef YY_READ_BUF_SIZE
00651 #define YY_READ_BUF_SIZE 8192
00652 #endif
00653 
00654 /* Copy whatever the last rule matched to the standard output. */
00655 
00656 #ifndef ECHO
00657 /* This used to be an fputs(), but since the string might contain NUL's,
00658  * we now use fwrite().
00659  */
00660 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
00661 #endif
00662 
00663 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
00664  * is returned in "result".
00665  */
00666 #ifndef YY_INPUT
00667 #define YY_INPUT(buf,result,max_size) \
00668         if ( yy_current_buffer->yy_is_interactive ) \
00669                 { \
00670                 int c = '*', n; \
00671                 for ( n = 0; n < max_size && \
00672                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
00673                         buf[n] = (char) c; \
00674                 if ( c == '\n' ) \
00675                         buf[n++] = (char) c; \
00676                 if ( c == EOF && ferror( yyin ) ) \
00677                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
00678                 result = n; \
00679                 } \
00680         else \
00681                 { \
00682                 errno=0; \
00683                 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
00684                         { \
00685                         if( errno != EINTR) \
00686                                 { \
00687                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
00688                                 break; \
00689                                 } \
00690                         errno=0; \
00691                         clearerr(yyin); \
00692                         } \
00693                 }
00694 #endif
00695 
00696 /* No semi-colon after return; correct usage is to write "yyterminate();" -
00697  * we don't want an extra ';' after the "return" because that will cause
00698  * some compilers to complain about unreachable statements.
00699  */
00700 #ifndef yyterminate
00701 #define yyterminate() return YY_NULL
00702 #endif
00703 
00704 /* Number of entries by which start-condition stack grows. */
00705 #ifndef YY_START_STACK_INCR
00706 #define YY_START_STACK_INCR 25
00707 #endif
00708 
00709 /* Report a fatal error. */
00710 #ifndef YY_FATAL_ERROR
00711 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
00712 #endif
00713 
00714 /* Default declaration of generated scanner - a define so the user can
00715  * easily add parameters.
00716  */
00717 #ifndef YY_DECL
00718 #define YY_DECL int yylex YY_PROTO(( void ))
00719 #endif
00720 
00721 /* Code executed at the beginning of each rule, after yytext and yyleng
00722  * have been set up.
00723  */
00724 #ifndef YY_USER_ACTION
00725 #define YY_USER_ACTION
00726 #endif
00727 
00728 /* Code executed at the end of each rule. */
00729 #ifndef YY_BREAK
00730 #define YY_BREAK break;
00731 #endif
00732 
00733 #define YY_RULE_SETUP \
00734         YY_USER_ACTION
00735 
00736 YY_DECL
00737         {
00738         register yy_state_type yy_current_state;
00739         register char *yy_cp, *yy_bp;
00740         register int yy_act;
00741 
00742 #line 73 "oep.ll"
00743 
00744 
00745 #line 746 "lex.yy.cc"
00746 
00747         if ( yy_init )
00748                 {
00749                 yy_init = 0;
00750 
00751 #ifdef YY_USER_INIT
00752                 YY_USER_INIT;
00753 #endif
00754 
00755                 if ( ! yy_start )
00756                         yy_start = 1;   /* first start state */
00757 
00758                 if ( ! yyin )
00759                         yyin = stdin;
00760 
00761                 if ( ! yyout )
00762                         yyout = stdout;
00763 
00764                 if ( ! yy_current_buffer )
00765                         yy_current_buffer =
00766                                 yy_create_buffer( yyin, YY_BUF_SIZE );
00767 
00768                 yy_load_buffer_state();
00769                 }
00770 
00771         while ( 1 )             /* loops until end-of-file is reached */
00772                 {
00773                 yy_cp = yy_c_buf_p;
00774 
00775                 /* Support of yytext. */
00776                 *yy_cp = yy_hold_char;
00777 
00778                 /* yy_bp points to the position in yy_ch_buf of the start of
00779                  * the current run.
00780                  */
00781                 yy_bp = yy_cp;
00782 
00783                 yy_current_state = yy_start;
00784 yy_match:
00785                 do
00786                         {
00787                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
00788                         if ( yy_accept[yy_current_state] )
00789                                 {
00790                                 yy_last_accepting_state = yy_current_state;
00791                                 yy_last_accepting_cpos = yy_cp;
00792                                 }
00793                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
00794                                 {
00795                                 yy_current_state = (int) yy_def[yy_current_state];
00796                                 if ( yy_current_state >= 194 )
00797                                         yy_c = yy_meta[(unsigned int) yy_c];
00798                                 }
00799                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
00800                         ++yy_cp;
00801                         }
00802                 while ( yy_base[yy_current_state] != 283 );
00803 
00804 yy_find_action:
00805                 yy_act = yy_accept[yy_current_state];
00806                 if ( yy_act == 0 )
00807                         { /* have to back up */
00808                         yy_cp = yy_last_accepting_cpos;
00809                         yy_current_state = yy_last_accepting_state;
00810                         yy_act = yy_accept[yy_current_state];
00811                         }
00812 
00813                 YY_DO_BEFORE_ACTION;
00814 
00815 
00816 do_action:      /* This label is used only to access EOF actions. */
00817 
00818 
00819                 switch ( yy_act )
00820         { /* beginning of action switch */
00821                         case 0: /* must back up */
00822                         /* undo the effects of YY_DO_BEFORE_ACTION */
00823                         *yy_cp = yy_hold_char;
00824                         yy_cp = yy_last_accepting_cpos;
00825                         yy_current_state = yy_last_accepting_state;
00826                         goto yy_find_action;
00827 
00828 case 1:
00829 YY_RULE_SETUP
00830 #line 75 "oep.ll"
00831 return CHANNELFACTORY_LABEL;
00832         YY_BREAK
00833 case 2:
00834 YY_RULE_SETUP
00835 #line 76 "oep.ll"
00836 return EVENTCHANNEL_LABEL;
00837         YY_BREAK
00838 case 3:
00839 YY_RULE_SETUP
00840 #line 77 "oep.ll"
00841 return CONSUMERADMIN_LABEL;
00842         YY_BREAK
00843 case 4:
00844 YY_RULE_SETUP
00845 #line 78 "oep.ll"
00846 return SUPPLIERADMIN_LABEL;
00847         YY_BREAK
00848 case 5:
00849 YY_RULE_SETUP
00850 #line 79 "oep.ll"
00851 return PROXYPUSHSUPP_LABEL;
00852         YY_BREAK
00853 case 6:
00854 YY_RULE_SETUP
00855 #line 80 "oep.ll"
00856 return PROXYPUSHCONS_LABEL;
00857         YY_BREAK
00858 case 7:
00859 YY_RULE_SETUP
00860 #line 81 "oep.ll"
00861 return PROXYPULLSUPP_LABEL;
00862         YY_BREAK
00863 case 8:
00864 YY_RULE_SETUP
00865 #line 82 "oep.ll"
00866 return PROXYPULLCONS_LABEL;
00867         YY_BREAK
00868 case 9:
00869 YY_RULE_SETUP
00870 #line 84 "oep.ll"
00871 return PORT_LABEL;
00872         YY_BREAK
00873 case 10:
00874 YY_RULE_SETUP
00875 #line 85 "oep.ll"
00876 return IOR_LABEL;
00877         YY_BREAK
00878 case 11:
00879 YY_RULE_SETUP
00880 #line 86 "oep.ll"
00881 return KEY_LABEL;
00882         YY_BREAK
00883 case 12:
00884 YY_RULE_SETUP
00885 #line 87 "oep.ll"
00886 return PULLRETRYPERIOD_LABEL;
00887         YY_BREAK
00888 case 13:
00889 YY_RULE_SETUP
00890 #line 88 "oep.ll"
00891 return MAXQUEUELENGTH_LABEL;
00892         YY_BREAK
00893 case 14:
00894 YY_RULE_SETUP
00895 #line 89 "oep.ll"
00896 return MAXEVENTSPERCONSUMER_LABEL;
00897         YY_BREAK
00898 case 15:
00899 YY_RULE_SETUP
00900 #line 91 "oep.ll"
00901 return TRUETOK;
00902         YY_BREAK
00903 case 16:
00904 YY_RULE_SETUP
00905 #line 92 "oep.ll"
00906 return FALSETOK;
00907         YY_BREAK
00908 case 17:
00909 YY_RULE_SETUP
00910 #line 94 "oep.ll"
00911 {
00912                   yylval.ival = oep_atoi(yytext, 10);
00913                   return INTEGER_LITERAL;
00914                 }
00915         YY_BREAK
00916 case 18:
00917 YY_RULE_SETUP
00918 #line 99 "oep.ll"
00919 {
00920                   yylval.ival = oep_atoi(yytext, 16);
00921                   return INTEGER_LITERAL;
00922                 }
00923         YY_BREAK
00924 case 19:
00925 YY_RULE_SETUP
00926 #line 104 "oep.ll"
00927 {
00928                   yylval.ival = oep_atoi(yytext, 8);
00929                   return INTEGER_LITERAL;
00930                 }
00931         YY_BREAK
00932 case 20:
00933 YY_RULE_SETUP
00934 #line 109 "oep.ll"
00935 {
00936                   // strip leading and trailing quotes
00937                   yytext++;
00938                   char *z = (char *) malloc(strlen(yytext));
00939                   strncpy(z, yytext, strlen(yytext) - 1);
00940                   z[strlen(yytext) - 1] = NULL;
00941                   yylval.sval = z;
00942                   return STRING_LITERAL;
00943                 }
00944         YY_BREAK
00945 case 21:
00946 YY_RULE_SETUP
00947 #line 119 "oep.ll"
00948 {
00949                   char *z = (char *) malloc(strlen(yytext) + 1);
00950                   strcpy(z, yytext);
00951                   yylval.kval = z;
00952                   return KEY_VALUE;
00953                 }
00954         YY_BREAK
00955 case 22:
00956 YY_RULE_SETUP
00957 #line 126 "oep.ll"
00958 {
00959                   char *z = (char *) malloc(strlen(yytext) + 1);
00960                   strcpy(z, yytext);
00961                   yylval.sval = z;
00962                   return IOR_VALUE;
00963                 }
00964         YY_BREAK
00965 case 23:
00966 YY_RULE_SETUP
00967 #line 133 "oep.ll"
00968 {
00969                   /* ignore comments */
00970                   ((OEP_GlobalData *) oep_global)->incLineNo();
00971                 }
00972         YY_BREAK
00973 case 24:
00974 YY_RULE_SETUP
00975 #line 138 "oep.ll"
00976 {
00977                   for(;;) {
00978                     char c = yyinput();
00979                     if (c == '*') {
00980                       char next = yyinput();
00981                       if (next == '/')
00982                         break;
00983                       else
00984                         /* yyunput(c); */
00985                         unput(c);
00986                       if (c == '\n') 
00987                          ((OEP_GlobalData *) oep_global)->incLineNo();
00988                     }
00989                   }
00990                 }
00991         YY_BREAK
00992 case 25:
00993 YY_RULE_SETUP
00994 #line 154 "oep.ll"
00995 ;
00996         YY_BREAK
00997 case 26:
00998 YY_RULE_SETUP
00999 #line 155 "oep.ll"
01000 {
01001                   ((OEP_GlobalData *) oep_global)->incLineNo();
01002                 }
01003         YY_BREAK
01004 case 27:
01005 YY_RULE_SETUP
01006 #line 158 "oep.ll"
01007 return yytext[0];
01008         YY_BREAK
01009 case 28:
01010 YY_RULE_SETUP
01011 #line 160 "oep.ll"
01012 ECHO;
01013         YY_BREAK
01014 #line 1015 "lex.yy.cc"
01015 case YY_STATE_EOF(INITIAL):
01016         yyterminate();
01017 
01018         case YY_END_OF_BUFFER:
01019                 {
01020                 /* Amount of text matched not including the EOB char. */
01021                 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
01022 
01023                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
01024                 *yy_cp = yy_hold_char;
01025                 YY_RESTORE_YY_MORE_OFFSET
01026 
01027                 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
01028                         {
01029                         /* We're scanning a new file or input source.  It's
01030                          * possible that this happened because the user
01031                          * just pointed yyin at a new source and called
01032                          * yylex().  If so, then we have to assure
01033                          * consistency between yy_current_buffer and our
01034                          * globals.  Here is the right place to do so, because
01035                          * this is the first action (other than possibly a
01036                          * back-up) that will match for the new input source.
01037                          */
01038                         yy_n_chars = yy_current_buffer->yy_n_chars;
01039                         yy_current_buffer->yy_input_file = yyin;
01040                         yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
01041                         }
01042 
01043                 /* Note that here we test for yy_c_buf_p "<=" to the position
01044                  * of the first EOB in the buffer, since yy_c_buf_p will
01045                  * already have been incremented past the NUL character
01046                  * (since all states make transitions on EOB to the
01047                  * end-of-buffer state).  Contrast this with the test
01048                  * in input().
01049                  */
01050                 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
01051                         { /* This was really a NUL. */
01052                         yy_state_type yy_next_state;
01053 
01054                         yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
01055 
01056                         yy_current_state = yy_get_previous_state();
01057 
01058                         /* Okay, we're now positioned to make the NUL
01059                          * transition.  We couldn't have
01060                          * yy_get_previous_state() go ahead and do it
01061                          * for us because it doesn't know how to deal
01062                          * with the possibility of jamming (and we don't
01063                          * want to build jamming into it because then it
01064                          * will run more slowly).
01065                          */
01066 
01067                         yy_next_state = yy_try_NUL_trans( yy_current_state );
01068 
01069                         yy_bp = yytext_ptr + YY_MORE_ADJ;
01070 
01071                         if ( yy_next_state )
01072                                 {
01073                                 /* Consume the NUL. */
01074                                 yy_cp = ++yy_c_buf_p;
01075                                 yy_current_state = yy_next_state;
01076                                 goto yy_match;
01077                                 }
01078 
01079                         else
01080                                 {
01081                                 yy_cp = yy_c_buf_p;
01082                                 goto yy_find_action;
01083                                 }
01084                         }
01085 
01086                 else switch ( yy_get_next_buffer() )
01087                         {
01088                         case EOB_ACT_END_OF_FILE:
01089                                 {
01090                                 yy_did_buffer_switch_on_eof = 0;
01091 
01092                                 if ( yywrap() )
01093                                         {
01094                                         /* Note: because we've taken care in
01095                                          * yy_get_next_buffer() to have set up
01096                                          * yytext, we can now set up
01097                                          * yy_c_buf_p so that if some total
01098                                          * hoser (like flex itself) wants to
01099                                          * call the scanner after we return the
01100                                          * YY_NULL, it'll still work - another
01101                                          * YY_NULL will get returned.
01102                                          */
01103                                         yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
01104 
01105                                         yy_act = YY_STATE_EOF(YY_START);
01106                                         goto do_action;
01107                                         }
01108 
01109                                 else
01110                                         {
01111                                         if ( ! yy_did_buffer_switch_on_eof )
01112                                                 YY_NEW_FILE;
01113                                         }
01114                                 break;
01115                                 }
01116 
01117                         case EOB_ACT_CONTINUE_SCAN:
01118                                 yy_c_buf_p =
01119                                         yytext_ptr + yy_amount_of_matched_text;
01120 
01121                                 yy_current_state = yy_get_previous_state();
01122 
01123                                 yy_cp = yy_c_buf_p;
01124                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
01125                                 goto yy_match;
01126 
01127                         case EOB_ACT_LAST_MATCH:
01128                                 yy_c_buf_p =
01129                                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
01130 
01131                                 yy_current_state = yy_get_previous_state();
01132 
01133                                 yy_cp = yy_c_buf_p;
01134                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
01135                                 goto yy_find_action;
01136                         }
01137                 break;
01138                 }
01139 
01140         default:
01141                 YY_FATAL_ERROR(
01142                         "fatal flex scanner internal error--no action found" );
01143         } /* end of action switch */
01144                 } /* end of scanning one token */
01145         } /* end of yylex */
01146 
01147 
01148 /* yy_get_next_buffer - try to read in a new buffer
01149  *
01150  * Returns a code representing an action:
01151  *      EOB_ACT_LAST_MATCH -
01152  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
01153  *      EOB_ACT_END_OF_FILE - end of file
01154  */
01155 
01156 static int yy_get_next_buffer()
01157         {
01158         register char *dest = yy_current_buffer->yy_ch_buf;
01159         register char *source = yytext_ptr;
01160         register int number_to_move, i;
01161         int ret_val;
01162 
01163         if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
01164                 YY_FATAL_ERROR(
01165                 "fatal flex scanner internal error--end of buffer missed" );
01166 
01167         if ( yy_current_buffer->yy_fill_buffer == 0 )
01168                 { /* Don't try to fill the buffer, so this is an EOF. */
01169                 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
01170                         {
01171                         /* We matched a single character, the EOB, so
01172                          * treat this as a final EOF.
01173                          */
01174                         return EOB_ACT_END_OF_FILE;
01175                         }
01176 
01177                 else
01178                         {
01179                         /* We matched some text prior to the EOB, first
01180                          * process it.
01181                          */
01182                         return EOB_ACT_LAST_MATCH;
01183                         }
01184                 }
01185 
01186         /* Try to read more data. */
01187 
01188         /* First move last chars to start of buffer. */
01189         number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
01190 
01191         for ( i = 0; i < number_to_move; ++i )
01192                 *(dest++) = *(source++);
01193 
01194         if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
01195                 /* don't do the read, it's not guaranteed to return an EOF,
01196                  * just force an EOF
01197                  */
01198                 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
01199 
01200         else
01201                 {
01202                 int num_to_read =
01203                         yy_current_buffer->yy_buf_size - number_to_move - 1;
01204 
01205                 while ( num_to_read <= 0 )
01206                         { /* Not enough room in the buffer - grow it. */
01207 #ifdef YY_USES_REJECT
01208                         YY_FATAL_ERROR(
01209 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
01210 #else
01211 
01212                         /* just a shorter name for the current buffer */
01213                         YY_BUFFER_STATE b = yy_current_buffer;
01214 
01215                         int yy_c_buf_p_offset =
01216                                 (int) (yy_c_buf_p - b->yy_ch_buf);
01217 
01218                         if ( b->yy_is_our_buffer )
01219                                 {
01220                                 int new_size = b->yy_buf_size * 2;
01221 
01222                                 if ( new_size <= 0 )
01223                                         b->yy_buf_size += b->yy_buf_size / 8;
01224                                 else
01225                                         b->yy_buf_size *= 2;
01226 
01227                                 b->yy_ch_buf = (char *)
01228                                         /* Include room in for 2 EOB chars. */
01229                                         yy_flex_realloc( (void *) b->yy_ch_buf,
01230                                                          b->yy_buf_size + 2 );
01231                                 }
01232                         else
01233                                 /* Can't grow it, we don't own it. */
01234                                 b->yy_ch_buf = 0;
01235 
01236                         if ( ! b->yy_ch_buf )
01237                                 YY_FATAL_ERROR(
01238                                 "fatal error - scanner input buffer overflow" );
01239 
01240                         yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
01241 
01242                         num_to_read = yy_current_buffer->yy_buf_size -
01243                                                 number_to_move - 1;
01244 #endif
01245                         }
01246 
01247                 if ( num_to_read > YY_READ_BUF_SIZE )
01248                         num_to_read = YY_READ_BUF_SIZE;
01249 
01250                 /* Read in more data. */
01251                 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
01252                         yy_n_chars, num_to_read );
01253 
01254                 yy_current_buffer->yy_n_chars = yy_n_chars;
01255                 }
01256 
01257         if ( yy_n_chars == 0 )
01258                 {
01259                 if ( number_to_move == YY_MORE_ADJ )
01260                         {
01261                         ret_val = EOB_ACT_END_OF_FILE;
01262                         yyrestart( yyin );
01263                         }
01264 
01265                 else
01266                         {
01267                         ret_val = EOB_ACT_LAST_MATCH;
01268                         yy_current_buffer->yy_buffer_status =
01269                                 YY_BUFFER_EOF_PENDING;
01270                         }
01271                 }
01272 
01273         else
01274                 ret_val = EOB_ACT_CONTINUE_SCAN;
01275 
01276         yy_n_chars += number_to_move;
01277         yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
01278         yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
01279 
01280         yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
01281 
01282         return ret_val;
01283         }
01284 
01285 
01286 /* yy_get_previous_state - get the state just before the EOB char was reached */
01287 
01288 static yy_state_type yy_get_previous_state()
01289         {
01290         register yy_state_type yy_current_state;
01291         register char *yy_cp;
01292 
01293         yy_current_state = yy_start;
01294 
01295         for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
01296                 {
01297                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
01298                 if ( yy_accept[yy_current_state] )
01299                         {
01300                         yy_last_accepting_state = yy_current_state;
01301                         yy_last_accepting_cpos = yy_cp;
01302                         }
01303                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01304                         {
01305                         yy_current_state = (int) yy_def[yy_current_state];
01306                         if ( yy_current_state >= 194 )
01307                                 yy_c = yy_meta[(unsigned int) yy_c];
01308                         }
01309                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01310                 }
01311 
01312         return yy_current_state;
01313         }
01314 
01315 
01316 /* yy_try_NUL_trans - try to make a transition on the NUL character
01317  *
01318  * synopsis
01319  *      next_state = yy_try_NUL_trans( current_state );
01320  */
01321 
01322 #ifdef YY_USE_PROTOS
01323 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
01324 #else
01325 static yy_state_type yy_try_NUL_trans( yy_current_state )
01326 yy_state_type yy_current_state;
01327 #endif
01328         {
01329         register int yy_is_jam;
01330         register char *yy_cp = yy_c_buf_p;
01331 
01332         register YY_CHAR yy_c = 1;
01333         if ( yy_accept[yy_current_state] )
01334                 {
01335                 yy_last_accepting_state = yy_current_state;
01336                 yy_last_accepting_cpos = yy_cp;
01337                 }
01338         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01339                 {
01340                 yy_current_state = (int) yy_def[yy_current_state];
01341                 if ( yy_current_state >= 194 )
01342                         yy_c = yy_meta[(unsigned int) yy_c];
01343                 }
01344         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01345         yy_is_jam = (yy_current_state == 193);
01346 
01347         return yy_is_jam ? 0 : yy_current_state;
01348         }
01349 
01350 
01351 #ifndef YY_NO_UNPUT
01352 #ifdef YY_USE_PROTOS
01353 static void yyunput( int c, register char *yy_bp )
01354 #else
01355 static void yyunput( c, yy_bp )
01356 int c;
01357 register char *yy_bp;
01358 #endif
01359         {
01360         register char *yy_cp = yy_c_buf_p;
01361 
01362         /* undo effects of setting up yytext */
01363         *yy_cp = yy_hold_char;
01364 
01365         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
01366                 { /* need to shift things up to make room */
01367                 /* +2 for EOB chars. */
01368                 register int number_to_move = yy_n_chars + 2;
01369                 register char *dest = &yy_current_buffer->yy_ch_buf[
01370                                         yy_current_buffer->yy_buf_size + 2];
01371                 register char *source =
01372                                 &yy_current_buffer->yy_ch_buf[number_to_move];
01373 
01374                 while ( source > yy_current_buffer->yy_ch_buf )
01375                         *--dest = *--source;
01376 
01377                 yy_cp += (int) (dest - source);
01378                 yy_bp += (int) (dest - source);
01379                 yy_current_buffer->yy_n_chars =
01380                         yy_n_chars = yy_current_buffer->yy_buf_size;
01381 
01382                 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
01383                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
01384                 }
01385 
01386         *--yy_cp = (char) c;
01387 
01388 
01389         yytext_ptr = yy_bp;
01390         yy_hold_char = *yy_cp;
01391         yy_c_buf_p = yy_cp;
01392         }
01393 #endif  /* ifndef YY_NO_UNPUT */
01394 
01395 
01396 #ifdef __cplusplus
01397 static int yyinput()
01398 #else
01399 static int input()
01400 #endif
01401         {
01402         int c;
01403 
01404         *yy_c_buf_p = yy_hold_char;
01405 
01406         if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
01407                 {
01408                 /* yy_c_buf_p now points to the character we want to return.
01409                  * If this occurs *before* the EOB characters, then it's a
01410                  * valid NUL; if not, then we've hit the end of the buffer.
01411                  */
01412                 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
01413                         /* This was really a NUL. */
01414                         *yy_c_buf_p = '\0';
01415 
01416                 else
01417                         { /* need more input */
01418                         int offset = yy_c_buf_p - yytext_ptr;
01419                         ++yy_c_buf_p;
01420 
01421                         switch ( yy_get_next_buffer() )
01422                                 {
01423                                 case EOB_ACT_LAST_MATCH:
01424                                         /* This happens because yy_g_n_b()
01425                                          * sees that we've accumulated a
01426                                          * token and flags that we need to
01427                                          * try matching the token before
01428                                          * proceeding.  But for input(),
01429                                          * there's no matching to consider.
01430                                          * So convert the EOB_ACT_LAST_MATCH
01431                                          * to EOB_ACT_END_OF_FILE.
01432                                          */
01433 
01434                                         /* Reset buffer status. */
01435                                         yyrestart( yyin );
01436 
01437                                         /* fall through */
01438 
01439                                 case EOB_ACT_END_OF_FILE:
01440                                         {
01441                                         if ( yywrap() )
01442                                                 return EOF;
01443 
01444                                         if ( ! yy_did_buffer_switch_on_eof )
01445                                                 YY_NEW_FILE;
01446 #ifdef __cplusplus
01447                                         return yyinput();
01448 #else
01449                                         return input();
01450 #endif
01451                                         }
01452 
01453                                 case EOB_ACT_CONTINUE_SCAN:
01454                                         yy_c_buf_p = yytext_ptr + offset;
01455                                         break;
01456                                 }
01457                         }
01458                 }
01459 
01460         c = *(unsigned char *) yy_c_buf_p;      /* cast for 8-bit char's */
01461         *yy_c_buf_p = '\0';     /* preserve yytext */
01462         yy_hold_char = *++yy_c_buf_p;
01463 
01464 
01465         return c;
01466         }
01467 
01468 
01469 #ifdef YY_USE_PROTOS
01470 void yyrestart( FILE *input_file )
01471 #else
01472 void yyrestart( input_file )
01473 FILE *input_file;
01474 #endif
01475         {
01476         if ( ! yy_current_buffer )
01477                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
01478 
01479         yy_init_buffer( yy_current_buffer, input_file );
01480         yy_load_buffer_state();
01481         }
01482 
01483 
01484 #ifdef YY_USE_PROTOS
01485 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
01486 #else
01487 void yy_switch_to_buffer( new_buffer )
01488 YY_BUFFER_STATE new_buffer;
01489 #endif
01490         {
01491         if ( yy_current_buffer == new_buffer )
01492                 return;
01493 
01494         if ( yy_current_buffer )
01495                 {
01496                 /* Flush out information for old buffer. */
01497                 *yy_c_buf_p = yy_hold_char;
01498                 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
01499                 yy_current_buffer->yy_n_chars = yy_n_chars;
01500                 }
01501 
01502         yy_current_buffer = new_buffer;
01503         yy_load_buffer_state();
01504 
01505         /* We don't actually know whether we did this switch during
01506          * EOF (yywrap()) processing, but the only time this flag
01507          * is looked at is after yywrap() is called, so it's safe
01508          * to go ahead and always set it.
01509          */
01510         yy_did_buffer_switch_on_eof = 1;
01511         }
01512 
01513 
01514 #ifdef YY_USE_PROTOS
01515 void yy_load_buffer_state( void )
01516 #else
01517 void yy_load_buffer_state()
01518 #endif
01519         {
01520         yy_n_chars = yy_current_buffer->yy_n_chars;
01521         yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
01522         yyin = yy_current_buffer->yy_input_file;
01523         yy_hold_char = *yy_c_buf_p;
01524         }
01525 
01526 
01527 #ifdef YY_USE_PROTOS
01528 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
01529 #else
01530 YY_BUFFER_STATE yy_create_buffer( file, size )
01531 FILE *file;
01532 int size;
01533 #endif
01534         {
01535         YY_BUFFER_STATE b;
01536 
01537         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
01538         if ( ! b )
01539                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
01540 
01541         b->yy_buf_size = size;
01542 
01543         /* yy_ch_buf has to be 2 characters longer than the size given because
01544          * we need to put in 2 end-of-buffer characters.
01545          */
01546         b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
01547         if ( ! b->yy_ch_buf )
01548                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
01549 
01550         b->yy_is_our_buffer = 1;
01551 
01552         yy_init_buffer( b, file );
01553 
01554         return b;
01555         }
01556 
01557 
01558 #ifdef YY_USE_PROTOS
01559 void yy_delete_buffer( YY_BUFFER_STATE b )
01560 #else
01561 void yy_delete_buffer( b )
01562 YY_BUFFER_STATE b;
01563 #endif
01564         {
01565         if ( ! b )
01566                 return;
01567 
01568         if ( b == yy_current_buffer )
01569                 yy_current_buffer = (YY_BUFFER_STATE) 0;
01570 
01571         if ( b->yy_is_our_buffer )
01572                 yy_flex_free( (void *) b->yy_ch_buf );
01573 
01574         yy_flex_free( (void *) b );
01575         }
01576 
01577 
01578 #ifndef _WIN32
01579 #include <unistd.h>
01580 #else
01581 #ifndef YY_ALWAYS_INTERACTIVE
01582 #ifndef YY_NEVER_INTERACTIVE
01583 extern int isatty YY_PROTO(( int ));
01584 #endif
01585 #endif
01586 #endif
01587 
01588 #ifdef YY_USE_PROTOS
01589 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
01590 #else
01591 void yy_init_buffer( b, file )
01592 YY_BUFFER_STATE b;
01593 FILE *file;
01594 #endif
01595 
01596 
01597         {
01598         yy_flush_buffer( b );
01599 
01600         b->yy_input_file = file;
01601         b->yy_fill_buffer = 1;
01602 
01603 #if YY_ALWAYS_INTERACTIVE
01604         b->yy_is_interactive = 1;
01605 #else
01606 #if YY_NEVER_INTERACTIVE
01607         b->yy_is_interactive = 0;
01608 #else
01609         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
01610 #endif
01611 #endif
01612         }
01613 
01614 
01615 #ifdef YY_USE_PROTOS
01616 void yy_flush_buffer( YY_BUFFER_STATE b )
01617 #else
01618 void yy_flush_buffer( b )
01619 YY_BUFFER_STATE b;
01620 #endif
01621 
01622         {
01623         if ( ! b )
01624                 return;
01625 
01626         b->yy_n_chars = 0;
01627 
01628         /* We always need two end-of-buffer characters.  The first causes
01629          * a transition to the end-of-buffer state.  The second causes
01630          * a jam in that state.
01631          */
01632         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
01633         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
01634 
01635         b->yy_buf_pos = &b->yy_ch_buf[0];
01636 
01637         b->yy_at_bol = 1;
01638         b->yy_buffer_status = YY_BUFFER_NEW;
01639 
01640         if ( b == yy_current_buffer )
01641                 yy_load_buffer_state();
01642         }
01643 
01644 
01645 #ifndef YY_NO_SCAN_BUFFER
01646 #ifdef YY_USE_PROTOS
01647 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
01648 #else
01649 YY_BUFFER_STATE yy_scan_buffer( base, size )
01650 char *base;
01651 yy_size_t size;
01652 #endif
01653         {
01654         YY_BUFFER_STATE b;
01655 
01656         if ( size < 2 ||
01657              base[size-2] != YY_END_OF_BUFFER_CHAR ||
01658              base[size-1] != YY_END_OF_BUFFER_CHAR )
01659                 /* They forgot to leave room for the EOB's. */
01660                 return 0;
01661 
01662         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
01663         if ( ! b )
01664                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
01665 
01666         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
01667         b->yy_buf_pos = b->yy_ch_buf = base;
01668         b->yy_is_our_buffer = 0;
01669         b->yy_input_file = 0;
01670         b->yy_n_chars = b->yy_buf_size;
01671         b->yy_is_interactive = 0;
01672         b->yy_at_bol = 1;
01673         b->yy_fill_buffer = 0;
01674         b->yy_buffer_status = YY_BUFFER_NEW;
01675 
01676         yy_switch_to_buffer( b );
01677 
01678         return b;
01679         }
01680 #endif
01681 
01682 
01683 #ifndef YY_NO_SCAN_STRING
01684 #ifdef YY_USE_PROTOS
01685 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
01686 #else
01687 YY_BUFFER_STATE yy_scan_string( yy_str )
01688 yyconst char *yy_str;
01689 #endif
01690         {
01691         int len;
01692         for ( len = 0; yy_str[len]; ++len )
01693                 ;
01694 
01695         return yy_scan_bytes( yy_str, len );
01696         }
01697 #endif
01698 
01699 
01700 #ifndef YY_NO_SCAN_BYTES
01701 #ifdef YY_USE_PROTOS
01702 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
01703 #else
01704 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
01705 yyconst char *bytes;
01706 int len;
01707 #endif
01708         {
01709         YY_BUFFER_STATE b;
01710         char *buf;
01711         yy_size_t n;
01712         int i;
01713 
01714         /* Get memory for full buffer, including space for trailing EOB's. */
01715         n = len + 2;
01716         buf = (char *) yy_flex_alloc( n );
01717         if ( ! buf )
01718                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
01719 
01720         for ( i = 0; i < len; ++i )
01721                 buf[i] = bytes[i];
01722 
01723         buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
01724 
01725         b = yy_scan_buffer( buf, n );
01726         if ( ! b )
01727                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
01728 
01729         /* It's okay to grow etc. this buffer, and we should throw it
01730          * away when we're done.
01731          */
01732         b->yy_is_our_buffer = 1;
01733 
01734         return b;
01735         }
01736 #endif
01737 
01738 
01739 #ifndef YY_NO_PUSH_STATE
01740 #ifdef YY_USE_PROTOS
01741 static void yy_push_state( int new_state )
01742 #else
01743 static void yy_push_state( new_state )
01744 int new_state;
01745 #endif
01746         {
01747         if ( yy_start_stack_ptr >= yy_start_stack_depth )
01748                 {
01749                 yy_size_t new_size;
01750 
01751                 yy_start_stack_depth += YY_START_STACK_INCR;
01752                 new_size = yy_start_stack_depth * sizeof( int );
01753 
01754                 if ( ! yy_start_stack )
01755                         yy_start_stack = (int *) yy_flex_alloc( new_size );
01756 
01757                 else
01758                         yy_start_stack = (int *) yy_flex_realloc(
01759                                         (void *) yy_start_stack, new_size );
01760 
01761                 if ( ! yy_start_stack )
01762                         YY_FATAL_ERROR(
01763                         "out of memory expanding start-condition stack" );
01764                 }
01765 
01766         yy_start_stack[yy_start_stack_ptr++] = YY_START;
01767 
01768         BEGIN(new_state);
01769         }
01770 #endif
01771 
01772 
01773 #ifndef YY_NO_POP_STATE
01774 static void yy_pop_state()
01775         {
01776         if ( --yy_start_stack_ptr < 0 )
01777                 YY_FATAL_ERROR( "start-condition stack underflow" );
01778 
01779         BEGIN(yy_start_stack[yy_start_stack_ptr]);
01780         }
01781 #endif
01782 
01783 
01784 #ifndef YY_NO_TOP_STATE
01785 static int yy_top_state()
01786         {
01787         return yy_start_stack[yy_start_stack_ptr - 1];
01788         }
01789 #endif
01790 
01791 #ifndef YY_EXIT_FAILURE
01792 #define YY_EXIT_FAILURE 2
01793 #endif
01794 
01795 #ifdef YY_USE_PROTOS
01796 static void yy_fatal_error( yyconst char msg[] )
01797 #else
01798 static void yy_fatal_error( msg )
01799 char msg[];
01800 #endif
01801         {
01802         (void) fprintf( stderr, "%s\n", msg );
01803         exit( YY_EXIT_FAILURE );
01804         }
01805 
01806 
01807 
01808 /* Redefine yyless() so it works in section 3 code. */
01809 
01810 #undef yyless
01811 #define yyless(n) \
01812         do \
01813                 { \
01814                 /* Undo effects of setting up yytext. */ \
01815                 yytext[yyleng] = yy_hold_char; \
01816                 yy_c_buf_p = yytext + n; \
01817                 yy_hold_char = *yy_c_buf_p; \
01818                 *yy_c_buf_p = '\0'; \
01819                 yyleng = n; \
01820                 } \
01821         while ( 0 )
01822 
01823 
01824 /* Internal utility routines. */
01825 
01826 #ifndef yytext_ptr
01827 #ifdef YY_USE_PROTOS
01828 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
01829 #else
01830 static void yy_flex_strncpy( s1, s2, n )
01831 char *s1;
01832 yyconst char *s2;
01833 int n;
01834 #endif
01835         {
01836         register int i;
01837         for ( i = 0; i < n; ++i )
01838                 s1[i] = s2[i];
01839         }
01840 #endif
01841 
01842 #ifdef YY_NEED_STRLEN
01843 #ifdef YY_USE_PROTOS
01844 static int yy_flex_strlen( yyconst char *s )
01845 #else
01846 static int yy_flex_strlen( s )
01847 yyconst char *s;
01848 #endif
01849         {
01850         register int n;
01851         for ( n = 0; s[n]; ++n )
01852                 ;
01853 
01854         return n;
01855         }
01856 #endif
01857 
01858 
01859 #ifdef YY_USE_PROTOS
01860 static void *yy_flex_alloc( yy_size_t size )
01861 #else
01862 static void *yy_flex_alloc( size )
01863 yy_size_t size;
01864 #endif
01865         {
01866         return (void *) malloc( size );
01867         }
01868 
01869 #ifdef YY_USE_PROTOS
01870 static void *yy_flex_realloc( void *ptr, yy_size_t size )
01871 #else
01872 static void *yy_flex_realloc( ptr, size )
01873 void *ptr;
01874 yy_size_t size;
01875 #endif
01876         {
01877         /* The cast to (char *) in the following accommodates both
01878          * implementations that use char* generic pointers, and those
01879          * that use void* generic pointers.  It works with the latter
01880          * because both ANSI C and C++ allow castless assignment from
01881          * any pointer type to void*, and deal with argument conversions
01882          * as though doing an assignment.
01883          */
01884         return (void *) realloc( (char *) ptr, size );
01885         }
01886 
01887 #ifdef YY_USE_PROTOS
01888 static void yy_flex_free( void *ptr )
01889 #else
01890 static void yy_flex_free( ptr )
01891 void *ptr;
01892 #endif
01893         {
01894         free( ptr );
01895         }
01896 
01897 #if YY_MAIN
01898 int main()
01899         {
01900         yylex();
01901         return 0;
01902         }
01903 #endif
01904 #line 160 "oep.ll"
01905 
01906         /* subroutines */
01907 
01908 /*
01909  * oep_atoi - Convert a string of digits into an integer according to base b
01910  */
01911 static long
01912 oep_atoi(char *s, long b)
01913 {
01914         long    r = 0;
01915         long    negative = 0;
01916 
01917         if (*s == '-') {
01918           negative = 1;
01919           s++;
01920         }
01921         if (b == 8 && *s == '0')
01922           s++;
01923         else if (b == 16 && *s == '0' && (*(s + 1) == 'x' || *(s + 1) == 'X'))
01924           s += 2;
01925 
01926         for (; *s; s++)
01927           if (*s <= '9' && *s >= '0')
01928             r = (r * b) + (*s - '0');
01929           else if (b > 10 && *s <= 'f' && *s >= 'a')
01930             r = (r * b) + (*s - 'a' + 10);
01931           else if (b > 10 && *s <= 'F' && *s >= 'A')
01932             r = (r * b) + (*s - 'A' + 10);
01933           else
01934             break;
01935 
01936         if (negative)
01937           r *= -1;
01938 
01939         return r;
01940 }
01941 
01942 /*
01943  * Convert a string to a float; atof doesn't seem to work, always.
01944  */
01945 static double
01946 oep_atof(char *s)
01947 {
01948         char    *h = s;
01949         double  d = 0.0;
01950         double  f = 0.0;
01951         double  e, k;
01952         long    neg = 0, negexp = 0;
01953 
01954         if (*s == '-') {
01955           neg = 1;
01956           s++;
01957         }
01958         while (*s >= '0' && *s <= '9') {
01959                 d = (d * 10) + *s - '0';
01960                 s++;
01961         }
01962         if (*s == '.') {
01963                 s++;
01964                 e = 10;
01965                 while (*s >= '0' && *s <= '9') {
01966                         d += (*s - '0') / (e * 1.0);
01967                         e *= 10;
01968                         s++;
01969                 }
01970         }
01971         if (*s == 'e' || *s == 'E') {
01972 
01973                 s++;
01974                 if (*s == '-') {
01975                         negexp = 1;
01976                         s++;
01977                 } else if (*s == '+')
01978                         s++;
01979                 e = 0;
01980                 while (*s >= '0' && *s <= '9') {
01981                         e = (e * 10) + *s - '0';
01982                         s++;
01983                 }
01984                 if (e > 0) {
01985                         for (k = 1; e > 0; k *= 10, e--);
01986                         if (negexp)
01987                                 d /= k;
01988                         else
01989                                 d *= k;
01990                 }
01991         }
01992 
01993         if (neg) d *= -1.0;
01994 
01995         return d;
01996 }
01997 
01998 /*
01999  * Convert (some) escaped characters into their ascii values
02000  */
02001 static unsigned char
02002 oep_escape_reader(
02003     char *str
02004 )
02005 {
02006     if (str[0] != '\\') {
02007         return str[0];
02008     }
02009 
02010     switch (str[1]) {
02011       case 'n':
02012         return '\n';
02013       case 't':
02014         return '\t';
02015       case 'v':
02016         return '\v';
02017       case 'b':
02018         return '\b';
02019       case 'r':
02020         return '\r';
02021       case 'f':
02022         return '\f';
02023       case 'a':
02024         return '\a';
02025       case '\\':
02026         return '\\';
02027       case '\?':
02028         return '?';
02029       case '\'':
02030         return '\'';
02031       case '"':
02032         return '"';
02033       case 'x':
02034         {
02035             // hex value
02036             int i;
02037             for (i = 2; str[i] != '\0' && isxdigit(str[i]); i++) {
02038                 continue;
02039             }
02040             char save = str[i];
02041             str[i] = '\0';
02042             char out = (char)oep_atoi(&str[2], 16);
02043             str[i] = save;
02044             return out;
02045         }
02046         break;
02047       default:
02048         // check for octal value
02049         if (str[1] >= '0' && str[1] <= '7') {
02050             int i;
02051             for (i = 1; str[i] >= '0' && str[i] <= '7'; i++) {
02052                 continue;
02053             }
02054             char save = str[i];
02055             str[i] = '\0';
02056             char out = (char)oep_atoi(&str[1], 8);
02057             str[i] = save;
02058             return out;
02059         } else {
02060           return str[1] - 'a';
02061         }
02062         break;
02063     }
02064 }
02065 

Generated on Fri Dec 12 10:53:02 2003 for OmniEvents by doxygen1.2.15