Constraint_l.cpp

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

Generated on Thu Nov 9 13:59:56 2006 for TAO_CosTrader by doxygen 1.3.6