Constraint_l.cpp

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

Generated on Sun Jan 27 16:18:32 2008 for TAO_CosTrader by doxygen 1.3.6