Constraint_y.cpp

Go to the documentation of this file.
00001 #ifndef lint
00002 static char const
00003 yyrcsid[] = "$FreeBSD: src/usr.bin/yacc/skeleton.c,v 1.28 2000/01/17 02:04:06 bde Exp $";
00004 #endif
00005 #include "ace/os_include/os_stdlib.h"
00006 #define YYBYACC 1
00007 #define YYMAJOR 1
00008 #define YYMINOR 9
00009 #define YYLEX yylex()
00010 #define YYEMPTY -1
00011 #define yyclearin (yychar=(YYEMPTY))
00012 #define yyerrok (yyerrflag=0)
00013 #define YYRECOVERING() (yyerrflag!=0)
00014 
00015 #define YYPREFIX "yy"
00016   /* $Id: Constraint_y.cpp 78894 2007-07-14 14:56:10Z sowayaa $*/
00017 /* ========================================================================*/
00018 /**/
00019 /* = LIBRARY*/
00020 /*    orbsvcs*/
00021 /* */
00022 /* = FILENAME*/
00023 /*    constraint.y*/
00024 /**/
00025 /* = AUTHOR*/
00026 /*    Seth Widoff <sbw1@cs.wustl.edu>*/
00027 /**/
00028 /* ========================================================================*/
00029 
00030 #include "ace/OS_NS_string.h"
00031 #include "ace/OS_NS_stdlib.h"
00032 #include "orbsvcs/Trader/Constraint_Interpreter.h"
00033 #include "orbsvcs/Trader/Constraint_Nodes.h"
00034 
00035 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00036 
00037 /*#define YYDEBUG 1*/
00038 #define YYERRCODE 256
00039 #define TAO_GT 257
00040 #define TAO_GE 258
00041 #define TAO_LT 259
00042 #define TAO_LE 260
00043 #define TAO_EQ 261
00044 #define TAO_NE 262
00045 #define TAO_EXIST 263
00046 #define TAO_AND 264
00047 #define TAO_OR 265
00048 #define TAO_NOT 266
00049 #define TAO_IN 267
00050 #define TAO_TWIDDLE 268
00051 #define TAO_BOOLEAN 269
00052 #define TAO_PLUS 270
00053 #define TAO_MINUS 271
00054 #define TAO_MULT 272
00055 #define TAO_DIV 273
00056 #define TAO_UMINUS 274
00057 #define TAO_NUMBER 275
00058 #define TAO_RPAREN 276
00059 #define TAO_LPAREN 277
00060 #define TAO_IDENT 278
00061 #define TAO_STRING 279
00062 #define TAO_UNKNOWN 280
00063 #define TAO_SIGNED 281
00064 #define TAO_UNSIGNED 282
00065 #define TAO_DOUBLE 283
00066 #define TAO_CONSTRAINT 284
00067 #define TAO_SEQUENCE 285
00068 #define TAO_WITH 286
00069 #define TAO_MAX 287
00070 #define TAO_MIN 288
00071 #define TAO_FIRST 289
00072 #define TAO_RANDOM 290
00073 const short yylhs[] = {                                        -1,
00074     0,    0,    1,    1,    1,    1,    1,    2,    2,    3,
00075     3,    4,    4,    4,    4,    4,    4,    4,    5,    5,
00076     6,    6,    7,    7,    7,    8,    8,    8,    9,    9,
00077    10,   10,   10,   10,   10,   10,   10,
00078 };
00079 const short yylen[] = {                                         2,
00080     1,    1,    2,    2,    2,    1,    1,    3,    1,    3,
00081     1,    3,    3,    3,    3,    3,    3,    1,    3,    1,
00082     3,    1,    3,    3,    1,    3,    3,    1,    2,    1,
00083     3,    2,    1,    1,    2,    1,    1,
00084 };
00085 const short yydefred[] = {                                      0,
00086     0,    0,   37,    0,   34,    0,   33,   36,    0,    0,
00087     0,    6,    7,    0,    2,    0,    0,   11,    0,    0,
00088     0,    0,   28,   30,   32,   29,   35,    0,    0,    0,
00089     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00090     0,    0,    0,    0,    0,   31,    0,   10,   14,   15,
00091    16,   17,   12,   13,   19,    0,    0,    0,   26,   27,
00092 };
00093 const short yydgoto[] = {                                      14,
00094    15,   16,   17,   18,   19,   20,   21,   22,   23,   24,
00095 };
00096 const short yysindex[] = {                                   -253,
00097  -278, -219,    0, -271,    0, -224,    0,    0, -224, -224,
00098  -224,    0,    0,    0,    0, -256, -252,    0, -195, -244,
00099  -251, -243,    0,    0,    0,    0,    0, -262, -256, -256,
00100  -256, -224, -224, -224, -224, -224, -224, -224, -224, -263,
00101  -224, -224, -224, -224, -224,    0, -252,    0,    0,    0,
00102     0,    0,    0,    0,    0, -239, -243, -243,    0,    0,
00103 };
00104 const short yyrindex[] = {                                      0,
00105     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00106     0,    0,    0,    0,    0,   27,    8,    0,   11,   87,
00107    61,    1,    0,    0,    0,    0,    0,    0,   38,   40,
00108    43,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00109     0,    0,    0,    0,    0,    0,   28,    0,    0,    0,
00110     0,    0,    0,    0,    0,   74,   21,   41,    0,    0,
00111 };
00112 const short yygindex[] = {                                      0,
00113     0,   -4,   14,   24,   34,    0,   36,    6,   31,   76,
00114 };
00115 #define YYTABLESIZE 363
00116 const short yytable[] = {                                      25,
00117    25,   28,   32,   27,   29,   30,   31,    9,   32,    1,
00118    18,   33,    2,   46,   55,    3,   41,    4,   42,   43,
00119    23,    5,   40,    6,    7,    8,    1,    8,   44,   45,
00120    42,   43,    9,   10,   11,   12,   13,    5,    1,    4,
00121    24,    2,    3,    1,    3,   47,    4,   57,   58,    3,
00122     5,    4,    6,    7,    8,    5,   48,    6,    7,    8,
00123    22,   34,   35,   36,   37,   38,   39,   49,   50,   51,
00124    52,   53,   54,   21,   59,   60,   56,   26,    0,    0,
00125     0,    0,    0,    0,    0,    0,   20,    0,    0,    0,
00126     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00127     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00128     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00129     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00130     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00131     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00132     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00133     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00134     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00135     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00136     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00137     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00138     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00139     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00140     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00141     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00142     0,    0,    0,    0,    0,    0,    0,   25,   25,   25,
00143    25,   25,   25,    0,   25,   25,    0,   25,   25,    0,
00144    25,   25,    9,    0,   18,   18,   25,   23,   23,   23,
00145    23,   23,   23,    9,   23,   23,   18,   23,   23,    0,
00146    23,   23,    8,    0,    0,    0,   23,   24,   24,   24,
00147    24,   24,   24,    8,   24,   24,    0,   24,   24,    0,
00148    24,   24,    0,    0,    0,    0,   24,   22,   22,   22,
00149    22,   22,   22,    0,   22,   22,    0,   22,    0,    0,
00150    21,   21,   21,   21,   21,   21,   22,   21,   21,    0,
00151    21,    0,    0,   20,   20,   20,   20,   20,   20,   21,
00152    20,   20,    0,    0,    0,    0,    0,    0,    0,    0,
00153     0,    0,   20,
00154 };
00155 const short yycheck[] = {                                     278,
00156     0,    6,  265,  275,    9,   10,   11,    0,  265,  263,
00157     0,  264,  266,  276,  278,  269,  268,  271,  270,  271,
00158     0,  275,  267,  277,  278,  279,    0,    0,  272,  273,
00159   270,  271,  286,  287,  288,  289,  290,    0,  263,    0,
00160     0,  266,    0,  263,  269,   32,  271,   42,   43,  269,
00161   275,  271,  277,  278,  279,  275,   33,  277,  278,  279,
00162     0,  257,  258,  259,  260,  261,  262,   34,   35,   36,
00163    37,   38,   39,    0,   44,   45,   41,    2,   -1,   -1,
00164    -1,   -1,   -1,   -1,   -1,   -1,    0,   -1,   -1,   -1,
00165    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
00166    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
00167    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
00168    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
00169    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
00170    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
00171    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
00172    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
00173    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
00174    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
00175    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
00176    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
00177    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
00178    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
00179    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
00180    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
00181    -1,   -1,   -1,   -1,   -1,   -1,   -1,  257,  258,  259,
00182   260,  261,  262,   -1,  264,  265,   -1,  267,  268,   -1,
00183   270,  271,  265,   -1,  264,  265,  276,  257,  258,  259,
00184   260,  261,  262,  276,  264,  265,  276,  267,  268,   -1,
00185   270,  271,  265,   -1,   -1,   -1,  276,  257,  258,  259,
00186   260,  261,  262,  276,  264,  265,   -1,  267,  268,   -1,
00187   270,  271,   -1,   -1,   -1,   -1,  276,  257,  258,  259,
00188   260,  261,  262,   -1,  264,  265,   -1,  267,   -1,   -1,
00189   257,  258,  259,  260,  261,  262,  276,  264,  265,   -1,
00190   267,   -1,   -1,  257,  258,  259,  260,  261,  262,  276,
00191   264,  265,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
00192    -1,   -1,  276,
00193 };
00194 #define YYFINAL 14
00195 #ifndef YYDEBUG
00196 #define YYDEBUG 0
00197 #endif
00198 #define YYMAXTOKEN 290
00199 #if YYDEBUG
00200 const char * const yyname[] = {
00201 "end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
00202 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
00203 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
00204 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
00205 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
00206 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
00207 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"TAO_GT","TAO_GE","TAO_LT",
00208 "TAO_LE","TAO_EQ","TAO_NE","TAO_EXIST","TAO_AND","TAO_OR","TAO_NOT","TAO_IN",
00209 "TAO_TWIDDLE","TAO_BOOLEAN","TAO_PLUS","TAO_MINUS","TAO_MULT","TAO_DIV",
00210 "TAO_UMINUS","TAO_NUMBER","TAO_RPAREN","TAO_LPAREN","TAO_IDENT","TAO_STRING",
00211 "TAO_UNKNOWN","TAO_SIGNED","TAO_UNSIGNED","TAO_DOUBLE","TAO_CONSTRAINT",
00212 "TAO_SEQUENCE","TAO_WITH","TAO_MAX","TAO_MIN","TAO_FIRST","TAO_RANDOM",
00213 };
00214 const char * const yyrule[] = {
00215 "$accept : constraint",
00216 "constraint : bool_or",
00217 "constraint : preference",
00218 "preference : TAO_MIN bool_or",
00219 "preference : TAO_MAX bool_or",
00220 "preference : TAO_WITH bool_or",
00221 "preference : TAO_FIRST",
00222 "preference : TAO_RANDOM",
00223 "bool_or : bool_or TAO_OR bool_and",
00224 "bool_or : bool_and",
00225 "bool_and : bool_and TAO_AND bool_compare",
00226 "bool_and : bool_compare",
00227 "bool_compare : expr_in TAO_EQ expr_in",
00228 "bool_compare : expr_in TAO_NE expr_in",
00229 "bool_compare : expr_in TAO_GT expr_in",
00230 "bool_compare : expr_in TAO_GE expr_in",
00231 "bool_compare : expr_in TAO_LT expr_in",
00232 "bool_compare : expr_in TAO_LE expr_in",
00233 "bool_compare : expr_in",
00234 "expr_in : expr_twiddle TAO_IN TAO_IDENT",
00235 "expr_in : expr_twiddle",
00236 "expr_twiddle : expr TAO_TWIDDLE expr",
00237 "expr_twiddle : expr",
00238 "expr : expr TAO_PLUS term",
00239 "expr : expr TAO_MINUS term",
00240 "expr : term",
00241 "term : term TAO_MULT factor_not",
00242 "term : term TAO_DIV factor_not",
00243 "term : factor_not",
00244 "factor_not : TAO_NOT factor",
00245 "factor_not : factor",
00246 "factor : TAO_LPAREN bool_or TAO_RPAREN",
00247 "factor : TAO_EXIST TAO_IDENT",
00248 "factor : TAO_IDENT",
00249 "factor : TAO_NUMBER",
00250 "factor : TAO_MINUS TAO_NUMBER",
00251 "factor : TAO_STRING",
00252 "factor : TAO_BOOLEAN",
00253 };
00254 #endif
00255 #if YYDEBUG
00256 #include <stdio.h>
00257 #endif
00258 #ifdef YYSTACKSIZE
00259 #undef YYMAXDEPTH
00260 #define YYMAXDEPTH YYSTACKSIZE
00261 #else
00262 #ifdef YYMAXDEPTH
00263 #define YYSTACKSIZE YYMAXDEPTH
00264 #else
00265 #define YYSTACKSIZE 10000
00266 #define YYMAXDEPTH 10000
00267 #endif
00268 #endif
00269 #define YYINITSTACKSIZE 200
00270 int yydebug;
00271 int yynerrs;
00272 int yyerrflag;
00273 int yychar;
00274 short *yyssp;
00275 YYSTYPE *yyvsp;
00276 YYSTYPE yyval;
00277 YYSTYPE yylval;
00278 short *yyss;
00279 short *yysslim;
00280 YYSTYPE *yyvs;
00281 int yystacksize;
00282 
00283 //extern int yydebug = 1;
00284 /* allocate initial stack or double stack size, up to YYMAXDEPTH */
00285 static int yygrowstack()
00286 {
00287     size_t newsize, i;
00288     short *newss;
00289     YYSTYPE *newvs;
00290 
00291     if ((newsize = yystacksize) == 0)
00292         newsize = YYINITSTACKSIZE;
00293     else if (newsize >= YYMAXDEPTH)
00294         return -1;
00295     else if ((newsize *= 2) > YYMAXDEPTH)
00296         newsize = YYMAXDEPTH;
00297     i = yyssp - yyss;
00298     newss = yyss ? (short *)ACE_OS::realloc(yyss, newsize * sizeof *newss) :
00299       (short *)ACE_OS::malloc(newsize * sizeof *newss);
00300     if (newss == 0)
00301         return -1;
00302     yyss = newss;
00303     yyssp = newss + i;
00304     newvs = yyvs ? (YYSTYPE *)ACE_OS::realloc(yyvs, newsize * sizeof *newvs) :
00305       (YYSTYPE *)ACE_OS::malloc(newsize * sizeof *newvs);
00306     if (newvs == 0)
00307         return -1;
00308     yyvs = newvs;
00309     yyvsp = newvs + i;
00310     yystacksize = newsize;
00311     yysslim = yyss + newsize - 1;
00312     return 0;
00313 }
00314 
00315 #define YYABORT goto yyabort
00316 #define YYREJECT goto yyabort
00317 #define YYACCEPT goto yyaccept
00318 #define YYERROR goto yyerrlab
00319 
00320 #ifndef YYPARSE_PARAM
00321 #if defined(__cplusplus) || __STDC__
00322 #define YYPARSE_PARAM_ARG void
00323 #define YYPARSE_PARAM_DECL
00324 #else        /* ! ANSI-C/C++ */
00325 #define YYPARSE_PARAM_ARG
00326 #define YYPARSE_PARAM_DECL
00327 #endif        /* ANSI-C/C++ */
00328 #else        /* YYPARSE_PARAM */
00329 #ifndef YYPARSE_PARAM_TYPE
00330 #define YYPARSE_PARAM_TYPE void *
00331 #endif
00332 #if defined(__cplusplus) || __STDC__
00333 #define YYPARSE_PARAM_ARG YYPARSE_PARAM_TYPE YYPARSE_PARAM
00334 #define YYPARSE_PARAM_DECL
00335 #else        /* ! ANSI-C/C++ */
00336 #define YYPARSE_PARAM_ARG YYPARSE_PARAM
00337 #define YYPARSE_PARAM_DECL YYPARSE_PARAM_TYPE YYPARSE_PARAM;
00338 #endif        /* ANSI-C/C++ */
00339 #endif        /* ! YYPARSE_PARAM */
00340 
00341 int
00342 yyparse (YYPARSE_PARAM_ARG)
00343     YYPARSE_PARAM_DECL
00344 {
00345     register int yym, yyn, yystate;
00346 #if YYDEBUG
00347     register const char *yys;
00348 
00349     if ((yys = ACE_OS::getenv("YYDEBUG")))
00350     {
00351         yyn = *yys;
00352         if (yyn >= '0' && yyn <= '9')
00353             yydebug = yyn - '0';
00354     }
00355 #endif
00356 
00357     yynerrs = 0;
00358     yyerrflag = 0;
00359     yychar = (-1);
00360 
00361     if (yyss == 0 && yygrowstack()) goto yyoverflow;
00362     yyssp = yyss;
00363     yyvsp = yyvs;
00364     *yyssp = yystate = 0;
00365 
00366 yyloop:
00367     if ((yyn = yydefred[yystate])) goto yyreduce;
00368     if (yychar < 0)
00369     {
00370         if ((yychar = yylex()) < 0) yychar = 0;
00371 #if YYDEBUG
00372         if (yydebug)
00373         {
00374             yys = 0;
00375             if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
00376             if (!yys) yys = "illegal-symbol";
00377             ACE_OS::printf("%sdebug: state %d, reading %d (%s)\n",
00378                            YYPREFIX, yystate, yychar, yys);
00379         }
00380 #endif
00381     }
00382     if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
00383             yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
00384     {
00385 #if YYDEBUG
00386         if (yydebug)
00387           ACE_OS::printf("%sdebug: state %d, shifting to state %d\n",
00388                          YYPREFIX, yystate, yytable[yyn]);
00389 #endif
00390         if (yyssp >= yysslim && yygrowstack())
00391         {
00392             goto yyoverflow;
00393         }
00394         *++yyssp = yystate = yytable[yyn];
00395         *++yyvsp = yylval;
00396         yychar = (-1);
00397         if (yyerrflag > 0)  --yyerrflag;
00398         goto yyloop;
00399     }
00400     if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
00401             yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
00402     {
00403         yyn = yytable[yyn];
00404         goto yyreduce;
00405     }
00406     if (yyerrflag) goto yyinrecovery;
00407 #if defined(lint) || defined(__GNUC__) || defined (WIN32) || defined (__HP_aCC)
00408     goto yynewerror;
00409 #endif
00410 yynewerror:
00411     yyerror("syntax error");
00412 #if defined(lint) || defined(__GNUC__) || defined (WIN32) || defined (__HP_aCC)
00413     goto yyerrlab;
00414 #endif
00415 yyerrlab:
00416     ++yynerrs;
00417 yyinrecovery:
00418     if (yyerrflag < 3)
00419     {
00420         yyerrflag = 3;
00421         for (;;)
00422         {
00423             if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 &&
00424                     yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
00425             {
00426 #if YYDEBUG
00427                 if (yydebug)
00428                   ACE_OS::printf("%sdebug: state %d, error recovery shifting\
00429  to state %d\n", YYPREFIX, *yyssp, yytable[yyn]);
00430 #endif
00431                 if (yyssp >= yysslim && yygrowstack())
00432                 {
00433                     goto yyoverflow;
00434                 }
00435                 *++yyssp = yystate = yytable[yyn];
00436                 *++yyvsp = yylval;
00437                 goto yyloop;
00438             }
00439             else
00440             {
00441 #if YYDEBUG
00442                 if (yydebug)
00443                   ACE_OS::printf("%sdebug: error recovery discarding state %d\n",
00444                                  YYPREFIX, *yyssp);
00445 #endif
00446                 if (yyssp <= yyss) goto yyabort;
00447                 --yyssp;
00448                 --yyvsp;
00449             }
00450         }
00451     }
00452     else
00453     {
00454         if (yychar == 0) goto yyabort;
00455 #if YYDEBUG
00456         if (yydebug)
00457         {
00458             yys = 0;
00459             if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
00460             if (!yys) yys = "illegal-symbol";
00461             ACE_OS::printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
00462                            YYPREFIX, yystate, yychar, yys);
00463         }
00464 #endif
00465         yychar = (-1);
00466         goto yyloop;
00467     }
00468 yyreduce:
00469 #if YYDEBUG
00470     if (yydebug)
00471       ACE_OS::printf("%sdebug: state %d, reducing by rule %d (%s)\n",
00472                      YYPREFIX, yystate, yyn, yyrule[yyn]);
00473 #endif
00474     yym = yylen[yyn];
00475     yyval = yyvsp[1-yym];
00476     switch (yyn)
00477     {
00478 case 1:
00479 { yyval.constraint_ = new TAO_Unary_Constraint(TAO_CONSTRAINT, yyvsp[0].constraint_); }
00480 break;
00481 case 2:
00482 { yyval.constraint_ = yyvsp[0].constraint_; }
00483 break;
00484 case 3:
00485 { yyval.constraint_ = new TAO_Unary_Constraint(TAO_MIN, yyvsp[0].constraint_); }
00486 break;
00487 case 4:
00488 { yyval.constraint_ = new TAO_Unary_Constraint(TAO_MAX, yyvsp[0].constraint_); }
00489 break;
00490 case 5:
00491 { yyval.constraint_ = new TAO_Unary_Constraint(TAO_WITH, yyvsp[0].constraint_); }
00492 break;
00493 case 6:
00494 { yyval.constraint_ = new TAO_Noop_Constraint(TAO_FIRST); }
00495 break;
00496 case 7:
00497 { yyval.constraint_ = new TAO_Noop_Constraint(TAO_RANDOM); }
00498 break;
00499 case 8:
00500 { yyval.constraint_ = new TAO_Binary_Constraint(TAO_OR, yyvsp[-2].constraint_, yyvsp[0].constraint_); }
00501 break;
00502 case 9:
00503 { yyval.constraint_ = yyvsp[0].constraint_; }
00504 break;
00505 case 10:
00506 { yyval.constraint_ = new TAO_Binary_Constraint(TAO_AND, yyvsp[-2].constraint_, yyvsp[0].constraint_); }
00507 break;
00508 case 11:
00509 { yyval.constraint_ = yyvsp[0].constraint_; }
00510 break;
00511 case 12:
00512 { yyval.constraint_ = new TAO_Binary_Constraint(TAO_EQ, yyvsp[-2].constraint_, yyvsp[0].constraint_); }
00513 break;
00514 case 13:
00515 { yyval.constraint_ = new TAO_Binary_Constraint(TAO_NE, yyvsp[-2].constraint_, yyvsp[0].constraint_); }
00516 break;
00517 case 14:
00518 { yyval.constraint_ = new TAO_Binary_Constraint(TAO_GT, yyvsp[-2].constraint_, yyvsp[0].constraint_); }
00519 break;
00520 case 15:
00521 { yyval.constraint_ = new TAO_Binary_Constraint(TAO_GE, yyvsp[-2].constraint_, yyvsp[0].constraint_); }
00522 break;
00523 case 16:
00524 { yyval.constraint_ = new TAO_Binary_Constraint(TAO_LT, yyvsp[-2].constraint_, yyvsp[0].constraint_); }
00525 break;
00526 case 17:
00527 { yyval.constraint_ = new TAO_Binary_Constraint(TAO_LE, yyvsp[-2].constraint_, yyvsp[0].constraint_); }
00528 break;
00529 case 18:
00530 { yyval.constraint_ = yyvsp[0].constraint_; }
00531 break;
00532 case 19:
00533 { yyval.constraint_ = new TAO_Binary_Constraint(TAO_IN, yyvsp[-2].constraint_, yyvsp[0].constraint_); }
00534 break;
00535 case 20:
00536 { yyval.constraint_ = yyvsp[0].constraint_; }
00537 break;
00538 case 21:
00539 { yyval.constraint_ = new TAO_Binary_Constraint(TAO_TWIDDLE, yyvsp[-2].constraint_, yyvsp[0].constraint_); }
00540 break;
00541 case 22:
00542 { yyval.constraint_ = yyvsp[0].constraint_; }
00543 break;
00544 case 23:
00545 { yyval.constraint_ = new TAO_Binary_Constraint(TAO_PLUS, yyvsp[-2].constraint_, yyvsp[0].constraint_); }
00546 break;
00547 case 24:
00548 { yyval.constraint_ = new TAO_Binary_Constraint(TAO_MINUS, yyvsp[-2].constraint_, yyvsp[0].constraint_); }
00549 break;
00550 case 25:
00551 { yyval.constraint_ = yyvsp[0].constraint_; }
00552 break;
00553 case 26:
00554 { yyval.constraint_ = new TAO_Binary_Constraint(TAO_MULT, yyvsp[-2].constraint_, yyvsp[0].constraint_); }
00555 break;
00556 case 27:
00557 { yyval.constraint_ = new TAO_Binary_Constraint(TAO_DIV, yyvsp[-2].constraint_, yyvsp[0].constraint_); }
00558 break;
00559 case 28:
00560 { yyval.constraint_ = yyvsp[0].constraint_; }
00561 break;
00562 case 29:
00563 { yyval.constraint_ = new TAO_Unary_Constraint(TAO_NOT, yyvsp[0].constraint_); }
00564 break;
00565 case 30:
00566 { yyval.constraint_ = yyvsp[0].constraint_; }
00567 break;
00568 case 31:
00569 { yyval.constraint_ = yyvsp[-1].constraint_; }
00570 break;
00571 case 32:
00572 { yyval.constraint_ = new TAO_Unary_Constraint(TAO_EXIST, yyvsp[0].constraint_); }
00573 break;
00574 case 33:
00575 { yyval.constraint_ = yyvsp[0].constraint_; }
00576 break;
00577 case 34:
00578 { yyval.constraint_ = yyvsp[0].constraint_; }
00579 break;
00580 case 35:
00581 { yyval.constraint_ = new TAO_Unary_Constraint(TAO_UMINUS, yyvsp[0].constraint_); }
00582 break;
00583 case 36:
00584 { yyval.constraint_ = yyvsp[0].constraint_; }
00585 break;
00586 case 37:
00587 { yyval.constraint_ = yyvsp[0].constraint_; }
00588 break;
00589     }
00590     yyssp -= yym;
00591     yystate = *yyssp;
00592     yyvsp -= yym;
00593     yym = yylhs[yyn];
00594     if (yystate == 0 && yym == 0)
00595     {
00596 #if YYDEBUG
00597         if (yydebug)
00598           ACE_OS::printf("%sdebug: after reduction, shifting from state 0 to\
00599  state %d\n", YYPREFIX, YYFINAL);
00600 #endif
00601         yystate = YYFINAL;
00602         *++yyssp = YYFINAL;
00603         *++yyvsp = yyval;
00604         if (yychar < 0)
00605         {
00606             if ((yychar = yylex()) < 0) yychar = 0;
00607 #if YYDEBUG
00608             if (yydebug)
00609             {
00610                 yys = 0;
00611                 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
00612                 if (!yys) yys = "illegal-symbol";
00613                 ACE_OS::printf("%sdebug: state %d, reading %d (%s)\n",
00614                                YYPREFIX, YYFINAL, yychar, yys);
00615             }
00616 #endif
00617         }
00618         if (yychar == 0) goto yyaccept;
00619         goto yyloop;
00620     }
00621     if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
00622             yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
00623         yystate = yytable[yyn];
00624     else
00625         yystate = yydgoto[yym];
00626 #if YYDEBUG
00627     if (yydebug)
00628       ACE_OS::printf("%sdebug: after reduction, shifting from state %d \
00629 to state %d\n", YYPREFIX, *yyssp, yystate);
00630 #endif
00631     if (yyssp >= yysslim && yygrowstack())
00632     {
00633         goto yyoverflow;
00634     }
00635     *++yyssp = yystate;
00636     *++yyvsp = yyval;
00637     goto yyloop;
00638 yyoverflow:
00639     yyerror("yacc stack overflow");
00640 yyabort:
00641     return (1);
00642 yyaccept:
00643     return (0);
00644 }
00645 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Tue Feb 2 17:49:26 2010 for TAO_CosTrader by  doxygen 1.4.7