Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

protomakeLex.cpp

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

Generated on Mon Dec 1 17:00:23 2003 for Protomake by doxygen1.3