version 1.1.2.1, 2001/11/30 02:53:56
|
version 1.10, 2005/02/11 19:52:49
|
|
|
| |
/* A Bison parser, made from wql.y with Bison version GNU Bison version 1.24 |
/* A Bison parser, made from wql.y |
*/ |
by GNU Bison version 1.28 */ |
| |
#define YYBISON 1 /* Identify Bison output. */ | #define YYBISON 1 /* Identify Bison output. */ |
| |
|
|
#define yychar WQL_char | #define yychar WQL_char |
#define yydebug WQL_debug | #define yydebug WQL_debug |
#define yynerrs WQL_nerrs | #define yynerrs WQL_nerrs |
#define TOK_INTEGER 258 |
#define TOK_INTEGER 257 |
#define TOK_DOUBLE 259 |
#define TOK_DOUBLE 258 |
#define STRING_LITERAL 260 |
#define TOK_STRING 259 |
#define EQ 261 |
#define TOK_TRUE 260 |
#define NE 262 |
#define TOK_FALSE 261 |
#define LT 263 |
#define TOK_NULL 262 |
#define LE 264 |
#define TOK_ISA 263 |
#define GT 265 |
#define TOK_EQ 264 |
#define GE 266 |
#define TOK_NE 265 |
#define TOK_SELECT 267 |
#define TOK_LT 266 |
#define WHERE 268 |
#define TOK_LE 267 |
#define FROM 269 |
#define TOK_GT 268 |
#define TOK_IDENTIFIER 270 |
#define TOK_GE 269 |
#define NOT 271 |
#define TOK_NOT 270 |
#define OR 272 |
#define TOK_OR 271 |
#define AND 273 |
#define TOK_AND 272 |
#define ISA 274 |
#define TOK_IS 273 |
#define WQL_TRUE 275 |
#define TOK_IDENTIFIER 274 |
#define WQL_FALSE 276 |
#define TOK_SELECT 275 |
|
#define TOK_WHERE 276 |
#line 9 "wql.y" |
#define TOK_FROM 277 |
|
#define TOK_UNEXPECTED_CHAR 278 |
|
|
|
#line 37 "wql.y" |
|
|
|
|
|
#include <Pegasus/Common/Config.h> |
|
#include <Pegasus/WQL/WQLOperation.h> |
|
#include <Pegasus/WQL/WQLOperand.h> |
|
#include <Pegasus/WQL/WQLParserState.h> |
|
#include <Pegasus/WQL/WQLSelectStatement.h> |
#include <string.h> | #include <string.h> |
#include <stdlib.h> | #include <stdlib.h> |
| |
|
|
# include <alloca.h> | # include <alloca.h> |
#endif | #endif |
| |
|
#if 0 |
|
# define WQL_TRACE(X) printf X |
|
#else |
|
# define WQL_TRACE(X) |
|
#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: |
|
// |
| |
|
PEGASUS_USING_PEGASUS; |
| |
#line 35 "wql.y" |
PEGASUS_NAMESPACE_BEGIN |
|
|
|
extern WQLParserState* globalParserState; |
|
|
|
PEGASUS_NAMESPACE_END |
|
|
|
|
|
#line 86 "wql.y" |
typedef union | typedef union |
{ | { |
int intValue; | int intValue; |
|
|
char* strValue; | char* strValue; |
void* nodeValue; | void* nodeValue; |
} YYSTYPE; | } YYSTYPE; |
|
|
#ifndef YYLTYPE |
|
typedef |
|
struct yyltype |
|
{ |
|
int timestamp; |
|
int first_line; |
|
int first_column; |
|
int last_line; |
|
int last_column; |
|
char *text; |
|
} |
|
yyltype; |
|
|
|
#define YYLTYPE yyltype |
|
#endif |
|
|
|
#include <stdio.h> | #include <stdio.h> |
| |
#ifndef __cplusplus | #ifndef __cplusplus |
|
|
| |
| |
| |
#define YYFINAL 94 |
#define YYFINAL 63 |
#define YYFLAG -32768 | #define YYFLAG -32768 |
#define YYNTBASE 27 |
#define YYNTBASE 29 |
| |
#define YYTRANSLATE(x) ((unsigned)(x) <= 276 ? yytranslate[x] : 41) |
#define YYTRANSLATE(x) ((unsigned)(x) <= 278 ? yytranslate[x] : 44) |
| |
static const char yytranslate[] = { 0, | static const char yytranslate[] = { 0, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 25, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 27, |
26, 22, 2, 23, 2, 24, 2, 2, 2, 2, |
28, 25, 2, 26, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 1, 2, 3, 4, 5, |
2, 2, 2, 2, 2, 1, 3, 4, 5, 6, |
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, |
7, 8, 9, 10, 11, 12, 13, 14, 15, 16, |
16, 17, 18, 19, 20, 21 |
17, 18, 19, 20, 21, 22, 23, 24 |
}; | }; |
| |
#if YYDEBUG != 0 | #if YYDEBUG != 0 |
static const short yyprhs[] = { 0, | static const short yyprhs[] = { 0, |
0, 2, 6, 11, 14, 16, 19, 21, 23, 25, |
0, 2, 6, 8, 10, 12, 16, 19, 21, 24, |
29, 31, 35, 39, 43, 46, 50, 52, 56, 60, |
27, 31, 35, 38, 42, 44, 48, 53, 55, 57, |
64, 68, 72, 76, 80, 84, 88, 92, 96, 100, |
61, 65, 69, 73, 77, 81, 85, 89, 94, 96, |
104, 108, 112, 116, 120, 124, 128, 132, 136, 140, |
98, 100, 102, 104, 106, 108, 110 |
144, 148, 152, 156, 161, 163, 167, 169, 171, 173, |
|
175, 177 |
|
}; | }; |
| |
static const short yyrhs[] = { 28, |
static const short yyrhs[] = { 30, |
0, 12, 32, 29, 0, 12, 32, 29, 31, 0, |
0, 21, 31, 33, 0, 25, 0, 32, 0, 41, |
14, 30, 0, 15, 0, 13, 35, 0, 33, 0, |
0, 32, 26, 41, 0, 34, 35, 0, 34, 0, |
22, 0, 34, 0, 33, 23, 34, 0, 15, 0, |
23, 42, 0, 22, 36, 0, 36, 17, 36, 0, |
15, 24, 15, 0, 35, 17, 35, 0, 35, 18, |
36, 18, 36, 0, 16, 36, 0, 27, 36, 28, |
35, 0, 16, 35, 0, 25, 35, 26, 0, 36, |
0, 37, 0, 37, 19, 40, 0, 37, 19, 16, |
0, 34, 8, 40, 0, 34, 10, 40, 0, 34, |
40, 0, 38, 0, 39, 0, 43, 12, 43, 0, |
9, 40, 0, 34, 11, 40, 0, 34, 6, 40, |
43, 14, 43, 0, 43, 13, 43, 0, 43, 15, |
0, 34, 7, 40, 0, 40, 8, 34, 0, 40, |
43, 0, 43, 10, 43, 0, 43, 11, 43, 0, |
10, 34, 0, 40, 9, 34, 0, 40, 11, 34, |
41, 9, 42, 0, 43, 19, 8, 0, 43, 19, |
0, 40, 6, 34, 0, 40, 7, 34, 0, 37, |
16, 8, 0, 6, 0, 7, 0, 20, 0, 20, |
8, 40, 0, 37, 10, 40, 0, 37, 9, 40, |
0, 41, 0, 3, 0, 4, 0, 5, 0, 40, |
0, 37, 11, 40, 0, 37, 6, 40, 0, 37, |
0 |
7, 40, 0, 40, 8, 37, 0, 40, 10, 37, |
|
0, 40, 9, 37, 0, 40, 11, 37, 0, 40, |
|
6, 37, 0, 40, 7, 37, 0, 30, 19, 30, |
|
0, 15, 25, 26, 0, 15, 25, 38, 26, 0, |
|
39, 0, 38, 23, 39, 0, 34, 0, 40, 0, |
|
37, 0, 3, 0, 4, 0, 5, 0 |
|
}; | }; |
| |
#endif | #endif |
| |
#if YYDEBUG != 0 | #if YYDEBUG != 0 |
static const short yyrline[] = { 0, | static const short yyrline[] = { 0, |
108, 123, 127, 132, 137, 142, 148, 152, 157, 161, |
159, 165, 171, 175, 181, 185, 191, 195, 201, 208, |
167, 171, 177, 181, 185, 189, 193, 199, 203, 207, |
214, 219, 224, 230, 234, 238, 243, 252, 256, 262, |
211, 215, 219, 223, 227, 231, 235, 239, 243, 247, |
267, 272, 277, 282, 287, 292, 300, 305, 312, 316, |
251, 255, 259, 263, 267, 271, 275, 279, 283, 287, |
322, 328, 335, 341, 346, 351, 356 |
291, 295, 301, 305, 311, 315, 321, 322, 323, 327, |
|
331, 335 |
|
}; | }; |
|
#endif |
|
|
|
|
|
#if YYDEBUG != 0 || defined (YYERROR_VERBOSE) |
| |
static const char * const yytname[] = { "$","error","$undefined.","TOK_INTEGER", | static const char * const yytname[] = { "$","error","$undefined.","TOK_INTEGER", |
"TOK_DOUBLE","STRING_LITERAL","EQ","NE","LT","LE","GT","GE","TOK_SELECT","WHERE", |
"TOK_DOUBLE","TOK_STRING","TOK_TRUE","TOK_FALSE","TOK_NULL","TOK_ISA","TOK_EQ", |
"FROM","TOK_IDENTIFIER","NOT","OR","AND","ISA","WQL_TRUE","WQL_FALSE","'*'", |
"TOK_NE","TOK_LT","TOK_LE","TOK_GT","TOK_GE","TOK_NOT","TOK_OR","TOK_AND","TOK_IS", |
"','","'.'","'('","')'","start","selectStatement","fromClass","className","whereClause", |
"TOK_IDENTIFIER","TOK_SELECT","TOK_WHERE","TOK_FROM","TOK_UNEXPECTED_CHAR","'*'", |
"propertyListOrStar","propertyList","property","expression","expressionTerm", |
"','","'('","')'","start","selectStatement","selectList","propertyList","selectExpression", |
"function","functionParameterList","functionParameter","constant","" |
"fromClause","whereClause","searchCondition","predicate","comparisonPredicate", |
|
"nullPredicate","truthValue","propertyName","className","comparisonTerm", NULL |
}; | }; |
#endif | #endif |
| |
static const short yyr1[] = { 0, | static const short yyr1[] = { 0, |
27, 28, 28, 29, 30, 31, 32, 32, 33, 33, |
29, 30, 31, 31, 32, 32, 33, 33, 34, 35, |
34, 34, 35, 35, 35, 35, 35, 36, 36, 36, |
36, 36, 36, 36, 36, 36, 36, 37, 37, 38, |
36, 36, 36, 36, 36, 36, 36, 36, 36, 36, |
38, 38, 38, 38, 38, 38, 39, 39, 40, 40, |
36, 36, 36, 36, 36, 36, 36, 36, 36, 36, |
41, 42, 43, 43, 43, 43, 43 |
36, 36, 37, 37, 38, 38, 39, 39, 39, 40, |
|
40, 40 |
|
}; | }; |
| |
static const short yyr2[] = { 0, | static const short yyr2[] = { 0, |
1, 3, 4, 2, 1, 2, 1, 1, 1, 3, |
1, 3, 1, 1, 1, 3, 2, 1, 2, 2, |
1, 3, 3, 3, 2, 3, 1, 3, 3, 3, |
3, 3, 2, 3, 1, 3, 4, 1, 1, 3, |
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
3, 3, 3, 3, 3, 3, 3, 4, 1, 1, |
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
1, 1, 1, 1, 1, 1, 1 |
3, 3, 3, 4, 1, 3, 1, 1, 1, 1, |
|
1, 1 |
|
}; | }; |
| |
static const short yydefact[] = { 0, | static const short yydefact[] = { 0, |
0, 1, 11, 8, 0, 7, 9, 0, 0, 2, |
0, 1, 31, 3, 0, 4, 5, 0, 2, 8, |
0, 12, 5, 4, 0, 3, 10, 50, 51, 52, |
0, 32, 9, 0, 7, 6, 34, 35, 36, 29, |
11, 0, 0, 0, 0, 6, 17, 0, 0, 0, |
30, 0, 0, 10, 15, 18, 19, 37, 33, 0, |
15, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
13, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
0, 0, 0, 14, 11, 12, 0, 16, 26, 33, |
0, 0, 0, 11, 43, 47, 49, 0, 45, 48, |
24, 25, 20, 22, 21, 23, 27, 0, 17, 28, |
16, 42, 22, 23, 18, 20, 19, 21, 13, 14, |
0, 0, 0 |
34, 35, 30, 32, 31, 33, 28, 40, 29, 41, |
|
24, 36, 26, 38, 25, 37, 27, 39, 0, 44, |
|
46, 0, 0, 0 |
|
}; | }; |
| |
static const short yydefgoto[] = { 92, |
static const short yydefgoto[] = { 61, |
2, 10, 24, 16, 5, 6, 25, 26, 27, 28, |
2, 5, 6, 9, 10, 15, 24, 25, 26, 27, |
58, 59, 29 |
28, 50, 13, 30 |
}; | }; |
| |
static const short yypact[] = { -9, | static const short yypact[] = { -9, |
19,-32768, -20,-32768, 4, -17,-32768, 13, 18, 33, |
32,-32768,-32768,-32768, -8, 5,-32768, 22,-32768, 37, |
39,-32768,-32768,-32768, 40,-32768,-32768,-32768,-32768,-32768, |
38,-32768,-32768, -2,-32768,-32768,-32768,-32768,-32768,-32768, |
48, 40, 40, 41, 71, 46,-32768, 83, 89, 27, |
-32768, -2, -2, 36, 41,-32768,-32768,-32768, 52, 26, |
-32768, 44, 18, 80, 80, 80, 80, 80, 80, 40, |
-32768, -11, -2, -2, 28, 22, 23, 23, 23, 23, |
40, 80, 80, 80, 80, 80, 80, 53, 53, 53, |
23, 23, 8,-32768, 44,-32768, 49,-32768,-32768,-32768, |
53, 53, 53, 50,-32768,-32768,-32768, -21,-32768,-32768, |
-32768,-32768,-32768,-32768,-32768,-32768,-32768, 55,-32768,-32768, |
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 68,-32768, |
64, 65,-32768 |
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, |
|
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 54,-32768, |
|
-32768, 87, 101,-32768 |
|
}; | }; |
| |
static const short yypgoto[] = {-32768, | static const short yypgoto[] = {-32768, |
-32768,-32768, -8,-32768,-32768,-32768, -1, -14,-32768, -13, |
-32768,-32768,-32768,-32768,-32768,-32768, -14,-32768,-32768,-32768, |
-32768, -18, -23 |
-24, -1, 30, 9 |
}; | }; |
| |
| |
#define YYLAST 101 |
#define YYLAST 66 |
| |
| |
static const short yytable[] = { 7, | static const short yytable[] = { 7, |
14, 89, 1, 8, 90, 11, 60, 31, 32, 17, |
17, 18, 19, 20, 21, 33, 34, 31, 32, 16, |
63, 64, 65, 66, 67, 68, 57, 9, 71, 72, |
48, 1, 29, 22, 8, 57, 44, 3, 45, 46, |
73, 74, 75, 76, 62, 69, 70, 12, 56, 18, |
29, 29, 59, 58, 23, 17, 18, 19, 20, 21, |
19, 20, 13, 3, 78, 80, 82, 84, 86, 88, |
11, 29, 29, 20, 21, 37, 38, 39, 40, 41, |
4, 54, 18, 19, 20, 15, 77, 79, 81, 83, |
42, 12, 3, 47, 43, 51, 52, 53, 54, 55, |
85, 87, 55, 3, 21, 22, 18, 19, 20, 33, |
56, 3, 33, 34, 20, 21, 4, 3, 14, 35, |
40, 41, 40, 41, 23, 60, -5, 54, 54, 61, |
36, 34, 60, 62, 63, 49 |
91, 8, 30, 8, 30, 57, 34, 35, 36, 37, |
|
38, 39, 18, 19, 20, 41, 93, 56, 42, 43, |
|
44, 45, 46, 47, 48, 49, 50, 51, 52, 53, |
|
94 |
|
}; | }; |
| |
static const short yycheck[] = { 1, | static const short yycheck[] = { 1, |
9, 23, 12, 24, 26, 23, 30, 22, 23, 11, |
3, 4, 5, 6, 7, 17, 18, 22, 23, 11, |
34, 35, 36, 37, 38, 39, 30, 14, 42, 43, |
35, 21, 14, 16, 23, 8, 28, 20, 33, 34, |
44, 45, 46, 47, 33, 40, 41, 15, 30, 3, |
22, 23, 47, 16, 27, 3, 4, 5, 6, 7, |
4, 5, 15, 15, 48, 49, 50, 51, 52, 53, |
26, 33, 34, 6, 7, 10, 11, 12, 13, 14, |
22, 15, 3, 4, 5, 13, 48, 49, 50, 51, |
15, 20, 20, 16, 19, 37, 38, 39, 40, 41, |
52, 53, 26, 15, 15, 16, 3, 4, 5, 19, |
42, 20, 17, 18, 6, 7, 25, 20, 22, 19, |
17, 18, 17, 18, 25, 89, 19, 15, 15, 26, |
9, 18, 8, 0, 0, 36 |
89, 24, 25, 24, 25, 89, 6, 7, 8, 9, |
|
10, 11, 3, 4, 5, 18, 0, 89, 6, 7, |
|
8, 9, 10, 11, 6, 7, 8, 9, 10, 11, |
|
0 |
|
}; | }; |
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ | /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ |
#line 3 "bison.simple" | #line 3 "bison.simple" |
|
|
switch (yyn) { | switch (yyn) { |
| |
case 1: | case 1: |
#line 109 "wql.y" |
#line 160 "wql.y" |
{ | { |
|
WQL_TRACE(("YACC: start\n")); |
; | ; |
break;} | break;} |
case 2: | case 2: |
#line 124 "wql.y" |
#line 166 "wql.y" |
{ | { |
| |
; | ; |
break;} | break;} |
case 3: | case 3: |
#line 128 "wql.y" |
#line 172 "wql.y" |
{ | { |
|
globalParserState->statement->setAllProperties(true); |
; | ; |
break;} | break;} |
case 4: | case 4: |
#line 133 "wql.y" |
#line 176 "wql.y" |
{ | { |
yyval.strValue = yyvsp[0].strValue; |
|
; | ; |
break;} | break;} |
case 5: | case 5: |
#line 138 "wql.y" |
#line 182 "wql.y" |
{ | { |
yyval.strValue = yyvsp[0].strValue |
globalParserState->statement->appendSelectPropertyName(CIMName(yyvsp[0].strValue)); |
; | ; |
break;} | break;} |
case 6: | case 6: |
#line 143 "wql.y" |
#line 186 "wql.y" |
{ | { |
|
globalParserState->statement->appendSelectPropertyName(CIMName(yyvsp[0].strValue)); |
; | ; |
break;} | break;} |
case 7: | case 7: |
#line 149 "wql.y" |
#line 192 "wql.y" |
{ | { |
| |
; | ; |
break;} | break;} |
case 8: | case 8: |
#line 153 "wql.y" |
#line 196 "wql.y" |
{ | { |
| |
; | ; |
break;} | break;} |
case 9: | case 9: |
#line 158 "wql.y" |
#line 202 "wql.y" |
{ | { |
|
WQL_TRACE(("YACC: fromClause: TOK_FROM className(%s)\n", yyvsp[0].strValue)); |
|
globalParserState->statement->setClassName(CIMName(yyvsp[0].strValue)); |
; | ; |
break;} | break;} |
case 10: | case 10: |
#line 162 "wql.y" |
#line 209 "wql.y" |
{ | { |
| |
; | ; |
break;} | break;} |
case 11: | case 11: |
#line 168 "wql.y" |
#line 215 "wql.y" |
{ | { |
|
WQL_TRACE(("YACC: TOK_OR\n")); |
|
globalParserState->statement->appendOperation(WQL_OR); |
; | ; |
break;} | break;} |
case 12: | case 12: |
#line 172 "wql.y" |
#line 220 "wql.y" |
{ | { |
|
WQL_TRACE(("YACC: TOK_AND\n")); |
|
globalParserState->statement->appendOperation(WQL_AND); |
; | ; |
break;} | break;} |
case 13: | case 13: |
#line 178 "wql.y" |
#line 225 "wql.y" |
{ | { |
|
WQL_TRACE(("YACC: TOK_NOT\n")); |
| |
|
globalParserState->statement->appendOperation(WQL_NOT); |
; | ; |
break;} | break;} |
case 14: | case 14: |
#line 182 "wql.y" |
#line 231 "wql.y" |
{ | { |
| |
; | ; |
break;} | break;} |
case 15: | case 15: |
#line 186 "wql.y" |
#line 235 "wql.y" |
{ | { |
| |
; | ; |
break;} | break;} |
case 16: | case 16: |
#line 190 "wql.y" |
#line 239 "wql.y" |
{ | { |
|
WQLOperation op = yyvsp[0].intValue ? WQL_IS_TRUE : WQL_IS_FALSE; |
|
globalParserState->statement->appendOperation(op); |
; | ; |
break;} | break;} |
case 17: | case 17: |
#line 194 "wql.y" |
#line 244 "wql.y" |
{ | { |
|
WQLOperation op = yyvsp[0].intValue ? WQL_IS_NOT_TRUE : WQL_IS_NOT_FALSE; |
|
globalParserState->statement->appendOperation(op); |
; | ; |
break;} | break;} |
case 18: | case 18: |
#line 200 "wql.y" |
#line 253 "wql.y" |
{ | { |
| |
; | ; |
break;} | break;} |
case 19: | case 19: |
#line 204 "wql.y" |
#line 257 "wql.y" |
{ | { |
| |
; | ; |
break;} | break;} |
case 20: | case 20: |
#line 208 "wql.y" |
#line 263 "wql.y" |
{ | { |
|
WQL_TRACE(("YACC: TOK_LT\n")); |
|
globalParserState->statement->appendOperation(WQL_LT); |
; | ; |
break;} | break;} |
case 21: | case 21: |
#line 212 "wql.y" |
#line 268 "wql.y" |
{ | { |
|
WQL_TRACE(("YACC: TOK_GT\n")); |
|
globalParserState->statement->appendOperation(WQL_GT); |
; | ; |
break;} | break;} |
case 22: | case 22: |
#line 216 "wql.y" |
#line 273 "wql.y" |
{ | { |
|
WQL_TRACE(("YACC: TOK_LE\n")); |
|
globalParserState->statement->appendOperation(WQL_LE); |
; | ; |
break;} | break;} |
case 23: | case 23: |
#line 220 "wql.y" |
#line 278 "wql.y" |
{ | { |
|
WQL_TRACE(("YACC: TOK_GE\n")); |
|
globalParserState->statement->appendOperation(WQL_GE); |
; | ; |
break;} | break;} |
case 24: | case 24: |
#line 224 "wql.y" |
#line 283 "wql.y" |
{ | { |
|
WQL_TRACE(("YACC: TOK_EQ\n")); |
|
globalParserState->statement->appendOperation(WQL_EQ); |
; | ; |
break;} | break;} |
case 25: | case 25: |
#line 228 "wql.y" |
#line 288 "wql.y" |
{ | { |
|
WQL_TRACE(("YACC: TOK_NE\n")); |
|
globalParserState->statement->appendOperation(WQL_NE); |
; | ; |
break;} | break;} |
case 26: | case 26: |
#line 232 "wql.y" |
#line 293 "wql.y" |
{ | { |
| |
|
WQL_TRACE(("YACC: TOK_ISA\n")); |
|
// ADD statement phrase. |
; | ; |
break;} | break;} |
case 27: | case 27: |
#line 236 "wql.y" |
#line 301 "wql.y" |
{ | { |
|
WQL_TRACE(("YACC: nullPredicate : comparisonTerm IS NULL\n")); |
|
globalParserState->statement->appendOperation(WQL_IS_NULL); |
; | ; |
break;} | break;} |
case 28: | case 28: |
#line 240 "wql.y" |
#line 306 "wql.y" |
{ | { |
|
WQL_TRACE(("YACC: nullPredicate : comparisonTerm IS NOT NULL\n")); |
|
globalParserState->statement->appendOperation(WQL_IS_NOT_NULL); |
; | ; |
break;} | break;} |
case 29: | case 29: |
#line 244 "wql.y" |
#line 313 "wql.y" |
{ | { |
|
yyval.intValue = 1; |
; | ; |
break;} | break;} |
case 30: | case 30: |
#line 248 "wql.y" |
#line 317 "wql.y" |
{ | { |
|
yyval.intValue = 0; |
; | ; |
break;} | break;} |
case 31: | case 31: |
#line 252 "wql.y" |
#line 323 "wql.y" |
{ | { |
|
WQL_TRACE(("YACC: propertyName : TOK_IDENTIFIER(%s)\n", yyvsp[0].strValue)); |
|
yyval.strValue = yyvsp[0].strValue; |
; | ; |
break;} | break;} |
case 32: | case 32: |
#line 256 "wql.y" |
#line 329 "wql.y" |
{ | { |
|
WQL_TRACE(("YACC: TOK_IDENTIFIER %s\n", yyvsp[0].strValue)); |
|
yyval.strValue = yyvsp[0].strValue; |
; | ; |
break;} | break;} |
case 33: | case 33: |
#line 260 "wql.y" |
#line 336 "wql.y" |
{ | { |
|
globalParserState->statement->appendOperand( |
|
WQLOperand(yyvsp[0].strValue, WQL_PROPERTY_NAME_TAG)); |
|
globalParserState->statement->appendWherePropertyName(CIMName(yyvsp[0].strValue)); |
; | ; |
break;} | break;} |
case 34: | case 34: |
#line 264 "wql.y" |
#line 342 "wql.y" |
{ | { |
|
globalParserState->statement->appendOperand( |
|
WQLOperand(yyvsp[0].intValue, WQL_INTEGER_VALUE_TAG)); |
; | ; |
break;} | break;} |
case 35: | case 35: |
#line 268 "wql.y" |
#line 347 "wql.y" |
{ | { |
|
globalParserState->statement->appendOperand( |
|
WQLOperand(yyvsp[0].doubleValue, WQL_DOUBLE_VALUE_TAG)); |
; | ; |
break;} | break;} |
case 36: | case 36: |
#line 272 "wql.y" |
#line 352 "wql.y" |
{ | { |
|
globalParserState->statement->appendOperand( |
|
WQLOperand(yyvsp[0].strValue, WQL_STRING_VALUE_TAG)); |
; | ; |
break;} | break;} |
case 37: | case 37: |
#line 276 "wql.y" |
#line 357 "wql.y" |
{ |
|
|
|
; |
|
break;} |
|
case 38: |
|
#line 280 "wql.y" |
|
{ |
|
|
|
; |
|
break;} |
|
case 39: |
|
#line 284 "wql.y" |
|
{ |
|
|
|
; |
|
break;} |
|
case 40: |
|
#line 288 "wql.y" |
|
{ |
|
|
|
; |
|
break;} |
|
case 41: |
|
#line 292 "wql.y" |
|
{ | { |
|
globalParserState->statement->appendOperand( |
; |
WQLOperand(yyvsp[0].intValue != 0, WQL_BOOLEAN_VALUE_TAG)); |
break;} |
|
case 42: |
|
#line 296 "wql.y" |
|
{ |
|
|
|
; |
|
break;} |
|
case 43: |
|
#line 302 "wql.y" |
|
{ |
|
|
|
; |
|
break;} |
|
case 44: |
|
#line 306 "wql.y" |
|
{ |
|
|
|
; |
|
break;} |
|
case 45: |
|
#line 312 "wql.y" |
|
{ |
|
|
|
; |
|
break;} |
|
case 46: |
|
#line 316 "wql.y" |
|
{ |
|
|
|
; |
|
break;} |
|
case 50: |
|
#line 328 "wql.y" |
|
{ |
|
|
|
; |
|
break;} |
|
case 51: |
|
#line 332 "wql.y" |
|
{ |
|
|
|
; |
|
break;} |
|
case 52: |
|
#line 336 "wql.y" |
|
{ |
|
|
|
; | ; |
break;} | break;} |
} | } |
|
|
} | } |
return 1; | return 1; |
} | } |
#line 340 "wql.y" |
#line 362 "wql.y" |
| |
|
|
int WQL_error(char* errorMessage) |
|
{ |
|
fprintf(stderr, "WQL_error: %s\n", errorMessage); |
|
return -1; |
|
} |
|