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

server/lex.yy.c

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

Generated on Mon Jun 19 10:15:12 2006 for IILC by  doxygen 1.4.2