Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

lex.c

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

Generated on Fri May 7 21:15:41 2004 by doxygen 1.3.5