uclex.cc

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 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 90
00286 #define YY_END_OF_BUFFER 91
00287 static yyconst short int yy_accept[322] =
00288     {   0,
00289         0,    0,   84,   84,   91,   89,   81,   88,   66,   89,
00290        80,   89,   89,   89,   89,   70,   70,   89,   89,   89,
00291        67,   67,   67,   67,   67,   67,   67,   67,   67,   67,
00292        67,   67,   67,   67,   67,   67,   67,   67,   89,   84,
00293        86,   85,   81,   73,    0,   68,    0,   80,   80,   80,
00294        80,   64,   76,    0,   83,   82,   70,    0,   74,   72,
00295        75,   67,   67,   67,   67,   67,   67,   67,   67,   67,
00296        67,   67,   67,   67,   67,   67,   67,   67,   67,   67,
00297        67,   67,   67,    1,    6,   67,   67,   67,   61,   67,
00298        60,   67,   67,   67,   67,   67,   63,   67,   67,   67,
00299 
00300        67,   62,   67,    8,   67,   67,   67,   67,   67,   67,
00301        65,   84,   85,   85,   87,   69,    0,   68,    0,   80,
00302        80,   80,    0,   82,   71,   67,   22,   67,   67,   67,
00303        67,   67,   67,   67,   67,   67,   67,   67,   67,   67,
00304        67,    5,   67,   67,   67,   67,   67,   54,   67,   10,
00305        67,   67,   67,   67,   67,   37,   67,   67,   67,   67,
00306        67,   67,   67,   21,   67,   52,   67,   67,   67,   67,
00307        67,   67,   67,    9,   67,   67,   67,   67,   69,   80,
00308        80,   80,    0,   67,   67,   67,   50,   18,   67,   67,
00309        67,   67,   67,   58,    2,   13,   67,   67,   53,   67,
00310 
00311        67,   67,   33,   67,   23,   67,   32,   67,   67,   45,
00312        67,   67,   67,   67,   67,   67,   67,   41,   67,   67,
00313        67,   67,   48,   67,   67,   15,   39,   59,   67,    7,
00314        80,   80,   80,    0,   55,   27,   17,   11,   67,   67,
00315        47,   67,   30,   67,   16,   43,   67,   44,   29,   67,
00316        49,   67,   56,   67,   67,   67,   67,   67,   67,   57,
00317        67,   67,   67,   28,    4,   80,    0,   80,   80,   80,
00318         0,   67,   67,   67,   14,   31,   67,   38,   67,   40,
00319        36,   67,    3,   26,   51,   19,   12,    0,   80,   77,
00320        80,   80,    0,   67,   67,   42,   24,   67,   67,    0,
00321 
00322        80,   80,    0,   35,   20,   46,   25,   80,   80,   34,
00323        80,   80,   79,   80,    0,   80,    0,   80,   78,    0,
00324         0
00325     } ;
00326 
00327 static yyconst int yy_ec[256] =
00328     {   0,
00329         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
00330         1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
00331         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00332         1,    5,    6,    7,    8,    1,    1,    9,    1,    1,
00333         1,   10,    1,    1,   11,   12,   13,   14,   15,   15,
00334        15,   15,   15,   15,   15,   15,   15,    1,    1,   16,
00335        17,   18,    1,    1,   19,   19,   19,   19,   19,   19,
00336        20,   20,   20,   20,   20,   20,   20,   20,   20,   20,
00337        20,   20,   20,   20,   20,   20,   20,   20,   20,   20,
00338         1,   21,    1,    1,   22,    1,   23,   24,   25,   26,
00339 
00340        27,   28,   29,   30,   31,   20,   32,   33,   34,   35,
00341        36,   37,   20,   38,   39,   40,   41,   42,   43,   44,
00342        45,   20,    1,   46,    1,    1,    1,    1,    1,    1,
00343         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00344         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00345         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00346         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00347         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00348         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00349         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00350 
00351         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00352         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00353         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00354         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00355         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00356         1,    1,    1,    1,    1
00357     } ;
00358 
00359 static yyconst int yy_meta[47] =
00360     {   0,
00361         1,    1,    2,    1,    1,    1,    1,    1,    1,    3,
00362         1,    1,    1,    4,    4,    1,    1,    1,    4,    5,
00363         1,    5,    4,    4,    4,    4,    4,    4,    5,    5,
00364         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
00365         5,    5,    5,    5,    5,    1
00366     } ;
00367 
00368 static yyconst short int yy_base[340] =
00369     {   0,
00370         0,    0,   44,   45,  440,  441,   47,  441,  422,   43,
00371        48,  429,  419,  400,   46,   43,   46,  418,  417,  416,
00372         0,   37,  394,   44,  404,   49,   47,   38,   63,   60,
00373        49,   65,  392,   42,   86,   66,  406,   89,  382,    0,
00374       441,   58,   73,  441,   89,  417,  100,    0,   91,  391,
00375       394,  441,  441,  386,  441,    0,  103,    0,  441,  441,
00376       441,    0,  383,  396,  381,  393,   91,  384,  393,  378,
00377       377,  376,  373,  386,  372,  100,  373,  387,  376,  368,
00378       367,  101,  365,    0,  365,  377,  364,  363,  357,   98,
00379         0,  373,  100,  360,  353,  359,    0,  352,  354,  367,
00380 
00381       115,    0,  368,    0,  351,  353,  359,  350,  357,  347,
00382       441,    0,  133,  134,  441,  441,  124,  141,  147,  144,
00383       361,  350,  353,    0,    0,  347,    0,  355,  358,  347,
00384       352,  121,  345,  352,  336,  348,  340,  338,  345,  344,
00385       331,    0,  335,  345,  331,  341,  338,    0,  326,    0,
00386       329,  323,  330,  320,  336,    0,  318,  315,  320,  328,
00387       317,  312,  325,    0,  320,    0,  310,  322,  308,  310,
00388       315,  313,  317,    0,  303,  302,  308,  310,  145,  332,
00389       305,  310,  307,  297,  296,  301,    0,    0,  292,  300,
00390       303,  302,  301,    0,    0,    0,  287,  288,    0,  298,
00391 
00392       297,  294,    0,  292,    0,  282,    0,  297,  294,    0,
00393       285,  287,  285,  273,  291,  277,  274,    0,  274,  280,
00394       284,  277,    0,  272,  267,    0,    0,    0,  278,    0,
00395       162,  263,  298,  271,    0,    0,    0,    0,  266,  262,
00396         0,  264,    0,  263,    0,    0,  258,    0,    0,  267,
00397         0,  255,    0,  258,  266,  252,  256,  255,  249,    0,
00398       258,  262,  257,    0,    0,  164,  278,  281,  257,  141,
00399       247,  240,  241,  239,    0,    0,  251,    0,  236,    0,
00400         0,  237,    0,    0,    0,    0,    0,  272,  271,  441,
00401       246,  159,  249,  244,  195,    0,    0,  173,  181,  204,
00402 
00403       170,  193,  154,    0,    0,    0,    0,  174,  175,  441,
00404       183,  178,  441,  181,  178,  167,  154,  129,  441,  112,
00405       441,  188,  193,  198,  200,  205,  210,  215,  220,   94,
00406       225,  230,  235,  240,  245,  250,  255,  260,  265
00407     } ;
00408 
00409 static yyconst short int yy_def[340] =
00410     {   0,
00411       321,    1,  322,  322,  321,  321,  321,  321,  321,  323,
00412       324,  321,  321,  321,  321,  321,  321,  321,  321,  321,
00413       325,  325,  325,  325,  325,  325,  325,  325,  325,  325,
00414       325,  325,  325,  325,  325,  325,  325,  325,  321,  326,
00415       321,  327,  321,  321,  323,  321,  328,  324,  324,  324,
00416       324,  321,  321,  321,  321,  329,  321,  330,  321,  321,
00417       321,  325,  325,  325,  325,  325,  325,  325,  325,  325,
00418       325,  325,  325,  325,  325,  325,  325,  325,  325,  325,
00419       325,  325,  325,  325,  325,  325,  325,  325,  325,  325,
00420       325,  325,  325,  325,  325,  325,  325,  325,  325,  325,
00421 
00422       325,  325,  325,  325,  325,  325,  325,  325,  325,  325,
00423       321,  326,  327,  327,  321,  321,  323,  323,  328,  324,
00424       324,  324,  321,  329,  330,  325,  325,  325,  325,  325,
00425       325,  325,  325,  325,  325,  325,  325,  325,  325,  325,
00426       325,  325,  325,  325,  325,  325,  325,  325,  325,  325,
00427       325,  325,  325,  325,  325,  325,  325,  325,  325,  325,
00428       325,  325,  325,  325,  325,  325,  325,  325,  325,  325,
00429       325,  325,  325,  325,  325,  325,  325,  325,  323,  324,
00430       324,  324,  321,  325,  325,  325,  325,  325,  325,  325,
00431       325,  325,  325,  325,  325,  325,  325,  325,  325,  325,
00432 
00433       325,  325,  325,  325,  325,  325,  325,  325,  325,  325,
00434       325,  325,  325,  325,  325,  325,  325,  325,  325,  325,
00435       325,  325,  325,  325,  325,  325,  325,  325,  325,  325,
00436       331,  324,  324,  321,  325,  325,  325,  325,  325,  325,
00437       325,  325,  325,  325,  325,  325,  325,  325,  325,  325,
00438       325,  325,  325,  325,  325,  325,  325,  325,  325,  325,
00439       325,  325,  325,  325,  325,  331,  332,  333,  324,  324,
00440       321,  325,  325,  325,  325,  325,  325,  325,  325,  325,
00441       325,  325,  325,  325,  325,  325,  325,  334,  333,  321,
00442       324,  324,  321,  325,  325,  325,  325,  325,  325,  334,
00443 
00444       324,  324,  321,  325,  325,  325,  325,  335,  336,  321,
00445       335,  335,  321,  336,  337,  338,  339,  338,  321,  339,
00446         0,  321,  321,  321,  321,  321,  321,  321,  321,  321,
00447       321,  321,  321,  321,  321,  321,  321,  321,  321
00448     } ;
00449 
00450 static yyconst short int yy_nxt[488] =
00451     {   0,
00452         6,    7,    8,    7,    7,    9,   10,   11,   12,    6,
00453        13,   14,   15,   16,   17,   18,   19,   20,   21,   21,
00454         6,    6,   22,   23,   24,   25,   26,   27,   28,   29,
00455        30,   21,   21,   31,   32,   21,   33,   34,   35,   36,
00456        21,   37,   38,   21,   21,   39,   41,   41,   43,   46,
00457        43,   43,   49,   42,   42,   55,   57,   57,   56,   57,
00458        57,   63,   64,   47,   65,   79,   67,  114,   93,   76,
00459       115,   71,   94,   80,   43,   87,   43,   43,   50,   68,
00460        51,   72,   77,   73,   78,   81,   58,   84,   69,   88,
00461        74,   89,   75,   82,   85,   46,  103,  125,   83,   86,
00462 
00463        90,  104,   45,  105,  120,  120,  118,   91,   95,   47,
00464        96,  107,   97,   98,  319,  108,   57,   57,  109,  110,
00465       119,   99,  100,  130,  140,  101,  147,  155,  102,  131,
00466        46,  319,  141,  159,  156,  157,  160,  169,  161,  162,
00467       148,  170,  321,  114,   47,  321,  321,   46,  180,   45,
00468       179,   46,  171,  118,  292,  292,  319,  120,  120,  189,
00469       190,   47,  191,  302,  267,   47,  267,  119,  268,  319,
00470       268,  308,  292,  292,  308,  312,  313,  315,  312,  312,
00471       313,  316,  312,  315,  317,  313,  310,  316,   40,   40,
00472        40,   40,   40,   45,   45,   45,   45,   45,   48,  309,
00473 
00474        48,   48,   48,   62,   62,  112,  290,  307,  112,  112,
00475       113,  306,  113,  113,  113,  117,  117,  117,  117,  117,
00476       124,  305,  124,  124,  124,  266,  266,  266,  266,  266,
00477       267,  267,  267,  267,  267,  289,  289,  289,  289,  289,
00478       300,  300,  300,  300,  300,  311,  311,  311,  311,  311,
00479       314,  314,  314,  314,  314,  315,  315,  315,  315,  315,
00480       318,  318,  318,  318,  318,  320,  320,  320,  320,  320,
00481       304,  303,  301,  290,  290,  299,  298,  297,  296,  295,
00482       294,  293,  291,  290,  288,  287,  286,  285,  284,  283,
00483       282,  281,  280,  279,  278,  277,  276,  275,  274,  273,
00484 
00485       272,  271,  270,  269,  265,  264,  263,  262,  261,  260,
00486       259,  258,  257,  256,  255,  254,  253,  252,  251,  250,
00487       249,  248,  247,  246,  245,  244,  243,  242,  241,  240,
00488       239,  238,  237,  236,  235,  234,  233,  232,  231,  230,
00489       229,  228,  227,  226,  225,  224,  223,  222,  221,  220,
00490       219,  218,  217,  216,  215,  214,  213,  212,  211,  210,
00491       209,  208,  207,  206,  205,  204,  203,  202,  201,  200,
00492       199,  198,  197,  196,  195,  194,  193,  192,  188,  187,
00493       186,  185,  184,  183,  182,  181,  178,  177,  176,  175,
00494       174,  173,  172,  168,  167,  166,  165,  164,  163,  158,
00495 
00496       154,  153,  152,  151,  150,  149,  146,  145,  144,  143,
00497       142,  139,  138,  137,  136,  135,  134,  133,  132,  129,
00498       128,  127,  126,  123,  122,  121,  116,  111,  106,   92,
00499        70,   66,   61,   60,   59,   54,   53,   52,   44,  321,
00500         5,  321,  321,  321,  321,  321,  321,  321,  321,  321,
00501       321,  321,  321,  321,  321,  321,  321,  321,  321,  321,
00502       321,  321,  321,  321,  321,  321,  321,  321,  321,  321,
00503       321,  321,  321,  321,  321,  321,  321,  321,  321,  321,
00504       321,  321,  321,  321,  321,  321,  321
00505     } ;
00506 
00507 static yyconst short int yy_chk[488] =
00508     {   0,
00509         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00510         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00511         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00512         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00513         1,    1,    1,    1,    1,    1,    3,    4,    7,   10,
00514         7,    7,   11,    3,    4,   15,   16,   16,   15,   17,
00515        17,   22,   22,   10,   22,   28,   24,   42,   34,   27,
00516        42,   26,   34,   28,   43,   31,   43,   43,   11,   24,
00517        11,   26,   27,   26,   27,   29,   16,   30,   24,   31,
00518        26,   32,   26,   29,   30,   45,   36,  330,   29,   30,
00519 
00520        32,   36,   47,   36,   49,   49,   47,   32,   35,   45,
00521        35,   38,   35,   35,  320,   38,   57,   57,   38,   38,
00522        47,   35,   35,   67,   76,   35,   82,   90,   35,   67,
00523       117,  318,   76,   93,   90,   90,   93,  101,   93,   93,
00524        82,  101,  113,  114,  117,  113,  114,  118,  120,  119,
00525       118,  179,  101,  119,  270,  270,  317,  120,  120,  132,
00526       132,  118,  132,  292,  231,  179,  266,  119,  231,  316,
00527       266,  301,  292,  292,  301,  308,  308,  309,  308,  312,
00528       312,  309,  312,  314,  315,  311,  303,  314,  322,  322,
00529       322,  322,  322,  323,  323,  323,  323,  323,  324,  302,
00530 
00531       324,  324,  324,  325,  325,  326,  300,  299,  326,  326,
00532       327,  298,  327,  327,  327,  328,  328,  328,  328,  328,
00533       329,  295,  329,  329,  329,  331,  331,  331,  331,  331,
00534       332,  332,  332,  332,  332,  333,  333,  333,  333,  333,
00535       334,  334,  334,  334,  334,  335,  335,  335,  335,  335,
00536       336,  336,  336,  336,  336,  337,  337,  337,  337,  337,
00537       338,  338,  338,  338,  338,  339,  339,  339,  339,  339,
00538       294,  293,  291,  289,  288,  282,  279,  277,  274,  273,
00539       272,  271,  269,  268,  267,  263,  262,  261,  259,  258,
00540       257,  256,  255,  254,  252,  250,  247,  244,  242,  240,
00541 
00542       239,  234,  233,  232,  229,  225,  224,  222,  221,  220,
00543       219,  217,  216,  215,  214,  213,  212,  211,  209,  208,
00544       206,  204,  202,  201,  200,  198,  197,  193,  192,  191,
00545       190,  189,  186,  185,  184,  183,  182,  181,  180,  178,
00546       177,  176,  175,  173,  172,  171,  170,  169,  168,  167,
00547       165,  163,  162,  161,  160,  159,  158,  157,  155,  154,
00548       153,  152,  151,  149,  147,  146,  145,  144,  143,  141,
00549       140,  139,  138,  137,  136,  135,  134,  133,  131,  130,
00550       129,  128,  126,  123,  122,  121,  110,  109,  108,  107,
00551       106,  105,  103,  100,   99,   98,   96,   95,   94,   92,
00552 
00553        89,   88,   87,   86,   85,   83,   81,   80,   79,   78,
00554        77,   75,   74,   73,   72,   71,   70,   69,   68,   66,
00555        65,   64,   63,   54,   51,   50,   46,   39,   37,   33,
00556        25,   23,   20,   19,   18,   14,   13,   12,    9,    5,
00557       321,  321,  321,  321,  321,  321,  321,  321,  321,  321,
00558       321,  321,  321,  321,  321,  321,  321,  321,  321,  321,
00559       321,  321,  321,  321,  321,  321,  321,  321,  321,  321,
00560       321,  321,  321,  321,  321,  321,  321,  321,  321,  321,
00561       321,  321,  321,  321,  321,  321,  321
00562     } ;
00563 
00564 static yy_state_type yy_last_accepting_state;
00565 static char *yy_last_accepting_cpos;
00566 
00567 /* The intent behind this definition is that it'll catch
00568  * any uses of REJECT which flex missed.
00569  */
00570 #define REJECT reject_used_but_not_detected
00571 #define yymore() yymore_used_but_not_detected
00572 #define YY_MORE_ADJ 0
00573 #define YY_RESTORE_YY_MORE_OFFSET
00574 char *yytext;
00575 #line 1 "uclex.ll"
00576 #define INITIAL 0
00577 #line 2 "uclex.ll"
00578 
00584 /*
00585 Copyright (C) 2000 The Exult Team
00586 
00587 This program is free software; you can redistribute it and/or
00588 modify it under the terms of the GNU General Public License
00589 as published by the Free Software Foundation; either version 2
00590 of the License, or (at your option) any later version.
00591 
00592 This program is distributed in the hope that it will be useful,
00593 but WITHOUT ANY WARRANTY; without even the implied warranty of
00594 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00595 GNU General Public License for more details.
00596 
00597 You should have received a copy of the GNU General Public License
00598 along with this program; if not, write to the Free Software
00599 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00600 */
00601 
00602 #include <string>
00603 #include <vector>
00604 #include "ucparse.h"
00605 #include "ucloc.h"
00606 
00607 using std::string;
00608 
00609 extern std::vector<char *> include_dirs;  // -I directories.
00610 
00611 /*
00612  *  Want a stack of files for implementing '#include'.
00613  */
00614 std::vector<Uc_location *> locstack;
00615 std::vector<YY_BUFFER_STATE> bufstack;
00616 
00617 /*
00618  *  Parse out a name in quotes.
00619  *
00620  *  Output: ->name, with a null replacing the ending quote.
00621  *    0 if not found.
00622  */
00623 
00624 static char *Find_name
00625   (
00626   char *name,
00627   char *& ename     // ->null at end of name returned.
00628   )
00629   {
00630   while (*name && *name != '"') // Find start of filename.
00631     name++;
00632   if (!*name)
00633     return 0;
00634   name++;       // Point to name.
00635   ename = name;     // Find end.
00636   while (*ename && *ename != '"')
00637     ename++;
00638   if (!*ename)
00639     return 0;
00640   *ename = 0;
00641   return name;
00642   }
00643 
00644 /*
00645  *  Set location from a preprocessor string.
00646  */
00647 
00648 static void Set_location
00649   (
00650   char *text      // ->first digit of line #.
00651   )
00652   {
00653   char *name;
00654   int line = strtol(text, &name, 10);
00655   char *ename;
00656   name = Find_name(name, ename);
00657   if (!name)
00658     return;
00659 //cout << "Setting location at line " << line - 1 << endl;
00660           // We're 0-based.
00661   Uc_location::set_cur(name, line - 1);
00662   *name = '"';      // Restore text.
00663   }
00664 
00665 /*
00666  *  Include another source.
00667  */
00668 
00669 static void Include
00670   (
00671   char *yytext      // ->text containing name.
00672   )
00673   {
00674   char msg[180];
00675   if (bufstack.size() > 20)
00676     {
00677     Uc_location::yyerror("#includes are nested too deeply");
00678     exit(1);
00679     }
00680   char *ename;
00681   char *name = Find_name(yytext, ename);
00682   if (!name)
00683     {
00684     Uc_location::yyerror("No file in #include");
00685     return;
00686     }
00687   locstack.push_back(new Uc_location());
00688   bufstack.push_back(YY_CURRENT_BUFFER);
00689   yyin = fopen(name, "r");
00690           // Look in -I list if not found here.
00691   for (std::vector<char *>::const_iterator it = include_dirs.begin();
00692         !yyin && it != include_dirs.end(); ++it)
00693     {
00694     string path(*it);
00695     path += '/';
00696     path += name;
00697     yyin = fopen(path.c_str(), "r");
00698     }
00699   if (!yyin)
00700     {
00701     sprintf(msg, "Can't open '%s'", name);
00702     Uc_location::yyerror(msg);
00703     exit(1);
00704     }
00705           // Set location to new file.
00706   Uc_location::set_cur(name, 0);
00707   yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE));
00708   }
00709 
00710 /*
00711  *  Make a copy of a string, interpreting '\' codes.
00712  *
00713  *  Output: ->allocated string.
00714  */
00715 
00716 char *Handle_string
00717   (
00718   const char *from      // Ends with a '"'.
00719   )
00720   {
00721   char *to = new char[1 + strlen(from)];  // (Bigger than needed.)
00722   char *str = to;
00723 
00724   while (*from && *from != '\"')
00725     {
00726     if (*from != '\\')
00727       {
00728       *to++ = *from++;
00729       continue;
00730       }
00731     switch (*++from)
00732       {
00733     case 'n':
00734       *to++ = '\n'; break;
00735     default:
00736       *to++ = *from; break;
00737       }
00738     ++from;
00739     }
00740   *to = 0;
00741   return str;
00742   }
00743 
00744 extern "C" int yywrap() { return 1; }   /* Stop at EOF. */
00745 
00746 #define comment 1
00747 
00748 #line 749 "lex.yy.c"
00749 
00750 /* Macros after this point can all be overridden by user definitions in
00751  * section 1.
00752  */
00753 
00754 #ifndef YY_SKIP_YYWRAP
00755 #ifdef __cplusplus
00756 extern "C" int yywrap YY_PROTO(( void ));
00757 #else
00758 extern int yywrap YY_PROTO(( void ));
00759 #endif
00760 #endif
00761 
00762 #ifndef YY_NO_UNPUT
00763 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
00764 #endif
00765 
00766 #ifndef yytext_ptr
00767 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
00768 #endif
00769 
00770 #ifdef YY_NEED_STRLEN
00771 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
00772 #endif
00773 
00774 #ifndef YY_NO_INPUT
00775 #ifdef __cplusplus
00776 static int yyinput YY_PROTO(( void ));
00777 #else
00778 static int input YY_PROTO(( void ));
00779 #endif
00780 #endif
00781 
00782 #if YY_STACK_USED
00783 static int yy_start_stack_ptr = 0;
00784 static int yy_start_stack_depth = 0;
00785 static int *yy_start_stack = 0;
00786 #ifndef YY_NO_PUSH_STATE
00787 static void yy_push_state YY_PROTO(( int new_state ));
00788 #endif
00789 #ifndef YY_NO_POP_STATE
00790 static void yy_pop_state YY_PROTO(( void ));
00791 #endif
00792 #ifndef YY_NO_TOP_STATE
00793 static int yy_top_state YY_PROTO(( void ));
00794 #endif
00795 
00796 #else
00797 #define YY_NO_PUSH_STATE 1
00798 #define YY_NO_POP_STATE 1
00799 #define YY_NO_TOP_STATE 1
00800 #endif
00801 
00802 #ifdef YY_MALLOC_DECL
00803 YY_MALLOC_DECL
00804 #else
00805 #if __STDC__
00806 #ifndef __cplusplus
00807 #include <stdlib.h>
00808 #endif
00809 #else
00810 /* Just try to get by without declaring the routines.  This will fail
00811  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
00812  * or sizeof(void*) != sizeof(int).
00813  */
00814 #endif
00815 #endif
00816 
00817 /* Amount of stuff to slurp up with each read. */
00818 #ifndef YY_READ_BUF_SIZE
00819 #define YY_READ_BUF_SIZE 8192
00820 #endif
00821 
00822 /* Copy whatever the last rule matched to the standard output. */
00823 
00824 #ifndef ECHO
00825 /* This used to be an fputs(), but since the string might contain NUL's,
00826  * we now use fwrite().
00827  */
00828 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
00829 #endif
00830 
00831 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
00832  * is returned in "result".
00833  */
00834 #ifndef YY_INPUT
00835 #define YY_INPUT(buf,result,max_size) \
00836   if ( yy_current_buffer->yy_is_interactive ) \
00837     { \
00838     int c = '*', n; \
00839     for ( n = 0; n < max_size && \
00840            (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
00841       buf[n] = (char) c; \
00842     if ( c == '\n' ) \
00843       buf[n++] = (char) c; \
00844     if ( c == EOF && ferror( yyin ) ) \
00845       YY_FATAL_ERROR( "input in flex scanner failed" ); \
00846     result = n; \
00847     } \
00848   else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
00849       && ferror( yyin ) ) \
00850     YY_FATAL_ERROR( "input in flex scanner failed" );
00851 #endif
00852 
00853 /* No semi-colon after return; correct usage is to write "yyterminate();" -
00854  * we don't want an extra ';' after the "return" because that will cause
00855  * some compilers to complain about unreachable statements.
00856  */
00857 #ifndef yyterminate
00858 #define yyterminate() return YY_NULL
00859 #endif
00860 
00861 /* Number of entries by which start-condition stack grows. */
00862 #ifndef YY_START_STACK_INCR
00863 #define YY_START_STACK_INCR 25
00864 #endif
00865 
00866 /* Report a fatal error. */
00867 #ifndef YY_FATAL_ERROR
00868 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
00869 #endif
00870 
00871 /* Default declaration of generated scanner - a define so the user can
00872  * easily add parameters.
00873  */
00874 #ifndef YY_DECL
00875 #define YY_DECL int yylex YY_PROTO(( void ))
00876 #endif
00877 
00878 /* Code executed at the beginning of each rule, after yytext and yyleng
00879  * have been set up.
00880  */
00881 #ifndef YY_USER_ACTION
00882 #define YY_USER_ACTION
00883 #endif
00884 
00885 /* Code executed at the end of each rule. */
00886 #ifndef YY_BREAK
00887 #define YY_BREAK break;
00888 #endif
00889 
00890 #define YY_RULE_SETUP \
00891   YY_USER_ACTION
00892 
00893 YY_DECL
00894   {
00895   register yy_state_type yy_current_state;
00896   register char *yy_cp = NULL, *yy_bp = NULL;
00897   register int yy_act;
00898 
00899 #line 174 "uclex.ll"
00900 
00901 
00902 #line 903 "lex.yy.c"
00903 
00904   if ( yy_init )
00905     {
00906     yy_init = 0;
00907 
00908 #ifdef YY_USER_INIT
00909     YY_USER_INIT;
00910 #endif
00911 
00912     if ( ! yy_start )
00913       yy_start = 1; /* first start state */
00914 
00915     if ( ! yyin )
00916       yyin = stdin;
00917 
00918     if ( ! yyout )
00919       yyout = stdout;
00920 
00921     if ( ! yy_current_buffer )
00922       yy_current_buffer =
00923         yy_create_buffer( yyin, YY_BUF_SIZE );
00924 
00925     yy_load_buffer_state();
00926     }
00927 
00928   while ( 1 )   /* loops until end-of-file is reached */
00929     {
00930     yy_cp = yy_c_buf_p;
00931 
00932     /* Support of yytext. */
00933     *yy_cp = yy_hold_char;
00934 
00935     /* yy_bp points to the position in yy_ch_buf of the start of
00936      * the current run.
00937      */
00938     yy_bp = yy_cp;
00939 
00940     yy_current_state = yy_start;
00941 yy_match:
00942     do
00943       {
00944       register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
00945       if ( yy_accept[yy_current_state] )
00946         {
00947         yy_last_accepting_state = yy_current_state;
00948         yy_last_accepting_cpos = yy_cp;
00949         }
00950       while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
00951         {
00952         yy_current_state = (int) yy_def[yy_current_state];
00953         if ( yy_current_state >= 322 )
00954           yy_c = yy_meta[(unsigned int) yy_c];
00955         }
00956       yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
00957       ++yy_cp;
00958       }
00959     while ( yy_base[yy_current_state] != 441 );
00960 
00961 yy_find_action:
00962     yy_act = yy_accept[yy_current_state];
00963     if ( yy_act == 0 )
00964       { /* have to back up */
00965       yy_cp = yy_last_accepting_cpos;
00966       yy_current_state = yy_last_accepting_state;
00967       yy_act = yy_accept[yy_current_state];
00968       }
00969 
00970     YY_DO_BEFORE_ACTION;
00971 
00972 
00973 do_action:  /* This label is used only to access EOF actions. */
00974 
00975 
00976     switch ( yy_act )
00977   { /* beginning of action switch */
00978       case 0: /* must back up */
00979       /* undo the effects of YY_DO_BEFORE_ACTION */
00980       *yy_cp = yy_hold_char;
00981       yy_cp = yy_last_accepting_cpos;
00982       yy_current_state = yy_last_accepting_state;
00983       goto yy_find_action;
00984 
00985 case 1:
00986 YY_RULE_SETUP
00987 #line 176 "uclex.ll"
00988 return IF;
00989   YY_BREAK
00990 case 2:
00991 YY_RULE_SETUP
00992 #line 177 "uclex.ll"
00993 return ELSE;
00994   YY_BREAK
00995 case 3:
00996 YY_RULE_SETUP
00997 #line 178 "uclex.ll"
00998 return RETURN;
00999   YY_BREAK
01000 case 4:
01001 YY_RULE_SETUP
01002 #line 179 "uclex.ll"
01003 return WHILE;
01004   YY_BREAK
01005 case 5:
01006 YY_RULE_SETUP
01007 #line 180 "uclex.ll"
01008 return FOR;
01009   YY_BREAK
01010 case 6:
01011 YY_RULE_SETUP
01012 #line 181 "uclex.ll"
01013 return UCC_IN;
01014   YY_BREAK
01015 case 7:
01016 YY_RULE_SETUP
01017 #line 182 "uclex.ll"
01018 return WITH;
01019   YY_BREAK
01020 case 8:
01021 YY_RULE_SETUP
01022 #line 183 "uclex.ll"
01023 return TO;
01024   YY_BREAK
01025 case 9:
01026 YY_RULE_SETUP
01027 #line 184 "uclex.ll"
01028 return VAR;
01029   YY_BREAK
01030 case 10:
01031 YY_RULE_SETUP
01032 #line 185 "uclex.ll"
01033 return UCC_INT;
01034   YY_BREAK
01035 case 11:
01036 YY_RULE_SETUP
01037 #line 186 "uclex.ll"
01038 return UCC_CONST;
01039   YY_BREAK
01040 case 12:
01041 YY_RULE_SETUP
01042 #line 187 "uclex.ll"
01043 return STRING;
01044   YY_BREAK
01045 case 13:
01046 YY_RULE_SETUP
01047 #line 188 "uclex.ll"
01048 return ENUM;
01049   YY_BREAK
01050 case 14:
01051 YY_RULE_SETUP
01052 #line 189 "uclex.ll"
01053 return EXTERN;
01054   YY_BREAK
01055 case 15:
01056 YY_RULE_SETUP
01057 #line 190 "uclex.ll"
01058 return UCTRUE;
01059   YY_BREAK
01060 case 16:
01061 YY_RULE_SETUP
01062 #line 191 "uclex.ll"
01063 return UCFALSE;
01064   YY_BREAK
01065 case 17:
01066 YY_RULE_SETUP
01067 #line 192 "uclex.ll"
01068 return BREAK;
01069   YY_BREAK
01070 case 18:
01071 YY_RULE_SETUP
01072 #line 193 "uclex.ll"
01073 return CASE;
01074   YY_BREAK
01075 case 19:
01076 YY_RULE_SETUP
01077 #line 194 "uclex.ll"
01078 return STATIC_;
01079   YY_BREAK
01080 case 20:
01081 YY_RULE_SETUP
01082 #line 196 "uclex.ll"
01083 return CONVERSE;
01084   YY_BREAK
01085 case 21:
01086 YY_RULE_SETUP
01087 #line 197 "uclex.ll"
01088 return SAY;
01089   YY_BREAK
01090 case 22:
01091 YY_RULE_SETUP
01092 #line 198 "uclex.ll"
01093 return ADD;
01094   YY_BREAK
01095 case 23:
01096 YY_RULE_SETUP
01097 #line 199 "uclex.ll"
01098 return HIDE;
01099   YY_BREAK
01100 case 24:
01101 YY_RULE_SETUP
01102 #line 200 "uclex.ll"
01103 return MESSAGE;
01104   YY_BREAK
01105 case 25:
01106 YY_RULE_SETUP
01107 #line 201 "uclex.ll"
01108 return RESPONSE;
01109   YY_BREAK
01110 case 26:
01111 YY_RULE_SETUP
01112 #line 202 "uclex.ll"
01113 return SCRIPT;
01114   YY_BREAK
01115 case 27:
01116 YY_RULE_SETUP
01117 #line 203 "uclex.ll"
01118 return AFTER;
01119   YY_BREAK
01120 case 28:
01121 YY_RULE_SETUP
01122 #line 204 "uclex.ll"
01123 return TICKS;
01124   YY_BREAK
01125 case 29:
01126 YY_RULE_SETUP
01127 #line 205 "uclex.ll"
01128 return HOURS;
01129   YY_BREAK
01130 case 30:
01131 YY_RULE_SETUP
01132 #line 206 "uclex.ll"
01133 return EVENT;
01134   YY_BREAK
01135 case 31:
01136 YY_RULE_SETUP
01137 #line 207 "uclex.ll"
01138 return FLAG;
01139   YY_BREAK
01140 case 32:
01141 YY_RULE_SETUP
01142 #line 208 "uclex.ll"
01143 return ITEM;
01144   YY_BREAK
01145 case 33:
01146 YY_RULE_SETUP
01147 #line 209 "uclex.ll"
01148 return GOTO;
01149   YY_BREAK
01150 case 34:
01151 YY_RULE_SETUP
01152 #line 210 "uclex.ll"
01153 return ORIGINAL;
01154   YY_BREAK
01155 /* Script commands. */
01156 case 35:
01157 YY_RULE_SETUP
01158 #line 213 "uclex.ll"
01159 return CONTINUE;
01160   YY_BREAK
01161 case 36:
01162 YY_RULE_SETUP
01163 #line 214 "uclex.ll"
01164 return REPEAT;
01165   YY_BREAK
01166 case 37:
01167 YY_RULE_SETUP
01168 #line 215 "uclex.ll"
01169 return NOP;
01170   YY_BREAK
01171 case 38:
01172 YY_RULE_SETUP
01173 #line 216 "uclex.ll"
01174 return NOHALT;
01175   YY_BREAK
01176 case 39:
01177 YY_RULE_SETUP
01178 #line 217 "uclex.ll"
01179 return WAIT;
01180   YY_BREAK
01181 case 40:
01182 YY_RULE_SETUP
01183 #line 218 "uclex.ll"
01184 return REMOVE;
01185   YY_BREAK
01186 case 41:
01187 YY_RULE_SETUP
01188 #line 219 "uclex.ll"
01189 return RISE;
01190   YY_BREAK
01191 case 42:
01192 YY_RULE_SETUP
01193 #line 220 "uclex.ll"
01194 return DESCEND;
01195   YY_BREAK
01196 case 43:
01197 YY_RULE_SETUP
01198 #line 221 "uclex.ll"
01199 return FRAME;
01200   YY_BREAK
01201 case 44:
01202 YY_RULE_SETUP
01203 #line 222 "uclex.ll"
01204 return HATCH;
01205   YY_BREAK
01206 case 45:
01207 YY_RULE_SETUP
01208 #line 223 "uclex.ll"
01209 return NEXT;
01210   YY_BREAK
01211 case 46:
01212 YY_RULE_SETUP
01213 #line 224 "uclex.ll"
01214 return PREVIOUS;
01215   YY_BREAK
01216 case 47:
01217 YY_RULE_SETUP
01218 #line 225 "uclex.ll"
01219 return CYCLE;
01220   YY_BREAK
01221 case 48:
01222 YY_RULE_SETUP
01223 #line 226 "uclex.ll"
01224 return STEP;
01225   YY_BREAK
01226 case 49:
01227 YY_RULE_SETUP
01228 #line 227 "uclex.ll"
01229 return MUSIC;
01230   YY_BREAK
01231 case 50:
01232 YY_RULE_SETUP
01233 #line 228 "uclex.ll"
01234 return CALL;
01235   YY_BREAK
01236 case 51:
01237 YY_RULE_SETUP
01238 #line 229 "uclex.ll"
01239 return SPEECH;
01240   YY_BREAK
01241 case 52:
01242 YY_RULE_SETUP
01243 #line 230 "uclex.ll"
01244 return SFX;
01245   YY_BREAK
01246 case 53:
01247 YY_RULE_SETUP
01248 #line 231 "uclex.ll"
01249 return FACE;
01250   YY_BREAK
01251 case 54:
01252 YY_RULE_SETUP
01253 #line 232 "uclex.ll"
01254 return HIT;
01255   YY_BREAK
01256 case 55:
01257 YY_RULE_SETUP
01258 #line 233 "uclex.ll"
01259 return ACTOR;
01260   YY_BREAK
01261 case 56:
01262 YY_RULE_SETUP
01263 #line 235 "uclex.ll"
01264 return NORTH;
01265   YY_BREAK
01266 case 57:
01267 YY_RULE_SETUP
01268 #line 236 "uclex.ll"
01269 return SOUTH;
01270   YY_BREAK
01271 case 58:
01272 YY_RULE_SETUP
01273 #line 237 "uclex.ll"
01274 return EAST;
01275   YY_BREAK
01276 case 59:
01277 YY_RULE_SETUP
01278 #line 238 "uclex.ll"
01279 return WEST;
01280   YY_BREAK
01281 case 60:
01282 YY_RULE_SETUP
01283 #line 239 "uclex.ll"
01284 return NW;
01285   YY_BREAK
01286 case 61:
01287 YY_RULE_SETUP
01288 #line 240 "uclex.ll"
01289 return NE;
01290   YY_BREAK
01291 case 62:
01292 YY_RULE_SETUP
01293 #line 241 "uclex.ll"
01294 return SW;
01295   YY_BREAK
01296 case 63:
01297 YY_RULE_SETUP
01298 #line 242 "uclex.ll"
01299 return SE;
01300   YY_BREAK
01301 case 64:
01302 YY_RULE_SETUP
01303 #line 244 "uclex.ll"
01304 return AND;
01305   YY_BREAK
01306 case 65:
01307 YY_RULE_SETUP
01308 #line 245 "uclex.ll"
01309 return OR;
01310   YY_BREAK
01311 case 66:
01312 YY_RULE_SETUP
01313 #line 246 "uclex.ll"
01314 return NOT;
01315   YY_BREAK
01316 case 67:
01317 YY_RULE_SETUP
01318 #line 248 "uclex.ll"
01319 {
01320       yylval.strval = strdup(yytext);
01321       return IDENTIFIER;
01322       }
01323   YY_BREAK
01324 case 68:
01325 YY_RULE_SETUP
01326 #line 252 "uclex.ll"
01327 {
01328           // Remove ending quote.
01329       yylval.strval = Handle_string(yytext + 1);
01330       return STRING_LITERAL;
01331       }
01332   YY_BREAK
01333 case 69:
01334 YY_RULE_SETUP
01335 #line 257 "uclex.ll"
01336 {
01337           // Remove ending quote and asterisk.
01338       yylval.strval = strdup(yytext + 1);
01339       yylval.strval[strlen(yylval.strval) - 2] = 0;
01340       return STRING_PREFIX;
01341       }
01342   YY_BREAK
01343 case 70:
01344 YY_RULE_SETUP
01345 #line 263 "uclex.ll"
01346 {
01347       yylval.intval = atoi(yytext);
01348       return INT_LITERAL;
01349       }
01350   YY_BREAK
01351 case 71:
01352 YY_RULE_SETUP
01353 #line 267 "uclex.ll"
01354 {
01355       yylval.intval = strtol(yytext + 2, 0, 16);
01356       return INT_LITERAL;
01357       }
01358   YY_BREAK
01359 case 72:
01360 YY_RULE_SETUP
01361 #line 272 "uclex.ll"
01362 { return EQUALS; }
01363   YY_BREAK
01364 case 73:
01365 YY_RULE_SETUP
01366 #line 273 "uclex.ll"
01367 { return NEQUALS; }
01368   YY_BREAK
01369 case 74:
01370 YY_RULE_SETUP
01371 #line 274 "uclex.ll"
01372 { return LTEQUALS; }
01373   YY_BREAK
01374 case 75:
01375 YY_RULE_SETUP
01376 #line 275 "uclex.ll"
01377 { return GTEQUALS; }
01378   YY_BREAK
01379 case 76:
01380 YY_RULE_SETUP
01381 #line 276 "uclex.ll"
01382 { return UCC_POINTS; }
01383   YY_BREAK
01384 case 77:
01385 YY_RULE_SETUP
01386 #line 278 "uclex.ll"
01387 { Set_location(yytext + 2); }
01388   YY_BREAK
01389 case 78:
01390 YY_RULE_SETUP
01391 #line 279 "uclex.ll"
01392 { Set_location(yytext + 6); }
01393   YY_BREAK
01394 case 79:
01395 YY_RULE_SETUP
01396 #line 280 "uclex.ll"
01397 { Include(yytext + 8); }
01398   YY_BREAK
01399 case 80:
01400 YY_RULE_SETUP
01401 #line 282 "uclex.ll"
01402 /* Ignore other cpp directives. */
01403   YY_BREAK
01404 case 81:
01405 YY_RULE_SETUP
01406 #line 284 "uclex.ll"
01407 /* Ignore spaces. */
01408   YY_BREAK
01409 case 82:
01410 YY_RULE_SETUP
01411 #line 285 "uclex.ll"
01412 /* Comments. */
01413   YY_BREAK
01414 case 83:
01415 YY_RULE_SETUP
01416 #line 286 "uclex.ll"
01417 BEGIN(comment);
01418   YY_BREAK
01419 case 84:
01420 YY_RULE_SETUP
01421 #line 287 "uclex.ll"
01422 /* All but '*'. */
01423   YY_BREAK
01424 case 85:
01425 YY_RULE_SETUP
01426 #line 288 "uclex.ll"
01427 /* *'s not followed by '/'. */
01428   YY_BREAK
01429 case 86:
01430 YY_RULE_SETUP
01431 #line 289 "uclex.ll"
01432 { Uc_location::increment_cur_line(); }
01433   YY_BREAK
01434 case 87:
01435 YY_RULE_SETUP
01436 #line 290 "uclex.ll"
01437 BEGIN(INITIAL);
01438   YY_BREAK
01439 case YY_STATE_EOF(comment):
01440 #line 291 "uclex.ll"
01441 { Uc_location::yyerror("Comment not terminated");
01442       yyterminate(); }
01443   YY_BREAK
01444 case 88:
01445 YY_RULE_SETUP
01446 #line 293 "uclex.ll"
01447 { Uc_location::increment_cur_line(); }
01448   YY_BREAK
01449 case 89:
01450 YY_RULE_SETUP
01451 #line 294 "uclex.ll"
01452 return *yytext;   /* Being lazy. */
01453   YY_BREAK
01454 case YY_STATE_EOF(INITIAL):
01455 #line 295 "uclex.ll"
01456 {
01457       if (locstack.empty())
01458         yyterminate();
01459       else    // Restore buffer and location.
01460         {
01461         Uc_location *loc = locstack.back();
01462         locstack.pop_back();
01463         const char *nm = loc->get_source();
01464         loc->set_cur(nm, loc->get_line());
01465         delete loc;
01466         yy_delete_buffer(YY_CURRENT_BUFFER);
01467         yy_switch_to_buffer(bufstack.back());
01468         bufstack.pop_back();
01469         }
01470       }
01471   YY_BREAK
01472 case 90:
01473 YY_RULE_SETUP
01474 #line 312 "uclex.ll"
01475 ECHO;
01476   YY_BREAK
01477 #line 1478 "lex.yy.c"
01478 
01479   case YY_END_OF_BUFFER:
01480     {
01481     /* Amount of text matched not including the EOB char. */
01482     int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
01483 
01484     /* Undo the effects of YY_DO_BEFORE_ACTION. */
01485     *yy_cp = yy_hold_char;
01486     YY_RESTORE_YY_MORE_OFFSET
01487 
01488     if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
01489       {
01490       /* We're scanning a new file or input source.  It's
01491        * possible that this happened because the user
01492        * just pointed yyin at a new source and called
01493        * yylex().  If so, then we have to assure
01494        * consistency between yy_current_buffer and our
01495        * globals.  Here is the right place to do so, because
01496        * this is the first action (other than possibly a
01497        * back-up) that will match for the new input source.
01498        */
01499       yy_n_chars = yy_current_buffer->yy_n_chars;
01500       yy_current_buffer->yy_input_file = yyin;
01501       yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
01502       }
01503 
01504     /* Note that here we test for yy_c_buf_p "<=" to the position
01505      * of the first EOB in the buffer, since yy_c_buf_p will
01506      * already have been incremented past the NUL character
01507      * (since all states make transitions on EOB to the
01508      * end-of-buffer state).  Contrast this with the test
01509      * in input().
01510      */
01511     if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
01512       { /* This was really a NUL. */
01513       yy_state_type yy_next_state;
01514 
01515       yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
01516 
01517       yy_current_state = yy_get_previous_state();
01518 
01519       /* Okay, we're now positioned to make the NUL
01520        * transition.  We couldn't have
01521        * yy_get_previous_state() go ahead and do it
01522        * for us because it doesn't know how to deal
01523        * with the possibility of jamming (and we don't
01524        * want to build jamming into it because then it
01525        * will run more slowly).
01526        */
01527 
01528       yy_next_state = yy_try_NUL_trans( yy_current_state );
01529 
01530       yy_bp = yytext_ptr + YY_MORE_ADJ;
01531 
01532       if ( yy_next_state )
01533         {
01534         /* Consume the NUL. */
01535         yy_cp = ++yy_c_buf_p;
01536         yy_current_state = yy_next_state;
01537         goto yy_match;
01538         }
01539 
01540       else
01541         {
01542         yy_cp = yy_c_buf_p;
01543         goto yy_find_action;
01544         }
01545       }
01546 
01547     else switch ( yy_get_next_buffer() )
01548       {
01549       case EOB_ACT_END_OF_FILE:
01550         {
01551         yy_did_buffer_switch_on_eof = 0;
01552 
01553         if ( yywrap() )
01554           {
01555           /* Note: because we've taken care in
01556            * yy_get_next_buffer() to have set up
01557            * yytext, we can now set up
01558            * yy_c_buf_p so that if some total
01559            * hoser (like flex itself) wants to
01560            * call the scanner after we return the
01561            * YY_NULL, it'll still work - another
01562            * YY_NULL will get returned.
01563            */
01564           yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
01565 
01566           yy_act = YY_STATE_EOF(YY_START);
01567           goto do_action;
01568           }
01569 
01570         else
01571           {
01572           if ( ! yy_did_buffer_switch_on_eof )
01573             YY_NEW_FILE;
01574           }
01575         break;
01576         }
01577 
01578       case EOB_ACT_CONTINUE_SCAN:
01579         yy_c_buf_p =
01580           yytext_ptr + yy_amount_of_matched_text;
01581 
01582         yy_current_state = yy_get_previous_state();
01583 
01584         yy_cp = yy_c_buf_p;
01585         yy_bp = yytext_ptr + YY_MORE_ADJ;
01586         goto yy_match;
01587 
01588       case EOB_ACT_LAST_MATCH:
01589         yy_c_buf_p =
01590         &yy_current_buffer->yy_ch_buf[yy_n_chars];
01591 
01592         yy_current_state = yy_get_previous_state();
01593 
01594         yy_cp = yy_c_buf_p;
01595         yy_bp = yytext_ptr + YY_MORE_ADJ;
01596         goto yy_find_action;
01597       }
01598     break;
01599     }
01600 
01601   default:
01602     YY_FATAL_ERROR(
01603       "fatal flex scanner internal error--no action found" );
01604   } /* end of action switch */
01605     } /* end of scanning one token */
01606   } /* end of yylex */
01607 
01608 
01609 /* yy_get_next_buffer - try to read in a new buffer
01610  *
01611  * Returns a code representing an action:
01612  *  EOB_ACT_LAST_MATCH -
01613  *  EOB_ACT_CONTINUE_SCAN - continue scanning from current position
01614  *  EOB_ACT_END_OF_FILE - end of file
01615  */
01616 
01617 static int yy_get_next_buffer()
01618   {
01619   register char *dest = yy_current_buffer->yy_ch_buf;
01620   register char *source = yytext_ptr;
01621   register int number_to_move, i;
01622   int ret_val;
01623 
01624   if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
01625     YY_FATAL_ERROR(
01626     "fatal flex scanner internal error--end of buffer missed" );
01627 
01628   if ( yy_current_buffer->yy_fill_buffer == 0 )
01629     { /* Don't try to fill the buffer, so this is an EOF. */
01630     if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
01631       {
01632       /* We matched a single character, the EOB, so
01633        * treat this as a final EOF.
01634        */
01635       return EOB_ACT_END_OF_FILE;
01636       }
01637 
01638     else
01639       {
01640       /* We matched some text prior to the EOB, first
01641        * process it.
01642        */
01643       return EOB_ACT_LAST_MATCH;
01644       }
01645     }
01646 
01647   /* Try to read more data. */
01648 
01649   /* First move last chars to start of buffer. */
01650   number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
01651 
01652   for ( i = 0; i < number_to_move; ++i )
01653     *(dest++) = *(source++);
01654 
01655   if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
01656     /* don't do the read, it's not guaranteed to return an EOF,
01657      * just force an EOF
01658      */
01659     yy_current_buffer->yy_n_chars = yy_n_chars = 0;
01660 
01661   else
01662     {
01663     int num_to_read =
01664       yy_current_buffer->yy_buf_size - number_to_move - 1;
01665 
01666     while ( num_to_read <= 0 )
01667       { /* Not enough room in the buffer - grow it. */
01668 #ifdef YY_USES_REJECT
01669       YY_FATAL_ERROR(
01670 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
01671 #else
01672 
01673       /* just a shorter name for the current buffer */
01674       YY_BUFFER_STATE b = yy_current_buffer;
01675 
01676       int yy_c_buf_p_offset =
01677         (int) (yy_c_buf_p - b->yy_ch_buf);
01678 
01679       if ( b->yy_is_our_buffer )
01680         {
01681         int new_size = b->yy_buf_size * 2;
01682 
01683         if ( new_size <= 0 )
01684           b->yy_buf_size += b->yy_buf_size / 8;
01685         else
01686           b->yy_buf_size *= 2;
01687 
01688         b->yy_ch_buf = (char *)
01689           /* Include room in for 2 EOB chars. */
01690           yy_flex_realloc( (void *) b->yy_ch_buf,
01691                b->yy_buf_size + 2 );
01692         }
01693       else
01694         /* Can't grow it, we don't own it. */
01695         b->yy_ch_buf = 0;
01696 
01697       if ( ! b->yy_ch_buf )
01698         YY_FATAL_ERROR(
01699         "fatal error - scanner input buffer overflow" );
01700 
01701       yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
01702 
01703       num_to_read = yy_current_buffer->yy_buf_size -
01704             number_to_move - 1;
01705 #endif
01706       }
01707 
01708     if ( num_to_read > YY_READ_BUF_SIZE )
01709       num_to_read = YY_READ_BUF_SIZE;
01710 
01711     /* Read in more data. */
01712     YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
01713       yy_n_chars, num_to_read );
01714 
01715     yy_current_buffer->yy_n_chars = yy_n_chars;
01716     }
01717 
01718   if ( yy_n_chars == 0 )
01719     {
01720     if ( number_to_move == YY_MORE_ADJ )
01721       {
01722       ret_val = EOB_ACT_END_OF_FILE;
01723       yyrestart( yyin );
01724       }
01725 
01726     else
01727       {
01728       ret_val = EOB_ACT_LAST_MATCH;
01729       yy_current_buffer->yy_buffer_status =
01730         YY_BUFFER_EOF_PENDING;
01731       }
01732     }
01733 
01734   else
01735     ret_val = EOB_ACT_CONTINUE_SCAN;
01736 
01737   yy_n_chars += number_to_move;
01738   yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
01739   yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
01740 
01741   yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
01742 
01743   return ret_val;
01744   }
01745 
01746 
01747 /* yy_get_previous_state - get the state just before the EOB char was reached */
01748 
01749 static yy_state_type yy_get_previous_state()
01750   {
01751   register yy_state_type yy_current_state;
01752   register char *yy_cp;
01753 
01754   yy_current_state = yy_start;
01755 
01756   for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
01757     {
01758     register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
01759     if ( yy_accept[yy_current_state] )
01760       {
01761       yy_last_accepting_state = yy_current_state;
01762       yy_last_accepting_cpos = yy_cp;
01763       }
01764     while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01765       {
01766       yy_current_state = (int) yy_def[yy_current_state];
01767       if ( yy_current_state >= 322 )
01768         yy_c = yy_meta[(unsigned int) yy_c];
01769       }
01770     yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01771     }
01772 
01773   return yy_current_state;
01774   }
01775 
01776 
01777 /* yy_try_NUL_trans - try to make a transition on the NUL character
01778  *
01779  * synopsis
01780  *  next_state = yy_try_NUL_trans( current_state );
01781  */
01782 
01783 #ifdef YY_USE_PROTOS
01784 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
01785 #else
01786 static yy_state_type yy_try_NUL_trans( yy_current_state )
01787 yy_state_type yy_current_state;
01788 #endif
01789   {
01790   register int yy_is_jam;
01791   register char *yy_cp = yy_c_buf_p;
01792 
01793   register YY_CHAR yy_c = 1;
01794   if ( yy_accept[yy_current_state] )
01795     {
01796     yy_last_accepting_state = yy_current_state;
01797     yy_last_accepting_cpos = yy_cp;
01798     }
01799   while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01800     {
01801     yy_current_state = (int) yy_def[yy_current_state];
01802     if ( yy_current_state >= 322 )
01803       yy_c = yy_meta[(unsigned int) yy_c];
01804     }
01805   yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01806   yy_is_jam = (yy_current_state == 321);
01807 
01808   return yy_is_jam ? 0 : yy_current_state;
01809   }
01810 
01811 
01812 #ifndef YY_NO_UNPUT
01813 #ifdef YY_USE_PROTOS
01814 static void yyunput( int c, register char *yy_bp )
01815 #else
01816 static void yyunput( c, yy_bp )
01817 int c;
01818 register char *yy_bp;
01819 #endif
01820   {
01821   register char *yy_cp = yy_c_buf_p;
01822 
01823   /* undo effects of setting up yytext */
01824   *yy_cp = yy_hold_char;
01825 
01826   if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
01827     { /* need to shift things up to make room */
01828     /* +2 for EOB chars. */
01829     register int number_to_move = yy_n_chars + 2;
01830     register char *dest = &yy_current_buffer->yy_ch_buf[
01831           yy_current_buffer->yy_buf_size + 2];
01832     register char *source =
01833         &yy_current_buffer->yy_ch_buf[number_to_move];
01834 
01835     while ( source > yy_current_buffer->yy_ch_buf )
01836       *--dest = *--source;
01837 
01838     yy_cp += (int) (dest - source);
01839     yy_bp += (int) (dest - source);
01840     yy_current_buffer->yy_n_chars =
01841       yy_n_chars = yy_current_buffer->yy_buf_size;
01842 
01843     if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
01844       YY_FATAL_ERROR( "flex scanner push-back overflow" );
01845     }
01846 
01847   *--yy_cp = (char) c;
01848 
01849 
01850   yytext_ptr = yy_bp;
01851   yy_hold_char = *yy_cp;
01852   yy_c_buf_p = yy_cp;
01853   }
01854 #endif  /* ifndef YY_NO_UNPUT */
01855 
01856 
01857 #ifdef __cplusplus
01858 static int yyinput()
01859 #else
01860 static int input()
01861 #endif
01862   {
01863   int c;
01864 
01865   *yy_c_buf_p = yy_hold_char;
01866 
01867   if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
01868     {
01869     /* yy_c_buf_p now points to the character we want to return.
01870      * If this occurs *before* the EOB characters, then it's a
01871      * valid NUL; if not, then we've hit the end of the buffer.
01872      */
01873     if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
01874       /* This was really a NUL. */
01875       *yy_c_buf_p = '\0';
01876 
01877     else
01878       { /* need more input */
01879       int offset = yy_c_buf_p - yytext_ptr;
01880       ++yy_c_buf_p;
01881 
01882       switch ( yy_get_next_buffer() )
01883         {
01884         case EOB_ACT_LAST_MATCH:
01885           /* This happens because yy_g_n_b()
01886            * sees that we've accumulated a
01887            * token and flags that we need to
01888            * try matching the token before
01889            * proceeding.  But for input(),
01890            * there's no matching to consider.
01891            * So convert the EOB_ACT_LAST_MATCH
01892            * to EOB_ACT_END_OF_FILE.
01893            */
01894 
01895           /* Reset buffer status. */
01896           yyrestart( yyin );
01897 
01898           /* fall through */
01899 
01900         case EOB_ACT_END_OF_FILE:
01901           {
01902           if ( yywrap() )
01903             return EOF;
01904 
01905           if ( ! yy_did_buffer_switch_on_eof )
01906             YY_NEW_FILE;
01907 #ifdef __cplusplus
01908           return yyinput();
01909 #else
01910           return input();
01911 #endif
01912           }
01913 
01914         case EOB_ACT_CONTINUE_SCAN:
01915           yy_c_buf_p = yytext_ptr + offset;
01916           break;
01917         }
01918       }
01919     }
01920 
01921   c = *(unsigned char *) yy_c_buf_p;  /* cast for 8-bit char's */
01922   *yy_c_buf_p = '\0'; /* preserve yytext */
01923   yy_hold_char = *++yy_c_buf_p;
01924 
01925 
01926   return c;
01927   }
01928 
01929 
01930 #ifdef YY_USE_PROTOS
01931 void yyrestart( FILE *input_file )
01932 #else
01933 void yyrestart( input_file )
01934 FILE *input_file;
01935 #endif
01936   {
01937   if ( ! yy_current_buffer )
01938     yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
01939 
01940   yy_init_buffer( yy_current_buffer, input_file );
01941   yy_load_buffer_state();
01942   }
01943 
01944 
01945 #ifdef YY_USE_PROTOS
01946 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
01947 #else
01948 void yy_switch_to_buffer( new_buffer )
01949 YY_BUFFER_STATE new_buffer;
01950 #endif
01951   {
01952   if ( yy_current_buffer == new_buffer )
01953     return;
01954 
01955   if ( yy_current_buffer )
01956     {
01957     /* Flush out information for old buffer. */
01958     *yy_c_buf_p = yy_hold_char;
01959     yy_current_buffer->yy_buf_pos = yy_c_buf_p;
01960     yy_current_buffer->yy_n_chars = yy_n_chars;
01961     }
01962 
01963   yy_current_buffer = new_buffer;
01964   yy_load_buffer_state();
01965 
01966   /* We don't actually know whether we did this switch during
01967    * EOF (yywrap()) processing, but the only time this flag
01968    * is looked at is after yywrap() is called, so it's safe
01969    * to go ahead and always set it.
01970    */
01971   yy_did_buffer_switch_on_eof = 1;
01972   }
01973 
01974 
01975 #ifdef YY_USE_PROTOS
01976 void yy_load_buffer_state( void )
01977 #else
01978 void yy_load_buffer_state()
01979 #endif
01980   {
01981   yy_n_chars = yy_current_buffer->yy_n_chars;
01982   yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
01983   yyin = yy_current_buffer->yy_input_file;
01984   yy_hold_char = *yy_c_buf_p;
01985   }
01986 
01987 
01988 #ifdef YY_USE_PROTOS
01989 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
01990 #else
01991 YY_BUFFER_STATE yy_create_buffer( file, size )
01992 FILE *file;
01993 int size;
01994 #endif
01995   {
01996   YY_BUFFER_STATE b;
01997 
01998   b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
01999   if ( ! b )
02000     YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
02001 
02002   b->yy_buf_size = size;
02003 
02004   /* yy_ch_buf has to be 2 characters longer than the size given because
02005    * we need to put in 2 end-of-buffer characters.
02006    */
02007   b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
02008   if ( ! b->yy_ch_buf )
02009     YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
02010 
02011   b->yy_is_our_buffer = 1;
02012 
02013   yy_init_buffer( b, file );
02014 
02015   return b;
02016   }
02017 
02018 
02019 #ifdef YY_USE_PROTOS
02020 void yy_delete_buffer( YY_BUFFER_STATE b )
02021 #else
02022 void yy_delete_buffer( b )
02023 YY_BUFFER_STATE b;
02024 #endif
02025   {
02026   if ( ! b )
02027     return;
02028 
02029   if ( b == yy_current_buffer )
02030     yy_current_buffer = (YY_BUFFER_STATE) 0;
02031 
02032   if ( b->yy_is_our_buffer )
02033     yy_flex_free( (void *) b->yy_ch_buf );
02034 
02035   yy_flex_free( (void *) b );
02036   }
02037 
02038 
02039 
02040 #ifdef YY_USE_PROTOS
02041 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
02042 #else
02043 void yy_init_buffer( b, file )
02044 YY_BUFFER_STATE b;
02045 FILE *file;
02046 #endif
02047 
02048 
02049   {
02050   yy_flush_buffer( b );
02051 
02052   b->yy_input_file = file;
02053   b->yy_fill_buffer = 1;
02054 
02055 #if YY_ALWAYS_INTERACTIVE
02056   b->yy_is_interactive = 1;
02057 #else
02058 #if YY_NEVER_INTERACTIVE
02059   b->yy_is_interactive = 0;
02060 #else
02061   b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
02062 #endif
02063 #endif
02064   }
02065 
02066 
02067 #ifdef YY_USE_PROTOS
02068 void yy_flush_buffer( YY_BUFFER_STATE b )
02069 #else
02070 void yy_flush_buffer( b )
02071 YY_BUFFER_STATE b;
02072 #endif
02073 
02074   {
02075   if ( ! b )
02076     return;
02077 
02078   b->yy_n_chars = 0;
02079 
02080   /* We always need two end-of-buffer characters.  The first causes
02081    * a transition to the end-of-buffer state.  The second causes
02082    * a jam in that state.
02083    */
02084   b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
02085   b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
02086 
02087   b->yy_buf_pos = &b->yy_ch_buf[0];
02088 
02089   b->yy_at_bol = 1;
02090   b->yy_buffer_status = YY_BUFFER_NEW;
02091 
02092   if ( b == yy_current_buffer )
02093     yy_load_buffer_state();
02094   }
02095 
02096 
02097 #ifndef YY_NO_SCAN_BUFFER
02098 #ifdef YY_USE_PROTOS
02099 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
02100 #else
02101 YY_BUFFER_STATE yy_scan_buffer( base, size )
02102 char *base;
02103 yy_size_t size;
02104 #endif
02105   {
02106   YY_BUFFER_STATE b;
02107 
02108   if ( size < 2 ||
02109        base[size-2] != YY_END_OF_BUFFER_CHAR ||
02110        base[size-1] != YY_END_OF_BUFFER_CHAR )
02111     /* They forgot to leave room for the EOB's. */
02112     return 0;
02113 
02114   b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
02115   if ( ! b )
02116     YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
02117 
02118   b->yy_buf_size = size - 2;  /* "- 2" to take care of EOB's */
02119   b->yy_buf_pos = b->yy_ch_buf = base;
02120   b->yy_is_our_buffer = 0;
02121   b->yy_input_file = 0;
02122   b->yy_n_chars = b->yy_buf_size;
02123   b->yy_is_interactive = 0;
02124   b->yy_at_bol = 1;
02125   b->yy_fill_buffer = 0;
02126   b->yy_buffer_status = YY_BUFFER_NEW;
02127 
02128   yy_switch_to_buffer( b );
02129 
02130   return b;
02131   }
02132 #endif
02133 
02134 
02135 #ifndef YY_NO_SCAN_STRING
02136 #ifdef YY_USE_PROTOS
02137 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
02138 #else
02139 YY_BUFFER_STATE yy_scan_string( yy_str )
02140 yyconst char *yy_str;
02141 #endif
02142   {
02143   int len;
02144   for ( len = 0; yy_str[len]; ++len )
02145     ;
02146 
02147   return yy_scan_bytes( yy_str, len );
02148   }
02149 #endif
02150 
02151 
02152 #ifndef YY_NO_SCAN_BYTES
02153 #ifdef YY_USE_PROTOS
02154 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
02155 #else
02156 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
02157 yyconst char *bytes;
02158 int len;
02159 #endif
02160   {
02161   YY_BUFFER_STATE b;
02162   char *buf;
02163   yy_size_t n;
02164   int i;
02165 
02166   /* Get memory for full buffer, including space for trailing EOB's. */
02167   n = len + 2;
02168   buf = (char *) yy_flex_alloc( n );
02169   if ( ! buf )
02170     YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
02171 
02172   for ( i = 0; i < len; ++i )
02173     buf[i] = bytes[i];
02174 
02175   buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
02176 
02177   b = yy_scan_buffer( buf, n );
02178   if ( ! b )
02179     YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
02180 
02181   /* It's okay to grow etc. this buffer, and we should throw it
02182    * away when we're done.
02183    */
02184   b->yy_is_our_buffer = 1;
02185 
02186   return b;
02187   }
02188 #endif
02189 
02190 
02191 #ifndef YY_NO_PUSH_STATE
02192 #ifdef YY_USE_PROTOS
02193 static void yy_push_state( int new_state )
02194 #else
02195 static void yy_push_state( new_state )
02196 int new_state;
02197 #endif
02198   {
02199   if ( yy_start_stack_ptr >= yy_start_stack_depth )
02200     {
02201     yy_size_t new_size;
02202 
02203     yy_start_stack_depth += YY_START_STACK_INCR;
02204     new_size = yy_start_stack_depth * sizeof( int );
02205 
02206     if ( ! yy_start_stack )
02207       yy_start_stack = (int *) yy_flex_alloc( new_size );
02208 
02209     else
02210       yy_start_stack = (int *) yy_flex_realloc(
02211           (void *) yy_start_stack, new_size );
02212 
02213     if ( ! yy_start_stack )
02214       YY_FATAL_ERROR(
02215       "out of memory expanding start-condition stack" );
02216     }
02217 
02218   yy_start_stack[yy_start_stack_ptr++] = YY_START;
02219 
02220   BEGIN(new_state);
02221   }
02222 #endif
02223 
02224 
02225 #ifndef YY_NO_POP_STATE
02226 static void yy_pop_state()
02227   {
02228   if ( --yy_start_stack_ptr < 0 )
02229     YY_FATAL_ERROR( "start-condition stack underflow" );
02230 
02231   BEGIN(yy_start_stack[yy_start_stack_ptr]);
02232   }
02233 #endif
02234 
02235 
02236 #ifndef YY_NO_TOP_STATE
02237 static int yy_top_state()
02238   {
02239   return yy_start_stack[yy_start_stack_ptr - 1];
02240   }
02241 #endif
02242 
02243 #ifndef YY_EXIT_FAILURE
02244 #define YY_EXIT_FAILURE 2
02245 #endif
02246 
02247 #ifdef YY_USE_PROTOS
02248 static void yy_fatal_error( yyconst char msg[] )
02249 #else
02250 static void yy_fatal_error( msg )
02251 char msg[];
02252 #endif
02253   {
02254   (void) fprintf( stderr, "%s\n", msg );
02255   exit( YY_EXIT_FAILURE );
02256   }
02257 
02258 
02259 
02260 /* Redefine yyless() so it works in section 3 code. */
02261 
02262 #undef yyless
02263 #define yyless(n) \
02264   do \
02265     { \
02266     /* Undo effects of setting up yytext. */ \
02267     yytext[yyleng] = yy_hold_char; \
02268     yy_c_buf_p = yytext + n; \
02269     yy_hold_char = *yy_c_buf_p; \
02270     *yy_c_buf_p = '\0'; \
02271     yyleng = n; \
02272     } \
02273   while ( 0 )
02274 
02275 
02276 /* Internal utility routines. */
02277 
02278 #ifndef yytext_ptr
02279 #ifdef YY_USE_PROTOS
02280 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
02281 #else
02282 static void yy_flex_strncpy( s1, s2, n )
02283 char *s1;
02284 yyconst char *s2;
02285 int n;
02286 #endif
02287   {
02288   register int i;
02289   for ( i = 0; i < n; ++i )
02290     s1[i] = s2[i];
02291   }
02292 #endif
02293 
02294 #ifdef YY_NEED_STRLEN
02295 #ifdef YY_USE_PROTOS
02296 static int yy_flex_strlen( yyconst char *s )
02297 #else
02298 static int yy_flex_strlen( s )
02299 yyconst char *s;
02300 #endif
02301   {
02302   register int n;
02303   for ( n = 0; s[n]; ++n )
02304     ;
02305 
02306   return n;
02307   }
02308 #endif
02309 
02310 
02311 #ifdef YY_USE_PROTOS
02312 static void *yy_flex_alloc( yy_size_t size )
02313 #else
02314 static void *yy_flex_alloc( size )
02315 yy_size_t size;
02316 #endif
02317   {
02318   return (void *) malloc( size );
02319   }
02320 
02321 #ifdef YY_USE_PROTOS
02322 static void *yy_flex_realloc( void *ptr, yy_size_t size )
02323 #else
02324 static void *yy_flex_realloc( ptr, size )
02325 void *ptr;
02326 yy_size_t size;
02327 #endif
02328   {
02329   /* The cast to (char *) in the following accommodates both
02330    * implementations that use char* generic pointers, and those
02331    * that use void* generic pointers.  It works with the latter
02332    * because both ANSI C and C++ allow castless assignment from
02333    * any pointer type to void*, and deal with argument conversions
02334    * as though doing an assignment.
02335    */
02336   return (void *) realloc( (char *) ptr, size );
02337   }
02338 
02339 #ifdef YY_USE_PROTOS
02340 static void yy_flex_free( void *ptr )
02341 #else
02342 static void yy_flex_free( ptr )
02343 void *ptr;
02344 #endif
02345   {
02346   free( ptr );
02347   }
02348 
02349 #if YY_MAIN
02350 int main()
02351   {
02352   yylex();
02353   return 0;
02354   }
02355 #endif
02356 #line 312 "uclex.ll"
02357 
02358 

Generated on Mon Jul 9 14:42:51 2007 for ExultEngine by  doxygen 1.5.1