- Main Page
- Namespaces
- Classes
- Files
- Related Pages

# /Users/fpy/titan-1-5-MBARI/Mers/Models/CCA/Io/Mof/MOFReader.yy.cpp

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