version 1.1.2.7, 2001/12/03 00:08:00
|
version 1.3.6.1, 2003/01/27 21:26:52
|
|
|
#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: |
|
|
selectList | selectList |
: '*' | : '*' |
{ | { |
globalParserState->statement->appendPropertyName("*"); |
globalParserState->statement->setAllProperties(true); |
} | } |
| propertyList | | propertyList |
{ | { |
|
|
propertyList | propertyList |
: propertyName | : propertyName |
{ | { |
globalParserState->statement->appendPropertyName($1); |
globalParserState->statement->appendSelectPropertyName(CIMName($1)); |
} | } |
| propertyList ',' propertyName | | propertyList ',' propertyName |
{ | { |
globalParserState->statement->appendPropertyName($3); |
globalParserState->statement->appendSelectPropertyName(CIMName($3)); |
} | } |
| |
selectExpression | selectExpression |
|
|
: TOK_FROM className | : TOK_FROM className |
{ | { |
WQL_TRACE(("YACC: fromClause: TOK_FROM className(%s)\n", $2)); | WQL_TRACE(("YACC: fromClause: TOK_FROM className(%s)\n", $2)); |
globalParserState->statement->setClassName($2); |
globalParserState->statement->setClassName(CIMName($2)); |
} | } |
| |
whereClause | whereClause |
|
|
: propertyName | : propertyName |
{ | { |
globalParserState->statement->appendOperand( | globalParserState->statement->appendOperand( |
WQLOperand($1, WQLOperand::PROPERTY_NAME_TAG)); |
WQLOperand($1, WQL_PROPERTY_NAME_TAG)); |
|
globalParserState->statement->appendWherePropertyName(CIMName($1)); |
} | } |
| TOK_INTEGER | | TOK_INTEGER |
{ | { |
globalParserState->statement->appendOperand( | globalParserState->statement->appendOperand( |
WQLOperand($1, WQLOperand::INTEGER_VALUE_TAG)); |
WQLOperand($1, WQL_INTEGER_VALUE_TAG)); |
} | } |
| TOK_DOUBLE | | TOK_DOUBLE |
{ | { |
globalParserState->statement->appendOperand( | globalParserState->statement->appendOperand( |
WQLOperand($1, WQLOperand::DOUBLE_VALUE_TAG)); |
WQLOperand($1, WQL_DOUBLE_VALUE_TAG)); |
} | } |
| TOK_STRING | | TOK_STRING |
{ | { |
globalParserState->statement->appendOperand( | globalParserState->statement->appendOperand( |
WQLOperand($1, WQLOperand::STRING_VALUE_TAG)); |
WQLOperand($1, WQL_STRING_VALUE_TAG)); |
} | } |
| truthValue | | truthValue |
{ | { |
globalParserState->statement->appendOperand( | globalParserState->statement->appendOperand( |
WQLOperand($1 != 0, WQLOperand::BOOLEAN_VALUE_TAG)); |
WQLOperand($1 != 0, WQL_BOOLEAN_VALUE_TAG)); |
} | } |
| |
%% | %% |