"I am a person who works hard and plays hard."

Yuan Wei
Second Year Graduate Student Department of Computer Science
University of Virginia Charlottesville, VA 22903
Email: yw3f@cs.virginia.edu


Source Code Analysis

Main Page   Compound List   File List   Compound Members   File Members  

exolex.c

Go to the documentation of this file.
00001 /* A lexical scanner generated by flex */
00002 
00003 /* Scanner skeleton version:
00004  * $Header: /n/ord/q/projects/CVS/simplesim/libexo/exolex.c,v 1.1.1.1 2000/05/26 15:21:54 taustin 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 
00013 
00014 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
00015 #ifdef c_plusplus
00016 #ifndef __cplusplus
00017 #define __cplusplus
00018 #endif
00019 #endif
00020 
00021 
00022 #ifdef __cplusplus
00023 
00024 #include <stdlib.h>
00025 #include <unistd.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 typedef unsigned char YY_CHAR;
00265 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
00266 typedef int yy_state_type;
00267 extern char *yytext;
00268 #define yytext_ptr yytext
00269 
00270 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
00271 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
00272 static int yy_get_next_buffer YY_PROTO(( void ));
00273 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
00274 
00275 /* Done after the current pattern has been matched and before the
00276  * corresponding action - sets up yytext.
00277  */
00278 #define YY_DO_BEFORE_ACTION \
00279         yytext_ptr = yy_bp; \
00280         yyleng = (int) (yy_cp - yy_bp); \
00281         yy_hold_char = *yy_cp; \
00282         *yy_cp = '\0'; \
00283         yy_c_buf_p = yy_cp;
00284 
00285 #define YY_NUM_RULES 25
00286 #define YY_END_OF_BUFFER 26
00287 static yyconst short int yy_accept[60] =
00288     {   0,
00289         0,    0,    0,    0,   26,   24,   22,   23,   12,   24,
00290        24,   16,   17,   15,   12,   24,   12,    5,    5,   20,
00291        11,   18,   19,   13,   14,   24,   21,   12,    0,   10,
00292         0,    0,    0,    0,    5,    5,    7,    2,    8,    4,
00293         0,    0,   11,    1,    9,    0,    7,    0,    0,    6,
00294         3,    0,    7,    0,    0,    8,    0,    7,    0
00295     } ;
00296 
00297 static yyconst int yy_ec[256] =
00298     {   0,
00299         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
00300         2,    2,    1,    1,    1,    1,    1,    1,    1,    1,
00301         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00302         1,    2,    4,    5,    6,    7,    8,    9,   10,   11,
00303        12,   13,   14,   15,   16,   17,   18,   19,   20,   20,
00304        20,   20,   20,   20,   20,   20,   20,    1,    1,   21,
00305         1,   22,   23,   24,   25,   25,   25,   25,   26,   25,
00306        27,   27,   27,   27,   27,   27,   27,   27,   27,   27,
00307        27,   27,   27,   27,   27,   27,   27,   28,   27,   27,
00308        29,   30,   31,   32,   27,    1,   25,   25,   25,   25,
00309 
00310        26,   25,   27,   27,   27,   27,   27,   27,   27,   27,
00311        27,   27,   27,   27,   27,   27,   27,   27,   27,   28,
00312        27,   27,   33,   34,   35,   36,    1,    1,    1,    1,
00313         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00314         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00315         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00316         1,    1,    1,    1,    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 
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         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00325         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00326         1,    1,    1,    1,    1
00327     } ;
00328 
00329 static yyconst int yy_meta[37] =
00330     {   0,
00331         1,    1,    1,    1,    1,    1,    1,    1,    1,    2,
00332         1,    1,    1,    1,    1,    1,    1,    1,    3,    3,
00333         1,    1,    1,    1,    3,    3,    3,    3,    1,    1,
00334         1,    1,    1,    1,    1,    1
00335     } ;
00336 
00337 static yyconst short int yy_base[64] =
00338     {   0,
00339         0,    0,   35,   60,   83,  178,  178,  178,   83,   34,
00340        51,  178,  178,  178,   23,   25,   46,   30,   48,  178,
00341         0,  178,  178,  178,  178,   50,  178,    0,   36,  178,
00342        49,   41,   43,   53,   83,  101,   58,    0,  103,  111,
00343        94,  113,    0,  178,  178,  126,  115,  133,   74,   85,
00344       131,  105,  124,  144,  135,  142,  146,  148,  178,  168,
00345       171,  174,   45
00346     } ;
00347 
00348 static yyconst short int yy_def[64] =
00349     {   0,
00350        59,    1,   60,   60,   59,   59,   59,   59,   59,   61,
00351        62,   59,   59,   59,    9,   59,    9,   59,   59,   59,
00352        63,   59,   59,   59,   59,   59,   59,    9,   61,   59,
00353        61,   62,   62,   59,   59,   59,   59,    9,   59,   59,
00354        59,   59,   63,   59,   59,   59,   59,   59,   59,   59,
00355        59,   59,   59,   59,   59,   59,   59,   59,    0,   59,
00356        59,   59,   59
00357     } ;
00358 
00359 static yyconst short int yy_nxt[215] =
00360     {   0,
00361         6,    7,    8,    9,   10,    9,    9,    9,    9,   11,
00362        12,   13,    9,    9,   14,   15,   16,   17,   18,   19,
00363        20,    6,    9,    9,   21,   21,   21,   21,   22,    6,
00364        23,    9,   24,    9,   25,    9,    7,    8,   30,   34,
00365        30,   35,   36,   37,   37,   59,   39,   43,   40,   40,
00366        45,   59,   32,   26,   26,   41,   27,   42,   38,   26,
00367        26,    7,    8,   31,   39,   31,   36,   36,   44,   44,
00368        33,   37,   37,   41,   44,   44,   37,   37,   26,   26,
00369        33,   27,   59,   46,   26,   26,   28,   59,   28,   28,
00370        28,   28,   50,   50,   59,   28,   28,   59,   28,   39,
00371 
00372        28,   40,   40,   50,   50,   28,   28,   49,   41,   49,
00373        42,   59,   50,   50,   28,   59,   28,   39,   28,   36,
00374        36,   47,   47,   53,   53,   59,   41,   39,   48,   40,
00375        40,   51,   51,   47,   47,   59,   41,   51,   51,   52,
00376        54,   52,   53,   53,   53,   53,   55,   59,   55,   51,
00377        51,   56,   56,   56,   56,   51,   51,   57,   59,   57,
00378        56,   56,   58,   58,   58,   58,   58,   58,    6,    6,
00379         6,   29,   29,   29,   32,   59,   32,    5,   59,   59,
00380        59,   59,   59,   59,   59,   59,   59,   59,   59,   59,
00381        59,   59,   59,   59,   59,   59,   59,   59,   59,   59,
00382 
00383        59,   59,   59,   59,   59,   59,   59,   59,   59,   59,
00384        59,   59,   59,   59
00385     } ;
00386 
00387 static yyconst short int yy_chk[215] =
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,    1,    3,    3,   10,   15,
00393        29,   15,   15,   16,   16,   33,   18,   63,   18,   18,
00394        32,   31,   33,    3,    3,   18,    3,   18,   17,    3,
00395         3,    4,    4,   10,   19,   29,   19,   19,   26,   26,
00396        32,   34,   34,   19,   26,   26,   37,   37,    4,    4,
00397        11,    4,    5,   37,    4,    4,    9,    0,    9,    9,
00398         9,    9,   49,   49,    0,    9,    9,    0,    9,   35,
00399 
00400         9,   35,   35,   50,   50,    9,    9,   41,   35,   41,
00401        35,    0,   41,   41,    9,    0,    9,   36,    9,   36,
00402        36,   39,   39,   52,   52,    0,   36,   40,   39,   40,
00403        40,   42,   42,   47,   47,    0,   40,   42,   42,   46,
00404        47,   46,   53,   53,   46,   46,   48,    0,   48,   51,
00405        51,   48,   48,   55,   55,   51,   51,   54,    0,   54,
00406        56,   56,   54,   54,   57,   57,   58,   58,   60,   60,
00407        60,   61,   61,   61,   62,    0,   62,   59,   59,   59,
00408        59,   59,   59,   59,   59,   59,   59,   59,   59,   59,
00409        59,   59,   59,   59,   59,   59,   59,   59,   59,   59,
00410 
00411        59,   59,   59,   59,   59,   59,   59,   59,   59,   59,
00412        59,   59,   59,   59
00413     } ;
00414 
00415 static yy_state_type yy_last_accepting_state;
00416 static char *yy_last_accepting_cpos;
00417 
00418 /* The intent behind this definition is that it'll catch
00419  * any uses of REJECT which flex missed.
00420  */
00421 #define REJECT reject_used_but_not_detected
00422 #define yymore() yymore_used_but_not_detected
00423 #define YY_MORE_ADJ 0
00424 #define YY_RESTORE_YY_MORE_OFFSET
00425 char *yytext;
00426 #line 1 "exolex.l"
00427 #define INITIAL 0
00428 /*
00429  * exolex.l - EXO library lexor
00430  *
00431  * This file is a part of the SimpleScalar tool suite written by
00432  * Todd M. Austin as a part of the Multiscalar Research Project.
00433  *
00434  * The tool suite is currently maintained by Doug Burger and Todd M. Austin.
00435  *
00436  * Copyright (C) 1997 by Todd M. Austin
00437  *
00438  * This source file is distributed "as is" in the hope that it will be
00439  * useful.  The tool set comes with no warranty, and no author or
00440  * distributor accepts any responsibility for the consequences of its
00441  * use. 
00442  *
00443  * Everyone is granted permission to copy, modify and redistribute
00444  * this tool set under the following conditions:
00445  *
00446  *    This source code is distributed for non-commercial use only. 
00447  *    Please contact the maintainer for restrictions applying to 
00448  *    commercial use.
00449  *
00450  *    Permission is granted to anyone to make or distribute copies
00451  *    of this source code, either as received or modified, in any
00452  *    medium, provided that all copyright notices, permission and
00453  *    nonwarranty notices are preserved, and that the distributor
00454  *    grants the recipient permission for further redistribution as
00455  *    permitted by this document.
00456  *
00457  *    Permission is granted to distribute this file in compiled
00458  *    or executable form under the same conditions that apply for
00459  *    source code, provided that either:
00460  *
00461  *    A. it is accompanied by the corresponding machine-readable
00462  *       source code,
00463  *    B. it is accompanied by a written offer, with no time limit,
00464  *       to give anyone a machine-readable copy of the corresponding
00465  *       source code in return for reimbursement of the cost of
00466  *       distribution.  This written offer must permit verbatim
00467  *       duplication by anyone, or
00468  *    C. it is distributed by someone who received only the
00469  *       executable form, and is accompanied by a copy of the
00470  *       written offer of source code that they received concurrently.
00471  *
00472  * In other words, you are welcome to use, share and improve this
00473  * source file.  You are forbidden to forbid anyone else to use, share
00474  * and improve what you give them.
00475  *
00476  * INTERNET: dburger@cs.wisc.edu
00477  * US Mail:  1210 W. Dayton Street, Madison, WI 53706
00478  *
00479  * $Id: exolex.c,v 1.1.1.1 2000/05/26 15:21:54 taustin Exp $
00480  *
00481  * $Log: exolex.c,v $
00482  * Revision 1.1.1.1  2000/05/26 15:21:54  taustin
00483  * SimpleScalar Tool Set
00484  *
00485  *
00486  * Revision 1.1  1998/08/27 08:54:51  taustin
00487  * Initial revision
00488  *
00489  *
00490  */
00491 #line 62 "exolex.l"
00492 /* C-style lexor. */
00493 
00494 #include <stdio.h>
00495 #include <stdlib.h>
00496 
00497 #include "../host.h"
00498 #include "../misc.h"
00499 #include "libexo.h"
00500 
00501 /* maximum size token (including strings) for lex */
00502 #undef YYLMAX
00503 #define YYLMAX  (16*1024)
00504 
00505 /* disable interactive features, as they are non-portable */
00506 #define YY_NEVER_INTERACTIVE    1
00507 
00508 unsigned line = 1;              /* line of last recognized token */
00509 
00510 int yywrap(void);
00511 static void lex_eat_comment(void);
00512 
00513 #define BLOB_MODE 1
00514 
00515 #line 512 "lex.yy.c"
00516 
00517 /* Macros after this point can all be overridden by user definitions in
00518  * section 1.
00519  */
00520 
00521 #ifndef YY_SKIP_YYWRAP
00522 #ifdef __cplusplus
00523 extern "C" int yywrap YY_PROTO(( void ));
00524 #else
00525 extern int yywrap YY_PROTO(( void ));
00526 #endif
00527 #endif
00528 
00529 #ifndef YY_NO_UNPUT
00530 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
00531 #endif
00532 
00533 #ifndef yytext_ptr
00534 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
00535 #endif
00536 
00537 #ifdef YY_NEED_STRLEN
00538 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
00539 #endif
00540 
00541 #ifndef YY_NO_INPUT
00542 #ifdef __cplusplus
00543 static int yyinput YY_PROTO(( void ));
00544 #else
00545 static int input YY_PROTO(( void ));
00546 #endif
00547 #endif
00548 
00549 #if YY_STACK_USED
00550 static int yy_start_stack_ptr = 0;
00551 static int yy_start_stack_depth = 0;
00552 static int *yy_start_stack = 0;
00553 #ifndef YY_NO_PUSH_STATE
00554 static void yy_push_state YY_PROTO(( int new_state ));
00555 #endif
00556 #ifndef YY_NO_POP_STATE
00557 static void yy_pop_state YY_PROTO(( void ));
00558 #endif
00559 #ifndef YY_NO_TOP_STATE
00560 static int yy_top_state YY_PROTO(( void ));
00561 #endif
00562 
00563 #else
00564 #define YY_NO_PUSH_STATE 1
00565 #define YY_NO_POP_STATE 1
00566 #define YY_NO_TOP_STATE 1
00567 #endif
00568 
00569 #ifdef YY_MALLOC_DECL
00570 YY_MALLOC_DECL
00571 #else
00572 #if __STDC__
00573 #ifndef __cplusplus
00574 #include <stdlib.h>
00575 #endif
00576 #else
00577 /* Just try to get by without declaring the routines.  This will fail
00578  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
00579  * or sizeof(void*) != sizeof(int).
00580  */
00581 #endif
00582 #endif
00583 
00584 /* Amount of stuff to slurp up with each read. */
00585 #ifndef YY_READ_BUF_SIZE
00586 #define YY_READ_BUF_SIZE 8192
00587 #endif
00588 
00589 /* Copy whatever the last rule matched to the standard output. */
00590 
00591 #ifndef ECHO
00592 /* This used to be an fputs(), but since the string might contain NUL's,
00593  * we now use fwrite().
00594  */
00595 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
00596 #endif
00597 
00598 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
00599  * is returned in "result".
00600  */
00601 #ifndef YY_INPUT
00602 #define YY_INPUT(buf,result,max_size) \
00603         if ( yy_current_buffer->yy_is_interactive ) \
00604                 { \
00605                 int c = '*', n; \
00606                 for ( n = 0; n < max_size && \
00607                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
00608                         buf[n] = (char) c; \
00609                 if ( c == '\n' ) \
00610                         buf[n++] = (char) c; \
00611                 if ( c == EOF && ferror( yyin ) ) \
00612                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
00613                 result = n; \
00614                 } \
00615         else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
00616                   && ferror( yyin ) ) \
00617                 YY_FATAL_ERROR( "input in flex scanner failed" );
00618 #endif
00619 
00620 /* No semi-colon after return; correct usage is to write "yyterminate();" -
00621  * we don't want an extra ';' after the "return" because that will cause
00622  * some compilers to complain about unreachable statements.
00623  */
00624 #ifndef yyterminate
00625 #define yyterminate() return YY_NULL
00626 #endif
00627 
00628 /* Number of entries by which start-condition stack grows. */
00629 #ifndef YY_START_STACK_INCR
00630 #define YY_START_STACK_INCR 25
00631 #endif
00632 
00633 /* Report a fatal error. */
00634 #ifndef YY_FATAL_ERROR
00635 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
00636 #endif
00637 
00638 /* Default declaration of generated scanner - a define so the user can
00639  * easily add parameters.
00640  */
00641 #ifndef YY_DECL
00642 #define YY_DECL int yylex YY_PROTO(( void ))
00643 #endif
00644 
00645 /* Code executed at the beginning of each rule, after yytext and yyleng
00646  * have been set up.
00647  */
00648 #ifndef YY_USER_ACTION
00649 #define YY_USER_ACTION
00650 #endif
00651 
00652 /* Code executed at the end of each rule. */
00653 #ifndef YY_BREAK
00654 #define YY_BREAK break;
00655 #endif
00656 
00657 #define YY_RULE_SETUP \
00658         YY_USER_ACTION
00659 
00660 YY_DECL
00661         {
00662         register yy_state_type yy_current_state;
00663         register char *yy_cp, *yy_bp;
00664         register int yy_act;
00665 
00666 #line 96 "exolex.l"
00667 
00668 
00669 #line 666 "lex.yy.c"
00670 
00671         if ( yy_init )
00672                 {
00673                 yy_init = 0;
00674 
00675 #ifdef YY_USER_INIT
00676                 YY_USER_INIT;
00677 #endif
00678 
00679                 if ( ! yy_start )
00680                         yy_start = 1;   /* first start state */
00681 
00682                 if ( ! yyin )
00683                         yyin = stdin;
00684 
00685                 if ( ! yyout )
00686                         yyout = stdout;
00687 
00688                 if ( ! yy_current_buffer )
00689                         yy_current_buffer =
00690                                 yy_create_buffer( yyin, YY_BUF_SIZE );
00691 
00692                 yy_load_buffer_state();
00693                 }
00694 
00695         while ( 1 )             /* loops until end-of-file is reached */
00696                 {
00697                 yy_cp = yy_c_buf_p;
00698 
00699                 /* Support of yytext. */
00700                 *yy_cp = yy_hold_char;
00701 
00702                 /* yy_bp points to the position in yy_ch_buf of the start of
00703                  * the current run.
00704                  */
00705                 yy_bp = yy_cp;
00706 
00707                 yy_current_state = yy_start;
00708 yy_match:
00709                 do
00710                         {
00711                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
00712                         if ( yy_accept[yy_current_state] )
00713                                 {
00714                                 yy_last_accepting_state = yy_current_state;
00715                                 yy_last_accepting_cpos = yy_cp;
00716                                 }
00717                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
00718                                 {
00719                                 yy_current_state = (int) yy_def[yy_current_state];
00720                                 if ( yy_current_state >= 60 )
00721                                         yy_c = yy_meta[(unsigned int) yy_c];
00722                                 }
00723                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
00724                         ++yy_cp;
00725                         }
00726                 while ( yy_base[yy_current_state] != 178 );
00727 
00728 yy_find_action:
00729                 yy_act = yy_accept[yy_current_state];
00730                 if ( yy_act == 0 )
00731                         { /* have to back up */
00732                         yy_cp = yy_last_accepting_cpos;
00733                         yy_current_state = yy_last_accepting_state;
00734                         yy_act = yy_accept[yy_current_state];
00735                         }
00736 
00737                 YY_DO_BEFORE_ACTION;
00738 
00739 
00740 do_action:      /* This label is used only to access EOF actions. */
00741 
00742 
00743                 switch ( yy_act )
00744         { /* beginning of action switch */
00745                         case 0: /* must back up */
00746                         /* undo the effects of YY_DO_BEFORE_ACTION */
00747                         *yy_cp = yy_hold_char;
00748                         yy_cp = yy_last_accepting_cpos;
00749                         yy_current_state = yy_last_accepting_state;
00750                         goto yy_find_action;
00751 
00752 case 1:
00753 YY_RULE_SETUP
00754 #line 98 "exolex.l"
00755 { return lex_byte; }
00756         YY_BREAK
00757 case 2:
00758 YY_RULE_SETUP
00759 #line 100 "exolex.l"
00760 { lex_eat_comment(); }
00761         YY_BREAK
00762 case 3:
00763 YY_RULE_SETUP
00764 #line 102 "exolex.l"
00765 { return lex_address; }
00766         YY_BREAK
00767 case 4:
00768 YY_RULE_SETUP
00769 #line 103 "exolex.l"
00770 { return lex_integer; }
00771         YY_BREAK
00772 case 5:
00773 YY_RULE_SETUP
00774 #line 104 "exolex.l"
00775 { return lex_integer; }
00776         YY_BREAK
00777 case 6:
00778 YY_RULE_SETUP
00779 #line 106 "exolex.l"
00780 { return lex_float; }
00781         YY_BREAK
00782 case 7:
00783 YY_RULE_SETUP
00784 #line 107 "exolex.l"
00785 { return lex_float; }
00786         YY_BREAK
00787 case 8:
00788 YY_RULE_SETUP
00789 #line 108 "exolex.l"
00790 { return lex_float; }
00791         YY_BREAK
00792 case 9:
00793 YY_RULE_SETUP
00794 #line 110 "exolex.l"
00795 { return lex_char; }
00796         YY_BREAK
00797 case 10:
00798 YY_RULE_SETUP
00799 #line 112 "exolex.l"
00800 /*"*/   { return lex_string; }
00801         YY_BREAK
00802 case 11:
00803 YY_RULE_SETUP
00804 #line 114 "exolex.l"
00805 { return lex_token; }
00806         YY_BREAK
00807 case 12:
00808 YY_RULE_SETUP
00809 #line 116 "exolex.l"
00810 { return lex_token; }
00811         YY_BREAK
00812 case 13:
00813 YY_RULE_SETUP
00814 #line 118 "exolex.l"
00815 { return '{'; }
00816         YY_BREAK
00817 case 14:
00818 YY_RULE_SETUP
00819 #line 119 "exolex.l"
00820 { return '}'; }
00821         YY_BREAK
00822 case 15:
00823 YY_RULE_SETUP
00824 #line 120 "exolex.l"
00825 { return ','; }
00826         YY_BREAK
00827 case 16:
00828 YY_RULE_SETUP
00829 #line 121 "exolex.l"
00830 { return '('; }
00831         YY_BREAK
00832 case 17:
00833 YY_RULE_SETUP
00834 #line 122 "exolex.l"
00835 { return ')'; }
00836         YY_BREAK
00837 case 18:
00838 YY_RULE_SETUP
00839 #line 123 "exolex.l"
00840 { return '['; }
00841         YY_BREAK
00842 case 19:
00843 YY_RULE_SETUP
00844 #line 124 "exolex.l"
00845 { return ']'; }
00846         YY_BREAK
00847 case 20:
00848 YY_RULE_SETUP
00849 #line 125 "exolex.l"
00850 { BEGIN(BLOB_MODE); return '<'; }
00851         YY_BREAK
00852 case 21:
00853 YY_RULE_SETUP
00854 #line 126 "exolex.l"
00855 { BEGIN(INITIAL); return '>'; }
00856         YY_BREAK
00857 case 22:
00858 YY_RULE_SETUP
00859 #line 128 "exolex.l"
00860 { /* nada */; }
00861         YY_BREAK
00862 case 23:
00863 YY_RULE_SETUP
00864 #line 129 "exolex.l"
00865 { line++; }
00866         YY_BREAK
00867 case YY_STATE_EOF(INITIAL):
00868 case YY_STATE_EOF(BLOB_MODE):
00869 #line 130 "exolex.l"
00870 { return lex_eof; }
00871         YY_BREAK
00872 case 24:
00873 YY_RULE_SETUP
00874 #line 131 "exolex.l"
00875 { /* bogus char */
00876                                           fatal("bogus character in input"); }
00877         YY_BREAK
00878 case 25:
00879 YY_RULE_SETUP
00880 #line 134 "exolex.l"
00881 ECHO;
00882         YY_BREAK
00883 #line 880 "lex.yy.c"
00884 
00885         case YY_END_OF_BUFFER:
00886                 {
00887                 /* Amount of text matched not including the EOB char. */
00888                 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
00889 
00890                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
00891                 *yy_cp = yy_hold_char;
00892                 YY_RESTORE_YY_MORE_OFFSET
00893 
00894                 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
00895                         {
00896                         /* We're scanning a new file or input source.  It's
00897                          * possible that this happened because the user
00898                          * just pointed yyin at a new source and called
00899                          * yylex().  If so, then we have to assure
00900                          * consistency between yy_current_buffer and our
00901                          * globals.  Here is the right place to do so, because
00902                          * this is the first action (other than possibly a
00903                          * back-up) that will match for the new input source.
00904                          */
00905                         yy_n_chars = yy_current_buffer->yy_n_chars;
00906                         yy_current_buffer->yy_input_file = yyin;
00907                         yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
00908                         }
00909 
00910                 /* Note that here we test for yy_c_buf_p "<=" to the position
00911                  * of the first EOB in the buffer, since yy_c_buf_p will
00912                  * already have been incremented past the NUL character
00913                  * (since all states make transitions on EOB to the
00914                  * end-of-buffer state).  Contrast this with the test
00915                  * in input().
00916                  */
00917                 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
00918                         { /* This was really a NUL. */
00919                         yy_state_type yy_next_state;
00920 
00921                         yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
00922 
00923                         yy_current_state = yy_get_previous_state();
00924 
00925                         /* Okay, we're now positioned to make the NUL
00926                          * transition.  We couldn't have
00927                          * yy_get_previous_state() go ahead and do it
00928                          * for us because it doesn't know how to deal
00929                          * with the possibility of jamming (and we don't
00930                          * want to build jamming into it because then it
00931                          * will run more slowly).
00932                          */
00933 
00934                         yy_next_state = yy_try_NUL_trans( yy_current_state );
00935 
00936                         yy_bp = yytext_ptr + YY_MORE_ADJ;
00937 
00938                         if ( yy_next_state )
00939                                 {
00940                                 /* Consume the NUL. */
00941                                 yy_cp = ++yy_c_buf_p;
00942                                 yy_current_state = yy_next_state;
00943                                 goto yy_match;
00944                                 }
00945 
00946                         else
00947                                 {
00948                                 yy_cp = yy_c_buf_p;
00949                                 goto yy_find_action;
00950                                 }
00951                         }
00952 
00953                 else switch ( yy_get_next_buffer() )
00954                         {
00955                         case EOB_ACT_END_OF_FILE:
00956                                 {
00957                                 yy_did_buffer_switch_on_eof = 0;
00958 
00959                                 if ( yywrap() )
00960                                         {
00961                                         /* Note: because we've taken care in
00962                                          * yy_get_next_buffer() to have set up
00963                                          * yytext, we can now set up
00964                                          * yy_c_buf_p so that if some total
00965                                          * hoser (like flex itself) wants to
00966                                          * call the scanner after we return the
00967                                          * YY_NULL, it'll still work - another
00968                                          * YY_NULL will get returned.
00969                                          */
00970                                         yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
00971 
00972                                         yy_act = YY_STATE_EOF(YY_START);
00973                                         goto do_action;
00974                                         }
00975 
00976                                 else
00977                                         {
00978                                         if ( ! yy_did_buffer_switch_on_eof )
00979                                                 YY_NEW_FILE;
00980                                         }
00981                                 break;
00982                                 }
00983 
00984                         case EOB_ACT_CONTINUE_SCAN:
00985                                 yy_c_buf_p =
00986                                         yytext_ptr + yy_amount_of_matched_text;
00987 
00988                                 yy_current_state = yy_get_previous_state();
00989 
00990                                 yy_cp = yy_c_buf_p;
00991                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
00992                                 goto yy_match;
00993 
00994                         case EOB_ACT_LAST_MATCH:
00995                                 yy_c_buf_p =
00996                                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
00997 
00998                                 yy_current_state = yy_get_previous_state();
00999 
01000                                 yy_cp = yy_c_buf_p;
01001                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
01002                                 goto yy_find_action;
01003                         }
01004                 break;
01005                 }
01006 
01007         default:
01008                 YY_FATAL_ERROR(
01009                         "fatal flex scanner internal error--no action found" );
01010         } /* end of action switch */
01011                 } /* end of scanning one token */
01012         } /* end of yylex */
01013 
01014 
01015 /* yy_get_next_buffer - try to read in a new buffer
01016  *
01017  * Returns a code representing an action:
01018  *      EOB_ACT_LAST_MATCH -
01019  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
01020  *      EOB_ACT_END_OF_FILE - end of file
01021  */
01022 
01023 static int yy_get_next_buffer()
01024         {
01025         register char *dest = yy_current_buffer->yy_ch_buf;
01026         register char *source = yytext_ptr;
01027         register int number_to_move, i;
01028         int ret_val;
01029 
01030         if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
01031                 YY_FATAL_ERROR(
01032                 "fatal flex scanner internal error--end of buffer missed" );
01033 
01034         if ( yy_current_buffer->yy_fill_buffer == 0 )
01035                 { /* Don't try to fill the buffer, so this is an EOF. */
01036                 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
01037                         {
01038                         /* We matched a single character, the EOB, so
01039                          * treat this as a final EOF.
01040                          */
01041                         return EOB_ACT_END_OF_FILE;
01042                         }
01043 
01044                 else
01045                         {
01046                         /* We matched some text prior to the EOB, first
01047                          * process it.
01048                          */
01049                         return EOB_ACT_LAST_MATCH;
01050                         }
01051                 }
01052 
01053         /* Try to read more data. */
01054 
01055         /* First move last chars to start of buffer. */
01056         number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
01057 
01058         for ( i = 0; i < number_to_move; ++i )
01059                 *(dest++) = *(source++);
01060 
01061         if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
01062                 /* don't do the read, it's not guaranteed to return an EOF,
01063                  * just force an EOF
01064                  */
01065                 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
01066 
01067         else
01068                 {
01069                 int num_to_read =
01070                         yy_current_buffer->yy_buf_size - number_to_move - 1;
01071 
01072                 while ( num_to_read <= 0 )
01073                         { /* Not enough room in the buffer - grow it. */
01074 #ifdef YY_USES_REJECT
01075                         YY_FATAL_ERROR(
01076 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
01077 #else
01078 
01079                         /* just a shorter name for the current buffer */
01080                         YY_BUFFER_STATE b = yy_current_buffer;
01081 
01082                         int yy_c_buf_p_offset =
01083                                 (int) (yy_c_buf_p - b->yy_ch_buf);
01084 
01085                         if ( b->yy_is_our_buffer )
01086                                 {
01087                                 int new_size = b->yy_buf_size * 2;
01088 
01089                                 if ( new_size <= 0 )
01090                                         b->yy_buf_size += b->yy_buf_size / 8;
01091                                 else
01092                                         b->yy_buf_size *= 2;
01093 
01094                                 b->yy_ch_buf = (char *)
01095                                         /* Include room in for 2 EOB chars. */
01096                                         yy_flex_realloc( (void *) b->yy_ch_buf,
01097                                                          b->yy_buf_size + 2 );
01098                                 }
01099                         else
01100                                 /* Can't grow it, we don't own it. */
01101                                 b->yy_ch_buf = 0;
01102 
01103                         if ( ! b->yy_ch_buf )
01104                                 YY_FATAL_ERROR(
01105                                 "fatal error - scanner input buffer overflow" );
01106 
01107                         yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
01108 
01109                         num_to_read = yy_current_buffer->yy_buf_size -
01110                                                 number_to_move - 1;
01111 #endif
01112                         }
01113 
01114                 if ( num_to_read > YY_READ_BUF_SIZE )
01115                         num_to_read = YY_READ_BUF_SIZE;
01116 
01117                 /* Read in more data. */
01118                 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
01119                         yy_n_chars, num_to_read );
01120 
01121                 yy_current_buffer->yy_n_chars = yy_n_chars;
01122                 }
01123 
01124         if ( yy_n_chars == 0 )
01125                 {
01126                 if ( number_to_move == YY_MORE_ADJ )
01127                         {
01128                         ret_val = EOB_ACT_END_OF_FILE;
01129                         yyrestart( yyin );
01130                         }
01131 
01132                 else
01133                         {
01134                         ret_val = EOB_ACT_LAST_MATCH;
01135                         yy_current_buffer->yy_buffer_status =
01136                                 YY_BUFFER_EOF_PENDING;
01137                         }
01138                 }
01139 
01140         else
01141                 ret_val = EOB_ACT_CONTINUE_SCAN;
01142 
01143         yy_n_chars += number_to_move;
01144         yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
01145         yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
01146 
01147         yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
01148 
01149         return ret_val;
01150         }
01151 
01152 
01153 /* yy_get_previous_state - get the state just before the EOB char was reached */
01154 
01155 static yy_state_type yy_get_previous_state()
01156         {
01157         register yy_state_type yy_current_state;
01158         register char *yy_cp;
01159 
01160         yy_current_state = yy_start;
01161 
01162         for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
01163                 {
01164                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
01165                 if ( yy_accept[yy_current_state] )
01166                         {
01167                         yy_last_accepting_state = yy_current_state;
01168                         yy_last_accepting_cpos = yy_cp;
01169                         }
01170                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01171                         {
01172                         yy_current_state = (int) yy_def[yy_current_state];
01173                         if ( yy_current_state >= 60 )
01174                                 yy_c = yy_meta[(unsigned int) yy_c];
01175                         }
01176                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01177                 }
01178 
01179         return yy_current_state;
01180         }
01181 
01182 
01183 /* yy_try_NUL_trans - try to make a transition on the NUL character
01184  *
01185  * synopsis
01186  *      next_state = yy_try_NUL_trans( current_state );
01187  */
01188 
01189 #ifdef YY_USE_PROTOS
01190 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
01191 #else
01192 static yy_state_type yy_try_NUL_trans( yy_current_state )
01193 yy_state_type yy_current_state;
01194 #endif
01195         {
01196         register int yy_is_jam;
01197         register char *yy_cp = yy_c_buf_p;
01198 
01199         register YY_CHAR yy_c = 1;
01200         if ( yy_accept[yy_current_state] )
01201                 {
01202                 yy_last_accepting_state = yy_current_state;
01203                 yy_last_accepting_cpos = yy_cp;
01204                 }
01205         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01206                 {
01207                 yy_current_state = (int) yy_def[yy_current_state];
01208                 if ( yy_current_state >= 60 )
01209                         yy_c = yy_meta[(unsigned int) yy_c];
01210                 }
01211         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01212         yy_is_jam = (yy_current_state == 59);
01213 
01214         return yy_is_jam ? 0 : yy_current_state;
01215         }
01216 
01217 
01218 #ifndef YY_NO_UNPUT
01219 #ifdef YY_USE_PROTOS
01220 static void yyunput( int c, register char *yy_bp )
01221 #else
01222 static void yyunput( c, yy_bp )
01223 int c;
01224 register char *yy_bp;
01225 #endif
01226         {
01227         register char *yy_cp = yy_c_buf_p;
01228 
01229         /* undo effects of setting up yytext */
01230         *yy_cp = yy_hold_char;
01231 
01232         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
01233                 { /* need to shift things up to make room */
01234                 /* +2 for EOB chars. */
01235                 register int number_to_move = yy_n_chars + 2;
01236                 register char *dest = &yy_current_buffer->yy_ch_buf[
01237                                         yy_current_buffer->yy_buf_size + 2];
01238                 register char *source =
01239                                 &yy_current_buffer->yy_ch_buf[number_to_move];
01240 
01241                 while ( source > yy_current_buffer->yy_ch_buf )
01242                         *--dest = *--source;
01243 
01244                 yy_cp += (int) (dest - source);
01245                 yy_bp += (int) (dest - source);
01246                 yy_current_buffer->yy_n_chars =
01247                         yy_n_chars = yy_current_buffer->yy_buf_size;
01248 
01249                 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
01250                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
01251                 }
01252 
01253         *--yy_cp = (char) c;
01254 
01255 
01256         yytext_ptr = yy_bp;
01257         yy_hold_char = *yy_cp;
01258         yy_c_buf_p = yy_cp;
01259         }
01260 #endif  /* ifndef YY_NO_UNPUT */
01261 
01262 
01263 #ifdef __cplusplus
01264 static int yyinput()
01265 #else
01266 static int input()
01267 #endif
01268         {
01269         int c;
01270 
01271         *yy_c_buf_p = yy_hold_char;
01272 
01273         if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
01274                 {
01275                 /* yy_c_buf_p now points to the character we want to return.
01276                  * If this occurs *before* the EOB characters, then it's a
01277                  * valid NUL; if not, then we've hit the end of the buffer.
01278                  */
01279                 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
01280                         /* This was really a NUL. */
01281                         *yy_c_buf_p = '\0';
01282 
01283                 else
01284                         { /* need more input */
01285                         int offset = yy_c_buf_p - yytext_ptr;
01286                         ++yy_c_buf_p;
01287 
01288                         switch ( yy_get_next_buffer() )
01289                                 {
01290                                 case EOB_ACT_LAST_MATCH:
01291                                         /* This happens because yy_g_n_b()
01292                                          * sees that we've accumulated a
01293                                          * token and flags that we need to
01294                                          * try matching the token before
01295                                          * proceeding.  But for input(),
01296                                          * there's no matching to consider.
01297                                          * So convert the EOB_ACT_LAST_MATCH
01298                                          * to EOB_ACT_END_OF_FILE.
01299                                          */
01300 
01301                                         /* Reset buffer status. */
01302                                         yyrestart( yyin );
01303 
01304                                         /* fall through */
01305 
01306                                 case EOB_ACT_END_OF_FILE:
01307                                         {
01308                                         if ( yywrap() )
01309                                                 return EOF;
01310 
01311                                         if ( ! yy_did_buffer_switch_on_eof )
01312                                                 YY_NEW_FILE;
01313 #ifdef __cplusplus
01314                                         return yyinput();
01315 #else
01316                                         return input();
01317 #endif
01318                                         }
01319 
01320                                 case EOB_ACT_CONTINUE_SCAN:
01321                                         yy_c_buf_p = yytext_ptr + offset;
01322                                         break;
01323                                 }
01324                         }
01325                 }
01326 
01327         c = *(unsigned char *) yy_c_buf_p;      /* cast for 8-bit char's */
01328         *yy_c_buf_p = '\0';     /* preserve yytext */
01329         yy_hold_char = *++yy_c_buf_p;
01330 
01331 
01332         return c;
01333         }
01334 
01335 
01336 #ifdef YY_USE_PROTOS
01337 void yyrestart( FILE *input_file )
01338 #else
01339 void yyrestart( input_file )
01340 FILE *input_file;
01341 #endif
01342         {
01343         if ( ! yy_current_buffer )
01344                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
01345 
01346         yy_init_buffer( yy_current_buffer, input_file );
01347         yy_load_buffer_state();
01348         }
01349 
01350 
01351 #ifdef YY_USE_PROTOS
01352 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
01353 #else
01354 void yy_switch_to_buffer( new_buffer )
01355 YY_BUFFER_STATE new_buffer;
01356 #endif
01357         {
01358         if ( yy_current_buffer == new_buffer )
01359                 return;
01360 
01361         if ( yy_current_buffer )
01362                 {
01363                 /* Flush out information for old buffer. */
01364                 *yy_c_buf_p = yy_hold_char;
01365                 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
01366                 yy_current_buffer->yy_n_chars = yy_n_chars;
01367                 }
01368 
01369         yy_current_buffer = new_buffer;
01370         yy_load_buffer_state();
01371 
01372         /* We don't actually know whether we did this switch during
01373          * EOF (yywrap()) processing, but the only time this flag
01374          * is looked at is after yywrap() is called, so it's safe
01375          * to go ahead and always set it.
01376          */
01377         yy_did_buffer_switch_on_eof = 1;
01378         }
01379 
01380 
01381 #ifdef YY_USE_PROTOS
01382 void yy_load_buffer_state( void )
01383 #else
01384 void yy_load_buffer_state()
01385 #endif
01386         {
01387         yy_n_chars = yy_current_buffer->yy_n_chars;
01388         yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
01389         yyin = yy_current_buffer->yy_input_file;
01390         yy_hold_char = *yy_c_buf_p;
01391         }
01392 
01393 
01394 #ifdef YY_USE_PROTOS
01395 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
01396 #else
01397 YY_BUFFER_STATE yy_create_buffer( file, size )
01398 FILE *file;
01399 int size;
01400 #endif
01401         {
01402         YY_BUFFER_STATE b;
01403 
01404         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
01405         if ( ! b )
01406                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
01407 
01408         b->yy_buf_size = size;
01409 
01410         /* yy_ch_buf has to be 2 characters longer than the size given because
01411          * we need to put in 2 end-of-buffer characters.
01412          */
01413         b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
01414         if ( ! b->yy_ch_buf )
01415                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
01416 
01417         b->yy_is_our_buffer = 1;
01418 
01419         yy_init_buffer( b, file );
01420 
01421         return b;
01422         }
01423 
01424 
01425 #ifdef YY_USE_PROTOS
01426 void yy_delete_buffer( YY_BUFFER_STATE b )
01427 #else
01428 void yy_delete_buffer( b )
01429 YY_BUFFER_STATE b;
01430 #endif
01431         {
01432         if ( ! b )
01433                 return;
01434 
01435         if ( b == yy_current_buffer )
01436                 yy_current_buffer = (YY_BUFFER_STATE) 0;
01437 
01438         if ( b->yy_is_our_buffer )
01439                 yy_flex_free( (void *) b->yy_ch_buf );
01440 
01441         yy_flex_free( (void *) b );
01442         }
01443 
01444 
01445 #ifndef YY_ALWAYS_INTERACTIVE
01446 #ifndef YY_NEVER_INTERACTIVE
01447 extern int isatty YY_PROTO(( int ));
01448 #endif
01449 #endif
01450 
01451 #ifdef YY_USE_PROTOS
01452 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
01453 #else
01454 void yy_init_buffer( b, file )
01455 YY_BUFFER_STATE b;
01456 FILE *file;
01457 #endif
01458 
01459 
01460         {
01461         yy_flush_buffer( b );
01462 
01463         b->yy_input_file = file;
01464         b->yy_fill_buffer = 1;
01465 
01466 #if YY_ALWAYS_INTERACTIVE
01467         b->yy_is_interactive = 1;
01468 #else
01469 #if YY_NEVER_INTERACTIVE
01470         b->yy_is_interactive = 0;
01471 #else
01472         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
01473 #endif
01474 #endif
01475         }
01476 
01477 
01478 #ifdef YY_USE_PROTOS
01479 void yy_flush_buffer( YY_BUFFER_STATE b )
01480 #else
01481 void yy_flush_buffer( b )
01482 YY_BUFFER_STATE b;
01483 #endif
01484 
01485         {
01486         if ( ! b )
01487                 return;
01488 
01489         b->yy_n_chars = 0;
01490 
01491         /* We always need two end-of-buffer characters.  The first causes
01492          * a transition to the end-of-buffer state.  The second causes
01493          * a jam in that state.
01494          */
01495         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
01496         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
01497 
01498         b->yy_buf_pos = &b->yy_ch_buf[0];
01499 
01500         b->yy_at_bol = 1;
01501         b->yy_buffer_status = YY_BUFFER_NEW;
01502 
01503         if ( b == yy_current_buffer )
01504                 yy_load_buffer_state();
01505         }
01506 
01507 
01508 #ifndef YY_NO_SCAN_BUFFER
01509 #ifdef YY_USE_PROTOS
01510 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
01511 #else
01512 YY_BUFFER_STATE yy_scan_buffer( base, size )
01513 char *base;
01514 yy_size_t size;
01515 #endif
01516         {
01517         YY_BUFFER_STATE b;
01518 
01519         if ( size < 2 ||
01520              base[size-2] != YY_END_OF_BUFFER_CHAR ||
01521              base[size-1] != YY_END_OF_BUFFER_CHAR )
01522                 /* They forgot to leave room for the EOB's. */
01523                 return 0;
01524 
01525         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
01526         if ( ! b )
01527                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
01528 
01529         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
01530         b->yy_buf_pos = b->yy_ch_buf = base;
01531         b->yy_is_our_buffer = 0;
01532         b->yy_input_file = 0;
01533         b->yy_n_chars = b->yy_buf_size;
01534         b->yy_is_interactive = 0;
01535         b->yy_at_bol = 1;
01536         b->yy_fill_buffer = 0;
01537         b->yy_buffer_status = YY_BUFFER_NEW;
01538 
01539         yy_switch_to_buffer( b );
01540 
01541         return b;
01542         }
01543 #endif
01544 
01545 
01546 #ifndef YY_NO_SCAN_STRING
01547 #ifdef YY_USE_PROTOS
01548 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
01549 #else
01550 YY_BUFFER_STATE yy_scan_string( yy_str )
01551 yyconst char *yy_str;
01552 #endif
01553         {
01554         int len;
01555         for ( len = 0; yy_str[len]; ++len )
01556                 ;
01557 
01558         return yy_scan_bytes( yy_str, len );
01559         }
01560 #endif
01561 
01562 
01563 #ifndef YY_NO_SCAN_BYTES
01564 #ifdef YY_USE_PROTOS
01565 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
01566 #else
01567 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
01568 yyconst char *bytes;
01569 int len;
01570 #endif
01571         {
01572         YY_BUFFER_STATE b;
01573         char *buf;
01574         yy_size_t n;
01575         int i;
01576 
01577         /* Get memory for full buffer, including space for trailing EOB's. */
01578         n = len + 2;
01579         buf = (char *) yy_flex_alloc( n );
01580         if ( ! buf )
01581                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
01582 
01583         for ( i = 0; i < len; ++i )
01584                 buf[i] = bytes[i];
01585 
01586         buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
01587 
01588         b = yy_scan_buffer( buf, n );
01589         if ( ! b )
01590                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
01591 
01592         /* It's okay to grow etc. this buffer, and we should throw it
01593          * away when we're done.
01594          */
01595         b->yy_is_our_buffer = 1;
01596 
01597         return b;
01598         }
01599 #endif
01600 
01601 
01602 #ifndef YY_NO_PUSH_STATE
01603 #ifdef YY_USE_PROTOS
01604 static void yy_push_state( int new_state )
01605 #else
01606 static void yy_push_state( new_state )
01607 int new_state;
01608 #endif
01609         {
01610         if ( yy_start_stack_ptr >= yy_start_stack_depth )
01611                 {
01612                 yy_size_t new_size;
01613 
01614                 yy_start_stack_depth += YY_START_STACK_INCR;
01615                 new_size = yy_start_stack_depth * sizeof( int );
01616 
01617                 if ( ! yy_start_stack )
01618                         yy_start_stack = (int *) yy_flex_alloc( new_size );
01619 
01620                 else
01621                         yy_start_stack = (int *) yy_flex_realloc(
01622                                         (void *) yy_start_stack, new_size );
01623 
01624                 if ( ! yy_start_stack )
01625                         YY_FATAL_ERROR(
01626                         "out of memory expanding start-condition stack" );
01627                 }
01628 
01629         yy_start_stack[yy_start_stack_ptr++] = YY_START;
01630 
01631         BEGIN(new_state);
01632         }
01633 #endif
01634 
01635 
01636 #ifndef YY_NO_POP_STATE
01637 static void yy_pop_state()
01638         {
01639         if ( --yy_start_stack_ptr < 0 )
01640                 YY_FATAL_ERROR( "start-condition stack underflow" );
01641 
01642         BEGIN(yy_start_stack[yy_start_stack_ptr]);
01643         }
01644 #endif
01645 
01646 
01647 #ifndef YY_NO_TOP_STATE
01648 static int yy_top_state()
01649         {
01650         return yy_start_stack[yy_start_stack_ptr - 1];
01651         }
01652 #endif
01653 
01654 #ifndef YY_EXIT_FAILURE
01655 #define YY_EXIT_FAILURE 2
01656 #endif
01657 
01658 #ifdef YY_USE_PROTOS
01659 static void yy_fatal_error( yyconst char msg[] )
01660 #else
01661 static void yy_fatal_error( msg )
01662 char msg[];
01663 #endif
01664         {
01665         (void) fprintf( stderr, "%s\n", msg );
01666         exit( YY_EXIT_FAILURE );
01667         }
01668 
01669 
01670 
01671 /* Redefine yyless() so it works in section 3 code. */
01672 
01673 #undef yyless
01674 #define yyless(n) \
01675         do \
01676                 { \
01677                 /* Undo effects of setting up yytext. */ \
01678                 yytext[yyleng] = yy_hold_char; \
01679                 yy_c_buf_p = yytext + n; \
01680                 yy_hold_char = *yy_c_buf_p; \
01681                 *yy_c_buf_p = '\0'; \
01682                 yyleng = n; \
01683                 } \
01684         while ( 0 )
01685 
01686 
01687 /* Internal utility routines. */
01688 
01689 #ifndef yytext_ptr
01690 #ifdef YY_USE_PROTOS
01691 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
01692 #else
01693 static void yy_flex_strncpy( s1, s2, n )
01694 char *s1;
01695 yyconst char *s2;
01696 int n;
01697 #endif
01698         {
01699         register int i;
01700         for ( i = 0; i < n; ++i )
01701                 s1[i] = s2[i];
01702         }
01703 #endif
01704 
01705 #ifdef YY_NEED_STRLEN
01706 #ifdef YY_USE_PROTOS
01707 static int yy_flex_strlen( yyconst char *s )
01708 #else
01709 static int yy_flex_strlen( s )
01710 yyconst char *s;
01711 #endif
01712         {
01713         register int n;
01714         for ( n = 0; s[n]; ++n )
01715                 ;
01716 
01717         return n;
01718         }
01719 #endif
01720 
01721 
01722 #ifdef YY_USE_PROTOS
01723 static void *yy_flex_alloc( yy_size_t size )
01724 #else
01725 static void *yy_flex_alloc( size )
01726 yy_size_t size;
01727 #endif
01728         {
01729         return (void *) malloc( size );
01730         }
01731 
01732 #ifdef YY_USE_PROTOS
01733 static void *yy_flex_realloc( void *ptr, yy_size_t size )
01734 #else
01735 static void *yy_flex_realloc( ptr, size )
01736 void *ptr;
01737 yy_size_t size;
01738 #endif
01739         {
01740         /* The cast to (char *) in the following accommodates both
01741          * implementations that use char* generic pointers, and those
01742          * that use void* generic pointers.  It works with the latter
01743          * because both ANSI C and C++ allow castless assignment from
01744          * any pointer type to void*, and deal with argument conversions
01745          * as though doing an assignment.
01746          */
01747         return (void *) realloc( (char *) ptr, size );
01748         }
01749 
01750 #ifdef YY_USE_PROTOS
01751 static void yy_flex_free( void *ptr )
01752 #else
01753 static void yy_flex_free( ptr )
01754 void *ptr;
01755 #endif
01756         {
01757         free( ptr );
01758         }
01759 
01760 #if YY_MAIN
01761 int main()
01762         {
01763         yylex();
01764         return 0;
01765         }
01766 #endif
01767 #line 134 "exolex.l"
01768 
01769 
01770 int
01771 yywrap(void)
01772 {
01773   return 1;
01774 }
01775 
01776 static void
01777 lex_eat_comment(void)
01778 {
01779   char c, c1;
01780 
01781 loop:
01782   while ((c = input()) != '*' && c != 0)
01783     {
01784       if (c == '\n')
01785         line++;
01786     }
01787 
01788   if ((c1 = input()) != '/' && c1 != 0)
01789     {
01790       unput(c1);
01791       goto loop;
01792     }
01793 }
01794 
01795 int
01796 yy_nextchar(void)
01797 {
01798   int c;
01799 
01800   do {
01801     c = input();
01802   } while (c == ' ' || c == '\t' || c == '\v' || c == '\f' || c == '\n');
01803   unput(c);
01804 
01805   return c;
01806 }
01807 
01808 /* FIXME: this is a total KLUDGE (but well contained...) that I will someday
01809    address when I have copious amounts of free time... */
01810 void
01811 yy_setstream(FILE *stream)
01812 {
01813   int i;
01814 #define MAX_STREAMS     16
01815   static struct {
01816     FILE *stream;
01817     YY_BUFFER_STATE buffer;
01818   } streams[MAX_STREAMS] = { {NULL, NULL}, };
01819   static int num_streams = 0;
01820   static FILE *last_stream = NULL;
01821 
01822   /* same stream? */
01823   if (stream == last_stream)
01824     return;
01825 
01826   /* else, switch to new stream */
01827   for (i=0; i < num_streams; i++)
01828     {
01829       if (streams[i].stream == stream)
01830         {
01831           yy_switch_to_buffer(streams[i].buffer);
01832           return;
01833         }
01834     }
01835 
01836   /* hrmmm... not found, create a new buffer for this stream */
01837   if (num_streams == MAX_STREAMS)
01838     fatal("out of lex buffer streams, increase MAX_STREAMS");
01839 
01840   streams[num_streams].stream = stream;
01841   streams[num_streams].buffer = yy_create_buffer(stream, YY_BUF_SIZE);
01842   yy_switch_to_buffer(streams[num_streams].buffer);
01843   num_streams++;
01844 }


UVa CS Department of Computer Science
School of Engineering, University of Virginia
151 Engineer's Way, P.O. Box 400740
Charlottesville, Virginia 22904-4740

(434) 982-2200  Fax: (434) 982-2214