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

Diff for /pegasus/src/Pegasus/WQL/WQL.l between version 1.1.2.7 and 1.1.2.8

version 1.1.2.7, 2001/12/02 22:03:23 version 1.1.2.8, 2001/12/03 00:08:00
Line 7 
Line 7 
 /* ATTN: works with Flex only */ /* ATTN: works with Flex only */
 #define YY_INPUT(BUF, NREAD, NREQUESTED) WQLInput(BUF, NREAD, NREQUESTED) #define YY_INPUT(BUF, NREAD, NREQUESTED) WQLInput(BUF, NREAD, NREQUESTED)
  
   #include <Pegasus/Common/Config.h>
   #include <Pegasus/WQL/WQLParserState.h>
 #include <cstring> #include <cstring>
 #include <cassert> #include <cassert>
 #include "WQLYACC.h" #include "WQLYACC.h"
Line 17 
Line 19 
 # define WQL_TRACE(X) # define WQL_TRACE(X)
 #endif #endif
  
   PEGASUS_NAMESPACE_BEGIN
   
   extern WQLParserState* globalParserState;
   
   static char* CloneString(const char* str, Uint32 size = (Uint32)-1);
   
   PEGASUS_NAMESPACE_END
   
   PEGASUS_USING_PEGASUS;
   
 %} %}
  
 POSITIVE_DECIMAL_DIGIT [1-9] POSITIVE_DECIMAL_DIGIT [1-9]
Line 56 
Line 68 
     return TOK_FALSE;     return TOK_FALSE;
 } }
  
 [Nn][Ul][Ul] {  [Nn][Uu][Ll][Ll] {
  
     WQL_TRACE(("LEX: %s [TOK_NULL]\n", yytext));     WQL_TRACE(("LEX: %s [TOK_NULL]\n", yytext));
     return TOK_NULL;     return TOK_NULL;
Line 102 
Line 114 
  
 [-+]?{DECIMAL_DIGIT}*\.{DECIMAL_DIGIT}+([eE][+-]?{DECIMAL_DIGIT}+)? { [-+]?{DECIMAL_DIGIT}*\.{DECIMAL_DIGIT}+([eE][+-]?{DECIMAL_DIGIT}+)? {
  
       /* ATTN: make this consistent with WBEMSQL1 "standard" */
   
     WQL_TRACE(("LEX: %s [TOK_DOUBLE]\n", yytext));     WQL_TRACE(("LEX: %s [TOK_DOUBLE]\n", yytext));
     WQL_lval.doubleValue = strtod((char*)yytext, (char**)0);     WQL_lval.doubleValue = strtod((char*)yytext, (char**)0);
     return TOK_DOUBLE;     return TOK_DOUBLE;
Line 120 
Line 134 
         size_t n = strlen(yytext) - 2;         size_t n = strlen(yytext) - 2;
         char* strValue = new char[n + 1];         char* strValue = new char[n + 1];
         memcpy(strValue, yytext + 1, n);         memcpy(strValue, yytext + 1, n);
         strValue[n - 1] = '\0';          strValue[n] = '\0';
         WQL_lval.strValue = strValue;         WQL_lval.strValue = strValue;
           globalParserState->outstandingStrings.append(strValue);
     }     }
  
     return TOK_STRING;     return TOK_STRING;
Line 183 
Line 198 
         memcpy(strValue, yytext, n);         memcpy(strValue, yytext, n);
         strValue[n] = '\0';         strValue[n] = '\0';
         WQL_lval.strValue = strValue;         WQL_lval.strValue = strValue;
           globalParserState->outstandingStrings.append(strValue);
     }     }
  
     return TOK_IDENTIFIER;     return TOK_IDENTIFIER;


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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2