Back to index

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