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

Diff for /pegasus/src/Pegasus/WQL/WQL.y between version 1.1.2.5 and 1.1.2.6

version 1.1.2.5, 2001/12/02 20:36:49 version 1.1.2.6, 2001/12/02 22:03:23
Line 11 
Line 11 
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
 #include <Pegasus/WQL/WQLOperation.h> #include <Pegasus/WQL/WQLOperation.h>
 #include <Pegasus/WQL/WQLOperand.h> #include <Pegasus/WQL/WQLOperand.h>
   #include <Pegasus/WQL/WQLParserState.h>
 #include <Pegasus/WQL/WQLSelectStatement.h> #include <Pegasus/WQL/WQLSelectStatement.h>
 #include <string.h> #include <string.h>
 #include <stdlib.h> #include <stdlib.h>
Line 24 
Line 25 
 #endif #endif
  
 #if 1 #if 1
 # define WQL_TRACE(X) printf(X)  # define WQL_TRACE(X) printf X
 #else #else
 # define WQL_TRACE(X) # define WQL_TRACE(X)
 #endif #endif
Line 32 
Line 33 
 extern int WQL_lex(); extern int WQL_lex();
 extern int WQL_error(char*); extern int WQL_error(char*);
  
   PEGASUS_USING_PEGASUS;
   
   PEGASUS_NAMESPACE_BEGIN
   
   extern WQLParserState* globalParserState;
   
   PEGASUS_NAMESPACE_END
   
 %} %}
  
 /* /*
Line 82 
Line 91 
 %token <intValue> TOK_WHERE %token <intValue> TOK_WHERE
 %token <intValue> TOK_FROM %token <intValue> TOK_FROM
  
 %token <strValue> TOK_UNEXPECTED_CHAR  %token <intValue> TOK_UNEXPECTED_CHAR
  
 %type <nodeValue> propertyName  %type <strValue> propertyName
 %type <nodeValue> propertyList %type <nodeValue> propertyList
 %type <nodeValue> predicate %type <nodeValue> predicate
 %type <nodeValue> comparisonPredicate %type <nodeValue> comparisonPredicate
Line 127 
Line 136 
 selectList selectList
     : '*'     : '*'
     {     {
           globalParserState->statement->appendPropertyName("*");
     }     }
     | propertyList     | propertyList
     {     {
Line 137 
Line 146 
 propertyList propertyList
     : propertyName     : propertyName
     {     {
           globalParserState->statement->appendPropertyName($1);
     }     }
     | propertyList ',' propertyName     | propertyList ',' propertyName
     {     {
           globalParserState->statement->appendPropertyName($3);
     }     }
  
 selectExpression selectExpression
Line 157 
Line 166 
 fromClause fromClause
     : TOK_FROM className     : TOK_FROM className
     {     {
           WQL_TRACE(("YACC: fromClause: TOK_FROM className(%s)\n", $2));
           globalParserState->statement->setClassName($2);
           delete [] $2;
     }     }
  
 whereClause whereClause
Line 255 
Line 266 
 propertyName propertyName
     : TOK_IDENTIFIER     : TOK_IDENTIFIER
     {     {
           WQL_TRACE(("YACC: propertyName : TOK_IDENTIFIER(%s)\n", $1));
           $$ = $1;
     }     }
  
 className : TOK_IDENTIFIER className : TOK_IDENTIFIER
     {     {
           WQL_TRACE(("YACC: TOK_IDENTIFIER %s\n", $1));
           $$ = $1;
     }     }
  
 comparisonTerm comparisonTerm
Line 286 
Line 299 
     }     }
  
 %% %%
   
 int WQL_error(char* errorMessage)  
 {  
     fprintf(stderr, "WQL_error: %s\n", errorMessage);  
     return -1;  
 }  


Legend:
Removed from v.1.1.2.5  
changed lines
  Added in v.1.1.2.6

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2