(file) Return to WQLYACC.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / WQL

Diff for /pegasus/src/Pegasus/WQL/WQLYACC.cpp between version 1.1.2.8 and 1.5

version 1.1.2.8, 2001/12/03 00:08:00 version 1.5, 2003/10/22 14:26:14
Line 1 
Line 1 
   //%2003////////////////////////////////////////////////////////////////////////
   //
   // Copyright (c) 2000, 2001, 2002  BMC Software, Hewlett-Packard Development
   // Company, L. P., IBM Corp., The Open Group, Tivoli Systems.
   // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.;
   // IBM Corp.; EMC Corporation, The Open Group.
   //
   // Permission is hereby granted, free of charge, to any person obtaining a copy
   // of this software and associated documentation files (the "Software"), to
   // deal in the Software without restriction, including without limitation the
   // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
   // sell copies of the Software, and to permit persons to whom the Software is
   // furnished to do so, subject to the following conditions:
   //
   // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
   // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
   // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
   // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
   // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
   // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
   // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
   // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
   //
   //==============================================================================
  
 /*  A Bison parser, made from wql.y  /*  A Bison parser, made from WQL.y
     by GNU Bison version 1.28  */     by GNU Bison version 1.28  */
  
 #define YYBISON 1  /* Identify Bison output.  */ #define YYBISON 1  /* Identify Bison output.  */
Line 33 
Line 57 
 #define TOK_FROM        276 #define TOK_FROM        276
 #define TOK_UNEXPECTED_CHAR     277 #define TOK_UNEXPECTED_CHAR     277
  
 #line 9 "wql.y"  #line 9 "WQL.y"
  
  
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
Line 59 
Line 83 
 #endif #endif
  
 extern int WQL_lex(); extern int WQL_lex();
 extern int WQL_error(char*);  extern int WQL_error(const char*);
  
 // //
 // Define the global parser state object: // Define the global parser state object:
Line 74 
Line 98 
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END
  
  
 #line 58 "wql.y"  #line 58 "WQL.y"
 typedef union typedef union
 { {
    int intValue;    int intValue;
Line 158 
Line 182 
    130,   136,   142,   146,   152,   156,   162,   166,   172,   179,    130,   136,   142,   146,   152,   156,   162,   166,   172,   179,
    185,   190,   195,   201,   205,   209,   214,   223,   227,   233,    185,   190,   195,   201,   205,   209,   214,   223,   227,   233,
    238,   243,   248,   253,   258,   265,   270,   277,   281,   287,    238,   243,   248,   253,   258,   265,   270,   277,   281,   287,
    293,   300,   305,   310,   315,   320     293,   300,   306,   311,   316,   321
 }; };
 #endif #endif
  
Line 782 
Line 806 
   switch (yyn) {   switch (yyn) {
  
 case 1: case 1:
 #line 131 "wql.y"  #line 131 "WQL.y"
 { {
         WQL_TRACE(("YACC: start\n"));         WQL_TRACE(("YACC: start\n"));
     ;     ;
     break;}     break;}
 case 2: case 2:
 #line 137 "wql.y"  #line 137 "WQL.y"
 { {
  
     ;     ;
     break;}     break;}
 case 3: case 3:
 #line 143 "wql.y"  #line 143 "WQL.y"
 { {
         globalParserState->statement->appendPropertyName("*");          globalParserState->statement->setAllProperties(true);
     ;     ;
     break;}     break;}
 case 4: case 4:
 #line 147 "wql.y"  #line 147 "WQL.y"
 { {
  
     ;     ;
     break;}     break;}
 case 5: case 5:
 #line 153 "wql.y"  #line 153 "WQL.y"
 { {
         globalParserState->statement->appendPropertyName(yyvsp[0].strValue);          globalParserState->statement->appendSelectPropertyName(CIMName(yyvsp[0].strValue));
     ;     ;
     break;}     break;}
 case 6: case 6:
 #line 157 "wql.y"  #line 157 "WQL.y"
 { {
         globalParserState->statement->appendPropertyName(yyvsp[0].strValue);          globalParserState->statement->appendSelectPropertyName(CIMName(yyvsp[0].strValue));
     ;     ;
     break;}     break;}
 case 7: case 7:
 #line 163 "wql.y"  #line 163 "WQL.y"
 { {
  
     ;     ;
     break;}     break;}
 case 8: case 8:
 #line 167 "wql.y"  #line 167 "WQL.y"
 { {
  
     ;     ;
     break;}     break;}
 case 9: case 9:
 #line 173 "wql.y"  #line 173 "WQL.y"
 { {
         WQL_TRACE(("YACC: fromClause: TOK_FROM className(%s)\n", yyvsp[0].strValue));         WQL_TRACE(("YACC: fromClause: TOK_FROM className(%s)\n", yyvsp[0].strValue));
         globalParserState->statement->setClassName(yyvsp[0].strValue);          globalParserState->statement->setClassName(CIMName(yyvsp[0].strValue));
     ;     ;
     break;}     break;}
 case 10: case 10:
 #line 180 "wql.y"  #line 180 "WQL.y"
 { {
  
     ;     ;
     break;}     break;}
 case 11: case 11:
 #line 186 "wql.y"  #line 186 "WQL.y"
 { {
         WQL_TRACE(("YACC: TOK_OR\n"));         WQL_TRACE(("YACC: TOK_OR\n"));
         globalParserState->statement->appendOperation(WQL_OR);         globalParserState->statement->appendOperation(WQL_OR);
     ;     ;
     break;}     break;}
 case 12: case 12:
 #line 191 "wql.y"  #line 191 "WQL.y"
 { {
         WQL_TRACE(("YACC: TOK_AND\n"));         WQL_TRACE(("YACC: TOK_AND\n"));
         globalParserState->statement->appendOperation(WQL_AND);         globalParserState->statement->appendOperation(WQL_AND);
     ;     ;
     break;}     break;}
 case 13: case 13:
 #line 196 "wql.y"  #line 196 "WQL.y"
 { {
         WQL_TRACE(("YACC: TOK_NOT\n"));         WQL_TRACE(("YACC: TOK_NOT\n"));
  
Line 865 
Line 889 
     ;     ;
     break;}     break;}
 case 14: case 14:
 #line 202 "wql.y"  #line 202 "WQL.y"
 { {
  
     ;     ;
     break;}     break;}
 case 15: case 15:
 #line 206 "wql.y"  #line 206 "WQL.y"
 { {
  
     ;     ;
     break;}     break;}
 case 16: case 16:
 #line 210 "wql.y"  #line 210 "WQL.y"
 { {
         WQLOperation op = yyvsp[0].intValue ? WQL_IS_TRUE : WQL_IS_FALSE;         WQLOperation op = yyvsp[0].intValue ? WQL_IS_TRUE : WQL_IS_FALSE;
         globalParserState->statement->appendOperation(op);         globalParserState->statement->appendOperation(op);
     ;     ;
     break;}     break;}
 case 17: case 17:
 #line 215 "wql.y"  #line 215 "WQL.y"
 { {
         WQLOperation op = yyvsp[0].intValue ? WQL_IS_NOT_TRUE : WQL_IS_NOT_FALSE;         WQLOperation op = yyvsp[0].intValue ? WQL_IS_NOT_TRUE : WQL_IS_NOT_FALSE;
         globalParserState->statement->appendOperation(op);         globalParserState->statement->appendOperation(op);
     ;     ;
     break;}     break;}
 case 18: case 18:
 #line 224 "wql.y"  #line 224 "WQL.y"
 { {
  
     ;     ;
     break;}     break;}
 case 19: case 19:
 #line 228 "wql.y"  #line 228 "WQL.y"
 { {
  
     ;     ;
     break;}     break;}
 case 20: case 20:
 #line 234 "wql.y"  #line 234 "WQL.y"
 { {
         WQL_TRACE(("YACC: TOK_LT\n"));         WQL_TRACE(("YACC: TOK_LT\n"));
         globalParserState->statement->appendOperation(WQL_LT);         globalParserState->statement->appendOperation(WQL_LT);
     ;     ;
     break;}     break;}
 case 21: case 21:
 #line 239 "wql.y"  #line 239 "WQL.y"
 { {
         WQL_TRACE(("YACC: TOK_GT\n"));         WQL_TRACE(("YACC: TOK_GT\n"));
         globalParserState->statement->appendOperation(WQL_GT);         globalParserState->statement->appendOperation(WQL_GT);
     ;     ;
     break;}     break;}
 case 22: case 22:
 #line 244 "wql.y"  #line 244 "WQL.y"
 { {
         WQL_TRACE(("YACC: TOK_LE\n"));         WQL_TRACE(("YACC: TOK_LE\n"));
         globalParserState->statement->appendOperation(WQL_LE);         globalParserState->statement->appendOperation(WQL_LE);
     ;     ;
     break;}     break;}
 case 23: case 23:
 #line 249 "wql.y"  #line 249 "WQL.y"
 { {
         WQL_TRACE(("YACC: TOK_GE\n"));         WQL_TRACE(("YACC: TOK_GE\n"));
         globalParserState->statement->appendOperation(WQL_GE);         globalParserState->statement->appendOperation(WQL_GE);
     ;     ;
     break;}     break;}
 case 24: case 24:
 #line 254 "wql.y"  #line 254 "WQL.y"
 { {
         WQL_TRACE(("YACC: TOK_EQ\n"));         WQL_TRACE(("YACC: TOK_EQ\n"));
         globalParserState->statement->appendOperation(WQL_EQ);         globalParserState->statement->appendOperation(WQL_EQ);
     ;     ;
     break;}     break;}
 case 25: case 25:
 #line 259 "wql.y"  #line 259 "WQL.y"
 { {
         WQL_TRACE(("YACC: TOK_NE\n"));         WQL_TRACE(("YACC: TOK_NE\n"));
         globalParserState->statement->appendOperation(WQL_NE);         globalParserState->statement->appendOperation(WQL_NE);
     ;     ;
     break;}     break;}
 case 26: case 26:
 #line 266 "wql.y"  #line 266 "WQL.y"
 { {
         WQL_TRACE(("YACC: nullPredicate : comparisonTerm IS NULL\n"));         WQL_TRACE(("YACC: nullPredicate : comparisonTerm IS NULL\n"));
         globalParserState->statement->appendOperation(WQL_IS_NULL);         globalParserState->statement->appendOperation(WQL_IS_NULL);
     ;     ;
     break;}     break;}
 case 27: case 27:
 #line 271 "wql.y"  #line 271 "WQL.y"
 { {
         WQL_TRACE(("YACC: nullPredicate : comparisonTerm IS NOT NULL\n"));         WQL_TRACE(("YACC: nullPredicate : comparisonTerm IS NOT NULL\n"));
         globalParserState->statement->appendOperation(WQL_IS_NOT_NULL);         globalParserState->statement->appendOperation(WQL_IS_NOT_NULL);
     ;     ;
     break;}     break;}
 case 28: case 28:
 #line 278 "wql.y"  #line 278 "WQL.y"
 { {
         yyval.intValue = 1;         yyval.intValue = 1;
     ;     ;
     break;}     break;}
 case 29: case 29:
 #line 282 "wql.y"  #line 282 "WQL.y"
 { {
         yyval.intValue = 0;         yyval.intValue = 0;
     ;     ;
     break;}     break;}
 case 30: case 30:
 #line 288 "wql.y"  #line 288 "WQL.y"
 { {
         WQL_TRACE(("YACC: propertyName : TOK_IDENTIFIER(%s)\n", yyvsp[0].strValue));         WQL_TRACE(("YACC: propertyName : TOK_IDENTIFIER(%s)\n", yyvsp[0].strValue));
         yyval.strValue = yyvsp[0].strValue;         yyval.strValue = yyvsp[0].strValue;
     ;     ;
     break;}     break;}
 case 31: case 31:
 #line 294 "wql.y"  #line 294 "WQL.y"
 { {
         WQL_TRACE(("YACC: TOK_IDENTIFIER %s\n", yyvsp[0].strValue));         WQL_TRACE(("YACC: TOK_IDENTIFIER %s\n", yyvsp[0].strValue));
         yyval.strValue = yyvsp[0].strValue;         yyval.strValue = yyvsp[0].strValue;
     ;     ;
     break;}     break;}
 case 32: case 32:
 #line 301 "wql.y"  #line 301 "WQL.y"
 { {
         globalParserState->statement->appendOperand(         globalParserState->statement->appendOperand(
             WQLOperand(yyvsp[0].strValue, WQLOperand::PROPERTY_NAME_TAG));              WQLOperand(yyvsp[0].strValue, WQL_PROPERTY_NAME_TAG));
           globalParserState->statement->appendWherePropertyName(CIMName(yyvsp[0].strValue));
     ;     ;
     break;}     break;}
 case 33: case 33:
 #line 306 "wql.y"  #line 307 "WQL.y"
 { {
         globalParserState->statement->appendOperand(         globalParserState->statement->appendOperand(
             WQLOperand(yyvsp[0].intValue, WQLOperand::INTEGER_VALUE_TAG));              WQLOperand(yyvsp[0].intValue, WQL_INTEGER_VALUE_TAG));
     ;     ;
     break;}     break;}
 case 34: case 34:
 #line 311 "wql.y"  #line 312 "WQL.y"
 { {
         globalParserState->statement->appendOperand(         globalParserState->statement->appendOperand(
             WQLOperand(yyvsp[0].doubleValue, WQLOperand::DOUBLE_VALUE_TAG));              WQLOperand(yyvsp[0].doubleValue, WQL_DOUBLE_VALUE_TAG));
     ;     ;
     break;}     break;}
 case 35: case 35:
 #line 316 "wql.y"  #line 317 "WQL.y"
 { {
         globalParserState->statement->appendOperand(         globalParserState->statement->appendOperand(
             WQLOperand(yyvsp[0].strValue, WQLOperand::STRING_VALUE_TAG));              WQLOperand(yyvsp[0].strValue, WQL_STRING_VALUE_TAG));
     ;     ;
     break;}     break;}
 case 36: case 36:
 #line 321 "wql.y"  #line 322 "WQL.y"
 { {
         globalParserState->statement->appendOperand(         globalParserState->statement->appendOperand(
             WQLOperand(yyvsp[0].intValue != 0, WQLOperand::BOOLEAN_VALUE_TAG));              WQLOperand(yyvsp[0].intValue != 0, WQL_BOOLEAN_VALUE_TAG));
     ;     ;
     break;}     break;}
 } }
Line 1241 
Line 1266 
     }     }
   return 1;   return 1;
 } }
 #line 326 "wql.y"  #line 327 "WQL.y"
  


Legend:
Removed from v.1.1.2.8  
changed lines
  Added in v.1.5

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2