Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members  

lex.yy.c

Go to the documentation of this file.
00001 /* A lexical scanner generated by flex */
00002 
00003 /* Scanner skeleton version:
00004  * $Header: /home/ncvs/src/usr.bin/lex/skel.c,v 1.2 1996/12/14 05:48:48 steve 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 177
00286 #define YY_END_OF_BUFFER 178
00287 static yyconst short int yy_accept[509] =
00288     {   0,
00289         0,    0,  178,  176,  156,  157,  144,  176,    3,   79,
00290       150,  143,  176,  138,  139,  148,  147,  135,  146,  142,
00291       149,   94,   94,  136,  132,  151,  137,  152,  155,  176,
00292       140,  175,  141,  153,   79,   79,   79,   79,   79,   79,
00293        79,   79,   79,   79,   79,   79,   79,   79,   79,   79,
00294        79,   79,   79,   79,   79,  133,  154,  134,  145,  131,
00295         0,   42,    0,    2,   79,  117,  173,  174,  126,  118,
00296         0,    0,  115,  123,  113,  124,  114,  125,    0,  107,
00297         1,  116,  110,   87,    0,   96,   95,    0,   94,  122,
00298       128,  130,  129,  121,    0,    0,    0,  119,   79,   79,
00299 
00300        79,   79,   79,   79,   79,   79,    9,   79,   79,   79,
00301        79,   79,   79,   79,   13,   44,   79,   79,   79,   79,
00302        79,   79,   79,   79,   79,   79,   79,   79,   79,   79,
00303        79,   79,   79,   79,   79,   79,   79,   79,   79,   79,
00304        79,   79,   79,   79,  120,  127,    0,    0,    2,  101,
00305         4,    0,  105,  106,  107,    0,  108,  109,   89,   88,
00306         0,  104,   97,   98,   98,   80,  112,  111,  163,  164,
00307       161,  166,  171,  162,  172,  167,  170,  165,  168,  169,
00308         0,    0,   79,   79,   79,   79,   79,   79,   79,   79,
00309        79,   79,   79,   79,   79,   79,   79,   79,   79,   11,
00310 
00311        79,   79,   27,   79,   79,   79,   79,   79,   79,   79,
00312        79,   79,   79,   43,   79,   79,   79,   79,   79,   79,
00313        74,   79,   79,   79,   79,   79,   79,   79,   79,   79,
00314        79,   79,   79,   79,   79,   79,   79,   79,   79,   79,
00315        79,   79,    0,   42,    0,    0,  107,    0,  105,  106,
00316         0,  110,   90,   91,   91,  102,  103,  100,   99,   81,
00317        83,  160,    0,    0,   79,   79,   39,   79,    6,   29,
00318        79,   79,   79,   79,   79,   79,   10,   25,   79,   79,
00319        79,   79,   12,   79,   79,   79,   51,   79,   31,   79,
00320        79,   52,   79,   79,   68,   79,   79,   79,   79,   79,
00321 
00322        79,   79,   79,   79,   79,   79,   79,   79,   79,   79,
00323        79,   79,   79,   79,   79,   79,   79,   79,   79,   79,
00324        26,   79,   79,   79,    0,  107,   93,   92,   82,   84,
00325        84,    0,  159,   79,   79,    5,   79,   36,   79,   79,
00326        79,   79,   79,   79,   79,   30,   79,   79,   79,   79,
00327        79,   79,   79,   79,   79,   69,   79,   79,   79,   79,
00328        79,   79,   79,   32,   79,   79,   79,   79,   79,   79,
00329        79,   79,   79,   79,   77,   24,   79,   79,   79,   79,
00330        79,   18,   76,   86,   85,  158,   79,   79,   79,   79,
00331        79,   79,   79,   28,   79,   38,   79,   21,   79,   54,
00332 
00333        78,   79,   60,   79,   79,   79,   79,   79,   79,   58,
00334        79,   14,   75,   34,   15,   79,   41,   22,   17,   79,
00335        79,   79,   79,   79,   72,   19,   20,   79,   37,   47,
00336        64,   79,   79,    8,   79,   59,   79,   79,   79,   62,
00337        53,   79,   79,   45,   79,   79,   57,   79,   46,   61,
00338        79,   23,   79,   79,   79,   79,   65,    7,   79,   73,
00339        79,   79,   70,   16,   79,   40,   79,   55,   79,   33,
00340        35,   79,   71,   56,   79,   79,   79,   67,   79,   79,
00341        79,   63,   79,   79,   79,   79,   79,   79,   79,   48,
00342        79,   79,   66,   79,   79,   79,   79,   79,   79,   79,
00343 
00344        79,   79,   79,   50,   79,   79,   49,    0
00345     } ;
00346 
00347 static yyconst int yy_ec[256] =
00348     {   0,
00349         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
00350         4,    4,    1,    1,    1,    1,    1,    1,    1,    1,
00351         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00352         1,    2,    5,    6,    7,    8,    9,   10,   11,   12,
00353        13,   14,   15,   16,   17,   18,   19,   20,   21,   21,
00354        21,   21,   21,   21,   21,   21,   21,   22,   23,   24,
00355        25,   26,   27,   28,   29,   30,   31,   30,   32,   33,
00356        34,    8,    8,    8,   35,   36,   37,    8,    8,    8,
00357        38,   39,   40,   41,   42,    8,   43,   44,    8,   45,
00358        46,   47,   48,   49,   50,    1,   51,   52,   53,   54,
00359 
00360        55,   56,   57,   58,   59,    8,   60,   61,   62,   63,
00361        64,   65,    8,   66,   67,   68,   69,   70,   71,   72,
00362        73,   74,   75,   76,   77,   78,    1,    1,    1,    1,
00363         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00364         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00365         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00366         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00367         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00368         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00369         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00370 
00371         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00372         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00373         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00374         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00375         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00376         1,    1,    1,    1,    1
00377     } ;
00378 
00379 static yyconst int yy_meta[79] =
00380     {   0,
00381         1,    1,    1,    1,    1,    1,    1,    2,    1,    1,
00382         3,    1,    1,    1,    1,    1,    1,    1,    1,    4,
00383         4,    1,    1,    1,    1,    1,    1,    1,    5,    5,
00384         5,    5,    5,    2,    2,    2,    2,    2,    2,    2,
00385         2,    2,    2,    2,    2,    1,    1,    1,    1,    2,
00386         5,    5,    5,    5,    5,    5,    2,    2,    2,    2,
00387         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
00388         2,    2,    2,    2,    1,    1,    1,    1
00389     } ;
00390 
00391 static yyconst short int yy_base[516] =
00392     {   0,
00393         0,    0,  659,  660,  660,  660,  633,   73,    0,    0,
00394        55,   71,  610,  660,  660,  631,   67,  660,   68,   66,
00395        74,   80,   85,  660,  660,   65,  630,   82,  660,   91,
00396       660,  660,  660,  629,  603,   28,  586,   67,   40,   65,
00397        72,  587,   88,   55,  586,   79,  101,  598,  593,  103,
00398        90,  584,   51,  588,  586,  660,  113,  660,  660,  660,
00399       133,  163,  641,    0,    0,  660,  660,  660,  660,  660,
00400       100,  139,  660,  660,  660,  660,  660,  660,  625,  155,
00401       660,  660,  162,  172,  164,  160,  142,    0,  204,  617,
00402       660,  660,  660,  616,  245,  603,  603,  660,  585,  564,
00403 
00404       568,  580,  567,  122,  570,  141,  563,  564,  561,  144,
00405       568,  564,  561,  558,    0,   99,  562,  569,  562,  559,
00406       550,  552,  558,  551,  561,  555,  547,  551,  547,  174,
00407       556,  135,  158,  556,  154,  551,  547,  539,  542,  184,
00408       556,  167,  546,  549,  660,  660,  242,  153,    0,  660,
00409       660,  235,  660,  660,  251,  243,  660,  660,  233,  230,
00410       241,  272,  165,  660,  234,  261,  660,  660,  660,  562,
00411       660,  660,  660,  660,  660,  660,  660,  660,  660,  660,
00412       563,  564,  536,  531,  534,  546,  541,  529,  541,  200,
00413       542,  537,  539,  535,  527,  524,  532,  519,  534,    0,
00414 
00415       520,  524,  527,  512,  515,  518,  521,  511,  513,  514,
00416       519,  506,  499,    0,  516,  502,  516,  509,  246,  498,
00417         0,  500,  499,  501,  508,  509,  493,  491,  491,  493,
00418       502,  501,  497,  499,  489,  493,  484,  203,  496,  498,
00419       487,  486,  271,  308,  543,  278,  296,  304,  660,  660,
00420       306,  314,  254,  660,  277,  660,  660,  660,  660,  295,
00421       279,  660,  517,  505,  480,  469,    0,  481,    0,    0,
00422       480,  471,  479,  468,  473,  474,    0,    0,  467,  467,
00423       477,  463,    0,  467,  472,  467,    0,  287,    0,  472,
00424       457,    0,  459,  469,    0,  469,  463,  457,  453,  464,
00425 
00426       449,  451,  461,  447,  459,  449,  453,  452,  457,  456,
00427       442,  444,  452,  450,  448,  440,  445,  446,  434,  446,
00428         0,  430,  442,  442,  323,  325,  660,  660,  294,  660,
00429       305,  467,  660,  427,  428,    0,  293,    0,  429,  430,
00430       436,  434,  433,  424,  423,    0,  430,  418,  422,  428,
00431       426,  424,  418,  408,  409,    0,  425,  406,  406,  417,
00432       411,  408,  416,    0,  415,  412,  416,  413,  397,  406,
00433       408,  393,  406,  407,    0,    0,  396,  404,  400,  395,
00434       396,    0,    0,  660,  660,  660,  386,  398,  398,  387,
00435       381,  381,  393,    0,  393,  395,  376,    0,  393,    0,
00436 
00437         0,  387,    0,  381,  386,  376,  378,  375,  382,    0,
00438       375,    0,    0,  376,    0,  373,    0,    0,    0,  377,
00439       371,  375,  370,  374,    0,    0,    0,  367,    0,    0,
00440       360,  372,  370,    0,  361,    0,  362,  361,  360,    0,
00441         0,  354,  363,    0,  350,  351,    0,  353,    0,    0,
00442       345,    0,  347,  343,  339,  325,    0,    0,  317,    0,
00443       323,  315,    0,    0,  327,    0,  312,    0,  325,  319,
00444         0,  311,    0,    0,  303,  320,  318,    0,  309,  312,
00445       304,    0,  311,  299,  312,  307,  294,  304,  286,    0,
00446       300,  292,    0,  278,  254,  236,  250,  176,  186,  174,
00447 
00448       151,  158,  128,    0,   48,   28,    0,  660,  386,  390,
00449       394,  399,  403,  405,  410
00450     } ;
00451 
00452 static yyconst short int yy_def[516] =
00453     {   0,
00454       508,    1,  508,  508,  508,  508,  508,  509,  510,  511,
00455       508,  508,  512,  508,  508,  508,  508,  508,  508,  508,
00456       508,  508,  508,  508,  508,  508,  508,  508,  508,  508,
00457       508,  508,  508,  508,  511,  511,  511,  511,  511,  511,
00458       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00459       511,  511,  511,  511,  511,  508,  508,  508,  508,  508,
00460       509,  508,  509,  513,  511,  508,  508,  508,  508,  508,
00461       512,  512,  508,  508,  508,  508,  508,  508,  508,  508,
00462       508,  508,  508,  508,  508,  508,  508,  514,  508,  508,
00463       508,  508,  508,  508,  508,  508,  508,  508,  511,  511,
00464 
00465       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00466       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00467       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00468       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00469       511,  511,  511,  511,  508,  508,  508,  515,  513,  508,
00470       508,  508,  508,  508,  508,  508,  508,  508,  508,  508,
00471       508,  508,  508,  508,  508,  514,  508,  508,  508,  508,
00472       508,  508,  508,  508,  508,  508,  508,  508,  508,  508,
00473       508,  508,  511,  511,  511,  511,  511,  511,  511,  511,
00474       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00475 
00476       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00477       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00478       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00479       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00480       511,  511,  515,  508,  515,  508,  508,  508,  508,  508,
00481       508,  508,  508,  508,  508,  508,  508,  508,  508,  508,
00482       508,  508,  508,  508,  511,  511,  511,  511,  511,  511,
00483       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00484       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00485       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00486 
00487       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00488       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00489       511,  511,  511,  511,  508,  508,  508,  508,  508,  508,
00490       508,  508,  508,  511,  511,  511,  511,  511,  511,  511,
00491       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00492       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00493       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00494       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00495       511,  511,  511,  508,  508,  508,  511,  511,  511,  511,
00496       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00497 
00498       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00499       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00500       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00501       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00502       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00503       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00504       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00505       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00506       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00507       511,  511,  511,  511,  511,  511,  511,  511,  511,  511,
00508 
00509       511,  511,  511,  511,  511,  511,  511,    0,  508,  508,
00510       508,  508,  508,  508,  508
00511     } ;
00512 
00513 static yyconst short int yy_nxt[739] =
00514     {   0,
00515         4,    5,    6,    5,    7,    8,    9,   10,   11,   12,
00516        13,   14,   15,   16,   17,   18,   19,   20,   21,   22,
00517        23,   24,   25,   26,   27,   28,   29,   30,   10,   10,
00518        10,   10,   10,   10,   10,   10,   10,   10,   10,   10,
00519        10,   10,   10,   10,   10,   31,   32,   33,   34,   35,
00520        36,   37,   38,   39,   40,   41,   42,   10,   43,   44,
00521        45,   10,   46,   47,   48,   49,   50,   51,   52,   53,
00522        54,   10,   55,   10,   56,   57,   58,   59,   62,   66,
00523        69,   74,  507,   79,   76,   80,   80,   81,   90,   91,
00524       100,   75,   77,   78,  106,   70,  101,   83,   82,   84,
00525 
00526        84,  141,   83,  107,   89,   89,   93,   94,   95,  118,
00527       150,   85,  506,  119,  142,   86,   85,  103,   96,   63,
00528        86,   87,  111,   88,  104,  108,   87,  109,   97,   67,
00529       105,   68,  112,  121,   85,  113,  110,  145,   62,   85,
00530        86,  508,  122,  115,  137,   86,   72,  123,   87,   71,
00531       116,   88,  124,   87,  117,  138,  125,  131,  244,  202,
00532       132,  133,  139,  126,  147,  147,  203,  134,  148,  127,
00533       135,  128,  188,  136,   80,   80,  189,  165,  161,   63,
00534       161,  155,  155,  162,  162,  222,  152,  153,  146,   83,
00535       154,   84,   84,  156,  157,  163,  191,  158,  223,  245,
00536 
00537       505,  164,  165,   85,  227,  192,  258,  159,  196,  152,
00538       153,  197,  504,  160,  224,  154,  156,  157,  503,  228,
00539       163,   83,  158,   89,   89,  239,   85,  240,  164,  217,
00540       218,  225,  159,  258,  219,   85,  233,  234,  502,   86,
00541       160,  220,  235,  147,  147,   87,  501,  148,  500,  246,
00542       236,  246,  237,  319,  247,  247,  320,  251,   85,  251,
00543       162,  162,  252,  252,   86,  255,  272,  273,  253,  259,
00544       155,  155,   87,  169,  254,  170,  244,  171,  172,  173,
00545       174,  175,  248,  249,  176,  177,  250,  178,  179,  180,
00546       255,  162,  162,  253,  259,  327,  260,  247,  247,  300,
00547 
00548       499,  254,  261,  498,  256,  248,  249,  257,  301,  147,
00549       147,  250,  328,  148,  331,  247,  247,  245,  325,  497,
00550       325,  260,  327,  326,  326,  252,  252,  256,  153,  261,
00551       329,  154,  257,  252,  252,  384,  330,  328,  496,  331,
00552       385,  350,  326,  326,  326,  326,  157,  389,  495,  158,
00553       494,  153,  351,  493,  390,  329,  154,  249,  492,  491,
00554       250,  490,  384,  330,  489,  385,  488,  487,  486,  157,
00555       485,  484,  483,  482,  158,  481,  480,  479,  478,  477,
00556       249,  476,  475,  474,  473,  250,   61,   61,   61,   61,
00557        61,   64,  472,  471,   64,   65,  470,   65,   65,   71,
00558 
00559        71,  469,   71,   71,  149,  468,  149,  149,  166,  166,
00560       243,  243,  243,  243,  243,  467,  466,  465,  464,  463,
00561       462,  461,  460,  459,  458,  457,  456,  455,  454,  453,
00562       452,  451,  450,  449,  448,  447,  446,  445,  444,  443,
00563       442,  441,  440,  439,  438,  437,  436,  435,  434,  433,
00564       432,  431,  430,  429,  428,  427,  426,  425,  424,  423,
00565       422,  421,  420,  419,  418,  417,  416,  415,  414,  413,
00566       412,  411,  410,  409,  408,  407,  406,  405,  404,  403,
00567       402,  401,  400,  399,  398,  397,  396,  395,  394,  393,
00568       392,  391,  388,  387,  386,  383,  382,  381,  380,  379,
00569 
00570       378,  377,  376,  375,  374,  373,  372,  371,  370,  369,
00571       368,  367,  366,  365,  364,  363,  362,  361,  360,  359,
00572       358,  357,  356,  355,  354,  353,  352,  349,  348,  347,
00573       346,  345,  344,  343,  342,  341,  340,  339,  338,  337,
00574       336,  335,  334,  333,  332,  508,  324,  323,  322,  321,
00575       318,  317,  316,  315,  314,  313,  312,  311,  310,  309,
00576       308,  307,  306,  305,  304,  303,  302,  299,  298,  297,
00577       296,  295,  294,  293,  292,  291,  290,  289,  288,  287,
00578       286,  285,  284,  283,  282,  281,  280,  279,  278,  277,
00579       276,  275,  274,  271,  270,  269,  268,  267,  266,  265,
00580 
00581       264,  263,  262,  242,  241,  238,  232,  231,  230,  229,
00582       226,  221,  216,  215,  214,  213,  212,  211,  210,  209,
00583       208,  207,  206,  205,  204,  201,  200,  199,  198,  195,
00584       194,  193,  190,  187,  186,  185,  184,  183,  182,  181,
00585       168,  167,  151,  508,  144,  143,  140,  130,  129,  120,
00586       114,  102,   99,   98,   92,   73,   72,   60,  508,    3,
00587       508,  508,  508,  508,  508,  508,  508,  508,  508,  508,
00588       508,  508,  508,  508,  508,  508,  508,  508,  508,  508,
00589       508,  508,  508,  508,  508,  508,  508,  508,  508,  508,
00590       508,  508,  508,  508,  508,  508,  508,  508,  508,  508,
00591 
00592       508,  508,  508,  508,  508,  508,  508,  508,  508,  508,
00593       508,  508,  508,  508,  508,  508,  508,  508,  508,  508,
00594       508,  508,  508,  508,  508,  508,  508,  508,  508,  508,
00595       508,  508,  508,  508,  508,  508,  508,  508
00596     } ;
00597 
00598 static yyconst short int yy_chk[739] =
00599     {   0,
00600         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00601         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00602         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00603         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00604         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00605         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00606         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00607         1,    1,    1,    1,    1,    1,    1,    1,    8,   11,
00608        12,   17,  506,   20,   19,   20,   20,   21,   26,   26,
00609        36,   17,   19,   19,   39,   12,   36,   22,   21,   22,
00610 
00611        22,   53,   23,   39,   23,   23,   28,   28,   30,   44,
00612        71,   22,  505,   44,   53,   22,   23,   38,   30,    8,
00613        23,   22,   41,   22,   38,   40,   23,   40,   30,   11,
00614        38,   11,   41,   46,   22,   41,   40,   57,   61,   23,
00615        22,   72,   46,   43,   51,   23,   71,   46,   22,   72,
00616        43,   22,   47,   23,   43,   51,   47,   50,  148,  116,
00617        50,   50,   51,   47,   62,   62,  116,   50,   62,   47,
00618        50,   47,  104,   50,   80,   80,  104,   87,   85,   61,
00619        85,   83,   83,   85,   85,  132,   80,   80,   57,   84,
00620        80,   84,   84,   83,   83,   86,  106,   83,  132,  148,
00621 
00622       503,   86,   87,   84,  135,  106,  163,   84,  110,   80,
00623        80,  110,  502,   84,  133,   80,   83,   83,  501,  135,
00624        86,   89,   83,   89,   89,  142,   84,  142,   86,  130,
00625       130,  133,   84,  163,  130,   89,  140,  140,  500,   89,
00626        84,  130,  140,  147,  147,   89,  499,  147,  498,  152,
00627       140,  152,  140,  238,  152,  152,  238,  156,   89,  156,
00628       161,  161,  156,  156,   89,  160,  190,  190,  159,  165,
00629       155,  155,   89,   95,  159,   95,  243,   95,   95,   95,
00630        95,   95,  155,  155,   95,   95,  155,   95,   95,   95,
00631       160,  162,  162,  159,  165,  253,  166,  246,  246,  219,
00632 
00633       497,  159,  166,  496,  162,  155,  155,  162,  219,  244,
00634       244,  155,  255,  244,  261,  247,  247,  243,  248,  495,
00635       248,  166,  253,  248,  248,  251,  251,  162,  247,  166,
00636       260,  247,  162,  252,  252,  329,  260,  255,  494,  261,
00637       331,  288,  325,  325,  326,  326,  252,  337,  492,  252,
00638       491,  247,  288,  489,  337,  260,  247,  326,  488,  487,
00639       326,  486,  329,  260,  485,  331,  484,  483,  481,  252,
00640       480,  479,  477,  476,  252,  475,  472,  470,  469,  467,
00641       326,  465,  462,  461,  459,  326,  509,  509,  509,  509,
00642       509,  510,  456,  455,  510,  511,  454,  511,  511,  512,
00643 
00644       512,  453,  512,  512,  513,  451,  513,  513,  514,  514,
00645       515,  515,  515,  515,  515,  448,  446,  445,  443,  442,
00646       439,  438,  437,  435,  433,  432,  431,  428,  424,  423,
00647       422,  421,  420,  416,  414,  411,  409,  408,  407,  406,
00648       405,  404,  402,  399,  397,  396,  395,  393,  392,  391,
00649       390,  389,  388,  387,  381,  380,  379,  378,  377,  374,
00650       373,  372,  371,  370,  369,  368,  367,  366,  365,  363,
00651       362,  361,  360,  359,  358,  357,  355,  354,  353,  352,
00652       351,  350,  349,  348,  347,  345,  344,  343,  342,  341,
00653       340,  339,  335,  334,  332,  324,  323,  322,  320,  319,
00654 
00655       318,  317,  316,  315,  314,  313,  312,  311,  310,  309,
00656       308,  307,  306,  305,  304,  303,  302,  301,  300,  299,
00657       298,  297,  296,  294,  293,  291,  290,  286,  285,  284,
00658       282,  281,  280,  279,  276,  275,  274,  273,  272,  271,
00659       268,  266,  265,  264,  263,  245,  242,  241,  240,  239,
00660       237,  236,  235,  234,  233,  232,  231,  230,  229,  228,
00661       227,  226,  225,  224,  223,  222,  220,  218,  217,  216,
00662       215,  213,  212,  211,  210,  209,  208,  207,  206,  205,
00663       204,  203,  202,  201,  199,  198,  197,  196,  195,  194,
00664       193,  192,  191,  189,  188,  187,  186,  185,  184,  183,
00665 
00666       182,  181,  170,  144,  143,  141,  139,  138,  137,  136,
00667       134,  131,  129,  128,  127,  126,  125,  124,  123,  122,
00668       121,  120,  119,  118,  117,  114,  113,  112,  111,  109,
00669       108,  107,  105,  103,  102,  101,  100,   99,   97,   96,
00670        94,   90,   79,   63,   55,   54,   52,   49,   48,   45,
00671        42,   37,   35,   34,   27,   16,   13,    7,    3,  508,
00672       508,  508,  508,  508,  508,  508,  508,  508,  508,  508,
00673       508,  508,  508,  508,  508,  508,  508,  508,  508,  508,
00674       508,  508,  508,  508,  508,  508,  508,  508,  508,  508,
00675       508,  508,  508,  508,  508,  508,  508,  508,  508,  508,
00676 
00677       508,  508,  508,  508,  508,  508,  508,  508,  508,  508,
00678       508,  508,  508,  508,  508,  508,  508,  508,  508,  508,
00679       508,  508,  508,  508,  508,  508,  508,  508,  508,  508,
00680       508,  508,  508,  508,  508,  508,  508,  508
00681     } ;
00682 
00683 static yy_state_type yy_last_accepting_state;
00684 static char *yy_last_accepting_cpos;
00685 
00686 /* The intent behind this definition is that it'll catch
00687  * any uses of REJECT which flex missed.
00688  */
00689 #define REJECT reject_used_but_not_detected
00690 #define yymore() yymore_used_but_not_detected
00691 #define YY_MORE_ADJ 0
00692 #define YY_RESTORE_YY_MORE_OFFSET
00693 char *yytext;
00694 #line 1 "cscanner.l"
00695 #define INITIAL 0
00696 /*;-*-C-*-; 
00697 ** Copyright (c) Massachusetts Institute of Technology 1994-1998.
00698 **          All Rights Reserved.
00699 **          Unpublished rights reserved under the copyright laws of
00700 **          the United States.
00701 **
00702 ** THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
00703 ** OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
00704 **
00705 ** This code is distributed freely and may be used freely under the 
00706 ** following conditions:
00707 **
00708 **     1. This notice may not be removed or altered.
00709 **
00710 **     2. Works derived from this code are not distributed for
00711 **        commercial gain without explicit permission from MIT 
00712 **        (for permission contact lclint-request@cs.virginia.edu).
00713 */
00714 /*
00715  * Modified by Herbert 08/19/97:
00716  * - added #include for IBM's OS/2 compiler.
00717  * - fixed weird bug with lookup of tmp files (OS/2 and MSDOS only).
00718  */
00719 /*
00720  * Modified by Mike Smith 
00721  * Corrected missing 'line' in scanf() calls in handleSpecial().
00722  * Without this, I get an error when LCLint hits a '#line' directive
00723  * in the pre-pre-processed source files. For safety, I have made these
00724  * conditional on OS2 and MSDOS because I don't understand why noone else
00725  * has seen this problem.
00726  *
00727  * Modified by Mike Smith, 4th June 1997
00728  * Finally resolved the #line problem.  The scanf() calls have been fixed to
00729  * allow the following #line forms:-
00730  *
00731  *        #line 123 "filename"
00732  *        #line 123
00733  *        # 123 "filename"
00734  *        # 123
00735  *
00736  * The last two are generated by the GNU pre-processor, apparently
00737  */
00738 #line 56 "cscanner.l"
00739 /*
00740 ** based on original C lexer by Nate Osgood
00741 **    from hacrat@catfish.lcs.mit.edu Mon Jun 14 13:06:32 1993
00742 **
00743 */
00744 
00745 # include "lclintMacros.nf"
00746 # include "basic.h"
00747 
00748 # include "cgrammar.h"
00749 # include "cgrammar_tokens.h"
00750 
00751 # include "fileIdList.h"
00752 # include "portab.h"
00753 
00754 # if defined(OS2) && defined(__IBMC__)
00755    /* needed for isatty()... */
00756 # include <io.h>
00757 # endif
00758 
00759 static bool lastWasString = FALSE;
00760 static char savechar = '\0';
00761 
00762 /*@notfunction@*/
00763 # define yyinput() (incColumn (), getc (yyin))
00764 
00765 /*@-noparams@*/
00766 /*@-incondefs@*/
00767 extern /*@external@*/ int read ();
00768 /*@=incondefs@*/
00769 /*@=noparams@*/
00770 
00771 static /*@owned@*/ cstring lastidprocessed = cstring_undefined;
00772 
00773 static int lminput (void);
00774 static int tokLength = 0;
00775 static bool inSpecPart = FALSE;
00776 static bool continueLine = FALSE;
00777 
00778 static int ninput (void);
00779 static char processChar (void);
00780 static double processFloat (void);
00781 static /*@only@*/ exprNode processString (void);
00782 static long processDec (void);
00783 static long processHex (void);
00784 static long processOctal (void);
00785 static int processIdentifier (/*@only@*/ cstring)
00786    /*@globals undef lastidprocessed@*/ ;
00787 static bool processHashIdentifier (/*@only@*/ cstring)
00788    /*@globals undef lastidprocessed@*/ ;
00789 
00790 static int processSpec (int);
00791 static bool handleSpecial (char *);
00792 static int handleLlSpecial (void);
00793 static void handleMacro (void);
00794 static bool processMacro (void);
00795 static /*@only@*/ cstring makeIdentifier (char *);
00796 
00797 /* yes, this is exported! */
00798 bool g_expectingTypeName = TRUE; /* beginning of file can be type name! */
00799 
00800 static int returnInt (ctype, long);
00801 static int returnFloat (ctype, double);
00802 static int returnChar (char);
00803 static void setTokLength (int) /*@modifies g_currentloc@*/ ;
00804 static void setTokLengthT (size_t) /*@modifies g_currentloc@*/ ;
00805 
00806 static void advanceLine (void)
00807 {
00808   tokLength = 0;
00809   beginLine ();
00810 }
00811     
00812 /*@-allmacros@*/
00813 # define RETURN_INT(c,i) \
00814   do { lastWasString = FALSE; \
00815        return (returnInt (c, i)); } while (FALSE)
00816 
00817 # define RETURN_FLOAT(c,f) \
00818   do { lastWasString = FALSE; \
00819        return (returnFloat (c, f)); \
00820        } while (FALSE)
00821 
00822 # define RETURN_CHAR(c) \
00823   do { lastWasString = FALSE; \
00824        return (returnChar (c)); \
00825      } while (FALSE)
00826 
00827 # define RETURN_TOK(t) \
00828   do { yylval.tok = lltok_create (t, fileloc_decColumn (g_currentloc, tokLength)); \
00829        tokLength = 0; \
00830        lastWasString = FALSE; \
00831        return (t); } while (FALSE)
00832 
00833 # define RETURN_TYPE(t, ct) \
00834   do { yylval.ctyp = ct; tokLength = 0; return (t); } while (FALSE)
00835 
00836 /* don't fileloc_decColumn (g_currentloc, tokLength));  
00837    the string could have \n's in it!
00838 */
00839 
00840 # define RETURN_STRING(c) \
00841  do { yylval.expr = exprNode_stringLiteral (c, fileloc_decColumn (g_currentloc, tokLength)); \
00842       tokLength = 0; \
00843       lastWasString = TRUE; \
00844       return (CCONSTANT); } while (FALSE)
00845 
00846 # define RETURN_EXPR(e) \
00847  do { yylval.expr = e; \
00848       tokLength = 0; \
00849       lastWasString = TRUE; \
00850       return (CCONSTANT); } while (FALSE)
00851 
00852 /*@=allmacros@*/
00853 
00854 static void setTokLength (int len) 
00855 {
00856   addColumn (len);
00857   tokLength = len;
00858 }
00859 
00860 static void setTokLengthT (size_t len)
00861 {
00862   setTokLength (size_toInt (len));
00863 }
00864 
00865 # include "flex.head"
00866 #line 867 "lex.yy.c"
00867 
00868 /* Macros after this point can all be overridden by user definitions in
00869  * section 1.
00870  */
00871 
00872 #ifndef YY_SKIP_YYWRAP
00873 #ifdef __cplusplus
00874 extern "C" int yywrap YY_PROTO(( void ));
00875 #else
00876 extern int yywrap YY_PROTO(( void ));
00877 #endif
00878 #endif
00879 
00880 #ifndef YY_NO_UNPUT
00881 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
00882 #endif
00883 
00884 #ifndef yytext_ptr
00885 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
00886 #endif
00887 
00888 #ifdef YY_NEED_STRLEN
00889 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
00890 #endif
00891 
00892 #ifndef YY_NO_INPUT
00893 #ifdef __cplusplus
00894 static int yyinput YY_PROTO(( void ));
00895 #else
00896 static int input YY_PROTO(( void ));
00897 #endif
00898 #endif
00899 
00900 #if YY_STACK_USED
00901 static int yy_start_stack_ptr = 0;
00902 static int yy_start_stack_depth = 0;
00903 static int *yy_start_stack = 0;
00904 #ifndef YY_NO_PUSH_STATE
00905 static void yy_push_state YY_PROTO(( int new_state ));
00906 #endif
00907 #ifndef YY_NO_POP_STATE
00908 static void yy_pop_state YY_PROTO(( void ));
00909 #endif
00910 #ifndef YY_NO_TOP_STATE
00911 static int yy_top_state YY_PROTO(( void ));
00912 #endif
00913 
00914 #else
00915 #define YY_NO_PUSH_STATE 1
00916 #define YY_NO_POP_STATE 1
00917 #define YY_NO_TOP_STATE 1
00918 #endif
00919 
00920 #ifdef YY_MALLOC_DECL
00921 YY_MALLOC_DECL
00922 #else
00923 #if __STDC__
00924 #ifndef __cplusplus
00925 #include <stdlib.h>
00926 #endif
00927 #else
00928 /* Just try to get by without declaring the routines.  This will fail
00929  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
00930  * or sizeof(void*) != sizeof(int).
00931  */
00932 #endif
00933 #endif
00934 
00935 /* Amount of stuff to slurp up with each read. */
00936 #ifndef YY_READ_BUF_SIZE
00937 #define YY_READ_BUF_SIZE 8192
00938 #endif
00939 
00940 /* Copy whatever the last rule matched to the standard output. */
00941 
00942 #ifndef ECHO
00943 /* This used to be an fputs(), but since the string might contain NUL's,
00944  * we now use fwrite().
00945  */
00946 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
00947 #endif
00948 
00949 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
00950  * is returned in "result".
00951  */
00952 #ifndef YY_INPUT
00953 #define YY_INPUT(buf,result,max_size) \
00954         if ( yy_current_buffer->yy_is_interactive ) \
00955                 { \
00956                 int c = '*', n; \
00957                 for ( n = 0; n < max_size && \
00958                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
00959                         buf[n] = (char) c; \
00960                 if ( c == '\n' ) \
00961                         buf[n++] = (char) c; \
00962                 if ( c == EOF && ferror( yyin ) ) \
00963                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
00964                 result = n; \
00965                 } \
00966         else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
00967                   && ferror( yyin ) ) \
00968                 YY_FATAL_ERROR( "input in flex scanner failed" );
00969 #endif
00970 
00971 /* No semi-colon after return; correct usage is to write "yyterminate();" -
00972  * we don't want an extra ';' after the "return" because that will cause
00973  * some compilers to complain about unreachable statements.
00974  */
00975 #ifndef yyterminate
00976 #define yyterminate() return YY_NULL
00977 #endif
00978 
00979 /* Number of entries by which start-condition stack grows. */
00980 #ifndef YY_START_STACK_INCR
00981 #define YY_START_STACK_INCR 25
00982 #endif
00983 
00984 /* Report a fatal error. */
00985 #ifndef YY_FATAL_ERROR
00986 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
00987 #endif
00988 
00989 /* Default declaration of generated scanner - a define so the user can
00990  * easily add parameters.
00991  */
00992 #ifndef YY_DECL
00993 #define YY_DECL int yylex YY_PROTO(( void ))
00994 #endif
00995 
00996 /* Code executed at the beginning of each rule, after yytext and yyleng
00997  * have been set up.
00998  */
00999 #ifndef YY_USER_ACTION
01000 #define YY_USER_ACTION
01001 #endif
01002 
01003 /* Code executed at the end of each rule. */
01004 #ifndef YY_BREAK
01005 #define YY_BREAK break;
01006 #endif
01007 
01008 #define YY_RULE_SETUP \
01009         YY_USER_ACTION
01010 
01011 YY_DECL
01012         {
01013         register yy_state_type yy_current_state;
01014         register char *yy_cp, *yy_bp;
01015         register int yy_act;
01016 
01017 #line 185 "cscanner.l"
01018 
01019 
01020 #line 1021 "lex.yy.c"
01021 
01022         if ( yy_init )
01023                 {
01024                 yy_init = 0;
01025 
01026 #ifdef YY_USER_INIT
01027                 YY_USER_INIT;
01028 #endif
01029 
01030                 if ( ! yy_start )
01031                         yy_start = 1;   /* first start state */
01032 
01033                 if ( ! yyin )
01034                         yyin = stdin;
01035 
01036                 if ( ! yyout )
01037                         yyout = stdout;
01038 
01039                 if ( ! yy_current_buffer )
01040                         yy_current_buffer =
01041                                 yy_create_buffer( yyin, YY_BUF_SIZE );
01042 
01043                 yy_load_buffer_state();
01044                 }
01045 
01046         while ( 1 )             /* loops until end-of-file is reached */
01047                 {
01048                 yy_cp = yy_c_buf_p;
01049 
01050                 /* Support of yytext. */
01051                 *yy_cp = yy_hold_char;
01052 
01053                 /* yy_bp points to the position in yy_ch_buf of the start of
01054                  * the current run.
01055                  */
01056                 yy_bp = yy_cp;
01057 
01058                 yy_current_state = yy_start;
01059 yy_match:
01060                 do
01061                         {
01062                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
01063                         if ( yy_accept[yy_current_state] )
01064                                 {
01065                                 yy_last_accepting_state = yy_current_state;
01066                                 yy_last_accepting_cpos = yy_cp;
01067                                 }
01068                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01069                                 {
01070                                 yy_current_state = (int) yy_def[yy_current_state];
01071                                 if ( yy_current_state >= 509 )
01072                                         yy_c = yy_meta[(unsigned int) yy_c];
01073                                 }
01074                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01075                         ++yy_cp;
01076                         }
01077                 while ( yy_base[yy_current_state] != 660 );
01078 
01079 yy_find_action:
01080                 yy_act = yy_accept[yy_current_state];
01081                 if ( yy_act == 0 )
01082                         { /* have to back up */
01083                         yy_cp = yy_last_accepting_cpos;
01084                         yy_current_state = yy_last_accepting_state;
01085                         yy_act = yy_accept[yy_current_state];
01086                         }
01087 
01088                 YY_DO_BEFORE_ACTION;
01089 
01090 
01091 do_action:      /* This label is used only to access EOF actions. */
01092 
01093 
01094                 switch ( yy_act )
01095         { /* beginning of action switch */
01096                         case 0: /* must back up */
01097                         /* undo the effects of YY_DO_BEFORE_ACTION */
01098                         *yy_cp = yy_hold_char;
01099                         yy_cp = yy_last_accepting_cpos;
01100                         yy_current_state = yy_last_accepting_state;
01101                         goto yy_find_action;
01102 
01103 case 1:
01104 YY_RULE_SETUP
01105 #line 187 "cscanner.l"
01106 { llfatalbug (cstring_makeLiteral ("Comment in pre-processor output")); }
01107         YY_BREAK
01108 case 2:
01109 YY_RULE_SETUP
01110 #line 189 "cscanner.l"
01111 { 
01112                  context_saveLocation (); 
01113                  setTokLength (longUnsigned_toInt (mstring_length (yytext))); 
01114 
01115                  if (processHashIdentifier (makeIdentifier (yytext + 1)))
01116                    {
01117                      if (lastWasString)
01118                        {
01119                          ;
01120                        }
01121                      else
01122                        {
01123                          RETURN_STRING (cstring_makeLiteral ("\"\""));
01124                        }
01125                    }
01126                  else
01127                    { 
01128                      if (handleSpecial (yytext)) 
01129                        { 
01130                          setTokLength (1); 
01131                          RETURN_TOK (0); 
01132                        }
01133                    }
01134                 } 
01135         YY_BREAK
01136 case 3:
01137 YY_RULE_SETUP
01138 #line 213 "cscanner.l"
01139 { if (handleSpecial (yytext)) 
01140                     { 
01141                        setTokLength (1); RETURN_TOK (0); 
01142                      }
01143                 }
01144         YY_BREAK
01145 case 4:
01146 YY_RULE_SETUP
01147 #line 218 "cscanner.l"
01148 { setTokLength (3); RETURN_TOK (CTOK_ELIPSIS); }
01149         YY_BREAK
01150 case 5:
01151 YY_RULE_SETUP
01152 #line 219 "cscanner.l"
01153 { setTokLength (5); RETURN_TOK (BREAK); }
01154         YY_BREAK
01155 case 6:
01156 YY_RULE_SETUP
01157 #line 220 "cscanner.l"
01158 { setTokLength (4); RETURN_TOK (CASE); }
01159         YY_BREAK
01160 case 7:
01161 YY_RULE_SETUP
01162 #line 221 "cscanner.l"
01163 { setTokLength (8); RETURN_TOK (CONTINUE); }
01164         YY_BREAK
01165 case 8:
01166 YY_RULE_SETUP
01167 #line 222 "cscanner.l"
01168 { setTokLength (7); RETURN_TOK (DEFAULT); }
01169         YY_BREAK
01170 case 9:
01171 YY_RULE_SETUP
01172 #line 223 "cscanner.l"
01173 { setTokLength (2); RETURN_TOK (DO); }
01174         YY_BREAK
01175 case 10:
01176 YY_RULE_SETUP
01177 #line 224 "cscanner.l"
01178 { setTokLength (4); RETURN_TOK (CELSE); }
01179         YY_BREAK
01180 case 11:
01181 YY_RULE_SETUP
01182 #line 225 "cscanner.l"
01183 { setTokLength (3); RETURN_TOK (CFOR); }
01184         YY_BREAK
01185 case 12:
01186 YY_RULE_SETUP
01187 #line 226 "cscanner.l"
01188 { setTokLength (4); RETURN_TOK (GOTO); }
01189         YY_BREAK
01190 case 13:
01191 YY_RULE_SETUP
01192 #line 227 "cscanner.l"
01193 { setTokLength (2); RETURN_TOK (CIF); }
01194         YY_BREAK
01195 case 14:
01196 YY_RULE_SETUP
01197 #line 228 "cscanner.l"
01198 { setTokLength (6); RETURN_TOK (RETURN); }
01199         YY_BREAK
01200 case 15:
01201 YY_RULE_SETUP
01202 #line 229 "cscanner.l"
01203 { setTokLength (6); RETURN_TOK (CSIZEOF); }
01204         YY_BREAK
01205 case 16:
01206 YY_RULE_SETUP
01207 #line 230 "cscanner.l"
01208 { setTokLength (8); RETURN_TOK (COFFSETOF); }
01209         YY_BREAK
01210 case 17:
01211 YY_RULE_SETUP
01212 #line 231 "cscanner.l"
01213 { setTokLength (6); RETURN_TOK (SWITCH); }
01214         YY_BREAK
01215 case 18:
01216 YY_RULE_SETUP
01217 #line 232 "cscanner.l"
01218 { setTokLength (5); RETURN_TOK (WHILE); }
01219         YY_BREAK
01220 case 19:
01221 YY_RULE_SETUP
01222 #line 233 "cscanner.l"
01223 { setTokLength (6); RETURN_TOK (VA_ARG); }   
01224         YY_BREAK
01225 case 20:
01226 YY_RULE_SETUP
01227 #line 234 "cscanner.l"
01228 { setTokLength (6); RETURN_TOK (VA_DCL); }   
01229         YY_BREAK
01230 case 21:
01231 YY_RULE_SETUP
01232 #line 235 "cscanner.l"
01233 { 
01234                   /* gcc extension...this might not be appropriate */
01235                   setTokLength (6); RETURN_TOK (QINLINE); }
01236         YY_BREAK
01237 case 22:
01238 YY_RULE_SETUP
01239 #line 239 "cscanner.l"
01240 { setTokLength (6); RETURN_TOK (CSTRUCT); }  
01241         YY_BREAK
01242 case 23:
01243 YY_RULE_SETUP
01244 #line 240 "cscanner.l"
01245 { setTokLength (7); RETURN_TOK (CTYPEDEF); }
01246         YY_BREAK
01247 case 24:
01248 YY_RULE_SETUP
01249 #line 242 "cscanner.l"
01250 { setTokLength (5); RETURN_TOK (CUNION); }
01251         YY_BREAK
01252 case 25:
01253 YY_RULE_SETUP
01254 #line 243 "cscanner.l"
01255 { setTokLength (4); RETURN_TOK (CENUM); }
01256         YY_BREAK
01257 case 26:
01258 YY_RULE_SETUP
01259 #line 245 "cscanner.l"
01260 { setTokLength (4); RETURN_TYPE (CVOID, ctype_void); }
01261         YY_BREAK
01262 case 27:
01263 YY_RULE_SETUP
01264 #line 246 "cscanner.l"
01265 { setTokLength (3); RETURN_TYPE (CINT, ctype_int); }
01266         YY_BREAK
01267 case 28:
01268 YY_RULE_SETUP
01269 #line 247 "cscanner.l"
01270 { setTokLength (6); RETURN_TYPE (CDOUBLE, ctype_double); }
01271         YY_BREAK
01272 case 29:
01273 YY_RULE_SETUP
01274 #line 248 "cscanner.l"
01275 { setTokLength (4); RETURN_TYPE (CGCHAR, ctype_char); }
01276         YY_BREAK
01277 case 30:
01278 YY_RULE_SETUP
01279 #line 249 "cscanner.l"
01280 { setTokLength (5); RETURN_TYPE (CGFLOAT, ctype_float); }
01281         YY_BREAK
01282 case 31:
01283 YY_RULE_SETUP
01284 #line 251 "cscanner.l"
01285 { setTokLength (4); RETURN_TOK (QLONG); }
01286         YY_BREAK
01287 case 32:
01288 YY_RULE_SETUP
01289 #line 252 "cscanner.l"
01290 { setTokLength (5); RETURN_TOK (QSHORT); }
01291         YY_BREAK
01292 case 33:
01293 YY_RULE_SETUP
01294 #line 253 "cscanner.l"
01295 { setTokLength (8); RETURN_TOK (QUNSIGNED); }
01296         YY_BREAK
01297 case 34:
01298 YY_RULE_SETUP
01299 #line 254 "cscanner.l"
01300 { setTokLength (6); RETURN_TOK (QSIGNED); }
01301         YY_BREAK
01302 case 35:
01303 YY_RULE_SETUP
01304 #line 256 "cscanner.l"
01305 { setTokLength (8); RETURN_TOK (QVOLATILE); }
01306         YY_BREAK
01307 case 36:
01308 YY_RULE_SETUP
01309 #line 257 "cscanner.l"
01310 { setTokLength (5); RETURN_TOK (QCONST); }
01311         YY_BREAK
01312 /* some systems expect this! [gack!] */ 
01313 case 37:
01314 YY_RULE_SETUP
01315 #line 260 "cscanner.l"
01316 { setTokLength (7); RETURN_TOK (QCONST); }
01317         YY_BREAK
01318 case 38:
01319 YY_RULE_SETUP
01320 #line 262 "cscanner.l"
01321 { setTokLength (6); RETURN_TOK (QEXTERN); }
01322         YY_BREAK
01323 case 39:
01324 YY_RULE_SETUP
01325 #line 263 "cscanner.l"
01326 { setTokLength (4); RETURN_TOK (QAUTO); }
01327         YY_BREAK
01328 case 40:
01329 YY_RULE_SETUP
01330 #line 264 "cscanner.l"
01331 { setTokLength (8); RETURN_TOK (QREGISTER); }
01332         YY_BREAK
01333 case 41:
01334 YY_RULE_SETUP
01335 #line 265 "cscanner.l"
01336 { setTokLength (6); RETURN_TOK (QSTATIC); }
01337         YY_BREAK
01338 case 42:
01339 YY_RULE_SETUP
01340 #line 267 "cscanner.l"
01341 { RETURN_EXPR (processString ()); }
01342         YY_BREAK
01343 case 43:
01344 YY_RULE_SETUP
01345 #line 268 "cscanner.l"
01346 { return (processSpec (QOUT)); }
01347         YY_BREAK
01348 case 44:
01349 YY_RULE_SETUP
01350 #line 269 "cscanner.l"
01351 { return (processSpec (QIN)); }
01352         YY_BREAK
01353 case 45:
01354 YY_RULE_SETUP
01355 #line 270 "cscanner.l"
01356 { return (processSpec (QPARTIAL)); }
01357         YY_BREAK
01358 case 46:
01359 YY_RULE_SETUP
01360 #line 271 "cscanner.l"
01361 { return (processSpec (QSPECIAL)); }
01362         YY_BREAK
01363 case 47:
01364 YY_RULE_SETUP
01365 #line 272 "cscanner.l"
01366 { return (processSpec (QANYTYPE)); }
01367         YY_BREAK
01368 case 48:
01369 YY_RULE_SETUP
01370 #line 273 "cscanner.l"
01371 { return (processSpec (QINTEGRALTYPE)); }
01372         YY_BREAK
01373 case 49:
01374 YY_RULE_SETUP
01375 #line 274 "cscanner.l"
01376 { return (processSpec (QUNSIGNEDINTEGRALTYPE)); }
01377         YY_BREAK
01378 case 50:
01379 YY_RULE_SETUP
01380 #line 275 "cscanner.l"
01381 { return (processSpec (QSIGNEDINTEGRALTYPE)); }
01382         YY_BREAK
01383 case 51:
01384 YY_RULE_SETUP
01385 #line 276 "cscanner.l"
01386 { return (processSpec (QKEEP)); }
01387         YY_BREAK
01388 case 52:
01389 YY_RULE_SETUP
01390 #line 277 "cscanner.l"
01391 { return (processSpec (QNULL)); } 
01392         YY_BREAK
01393 case 53:
01394 YY_RULE_SETUP
01395 #line 278 "cscanner.l"
01396 { return (processSpec (QNOTNULL)); } 
01397         YY_BREAK
01398 case 54:
01399 YY_RULE_SETUP
01400 #line 279 "cscanner.l"
01401 { return (processSpec (QISNULL)); } 
01402         YY_BREAK
01403 case 55:
01404 YY_RULE_SETUP
01405 #line 280 "cscanner.l"
01406 { return (processSpec (QTRUENULL)); } 
01407         YY_BREAK
01408 case 56:
01409 YY_RULE_SETUP
01410 #line 281 "cscanner.l"
01411 { return (processSpec (QFALSENULL)); } 
01412         YY_BREAK
01413 case 57:
01414 YY_RULE_SETUP
01415 #line 282 "cscanner.l"
01416 { return (processSpec (QRELNULL)); }
01417         YY_BREAK
01418 case 58:
01419 YY_RULE_SETUP
01420 #line 283 "cscanner.l"
01421 { return (processSpec (QRELDEF)); }
01422         YY_BREAK
01423 case 59:
01424 YY_RULE_SETUP
01425 #line 284 "cscanner.l"
01426 { return (processSpec (QEXPOSED)); }
01427         YY_BREAK
01428 case 60:
01429 YY_RULE_SETUP
01430 #line 285 "cscanner.l"
01431 { return (processSpec (QNEWREF)); }
01432         YY_BREAK
01433 case 61:
01434 YY_RULE_SETUP
01435 #line 286 "cscanner.l"
01436 { return (processSpec (QTEMPREF)); }
01437         YY_BREAK
01438 case 62:
01439 YY_RULE_SETUP
01440 #line 287 "cscanner.l"
01441 { return (processSpec (QKILLREF)); }
01442         YY_BREAK
01443 case 63:
01444 YY_RULE_SETUP
01445 #line 288 "cscanner.l"
01446 { return (processSpec (QREFCOUNTED)); }
01447         YY_BREAK
01448 case 64:
01449 YY_RULE_SETUP
01450 #line 289 "cscanner.l"
01451 { return (processSpec (QCHECKED)); }
01452         YY_BREAK
01453 case 65:
01454 YY_RULE_SETUP
01455 #line 290 "cscanner.l"
01456 { return (processSpec (QCHECKMOD)); }
01457         YY_BREAK
01458 case 66:
01459 YY_RULE_SETUP
01460 #line 291 "cscanner.l"
01461 { return (processSpec (QCHECKEDSTRICT)); }
01462         YY_BREAK
01463 case 67:
01464 YY_RULE_SETUP
01465 #line 292 "cscanner.l"
01466 { return (processSpec (QUNCHECKED)); }
01467         YY_BREAK
01468 case 68:
01469 YY_RULE_SETUP
01470 #line 293 "cscanner.l"
01471 { return (processSpec (QONLY)); }
01472         YY_BREAK
01473 case 69:
01474 YY_RULE_SETUP
01475 #line 294 "cscanner.l"
01476 { return (processSpec (QOWNED)); }
01477         YY_BREAK
01478 case 70:
01479 YY_RULE_SETUP
01480 #line 295 "cscanner.l"
01481 { return (processSpec (QOBSERVER)); }
01482         YY_BREAK
01483 case 71:
01484 YY_RULE_SETUP
01485 #line 296 "cscanner.l"
01486 { return (processSpec (QDEPENDENT)); }
01487         YY_BREAK
01488 case 72:
01489 YY_RULE_SETUP
01490 #line 297 "cscanner.l"
01491 { return (processSpec (QUNUSED)); }
01492         YY_BREAK
01493 case 73:
01494 YY_RULE_SETUP
01495 #line 298 "cscanner.l"
01496 { return (processSpec (QEXTERNAL)); }
01497         YY_BREAK
01498 case 74:
01499 YY_RULE_SETUP
01500 #line 299 "cscanner.l"
01501 { return (processSpec (QSEF)); }
01502         YY_BREAK
01503 case 75:
01504 YY_RULE_SETUP
01505 #line 300 "cscanner.l"
01506 { return (processSpec (QSHARED)); }
01507         YY_BREAK
01508 case 76:
01509 YY_RULE_SETUP
01510 #line 301 "cscanner.l"
01511 { return (processSpec (QYIELD)); }
01512         YY_BREAK
01513 case 77:
01514 YY_RULE_SETUP
01515 #line 302 "cscanner.l"
01516 { return (processSpec (QUNDEF)); }
01517         YY_BREAK
01518 case 78:
01519 YY_RULE_SETUP
01520 #line 303 "cscanner.l"
01521 { return (processSpec (QKILLED)); }
01522         YY_BREAK
01523 case 79:
01524 YY_RULE_SETUP
01525 #line 304 "cscanner.l"
01526 { int tok; 
01527                               context_saveLocation (); 
01528                               setTokLength (longUnsigned_toInt (mstring_length (yytext))); 
01529                               tok = processIdentifier (makeIdentifier (yytext)); 
01530                               if (tok != BADTOK)
01531                                 {
01532                                   return (tok);
01533                                 }
01534                             }
01535         YY_BREAK
01536 case 80:
01537 YY_RULE_SETUP
01538 #line 313 "cscanner.l"
01539 { setTokLengthT (mstring_length (yytext)); 
01540                           RETURN_INT (ctype_int, processHex ());  /* evs 2000-05-17 was ctype_uint */
01541                         }
01542         YY_BREAK
01543 case 81:
01544 YY_RULE_SETUP
01545 #line 316 "cscanner.l"
01546 { setTokLengthT (mstring_length (yytext)); 
01547                           RETURN_INT (ctype_lint, processHex ()); }
01548         YY_BREAK
01549 case 82:
01550 YY_RULE_SETUP
01551 #line 318 "cscanner.l"
01552 { setTokLengthT (mstring_length (yytext)); 
01553                           RETURN_INT (ctype_llint, processHex ()); }
01554         YY_BREAK
01555 case 83:
01556 YY_RULE_SETUP
01557 #line 320 "cscanner.l"
01558 { setTokLengthT (mstring_length (yytext)); 
01559                           RETURN_INT (ctype_uint, processHex ()); }
01560         YY_BREAK
01561 case 84:
01562 YY_RULE_SETUP
01563 #line 322 "cscanner.l"
01564 { setTokLengthT (mstring_length (yytext)); 
01565                           RETURN_INT (ctype_ulint, processHex ()); }
01566         YY_BREAK
01567 case 85:
01568 YY_RULE_SETUP
01569 #line 324 "cscanner.l"
01570 { setTokLengthT (mstring_length (yytext)); 
01571                           RETURN_INT (ctype_ullint, processHex ()); }
01572         YY_BREAK
01573 case 86:
01574 YY_RULE_SETUP
01575 #line 326 "cscanner.l"
01576 { setTokLengthT (mstring_length (yytext)); 
01577                           RETURN_INT (ctype_ullint, processHex ()); }
01578         YY_BREAK
01579 case 87:
01580 YY_RULE_SETUP
01581 #line 328 "cscanner.l"
01582 { setTokLengthT (mstring_length (yytext)); 
01583                           RETURN_INT (ctype_int, processOctal ()); } 
01584         YY_BREAK
01585 case 88:
01586 YY_RULE_SETUP
01587 #line 330 "cscanner.l"
01588 { setTokLengthT (mstring_length (yytext)); 
01589                           RETURN_INT (ctype_uint, processOctal ()); } 
01590         YY_BREAK
01591 case 89:
01592 YY_RULE_SETUP
01593 #line 332 "cscanner.l"
01594 { setTokLengthT (mstring_length (yytext)); 
01595                           RETURN_INT (ctype_lint, processOctal ()); } 
01596         YY_BREAK
01597 case 90:
01598 YY_RULE_SETUP
01599 #line 334 "cscanner.l"
01600 { setTokLengthT (mstring_length (yytext)); 
01601                           RETURN_INT (ctype_llint, processOctal ()); } 
01602         YY_BREAK
01603 case 91:
01604 YY_RULE_SETUP
01605 #line 336 "cscanner.l"
01606 { setTokLengthT (mstring_length (yytext)); 
01607                           RETURN_INT (ctype_ulint, processOctal ()); } 
01608         YY_BREAK
01609 case 92:
01610 YY_RULE_SETUP
01611 #line 338 "cscanner.l"
01612 { setTokLengthT (mstring_length (yytext)); 
01613                           RETURN_INT (ctype_ullint, processOctal ()); } 
01614         YY_BREAK
01615 case 93:
01616 YY_RULE_SETUP
01617 #line 340 "cscanner.l"
01618 { setTokLengthT (mstring_length (yytext)); 
01619                           RETURN_INT (ctype_ullint, processOctal ()); } 
01620         YY_BREAK
01621 case 94:
01622 YY_RULE_SETUP
01623 #line 342 "cscanner.l"
01624 { setTokLengthT (mstring_length (yytext)); 
01625                          RETURN_INT (ctype_int, processDec ()); } 
01626         YY_BREAK
01627 case 95:
01628 YY_RULE_SETUP
01629 #line 344 "cscanner.l"
01630 { setTokLengthT (mstring_length (yytext)); 
01631                          RETURN_INT (ctype_uint, processDec ()); } 
01632         YY_BREAK
01633 case 96:
01634 YY_RULE_SETUP
01635 #line 346 "cscanner.l"
01636 { setTokLengthT (mstring_length (yytext)); 
01637                          RETURN_INT (ctype_lint, processDec ()); } 
01638         YY_BREAK
01639 case 97:
01640 YY_RULE_SETUP
01641 #line 348 "cscanner.l"
01642 { setTokLengthT (mstring_length (yytext)); 
01643                          RETURN_INT (ctype_llint, processDec ()); } 
01644         YY_BREAK
01645 case 98:
01646 YY_RULE_SETUP
01647 #line 350 "cscanner.l"
01648 { setTokLengthT (mstring_length (yytext)); 
01649                          RETURN_INT (ctype_ulint, processDec ()); } 
01650         YY_BREAK
01651 case 99:
01652 YY_RULE_SETUP
01653 #line 352 "cscanner.l"
01654 { setTokLengthT (mstring_length (yytext)); 
01655                          RETURN_INT (ctype_ullint, processDec ()); } 
01656         YY_BREAK
01657 case 100:
01658 YY_RULE_SETUP
01659 #line 354 "cscanner.l"
01660 { setTokLengthT (mstring_length (yytext)); 
01661                          RETURN_INT (ctype_ullint, processDec ()); } 
01662         YY_BREAK
01663 case 101:
01664 YY_RULE_SETUP
01665 #line 356 "cscanner.l"
01666 { setTokLengthT (mstring_length (yytext)); 
01667                          RETURN_CHAR (processChar ()); }
01668         YY_BREAK
01669 case 102:
01670 YY_RULE_SETUP
01671 #line 358 "cscanner.l"
01672 { setTokLengthT (mstring_length (yytext)); 
01673                          RETURN_FLOAT (ctype_float, processFloat ()); }
01674         YY_BREAK
01675 case 103:
01676 YY_RULE_SETUP
01677 #line 360 "cscanner.l"
01678 { setTokLengthT (mstring_length (yytext)); 
01679                          RETURN_FLOAT (ctype_ldouble, processFloat ()); }
01680         YY_BREAK
01681 case 104:
01682 YY_RULE_SETUP
01683 #line 362 "cscanner.l"
01684 { setTokLengthT (mstring_length (yytext)); 
01685                          RETURN_FLOAT (ctype_double, processFloat ()); }
01686         YY_BREAK
01687 case 105:
01688 YY_RULE_SETUP
01689 #line 365 "cscanner.l"
01690 { setTokLengthT (mstring_length (yytext)); 
01691                                 RETURN_FLOAT (ctype_float, processFloat ()); }
01692         YY_BREAK
01693 case 106:
01694 YY_RULE_SETUP
01695 #line 367 "cscanner.l"
01696 { setTokLengthT (mstring_length (yytext)); 
01697                                 RETURN_FLOAT (ctype_ldouble, processFloat ()); }
01698         YY_BREAK
01699 case 107:
01700 YY_RULE_SETUP
01701 #line 369 "cscanner.l"
01702 { setTokLengthT (mstring_length (yytext)); 
01703                                 RETURN_FLOAT (ctype_double, processFloat ()); }
01704         YY_BREAK
01705 case 108:
01706 YY_RULE_SETUP
01707 #line 372 "cscanner.l"
01708 { setTokLengthT (mstring_length (yytext)); 
01709                                   RETURN_FLOAT (ctype_float, processFloat ()); }
01710         YY_BREAK
01711 case 109:
01712 YY_RULE_SETUP
01713 #line 374 "cscanner.l"
01714 { setTokLengthT (mstring_length (yytext)); 
01715                                   RETURN_FLOAT (ctype_ldouble, processFloat ()); }
01716         YY_BREAK
01717 case 110:
01718 YY_RULE_SETUP
01719 #line 376 "cscanner.l"
01720 { setTokLengthT (mstring_length (yytext)); 
01721                                   RETURN_FLOAT (ctype_double, processFloat ()); }
01722         YY_BREAK
01723 case 111:
01724 YY_RULE_SETUP
01725 #line 379 "cscanner.l"
01726 { setTokLength (3); RETURN_TOK (RIGHT_ASSIGN); }
01727         YY_BREAK
01728 case 112:
01729 YY_RULE_SETUP
01730 #line 380 "cscanner.l"
01731 { setTokLength (3); RETURN_TOK (LEFT_ASSIGN); }
01732         YY_BREAK
01733 case 113:
01734 YY_RULE_SETUP
01735 #line 381 "cscanner.l"
01736 { setTokLength (2); RETURN_TOK (ADD_ASSIGN); }
01737         YY_BREAK
01738 case 114:
01739 YY_RULE_SETUP
01740 #line 382 "cscanner.l"
01741 { setTokLength (2); RETURN_TOK (SUB_ASSIGN); }
01742         YY_BREAK
01743 case 115:
01744 YY_RULE_SETUP
01745 #line 383 "cscanner.l"
01746 { setTokLength (2); RETURN_TOK (MUL_ASSIGN); }
01747         YY_BREAK
01748 case 116:
01749 YY_RULE_SETUP
01750 #line 384 "cscanner.l"
01751 { setTokLength (2); RETURN_TOK (DIV_ASSIGN); }
01752         YY_BREAK
01753 case 117:
01754 YY_RULE_SETUP
01755 #line 385 "cscanner.l"
01756 { setTokLength (2); RETURN_TOK (MOD_ASSIGN); }
01757         YY_BREAK
01758 case 118:
01759 YY_RULE_SETUP
01760 #line 386 "cscanner.l"
01761 { setTokLength (2); RETURN_TOK (AND_ASSIGN); }
01762         YY_BREAK
01763 case 119:
01764 YY_RULE_SETUP
01765 #line 387 "cscanner.l"
01766 { setTokLength (2); RETURN_TOK (XOR_ASSIGN); }
01767         YY_BREAK
01768 case 120:
01769 YY_RULE_SETUP
01770 #line 388 "cscanner.l"
01771 { setTokLength (2); RETURN_TOK (OR_ASSIGN); }
01772         YY_BREAK
01773 case 121:
01774 YY_RULE_SETUP
01775 #line 389 "cscanner.l"
01776 { setTokLength (2); RETURN_TOK (RIGHT_OP); }
01777         YY_BREAK
01778 case 122:
01779 YY_RULE_SETUP
01780 #line 390 "cscanner.l"
01781 { setTokLength (2); RETURN_TOK (LEFT_OP); }
01782         YY_BREAK
01783 case 123:
01784 YY_RULE_SETUP
01785 #line 391 "cscanner.l"
01786 { setTokLength (2); RETURN_TOK (INC_OP); }
01787         YY_BREAK
01788 case 124:
01789 YY_RULE_SETUP
01790 #line 392 "cscanner.l"
01791 { setTokLength (2); RETURN_TOK (DEC_OP); }
01792         YY_BREAK
01793 case 125:
01794 YY_RULE_SETUP
01795 #line 393 "cscanner.l"
01796 { setTokLength (2); RETURN_TOK (ARROW_OP); }
01797         YY_BREAK
01798 case 126:
01799 YY_RULE_SETUP
01800 #line 394 "cscanner.l"
01801 { setTokLength (2); RETURN_TOK (AND_OP); }
01802         YY_BREAK
01803 case 127:
01804 YY_RULE_SETUP
01805 #line 395 "cscanner.l"
01806 { setTokLength (2); RETURN_TOK (OR_OP); }
01807         YY_BREAK
01808 case 128:
01809 YY_RULE_SETUP
01810 #line 396 "cscanner.l"
01811 { setTokLength (2); RETURN_TOK (LE_OP); }
01812         YY_BREAK
01813 case 129:
01814 YY_RULE_SETUP
01815 #line 397 "cscanner.l"
01816 { setTokLength (2); RETURN_TOK (GE_OP); }
01817         YY_BREAK
01818 case 130:
01819 YY_RULE_SETUP
01820 #line 398 "cscanner.l"
01821 { setTokLength (2); RETURN_TOK (EQ_OP); }
01822         YY_BREAK
01823 case 131:
01824 YY_RULE_SETUP
01825 #line 399 "cscanner.l"
01826 { setTokLength (2); RETURN_TOK (NE_OP); }
01827         YY_BREAK
01828 case 132:
01829 YY_RULE_SETUP
01830 #line 400 "cscanner.l"
01831 { setTokLength (1); RETURN_TOK (TSEMI); }
01832         YY_BREAK
01833 case 133:
01834 YY_RULE_SETUP
01835 #line 401 "cscanner.l"
01836 { setTokLength (1); RETURN_TOK (TLBRACE); }
01837         YY_BREAK
01838 case 134:
01839 YY_RULE_SETUP
01840 #line 402 "cscanner.l"
01841 { setTokLength (1); RETURN_TOK (TRBRACE); }
01842         YY_BREAK
01843 case 135:
01844 YY_RULE_SETUP
01845 #line 403 "cscanner.l"
01846 { setTokLength (1); RETURN_TOK (TCOMMA); }
01847         YY_BREAK
01848 case 136:
01849 YY_RULE_SETUP
01850 #line 404 "cscanner.l"
01851 { setTokLength (1); RETURN_TOK (TCOLON); }
01852         YY_BREAK
01853 case 137:
01854 YY_RULE_SETUP
01855 #line 405 "cscanner.l"
01856 { setTokLength (1); RETURN_TOK (TASSIGN); }
01857         YY_BREAK
01858 case 138:
01859 YY_RULE_SETUP
01860 #line 406 "cscanner.l"
01861 { setTokLength (1); RETURN_TOK (TLPAREN); }
01862         YY_BREAK
01863 case 139:
01864 YY_RULE_SETUP
01865 #line 407 "cscanner.l"
01866 { setTokLength (1); RETURN_TOK (TRPAREN); }
01867         YY_BREAK
01868 case 140:
01869 YY_RULE_SETUP
01870 #line 408 "cscanner.l"
01871 { setTokLength (1); RETURN_TOK (TLSQBR); }
01872         YY_BREAK
01873 case 141:
01874 YY_RULE_SETUP
01875 #line 409 "cscanner.l"
01876 { setTokLength (1); RETURN_TOK (TRSQBR); }
01877         YY_BREAK
01878 case 142:
01879 YY_RULE_SETUP
01880 #line 410 "cscanner.l"
01881 { setTokLength (1); RETURN_TOK (TDOT); }
01882         YY_BREAK
01883 case 143:
01884 YY_RULE_SETUP
01885 #line 411 "cscanner.l"
01886 { setTokLength (1); RETURN_TOK (TAMPERSAND); }
01887         YY_BREAK
01888 case 144:
01889 YY_RULE_SETUP
01890 #line 412 "cscanner.l"
01891 { setTokLength (1); RETURN_TOK (TEXCL); }
01892         YY_BREAK
01893 case 145:
01894 YY_RULE_SETUP
01895 #line 415 "cscanner.l"
01896 { setTokLength (1); RETURN_TOK (TTILDE); }
01897         YY_BREAK
01898 case 146:
01899 YY_RULE_SETUP
01900 #line 416 "cscanner.l"
01901 { setTokLength (1); RETURN_TOK (TMINUS); }
01902         YY_BREAK
01903 case 147:
01904 YY_RULE_SETUP
01905 #line 417 "cscanner.l"
01906 { setTokLength (1); RETURN_TOK (TPLUS); }
01907         YY_BREAK
01908 case 148:
01909 YY_RULE_SETUP
01910 #line 418 "cscanner.l"
01911 { setTokLength (1); RETURN_TOK (TMULT); }
01912         YY_BREAK
01913 case 149:
01914 YY_RULE_SETUP
01915 #line 419 "cscanner.l"
01916 { setTokLength (1); RETURN_TOK (TDIV); }
01917         YY_BREAK
01918 case 150:
01919 YY_RULE_SETUP
01920 #line 420 "cscanner.l"
01921 { setTokLength (1); RETURN_TOK (TPERCENT); }
01922         YY_BREAK
01923 case 151:
01924 YY_RULE_SETUP
01925 #line 421 "cscanner.l"
01926 { setTokLength (1); RETURN_TOK (TLT); }
01927         YY_BREAK
01928 case 152:
01929 YY_RULE_SETUP
01930 #line 422 "cscanner.l"
01931 { setTokLength (1); RETURN_TOK (TGT); }
01932         YY_BREAK
01933 case 153:
01934 YY_RULE_SETUP
01935 #line 423 "cscanner.l"
01936 { setTokLength (1); RETURN_TOK (TCIRC); }
01937         YY_BREAK
01938 case 154:
01939 YY_RULE_SETUP
01940 #line 424 "cscanner.l"
01941 { setTokLength (1); RETURN_TOK (TBAR); }
01942         YY_BREAK
01943 case 155:
01944 YY_RULE_SETUP
01945 #line 425 "cscanner.l"
01946 { setTokLength (1); RETURN_TOK (TQUEST); }
01947         YY_BREAK
01948 case 156:
01949 YY_RULE_SETUP
01950 #line 427 "cscanner.l"
01951 { incColumn (); }
01952         YY_BREAK
01953 case 157:
01954 YY_RULE_SETUP
01955 #line 428 "cscanner.l"
01956 { context_incLineno ();
01957                   if (continueLine)
01958                     {
01959                       continueLine = FALSE;
01960                     }
01961                  else 
01962                    {
01963                      if (context_inMacro ())
01964                        {
01965                          /* Don't use RETURN_TOK */
01966                          yylval.tok = lltok_create (TENDMACRO, g_currentloc);
01967                          lastWasString = FALSE;
01968                          return (TENDMACRO);
01969                        }  
01970                    }
01971                 }
01972         YY_BREAK
01973 case 158:
01974 YY_RULE_SETUP
01975 #line 444 "cscanner.l"
01976 { setTokLength (6); 
01977                   
01978                   if (processMacro ()) {
01979                     if (context_inIterDef ()) 
01980                       { 
01981                         RETURN_TOK (LLMACROITER); 
01982                       }
01983                     if (context_inIterEnd ())
01984                       {
01985                         RETURN_TOK (LLMACROEND); 
01986                       }
01987                     if (context_inMacro ())
01988                       {
01989                         RETURN_TOK (LLMACRO); 
01990                       }
01991                   }
01992                 }
01993         YY_BREAK
01994 case 159:
01995 YY_RULE_SETUP
01996 #line 461 "cscanner.l"
01997 { if (context_inHeader () || context_inFunction ())
01998                     { 
01999                       handleMacro ();
02000                     }
02001                   else
02002                     {
02003                       int nspchar = ninput ();
02004                       int nspaces;
02005 
02006                       /* 
02007                       ** This is a hack to get the column number correct.
02008                       */
02009 
02010                       llassert (nspchar >= '0' && nspchar <= '9');
02011                       
02012                       nspaces = nspchar - '0';
02013 
02014                       setTokLength (5 + nspaces); 
02015                       
02016                       if (processMacro ()) 
02017                         {
02018                           if (context_inIterDef ()) 
02019                             {
02020                               RETURN_TOK (LLMACROITER); 
02021                             }
02022                           if (context_inIterEnd ())
02023                             {
02024                               RETURN_TOK (LLMACROEND); 
02025                             }
02026                           if (context_inMacro ())
02027                             { 
02028                               RETURN_TOK (LLMACRO); 
02029                             }
02030                         }
02031                     }
02032                 }
02033         YY_BREAK
02034 case 160:
02035 YY_RULE_SETUP
02036 #line 497 "cscanner.l"
02037 { setTokLength (4); lldiagmsg (ctype_unparseTable ()); }
02038         YY_BREAK
02039 case 161:
02040 YY_RULE_SETUP
02041 #line 498 "cscanner.l"
02042 { setTokLength (3); 
02043                   lldiagmsg (message ("%q: *** marker ***", fileloc_unparse (g_currentloc)));
02044                 }
02045         YY_BREAK
02046 case 162:
02047 YY_RULE_SETUP
02048 #line 501 "cscanner.l"
02049 { setTokLength (3); usymtab_printLocal (); }
02050         YY_BREAK
02051 case 163:
02052 YY_RULE_SETUP
02053 #line 502 "cscanner.l"
02054 { setTokLength (3); lldiagmsg (usymtab_unparseAliases ()); }
02055         YY_BREAK
02056 case 164:
02057 YY_RULE_SETUP
02058 #line 503 "cscanner.l"
02059 { setTokLength (3); lldiagmsg (context_unparse ()); }
02060         YY_BREAK
02061 case 165:
02062 YY_RULE_SETUP
02063 #line 504 "cscanner.l"
02064 { setTokLength (3); lldiagmsg (context_unparseClauses ()); }
02065         YY_BREAK
02066 case 166:
02067 YY_RULE_SETUP
02068 #line 505 "cscanner.l"
02069 { setTokLength (3); usymtab_printGuards (); }
02070         YY_BREAK
02071 case 167:
02072 YY_RULE_SETUP
02073 #line 506 "cscanner.l"
02074 { setTokLength (3); usymtab_printOut (); }
02075         YY_BREAK
02076 case 168:
02077 YY_RULE_SETUP
02078 #line 507 "cscanner.l"
02079 { setTokLength (3); usymtab_printAll (); }
02080         YY_BREAK
02081 case 169:
02082 YY_RULE_SETUP
02083 #line 508 "cscanner.l"
02084 { setTokLength (3); usymtab_printComplete (); }
02085         YY_BREAK
02086 case 170:
02087 YY_RULE_SETUP
02088 #line 509 "cscanner.l"
02089 { setTokLength (3); usymtab_printTypes (); }
02090         YY_BREAK
02091 case 171:
02092 YY_RULE_SETUP
02093 #line 510 "cscanner.l"
02094 { setTokLength (3); lldiagmsg (usymtab_unparseStack ()); }
02095         YY_BREAK
02096 case 172:
02097 YY_RULE_SETUP
02098 #line 511 "cscanner.l"
02099 { setTokLength (3); 
02100                   lldiagmsg (message ("Can modify: %q", 
02101                                   sRefSet_unparse (context_modList ()))); 
02102                 }
02103         YY_BREAK
02104 case 173:
02105 YY_RULE_SETUP
02106 #line 515 "cscanner.l"
02107 { /* BEFORE_COMMENT_MARKER */
02108                   int tok; 
02109                   incColumn (); incColumn ();
02110                   tok = handleLlSpecial (); 
02111                   if (tok != BADTOK)
02112                     {
02113                       RETURN_TOK (tok); 
02114                     }
02115                 }
02116         YY_BREAK
02117 case 174:
02118 YY_RULE_SETUP
02119 #line 524 "cscanner.l"
02120 { /* AFTER_COMMENT_MARKER */ 
02121                   setTokLength (2);
02122                   inSpecPart = FALSE;
02123                   RETURN_TOK (QENDMACRO); }
02124         YY_BREAK
02125 case 175:
02126 YY_RULE_SETUP
02127 #line 528 "cscanner.l"
02128 { incColumn (); continueLine = TRUE; }
02129         YY_BREAK
02130 case 176:
02131 YY_RULE_SETUP
02132 #line 529 "cscanner.l"
02133 { incColumn (); 
02134                   voptgenerror
02135                     (FLG_SYNTAX, 
02136                      message ("Invalid character (ascii: %d), skipping character",
02137                               (int)(*yytext)),
02138                      g_currentloc);
02139                 }
02140         YY_BREAK
02141 case 177:
02142 YY_RULE_SETUP
02143 #line 536 "cscanner.l"
02144 ECHO;
02145         YY_BREAK
02146 #line 2147 "lex.yy.c"
02147 case YY_STATE_EOF(INITIAL):
02148         yyterminate();
02149 
02150         case YY_END_OF_BUFFER:
02151                 {
02152                 /* Amount of text matched not including the EOB char. */
02153                 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
02154 
02155                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
02156                 *yy_cp = yy_hold_char;
02157                 YY_RESTORE_YY_MORE_OFFSET
02158 
02159                 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
02160                         {
02161                         /* We're scanning a new file or input source.  It's
02162                          * possible that this happened because the user
02163                          * just pointed yyin at a new source and called
02164                          * yylex().  If so, then we have to assure
02165                          * consistency between yy_current_buffer and our
02166                          * globals.  Here is the right place to do so, because
02167                          * this is the first action (other than possibly a
02168                          * back-up) that will match for the new input source.
02169                          */
02170                         yy_n_chars = yy_current_buffer->yy_n_chars;
02171                         yy_current_buffer->yy_input_file = yyin;
02172                         yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
02173                         }
02174 
02175                 /* Note that here we test for yy_c_buf_p "<=" to the position
02176                  * of the first EOB in the buffer, since yy_c_buf_p will
02177                  * already have been incremented past the NUL character
02178                  * (since all states make transitions on EOB to the
02179                  * end-of-buffer state).  Contrast this with the test
02180                  * in input().
02181                  */
02182                 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
02183                         { /* This was really a NUL. */
02184                         yy_state_type yy_next_state;
02185 
02186                         yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
02187 
02188                         yy_current_state = yy_get_previous_state();
02189 
02190                         /* Okay, we're now positioned to make the NUL
02191                          * transition.  We couldn't have
02192                          * yy_get_previous_state() go ahead and do it
02193                          * for us because it doesn't know how to deal
02194                          * with the possibility of jamming (and we don't
02195                          * want to build jamming into it because then it
02196                          * will run more slowly).
02197                          */
02198 
02199                         yy_next_state = yy_try_NUL_trans( yy_current_state );
02200 
02201                         yy_bp = yytext_ptr + YY_MORE_ADJ;
02202 
02203                         if ( yy_next_state )
02204                                 {
02205                                 /* Consume the NUL. */
02206                                 yy_cp = ++yy_c_buf_p;
02207                                 yy_current_state = yy_next_state;
02208                                 goto yy_match;
02209                                 }
02210 
02211                         else
02212                                 {
02213                                 yy_cp = yy_c_buf_p;
02214                                 goto yy_find_action;
02215                                 }
02216                         }
02217 
02218                 else switch ( yy_get_next_buffer() )
02219                         {
02220                         case EOB_ACT_END_OF_FILE:
02221                                 {
02222                                 yy_did_buffer_switch_on_eof = 0;
02223 
02224                                 if ( yywrap() )
02225                                         {
02226                                         /* Note: because we've taken care in
02227                                          * yy_get_next_buffer() to have set up
02228                                          * yytext, we can now set up
02229                                          * yy_c_buf_p so that if some total
02230                                          * hoser (like flex itself) wants to
02231                                          * call the scanner after we return the
02232                                          * YY_NULL, it'll still work - another
02233                                          * YY_NULL will get returned.
02234                                          */
02235                                         yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
02236 
02237                                         yy_act = YY_STATE_EOF(YY_START);
02238                                         goto do_action;
02239                                         }
02240 
02241                                 else
02242                                         {
02243                                         if ( ! yy_did_buffer_switch_on_eof )
02244                                                 YY_NEW_FILE;
02245                                         }
02246                                 break;
02247                                 }
02248 
02249                         case EOB_ACT_CONTINUE_SCAN:
02250                                 yy_c_buf_p =
02251                                         yytext_ptr + yy_amount_of_matched_text;
02252 
02253                                 yy_current_state = yy_get_previous_state();
02254 
02255                                 yy_cp = yy_c_buf_p;
02256                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
02257                                 goto yy_match;
02258 
02259                         case EOB_ACT_LAST_MATCH:
02260                                 yy_c_buf_p =
02261                                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
02262 
02263                                 yy_current_state = yy_get_previous_state();
02264 
02265                                 yy_cp = yy_c_buf_p;
02266                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
02267                                 goto yy_find_action;
02268                         }
02269                 break;
02270                 }
02271 
02272         default:
02273                 YY_FATAL_ERROR(
02274                         "fatal flex scanner internal error--no action found" );
02275         } /* end of action switch */
02276                 } /* end of scanning one token */
02277         } /* end of yylex */
02278 
02279 
02280 /* yy_get_next_buffer - try to read in a new buffer
02281  *
02282  * Returns a code representing an action:
02283  *      EOB_ACT_LAST_MATCH -
02284  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
02285  *      EOB_ACT_END_OF_FILE - end of file
02286  */
02287 
02288 static int yy_get_next_buffer()
02289         {
02290         register char *dest = yy_current_buffer->yy_ch_buf;
02291         register char *source = yytext_ptr;
02292         register int number_to_move, i;
02293         int ret_val;
02294 
02295         if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
02296                 YY_FATAL_ERROR(
02297                 "fatal flex scanner internal error--end of buffer missed" );
02298 
02299         if ( yy_current_buffer->yy_fill_buffer == 0 )
02300                 { /* Don't try to fill the buffer, so this is an EOF. */
02301                 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
02302                         {
02303                         /* We matched a single character, the EOB, so
02304                          * treat this as a final EOF.
02305                          */
02306                         return EOB_ACT_END_OF_FILE;
02307                         }
02308 
02309                 else
02310                         {
02311                         /* We matched some text prior to the EOB, first
02312                          * process it.
02313                          */
02314                         return EOB_ACT_LAST_MATCH;
02315                         }
02316                 }
02317 
02318         /* Try to read more data. */
02319 
02320         /* First move last chars to start of buffer. */
02321         number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
02322 
02323         for ( i = 0; i < number_to_move; ++i )
02324                 *(dest++) = *(source++);
02325 
02326         if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
02327                 /* don't do the read, it's not guaranteed to return an EOF,
02328                  * just force an EOF
02329                  */
02330                 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
02331 
02332         else
02333                 {
02334                 int num_to_read =
02335                         yy_current_buffer->yy_buf_size - number_to_move - 1;
02336 
02337                 while ( num_to_read <= 0 )
02338                         { /* Not enough room in the buffer - grow it. */
02339 #ifdef YY_USES_REJECT
02340                         YY_FATAL_ERROR(
02341 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
02342 #else
02343 
02344                         /* just a shorter name for the current buffer */
02345                         YY_BUFFER_STATE b = yy_current_buffer;
02346 
02347                         int yy_c_buf_p_offset =
02348                                 (int) (yy_c_buf_p - b->yy_ch_buf);
02349 
02350                         if ( b->yy_is_our_buffer )
02351                                 {
02352                                 int new_size = b->yy_buf_size * 2;
02353 
02354                                 if ( new_size <= 0 )
02355                                         b->yy_buf_size += b->yy_buf_size / 8;
02356                                 else
02357                                         b->yy_buf_size *= 2;
02358 
02359                                 b->yy_ch_buf = (char *)
02360                                         /* Include room in for 2 EOB chars. */
02361                                         yy_flex_realloc( (void *) b->yy_ch_buf,
02362                                                          b->yy_buf_size + 2 );
02363                                 }
02364                         else
02365                                 /* Can't grow it, we don't own it. */
02366                                 b->yy_ch_buf = 0;
02367 
02368                         if ( ! b->yy_ch_buf )
02369                                 YY_FATAL_ERROR(
02370                                 "fatal error - scanner input buffer overflow" );
02371 
02372                         yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
02373 
02374                         num_to_read = yy_current_buffer->yy_buf_size -
02375                                                 number_to_move - 1;
02376 #endif
02377                         }
02378 
02379                 if ( num_to_read > YY_READ_BUF_SIZE )
02380                         num_to_read = YY_READ_BUF_SIZE;
02381 
02382                 /* Read in more data. */
02383                 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
02384                         yy_n_chars, num_to_read );
02385 
02386                 yy_current_buffer->yy_n_chars = yy_n_chars;
02387                 }
02388 
02389         if ( yy_n_chars == 0 )
02390                 {
02391                 if ( number_to_move == YY_MORE_ADJ )
02392                         {
02393                         ret_val = EOB_ACT_END_OF_FILE;
02394                         yyrestart( yyin );
02395                         }
02396 
02397                 else
02398                         {
02399                         ret_val = EOB_ACT_LAST_MATCH;
02400                         yy_current_buffer->yy_buffer_status =
02401                                 YY_BUFFER_EOF_PENDING;
02402                         }
02403                 }
02404 
02405         else
02406                 ret_val = EOB_ACT_CONTINUE_SCAN;
02407 
02408         yy_n_chars += number_to_move;
02409         yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
02410         yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
02411 
02412         yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
02413 
02414         return ret_val;
02415         }
02416 
02417 
02418 /* yy_get_previous_state - get the state just before the EOB char was reached */
02419 
02420 static yy_state_type yy_get_previous_state()
02421         {
02422         register yy_state_type yy_current_state;
02423         register char *yy_cp;
02424 
02425         yy_current_state = yy_start;
02426 
02427         for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
02428                 {
02429                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
02430                 if ( yy_accept[yy_current_state] )
02431                         {
02432                         yy_last_accepting_state = yy_current_state;
02433                         yy_last_accepting_cpos = yy_cp;
02434                         }
02435                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
02436                         {
02437                         yy_current_state = (int) yy_def[yy_current_state];
02438                         if ( yy_current_state >= 509 )
02439                                 yy_c = yy_meta[(unsigned int) yy_c];
02440                         }
02441                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
02442                 }
02443 
02444         return yy_current_state;
02445         }
02446 
02447 
02448 /* yy_try_NUL_trans - try to make a transition on the NUL character
02449  *
02450  * synopsis
02451  *      next_state = yy_try_NUL_trans( current_state );
02452  */
02453 
02454 #ifdef YY_USE_PROTOS
02455 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
02456 #else
02457 static yy_state_type yy_try_NUL_trans( yy_current_state )
02458 yy_state_type yy_current_state;
02459 #endif
02460         {
02461         register int yy_is_jam;
02462         register char *yy_cp = yy_c_buf_p;
02463 
02464         register YY_CHAR yy_c = 1;
02465         if ( yy_accept[yy_current_state] )
02466                 {
02467                 yy_last_accepting_state = yy_current_state;
02468                 yy_last_accepting_cpos = yy_cp;
02469                 }
02470         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
02471                 {
02472                 yy_current_state = (int) yy_def[yy_current_state];
02473                 if ( yy_current_state >= 509 )
02474                         yy_c = yy_meta[(unsigned int) yy_c];
02475                 }
02476         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
02477         yy_is_jam = (yy_current_state == 508);
02478 
02479         return yy_is_jam ? 0 : yy_current_state;
02480         }
02481 
02482 
02483 #ifndef YY_NO_UNPUT
02484 #ifdef YY_USE_PROTOS
02485 static void yyunput( int c, register char *yy_bp )
02486 #else
02487 static void yyunput( c, yy_bp )
02488 int c;
02489 register char *yy_bp;
02490 #endif
02491         {
02492         register char *yy_cp = yy_c_buf_p;
02493 
02494         /* undo effects of setting up yytext */
02495         *yy_cp = yy_hold_char;
02496 
02497         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
02498                 { /* need to shift things up to make room */
02499                 /* +2 for EOB chars. */
02500                 register int number_to_move = yy_n_chars + 2;
02501                 register char *dest = &yy_current_buffer->yy_ch_buf[
02502                                         yy_current_buffer->yy_buf_size + 2];
02503                 register char *source =
02504                                 &yy_current_buffer->yy_ch_buf[number_to_move];
02505 
02506                 while ( source > yy_current_buffer->yy_ch_buf )
02507                         *--dest = *--source;
02508 
02509                 yy_cp += (int) (dest - source);
02510                 yy_bp += (int) (dest - source);
02511                 yy_current_buffer->yy_n_chars =
02512                         yy_n_chars = yy_current_buffer->yy_buf_size;
02513 
02514                 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
02515                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
02516                 }
02517 
02518         *--yy_cp = (char) c;
02519 
02520 
02521         yytext_ptr = yy_bp;
02522         yy_hold_char = *yy_cp;
02523         yy_c_buf_p = yy_cp;
02524         }
02525 #endif  /* ifndef YY_NO_UNPUT */
02526 
02527 
02528 #ifdef __cplusplus
02529 static int yyinput()
02530 #else
02531 static int input()
02532 #endif
02533         {
02534         int c;
02535 
02536         *yy_c_buf_p = yy_hold_char;
02537 
02538         if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
02539                 {
02540                 /* yy_c_buf_p now points to the character we want to return.
02541                  * If this occurs *before* the EOB characters, then it's a
02542                  * valid NUL; if not, then we've hit the end of the buffer.
02543                  */
02544                 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
02545                         /* This was really a NUL. */
02546                         *yy_c_buf_p = '\0';
02547 
02548                 else
02549                         { /* need more input */
02550                         int offset = yy_c_buf_p - yytext_ptr;
02551                         ++yy_c_buf_p;
02552 
02553                         switch ( yy_get_next_buffer() )
02554                                 {
02555                                 case EOB_ACT_LAST_MATCH:
02556                                         /* This happens because yy_g_n_b()
02557                                          * sees that we've accumulated a
02558                                          * token and flags that we need to
02559                                          * try matching the token before
02560                                          * proceeding.  But for input(),
02561                                          * there's no matching to consider.
02562                                          * So convert the EOB_ACT_LAST_MATCH
02563                                          * to EOB_ACT_END_OF_FILE.
02564                                          */
02565 
02566                                         /* Reset buffer status. */
02567                                         yyrestart( yyin );
02568 
02569                                         /* fall through */
02570 
02571                                 case EOB_ACT_END_OF_FILE:
02572                                         {
02573                                         if ( yywrap() )
02574                                                 return EOF;
02575 
02576                                         if ( ! yy_did_buffer_switch_on_eof )
02577                                                 YY_NEW_FILE;
02578 #ifdef __cplusplus
02579                                         return yyinput();
02580 #else
02581                                         return input();
02582 #endif
02583                                         }
02584 
02585                                 case EOB_ACT_CONTINUE_SCAN:
02586                                         yy_c_buf_p = yytext_ptr + offset;
02587                                         break;
02588                                 }
02589                         }
02590                 }
02591 
02592         c = *(unsigned char *) yy_c_buf_p;      /* cast for 8-bit char's */
02593         *yy_c_buf_p = '\0';     /* preserve yytext */
02594         yy_hold_char = *++yy_c_buf_p;
02595 
02596 
02597         return c;
02598         }
02599 
02600 
02601 #ifdef YY_USE_PROTOS
02602 void yyrestart( FILE *input_file )
02603 #else
02604 void yyrestart( input_file )
02605 FILE *input_file;
02606 #endif
02607         {
02608         if ( ! yy_current_buffer )
02609                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
02610 
02611         yy_init_buffer( yy_current_buffer, input_file );
02612         yy_load_buffer_state();
02613         }
02614 
02615 
02616 #ifdef YY_USE_PROTOS
02617 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
02618 #else
02619 void yy_switch_to_buffer( new_buffer )
02620 YY_BUFFER_STATE new_buffer;
02621 #endif
02622         {
02623         if ( yy_current_buffer == new_buffer )
02624                 return;
02625 
02626         if ( yy_current_buffer )
02627                 {
02628                 /* Flush out information for old buffer. */
02629                 *yy_c_buf_p = yy_hold_char;
02630                 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
02631                 yy_current_buffer->yy_n_chars = yy_n_chars;
02632                 }
02633 
02634         yy_current_buffer = new_buffer;
02635         yy_load_buffer_state();
02636 
02637         /* We don't actually know whether we did this switch during
02638          * EOF (yywrap()) processing, but the only time this flag
02639          * is looked at is after yywrap() is called, so it's safe
02640          * to go ahead and always set it.
02641          */
02642         yy_did_buffer_switch_on_eof = 1;
02643         }
02644 
02645 
02646 #ifdef YY_USE_PROTOS
02647 void yy_load_buffer_state( void )
02648 #else
02649 void yy_load_buffer_state()
02650 #endif
02651         {
02652         yy_n_chars = yy_current_buffer->yy_n_chars;
02653         yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
02654         yyin = yy_current_buffer->yy_input_file;
02655         yy_hold_char = *yy_c_buf_p;
02656         }
02657 
02658 
02659 #ifdef YY_USE_PROTOS
02660 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
02661 #else
02662 YY_BUFFER_STATE yy_create_buffer( file, size )
02663 FILE *file;
02664 int size;
02665 #endif
02666         {
02667         YY_BUFFER_STATE b;
02668 
02669         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
02670         if ( ! b )
02671                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
02672 
02673         b->yy_buf_size = size;
02674 
02675         /* yy_ch_buf has to be 2 characters longer than the size given because
02676          * we need to put in 2 end-of-buffer characters.
02677          */
02678         b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
02679         if ( ! b->yy_ch_buf )
02680                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
02681 
02682         b->yy_is_our_buffer = 1;
02683 
02684         yy_init_buffer( b, file );
02685 
02686         return b;
02687         }
02688 
02689 
02690 #ifdef YY_USE_PROTOS
02691 void yy_delete_buffer( YY_BUFFER_STATE b )
02692 #else
02693 void yy_delete_buffer( b )
02694 YY_BUFFER_STATE b;
02695 #endif
02696         {
02697         if ( ! b )
02698                 return;
02699 
02700         if ( b == yy_current_buffer )
02701                 yy_current_buffer = (YY_BUFFER_STATE) 0;
02702 
02703         if ( b->yy_is_our_buffer )
02704                 yy_flex_free( (void *) b->yy_ch_buf );
02705 
02706         yy_flex_free( (void *) b );
02707         }
02708 
02709 
02710 #ifndef YY_ALWAYS_INTERACTIVE
02711 #ifndef YY_NEVER_INTERACTIVE
02712 extern int isatty YY_PROTO(( int ));
02713 #endif
02714 #endif
02715 
02716 #ifdef YY_USE_PROTOS
02717 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
02718 #else
02719 void yy_init_buffer( b, file )
02720 YY_BUFFER_STATE b;
02721 FILE *file;
02722 #endif
02723 
02724 
02725         {
02726         yy_flush_buffer( b );
02727 
02728         b->yy_input_file = file;
02729         b->yy_fill_buffer = 1;
02730 
02731 #if YY_ALWAYS_INTERACTIVE
02732         b->yy_is_interactive = 1;
02733 #else
02734 #if YY_NEVER_INTERACTIVE
02735         b->yy_is_interactive = 0;
02736 #else
02737         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
02738 #endif
02739 #endif
02740         }
02741 
02742 
02743 #ifdef YY_USE_PROTOS
02744 void yy_flush_buffer( YY_BUFFER_STATE b )
02745 #else
02746 void yy_flush_buffer( b )
02747 YY_BUFFER_STATE b;
02748 #endif
02749 
02750         {
02751         if ( ! b )
02752                 return;
02753 
02754         b->yy_n_chars = 0;
02755 
02756         /* We always need two end-of-buffer characters.  The first causes
02757          * a transition to the end-of-buffer state.  The second causes
02758          * a jam in that state.
02759          */
02760         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
02761         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
02762 
02763         b->yy_buf_pos = &b->yy_ch_buf[0];
02764 
02765         b->yy_at_bol = 1;
02766         b->yy_buffer_status = YY_BUFFER_NEW;
02767 
02768         if ( b == yy_current_buffer )
02769                 yy_load_buffer_state();
02770         }
02771 
02772 
02773 #ifndef YY_NO_SCAN_BUFFER
02774 #ifdef YY_USE_PROTOS
02775 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
02776 #else
02777 YY_BUFFER_STATE yy_scan_buffer( base, size )
02778 char *base;
02779 yy_size_t size;
02780 #endif
02781         {
02782         YY_BUFFER_STATE b;
02783 
02784         if ( size < 2 ||
02785              base[size-2] != YY_END_OF_BUFFER_CHAR ||
02786              base[size-1] != YY_END_OF_BUFFER_CHAR )
02787                 /* They forgot to leave room for the EOB's. */
02788                 return 0;
02789 
02790         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
02791         if ( ! b )
02792                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
02793 
02794         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
02795         b->yy_buf_pos = b->yy_ch_buf = base;
02796         b->yy_is_our_buffer = 0;
02797         b->yy_input_file = 0;
02798         b->yy_n_chars = b->yy_buf_size;
02799         b->yy_is_interactive = 0;
02800         b->yy_at_bol = 1;
02801         b->yy_fill_buffer = 0;
02802         b->yy_buffer_status = YY_BUFFER_NEW;
02803 
02804         yy_switch_to_buffer( b );
02805 
02806         return b;
02807         }
02808 #endif
02809 
02810 
02811 #ifndef YY_NO_SCAN_STRING
02812 #ifdef YY_USE_PROTOS
02813 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
02814 #else
02815 YY_BUFFER_STATE yy_scan_string( yy_str )
02816 yyconst char *yy_str;
02817 #endif
02818         {
02819         int len;
02820         for ( len = 0; yy_str[len]; ++len )
02821                 ;
02822 
02823         return yy_scan_bytes( yy_str, len );
02824         }
02825 #endif
02826 
02827 
02828 #ifndef YY_NO_SCAN_BYTES
02829 #ifdef YY_USE_PROTOS
02830 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
02831 #else
02832 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
02833 yyconst char *bytes;
02834 int len;
02835 #endif
02836         {
02837         YY_BUFFER_STATE b;
02838         char *buf;
02839         yy_size_t n;
02840         int i;
02841 
02842         /* Get memory for full buffer, including space for trailing EOB's. */
02843         n = len + 2;
02844         buf = (char *) yy_flex_alloc( n );
02845         if ( ! buf )
02846                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
02847 
02848         for ( i = 0; i < len; ++i )
02849                 buf[i] = bytes[i];
02850 
02851         buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
02852 
02853         b = yy_scan_buffer( buf, n );
02854         if ( ! b )
02855                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
02856 
02857         /* It's okay to grow etc. this buffer, and we should throw it
02858          * away when we're done.
02859          */
02860         b->yy_is_our_buffer = 1;
02861 
02862         return b;
02863         }
02864 #endif
02865 
02866 
02867 #ifndef YY_NO_PUSH_STATE
02868 #ifdef YY_USE_PROTOS
02869 static void yy_push_state( int new_state )
02870 #else
02871 static void yy_push_state( new_state )
02872 int new_state;
02873 #endif
02874         {
02875         if ( yy_start_stack_ptr >= yy_start_stack_depth )
02876                 {
02877                 yy_size_t new_size;
02878 
02879                 yy_start_stack_depth += YY_START_STACK_INCR;
02880                 new_size = yy_start_stack_depth * sizeof( int );
02881 
02882                 if ( ! yy_start_stack )
02883                         yy_start_stack = (int *) yy_flex_alloc( new_size );
02884 
02885                 else
02886                         yy_start_stack = (int *) yy_flex_realloc(
02887                                         (void *) yy_start_stack, new_size );
02888 
02889                 if ( ! yy_start_stack )
02890                         YY_FATAL_ERROR(
02891                         "out of memory expanding start-condition stack" );
02892                 }
02893 
02894         yy_start_stack[yy_start_stack_ptr++] = YY_START;
02895 
02896         BEGIN(new_state);
02897         }
02898 #endif
02899 
02900 
02901 #ifndef YY_NO_POP_STATE
02902 static void yy_pop_state()
02903         {
02904         if ( --yy_start_stack_ptr < 0 )
02905                 YY_FATAL_ERROR( "start-condition stack underflow" );
02906 
02907         BEGIN(yy_start_stack[yy_start_stack_ptr]);
02908         }
02909 #endif
02910 
02911 
02912 #ifndef YY_NO_TOP_STATE
02913 static int yy_top_state()
02914         {
02915         return yy_start_stack[yy_start_stack_ptr - 1];
02916         }
02917 #endif
02918 
02919 #ifndef YY_EXIT_FAILURE
02920 #define YY_EXIT_FAILURE 2
02921 #endif
02922 
02923 #ifdef YY_USE_PROTOS
02924 static void yy_fatal_error( yyconst char msg[] )
02925 #else
02926 static void yy_fatal_error( msg )
02927 char msg[];
02928 #endif
02929         {
02930         (void) fprintf( stderr, "%s\n", msg );
02931         exit( YY_EXIT_FAILURE );
02932         }
02933 
02934 
02935 
02936 /* Redefine yyless() so it works in section 3 code. */
02937 
02938 #undef yyless
02939 #define yyless(n) \
02940         do \
02941                 { \
02942                 /* Undo effects of setting up yytext. */ \
02943                 yytext[yyleng] = yy_hold_char; \
02944                 yy_c_buf_p = yytext + n; \
02945                 yy_hold_char = *yy_c_buf_p; \
02946                 *yy_c_buf_p = '\0'; \
02947                 yyleng = n; \
02948                 } \
02949         while ( 0 )
02950 
02951 
02952 /* Internal utility routines. */
02953 
02954 #ifndef yytext_ptr
02955 #ifdef YY_USE_PROTOS
02956 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
02957 #else
02958 static void yy_flex_strncpy( s1, s2, n )
02959 char *s1;
02960 yyconst char *s2;
02961 int n;
02962 #endif
02963         {
02964         register int i;
02965         for ( i = 0; i < n; ++i )
02966                 s1[i] = s2[i];
02967         }
02968 #endif
02969 
02970 #ifdef YY_NEED_STRLEN
02971 #ifdef YY_USE_PROTOS
02972 static int yy_flex_strlen( yyconst char *s )
02973 #else
02974 static int yy_flex_strlen( s )
02975 yyconst char *s;
02976 #endif
02977         {
02978         register int n;
02979         for ( n = 0; s[n]; ++n )
02980                 ;
02981 
02982         return n;
02983         }
02984 #endif
02985 
02986 
02987 #ifdef YY_USE_PROTOS
02988 static void *yy_flex_alloc( yy_size_t size )
02989 #else
02990 static void *yy_flex_alloc( size )
02991 yy_size_t size;
02992 #endif
02993         {
02994         return (void *) malloc( size );
02995         }
02996 
02997 #ifdef YY_USE_PROTOS
02998 static void *yy_flex_realloc( void *ptr, yy_size_t size )
02999 #else
03000 static void *yy_flex_realloc( ptr, size )
03001 void *ptr;
03002 yy_size_t size;
03003 #endif
03004         {
03005         /* The cast to (char *) in the following accommodates both
03006          * implementations that use char* generic pointers, and those
03007          * that use void* generic pointers.  It works with the latter
03008          * because both ANSI C and C++ allow castless assignment from
03009          * any pointer type to void*, and deal with argument conversions
03010          * as though doing an assignment.
03011          */
03012         return (void *) realloc( (char *) ptr, size );
03013         }
03014 
03015 #ifdef YY_USE_PROTOS
03016 static void yy_flex_free( void *ptr )
03017 #else
03018 static void yy_flex_free( ptr )
03019 void *ptr;
03020 #endif
03021         {
03022         free( ptr );
03023         }
03024 
03025 #if YY_MAIN
03026 int main()
03027         {
03028         yylex();
03029         return 0;
03030         }
03031 #endif
03032 #line 536 "cscanner.l"
03033 
03034 
03035 struct skeyword
03036 {
03037   /*@null@*/ /*@observer@*/ char *name;
03038   int token;
03039 } ;
03040 
03041 /*
03042 ** These tokens are followed by syntax that is parsed by the 
03043 ** grammar proper.
03044 */
03045 
03046 struct skeyword s_parsetable[] = {
03047   { "modifies", QMODIFIES } ,
03048   { "globals", QGLOBALS } ,
03049   { "alt", QALT } ,
03050   { "constant", QCONSTANT } ,
03051   { "function", QFUNCTION } ,
03052   { "iter", QITER } ,
03053   { "defines", QDEFINES } ,
03054   { "uses", QUSES } ,
03055   { "allocates", QALLOCATES } ,
03056   { "sets", QSETS } ,
03057   { "releases", QRELEASES } ,
03058   { "pre", QPRECLAUSE } ,
03059   { "post", QPOSTCLAUSE } ,
03060   { NULL, BADTOK } 
03061 } ;
03062 
03063 /*
03064 ** These tokens are either stand-alone tokens, or followed by 
03065 ** token-specific text.
03066 */
03067 
03068 struct skeyword s_keytable[] = {
03069   { "anytype", QANYTYPE } ,
03070   { "integraltype", QINTEGRALTYPE } ,
03071   { "unsignedintegraltype", QUNSIGNEDINTEGRALTYPE } ,
03072   { "signedintegraltype", QSIGNEDINTEGRALTYPE } ,
03073   { "out", QOUT } ,
03074   { "in", QIN } ,
03075   { "only", QONLY } , 
03076   { "owned", QOWNED } ,
03077   { "dependent", QDEPENDENT } ,
03078   { "partial", QPARTIAL } ,
03079   { "special", QSPECIAL } ,
03080   { "truenull", QTRUENULL } ,
03081   { "falsenull", QFALSENULL } ,
03082   { "keep", QKEEP } ,
03083   { "kept", QKEPT } ,
03084   { "notnull", QNOTNULL } ,
03085   { "abstract", QABSTRACT } ,
03086   { "concrete", QCONCRETE } ,
03087   { "mutable", QMUTABLE } ,
03088   { "immutable", QIMMUTABLE } ,
03089   { "unused", QUNUSED } ,
03090   { "external", QEXTERNAL } ,
03091   { "sef", QSEF } ,
03092   { "unique", QUNIQUE } ,
03093   { "returned", QRETURNED } ,
03094   { "exposed", QEXPOSED } ,
03095   { "refcounted", QREFCOUNTED } ,
03096   { "refs", QREFS } ,
03097   { "newref", QNEWREF } ,
03098   { "tempref", QTEMPREF } ,
03099   { "killref", QKILLREF } ,
03100   { "null", QNULL } ,
03101   { "relnull", QRELNULL } ,
03102   { "reldef", QRELDEF } ,
03103   { "observer", QOBSERVER } ,
03104   { "exits", QEXITS } ,
03105   { "mayexit", QMAYEXIT } ,
03106   { "trueexit", QTRUEEXIT } ,
03107   { "falseexit", QFALSEEXIT } ,
03108   { "neverexit", QNEVEREXIT } ,
03109   { "temp", QTEMP } ,
03110   { "shared", QSHARED } ,
03111   { "ref", QREF } ,
03112   { "unchecked", QUNCHECKED } ,
03113   { "checked", QCHECKED } ,
03114   { "checkmod", QCHECKMOD } ,
03115   { "checkedstrict", QCHECKEDSTRICT } ,
03116   { "innercontinue", QINNERCONTINUE } ,
03117   { "innerbreak", QINNERBREAK } ,
03118   { "loopbreak", QLOOPBREAK } ,
03119   { "switchbreak", QSWITCHBREAK } ,
03120   { "safebreak", QSAFEBREAK } , 
03121   { "fallthrough", QFALLTHROUGH } ,
03122   { "l_fallthrou", QLINTFALLTHROUGH } , 
03123   { "l_fallth", QLINTFALLTHRU } ,
03124   { "notreached", QNOTREACHED } ,
03125   { "l_notreach", QLINTNOTREACHED } ,
03126   { "printflike", QPRINTFLIKE } ,
03127   { "l_printfli", QLINTPRINTFLIKE } ,
03128   { "scanflike", QSCANFLIKE } ,
03129   { "messagelike", QMESSAGELIKE } ,
03130   { "l_argsus", QARGSUSED } ,
03131   { NULL, BADTOK } 
03132 } ;
03133 
03134 /*
03135 ** would be better if these weren't hard coded...
03136 */
03137 
03138 static bool isArtificial (cstring s)
03139 {
03140   return (cstring_equalLit (s, "modifies") 
03141           || cstring_equalLit (s, "globals") 
03142           || cstring_equalLit (s, "alt"));
03143 }
03144 
03145 void swallowMacro (void)
03146 {
03147   int i;
03148   bool skipnext = FALSE;
03149 
03150   while ((i = lminput ()) != EOF)
03151     {
03152       char c = (char) i;
03153       
03154       
03155       if (c == '\\')
03156         {
03157           skipnext = TRUE;
03158         }
03159       else if (c == '\n')
03160         {
03161           if (skipnext)
03162             {
03163               skipnext = FALSE;
03164             }
03165           else
03166             {
03167               checkUngetc (i, yyin);
03168               return;
03169             }
03170         }
03171     }
03172 
03173   if (i != EOF)
03174     {
03175       checkUngetc (i, yyin);
03176     }
03177 }
03178 
03179 static int commentMarkerToken (cstring s)
03180 {
03181   int i = 0;
03182   
03183   while (s_parsetable[i].name != NULL) 
03184     {
03185       if (cstring_equalLit (s, s_parsetable[i].name))
03186         {
03187           return s_parsetable[i].token;
03188         }
03189 
03190       i++;
03191     }
03192 
03193   return BADTOK;
03194 }
03195 
03196 static int tokenMacroCode (cstring s)
03197 {
03198   int i = 0;
03199   
03200   while (s_keytable[i].name != NULL) 
03201     {
03202       if (cstring_equalLit (s, s_keytable[i].name)) 
03203         {
03204           if (s_keytable[i].token == QLINTFALLTHROUGH) 
03205             {
03206               voptgenerror
03207                 (FLG_WARNLINTCOMMENTS,
03208                  cstring_makeLiteral
03209                  ("Traditional lint comment /*FALLTHROUGH*/ used.  "
03210                   "This is interpreted by "
03211                   "LCLint in the same way as most Unix lints, but it is "
03212                   "preferable to replace it with the /*@fallthrough@*/ "
03213                   "stylized comment"),
03214                  g_currentloc);
03215               return QFALLTHROUGH;            
03216             }
03217           else if (s_keytable[i].token == QLINTFALLTHRU)
03218             {
03219               voptgenerror 
03220                 (FLG_WARNLINTCOMMENTS,
03221                  cstring_makeLiteral
03222                  ("Traditional lint comment /*FALLTHRU*/ used.  "
03223                   "This is interpreted by "
03224                   "LCLint in the same way as most Unix lints, but it is "
03225                   "preferable to replace it with the /*@fallthrough@*/ "
03226                   "stylized comment"),
03227                  g_currentloc);
03228               return QFALLTHROUGH;
03229             }
03230           else if (s_keytable[i].token == QLINTNOTREACHED)
03231             {
03232               voptgenerror 
03233                 (FLG_WARNLINTCOMMENTS,
03234                  cstring_makeLiteral
03235                  ("Traditional lint comment /*NOTREACHED*/ used.  "
03236                   "This is interpreted by "
03237                   "LCLint in the same way as most Unix lints, but it is "
03238                   "preferable to replace it with the /*@notreached@*/ "
03239                   "stylized comment."),
03240                  g_currentloc);
03241               
03242               return QNOTREACHED;
03243             }
03244           else if (s_keytable[i].token == QPRINTFLIKE)
03245             {
03246               setSpecialFunction (QU_PRINTFLIKE);
03247               return SKIPTOK;
03248             }
03249           else if (s_keytable[i].token == QLINTPRINTFLIKE)
03250             {         
03251               voptgenerror 
03252                 (FLG_WARNLINTCOMMENTS,
03253                  cstring_makeLiteral
03254                  ("Traditional lint comment /*PRINTFLIKE*/ used.  "
03255                   "This is interpreted by "
03256                   "LCLint in the same way as most Unix lints, but it is "
03257                   "preferable to replace it with either /*@printflike@*/, "
03258                   "/*@scanflike@*/ or /*@messagelike@*/."),
03259                  g_currentloc);
03260               
03261               setSpecialFunction (QU_PRINTFLIKE);
03262               return SKIPTOK;
03263             }
03264           else if (s_keytable[i].token == QSCANFLIKE)
03265             {
03266               setSpecialFunction (QU_SCANFLIKE);
03267               return SKIPTOK;
03268             }
03269           else if (s_keytable[i].token == QMESSAGELIKE)
03270             {
03271               setSpecialFunction (QU_MESSAGELIKE);
03272               return SKIPTOK;
03273             }
03274           else if (s_keytable[i].token == QARGSUSED)
03275             {
03276               voptgenerror
03277                 (FLG_WARNLINTCOMMENTS,
03278                  cstring_makeLiteral
03279                  ("Traditional lint comment /*ARGSUSED*/ used.  "
03280                   "This is interpreted by "
03281                   "LCLint in the same way as most Unix lints, but it is "
03282                   "preferable to use /*@unused@*/ annotations on "
03283                   "the unused parameters."),
03284                  g_currentloc);
03285               
03286               setArgsUsed ();
03287               return SKIPTOK;
03288             }
03289           
03290           return s_keytable[i].token;
03291         }
03292       
03293       i++;
03294     }
03295   
03296   return BADTOK;
03297 }
03298 
03299 static int lminput ()
03300 {
03301   if (savechar == '\0')
03302     {
03303       incColumn ();
03304       return (input ());
03305     }
03306   else
03307     {
03308       int save = (int) savechar;
03309       savechar = '\0';
03310       return save;
03311     }
03312 }
03313 
03314 static void lmsavechar (char c)
03315 {
03316   if (savechar == '\0') savechar = c;
03317   else
03318     {
03319       llbuglit ("lmsavechar: override");
03320     }
03321 }
03322 
03323 static int returnFloat (ctype ct, double f)
03324 {
03325   yylval.expr = exprNode_floatLiteral (f, ct, cstring_fromChars (yytext), 
03326                                        fileloc_decColumn (g_currentloc, tokLength));
03327   tokLength = 0; 
03328   return (CCONSTANT);
03329 }
03330 
03331 static int returnInt (ctype ct, long i)
03332 {
03333   ctype c = ct;
03334 
03335   if (ctype_equal (ct, ctype_int))
03336     {
03337       if (i == 0)
03338         {
03339           c = context_typeofZero ();
03340         }
03341       else if (i == 1)
03342         {
03343           c = context_typeofOne ();
03344         }
03345     }
03346   
03347   yylval.expr = exprNode_numLiteral (c, cstring_fromChars (yytext), 
03348                                      fileloc_decColumn (g_currentloc, tokLength), i);   
03349   tokLength = 0; 
03350   return (CCONSTANT);
03351 }
03352 
03353 static int returnChar (char c)
03354 {
03355   yylval.expr = exprNode_charLiteral (c, cstring_fromChars (yytext), 
03356                                       fileloc_decColumn (g_currentloc, tokLength));
03357   tokLength = 0; 
03358   return (CCONSTANT);
03359 }
03360 
03361 static int ninput ()  
03362 {
03363   int c = lminput ();
03364 
03365   if (c != EOF && ((char)c == '\n'))
03366     {
03367       context_incLineno ();
03368     }
03369 
03370   return c;
03371 }
03372 
03373 static char macro_nextChar ()
03374 {
03375   static bool in_quote = FALSE, in_escape = FALSE, in_char = FALSE;
03376   int ic;
03377   char c;
03378 
03379   ic = lminput ();
03380   c = char_fromInt (ic);
03381   
03382   if (!in_quote && !in_char && (c == '\\' || c == BEFORE_COMMENT_MARKER[0]))
03383     {
03384       if (c == '\\')
03385         {
03386           while ((c = char_fromInt (lminput ())) != '\0' && c != '\n')
03387             {
03388               ; /* skip to newline */
03389             }
03390           
03391           context_incLineno ();
03392           
03393           if (c != '\0')
03394             {
03395               return macro_nextChar ();
03396             }
03397           else 
03398             {
03399               return c;
03400             }
03401         }
03402       else /* if (c == '@') */
03403         {
03404           if (handleLlSpecial () != BADTOK)
03405             {
03406               llerrorlit (FLG_SYNTAX, "Macro cannot use special syntax");
03407             }
03408 
03409           return macro_nextChar ();
03410         }
03411     }
03412   else if (!in_escape && c == '\"')
03413     {
03414       in_quote = !in_quote;
03415     }
03416   else if (!in_escape && c == '\'')
03417     {
03418       in_char = !in_char;
03419     }
03420   else if ((in_quote || in_char) && c == '\\')
03421     {
03422       in_escape = !in_escape;
03423     }
03424   else if ((in_quote || in_char) && in_escape)
03425     {
03426       in_escape = FALSE;
03427     }
03428   else if (!in_quote && c == '/')
03429     {
03430       char c2;
03431       
03432       if ((c2 = char_fromInt (lminput ())) == '*')
03433         {
03434           while (c2 != '\0')
03435             {
03436               while ((c2 = char_fromInt (lminput ())) != '\0'
03437                      && c2 != '\n' && c2 != '*')
03438                 {
03439                   ;
03440                 }
03441               
03442               if (c2 == '*')
03443                 {
03444                   while ((c2 = char_fromInt (lminput ())) != '\0' 
03445                          && c2 == '*')
03446                     {
03447                       ;
03448                     }
03449 
03450                   if (c2 == '/')
03451                     {
03452                       goto outofcomment;
03453                     }
03454                 }
03455               else 
03456                 {
03457                   llfatalerror (cstring_makeLiteral ("Macro: bad comment!"));
03458                 }
03459             }
03460         outofcomment:
03461           return macro_nextChar ();
03462         }
03463       else
03464         {
03465           /*** putchar does not work!  why?  puts to stdio...??! ***/
03466           lmsavechar (c2);
03467         }
03468     }
03469   return c;
03470 }
03471 
03472 /*
03473 ** keeps stylized comments
03474 */
03475 
03476 static char macro_nextCharC ()
03477 {
03478   static bool in_quote = FALSE, in_escape = FALSE, in_char = FALSE;
03479   char c;
03480 
03481   c = char_fromInt (lminput ());
03482 
03483   if (!in_quote && !in_char && c == '\\')
03484     {
03485       while ((c = char_fromInt (lminput ())) != '\0' && c != '\n')
03486         {
03487           ; /* skip to newline */
03488         }
03489       
03490       context_incLineno ();
03491       
03492       if (c != '\0')
03493         {
03494           return macro_nextCharC ();
03495         }
03496       else
03497         {
03498           return c;
03499         }
03500     }
03501   else if (!in_escape && c == '\"')
03502     {
03503       in_quote = !in_quote;
03504     }
03505   else if (!in_escape && c == '\'')
03506     {
03507       in_char = !in_char;
03508     }
03509   else if ((in_quote || in_char) && c == '\\')
03510     {
03511       in_escape = !in_escape;
03512     }
03513   else if ((in_quote || in_char) && in_escape)
03514     {
03515       in_escape = FALSE;
03516     }
03517   else if (!in_quote && c == '/')
03518     {
03519       char c2;
03520       
03521       if ((c2 = char_fromInt (lminput ())) == '*')
03522         {
03523           while (c2 != '\0')
03524             {
03525               while ((c2 = char_fromInt (lminput ())) != '\0' 
03526                      && c2 != '\n' && c2 != '*')
03527                 {
03528                   ;
03529                 }
03530               
03531               if (c2 == '*')
03532                 {
03533                   while ((c2 = char_fromInt (lminput ())) != '\0'
03534                          && c2 == '*')
03535                     {
03536                       ;
03537                     }
03538 
03539                   if (c2 == '/') 
03540                     {
03541                       goto outofcomment;
03542                     }
03543                 }
03544               else 
03545                 {
03546                   llfatalerror (cstring_makeLiteral ("Macro: bad comment!"));
03547                 }
03548             }
03549         outofcomment:
03550           return macro_nextCharC ();
03551         }
03552       else
03553         {
03554           lmsavechar (c2);
03555         }
03556     }
03557   return c;
03558 }
03559 
03560 /*
03561 ** skips whitespace (handles line continuations)
03562 ** returns first non-whitespace character
03563 */
03564 
03565 static char skip_whitespace ()
03566 {
03567   char c;
03568 
03569   while ((c = macro_nextChar ()) == ' ' || c == '\t')
03570     {
03571       ;
03572     }
03573 
03574   return c;
03575 }
03576 
03577 static void handleMacro ()
03578 {
03579   cstring mac = cstring_undefined;
03580   int macrocode;
03581   char c;
03582 
03583   while (currentColumn () > 2)
03584     {
03585       mac = cstring_appendChar (mac, ' ');
03586       setTokLength (-1);
03587     }
03588 
03589   c = macro_nextCharC ();
03590 
03591   if (c >= '0' && c <= '9')
03592     {
03593       int i;
03594 
03595       for (i = 0; i < ((c - '0') + 1); i++)
03596         {
03597           mac = cstring_appendChar (mac, ' ');
03598         }
03599     }
03600   else
03601     {
03602       BADBRANCH;
03603     }
03604 
03605   while (((c = macro_nextCharC ()) != '\0') && (c != '\n'))
03606     {
03607       mac = cstring_appendChar (mac, c);
03608     }
03609 
03610   
03611   macrocode = tokenMacroCode (mac);
03612 
03613   if (macrocode == BADTOK && !isArtificial (mac))
03614     {
03615       DPRINTF (("Add macro: %s", mac));
03616       context_addMacroCache (mac);
03617     }
03618   else
03619     {
03620       cstring_free (mac);
03621     }
03622 
03623   if (c == '\n')
03624     {
03625       context_incLineno ();
03626     }
03627 }
03628 
03629 static bool processMacro (void)
03630 {
03631   uentry e2;
03632   ctype ct;
03633   int noparams = 0;
03634   cstring fname = cstring_undefined;
03635   bool res = TRUE;
03636   bool isspecfcn = FALSE;
03637   bool isiter = FALSE;
03638   bool skipparam = FALSE;
03639   bool isenditer = FALSE;
03640   bool unknownm = FALSE;
03641   bool hasParams = FALSE;
03642   bool emptyMacro = FALSE;
03643   char c = skip_whitespace ();
03644   fileloc loc = fileloc_noColumn (g_currentloc);
03645 
03646   /* are both of these necessary?  what do they mean? */
03647   uentryList specparams = uentryList_undefined;
03648   uentryList pn = uentryList_undefined;
03649 
03650   context_resetMacroMissingParams ();
03651 
03652   if (c == '\0' || c == '\n')
03653     {
03654       llcontbug (cstring_makeLiteral ("Bad macro"));
03655       fileloc_free (loc);
03656       return FALSE;
03657     }
03658   
03659   fname = cstring_appendChar (fname, c);  
03660 
03661   while ((c = macro_nextChar ()) != '(' && c != '\0'
03662          && c != ' ' && c != '\t' && c != '\n')
03663     {
03664       fname = cstring_appendChar (fname, c);
03665     }
03666 
03667   if (c == ' ' || c == '\t' || c == '\n')
03668     {
03669       char oldc = c;
03670 
03671       if (c != '\n')
03672         {
03673           while (c == ' ' || c == '\t')
03674             {
03675               c = macro_nextChar ();
03676             }
03677           unput (c);
03678         }
03679 
03680       if (c == '\n')
03681         {
03682           emptyMacro = TRUE;
03683           unput (c);
03684         }
03685 
03686       c = oldc;
03687     }
03688 
03689   hasParams = (c == '(');
03690 
03691   
03692   if (usymtab_exists (fname))
03693     {
03694       e2 = usymtab_lookupExpose (fname);
03695       ct = uentry_getType (e2);
03696 
03697       
03698       if (uentry_isCodeDefined (e2) 
03699           && fileloc_isUser (uentry_whereDefined (e2)))
03700         {
03701           if (optgenerror 
03702               (FLG_MACROREDEF,
03703                message ("Macro %s already defined", fname),
03704                loc))
03705             {
03706               uentry_showWhereDefined (e2);
03707               uentry_clearDefined (e2);
03708             }
03709 
03710           if (uentry_isFunction (e2))
03711             {
03712               uentry_setType (e2, ctype_unknown);
03713               ct = ctype_unknown;
03714               unknownm = TRUE;
03715               context_enterUnknownMacro (e2); 
03716             }
03717           else
03718             {
03719               context_enterConstantMacro (e2);
03720             }
03721         }
03722       else
03723         {
03724           if (uentry_isForward (e2) && uentry_isFunction (e2))
03725             {
03726               unknownm = TRUE;
03727 
03728               voptgenerror 
03729                 (FLG_MACROFCNDECL,
03730                  message
03731                  ("Parameterized macro has no prototype or specification: %s ", 
03732                   fname),
03733                  loc);
03734               
03735               ct = ctype_unknown;
03736               uentry_setType (e2, ctype_unknown);
03737               uentry_setFunctionDefined (e2, loc); 
03738               uentry_setUsed (e2, fileloc_undefined);
03739               context_enterUnknownMacro (e2); 
03740             }
03741           else
03742             {
03743               if (uentry_isIter (e2))
03744                 {
03745                   isiter = TRUE;
03746                   specparams = uentry_getParams (e2);
03747                   noparams = uentryList_size (specparams);
03748                   uentry_setDefined (e2, loc);
03749                   context_enterIterDef (e2); 
03750                 }
03751               else if (uentry_isEndIter (e2))
03752                 {
03753                   isenditer = TRUE;
03754                   uentry_setDefined (e2, loc);
03755                   context_enterIterEnd (e2); /* don't care about it now */
03756                   /* but should parse like an iter! */
03757                 }
03758               else if (uentry_isConstant (e2))
03759                 {
03760                   if (hasParams)
03761                     {
03762                       voptgenerror 
03763                         (FLG_INCONDEFS, 
03764                          message ("Constant %s implemented as parameterized macro",
03765                                   fname),
03766                          g_currentloc);
03767                       
03768                       uentry_showWhereSpecified (e2);
03769                       uentry_setType (e2, ctype_unknown);
03770                       uentry_makeVarFunction (e2);
03771                       uentry_setDefined (e2, g_currentloc);
03772                       uentry_setFunctionDefined (e2, g_currentloc);
03773                       context_enterUnknownMacro (e2); 
03774                     }
03775                   else
03776                     {
03777                       if (!uentry_isSpecified (e2))
03778                         {
03779                           fileloc oloc = uentry_whereDeclared (e2);
03780 
03781                           if (fileloc_isLib (oloc))
03782                             {
03783                               ;
03784                             }
03785                           else if (fileloc_isUndefined (oloc)
03786                                    || fileloc_isPreproc (oloc))
03787                             {
03788                               if (!emptyMacro)
03789                                 {
03790                                   voptgenerror
03791                                     (FLG_MACROCONSTDECL,
03792                                      message 
03793                                      ("Macro constant %q not declared",
03794                                       uentry_getName (e2)),
03795                                      loc);                       
03796                                 }
03797                             }
03798                           else if (!fileloc_withinLines (oloc, loc, 2))
03799                             { /* bogus!  will give errors if there is too much whitespace */
03800                               voptgenerror
03801                                 (FLG_SYNTAX,
03802                                  message 
03803                                  ("Macro constant name %s does not match name in "
03804                                   "previous constant declaration.  This constant "
03805                                   "is declared at %q", fname, 
03806                                   fileloc_unparse (oloc)),
03807                                  loc);
03808                             }
03809                         }
03810 
03811                       context_enterConstantMacro (e2);        
03812                       cstring_free (fname);
03813                       fileloc_free (loc);
03814                       return res;
03815                     }
03816 
03817                 }
03818               else if (ctype_isFunction (ct))
03819                 {
03820                   isspecfcn = TRUE;
03821                   specparams = ctype_argsFunction (ct);
03822                   noparams = uentryList_size (specparams);
03823                   
03824                   uentry_setFunctionDefined (e2, loc); 
03825                   context_enterMacro (e2);
03826                 }
03827               else if (uentry_isVar (e2))
03828                 {
03829                   if (hasParams)
03830                     {
03831                       voptgenerror
03832                         (FLG_INCONDEFS,
03833                          message ("Variable %s implemented as parameterized macro", 
03834                                   fname),
03835                          loc);
03836 
03837                       uentry_showWhereSpecified (e2);
03838                       uentry_setType (e2, ctype_unknown);
03839                       uentry_makeVarFunction (e2);
03840                       uentry_setDefined (e2, g_currentloc);
03841                       uentry_setFunctionDefined (e2, g_currentloc);
03842                       context_enterUnknownMacro (e2); 
03843                     }
03844                   else
03845                     {
03846                       uentry ucons = uentry_makeConstant (fname,
03847                                                           ctype_unknown,
03848                                                           loc);
03849                       if (uentry_isExpandedMacro (e2))
03850                         {
03851                           ; /* okay */
03852                         }
03853                       else
03854                         {
03855                           if (optgenerror 
03856                               (FLG_INCONDEFS,
03857                                message ("Variable %s implemented by a macro",
03858                                         fname),
03859                                loc))
03860                             {
03861                               uentry_showWhereSpecified (e2);
03862                             }
03863                         }
03864 
03865                       uentry_setDefined (e2, loc);
03866                       uentry_setUsed (ucons, loc);
03867 
03868                       context_enterConstantMacro (ucons);
03869                       uentry_markOwned (ucons);
03870                       cstring_free (fname);
03871                       return res;
03872                     }
03873                 }
03874               else
03875                 {
03876                   if (uentry_isDatatype (e2))
03877                     {
03878                       vgenhinterror 
03879                         (FLG_SYNTAX,
03880                          message ("Type implemented as macro: %x", 
03881                                   uentry_getName (e2)),
03882                          message ("A type is implemented using a macro definition.  A "
03883                                   "typedef should be used instead."),
03884                          g_currentloc);
03885 
03886                       swallowMacro ();
03887                       /* Must exit scope (not sure why a new scope was entered?) */
03888                       usymtab_quietExitScope (g_currentloc);
03889                       uentry_setDefined (e2, g_currentloc);
03890                       res = FALSE;
03891                     }
03892                   else
03893                     {
03894                       llcontbug 
03895                         (message ("Unexpanded macro not function or constant: %q", 
03896                                   uentry_unparse (e2)));
03897                       uentry_setType (e2, ctype_unknown);
03898                       
03899                       if (hasParams)
03900                         {
03901                           uentry_makeVarFunction (e2);
03902                           uentry_setDefined (e2, g_currentloc);
03903                           uentry_setFunctionDefined (e2, g_currentloc);
03904                           context_enterUnknownMacro (e2); 
03905                         }
03906                     }
03907                 }
03908             }
03909         }
03910     }
03911   else
03912     {
03913       uentry ce;
03914 
03915       voptgenerror 
03916         (FLG_MACROMATCHNAME,
03917          message ("Unexpanded macro %s does not match name of a constant "
03918                   "or iter declaration.  The name used in the control "
03919                   "comment on the previous line should match.  "
03920                   "(Assuming macro defines a constant.)", 
03921                   fname),
03922          loc);
03923 
03924 
03925       ce = uentry_makeConstant (fname, ctype_unknown, fileloc_undefined);      
03926       uentry_setUsed (ce, loc); /* perhaps bogus? */
03927       e2 = usymtab_supEntryReturn (ce);
03928       
03929       context_enterConstantMacro (e2);        
03930       cstring_free (fname);
03931       fileloc_free (loc);
03932       return res;
03933     }
03934   
03935   /* in macros, ( must follow immediatetly after name */
03936   
03937   if (hasParams)
03938     {
03939       int paramno = 0;
03940       
03941       c = skip_whitespace ();
03942 
03943       while (c != ')' && c != '\0')
03944         {
03945           uentry  param;
03946           bool    suppress = context_inSuppressRegion ();
03947           cstring paramname = cstring_undefined;
03948 
03949           /*
03950           ** save the parameter location
03951           */
03952 
03953           decColumn ();
03954           context_saveLocation ();
03955           incColumn ();
03956 
03957           while (c != ' ' && c != '\t' && c != ',' && c != '\0' && c != ')')
03958             {
03959               paramname = cstring_appendChar (paramname, c);
03960               c = macro_nextChar ();
03961             }
03962           
03963           if (c == ' ' || c == '\t') c = skip_whitespace ();
03964 
03965           if (c == ',')
03966             {
03967               c = macro_nextChar ();
03968               if (c == ' ' || c == '\t') c = skip_whitespace ();
03969             }
03970           
03971           if (c == '\0')
03972             {
03973               llfatalerror (cstring_makeLiteral
03974                             ("Bad macro syntax: uentryList"));
03975             }
03976           
03977           if ((isspecfcn || isiter) && (paramno < noparams)
03978               && !uentry_isElipsisMarker (uentryList_getN 
03979                                           (specparams, paramno)))
03980             {
03981               uentry decl = uentryList_getN (specparams, paramno);
03982               sRef sr;
03983               
03984               param = uentry_nameCopy (paramname, decl);
03985 
03986                               
03987               uentry_setParam (param);
03988               sr = sRef_makeParam (paramno, uentry_getType (param));
03989 
03990               if (sRef_getNullState (sr) == NS_ABSNULL)
03991                 {
03992                   ctype pt = ctype_realType (uentry_getType (param));
03993 
03994                   if (ctype_isUser (pt))
03995                     {
03996                       uentry te = usymtab_getTypeEntrySafe (ctype_typeId (pt));
03997                       
03998                       if (uentry_isValid (te))
03999                         {
04000                           sRef_setStateFromUentry (sr, te);
04001                         }
04002                     }
04003                   else
04004                     {
04005                       sRef_setNullState (sr, NS_UNKNOWN, g_currentloc);
04006                     }
04007                 }
04008 
04009               uentry_setSref (param, sr);
04010               uentry_setDeclaredForceOnly (param, context_getSaveLocation ());
04011 
04012               skipparam = isiter && uentry_isOut (uentryList_getN (specparams, paramno));
04013             }
04014           else
04015             {
04016               fileloc sloc = context_getSaveLocation ();
04017 
04018               param = uentry_makeVariableSrefParam 
04019                 (paramname, ctype_unknown, sRef_makeParam (paramno, ctype_unknown));
04020               cstring_free (paramname);
04021 
04022               sRef_setPosNull  (uentry_getSref (param), sloc);
04023 
04024               uentry_setDeclaredForce (param, sloc);
04025 
04026               skipparam = FALSE;
04027               fileloc_free (sloc);
04028             }
04029 
04030           if (!skipparam)
04031             {
04032               llassert (!uentry_isElipsisMarker (param));
04033 
04034               if (!suppress)
04035                 {
04036                   sRef_makeUnsafe (uentry_getSref (param));
04037                 }
04038               
04039               pn = uentryList_add (pn, uentry_copy (param));
04040               usymtab_supEntry (param);
04041             }
04042           else
04043             {
04044               /* don't add param */
04045               uentry_free (param);
04046             }
04047 
04048           if (c == ',') 
04049             {
04050               (void) macro_nextChar ();
04051               c = skip_whitespace ();
04052             }
04053 
04054           paramno++;
04055         }
04056       
04057       if (c == ')')
04058         {
04059           if (isspecfcn || isiter)
04060             {
04061               if (paramno != noparams && noparams >= 0)
04062                 {
04063                   advanceLine ();
04064 
04065                   voptgenerror 
04066                     (FLG_INCONDEFS,
04067                      message ("Macro %s specified with %d args, defined with %d", 
04068                               fname, noparams, paramno),
04069                      g_currentloc);
04070 
04071                   uentry_showWhereSpecified (e2);
04072                   uentry_resetParams (e2, pn);
04073                 }
04074             }
04075           else
04076             {
04077               uentry_resetParams (e2, pn);
04078             }
04079         }
04080     }
04081   else
04082     {
04083       /*
04084       ** the form should be:
04085       **
04086       ** # define newname oldname
04087       ** where oldname refers to a function matching the specification
04088       ** of newname.
04089       */
04090 
04091       if (unknownm)
04092         {
04093           sRef_setGlobalScope ();
04094           usymtab_supGlobalEntry (uentry_makeVariableLoc (fname, ctype_unknown));
04095           sRef_clearGlobalScope ();
04096         }
04097       else
04098         {
04099           context_setMacroMissingParams ();
04100         }
04101     }
04102   
04103   
04104   /* context_setuentryList (pn); */
04105   usymtab_enterScope ();
04106 
04107   fileloc_free (loc);
04108   cstring_free (fname);
04109 
04110   return res;
04111 }
04112 
04113 static bool handleSpecial (char *yyt)
04114 {
04115   char *l = mstring_create (MAX_NAME_LENGTH);
04116   static bool reportcpp = FALSE;
04117   int lineno = 0;
04118   char c;
04119   char *ol;
04120   cstring olc;
04121   
04122   strcpy (l, yyt + 1);
04123 
04124   /* Need to safe original l for deallocating. */
04125   ol = l;
04126 
04127   l += strlen (yyt) - 1;
04128   
04129   while ((c = char_fromInt (lminput ())) != '\n' && c != '\0')
04130     {
04131       *l++ = c;
04132     }
04133 
04134   *l = '\0';
04135   olc = cstring_fromChars (ol);
04136   
04137   if (cstring_equalPrefix (olc, "pragma"))
04138     {
04139       char *pname = mstring_create (longUnsigned_fromInt (MAX_PRAGMA_LEN));
04140       char *opname = pname;
04141       char *ptr = ol + 6; /* pragma is six characters, plus space */
04142       int len = 0;
04143       
04144       
04145       /* skip whitespace */
04146       while (((c = *ptr) != '\0') && isspace (c))
04147         {
04148           ptr++;
04149         }
04150 
04151       
04152       while (((c = *ptr) != '\0') && !isspace (c))
04153         {
04154           len++;
04155 
04156           if (len > MAX_PRAGMA_LEN)
04157             {
04158               break;
04159             }
04160 
04161           ptr++;
04162           *pname++ = c;
04163         }
04164 
04165       *pname = '\0';
04166       
04167       if (len == PRAGMA_LEN_EXPAND 
04168           && mstring_equal (opname, PRAGMA_EXPAND))
04169         {
04170           cstring exname = cstring_undefined;
04171           uentry ue;
04172           
04173           ptr++; 
04174           while (((c = *ptr) != '\0') && !isspace (c))
04175             {
04176               exname = cstring_appendChar (exname, c);
04177               ptr++;
04178             }
04179              
04180           
04181           ue = usymtab_lookupExposeGlob (exname);
04182           
04183           if (uentry_isExpandedMacro (ue))
04184             {
04185               if (fileloc_isPreproc (uentry_whereDefined (ue)))
04186                 {
04187                   fileloc_setColumn (g_currentloc, 1);
04188                   uentry_setDefined (ue, g_currentloc);
04189                 }
04190             }
04191 
04192           cstring_free (exname);
04193         }
04194     }
04195   else if (cstring_equalPrefix (olc, "ident"))
04196     {
04197       /* Some pre-processors will leave these in the code.  Ignore rest of line */
04198     }
04199   /*
04200   ** Yuk...Win32 filenames can have spaces in them...we need to read
04201   ** to the matching end quote.
04202   */
04203   else if ((sscanf (ol, "line %d \"", &lineno) == 1)
04204            || (sscanf (ol, " %d \"", &lineno) == 1))
04205     {
04206       char *tmp = ol;
04207       char *fname;
04208       fileId fid;
04209 
04210       while (*tmp != '\"' && *tmp != '\0')
04211         {
04212           tmp++;
04213         }
04214 
04215       llassert (*tmp == '\"');
04216 
04217       tmp++;
04218       fname = tmp;
04219       
04220       while (*tmp != '\"' && *tmp != '\0')
04221         {
04222           tmp++;
04223         }
04224 
04225       llassert (*tmp == '\"');
04226 
04227       *tmp = '\0';
04228 
04229       DPRINTF (("fname: %s", fname));
04230 
04231 # if defined(OS2) || defined(MSDOS) || defined(WIN32)
04232 
04233       /*
04234       ** DOS-like path delimiters get delivered in pairs, something like 
04235       ** \"..\\\\file.h\", so we have to make it normal again. We do NOT
04236       ** remove the pre dirs yet as we usually specify tmp paths relative
04237       ** to the current directory, so tmp files would not get found in
04238       ** the hash table.  If this method fails we try it again later. 
04239       */
04240 
04241       {
04242         char *stmp = fname;
04243         
04244         /*
04245         ** Skip past the drive marker.
04246         */
04247         
04248         DPRINTF (("stmp: %s / %s", stmp, fname));
04249         
04250         if (strchr (stmp, ':') != NULL)
04251           {
04252             stmp = strchr (stmp, ':') + 1;
04253           }
04254         
04255         DPRINTF (("stmp: %s / %s", stmp, fname));
04256         
04257         while ((stmp = strchr (stmp, CONNECTCHAR)) != NULL )
04258           {
04259             if (*(stmp+1) == CONNECTCHAR)
04260               {
04261                 memmove (stmp, stmp+1, strlen (stmp));
04262               }
04263             
04264             stmp++;
04265             DPRINTF (("stmp: %s / %s", stmp, fname));
04266           }
04267         
04268         DPRINTF (("Now: base = %s", fname));
04269         
04270         fid = fileTable_lookupBase (context_fileTable (),
04271                                     cstring_fromChars (fname));
04272         if (!(fileId_isValid (fid)))
04273           {
04274             fname = removePreDirs (fname);
04275             fid = fileTable_lookupBase (context_fileTable (),
04276                                         cstring_fromChars (fname));
04277           }
04278       }
04279 # else  /* !defined(OS2) && !defined(MSDOS) */
04280       fname = removePreDirs (fname);
04281       fid = fileTable_lookupBase (context_fileTable (),
04282                                   cstring_fromChars (fname));
04283 # endif /* !defined(OS2) && !defined(MSDOS) */
04284       
04285       if (!(fileId_isValid (fid)))
04286         {
04287           if (isHeaderFile (cstring_fromChars (fname)))
04288             {
04289               fid = fileTable_addHeaderFile (context_fileTable (), 
04290                                              cstring_fromChars (fname));
04291             }
04292           else
04293             {
04294               fid = fileTable_addFile (context_fileTable (), 
04295                                        cstring_fromChars (fname));
04296             }
04297         }
04298       
04299       setFileLine (fid, lineno);
04300     }
04301   else if ((sscanf (ol, "line %d", &lineno) == 1) 
04302            || (sscanf (ol, " %d", &lineno) == 1))
04303     {
04304       setLine (lineno); /* next line is <cr> */
04305     }
04306   else
04307     {
04308       if (mstring_equal (ol, "")) {
04309         DPRINTF (("Empty pp command!"));
04310         /*
04311         ** evs 2000-05-16: This is a horrible kludge, to get around a bug (well, difficulty) in the pre-processor.
04312         ** We handle a plain # in the input file, by echoing it, and ignoring it in the post-pp-file.
04313         */
04314         mstring_free (ol);
04315         return FALSE;
04316       } else {
04317         if (!reportcpp)
04318           {
04319             
04320           } else {
04321             llbug (message ("File contains preprocessor command: #%s", 
04322                             cstring_fromChars (ol)));
04323             reportcpp = TRUE;
04324           }
04325       }
04326       
04327       sfree (ol);
04328       return TRUE;
04329     }
04330 
04331   sfree (ol);
04332   return FALSE;
04333 }
04334   
04335 static int handleLlSpecial ()
04336 { 
04337   int ic; 
04338   char c;
04339   char *s = mstring_createEmpty ();
04340   char *os; 
04341   int tok;
04342   int charsread = 0;
04343 
04344   while (((ic = ninput ()) != 0) && isalpha (ic))
04345     {
04346       c = (char) ic;
04347       s = mstring_append (s, c);
04348       charsread++;
04349     }
04350 
04351   os = s;
04352 
04353   if (charsread == 0 && ic == (int) AFTER_COMMENT_MARKER[0])
04354     {
04355       ic = ninput ();
04356 
04357       llassert (ic == AFTER_COMMENT_MARKER[1]);
04358 
04359             
04360       if (isProcessingGlobMods () && (*s == '\0'))
04361         {
04362           sfree (os);
04363           return QNOMODS; /* special token no modifications token */
04364         }
04365       else
04366         {
04367           ;
04368         }
04369     }
04370   
04371   tok = commentMarkerToken (cstring_fromChars (os));
04372 
04373   if (tok != BADTOK)
04374     {
04375       tokLength = charsread;
04376       sfree (os);
04377       inSpecPart = TRUE;
04378       return tok;
04379     }
04380   
04381   /* Add rest of the comment */
04382   
04383   if (ic != 0 && ic != EOF)
04384     {
04385       c = (char) ic;
04386 
04387       
04388       s = mstring_append (s, c);
04389       charsread++;
04390 
04391       while (((ic = ninput ()) != 0) && (ic != EOF)
04392              && (ic != AFTER_COMMENT_MARKER[0]))
04393         {
04394           c = (char) ic;
04395           s = mstring_append (s, c);
04396           charsread++;
04397         }
04398     }
04399 
04400   if (ic == AFTER_COMMENT_MARKER[0]) 
04401     {
04402       int nc = ninput ();
04403       llassert ((char) nc ==  AFTER_COMMENT_MARKER[1]);
04404       charsread++;
04405     }
04406 
04407   
04408   os = s;
04409 
04410   while (*s == ' ' || *s == '\t' || *s == '\n') 
04411     {
04412       s++;
04413     }
04414 
04415   if (*s == '-' || *s == '+' || *s == '=') /* setting flags */
04416     {
04417       c = *s;
04418 
04419       while (c == '-' || c == '+' || c == '=')
04420         {
04421           ynm set = ynm_fromCodeChar (c);
04422           cstring thisflag;
04423 
04424           s++;
04425           
04426           thisflag = cstring_fromChars (s);
04427           
04428           while ((c = *s) != '\0' && (c != '-') && (c != '=')
04429                  && (c != '+') && (c != ' ') && (c != '\t') && (c != '\n'))
04430             {
04431               s++;
04432             }
04433 
04434           *s = '\0';
04435 
04436           if (!context_getFlag (FLG_NOCOMMENTS))
04437             {
04438               cstring flagname = thisflag;
04439               flagcode fflag = identifyFlag (flagname);
04440                 
04441               if (flagcode_isSkip (fflag))
04442                 {
04443                   ;
04444                 }
04445               else if (flagcode_isInvalid (fflag))
04446                 {
04447                   if (isMode (flagname))
04448                     {
04449                       if (ynm_isMaybe (set))
04450                         {
04451                           llerror
04452                             (FLG_BADFLAG, 
04453                              message 
04454                              ("Stylized comment attempts to restore flag %s.  "
04455                               "A mode flag cannot be restored.",
04456                               flagname));
04457                         }
04458                       else
04459                         {
04460                           context_setMode (flagname);
04461                         }
04462                     }
04463                   else
04464                     {
04465                       llerror
04466                         (FLG_BADFLAG, 
04467                          message ("Unrecognized option in stylized comment: %s", 
04468                                   flagname));
04469                     }
04470                 }
04471               else if (flagcode_isGlobalFlag (fflag))
04472                 {
04473                   llerror
04474                     (FLG_BADFLAG, 
04475                      message 
04476                      ("Stylized comment attempts to set global flag %s.  "
04477                       "A global flag cannot be set locally.",
04478                       flagname));
04479                 }
04480               else
04481                 {
04482                   context_fileSetFlag (fflag, set);
04483                   
04484                   if (flagcode_hasArgument (fflag))
04485                     {
04486                       if (ynm_isMaybe (set))
04487                         {
04488                           llerror
04489                             (FLG_BADFLAG, 
04490                              message 
04491                              ("Stylized comment attempts to restore flag %s.  "
04492                               "A flag for setting a value cannot be restored.",
04493                               flagname));
04494                         }
04495                       else
04496                         { /* cut-and-pastied from llmain...blecch */
04497                           cstring extra = cstring_undefined;
04498                           char *rest;
04499                           char *orest;
04500                           char rchar;
04501                           
04502                           *s = c;
04503                           rest = mstring_copy (s);
04504                           orest = rest;
04505                           *s = '\0';
04506                           
04507                           while ((rchar = *rest) != '\0'
04508                                  && (isspace (rchar)))
04509                             {
04510                               rest++;
04511                               s++;
04512                             }
04513                           
04514                           while ((rchar = *rest) != '\0'
04515                                  && !isspace (rchar))
04516                             {
04517                               extra = cstring_appendChar (extra, rchar);
04518                               rest++; 
04519                               s++;
04520                             }
04521                           
04522                           sfree (orest);
04523                           
04524                           if (cstring_isUndefined (extra))
04525                             {
04526                               llerror 
04527                                 (FLG_BADFLAG,
04528                                  message
04529                                  ("Flag %s (in stylized comment) must be followed by an argument",
04530                                   flagcode_unparse (fflag)));
04531                             }
04532                           else
04533                             {
04534                               s--;
04535                               
04536                               if (flagcode_hasValue (fflag))
04537                                 {
04538                                   setValueFlag (fflag, extra);
04539                                 }
04540                               else if (flagcode_hasString (fflag))
04541                                 {
04542                                   setStringFlag (fflag, extra);
04543                                 }
04544                               else
04545                                 {
04546                                   BADEXIT;
04547                                 }
04548                             }
04549                         }
04550                     }
04551                 }
04552             }
04553           else
04554             {
04555               ;
04556             }
04557 
04558           *s = c;
04559           while ((c == ' ') || (c == '\t') || (c == '\n'))
04560             {
04561               c = *(++s);
04562             }
04563         } 
04564 
04565       if (context_inHeader () && !isArtificial (cstring_fromChars (os)))
04566         {
04567                   context_addComment (cstring_fromCharsNew (os));
04568         }
04569       else
04570         {
04571           ;
04572         }
04573     }
04574   else
04575     {
04576       char *t = s;
04577       int macrocode;
04578       char tchar = '\0';
04579 
04580       while (*s != '\0' && *s != ' ' && *s != '\t' && *s != '\n') 
04581         {
04582           s++;
04583         }
04584 
04585       if (*s != '\0') 
04586         {
04587           tchar = *s;
04588           *s = '\0';
04589           s++;
04590         }
04591       
04592       t = cstring_toCharsSafe (cstring_downcase (cstring_fromChars (t)));
04593       macrocode = tokenMacroCode (cstring_fromChars (t));
04594 
04595       if (macrocode != BADTOK)
04596         {
04597           tokLength = mstring_length (t);
04598 
04599           
04600           sfree (t);
04601           sfree (os);
04602 
04603           if (macrocode == SKIPTOK)
04604             {
04605               return BADTOK;
04606             }
04607 
04608           return macrocode;
04609         }
04610       
04611       if (context_inHeader ())
04612         {
04613           if (tchar != '\0')
04614             {
04615               *(s-1) = tchar;
04616             }
04617           
04618           if ((context_inMacro () || context_inGlobalContext ())
04619               && macrocode != SKIPTOK
04620               && !isArtificial (cstring_fromChars (os))) 
04621             {
04622               context_addComment (cstring_fromCharsNew (os));
04623             }
04624           else
04625             {
04626               ; 
04627             }
04628           
04629           if (tchar != '\0')
04630             {
04631               *(s-1) = '\0';
04632             }
04633         }
04634 
04635       if (mstring_equal (t, "ignore"))
04636         {
04637           if (!context_getFlag (FLG_NOCOMMENTS))
04638             {
04639               context_enterSuppressRegion ();
04640             }
04641         }
04642       else if ((*t == 'i' || *t == 't')
04643                && (*(t + 1) == '\0'))
04644         {
04645           if (!context_getFlag (FLG_NOCOMMENTS)
04646               && (*t == 'i' || context_getFlag (FLG_TMPCOMMENTS)))
04647             {
04648               context_enterSuppressLine (-1); /* infinite suppression */
04649             }
04650         }
04651       else if (((*t == 'i') || (*t == 't'))
04652                && ((*(t + 1) >= '0' && *(t + 1) <= '9')))
04653         {
04654           bool tmpcomment = (*t == 't');
04655           int val = -1; 
04656           char *tt = t; /* don't mangle t, since it is free'd */
04657           char lc = *(++tt);
04658 
04659           if (lc >= '0' && lc <= '9')
04660             {
04661               val = (int)(lc - '0');
04662               
04663               lc = *(++tt);       
04664               while (lc >= '0' && lc <= '9')
04665                 {
04666                   val *= 10;
04667                   val += lc - '0';
04668                   lc = *(++tt);
04669                 }
04670             }
04671 
04672           
04673           if (!context_getFlag (FLG_NOCOMMENTS)
04674               && (!tmpcomment || context_getFlag (FLG_TMPCOMMENTS)))
04675             {
04676               context_enterSuppressLine (val);
04677             }
04678         }
04679       else if (mstring_equal (t, "end"))
04680         {
04681           if (!context_getFlag (FLG_NOCOMMENTS))
04682             {
04683               context_exitSuppressRegion ();
04684             }
04685         }
04686       else if (mstring_equal (t, "notfunction"))
04687         {
04688          ; /* handled by pcpp */
04689         }
04690       else if (mstring_equal (t, "access"))
04691         {
04692           cstring tname;
04693           
04694           while (TRUE)
04695             {
04696               while ((c = *s) && (c == ' ' || c == '\t' || c == '\n'))
04697                 {
04698                   s++;
04699                 }
04700               
04701               if (c == '\0')
04702                 {
04703                    break;
04704                 }
04705 
04706               tname = cstring_fromChars (s);
04707               
04708               while ((c = *s) != '\0' && c != ' ' 
04709                      && c != '\t' && c != '\n' && c != ',') 
04710                 {
04711                   s++;
04712                 }
04713 
04714               *s = '\0';
04715 
04716               
04717               if (!context_getFlag (FLG_NOCOMMENTS) 
04718                   && !context_getFlag (FLG_NOACCESS))
04719                 {
04720                   if (usymtab_existsType (tname))
04721                     {
04722                       usymId uid = usymtab_getTypeId (tname);
04723                       context_addFileAccessType (uid);
04724                     }
04725                   else
04726                     {
04727                       if (!(context_inSuppressRegion ()
04728                             || context_inSuppressZone (g_currentloc)))
04729                         {
04730                           llmsg 
04731                             (message
04732                              ("%q: Unrecognized type %s used in access comment",
04733                               fileloc_unparse (g_currentloc), tname));
04734                         }
04735                     }
04736                 }
04737               
04738               if (c != '\0') 
04739                 {
04740                   s++;
04741                 }
04742               
04743               if (c != ',' && c != ' ')
04744                 {
04745                   break;
04746                 }
04747             }
04748         }
04749       else if (mstring_equal (t, "noaccess"))
04750         {
04751           cstring tname;
04752           char lc;
04753           
04754           while (TRUE)
04755             {
04756               while ((lc = *s) && (lc == ' ' || lc == '\t' || lc == '\n')) 
04757                 {
04758                   s++;
04759                 }
04760               
04761               if (lc == '\0')
04762                 {
04763                  break;
04764                 }
04765 
04766               tname = cstring_fromChars (s);
04767               
04768               while ((lc = *s) != '\0' && lc != ' ' && lc != '\t' 
04769                      && lc != '\n' && lc != ',') 
04770                 {
04771                   s++;
04772                 }
04773 
04774               *s = '\0';
04775 
04776               if (!context_getFlag (FLG_NOCOMMENTS) 
04777                   && !context_getFlag (FLG_NOACCESS))
04778                 {
04779                   if (usymtab_existsType (tname))
04780                     {
04781                       typeId tuid = usymtab_getTypeId (tname);
04782                       
04783                       if (context_couldHaveAccess (tuid))
04784                         {
04785                           context_removeFileAccessType (tuid);
04786                         }
04787                       else
04788                         {
04789                           if (!(context_inSuppressRegion () 
04790                                 || context_inSuppressZone (g_currentloc)))
04791                             {
04792                               uentry ue = usymtab_getTypeEntry (tuid);
04793                               
04794                               if (uentry_isAbstractDatatype (ue))
04795                                 {
04796                                   llmsg
04797                                     (message
04798                                      ("%q: Non-accessible abstract type %s used in noaccess comment",
04799                                       fileloc_unparse (g_currentloc), tname));
04800                                 }
04801                               else
04802                                 {
04803                                   llmsg
04804                                     (message
04805                                      ("%q: Non-abstract type %s used in noaccess comment",
04806                                       fileloc_unparse (g_currentloc), tname));
04807                                 }
04808                             }
04809                         }
04810                     }
04811                   else
04812                     {
04813                       if (!(context_inSuppressRegion () 
04814                             || context_inSuppressZone (g_currentloc)))
04815                         {
04816                           llmsg
04817                             (message
04818                              ("%q: Unrecognized type %s used in noaccess comment",
04819                               fileloc_unparse (g_currentloc), tname));
04820                         }
04821                     }
04822                 }
04823               
04824               if (lc != '\0') 
04825                 {
04826                   s++;
04827                 }
04828               
04829               if (lc != ',' && lc != ' ')
04830                 {
04831                   break;
04832                 }
04833             }
04834         }
04835       else
04836         {
04837           setTokLength (- (2 + charsread));
04838 
04839           voptgenerror (FLG_UNRECOGCOMMENTS, 
04840                         message ("Stylized comment unrecognized: %s", 
04841                                  cstring_fromChars (os)), 
04842                         g_currentloc);
04843         }
04844 
04845       sfree (t);
04846     }
04847   
04848   sfree (os); 
04849   return BADTOK;
04850 }
04851 
04852 static /*@only@*/ cstring makeIdentifier (char *s)
04853 {
04854   char *c = mstring_create (size_toInt (strlen (s)) + 1);
04855   cstring id = cstring_fromChars (c);
04856 
04857   while (isalnum (*s) || (*s == '_') || (*s == '$')) 
04858     {
04859       *c++ = *s++;
04860     }
04861 
04862   *c = '\0';
04863   return (id);
04864 }
04865 
04866 /*@observer@*/ /*@dependent@*/ uentry coerceId (cstring cn)
04867 {
04868   if (!(usymtab_exists (cn)))
04869     {
04870       fileloc loc = fileloc_createExternal ();
04871       
04872       /*
04873       ** We need to put this in a global scope, otherwise the sRef will be deallocated.
04874       */
04875       
04876       uentry ce = uentry_makeUnrecognized (cn, loc);
04877       
04878       if (!context_inIterEnd ())
04879         {
04880           voptgenerror 
04881             (FLG_SYSTEMUNRECOG, 
04882              message ("Unrecognized (possibly system) identifier: %q", 
04883                       uentry_getName (ce)), 
04884              g_currentloc);
04885         }
04886       
04887       return ce;
04888     }
04889   
04890   return (usymtab_lookup (cn));
04891 }
04892 
04893 /*
04894 ** like, coerceId, but doesn't supercede for iters
04895 */
04896 
04897 /*@observer@*/ uentry coerceIterId (cstring cn)
04898 {
04899   if (!(usymtab_exists (cn)))
04900     {
04901       return uentry_undefined;
04902     }
04903   
04904   return (usymtab_lookup (cn));
04905 }
04906 
04907 /*@observer@*/ cstring LastIdentifier ()
04908 {
04909   return (lastidprocessed);
04910 }
04911 
04912 static int processIdentifier (cstring id)
04913 {
04914   uentry le;
04915 
04916   DPRINTF (("Process identifier: %s", id));
04917 
04918   context_clearJustPopped ();
04919   lastidprocessed = id; 
04920 
04921   if (context_inFunctionDecl ())
04922     {
04923       int tok = commentMarkerToken (id);
04924 
04925       if (tok != BADTOK)
04926         {
04927           return tok;
04928         }
04929       else 
04930         {
04931           tok = tokenMacroCode (id);
04932 
04933           if (tok != BADTOK)
04934             {
04935               return tok;
04936             }
04937         }
04938     }
04939 
04940   /* Consider handling: Defined by C99 as static const char __func__[] */
04941 
04942   if (context_getFlag (FLG_GNUEXTENSIONS))
04943     {
04944       int tok = BADTOK;
04945       
04946       if (cstring_equalLit (id, "__stdcall")
04947           || cstring_equalLit (id, "__cdecl")
04948           || cstring_equalLit (id, "__extension__"))
04949         {
04950           return BADTOK;
04951         }
04952       else if (cstring_equalLit (id, "__volatile__"))
04953         {
04954           tok = QVOLATILE;
04955         }
04956       else if (cstring_equalLit (id, "__signed"))
04957         {
04958           tok = QSIGNED;
04959         }
04960       else if (cstring_equalLit (id, "__unsigned"))
04961         {
04962           tok = QUNSIGNED;
04963         }
04964       else if (cstring_equalLit (id, "__const__"))
04965         {
04966           tok = QCONST;
04967         }
04968       else if (cstring_equalLit (id, "__alignof__")) 
04969         {
04970           tok = CALIGNOF; /* alignof is parsed like sizeof */
04971         }
04972       else if (cstring_equalLit (id, "__FUNCTION__")
04973                || cstring_equalLit (id, "__PRETTY_FUNCTION__")) 
04974         {
04975           /* These tokens hold the name of the current function as strings */
04976           yylval.expr = exprNode_stringLiteral (id, fileloc_copy (g_currentloc));
04977           tokLength = 0;
04978           lastWasString = TRUE;
04979           tok = CCONSTANT;
04980           return tok;
04981         }
04982       else if (cstring_equalLit (id, "__attribute__")
04983                || cstring_equalLit (id, "__asm__")
04984                || cstring_equalLit (id, "_asm")
04985                || cstring_equalLit (id, "__asm")
04986                || cstring_equalLit (id, "__declspec"))
04987         {
04988           int depth = 0;
04989           bool useparens = FALSE;
04990           bool usebraces = FALSE;
04991           bool inquote = FALSE;
04992           bool inescape = FALSE;
04993           int ic;
04994 
04995           while ((ic = input ()) != EOF)
04996             {
04997                               
04998               if (inescape)
04999                 {
05000                   inescape = FALSE;
05001                 }
05002               else if (ic == '\\')
05003                 {
05004                   inescape = TRUE;
05005                 }
05006               else if (ic == '\"')
05007                 {
05008                   inquote = !inquote;
05009                 }
05010               else if (!inquote)
05011                 {
05012                   if (ic == '(')
05013                     {
05014                       if (!useparens)
05015                         {
05016                           if (!usebraces)
05017                             {
05018                               useparens = TRUE;
05019                             }
05020                         }
05021 
05022                       if (useparens)
05023                         {
05024                           depth++;
05025                         }
05026                     }
05027                   else if (ic == '{')
05028                     {
05029                       if (!usebraces)
05030                         {
05031                           if (!useparens)
05032                             {
05033                               usebraces = TRUE;
05034                             }
05035                         }
05036 
05037                       if (usebraces)
05038                         {
05039                           depth++;
05040                         }
05041                     }
05042                   else if (ic == ')' && useparens)
05043                     {
05044                       depth--;
05045                       if (depth == 0) break;
05046                     }
05047                   else if (ic == '}' && usebraces)
05048                     {
05049                       depth--;
05050                       if (depth == 0) break;
05051                     }
05052                   else if (ic == '}' 
05053                            && !usebraces && !useparens
05054                            && cstring_equalLit (id, "__asm"))
05055                     {
05056                       /*
05057                       ** We need this because some MS VC++ include files
05058                       ** have __asm mov ... }
05059                       ** Its a kludge, but otherwise would need to parse
05060                       ** the asm code!
05061                       */ 
05062                       return TRBRACE;
05063                     }
05064                 }
05065 
05066               if (ic == '\n')
05067                 {
05068                   context_incLineno ();
05069 
05070                   if (cstring_equalLit (id, "__asm")
05071                       && !useparens && !usebraces)
05072                     {
05073                       break;
05074                     }
05075                 }
05076             }
05077           
05078           llassert ((useparens && ic == ')')
05079                     || (usebraces && ic == '}')
05080                     || (!useparens && !usebraces));
05081 
05082           return BADTOK;
05083         }
05084       else if (cstring_equalLit (id, "inline")
05085                || cstring_equalLit (id, "__inline")
05086                || cstring_equalLit (id, "_inline")
05087                || cstring_equalLit (id, "__inline__"))
05088         {
05089           tok = QINLINE;
05090         }
05091       
05092       if (tok != BADTOK)
05093         {
05094           RETURN_TOK (tok);
05095         }
05096     }
05097 
05098   le = usymtab_lookupSafe (id);
05099 
05100   /*@-dependenttrans@*/
05101   
05102   if (uentry_isIter (le))
05103     {
05104       yylval.entry = le;
05105       return (ITER_NAME);
05106     }
05107   else if (uentry_isEndIter (le))
05108     {
05109       yylval.entry = le;
05110       return (ITER_ENDNAME);
05111     }
05112   else if (uentry_isUndefined (le))
05113     {
05114       yylval.cname = id;
05115 
05116       /* avoid parse errors for certain system built ins */
05117 
05118       if (g_expectingTypeName && (cstring_firstChar (id) == '_')
05119           && (cstring_secondChar (id) == '_'))
05120         {
05121           return (TYPE_NAME_OR_ID);
05122         }
05123 
05124       return (NEW_IDENTIFIER);
05125     }
05126   else if (!uentry_isDeclared (le) && !uentry_isCodeDefined (le))
05127     {
05128       if (uentry_isDatatype (le))
05129         {
05130           yylval.cname = id;
05131           return (NEW_IDENTIFIER);
05132         }
05133       else
05134         {
05135           yylval.entry = le;              
05136           return (IDENTIFIER); 
05137         }
05138     }
05139   else if (uentry_isDatatype (le))
05140     {
05141       if (!g_expectingTypeName)
05142         {
05143           yylval.cname = id;
05144 
05145           return (NEW_IDENTIFIER);
05146         }
05147       else
05148         {
05149           yylval.ctyp = uentry_getAbstractType (le);
05150           
05151           uentry_setUsed (le, g_currentloc);
05152           return (TYPE_NAME);
05153         }
05154     }
05155   else
05156     {
05157       yylval.entry = le;            
05158       return (IDENTIFIER); 
05159     }
05160 
05161   /*@=dependenttrans@*/
05162 }
05163 
05164 static bool processHashIdentifier (/*@only@*/ cstring id)
05165 {
05166   if (context_inMacro () || context_inIterDef () ||
05167       context_inIterEnd ())
05168     {
05169       uentry le;
05170       
05171       context_clearJustPopped ();
05172 
05173       lastidprocessed = id; 
05174       le = usymtab_lookupSafe (id);
05175 
05176       if (uentry_isParam (le) || uentry_isRefParam (le))
05177         {
05178           return TRUE;
05179         }
05180       else
05181         {
05182           return FALSE;
05183         }
05184     }
05185   else
05186     {
05187       cstring_free (id);
05188       return FALSE;
05189     }
05190 }
05191 
05192 
05193 static /*@only@*/ exprNode processString ()
05194 {
05195   exprNode res;
05196   fileloc loc;
05197   char *nl = strchr (yytext, '\n');
05198   cstring ns = cstring_fromCharsNew (yytext);
05199 
05200   if (nl == NULL)
05201     {
05202       loc = fileloc_copy (g_currentloc);
05203       addColumn (cstring_length (ns));
05204     }
05205   else
05206     {
05207       char *lastnl = nl;
05208 
05209       loc = fileloc_copy (g_currentloc);
05210 
05211       context_incLineno ();
05212       
05213       while ((nl = strchr ((nl + 1), '\n')) != NULL)
05214         {
05215           context_incLineno ();
05216           lastnl = nl;
05217         }
05218     }
05219 
05220     
05221   res = exprNode_stringLiteral (ns, loc);
05222   return (res);
05223 }
05224 
05225 static 
05226 char processChar ()
05227 {
05228   char fchar;
05229   char next;
05230 
05231   llassert (*yytext != '\0');
05232   fchar = *(yytext + 1);
05233   if (fchar != '\\') return fchar;
05234   
05235   next = *(yytext + 2);
05236   
05237   switch (next)
05238     {
05239     case 'n': return '\n';
05240     case 't': return '\t';
05241     case '\"': return '\"';
05242     case '\'': return '\'';
05243     case '\\': return '\\';
05244     default: return '\0';
05245     }
05246 }
05247 
05248 static
05249 double processFloat ()
05250 {
05251   double ret = atof (yytext);
05252 
05253     return (ret);
05254 }
05255 
05256 static
05257 long processHex ()
05258 {
05259   int index = 2;
05260   long val = 0;
05261 
05262   llassert (yytext[0] == '0'
05263             && (yytext[1] == 'X' || yytext[1] == 'x'));
05264 
05265   while (yytext[index] != '\0') {
05266     int tval;
05267     char c = yytext[index];
05268 
05269     if (c >= '0' && c <= '9') {
05270       tval = (int) c - (int) '0';
05271     } else if (c >= 'A' && c <= 'F') {
05272       tval = (int) c - (int) 'A' + 10;
05273     } else if (c >= 'a' && c <= 'f') {
05274       tval = (int) c - (int) 'a' + 10;
05275     } else if (c == 'U' || c == 'L' || c == 'u' || c == 'l') {
05276       index++;
05277       while (yytext[index] != '\0') {
05278         if (c == 'U' || c == 'L' || c == 'u' || c == 'l') {
05279           ;
05280         } else {
05281           voptgenerror
05282             (FLG_SYNTAX, 
05283              message ("Invalid character (%c) following specifier in hex constant: %s",
05284                       c, cstring_fromChars (yytext)),
05285              g_currentloc);
05286         }
05287         index++;
05288       }
05289 
05290       break;
05291     } else {
05292       voptgenerror
05293         (FLG_SYNTAX, 
05294          message ("Invalid character (%c) in hex constant: %s",
05295                   c, cstring_fromChars (yytext)),
05296          g_currentloc);
05297       break;
05298     }
05299 
05300     val = (val * 16) + tval;
05301     index++;
05302   }
05303 
05304   DPRINTF (("Hex constant: %s = %ld", yytext, val));
05305   return val;
05306 }
05307 
05308 static
05309 long processOctal ()
05310 {
05311   int index = 1;
05312   long val = 0;
05313 
05314   llassert (yytext[0] == '0' && yytext[1] != 'X' && yytext[1] != 'x');
05315     
05316   while (yytext[index] != '\0') {
05317     int tval;
05318     char c = yytext[index];
05319     
05320     if (c >= '0' && c <= '7') {
05321       tval = (int) c - (int) '0';
05322     } else {
05323       voptgenerror
05324         (FLG_SYNTAX, 
05325          message ("Invalid character (%c) in octal constant: %s",
05326                   c, cstring_fromChars (yytext)),
05327          g_currentloc);
05328       break;
05329     }
05330 
05331     val = (val * 8) + tval;
05332     index++;
05333   }
05334 
05335   DPRINTF (("Octal constant: %s = %ld", yytext, val));
05336   return val;
05337 }
05338 
05339 static
05340 long processDec ()
05341 {
05342   return (atol (yytext));
05343 }
05344 
05345 static int
05346 processSpec (int tok)
05347 {
05348   size_t length = strlen (yytext);
05349 
05350   
05351   if (inSpecPart)
05352     {
05353       setTokLengthT (length);
05354       RETURN_TOK (tok);
05355     }
05356   else
05357     {
05358       
05359       context_saveLocation ();
05360       setTokLengthT (length);
05361       return (processIdentifier (makeIdentifier (yytext)));
05362     }
05363 }

Generated at Fri Nov 3 18:57:42 2000 for LCLint by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000