version 1.1.2.11, 2001/12/09 02:57:09
|
version 1.1.2.12, 2001/12/12 17:45:53
|
|
|
| |
/* A Bison parser, made from wql.y |
/* A Bison parser, made from wql.y with Bison version GNU Bison version 1.24 |
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 257 |
#define TOK_INTEGER 258 |
#define TOK_DOUBLE 258 |
#define TOK_DOUBLE 259 |
#define TOK_STRING 259 |
#define TOK_STRING 260 |
#define TOK_TRUE 260 |
#define TOK_TRUE 261 |
#define TOK_FALSE 261 |
#define TOK_FALSE 262 |
#define TOK_NULL 262 |
#define TOK_NULL 263 |
#define TOK_EQ 263 |
#define TOK_EQ 264 |
#define TOK_NE 264 |
#define TOK_NE 265 |
#define TOK_LT 265 |
#define TOK_LT 266 |
#define TOK_LE 266 |
#define TOK_LE 267 |
#define TOK_GT 267 |
#define TOK_GT 268 |
#define TOK_GE 268 |
#define TOK_GE 269 |
#define TOK_NOT 269 |
#define TOK_NOT 270 |
#define TOK_OR 270 |
#define TOK_OR 271 |
#define TOK_AND 271 |
#define TOK_AND 272 |
#define TOK_IS 272 |
#define TOK_IS 273 |
#define TOK_IDENTIFIER 273 |
#define TOK_IDENTIFIER 274 |
#define TOK_SELECT 274 |
#define TOK_SELECT 275 |
#define TOK_WHERE 275 |
#define TOK_WHERE 276 |
#define TOK_FROM 276 |
#define TOK_FROM 277 |
#define TOK_UNEXPECTED_CHAR 277 |
#define TOK_UNEXPECTED_CHAR 278 |
| |
#line 9 "wql.y" | #line 9 "wql.y" |
| |
|
|
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 YYFLAG -32768 | #define YYFLAG -32768 |
#define YYNTBASE 28 | #define YYNTBASE 28 |
| |
#define YYTRANSLATE(x) ((unsigned)(x) <= 277 ? yytranslate[x] : 43) |
#define YYTRANSLATE(x) ((unsigned)(x) <= 278 ? yytranslate[x] : 43) |
| |
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, 2, | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 1, 3, 4, 5, 6, |
2, 2, 2, 2, 2, 1, 2, 3, 4, 5, |
7, 8, 9, 10, 11, 12, 13, 14, 15, 16, |
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, |
17, 18, 19, 20, 21, 22, 23 |
16, 17, 18, 19, 20, 21, 22, 23 |
}; | }; |
| |
#if YYDEBUG != 0 | #if YYDEBUG != 0 |
|
|
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 |
|
|
|
|
|
#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","TOK_STRING","TOK_TRUE","TOK_FALSE","TOK_NULL","TOK_EQ","TOK_NE", | "TOK_DOUBLE","TOK_STRING","TOK_TRUE","TOK_FALSE","TOK_NULL","TOK_EQ","TOK_NE", |
|
|
"TOK_SELECT","TOK_WHERE","TOK_FROM","TOK_UNEXPECTED_CHAR","'*'","','","'('", | "TOK_SELECT","TOK_WHERE","TOK_FROM","TOK_UNEXPECTED_CHAR","'*'","','","'('", |
"')'","start","selectStatement","selectList","propertyList","selectExpression", | "')'","start","selectStatement","selectList","propertyList","selectExpression", |
"fromClause","whereClause","searchCondition","predicate","comparisonPredicate", | "fromClause","whereClause","searchCondition","predicate","comparisonPredicate", |
"nullPredicate","truthValue","propertyName","className","comparisonTerm", NULL |
"nullPredicate","truthValue","propertyName","className","comparisonTerm","" |
}; | }; |
#endif | #endif |
| |
|
|
case 3: | case 3: |
#line 143 "wql.y" | #line 143 "wql.y" |
{ | { |
globalParserState->statement->appendPropertyName("*"); |
globalParserState->statement->appendSelectPropertyName("*"); |
; | ; |
break;} | break;} |
case 4: | case 4: |
|
|
case 5: | case 5: |
#line 153 "wql.y" | #line 153 "wql.y" |
{ | { |
globalParserState->statement->appendPropertyName(yyvsp[0].strValue); |
globalParserState->statement->appendSelectPropertyName(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(yyvsp[0].strValue); |
; | ; |
break;} | break;} |
case 7: | case 7: |
|
|
{ | { |
globalParserState->statement->appendOperand( | globalParserState->statement->appendOperand( |
WQLOperand(yyvsp[0].strValue, WQL_PROPERTY_NAME_TAG)); | WQLOperand(yyvsp[0].strValue, WQL_PROPERTY_NAME_TAG)); |
|
globalParserState->statement->appendWherePropertyName(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, WQL_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, WQL_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, WQL_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, WQL_BOOLEAN_VALUE_TAG)); | WQLOperand(yyvsp[0].intValue != 0, WQL_BOOLEAN_VALUE_TAG)); |
|
|
} | } |
return 1; | return 1; |
} | } |
#line 326 "wql.y" |
#line 327 "wql.y" |
| |