/home/coin/SVN-release/OS-1.0.0/OS/src/OSParsers/parseosss.cpp

Go to the documentation of this file.
00001 #line 2 "/Users/kmartin/Documents/files/code/cpp/OScpp/COIN-OS/OS/src/OSParsers/parseosss.cpp"
00002 
00003 #line 4 "/Users/kmartin/Documents/files/code/cpp/OScpp/COIN-OS/OS/src/OSParsers/parseosss.cpp"
00004 
00005 #define  YY_INT_ALIGNED short int
00006 
00007 /* A lexical scanner generated by flex */
00008 
00009 #define FLEX_SCANNER
00010 #define YY_FLEX_MAJOR_VERSION 2
00011 #define YY_FLEX_MINOR_VERSION 5
00012 #define YY_FLEX_SUBMINOR_VERSION 33
00013 #if YY_FLEX_SUBMINOR_VERSION > 0
00014 #define FLEX_BETA
00015 #endif
00016 
00017 /* First, we deal with  platform-specific or compiler-specific issues. */
00018 
00019 /* begin standard C headers. */
00020 #include <stdio.h>
00021 #include <string.h>
00022 #include <errno.h>
00023 #include <stdlib.h>
00024 
00025 /* end standard C headers. */
00026 
00027 /* flex integer type definitions */
00028 
00029 #ifndef FLEXINT_H
00030 #define FLEXINT_H
00031 
00032 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
00033 
00034 #if __STDC_VERSION__ >= 199901L
00035 
00036 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
00037  * if you want the limit (max/min) macros for int types. 
00038  */
00039 #ifndef __STDC_LIMIT_MACROS
00040 #define __STDC_LIMIT_MACROS 1
00041 #endif
00042 
00043 #include <inttypes.h>
00044 typedef int8_t flex_int8_t;
00045 typedef uint8_t flex_uint8_t;
00046 typedef int16_t flex_int16_t;
00047 typedef uint16_t flex_uint16_t;
00048 typedef int32_t flex_int32_t;
00049 typedef uint32_t flex_uint32_t;
00050 #else
00051 typedef signed char flex_int8_t;
00052 typedef short int flex_int16_t;
00053 typedef int flex_int32_t;
00054 typedef unsigned char flex_uint8_t; 
00055 typedef unsigned short int flex_uint16_t;
00056 typedef unsigned int flex_uint32_t;
00057 #endif /* ! C99 */
00058 
00059 /* Limits of integral types. */
00060 #ifndef INT8_MIN
00061 #define INT8_MIN               (-128)
00062 #endif
00063 #ifndef INT16_MIN
00064 #define INT16_MIN              (-32767-1)
00065 #endif
00066 #ifndef INT32_MIN
00067 #define INT32_MIN              (-2147483647-1)
00068 #endif
00069 #ifndef INT8_MAX
00070 #define INT8_MAX               (127)
00071 #endif
00072 #ifndef INT16_MAX
00073 #define INT16_MAX              (32767)
00074 #endif
00075 #ifndef INT32_MAX
00076 #define INT32_MAX              (2147483647)
00077 #endif
00078 #ifndef UINT8_MAX
00079 #define UINT8_MAX              (255U)
00080 #endif
00081 #ifndef UINT16_MAX
00082 #define UINT16_MAX             (65535U)
00083 #endif
00084 #ifndef UINT32_MAX
00085 #define UINT32_MAX             (4294967295U)
00086 #endif
00087 
00088 #endif /* ! FLEXINT_H */
00089 
00090 #ifdef __cplusplus
00091 
00092 /* The "const" storage-class-modifier is valid. */
00093 #define YY_USE_CONST
00094 
00095 #else   /* ! __cplusplus */
00096 
00097 #if __STDC__
00098 
00099 #define YY_USE_CONST
00100 
00101 #endif  /* __STDC__ */
00102 #endif  /* ! __cplusplus */
00103 
00104 #ifdef YY_USE_CONST
00105 #define yyconst const
00106 #else
00107 #define yyconst
00108 #endif
00109 
00110 /* Returned upon end-of-file. */
00111 #define YY_NULL 0
00112 
00113 /* Promotes a possibly negative, possibly signed char to an unsigned
00114  * integer for use as an array index.  If the signed char is negative,
00115  * we want to instead treat it as an 8-bit unsigned char, hence the
00116  * double cast.
00117  */
00118 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
00119 
00120 /* An opaque pointer. */
00121 #ifndef YY_TYPEDEF_YY_SCANNER_T
00122 #define YY_TYPEDEF_YY_SCANNER_T
00123 typedef void* yyscan_t;
00124 #endif
00125 
00126 /* For convenience, these vars (plus the bison vars far below)
00127    are macros in the reentrant scanner. */
00128 #define yyin yyg->yyin_r
00129 #define yyout yyg->yyout_r
00130 #define yyextra yyg->yyextra_r
00131 #define yyleng yyg->yyleng_r
00132 #define yytext yyg->yytext_r
00133 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
00134 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
00135 #define yy_flex_debug yyg->yy_flex_debug_r
00136 
00137 int ossslex_init (yyscan_t* scanner);
00138 
00139 /* Enter a start condition.  This macro really ought to take a parameter,
00140  * but we do it the disgusting crufty way forced on us by the ()-less
00141  * definition of BEGIN.
00142  */
00143 #define BEGIN yyg->yy_start = 1 + 2 *
00144 
00145 /* Translate the current start state into a value that can be later handed
00146  * to BEGIN to return to the state.  The YYSTATE alias is for lex
00147  * compatibility.
00148  */
00149 #define YY_START ((yyg->yy_start - 1) / 2)
00150 #define YYSTATE YY_START
00151 
00152 /* Action number for EOF rule of a given start state. */
00153 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
00154 
00155 /* Special action meaning "start processing a new file". */
00156 #define YY_NEW_FILE osssrestart(yyin ,yyscanner )
00157 
00158 #define YY_END_OF_BUFFER_CHAR 0
00159 
00160 /* Size of default input buffer. */
00161 #ifndef YY_BUF_SIZE
00162 #define YY_BUF_SIZE 16384
00163 #endif
00164 
00165 /* The state buf must be large enough to hold one state per character in the main buffer.
00166  */
00167 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
00168 
00169 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
00170 #define YY_TYPEDEF_YY_BUFFER_STATE
00171 typedef struct yy_buffer_state *YY_BUFFER_STATE;
00172 #endif
00173 
00174 #define EOB_ACT_CONTINUE_SCAN 0
00175 #define EOB_ACT_END_OF_FILE 1
00176 #define EOB_ACT_LAST_MATCH 2
00177 
00178     /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
00179      *       access to the local variable yy_act. Since yyless() is a macro, it would break
00180      *       existing scanners that call yyless() from OUTSIDE ossslex. 
00181      *       One obvious solution it to make yy_act a global. I tried that, and saw
00182      *       a 5% performance hit in a non-yylineno scanner, because yy_act is
00183      *       normally declared as a register variable-- so it is not worth it.
00184      */
00185     #define  YY_LESS_LINENO(n) \
00186             do { \
00187                 int yyl;\
00188                 for ( yyl = n; yyl < yyleng; ++yyl )\
00189                     if ( yytext[yyl] == '\n' )\
00190                         --yylineno;\
00191             }while(0)
00192     
00193 /* Return all but the first "n" matched characters back to the input stream. */
00194 #define yyless(n) \
00195         do \
00196                 { \
00197                 /* Undo effects of setting up yytext. */ \
00198         int yyless_macro_arg = (n); \
00199         YY_LESS_LINENO(yyless_macro_arg);\
00200                 *yy_cp = yyg->yy_hold_char; \
00201                 YY_RESTORE_YY_MORE_OFFSET \
00202                 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
00203                 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
00204                 } \
00205         while ( 0 )
00206 
00207 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
00208 
00209 /* The following is because we cannot portably get our hands on size_t
00210  * (without autoconf's help, which isn't available because we want
00211  * flex-generated scanners to compile on their own).
00212  */
00213 
00214 #ifndef YY_TYPEDEF_YY_SIZE_T
00215 #define YY_TYPEDEF_YY_SIZE_T
00216 typedef unsigned int yy_size_t;
00217 #endif
00218 
00219 #ifndef YY_STRUCT_YY_BUFFER_STATE
00220 #define YY_STRUCT_YY_BUFFER_STATE
00221 struct yy_buffer_state
00222         {
00223         FILE *yy_input_file;
00224 
00225         char *yy_ch_buf;                /* input buffer */
00226         char *yy_buf_pos;               /* current position in input buffer */
00227 
00228         /* Size of input buffer in bytes, not including room for EOB
00229          * characters.
00230          */
00231         yy_size_t yy_buf_size;
00232 
00233         /* Number of characters read into yy_ch_buf, not including EOB
00234          * characters.
00235          */
00236         int yy_n_chars;
00237 
00238         /* Whether we "own" the buffer - i.e., we know we created it,
00239          * and can realloc() it to grow it, and should free() it to
00240          * delete it.
00241          */
00242         int yy_is_our_buffer;
00243 
00244         /* Whether this is an "interactive" input source; if so, and
00245          * if we're using stdio for input, then we want to use getc()
00246          * instead of fread(), to make sure we stop fetching input after
00247          * each newline.
00248          */
00249         int yy_is_interactive;
00250 
00251         /* Whether we're considered to be at the beginning of a line.
00252          * If so, '^' rules will be active on the next match, otherwise
00253          * not.
00254          */
00255         int yy_at_bol;
00256 
00257     int yy_bs_lineno; 
00258     int yy_bs_column; 
00260         /* Whether to try to fill the input buffer when we reach the
00261          * end of it.
00262          */
00263         int yy_fill_buffer;
00264 
00265         int yy_buffer_status;
00266 
00267 #define YY_BUFFER_NEW 0
00268 #define YY_BUFFER_NORMAL 1
00269         /* When an EOF's been seen but there's still some text to process
00270          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
00271          * shouldn't try reading from the input source any more.  We might
00272          * still have a bunch of tokens to match, though, because of
00273          * possible backing-up.
00274          *
00275          * When we actually see the EOF, we change the status to "new"
00276          * (via osssrestart()), so that the user can continue scanning by
00277          * just pointing yyin at a new input file.
00278          */
00279 #define YY_BUFFER_EOF_PENDING 2
00280 
00281         };
00282 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
00283 
00284 /* We provide macros for accessing buffer states in case in the
00285  * future we want to put the buffer states in a more general
00286  * "scanner state".
00287  *
00288  * Returns the top of the stack, or NULL.
00289  */
00290 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
00291                           ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
00292                           : NULL)
00293 
00294 /* Same as previous macro, but useful when we know that the buffer stack is not
00295  * NULL or when we need an lvalue. For internal use only.
00296  */
00297 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
00298 
00299 void osssrestart (FILE *input_file ,yyscan_t yyscanner );
00300 void osss_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
00301 YY_BUFFER_STATE osss_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
00302 void osss_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
00303 void osss_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
00304 void ossspush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
00305 void ossspop_buffer_state (yyscan_t yyscanner );
00306 
00307 static void osssensure_buffer_stack (yyscan_t yyscanner );
00308 static void osss_load_buffer_state (yyscan_t yyscanner );
00309 static void osss_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
00310 
00311 #define YY_FLUSH_BUFFER osss_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
00312 
00313 YY_BUFFER_STATE osss_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
00314 YY_BUFFER_STATE osss_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
00315 YY_BUFFER_STATE osss_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
00316 
00317 void *osssalloc (yy_size_t ,yyscan_t yyscanner );
00318 void *osssrealloc (void *,yy_size_t ,yyscan_t yyscanner );
00319 void osssfree (void * ,yyscan_t yyscanner );
00320 
00321 #define yy_new_buffer osss_create_buffer
00322 
00323 #define yy_set_interactive(is_interactive) \
00324         { \
00325         if ( ! YY_CURRENT_BUFFER ){ \
00326         osssensure_buffer_stack (yyscanner); \
00327                 YY_CURRENT_BUFFER_LVALUE =    \
00328             osss_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
00329         } \
00330         YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
00331         }
00332 
00333 #define yy_set_bol(at_bol) \
00334         { \
00335         if ( ! YY_CURRENT_BUFFER ){\
00336         osssensure_buffer_stack (yyscanner); \
00337                 YY_CURRENT_BUFFER_LVALUE =    \
00338             osss_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
00339         } \
00340         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
00341         }
00342 
00343 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
00344 
00345 /* Begin user sect3 */
00346 
00347 #define ossswrap(n) 1
00348 #define YY_SKIP_YYWRAP
00349 
00350 typedef unsigned char YY_CHAR;
00351 
00352 typedef int yy_state_type;
00353 
00354 #define yytext_ptr yytext_r
00355 
00356 static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
00357 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  ,yyscan_t yyscanner);
00358 static int yy_get_next_buffer (yyscan_t yyscanner );
00359 static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
00360 
00361 /* Done after the current pattern has been matched and before the
00362  * corresponding action - sets up yytext.
00363  */
00364 #define YY_DO_BEFORE_ACTION \
00365         yyg->yytext_ptr = yy_bp; \
00366         yyleng = (size_t) (yy_cp - yy_bp); \
00367         yyg->yy_hold_char = *yy_cp; \
00368         *yy_cp = '\0'; \
00369         yyg->yy_c_buf_p = yy_cp;
00370 
00371 #define YY_NUM_RULES 16
00372 #define YY_END_OF_BUFFER 17
00373 /* This struct is not used in this scanner,
00374    but its presence is necessary. */
00375 struct yy_trans_info
00376         {
00377         flex_int32_t yy_verify;
00378         flex_int32_t yy_nxt;
00379         };
00380 static yyconst flex_int16_t yy_accept[170] =
00381     {   0,
00382         1,    1,   17,   15,    1,    1,   15,    1,    0,    0,
00383         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00384         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00385         0,    0,    0,    0,    0,    0,    0,    0,    0,   12,
00386         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00387        11,    0,   12,    0,    0,    0,    0,    0,    0,    0,
00388         0,    0,    0,    0,   11,    0,    3,    0,    6,    0,
00389         0,    0,    4,    0,    0,    0,    0,    0,    0,    3,
00390         0,    6,    0,    0,    0,    4,    0,    0,    0,    0,
00391         2,    0,    0,    0,    0,    0,    0,   13,    0,   14,
00392 
00393         0,    2,    0,    5,    0,    0,    0,    0,    0,   13,
00394         0,   14,    0,    5,    0,    0,    0,    0,    0,    7,
00395         0,    0,    0,    0,    7,    0,    8,    0,    0,    0,
00396         8,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00397         0,    0,    0,    0,    0,    0,    0,    0,   10,    0,
00398         0,    0,    0,    0,    0,    0,   10,    0,    9,    0,
00399         0,    0,    0,    0,    0,    0,    0,    0,    0
00400     } ;
00401 
00402 static yyconst flex_int32_t yy_ec[256] =
00403     {   0,
00404         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
00405         1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
00406         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00407         1,    2,    1,    4,    1,    5,    1,    1,    1,    1,
00408         1,    1,    1,    1,    6,    5,    5,    5,    5,    5,
00409         5,    5,    5,    5,    5,    5,    5,    5,    1,    1,
00410         1,    1,    1,    1,    5,    5,    5,    7,    5,    5,
00411         5,    5,    8,    9,    5,   10,   11,    5,   12,    5,
00412         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
00413         1,    1,    1,    1,    5,    1,   13,   14,   15,   16,
00414 
00415        17,   18,   19,   20,   21,    5,   22,   23,   24,   25,
00416        26,   27,    5,   28,   29,   30,   31,   32,   33,    5,
00417         5,    5,    1,    1,    1,    5,    1,    1,    1,    1,
00418         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00419         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00420         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00421         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00422         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00423         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00424         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00425 
00426         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00427         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00428         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00429         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00430         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00431         1,    1,    1,    1,    1
00432     } ;
00433 
00434 static yyconst flex_int32_t yy_meta[34] =
00435     {   0,
00436         1,    2,    2,    2,    2,    2,    2,    2,    2,    2,
00437         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
00438         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
00439         2,    2,    2
00440     } ;
00441 
00442 static yyconst flex_int16_t yy_base[195] =
00443     {   0,
00444         0,    2,  304,  305,    7,    9,    0,   14,  275,  276,
00445       276,  273,  276,  269,    1,  271,  271,  266,  265,   17,
00446         7,  265,  269,  258,  272,  279,   20,   28,  265,  264,
00447       263,  262,  252,  251,  253,  260,  259,   34,   36,   39,
00448        42,   44,   40,   47,  258,  261,  260,  257,  246,   50,
00449        53,   55,  305,   58,   61,  249,  242,   64,  257,  243,
00450       242,   67,  239,   68,  305,   70,   73,   75,   78,  241,
00451       237,   80,   83,  249,   86,   88,   90,   93,   94,  305,
00452        96,  305,  234,  237,   98,  305,   93,  103,  106,  108,
00453       111,  114,  233,  231,  235,  243,  116,  119,  121,  124,
00454 
00455       126,  305,  128,  131,  134,  229,  243,  227,  135,  305,
00456       137,  305,  139,  305,  142,  145,  243,  235,  146,  149,
00457       152,  224,  227,  154,  305,  156,  159,  231,  235,  161,
00458       305,  224,  164,  224,  166,  168,  231,  151,  230,  156,
00459       175,  216,  222,  218,  213,  217,  218,  171,  187,  231,
00460       216,  223,  209,  220,  203,  177,  305,  208,  305,  211,
00461       211,  214,  216,  212,  220,  195,  219,  208,  305,  195,
00462       222,  221,  197,  199,  220,  191,  190,  201,  203,  205,
00463       185,  184,  182,  207,  181,  209,  211,  213,   49,  215,
00464        11,  217,    5,  219
00465 
00466     } ;
00467 
00468 static yyconst flex_int16_t yy_def[195] =
00469     {   0,
00470       170,  170,  169,  169,  169,  169,  169,  169,  169,  169,
00471       169,  169,  169,  169,  169,  169,  169,  169,  169,  169,
00472       169,  169,  169,  169,  169,  169,  169,  171,  169,  169,
00473       169,  169,  169,  169,  169,  169,  169,  172,  173,  171,
00474       169,  169,  169,  169,  169,  169,  169,  169,  169,  174,
00475       172,  173,  169,  175,  176,  169,  169,  177,  169,  169,
00476       169,  169,  169,  174,  169,  178,  175,  179,  176,  169,
00477       169,  180,  177,  169,  169,  169,  181,  169,  178,  169,
00478       179,  169,  169,  169,  180,  169,  169,  182,  183,  184,
00479       181,  185,  169,  169,  169,  169,  186,  182,  187,  183,
00480 
00481       184,  169,  188,  185,  169,  169,  169,  169,  186,  169,
00482       187,  169,  188,  169,  189,  169,  169,  169,  190,  189,
00483       191,  169,  169,  190,  169,  192,  191,  169,  169,  192,
00484       169,  169,  169,  169,  169,  169,  169,  169,  169,  169,
00485       193,  169,  169,  169,  169,  169,  169,  194,  193,  169,
00486       169,  169,  169,  169,  169,  194,  169,  169,  169,  169,
00487       169,  169,  169,  169,  169,  169,  169,  169,    0,  169,
00488       169,  169,  169,  169,  169,  169,  169,  169,  169,  169,
00489       169,  169,  169,  169,  169,  169,  169,  169,  169,  169,
00490       169,  169,  169,  169
00491 
00492     } ;
00493 
00494 static yyconst flex_int16_t yy_nxt[339] =
00495     {   0,
00496       169,    5,    6,    5,    6,    7,  149,    7,    8,    8,
00497         8,    8,  127,    9,   10,    8,    8,   22,   28,   28,
00498        11,   38,   38,   12,   13,   14,   23,   29,   15,   28,
00499        28,   39,   30,   31,   32,   38,   38,   50,   53,   53,
00500       169,  169,  169,   54,   54,   55,   55,   56,   58,   58,
00501       120,   57,   65,   65,  169,  169,  169,   53,   53,   54,
00502        54,   66,   55,   55,   68,   58,   58,   72,   77,   77,
00503        65,   65,   80,   80,  169,  169,  169,   82,   82,  169,
00504       169,  169,   86,   86,  169,  169,  169,   88,   88,   89,
00505        89,   77,   77,   90,   92,   92,   80,   80,   82,   82,
00506 
00507        86,   86,   95,   96,   88,   88,   97,   89,   89,   99,
00508       102,  102,  169,  169,  169,   92,   92,  103,  110,  110,
00509       169,  169,  169,  112,  112,  169,  169,  169,  102,  102,
00510       114,  114,  169,  169,  169,  115,  115,  110,  110,  112,
00511       112,  114,  114,  115,  115,  119,  121,  121,  125,  125,
00512       169,  169,  169,  121,  121,  126,  125,  125,  131,  131,
00513       169,  169,  169,  131,  131,  135,  135,  135,  135,  141,
00514       141,  143,  146,  157,  157,  144,  141,  141,  148,  157,
00515       157,  147,  104,  100,  137,   98,   91,  138,  169,  169,
00516       169,   73,   69,  139,  140,    4,    4,   52,   52,   64,
00517 
00518        64,   79,   79,   81,   81,   85,   85,  101,  101,  109,
00519       109,  111,  111,  113,  113,  124,  124,  130,  130,  156,
00520       156,   67,   51,   40,  159,  159,  168,  167,  166,  165,
00521       159,  164,  159,  163,  162,  159,  161,  160,  159,  158,
00522       155,  154,  153,  152,  151,  150,  145,  142,  136,  134,
00523       133,  132,  129,  128,  123,  122,  118,  117,  116,  108,
00524       107,  106,  105,   94,   93,   87,   84,   83,   78,   76,
00525        75,   74,   71,   70,   63,   62,   61,   60,   59,   49,
00526        48,   47,   46,   45,   44,   43,   42,   41,   37,   36,
00527        35,   34,   33,   27,   26,   25,   24,   21,   20,   19,
00528 
00529        18,   17,   16,  169,    3,  169,  169,  169,  169,  169,
00530       169,  169,  169,  169,  169,  169,  169,  169,  169,  169,
00531       169,  169,  169,  169,  169,  169,  169,  169,  169,  169,
00532       169,  169,  169,  169,  169,  169,  169,  169
00533     } ;
00534 
00535 static yyconst flex_int16_t yy_chk[339] =
00536     {   0,
00537         0,    1,    1,    2,    2,    1,  193,    2,    5,    5,
00538         6,    6,  191,    7,    7,    8,    8,   15,   20,   20,
00539         7,   27,   27,    7,    7,    7,   15,   21,    7,   28,
00540        28,   28,   21,   21,   21,   38,   38,   38,   39,   39,
00541        40,   40,   40,   41,   41,   42,   42,   43,   44,   44,
00542       189,   43,   50,   50,   51,   51,   51,   52,   52,   54,
00543        54,   54,   55,   55,   55,   58,   58,   58,   62,   62,
00544        64,   64,   66,   66,   67,   67,   67,   68,   68,   69,
00545        69,   69,   72,   72,   73,   73,   73,   75,   75,   76,
00546        76,   77,   77,   77,   78,   78,   79,   79,   81,   81,
00547 
00548        85,   85,   87,   87,   88,   88,   88,   89,   89,   89,
00549        90,   90,   91,   91,   91,   92,   92,   92,   97,   97,
00550        98,   98,   98,   99,   99,  100,  100,  100,  101,  101,
00551       103,  103,  104,  104,  104,  105,  105,  109,  109,  111,
00552       111,  113,  113,  115,  115,  115,  116,  116,  119,  119,
00553       120,  120,  120,  121,  121,  121,  124,  124,  126,  126,
00554       127,  127,  127,  130,  130,  133,  133,  135,  135,  136,
00555       136,  138,  140,  148,  148,  138,  141,  141,  141,  156,
00556       156,  140,  185,  183,  135,  182,  181,  135,  149,  149,
00557       149,  177,  176,  135,  135,  170,  170,  173,  173,  174,
00558 
00559       174,  178,  178,  179,  179,  180,  180,  184,  184,  186,
00560       186,  187,  187,  188,  188,  190,  190,  192,  192,  194,
00561       194,  175,  172,  171,  168,  167,  166,  165,  164,  163,
00562       162,  161,  160,  158,  155,  154,  153,  152,  151,  150,
00563       147,  146,  145,  144,  143,  142,  139,  137,  134,  132,
00564       129,  128,  123,  122,  118,  117,  108,  107,  106,   96,
00565        95,   94,   93,   84,   83,   74,   71,   70,   63,   61,
00566        60,   59,   57,   56,   49,   48,   47,   46,   45,   37,
00567        36,   35,   34,   33,   32,   31,   30,   29,   26,   25,
00568        24,   23,   22,   19,   18,   17,   16,   14,   13,   12,
00569 
00570        11,   10,    9,    3,  169,  169,  169,  169,  169,  169,
00571       169,  169,  169,  169,  169,  169,  169,  169,  169,  169,
00572       169,  169,  169,  169,  169,  169,  169,  169,  169,  169,
00573       169,  169,  169,  169,  169,  169,  169,  169
00574     } ;
00575 
00576 /* Table of booleans, true if rule could match eol. */
00577 static yyconst flex_int32_t yy_rule_can_match_eol[17] =
00578     {   0,
00579 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0,     };
00580 
00581 /* The intent behind this definition is that it'll catch
00582  * any uses of REJECT which flex missed.
00583  */
00584 #define REJECT reject_used_but_not_detected
00585 #define yymore() yymore_used_but_not_detected
00586 #define YY_MORE_ADJ 0
00587 #define YY_RESTORE_YY_MORE_OFFSET
00588 #line 1 "/Users/kmartin/Documents/files/code/cpp/OScpp/COIN-OS/OS/src/OSParsers/parseosss.l"
00589 
00603 #line 17 "/Users/kmartin/Documents/files/code/cpp/OScpp/COIN-OS/OS/src/OSParsers/parseosss.l"
00604 
00605 
00606 #include <iostream>
00607 #include "OSConfig.h"
00608 
00609 #ifdef HAVE_CSTRING
00610 # include <cstring>
00611 #else
00612 # ifdef HAVE_STRING_H
00613 #  include <string.h>
00614 # else
00615 #  error "don't have header file for string"
00616 # endif
00617 #endif
00618 
00619 #ifdef HAVE_CSTDIO
00620 # include <cstdio>
00621 #else
00622 # ifdef HAVE_STDIO_H
00623 #  include <stdio.h>
00624 # else
00625 #  error "don't have header file for stdio"
00626 # endif
00627 #endif
00628 #include "ErrorClass.h"
00629 #include <sstream>   
00630 #include "osOptionsStruc.h" 
00631 
00632 
00633 using std::cout;
00634 using std::endl;
00635 using std::ostringstream;
00636 
00637   
00638 #define PARSERDEBUG
00639 #ifdef PARSERDEBUG
00640         #define YY_PRINT  printf("%s", yytext);
00641 #else     
00642         #define YY_PRINT  ;
00643 #endif
00644 #ifdef WIN_
00645 #define YY_NO_UNISTD_H
00646 #include <io.h>
00647 #include <process.h>
00648 #endif
00649 #define YY_EXTRA_TYPE struct osOptionsStruc*
00650 
00651 void setyyextra( osOptionsStruc *osoptions, void* scanner);
00652 
00653  /*
00654  * INPUTS:
00655  * -osil xxx.osil (file name on local machine of optimization instance, 
00656  *       this is "" by default, however if this remains "" a problem
00657  *               instance must be specified in the osol file)
00658  * -osol xxx.osol (file name on local machine of solver options, 
00659  *       default default value is "")
00660  * -osrl xxx.osrl (file name on local machine where the optimization 
00661  *       result is put, default is "")
00662  * -serviceLocation location URL (the URL  of the server that is called 
00663  *       remotely if the problem not solved locally, default is "")
00664  * -serviceMethod  (send, solve, kill, knock, getJobID, retrieve, 
00665  *       default value is solve)
00666  * -osplInput xxx.ospl  (Not used for now -- ignore)
00667  * -osplOutput xxx.ospl (Not used for now -- ignore)
00668  * -mps xxxx.mps (converts mps format to osil and has same effect as -osil)
00669  * -nl xxxx.nl (converts nl format to osil and has same effect as -osil)
00670  * -solver solverName (the name of the solver to be invoked)
00671  * -browser path location to browser e.g. 
00672  *       /Applications/Firefox.app/Contents/MacOS/firefox (default is "")
00673  * -config pathToConfigFile is the path to a configure file with the problem 
00674  *           parameters
00675  * -insList xxx.dat (used only for LINDO, file location on local 
00676  *       machine of LINDO instruction list)
00677 */
00678         int ossslex_init(void** ptr_yy_globals);
00679 
00680 #line 681 "/Users/kmartin/Documents/files/code/cpp/OScpp/COIN-OS/OS/src/OSParsers/parseosss.cpp"
00681 
00682 #define INITIAL 0
00683 
00684 #ifndef YY_NO_UNISTD_H
00685 /* Special case for "unistd.h", since it is non-ANSI. We include it way
00686  * down here because we want the user's section 1 to have been scanned first.
00687  * The user has a chance to override it with an option.
00688  */
00689 #include <unistd.h>
00690 #endif
00691 
00692 #ifndef YY_EXTRA_TYPE
00693 #define YY_EXTRA_TYPE void *
00694 #endif
00695 
00696 /* Holds the entire state of the reentrant scanner. */
00697 struct yyguts_t
00698     {
00699 
00700     /* User-defined. Not touched by flex. */
00701     YY_EXTRA_TYPE yyextra_r;
00702 
00703     /* The rest are the same as the globals declared in the non-reentrant scanner. */
00704     FILE *yyin_r, *yyout_r;
00705     size_t yy_buffer_stack_top; 
00706     size_t yy_buffer_stack_max; 
00707     YY_BUFFER_STATE * yy_buffer_stack; 
00708     char yy_hold_char;
00709     int yy_n_chars;
00710     int yyleng_r;
00711     char *yy_c_buf_p;
00712     int yy_init;
00713     int yy_start;
00714     int yy_did_buffer_switch_on_eof;
00715     int yy_start_stack_ptr;
00716     int yy_start_stack_depth;
00717     int *yy_start_stack;
00718     yy_state_type yy_last_accepting_state;
00719     char* yy_last_accepting_cpos;
00720 
00721     int yylineno_r;
00722     int yy_flex_debug_r;
00723 
00724     char *yytext_r;
00725     int yy_more_flag;
00726     int yy_more_len;
00727 
00728     }; /* end struct yyguts_t */
00729 
00730 static int yy_init_globals (yyscan_t yyscanner );
00731 
00732 /* Accessor methods to globals.
00733    These are made visible to non-reentrant scanners for convenience. */
00734 
00735 int ossslex_destroy (yyscan_t yyscanner );
00736 
00737 int osssget_debug (yyscan_t yyscanner );
00738 
00739 void osssset_debug (int debug_flag ,yyscan_t yyscanner );
00740 
00741 YY_EXTRA_TYPE osssget_extra (yyscan_t yyscanner );
00742 
00743 void osssset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
00744 
00745 FILE *osssget_in (yyscan_t yyscanner );
00746 
00747 void osssset_in  (FILE * in_str ,yyscan_t yyscanner );
00748 
00749 FILE *osssget_out (yyscan_t yyscanner );
00750 
00751 void osssset_out  (FILE * out_str ,yyscan_t yyscanner );
00752 
00753 int osssget_leng (yyscan_t yyscanner );
00754 
00755 char *osssget_text (yyscan_t yyscanner );
00756 
00757 int osssget_lineno (yyscan_t yyscanner );
00758 
00759 void osssset_lineno (int line_number ,yyscan_t yyscanner );
00760 
00761 /* Macros after this point can all be overridden by user definitions in
00762  * section 1.
00763  */
00764 
00765 #ifndef YY_SKIP_YYWRAP
00766 #ifdef __cplusplus
00767 extern "C" int ossswrap (yyscan_t yyscanner );
00768 #else
00769 extern int ossswrap (yyscan_t yyscanner );
00770 #endif
00771 #endif
00772 
00773     static void yyunput (int c,char *buf_ptr  ,yyscan_t yyscanner);
00774     
00775 #ifndef yytext_ptr
00776 static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
00777 #endif
00778 
00779 #ifdef YY_NEED_STRLEN
00780 static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
00781 #endif
00782 
00783 #ifndef YY_NO_INPUT
00784 
00785 #ifdef __cplusplus
00786 static int yyinput (yyscan_t yyscanner );
00787 #else
00788 static int input (yyscan_t yyscanner );
00789 #endif
00790 
00791 #endif
00792 
00793 /* Amount of stuff to slurp up with each read. */
00794 #ifndef YY_READ_BUF_SIZE
00795 #define YY_READ_BUF_SIZE 8192
00796 #endif
00797 
00798 /* Copy whatever the last rule matched to the standard output. */
00799 #ifndef ECHO
00800 /* This used to be an fputs(), but since the string might contain NUL's,
00801  * we now use fwrite().
00802  */
00803 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
00804 #endif
00805 
00806 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
00807  * is returned in "result".
00808  */
00809 #ifndef YY_INPUT
00810 #define YY_INPUT(buf,result,max_size) \
00811         if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
00812                 { \
00813                 int c = '*'; \
00814                 size_t n; \
00815                 for ( n = 0; n < max_size && \
00816                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
00817                         buf[n] = (char) c; \
00818                 if ( c == '\n' ) \
00819                         buf[n++] = (char) c; \
00820                 if ( c == EOF && ferror( yyin ) ) \
00821                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
00822                 result = n; \
00823                 } \
00824         else \
00825                 { \
00826                 errno=0; \
00827                 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
00828                         { \
00829                         if( errno != EINTR) \
00830                                 { \
00831                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
00832                                 break; \
00833                                 } \
00834                         errno=0; \
00835                         clearerr(yyin); \
00836                         } \
00837                 }\
00838 \
00839 
00840 #endif
00841 
00842 /* No semi-colon after return; correct usage is to write "yyterminate();" -
00843  * we don't want an extra ';' after the "return" because that will cause
00844  * some compilers to complain about unreachable statements.
00845  */
00846 #ifndef yyterminate
00847 #define yyterminate() return YY_NULL
00848 #endif
00849 
00850 /* Number of entries by which start-condition stack grows. */
00851 #ifndef YY_START_STACK_INCR
00852 #define YY_START_STACK_INCR 25
00853 #endif
00854 
00855 /* Report a fatal error. */
00856 #ifndef YY_FATAL_ERROR
00857 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
00858 #endif
00859 
00860 /* end tables serialization structures and prototypes */
00861 
00862 /* Default declaration of generated scanner - a define so the user can
00863  * easily add parameters.
00864  */
00865 #ifndef YY_DECL
00866 #define YY_DECL_IS_OURS 1
00867 
00868 extern int ossslex (yyscan_t yyscanner);
00869 
00870 #define YY_DECL int ossslex (yyscan_t yyscanner)
00871 #endif /* !YY_DECL */
00872 
00873 /* Code executed at the beginning of each rule, after yytext and yyleng
00874  * have been set up.
00875  */
00876 #ifndef YY_USER_ACTION
00877 #define YY_USER_ACTION
00878 #endif
00879 
00880 /* Code executed at the end of each rule. */
00881 #ifndef YY_BREAK
00882 #define YY_BREAK break;
00883 #endif
00884 
00885 #define YY_RULE_SETUP \
00886         YY_USER_ACTION
00887 
00890 YY_DECL
00891 {
00892         register yy_state_type yy_current_state;
00893         register char *yy_cp, *yy_bp;
00894         register int yy_act;
00895     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
00896 
00897 #line 106 "/Users/kmartin/Documents/files/code/cpp/OScpp/COIN-OS/OS/src/OSParsers/parseosss.l"
00898 
00899 
00900 #line 901 "/Users/kmartin/Documents/files/code/cpp/OScpp/COIN-OS/OS/src/OSParsers/parseosss.cpp"
00901 
00902         if ( !yyg->yy_init )
00903                 {
00904                 yyg->yy_init = 1;
00905 
00906 #ifdef YY_USER_INIT
00907                 YY_USER_INIT;
00908 #endif
00909 
00910                 if ( ! yyg->yy_start )
00911                         yyg->yy_start = 1;      /* first start state */
00912 
00913                 if ( ! yyin )
00914                         yyin = stdin;
00915 
00916                 if ( ! yyout )
00917                         yyout = stdout;
00918 
00919                 if ( ! YY_CURRENT_BUFFER ) {
00920                         osssensure_buffer_stack (yyscanner);
00921                         YY_CURRENT_BUFFER_LVALUE =
00922                                 osss_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
00923                 }
00924 
00925                 osss_load_buffer_state(yyscanner );
00926                 }
00927 
00928         while ( 1 )             /* loops until end-of-file is reached */
00929                 {
00930                 yy_cp = yyg->yy_c_buf_p;
00931 
00932                 /* Support of yytext. */
00933                 *yy_cp = yyg->yy_hold_char;
00934 
00935                 /* yy_bp points to the position in yy_ch_buf of the start of
00936                  * the current run.
00937                  */
00938                 yy_bp = yy_cp;
00939 
00940                 yy_current_state = yyg->yy_start;
00941 yy_match:
00942                 do
00943                         {
00944                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
00945                         if ( yy_accept[yy_current_state] )
00946                                 {
00947                                 yyg->yy_last_accepting_state = yy_current_state;
00948                                 yyg->yy_last_accepting_cpos = yy_cp;
00949                                 }
00950                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
00951                                 {
00952                                 yy_current_state = (int) yy_def[yy_current_state];
00953                                 if ( yy_current_state >= 170 )
00954                                         yy_c = yy_meta[(unsigned int) yy_c];
00955                                 }
00956                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
00957                         ++yy_cp;
00958                         }
00959                 while ( yy_base[yy_current_state] != 305 );
00960 
00961 yy_find_action:
00962                 yy_act = yy_accept[yy_current_state];
00963                 if ( yy_act == 0 )
00964                         { /* have to back up */
00965                         yy_cp = yyg->yy_last_accepting_cpos;
00966                         yy_current_state = yyg->yy_last_accepting_state;
00967                         yy_act = yy_accept[yy_current_state];
00968                         }
00969 
00970                 YY_DO_BEFORE_ACTION;
00971 
00972                 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
00973                         {
00974                         int yyl;
00975                         for ( yyl = 0; yyl < yyleng; ++yyl )
00976                                 if ( yytext[yyl] == '\n' )
00977                                            
00978     do{ yylineno++;
00979         yycolumn=0;
00980     }while(0)
00981 ;
00982                         }
00983 
00984 do_action:      /* This label is used only to access EOF actions. */
00985 
00986                 switch ( yy_act )
00987         { /* beginning of action switch */
00988                         case 0: /* must back up */
00989                         /* undo the effects of YY_DO_BEFORE_ACTION */
00990                         *yy_cp = yyg->yy_hold_char;
00991                         yy_cp = yyg->yy_last_accepting_cpos;
00992                         yy_current_state = yyg->yy_last_accepting_state;
00993                         goto yy_find_action;
00994 
00995 case 1:
00996 /* rule 1 can match eol */
00997 YY_RULE_SETUP
00998 #line 108 "/Users/kmartin/Documents/files/code/cpp/OScpp/COIN-OS/OS/src/OSParsers/parseosss.l"
00999 
01000         YY_BREAK
01001 case 2:
01002 /* rule 2 can match eol */
01003 YY_RULE_SETUP
01004 #line 112 "/Users/kmartin/Documents/files/code/cpp/OScpp/COIN-OS/OS/src/OSParsers/parseosss.l"
01005 {
01006         printf("Found option:  %s\n", yytext);  
01007         char *ch = strdup(yytext);
01008         // move past -config
01009         ch+=7;
01010         for(; isspace(*ch); ch++);
01011         std::string str(  ch);
01012         yyextra->configFile = str;
01013         //printf("gsgersdf= %d\n", gster);
01014 }
01015         YY_BREAK
01016 case 3:
01017 /* rule 3 can match eol */
01018 YY_RULE_SETUP
01019 #line 124 "/Users/kmartin/Documents/files/code/cpp/OScpp/COIN-OS/OS/src/OSParsers/parseosss.l"
01020 {
01021         if(yyextra->osilFile == ""){
01022                 printf("Found option:  %s\n", yytext);  
01023                 char *ch = strdup(yytext);
01024                 // move past -osil
01025                 ch+=5;
01026                 for(; isspace(*ch); ch++);
01027                 std::string str(  ch);
01028                 yyextra->osilFile = str;
01029         } 
01030 }
01031         YY_BREAK
01032 case 4:
01033 /* rule 4 can match eol */
01034 YY_RULE_SETUP
01035 #line 136 "/Users/kmartin/Documents/files/code/cpp/OScpp/COIN-OS/OS/src/OSParsers/parseosss.l"
01036 {
01037         if(yyextra->osrlFile == ""){
01038                 printf("Found option:  %s\n", yytext); 
01039                 char *ch = strdup(yytext);
01040                 // move past -osrl
01041                 ch+=5;
01042                 for(; isspace(*ch); ch++);
01043                 std::string str(  ch);
01044                 yyextra->osrlFile = str;
01045         }  
01046 }  
01047         YY_BREAK
01048 case 5:
01049 /* rule 5 can match eol */
01050 YY_RULE_SETUP
01051 #line 148 "/Users/kmartin/Documents/files/code/cpp/OScpp/COIN-OS/OS/src/OSParsers/parseosss.l"
01052 {
01053         if(yyextra->insListFile == ""){
01054                 printf("Found option:  %s\n", yytext); 
01055                 char *ch = strdup(yytext);
01056                 // move past -insList
01057                 ch+=8;
01058                 for(; isspace(*ch); ch++);
01059                 std::string str(  ch);
01060                 yyextra->insListFile = str;
01061         }  
01062 }  
01063         YY_BREAK
01064 case 6:
01065 /* rule 6 can match eol */
01066 YY_RULE_SETUP
01067 #line 160 "/Users/kmartin/Documents/files/code/cpp/OScpp/COIN-OS/OS/src/OSParsers/parseosss.l"
01068 {
01069         if(yyextra->osolFile == ""){
01070                 printf("Found option:  %s\n", yytext); 
01071                 char *ch = strdup(yytext);
01072                 // move past -osol
01073                 ch+=5;
01074                 for(; isspace(*ch); ch++);
01075                 std::string str(  ch);
01076                 yyextra->osolFile = str;  
01077         }
01078 }
01079         YY_BREAK
01080 case 7:
01081 /* rule 7 can match eol */
01082 YY_RULE_SETUP
01083 #line 174 "/Users/kmartin/Documents/files/code/cpp/OScpp/COIN-OS/OS/src/OSParsers/parseosss.l"
01084 {
01085         if(yyextra->osplInputFile == ""){
01086                 printf("Found option:  %s\n", yytext); 
01087                 char *ch = strdup(yytext);
01088                 // move past -osplInput
01089                 ch+=10;
01090                 for(; isspace(*ch); ch++);
01091                 std::string str(  ch);
01092                 yyextra->osplInputFile = str;  
01093         }
01094 }
01095         YY_BREAK
01096 case 8:
01097 /* rule 8 can match eol */
01098 YY_RULE_SETUP
01099 #line 186 "/Users/kmartin/Documents/files/code/cpp/OScpp/COIN-OS/OS/src/OSParsers/parseosss.l"
01100 {
01101         if(yyextra->osplOutputFile == ""){
01102                 printf("Found option:  %s\n", yytext); 
01103                 char *ch = strdup(yytext);
01104                 // move past -osplInput
01105                 ch+=11;
01106                 for(; isspace(*ch); ch++);
01107                 std::string str(  ch);
01108                 yyextra->osplOutputFile = str;  
01109         }
01110 }
01111         YY_BREAK
01112 case 9:
01113 /* rule 9 can match eol */
01114 YY_RULE_SETUP
01115 #line 198 "/Users/kmartin/Documents/files/code/cpp/OScpp/COIN-OS/OS/src/OSParsers/parseosss.l"
01116 {
01117         if(yyextra->serviceMethod == ""){
01118                 printf("Found option:  %s\n", yytext); 
01119                 char *ch = strdup(yytext);
01120                 // move past -serviceMethod
01121                 ch+=14;
01122                 for(; isspace(*ch); ch++);
01123                 std::string str(  ch);
01124                 yyextra->serviceMethod = str; 
01125         }
01126 }
01127         YY_BREAK
01128 case 10:
01129 /* rule 10 can match eol */
01130 YY_RULE_SETUP
01131 #line 210 "/Users/kmartin/Documents/files/code/cpp/OScpp/COIN-OS/OS/src/OSParsers/parseosss.l"
01132 {
01133         if(yyextra->serviceLocation == ""){
01134                 printf("Found option:  %s\n", yytext); 
01135                 yyextra->serviceLocation = strdup(yytext);
01136                 char *ch = strdup(yytext);
01137                 // move past -serviceLocation
01138                 ch+=16;
01139                 for(; isspace(*ch); ch++);
01140                 std::string str(  ch);
01141                 yyextra->serviceLocation = str; 
01142         }
01143 }
01144         YY_BREAK
01145 case 11:
01146 /* rule 11 can match eol */
01147 YY_RULE_SETUP
01148 #line 223 "/Users/kmartin/Documents/files/code/cpp/OScpp/COIN-OS/OS/src/OSParsers/parseosss.l"
01149 {
01150         if(yyextra->mpsFile == ""){
01151                 printf("Found option:  %s\n", yytext); 
01152                 char *ch = strdup(yytext);
01153                 // move past -mps
01154                 ch+=4;
01155                 for(; isspace(*ch); ch++);
01156                 std::string str(  ch);
01157                 yyextra->mpsFile = str; 
01158         }
01159 }
01160         YY_BREAK
01161 case 12:
01162 /* rule 12 can match eol */
01163 YY_RULE_SETUP
01164 #line 235 "/Users/kmartin/Documents/files/code/cpp/OScpp/COIN-OS/OS/src/OSParsers/parseosss.l"
01165 {
01166         if(yyextra->nlFile == ""){
01167                 printf("Found option:  %s\n", yytext);
01168                 char *ch = strdup(yytext);
01169                 // move past -nl
01170                 ch+=3;
01171                 for(; isspace(*ch); ch++);
01172                 std::string str(  ch);
01173                 yyextra->nlFile = str;
01174         } 
01175 }
01176         YY_BREAK
01177 case 13:
01178 /* rule 13 can match eol */
01179 YY_RULE_SETUP
01180 #line 247 "/Users/kmartin/Documents/files/code/cpp/OScpp/COIN-OS/OS/src/OSParsers/parseosss.l"
01181 {
01182         if(yyextra->solverName == ""){
01183                 printf("Found option:  %s\n", yytext); 
01184                 char *ch = strdup(yytext);
01185                 // move past -solver
01186                 ch+=7;
01187                 for(; isspace(*ch); ch++);
01188                 std::string str(  ch);
01189                 yyextra->solverName = str;
01190         } 
01191 }
01192         YY_BREAK
01193 case 14:
01194 /* rule 14 can match eol */
01195 YY_RULE_SETUP
01196 #line 259 "/Users/kmartin/Documents/files/code/cpp/OScpp/COIN-OS/OS/src/OSParsers/parseosss.l"
01197 {
01198         if(yyextra->browser == ""){
01199                 printf("Found option:  %s\n", yytext);  
01200                 char *ch = strdup(yytext);
01201                 // move past -browser
01202                 ch+=8;
01203                 for(; isspace(*ch); ch++);
01204                 std::string str(  ch);
01205                 yyextra->browser = str; 
01206         }
01207 }
01208         YY_BREAK
01209 case 15:
01210 YY_RULE_SETUP
01211 #line 271 "/Users/kmartin/Documents/files/code/cpp/OScpp/COIN-OS/OS/src/OSParsers/parseosss.l"
01212 {
01213         std::string error;
01214         std::ostringstream outStr;
01215         outStr << "ecountered a spurious character in the lexer" << endl;
01216         outStr << "The first character is: ";
01217         outStr <<  yytext;
01218         outStr << endl;
01219         outStr << "See line number: " << yylineno << endl;  
01220         error = outStr.str();
01221         throw ErrorClass( error);  
01222 }
01223         YY_BREAK
01224 case 16:
01225 YY_RULE_SETUP
01226 #line 282 "/Users/kmartin/Documents/files/code/cpp/OScpp/COIN-OS/OS/src/OSParsers/parseosss.l"
01227 ECHO;
01228         YY_BREAK
01229 #line 1230 "/Users/kmartin/Documents/files/code/cpp/OScpp/COIN-OS/OS/src/OSParsers/parseosss.cpp"
01230 case YY_STATE_EOF(INITIAL):
01231         yyterminate();
01232 
01233         case YY_END_OF_BUFFER:
01234                 {
01235                 /* Amount of text matched not including the EOB char. */
01236                 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
01237 
01238                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
01239                 *yy_cp = yyg->yy_hold_char;
01240                 YY_RESTORE_YY_MORE_OFFSET
01241 
01242                 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
01243                         {
01244                         /* We're scanning a new file or input source.  It's
01245                          * possible that this happened because the user
01246                          * just pointed yyin at a new source and called
01247                          * ossslex().  If so, then we have to assure
01248                          * consistency between YY_CURRENT_BUFFER and our
01249                          * globals.  Here is the right place to do so, because
01250                          * this is the first action (other than possibly a
01251                          * back-up) that will match for the new input source.
01252                          */
01253                         yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
01254                         YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
01255                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
01256                         }
01257 
01258                 /* Note that here we test for yy_c_buf_p "<=" to the position
01259                  * of the first EOB in the buffer, since yy_c_buf_p will
01260                  * already have been incremented past the NUL character
01261                  * (since all states make transitions on EOB to the
01262                  * end-of-buffer state).  Contrast this with the test
01263                  * in input().
01264                  */
01265                 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
01266                         { /* This was really a NUL. */
01267                         yy_state_type yy_next_state;
01268 
01269                         yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
01270 
01271                         yy_current_state = yy_get_previous_state( yyscanner );
01272 
01273                         /* Okay, we're now positioned to make the NUL
01274                          * transition.  We couldn't have
01275                          * yy_get_previous_state() go ahead and do it
01276                          * for us because it doesn't know how to deal
01277                          * with the possibility of jamming (and we don't
01278                          * want to build jamming into it because then it
01279                          * will run more slowly).
01280                          */
01281 
01282                         yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
01283 
01284                         yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
01285 
01286                         if ( yy_next_state )
01287                                 {
01288                                 /* Consume the NUL. */
01289                                 yy_cp = ++yyg->yy_c_buf_p;
01290                                 yy_current_state = yy_next_state;
01291                                 goto yy_match;
01292                                 }
01293 
01294                         else
01295                                 {
01296                                 yy_cp = yyg->yy_c_buf_p;
01297                                 goto yy_find_action;
01298                                 }
01299                         }
01300 
01301                 else switch ( yy_get_next_buffer( yyscanner ) )
01302                         {
01303                         case EOB_ACT_END_OF_FILE:
01304                                 {
01305                                 yyg->yy_did_buffer_switch_on_eof = 0;
01306 
01307                                 if ( ossswrap(yyscanner ) )
01308                                         {
01309                                         /* Note: because we've taken care in
01310                                          * yy_get_next_buffer() to have set up
01311                                          * yytext, we can now set up
01312                                          * yy_c_buf_p so that if some total
01313                                          * hoser (like flex itself) wants to
01314                                          * call the scanner after we return the
01315                                          * YY_NULL, it'll still work - another
01316                                          * YY_NULL will get returned.
01317                                          */
01318                                         yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
01319 
01320                                         yy_act = YY_STATE_EOF(YY_START);
01321                                         goto do_action;
01322                                         }
01323 
01324                                 else
01325                                         {
01326                                         if ( ! yyg->yy_did_buffer_switch_on_eof )
01327                                                 YY_NEW_FILE;
01328                                         }
01329                                 break;
01330                                 }
01331 
01332                         case EOB_ACT_CONTINUE_SCAN:
01333                                 yyg->yy_c_buf_p =
01334                                         yyg->yytext_ptr + yy_amount_of_matched_text;
01335 
01336                                 yy_current_state = yy_get_previous_state( yyscanner );
01337 
01338                                 yy_cp = yyg->yy_c_buf_p;
01339                                 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
01340                                 goto yy_match;
01341 
01342                         case EOB_ACT_LAST_MATCH:
01343                                 yyg->yy_c_buf_p =
01344                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
01345 
01346                                 yy_current_state = yy_get_previous_state( yyscanner );
01347 
01348                                 yy_cp = yyg->yy_c_buf_p;
01349                                 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
01350                                 goto yy_find_action;
01351                         }
01352                 break;
01353                 }
01354 
01355         default:
01356                 YY_FATAL_ERROR(
01357                         "fatal flex scanner internal error--no action found" );
01358         } /* end of action switch */
01359                 } /* end of scanning one token */
01360 } /* end of ossslex */
01361 
01362 /* yy_get_next_buffer - try to read in a new buffer
01363  *
01364  * Returns a code representing an action:
01365  *      EOB_ACT_LAST_MATCH -
01366  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
01367  *      EOB_ACT_END_OF_FILE - end of file
01368  */
01369 static int yy_get_next_buffer (yyscan_t yyscanner)
01370 {
01371     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01372         register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
01373         register char *source = yyg->yytext_ptr;
01374         register int number_to_move, i;
01375         int ret_val;
01376 
01377         if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
01378                 YY_FATAL_ERROR(
01379                 "fatal flex scanner internal error--end of buffer missed" );
01380 
01381         if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
01382                 { /* Don't try to fill the buffer, so this is an EOF. */
01383                 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
01384                         {
01385                         /* We matched a single character, the EOB, so
01386                          * treat this as a final EOF.
01387                          */
01388                         return EOB_ACT_END_OF_FILE;
01389                         }
01390 
01391                 else
01392                         {
01393                         /* We matched some text prior to the EOB, first
01394                          * process it.
01395                          */
01396                         return EOB_ACT_LAST_MATCH;
01397                         }
01398                 }
01399 
01400         /* Try to read more data. */
01401 
01402         /* First move last chars to start of buffer. */
01403         number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
01404 
01405         for ( i = 0; i < number_to_move; ++i )
01406                 *(dest++) = *(source++);
01407 
01408         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
01409                 /* don't do the read, it's not guaranteed to return an EOF,
01410                  * just force an EOF
01411                  */
01412                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
01413 
01414         else
01415                 {
01416                         int num_to_read =
01417                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
01418 
01419                 while ( num_to_read <= 0 )
01420                         { /* Not enough room in the buffer - grow it. */
01421 
01422                         /* just a shorter name for the current buffer */
01423                         YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
01424 
01425                         int yy_c_buf_p_offset =
01426                                 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
01427 
01428                         if ( b->yy_is_our_buffer )
01429                                 {
01430                                 int new_size = b->yy_buf_size * 2;
01431 
01432                                 if ( new_size <= 0 )
01433                                         b->yy_buf_size += b->yy_buf_size / 8;
01434                                 else
01435                                         b->yy_buf_size *= 2;
01436 
01437                                 b->yy_ch_buf = (char *)
01438                                         /* Include room in for 2 EOB chars. */
01439                                         osssrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
01440                                 }
01441                         else
01442                                 /* Can't grow it, we don't own it. */
01443                                 b->yy_ch_buf = 0;
01444 
01445                         if ( ! b->yy_ch_buf )
01446                                 YY_FATAL_ERROR(
01447                                 "fatal error - scanner input buffer overflow" );
01448 
01449                         yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
01450 
01451                         num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
01452                                                 number_to_move - 1;
01453 
01454                         }
01455 
01456                 if ( num_to_read > YY_READ_BUF_SIZE )
01457                         num_to_read = YY_READ_BUF_SIZE;
01458 
01459                 /* Read in more data. */
01460                 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
01461                         yyg->yy_n_chars, num_to_read );
01462 
01463                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
01464                 }
01465 
01466         if ( yyg->yy_n_chars == 0 )
01467                 {
01468                 if ( number_to_move == YY_MORE_ADJ )
01469                         {
01470                         ret_val = EOB_ACT_END_OF_FILE;
01471                         osssrestart(yyin  ,yyscanner);
01472                         }
01473 
01474                 else
01475                         {
01476                         ret_val = EOB_ACT_LAST_MATCH;
01477                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
01478                                 YY_BUFFER_EOF_PENDING;
01479                         }
01480                 }
01481 
01482         else
01483                 ret_val = EOB_ACT_CONTINUE_SCAN;
01484 
01485         yyg->yy_n_chars += number_to_move;
01486         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
01487         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
01488 
01489         yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
01490 
01491         return ret_val;
01492 }
01493 
01494 /* yy_get_previous_state - get the state just before the EOB char was reached */
01495 
01496     static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
01497 {
01498         register yy_state_type yy_current_state;
01499         register char *yy_cp;
01500     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01501 
01502         yy_current_state = yyg->yy_start;
01503 
01504         for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
01505                 {
01506                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
01507                 if ( yy_accept[yy_current_state] )
01508                         {
01509                         yyg->yy_last_accepting_state = yy_current_state;
01510                         yyg->yy_last_accepting_cpos = yy_cp;
01511                         }
01512                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01513                         {
01514                         yy_current_state = (int) yy_def[yy_current_state];
01515                         if ( yy_current_state >= 170 )
01516                                 yy_c = yy_meta[(unsigned int) yy_c];
01517                         }
01518                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01519                 }
01520 
01521         return yy_current_state;
01522 }
01523 
01524 /* yy_try_NUL_trans - try to make a transition on the NUL character
01525  *
01526  * synopsis
01527  *      next_state = yy_try_NUL_trans( current_state );
01528  */
01529     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state , yyscan_t yyscanner)
01530 {
01531         register int yy_is_jam;
01532     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
01533         register char *yy_cp = yyg->yy_c_buf_p;
01534 
01535         register YY_CHAR yy_c = 1;
01536         if ( yy_accept[yy_current_state] )
01537                 {
01538                 yyg->yy_last_accepting_state = yy_current_state;
01539                 yyg->yy_last_accepting_cpos = yy_cp;
01540                 }
01541         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01542                 {
01543                 yy_current_state = (int) yy_def[yy_current_state];
01544                 if ( yy_current_state >= 170 )
01545                         yy_c = yy_meta[(unsigned int) yy_c];
01546                 }
01547         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01548         yy_is_jam = (yy_current_state == 169);
01549 
01550         return yy_is_jam ? 0 : yy_current_state;
01551 }
01552 
01553     static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
01554 {
01555         register char *yy_cp;
01556     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01557 
01558     yy_cp = yyg->yy_c_buf_p;
01559 
01560         /* undo effects of setting up yytext */
01561         *yy_cp = yyg->yy_hold_char;
01562 
01563         if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
01564                 { /* need to shift things up to make room */
01565                 /* +2 for EOB chars. */
01566                 register int number_to_move = yyg->yy_n_chars + 2;
01567                 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
01568                                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
01569                 register char *source =
01570                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
01571 
01572                 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
01573                         *--dest = *--source;
01574 
01575                 yy_cp += (int) (dest - source);
01576                 yy_bp += (int) (dest - source);
01577                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
01578                         yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
01579 
01580                 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
01581                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
01582                 }
01583 
01584         *--yy_cp = (char) c;
01585 
01586     if ( c == '\n' ){
01587         --yylineno;
01588     }
01589 
01590         yyg->yytext_ptr = yy_bp;
01591         yyg->yy_hold_char = *yy_cp;
01592         yyg->yy_c_buf_p = yy_cp;
01593 }
01594 
01595 #ifndef YY_NO_INPUT
01596 #ifdef __cplusplus
01597     static int yyinput (yyscan_t yyscanner)
01598 #else
01599     static int input  (yyscan_t yyscanner)
01600 #endif
01601 
01602 {
01603         int c;
01604     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01605 
01606         *yyg->yy_c_buf_p = yyg->yy_hold_char;
01607 
01608         if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
01609                 {
01610                 /* yy_c_buf_p now points to the character we want to return.
01611                  * If this occurs *before* the EOB characters, then it's a
01612                  * valid NUL; if not, then we've hit the end of the buffer.
01613                  */
01614                 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
01615                         /* This was really a NUL. */
01616                         *yyg->yy_c_buf_p = '\0';
01617 
01618                 else
01619                         { /* need more input */
01620                         int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
01621                         ++yyg->yy_c_buf_p;
01622 
01623                         switch ( yy_get_next_buffer( yyscanner ) )
01624                                 {
01625                                 case EOB_ACT_LAST_MATCH:
01626                                         /* This happens because yy_g_n_b()
01627                                          * sees that we've accumulated a
01628                                          * token and flags that we need to
01629                                          * try matching the token before
01630                                          * proceeding.  But for input(),
01631                                          * there's no matching to consider.
01632                                          * So convert the EOB_ACT_LAST_MATCH
01633                                          * to EOB_ACT_END_OF_FILE.
01634                                          */
01635 
01636                                         /* Reset buffer status. */
01637                                         osssrestart(yyin ,yyscanner);
01638 
01639                                         /*FALLTHROUGH*/
01640 
01641                                 case EOB_ACT_END_OF_FILE:
01642                                         {
01643                                         if ( ossswrap(yyscanner ) )
01644                                                 return EOF;
01645 
01646                                         if ( ! yyg->yy_did_buffer_switch_on_eof )
01647                                                 YY_NEW_FILE;
01648 #ifdef __cplusplus
01649                                         return yyinput(yyscanner);
01650 #else
01651                                         return input(yyscanner);
01652 #endif
01653                                         }
01654 
01655                                 case EOB_ACT_CONTINUE_SCAN:
01656                                         yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
01657                                         break;
01658                                 }
01659                         }
01660                 }
01661 
01662         c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
01663         *yyg->yy_c_buf_p = '\0';        /* preserve yytext */
01664         yyg->yy_hold_char = *++yyg->yy_c_buf_p;
01665 
01666         if ( c == '\n' )
01667                    
01668     do{ yylineno++;
01669         yycolumn=0;
01670     }while(0)
01671 ;
01672 
01673         return c;
01674 }
01675 #endif  /* ifndef YY_NO_INPUT */
01676 
01682     void osssrestart  (FILE * input_file , yyscan_t yyscanner)
01683 {
01684     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01685 
01686         if ( ! YY_CURRENT_BUFFER ){
01687         osssensure_buffer_stack (yyscanner);
01688                 YY_CURRENT_BUFFER_LVALUE =
01689             osss_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
01690         }
01691 
01692         osss_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
01693         osss_load_buffer_state(yyscanner );
01694 }
01695 
01700     void osss_switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)
01701 {
01702     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01703 
01704         /* TODO. We should be able to replace this entire function body
01705          * with
01706          *              ossspop_buffer_state();
01707          *              ossspush_buffer_state(new_buffer);
01708      */
01709         osssensure_buffer_stack (yyscanner);
01710         if ( YY_CURRENT_BUFFER == new_buffer )
01711                 return;
01712 
01713         if ( YY_CURRENT_BUFFER )
01714                 {
01715                 /* Flush out information for old buffer. */
01716                 *yyg->yy_c_buf_p = yyg->yy_hold_char;
01717                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
01718                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
01719                 }
01720 
01721         YY_CURRENT_BUFFER_LVALUE = new_buffer;
01722         osss_load_buffer_state(yyscanner );
01723 
01724         /* We don't actually know whether we did this switch during
01725          * EOF (ossswrap()) processing, but the only time this flag
01726          * is looked at is after ossswrap() is called, so it's safe
01727          * to go ahead and always set it.
01728          */
01729         yyg->yy_did_buffer_switch_on_eof = 1;
01730 }
01731 
01732 static void osss_load_buffer_state  (yyscan_t yyscanner)
01733 {
01734     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01735         yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
01736         yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
01737         yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
01738         yyg->yy_hold_char = *yyg->yy_c_buf_p;
01739 }
01740 
01747     YY_BUFFER_STATE osss_create_buffer  (FILE * file, int  size , yyscan_t yyscanner)
01748 {
01749         YY_BUFFER_STATE b;
01750     
01751         b = (YY_BUFFER_STATE) osssalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
01752         if ( ! b )
01753                 YY_FATAL_ERROR( "out of dynamic memory in osss_create_buffer()" );
01754 
01755         b->yy_buf_size = size;
01756 
01757         /* yy_ch_buf has to be 2 characters longer than the size given because
01758          * we need to put in 2 end-of-buffer characters.
01759          */
01760         b->yy_ch_buf = (char *) osssalloc(b->yy_buf_size + 2 ,yyscanner );
01761         if ( ! b->yy_ch_buf )
01762                 YY_FATAL_ERROR( "out of dynamic memory in osss_create_buffer()" );
01763 
01764         b->yy_is_our_buffer = 1;
01765 
01766         osss_init_buffer(b,file ,yyscanner);
01767 
01768         return b;
01769 }
01770 
01775     void osss_delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
01776 {
01777     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01778 
01779         if ( ! b )
01780                 return;
01781 
01782         if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
01783                 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
01784 
01785         if ( b->yy_is_our_buffer )
01786                 osssfree((void *) b->yy_ch_buf ,yyscanner );
01787 
01788         osssfree((void *) b ,yyscanner );
01789 }
01790 
01791 #ifndef __cplusplus
01792 extern int isatty (int );
01793 #endif /* __cplusplus */
01794     
01795 /* Initializes or reinitializes a buffer.
01796  * This function is sometimes called more than once on the same buffer,
01797  * such as during a osssrestart() or at EOF.
01798  */
01799     static void osss_init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)
01800 
01801 {
01802         int oerrno = errno;
01803     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01804 
01805         osss_flush_buffer(b ,yyscanner);
01806 
01807         b->yy_input_file = file;
01808         b->yy_fill_buffer = 1;
01809 
01810     /* If b is the current buffer, then osss_init_buffer was _probably_
01811      * called from osssrestart() or through yy_get_next_buffer.
01812      * In that case, we don't want to reset the lineno or column.
01813      */
01814     if (b != YY_CURRENT_BUFFER){
01815         b->yy_bs_lineno = 1;
01816         b->yy_bs_column = 0;
01817     }
01818 
01819         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
01820     
01821         errno = oerrno;
01822 }
01823 
01828     void osss_flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
01829 {
01830     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01831         if ( ! b )
01832                 return;
01833 
01834         b->yy_n_chars = 0;
01835 
01836         /* We always need two end-of-buffer characters.  The first causes
01837          * a transition to the end-of-buffer state.  The second causes
01838          * a jam in that state.
01839          */
01840         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
01841         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
01842 
01843         b->yy_buf_pos = &b->yy_ch_buf[0];
01844 
01845         b->yy_at_bol = 1;
01846         b->yy_buffer_status = YY_BUFFER_NEW;
01847 
01848         if ( b == YY_CURRENT_BUFFER )
01849                 osss_load_buffer_state(yyscanner );
01850 }
01851 
01858 void ossspush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
01859 {
01860     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01861         if (new_buffer == NULL)
01862                 return;
01863 
01864         osssensure_buffer_stack(yyscanner);
01865 
01866         /* This block is copied from osss_switch_to_buffer. */
01867         if ( YY_CURRENT_BUFFER )
01868                 {
01869                 /* Flush out information for old buffer. */
01870                 *yyg->yy_c_buf_p = yyg->yy_hold_char;
01871                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
01872                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
01873                 }
01874 
01875         /* Only push if top exists. Otherwise, replace top. */
01876         if (YY_CURRENT_BUFFER)
01877                 yyg->yy_buffer_stack_top++;
01878         YY_CURRENT_BUFFER_LVALUE = new_buffer;
01879 
01880         /* copied from osss_switch_to_buffer. */
01881         osss_load_buffer_state(yyscanner );
01882         yyg->yy_did_buffer_switch_on_eof = 1;
01883 }
01884 
01889 void ossspop_buffer_state (yyscan_t yyscanner)
01890 {
01891     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01892         if (!YY_CURRENT_BUFFER)
01893                 return;
01894 
01895         osss_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
01896         YY_CURRENT_BUFFER_LVALUE = NULL;
01897         if (yyg->yy_buffer_stack_top > 0)
01898                 --yyg->yy_buffer_stack_top;
01899 
01900         if (YY_CURRENT_BUFFER) {
01901                 osss_load_buffer_state(yyscanner );
01902                 yyg->yy_did_buffer_switch_on_eof = 1;
01903         }
01904 }
01905 
01906 /* Allocates the stack if it does not exist.
01907  *  Guarantees space for at least one push.
01908  */
01909 static void osssensure_buffer_stack (yyscan_t yyscanner)
01910 {
01911         int num_to_alloc;
01912     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
01913 
01914         if (!yyg->yy_buffer_stack) {
01915 
01916                 /* First allocation is just for 2 elements, since we don't know if this
01917                  * scanner will even need a stack. We use 2 instead of 1 to avoid an
01918                  * immediate realloc on the next call.
01919          */
01920                 num_to_alloc = 1;
01921                 yyg->yy_buffer_stack = (struct yy_buffer_state**)osssalloc
01922                                                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
01923                                                                 , yyscanner);
01924                 
01925                 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
01926                                 
01927                 yyg->yy_buffer_stack_max = num_to_alloc;
01928                 yyg->yy_buffer_stack_top = 0;
01929                 return;
01930         }
01931 
01932         if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
01933 
01934                 /* Increase the buffer to prepare for a possible push. */
01935                 int grow_size = 8 /* arbitrary grow size */;
01936 
01937                 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
01938                 yyg->yy_buffer_stack = (struct yy_buffer_state**)osssrealloc
01939                                                                 (yyg->yy_buffer_stack,
01940                                                                 num_to_alloc * sizeof(struct yy_buffer_state*)
01941                                                                 , yyscanner);
01942 
01943                 /* zero only the new slots.*/
01944                 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
01945                 yyg->yy_buffer_stack_max = num_to_alloc;
01946         }
01947 }
01948 
01955 YY_BUFFER_STATE osss_scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)
01956 {
01957         YY_BUFFER_STATE b;
01958     
01959         if ( size < 2 ||
01960              base[size-2] != YY_END_OF_BUFFER_CHAR ||
01961              base[size-1] != YY_END_OF_BUFFER_CHAR )
01962                 /* They forgot to leave room for the EOB's. */
01963                 return 0;
01964 
01965         b = (YY_BUFFER_STATE) osssalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
01966         if ( ! b )
01967                 YY_FATAL_ERROR( "out of dynamic memory in osss_scan_buffer()" );
01968 
01969         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
01970         b->yy_buf_pos = b->yy_ch_buf = base;
01971         b->yy_is_our_buffer = 0;
01972         b->yy_input_file = 0;
01973         b->yy_n_chars = b->yy_buf_size;
01974         b->yy_is_interactive = 0;
01975         b->yy_at_bol = 1;
01976         b->yy_fill_buffer = 0;
01977         b->yy_buffer_status = YY_BUFFER_NEW;
01978 
01979         osss_switch_to_buffer(b ,yyscanner );
01980 
01981         return b;
01982 }
01983 
01992 YY_BUFFER_STATE osss_scan_string (yyconst char * yystr , yyscan_t yyscanner)
01993 {
01994     
01995         return osss_scan_bytes(yystr,strlen(yystr) ,yyscanner);
01996 }
01997 
02005 YY_BUFFER_STATE osss_scan_bytes  (yyconst char * yybytes, int  _yybytes_len , yyscan_t yyscanner)
02006 {
02007         YY_BUFFER_STATE b;
02008         char *buf;
02009         yy_size_t n;
02010         int i;
02011     
02012         /* Get memory for full buffer, including space for trailing EOB's. */
02013         n = _yybytes_len + 2;
02014         buf = (char *) osssalloc(n ,yyscanner );
02015         if ( ! buf )
02016                 YY_FATAL_ERROR( "out of dynamic memory in osss_scan_bytes()" );
02017 
02018         for ( i = 0; i < _yybytes_len; ++i )
02019                 buf[i] = yybytes[i];
02020 
02021         buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
02022 
02023         b = osss_scan_buffer(buf,n ,yyscanner);
02024         if ( ! b )
02025                 YY_FATAL_ERROR( "bad buffer in osss_scan_bytes()" );
02026 
02027         /* It's okay to grow etc. this buffer, and we should throw it
02028          * away when we're done.
02029          */
02030         b->yy_is_our_buffer = 1;
02031 
02032         return b;
02033 }
02034 
02035 #ifndef YY_EXIT_FAILURE
02036 #define YY_EXIT_FAILURE 2
02037 #endif
02038 
02039 static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
02040 {
02041         (void) fprintf( stderr, "%s\n", msg );
02042         exit( YY_EXIT_FAILURE );
02043 }
02044 
02045 /* Redefine yyless() so it works in section 3 code. */
02046 
02047 #undef yyless
02048 #define yyless(n) \
02049         do \
02050                 { \
02051                 /* Undo effects of setting up yytext. */ \
02052         int yyless_macro_arg = (n); \
02053         YY_LESS_LINENO(yyless_macro_arg);\
02054                 yytext[yyleng] = yyg->yy_hold_char; \
02055                 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
02056                 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
02057                 *yyg->yy_c_buf_p = '\0'; \
02058                 yyleng = yyless_macro_arg; \
02059                 } \
02060         while ( 0 )
02061 
02062 /* Accessor  methods (get/set functions) to struct members. */
02063 
02067 YY_EXTRA_TYPE osssget_extra  (yyscan_t yyscanner)
02068 {
02069     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02070     return yyextra;
02071 }
02072 
02076 int osssget_lineno  (yyscan_t yyscanner)
02077 {
02078     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02079     
02080         if (! YY_CURRENT_BUFFER)
02081             return 0;
02082     
02083     return yylineno;
02084 }
02085 
02089 int osssget_column  (yyscan_t yyscanner)
02090 {
02091     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02092     
02093         if (! YY_CURRENT_BUFFER)
02094             return 0;
02095     
02096     return yycolumn;
02097 }
02098 
02102 FILE *osssget_in  (yyscan_t yyscanner)
02103 {
02104     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02105     return yyin;
02106 }
02107 
02111 FILE *osssget_out  (yyscan_t yyscanner)
02112 {
02113     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02114     return yyout;
02115 }
02116 
02120 int osssget_leng  (yyscan_t yyscanner)
02121 {
02122     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02123     return yyleng;
02124 }
02125 
02130 char *osssget_text  (yyscan_t yyscanner)
02131 {
02132     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02133     return yytext;
02134 }
02135 
02140 void osssset_extra (YY_EXTRA_TYPE  user_defined , yyscan_t yyscanner)
02141 {
02142     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02143     yyextra = user_defined ;
02144 }
02145 
02150 void osssset_lineno (int  line_number , yyscan_t yyscanner)
02151 {
02152     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02153 
02154         /* lineno is only valid if an input buffer exists. */
02155         if (! YY_CURRENT_BUFFER )
02156            yy_fatal_error( "osssset_lineno called with no buffer" , yyscanner); 
02157     
02158     yylineno = line_number;
02159 }
02160 
02165 void osssset_column (int  column_no , yyscan_t yyscanner)
02166 {
02167     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02168 
02169         /* column is only valid if an input buffer exists. */
02170         if (! YY_CURRENT_BUFFER )
02171            yy_fatal_error( "osssset_column called with no buffer" , yyscanner); 
02172     
02173     yycolumn = column_no;
02174 }
02175 
02182 void osssset_in (FILE *  in_str , yyscan_t yyscanner)
02183 {
02184     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02185     yyin = in_str ;
02186 }
02187 
02188 void osssset_out (FILE *  out_str , yyscan_t yyscanner)
02189 {
02190     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02191     yyout = out_str ;
02192 }
02193 
02194 int osssget_debug  (yyscan_t yyscanner)
02195 {
02196     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02197     return yy_flex_debug;
02198 }
02199 
02200 void osssset_debug (int  bdebug , yyscan_t yyscanner)
02201 {
02202     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02203     yy_flex_debug = bdebug ;
02204 }
02205 
02206 /* Accessor methods for yylval and yylloc */
02207 
02208 /* User-visible API */
02209 
02210 /* ossslex_init is special because it creates the scanner itself, so it is
02211  * the ONLY reentrant function that doesn't take the scanner as the last argument.
02212  * That's why we explicitly handle the declaration, instead of using our macros.
02213  */
02214 
02215 int ossslex_init(yyscan_t* ptr_yy_globals)
02216 
02217 {
02218     if (ptr_yy_globals == NULL){
02219         errno = EINVAL;
02220         return 1;
02221     }
02222 
02223     *ptr_yy_globals = (yyscan_t) osssalloc ( sizeof( struct yyguts_t ), NULL );
02224 
02225     if (*ptr_yy_globals == NULL){
02226         errno = ENOMEM;
02227         return 1;
02228     }
02229 
02230     /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
02231     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
02232 
02233     return yy_init_globals ( *ptr_yy_globals );
02234 }
02235 
02236 static int yy_init_globals (yyscan_t yyscanner)
02237 {
02238     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02239     /* Initialization is the same as for the non-reentrant scanner.
02240      * This function is called from ossslex_destroy(), so don't allocate here.
02241      */
02242 
02243     yyg->yy_buffer_stack = 0;
02244     yyg->yy_buffer_stack_top = 0;
02245     yyg->yy_buffer_stack_max = 0;
02246     yyg->yy_c_buf_p = (char *) 0;
02247     yyg->yy_init = 0;
02248     yyg->yy_start = 0;
02249 
02250     yyg->yy_start_stack_ptr = 0;
02251     yyg->yy_start_stack_depth = 0;
02252     yyg->yy_start_stack =  NULL;
02253 
02254 /* Defined in main.c */
02255 #ifdef YY_STDINIT
02256     yyin = stdin;
02257     yyout = stdout;
02258 #else
02259     yyin = (FILE *) 0;
02260     yyout = (FILE *) 0;
02261 #endif
02262 
02263     /* For future reference: Set errno on error, since we are called by
02264      * ossslex_init()
02265      */
02266     return 0;
02267 }
02268 
02269 /* ossslex_destroy is for both reentrant and non-reentrant scanners. */
02270 int ossslex_destroy  (yyscan_t yyscanner)
02271 {
02272     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
02273 
02274     /* Pop the buffer stack, destroying each element. */
02275         while(YY_CURRENT_BUFFER){
02276                 osss_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
02277                 YY_CURRENT_BUFFER_LVALUE = NULL;
02278                 ossspop_buffer_state(yyscanner);
02279         }
02280 
02281         /* Destroy the stack itself. */
02282         osssfree(yyg->yy_buffer_stack ,yyscanner);
02283         yyg->yy_buffer_stack = NULL;
02284 
02285     /* Destroy the start condition stack. */
02286         osssfree(yyg->yy_start_stack ,yyscanner );
02287         yyg->yy_start_stack = NULL;
02288 
02289     /* Reset the globals. This is important in a non-reentrant scanner so the next time
02290      * ossslex() is called, initialization will occur. */
02291     yy_init_globals( yyscanner);
02292 
02293     /* Destroy the main struct (reentrant only). */
02294     osssfree ( yyscanner , yyscanner );
02295     yyscanner = NULL;
02296     return 0;
02297 }
02298 
02299 /*
02300  * Internal utility routines.
02301  */
02302 
02303 #ifndef yytext_ptr
02304 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
02305 {
02306         register int i;
02307         for ( i = 0; i < n; ++i )
02308                 s1[i] = s2[i];
02309 }
02310 #endif
02311 
02312 #ifdef YY_NEED_STRLEN
02313 static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
02314 {
02315         register int n;
02316         for ( n = 0; s[n]; ++n )
02317                 ;
02318 
02319         return n;
02320 }
02321 #endif
02322 
02323 void *osssalloc (yy_size_t  size , yyscan_t yyscanner)
02324 {
02325         return (void *) malloc( size );
02326 }
02327 
02328 void *osssrealloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
02329 {
02330         /* The cast to (char *) in the following accommodates both
02331          * implementations that use char* generic pointers, and those
02332          * that use void* generic pointers.  It works with the latter
02333          * because both ANSI C and C++ allow castless assignment from
02334          * any pointer type to void*, and deal with argument conversions
02335          * as though doing an assignment.
02336          */
02337         return (void *) realloc( (char *) ptr, size );
02338 }
02339 
02340 void osssfree (void * ptr , yyscan_t yyscanner)
02341 {
02342         free( (char *) ptr );   /* see osssrealloc() for (char *) cast */
02343 }
02344 
02345 #define YYTABLES_NAME "yytables"
02346 
02347 #line 282 "/Users/kmartin/Documents/files/code/cpp/OScpp/COIN-OS/OS/src/OSParsers/parseosss.l"
02348 
02349 
02350 
02351 void setyyextra(osOptionsStruc *osoptions, void* scanner){
02352         osssset_extra(osoptions, scanner);
02353 }
02354 
02355 
02356 

Generated on Thu May 15 22:15:05 2008 by  doxygen 1.4.7