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

   1 karl  1.18 /* To be inserted in other files to bypass the chksrc tests */
   2 kumpf 1.17 /* NOCHKSRC */
   3 karl  1.18 
   4 kumpf 1.17 /* A Bison parser, made by GNU Bison 2.3.  */
   5            
   6            /* Skeleton implementation for Bison's Yacc-like parsers in C
   7 karl  1.12 
   8 kumpf 1.17    Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
   9               Free Software Foundation, Inc.
  10 karl  1.12 
  11 karl  1.15    This program is free software; you can redistribute it and/or modify
  12               it under the terms of the GNU General Public License as published by
  13               the Free Software Foundation; either version 2, or (at your option)
  14               any later version.
  15 karl  1.13 
  16 karl  1.15    This program is distributed in the hope that it will be useful,
  17               but WITHOUT ANY WARRANTY; without even the implied warranty of
  18               MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19               GNU General Public License for more details.
  20            
  21               You should have received a copy of the GNU General Public License
  22               along with this program; if not, write to the Free Software
  23 kumpf 1.17    Foundation, Inc., 51 Franklin Street, Fifth Floor,
  24               Boston, MA 02110-1301, USA.  */
  25 karl  1.15 
  26 kumpf 1.17 /* As a special exception, you may create a larger work that contains
  27               part or all of the Bison parser skeleton and distribute that work
  28               under terms of your choice, so long as that work isn't itself a
  29               parser generator using the skeleton or a modified version thereof
  30               as a parser skeleton.  Alternatively, if you modify or redistribute
  31               the parser skeleton itself, you may (at your option) remove this
  32               special exception, which will cause the skeleton and the resulting
  33               Bison output files to be licensed under the GNU General Public
  34               License without this special exception.
  35 karl  1.15 
  36 kumpf 1.17    This special exception was added by the Free Software Foundation in
  37               version 2.2 of Bison.  */
  38            
  39            /* C LALR(1) parser skeleton written by Richard Stallman, by
  40               simplifying the original so-called "semantic" parser.  */
  41 karl  1.15 
  42            /* All symbols defined below should begin with yy or YY, to avoid
  43               infringing on user name space.  This should be done even for local
  44               variables, as they might otherwise be expanded by user macros.
  45               There are some unavoidable exceptions within include files to
  46               define necessary library symbols; they are noted "INFRINGES ON
  47               USER NAME SPACE" below.  */
  48            
  49            /* Identify Bison output.  */
  50            #define YYBISON 1
  51            
  52 kumpf 1.17 /* Bison version.  */
  53            #define YYBISON_VERSION "2.3"
  54            
  55 karl  1.15 /* Skeleton name.  */
  56            #define YYSKELETON_NAME "yacc.c"
  57            
  58            /* Pure parsers.  */
  59            #define YYPURE 0
  60            
  61            /* Using locations.  */
  62            #define YYLSP_NEEDED 0
  63            
  64 kumpf 1.17 /* Substitute the variable and function names.  */
  65 mike  1.2  #define yyparse WQL_parse
  66 karl  1.15 #define yylex   WQL_lex
  67 mike  1.2  #define yyerror WQL_error
  68 karl  1.15 #define yylval  WQL_lval
  69            #define yychar  WQL_char
  70 mike  1.2  #define yydebug WQL_debug
  71            #define yynerrs WQL_nerrs
  72 karl  1.12 
  73 karl  1.15 
  74            /* Tokens.  */
  75            #ifndef YYTOKENTYPE
  76            # define YYTOKENTYPE
  77               /* Put the tokens into the symbol table, so that GDB and other debuggers
  78                  know about them.  */
  79               enum yytokentype {
  80                 TOK_INTEGER = 258,
  81                 TOK_DOUBLE = 259,
  82                 TOK_STRING = 260,
  83                 TOK_TRUE = 261,
  84                 TOK_FALSE = 262,
  85                 TOK_NULL = 263,
  86                 TOK_ISA = 264,
  87                 TOK_DOT = 265,
  88                 TOK_EQ = 266,
  89                 TOK_NE = 267,
  90                 TOK_LT = 268,
  91                 TOK_LE = 269,
  92                 TOK_GT = 270,
  93                 TOK_GE = 271,
  94 karl  1.15      TOK_NOT = 272,
  95                 TOK_OR = 273,
  96                 TOK_AND = 274,
  97                 TOK_IS = 275,
  98                 TOK_IDENTIFIER = 276,
  99                 TOK_SELECT = 277,
 100                 TOK_WHERE = 278,
 101                 TOK_FROM = 279,
 102                 TOK_UNEXPECTED_CHAR = 280
 103               };
 104            #endif
 105 kumpf 1.17 /* Tokens.  */
 106 karl  1.15 #define TOK_INTEGER 258
 107            #define TOK_DOUBLE 259
 108            #define TOK_STRING 260
 109            #define TOK_TRUE 261
 110            #define TOK_FALSE 262
 111            #define TOK_NULL 263
 112            #define TOK_ISA 264
 113            #define TOK_DOT 265
 114            #define TOK_EQ 266
 115            #define TOK_NE 267
 116            #define TOK_LT 268
 117            #define TOK_LE 269
 118            #define TOK_GT 270
 119            #define TOK_GE 271
 120            #define TOK_NOT 272
 121            #define TOK_OR 273
 122            #define TOK_AND 274
 123            #define TOK_IS 275
 124            #define TOK_IDENTIFIER 276
 125            #define TOK_SELECT 277
 126            #define TOK_WHERE 278
 127 karl  1.15 #define TOK_FROM 279
 128            #define TOK_UNEXPECTED_CHAR 280
 129            
 130            
 131            
 132            
 133            /* Copy the first part of user declarations.  */
 134 karl  1.18 #line 37 "WQL.y"
 135 karl  1.12 
 136 mike  1.2  
 137            #include <Pegasus/Common/Config.h>
 138            #include <Pegasus/WQL/WQLOperation.h>
 139            #include <Pegasus/WQL/WQLOperand.h>
 140            #include <Pegasus/WQL/WQLParserState.h>
 141            #include <Pegasus/WQL/WQLSelectStatement.h>
 142            #include <string.h>
 143            #include <stdlib.h>
 144            
 145            #ifdef PEGASUS_OS_TYPE_WINDOWS
 146            # include <malloc.h>
 147            #endif
 148            
 149            #if defined(PEGASUS_COMPILER_ACC) && defined(PEGASUS_OS_HPUX)
 150            # include <alloca.h>
 151            #endif
 152            
 153            #if 0
 154            # define WQL_TRACE(X) printf X
 155            #else
 156            # define WQL_TRACE(X)
 157 mike  1.2  #endif
 158            
 159            extern int WQL_lex();
 160 kumpf 1.3  extern int WQL_error(const char*);
 161 mike  1.2  
 162 karl  1.12 //
 163            // Define the global parser state object:
 164            //
 165 mike  1.2  
 166            PEGASUS_USING_PEGASUS;
 167            
 168            PEGASUS_NAMESPACE_BEGIN
 169            
 170 karl  1.9  extern WQLParserState* globalParserState;
 171 mike  1.2  
 172            PEGASUS_NAMESPACE_END
 173            
 174 karl  1.12 
 175 karl  1.15 
 176            /* Enabling traces.  */
 177            #ifndef YYDEBUG
 178            # define YYDEBUG 0
 179            #endif
 180            
 181            /* Enabling verbose error messages.  */
 182            #ifdef YYERROR_VERBOSE
 183            # undef YYERROR_VERBOSE
 184            # define YYERROR_VERBOSE 1
 185            #else
 186            # define YYERROR_VERBOSE 0
 187            #endif
 188            
 189 kumpf 1.17 /* Enabling the token table.  */
 190            #ifndef YYTOKEN_TABLE
 191            # define YYTOKEN_TABLE 0
 192            #endif
 193            
 194            #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 195            typedef union YYSTYPE
 196 karl  1.18 #line 87 "WQL.y"
 197 kumpf 1.17 {
 198 mike  1.2     int intValue;
 199               double doubleValue;
 200               char* strValue;
 201               void* nodeValue;
 202 kumpf 1.17 }
 203 karl  1.18 /* Line 187 of yacc.c.  */
 204 kumpf 1.17 #line 202 "WQLtemp"
 205            	YYSTYPE;
 206 karl  1.15 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 207            # define YYSTYPE_IS_DECLARED 1
 208            # define YYSTYPE_IS_TRIVIAL 1
 209            #endif
 210            
 211            
 212            
 213            /* Copy the second part of user declarations.  */
 214            
 215            
 216 kumpf 1.17 /* Line 216 of yacc.c.  */
 217            #line 215 "WQLtemp"
 218            
 219            #ifdef short
 220            # undef short
 221            #endif
 222            
 223            #ifdef YYTYPE_UINT8
 224            typedef YYTYPE_UINT8 yytype_uint8;
 225            #else
 226            typedef unsigned char yytype_uint8;
 227            #endif
 228            
 229            #ifdef YYTYPE_INT8
 230            typedef YYTYPE_INT8 yytype_int8;
 231            #elif (defined __STDC__ || defined __C99__FUNC__ \
 232                 || defined __cplusplus || defined _MSC_VER)
 233            typedef signed char yytype_int8;
 234            #else
 235            typedef short int yytype_int8;
 236            #endif
 237 kumpf 1.17 
 238            #ifdef YYTYPE_UINT16
 239            typedef YYTYPE_UINT16 yytype_uint16;
 240            #else
 241            typedef unsigned short int yytype_uint16;
 242            #endif
 243            
 244            #ifdef YYTYPE_INT16
 245            typedef YYTYPE_INT16 yytype_int16;
 246            #else
 247            typedef short int yytype_int16;
 248            #endif
 249            
 250            #ifndef YYSIZE_T
 251            # ifdef __SIZE_TYPE__
 252            #  define YYSIZE_T __SIZE_TYPE__
 253            # elif defined size_t
 254            #  define YYSIZE_T size_t
 255            # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
 256                 || defined __cplusplus || defined _MSC_VER)
 257            #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
 258 kumpf 1.17 #  define YYSIZE_T size_t
 259            # else
 260            #  define YYSIZE_T unsigned int
 261            # endif
 262            #endif
 263 karl  1.15 
 264 kumpf 1.17 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
 265 karl  1.15 
 266 kumpf 1.17 #ifndef YY_
 267            # if YYENABLE_NLS
 268            #  if ENABLE_NLS
 269            #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
 270            #   define YY_(msgid) dgettext ("bison-runtime", msgid)
 271            #  endif
 272 karl  1.15 # endif
 273 kumpf 1.17 # ifndef YY_
 274            #  define YY_(msgid) msgid
 275 karl  1.15 # endif
 276 kumpf 1.17 #endif
 277            
 278            /* Suppress unused-variable warnings by "using" E.  */
 279            #if ! defined lint || defined __GNUC__
 280            # define YYUSE(e) ((void) (e))
 281            #else
 282            # define YYUSE(e) /* empty */
 283            #endif
 284            
 285            /* Identity function, used to suppress warnings about constant conditions.  */
 286            #ifndef lint
 287            # define YYID(n) (n)
 288            #else
 289            #if (defined __STDC__ || defined __C99__FUNC__ \
 290                 || defined __cplusplus || defined _MSC_VER)
 291            static int
 292            YYID (int i)
 293            #else
 294            static int
 295            YYID (i)
 296                int i;
 297 kumpf 1.17 #endif
 298            {
 299              return i;
 300            }
 301            #endif
 302            
 303            #if ! defined yyoverflow || YYERROR_VERBOSE
 304 karl  1.15 
 305            /* The parser invokes alloca or malloc; define the necessary symbols.  */
 306            
 307            # ifdef YYSTACK_USE_ALLOCA
 308            #  if YYSTACK_USE_ALLOCA
 309            #   ifdef __GNUC__
 310            #    define YYSTACK_ALLOC __builtin_alloca
 311 kumpf 1.17 #   elif defined __BUILTIN_VA_ARG_INCR
 312            #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
 313            #   elif defined _AIX
 314            #    define YYSTACK_ALLOC __alloca
 315            #   elif defined _MSC_VER
 316            #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
 317            #    define alloca _alloca
 318            #   else
 319            #    define YYSTACK_ALLOC alloca
 320            #    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
 321                 || defined __cplusplus || defined _MSC_VER)
 322            #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
 323            #     ifndef _STDLIB_H
 324            #      define _STDLIB_H 1
 325            #     endif
 326            #    endif
 327 karl  1.15 #   endif
 328            #  endif
 329            # endif
 330            
 331            # ifdef YYSTACK_ALLOC
 332 kumpf 1.17    /* Pacify GCC's `empty if-body' warning.  */
 333            #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
 334            #  ifndef YYSTACK_ALLOC_MAXIMUM
 335                /* The OS might guarantee only one guard page at the bottom of the stack,
 336                   and a page size can be as small as 4096 bytes.  So we cannot safely
 337                   invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
 338                   to allow for a few compiler-allocated temporary stack slots.  */
 339            #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
 340            #  endif
 341 karl  1.15 # else
 342 kumpf 1.17 #  define YYSTACK_ALLOC YYMALLOC
 343            #  define YYSTACK_FREE YYFREE
 344            #  ifndef YYSTACK_ALLOC_MAXIMUM
 345            #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
 346            #  endif
 347            #  if (defined __cplusplus && ! defined _STDLIB_H \
 348                   && ! ((defined YYMALLOC || defined malloc) \
 349            	     && (defined YYFREE || defined free)))
 350 karl  1.15 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
 351 kumpf 1.17 #   ifndef _STDLIB_H
 352            #    define _STDLIB_H 1
 353            #   endif
 354            #  endif
 355            #  ifndef YYMALLOC
 356            #   define YYMALLOC malloc
 357            #   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
 358                 || defined __cplusplus || defined _MSC_VER)
 359            void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
 360            #   endif
 361            #  endif
 362            #  ifndef YYFREE
 363            #   define YYFREE free
 364            #   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
 365                 || defined __cplusplus || defined _MSC_VER)
 366            void free (void *); /* INFRINGES ON USER NAME SPACE */
 367            #   endif
 368 karl  1.15 #  endif
 369            # endif
 370 kumpf 1.17 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
 371 karl  1.15 
 372            
 373 kumpf 1.17 #if (! defined yyoverflow \
 374                 && (! defined __cplusplus \
 375            	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
 376 karl  1.15 
 377            /* A type that is properly aligned for any stack member.  */
 378            union yyalloc
 379            {
 380 kumpf 1.17   yytype_int16 yyss;
 381 karl  1.15   YYSTYPE yyvs;
 382              };
 383            
 384            /* The size of the maximum gap between one aligned stack and the next.  */
 385            # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
 386            
 387            /* The size of an array large to enough to hold all stacks, each with
 388               N elements.  */
 389            # define YYSTACK_BYTES(N) \
 390 kumpf 1.17      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
 391 karl  1.15       + YYSTACK_GAP_MAXIMUM)
 392            
 393            /* Copy COUNT objects from FROM to TO.  The source and destination do
 394               not overlap.  */
 395            # ifndef YYCOPY
 396 kumpf 1.17 #  if defined __GNUC__ && 1 < __GNUC__
 397 karl  1.15 #   define YYCOPY(To, From, Count) \
 398                  __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
 399            #  else
 400            #   define YYCOPY(To, From, Count)		\
 401                  do					\
 402            	{					\
 403 kumpf 1.17 	  YYSIZE_T yyi;				\
 404 karl  1.15 	  for (yyi = 0; yyi < (Count); yyi++)	\
 405            	    (To)[yyi] = (From)[yyi];		\
 406            	}					\
 407 kumpf 1.17       while (YYID (0))
 408 karl  1.15 #  endif
 409            # endif
 410            
 411            /* Relocate STACK from its old location to the new one.  The
 412               local variables YYSIZE and YYSTACKSIZE give the old and new number of
 413               elements in the stack, and YYPTR gives the new location of the
 414               stack.  Advance YYPTR to a properly aligned location for the next
 415               stack.  */
 416            # define YYSTACK_RELOCATE(Stack)					\
 417                do									\
 418                  {									\
 419            	YYSIZE_T yynewbytes;						\
 420            	YYCOPY (&yyptr->Stack, Stack, yysize);				\
 421            	Stack = &yyptr->Stack;						\
 422            	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
 423            	yyptr += yynewbytes / sizeof (*yyptr);				\
 424                  }									\
 425 kumpf 1.17     while (YYID (0))
 426 karl  1.12 
 427 karl  1.14 #endif
 428 karl  1.15 
 429 kumpf 1.17 /* YYFINAL -- State number of the termination state.  */
 430 karl  1.15 #define YYFINAL  9
 431            /* YYLAST -- Last index in YYTABLE.  */
 432            #define YYLAST   69
 433            
 434 kumpf 1.17 /* YYNTOKENS -- Number of terminals.  */
 435 karl  1.15 #define YYNTOKENS  30
 436 kumpf 1.17 /* YYNNTS -- Number of nonterminals.  */
 437 karl  1.15 #define YYNNTS  16
 438 kumpf 1.17 /* YYNRULES -- Number of rules.  */
 439 karl  1.15 #define YYNRULES  39
 440 kumpf 1.17 /* YYNRULES -- Number of states.  */
 441 karl  1.15 #define YYNSTATES  65
 442            
 443            /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 444            #define YYUNDEFTOK  2
 445            #define YYMAXUTOK   280
 446            
 447 kumpf 1.17 #define YYTRANSLATE(YYX)						\
 448 karl  1.15   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 449            
 450            /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
 451 kumpf 1.17 static const yytype_uint8 yytranslate[] =
 452 karl  1.15 {
 453                   0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 454                   2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 455                   2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 456                   2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 457                  28,    29,    26,     2,    27,     2,     2,     2,     2,     2,
 458                   2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 459                   2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 460                   2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 461                   2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 462                   2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 463                   2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 464                   2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 465                   2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 466                   2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 467                   2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 468                   2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 469                   2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 470                   2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 471                   2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 472                   2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 473 karl  1.15        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 474                   2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 475                   2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 476                   2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 477                   2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 478                   2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
 479                   5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
 480                  15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
 481                  25
 482            };
 483 karl  1.12 
 484 karl  1.15 #if YYDEBUG
 485            /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
 486               YYRHS.  */
 487 kumpf 1.17 static const yytype_uint8 yyprhs[] =
 488 karl  1.15 {
 489                   0,     0,     3,     5,     9,    11,    13,    15,    19,    22,
 490                  24,    27,    30,    34,    38,    41,    45,    47,    51,    56,
 491                  58,    60,    64,    68,    72,    76,    80,    84,    88,    92,
 492                  97,    99,   101,   103,   107,   109,   111,   113,   115,   117
 493 karl  1.13 };
 494 karl  1.12 
 495 kumpf 1.17 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
 496            static const yytype_int8 yyrhs[] =
 497 karl  1.15 {
 498                  31,     0,    -1,    32,    -1,    22,    33,    35,    -1,    26,
 499                  -1,    34,    -1,    43,    -1,    34,    27,    43,    -1,    36,
 500                  37,    -1,    36,    -1,    24,    44,    -1,    23,    38,    -1,
 501                  38,    18,    38,    -1,    38,    19,    38,    -1,    17,    38,
 502                  -1,    28,    38,    29,    -1,    39,    -1,    39,    20,    42,
 503                  -1,    39,    20,    17,    42,    -1,    40,    -1,    41,    -1,
 504                  45,    13,    45,    -1,    45,    15,    45,    -1,    45,    14,
 505                  45,    -1,    45,    16,    45,    -1,    45,    11,    45,    -1,
 506                  45,    12,    45,    -1,    43,     9,    44,    -1,    45,    20,
 507                   8,    -1,    45,    20,    17,     8,    -1,     6,    -1,     7,
 508                  -1,    21,    -1,    21,    10,    21,    -1,    21,    -1,    43,
 509                  -1,     3,    -1,     4,    -1,     5,    -1,    42,    -1
 510 karl  1.12 };
 511            
 512 karl  1.15 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 513 kumpf 1.17 static const yytype_uint16 yyrline[] =
 514 karl  1.15 {
 515 karl  1.18        0,   160,   160,   166,   172,   176,   182,   186,   192,   196,
 516                 202,   209,   215,   220,   225,   231,   235,   239,   244,   253,
 517                 257,   263,   268,   273,   278,   283,   288,   293,   303,   308,
 518                 315,   319,   332,   337,   349,   356,   362,   367,   372,   377
 519 karl  1.12 };
 520 karl  1.14 #endif
 521            
 522 kumpf 1.17 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
 523            /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
 524               First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
 525 karl  1.15 static const char *const yytname[] =
 526            {
 527              "$end", "error", "$undefined", "TOK_INTEGER", "TOK_DOUBLE",
 528              "TOK_STRING", "TOK_TRUE", "TOK_FALSE", "TOK_NULL", "TOK_ISA", "TOK_DOT",
 529              "TOK_EQ", "TOK_NE", "TOK_LT", "TOK_LE", "TOK_GT", "TOK_GE", "TOK_NOT",
 530              "TOK_OR", "TOK_AND", "TOK_IS", "TOK_IDENTIFIER", "TOK_SELECT",
 531              "TOK_WHERE", "TOK_FROM", "TOK_UNEXPECTED_CHAR", "'*'", "','", "'('",
 532              "')'", "$accept", "start", "selectStatement", "selectList",
 533              "propertyList", "selectExpression", "fromClause", "whereClause",
 534              "searchCondition", "predicate", "comparisonPredicate", "nullPredicate",
 535              "truthValue", "propertyName", "className", "comparisonTerm", 0
 536 karl  1.12 };
 537            #endif
 538            
 539 karl  1.15 # ifdef YYPRINT
 540            /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
 541               token YYLEX-NUM.  */
 542 kumpf 1.17 static const yytype_uint16 yytoknum[] =
 543 karl  1.15 {
 544                   0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
 545                 265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
 546                 275,   276,   277,   278,   279,   280,    42,    44,    40,    41
 547            };
 548            # endif
 549 karl  1.14 
 550 karl  1.15 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 551 kumpf 1.17 static const yytype_uint8 yyr1[] =
 552 karl  1.15 {
 553                   0,    30,    31,    32,    33,    33,    34,    34,    35,    35,
 554                  36,    37,    38,    38,    38,    38,    38,    38,    38,    39,
 555                  39,    40,    40,    40,    40,    40,    40,    40,    41,    41,
 556                  42,    42,    43,    43,    44,    45,    45,    45,    45,    45
 557 karl  1.12 };
 558            
 559 karl  1.15 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
 560 kumpf 1.17 static const yytype_uint8 yyr2[] =
 561 karl  1.15 {
 562                   0,     2,     1,     3,     1,     1,     1,     3,     2,     1,
 563                   2,     2,     3,     3,     2,     3,     1,     3,     4,     1,
 564                   1,     3,     3,     3,     3,     3,     3,     3,     3,     4,
 565                   1,     1,     1,     3,     1,     1,     1,     1,     1,     1
 566 karl  1.13 };
 567 karl  1.12 
 568 karl  1.15 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
 569               STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
 570               means the default is an error.  */
 571 kumpf 1.17 static const yytype_uint8 yydefact[] =
 572 karl  1.15 {
 573                   0,     0,     0,     2,    32,     4,     0,     5,     6,     1,
 574                   0,     0,     3,     9,     0,    33,    34,    10,     0,     8,
 575                   7,    36,    37,    38,    30,    31,     0,     0,    11,    16,
 576                  19,    20,    39,    35,     0,    14,     0,     0,     0,     0,
 577                   0,     0,     0,     0,     0,     0,     0,     0,    15,    12,
 578                  13,     0,    17,    27,    35,    25,    26,    21,    23,    22,
 579                  24,    28,     0,    18,    29
 580 mike  1.2  };
 581 karl  1.12 
 582 kumpf 1.17 /* YYDEFGOTO[NTERM-NUM].  */
 583            static const yytype_int8 yydefgoto[] =
 584 karl  1.15 {
 585                  -1,     2,     3,     6,     7,    12,    13,    19,    28,    29,
 586                  30,    31,    32,    54,    17,    34
 587 karl  1.12 };
 588            
 589 karl  1.15 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
 590               STATE-NUM.  */
 591            #define YYPACT_NINF -38
 592 kumpf 1.17 static const yytype_int8 yypact[] =
 593 karl  1.15 {
 594                 -21,   -10,    15,   -38,    25,   -38,    17,    -8,   -38,   -38,
 595                  28,    39,   -38,    38,    41,   -38,   -38,   -38,     1,   -38,
 596                 -38,   -38,   -38,   -38,   -38,   -38,     1,     1,     5,    43,
 597                 -38,   -38,   -38,    55,    31,   -38,     9,     1,     1,    33,
 598                  39,    27,    27,    27,    27,    27,    27,    -5,   -38,    46,
 599                 -38,    52,   -38,   -38,   -38,   -38,   -38,   -38,   -38,   -38,
 600                 -38,   -38,    58,   -38,   -38
 601 karl  1.12 };
 602            
 603 karl  1.15 /* YYPGOTO[NTERM-NUM].  */
 604 kumpf 1.17 static const yytype_int8 yypgoto[] =
 605 karl  1.15 {
 606                 -38,   -38,   -38,   -38,   -38,   -38,   -38,   -38,   -17,   -38,
 607                 -38,   -38,   -37,    -1,    29,    11
 608 karl  1.12 };
 609            
 610 karl  1.15 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
 611               positive, shift that token.  If negative, reduce the rule which
 612               number is the opposite.  If zero, do what YYDEFACT says.
 613               If YYTABLE_NINF, syntax error.  */
 614            #define YYTABLE_NINF -1
 615 kumpf 1.17 static const yytype_uint8 yytable[] =
 616 karl  1.15 {
 617                   8,     1,    52,    61,    21,    22,    23,    24,    25,    35,
 618                  36,     4,    62,    20,    63,     9,     5,    33,    26,    14,
 619                  49,    50,     4,    37,    38,    33,    33,    37,    38,    27,
 620                  21,    22,    23,    24,    25,    10,    33,    33,    48,    24,
 621                  25,    11,    41,    42,    43,    44,    45,    46,     4,    15,
 622                  51,    47,    55,    56,    57,    58,    59,    60,    24,    25,
 623                  16,    18,     4,    39,    40,    38,    64,     0,     0,    53
 624 karl  1.12 };
 625            
 626 kumpf 1.17 static const yytype_int8 yycheck[] =
 627 karl  1.15 {
 628                   1,    22,    39,     8,     3,     4,     5,     6,     7,    26,
 629                  27,    21,    17,    14,    51,     0,    26,    18,    17,    27,
 630                  37,    38,    21,    18,    19,    26,    27,    18,    19,    28,
 631                   3,     4,     5,     6,     7,    10,    37,    38,    29,     6,
 632                   7,    24,    11,    12,    13,    14,    15,    16,    21,    21,
 633                  17,    20,    41,    42,    43,    44,    45,    46,     6,     7,
 634                  21,    23,    21,    20,     9,    19,     8,    -1,    -1,    40
 635 karl  1.12 };
 636            
 637 karl  1.15 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
 638               symbol of state STATE-NUM.  */
 639 kumpf 1.17 static const yytype_uint8 yystos[] =
 640 karl  1.15 {
 641                   0,    22,    31,    32,    21,    26,    33,    34,    43,     0,
 642                  10,    24,    35,    36,    27,    21,    21,    44,    23,    37,
 643                  43,     3,     4,     5,     6,     7,    17,    28,    38,    39,
 644                  40,    41,    42,    43,    45,    38,    38,    18,    19,    20,
 645                   9,    11,    12,    13,    14,    15,    16,    20,    29,    38,
 646                  38,    17,    42,    44,    43,    45,    45,    45,    45,    45,
 647                  45,     8,    17,    42,     8
 648 karl  1.12 };
 649 karl  1.14 
 650 karl  1.12 #define yyerrok		(yyerrstatus = 0)
 651            #define yyclearin	(yychar = YYEMPTY)
 652 karl  1.15 #define YYEMPTY		(-2)
 653 karl  1.12 #define YYEOF		0
 654 karl  1.15 
 655 karl  1.12 #define YYACCEPT	goto yyacceptlab
 656 karl  1.15 #define YYABORT		goto yyabortlab
 657            #define YYERROR		goto yyerrorlab
 658            
 659            
 660            /* Like YYERROR except do call yyerror.  This remains here temporarily
 661               to ease the transition to the new meaning of YYERROR, for GCC.
 662 karl  1.12    Once GCC version 2 has supplanted version 1, this can go.  */
 663 karl  1.15 
 664 karl  1.12 #define YYFAIL		goto yyerrlab
 665 karl  1.15 
 666 karl  1.12 #define YYRECOVERING()  (!!yyerrstatus)
 667 karl  1.15 
 668            #define YYBACKUP(Token, Value)					\
 669 karl  1.12 do								\
 670              if (yychar == YYEMPTY && yylen == 1)				\
 671 karl  1.15     {								\
 672                  yychar = (Token);						\
 673                  yylval = (Value);						\
 674                  yytoken = YYTRANSLATE (yychar);				\
 675 kumpf 1.17       YYPOPSTACK (1);						\
 676 karl  1.12       goto yybackup;						\
 677                }								\
 678              else								\
 679 kumpf 1.17     {								\
 680                  yyerror (YY_("syntax error: cannot back up")); \
 681 karl  1.15       YYERROR;							\
 682                }								\
 683 kumpf 1.17 while (YYID (0))
 684            
 685 karl  1.12 
 686            #define YYTERROR	1
 687            #define YYERRCODE	256
 688            
 689 karl  1.15 
 690 kumpf 1.17 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
 691               If N is 0, then set CURRENT to the empty location which ends
 692               the previous symbol: RHS[0] (always defined).  */
 693            
 694            #define YYRHSLOC(Rhs, K) ((Rhs)[K])
 695 karl  1.15 #ifndef YYLLOC_DEFAULT
 696 kumpf 1.17 # define YYLLOC_DEFAULT(Current, Rhs, N)				\
 697                do									\
 698                  if (YYID (N))                                                    \
 699            	{								\
 700            	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
 701            	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
 702            	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
 703            	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
 704            	}								\
 705                  else								\
 706            	{								\
 707            	  (Current).first_line   = (Current).last_line   =		\
 708            	    YYRHSLOC (Rhs, 0).last_line;				\
 709            	  (Current).first_column = (Current).last_column =		\
 710            	    YYRHSLOC (Rhs, 0).last_column;				\
 711            	}								\
 712                while (YYID (0))
 713 karl  1.14 #endif
 714 karl  1.13 
 715 kumpf 1.17 
 716            /* YY_LOCATION_PRINT -- Print the location on the stream.
 717               This macro was not mandated originally: define only if we know
 718               we won't break user code: when these are the locations we know.  */
 719            
 720            #ifndef YY_LOCATION_PRINT
 721            # if YYLTYPE_IS_TRIVIAL
 722            #  define YY_LOCATION_PRINT(File, Loc)			\
 723                 fprintf (File, "%d.%d-%d.%d",			\
 724            	      (Loc).first_line, (Loc).first_column,	\
 725            	      (Loc).last_line,  (Loc).last_column)
 726            # else
 727            #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
 728            # endif
 729            #endif
 730            
 731            
 732 karl  1.15 /* YYLEX -- calling `yylex' with the right arguments.  */
 733            
 734 karl  1.14 #ifdef YYLEX_PARAM
 735 karl  1.15 # define YYLEX yylex (YYLEX_PARAM)
 736 karl  1.14 #else
 737 karl  1.15 # define YYLEX yylex ()
 738 karl  1.12 #endif
 739 karl  1.15 
 740            /* Enable debugging if requested.  */
 741            #if YYDEBUG
 742            
 743            # ifndef YYFPRINTF
 744            #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
 745            #  define YYFPRINTF fprintf
 746            # endif
 747            
 748            # define YYDPRINTF(Args)			\
 749            do {						\
 750              if (yydebug)					\
 751                YYFPRINTF Args;				\
 752 kumpf 1.17 } while (YYID (0))
 753            
 754            # define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
 755            do {									  \
 756              if (yydebug)								  \
 757                {									  \
 758                  YYFPRINTF (stderr, "%s ", Title);					  \
 759                  yy_symbol_print (stderr,						  \
 760            		  Type, Value); \
 761                  YYFPRINTF (stderr, "\n");						  \
 762                }									  \
 763            } while (YYID (0))
 764 karl  1.15 
 765            
 766 kumpf 1.17 /*--------------------------------.
 767            | Print this symbol on YYOUTPUT.  |
 768            `--------------------------------*/
 769            
 770            /*ARGSUSED*/
 771            #if (defined __STDC__ || defined __C99__FUNC__ \
 772                 || defined __cplusplus || defined _MSC_VER)
 773            static void
 774            yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
 775            #else
 776            static void
 777            yy_symbol_value_print (yyoutput, yytype, yyvaluep)
 778                FILE *yyoutput;
 779                int yytype;
 780                YYSTYPE const * const yyvaluep;
 781            #endif
 782            {
 783              if (!yyvaluep)
 784                return;
 785            # ifdef YYPRINT
 786              if (yytype < YYNTOKENS)
 787 kumpf 1.17     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
 788            # else
 789              YYUSE (yyoutput);
 790            # endif
 791              switch (yytype)
 792                {
 793                  default:
 794            	break;
 795                }
 796            }
 797            
 798            
 799            /*--------------------------------.
 800            | Print this symbol on YYOUTPUT.  |
 801            `--------------------------------*/
 802            
 803            #if (defined __STDC__ || defined __C99__FUNC__ \
 804                 || defined __cplusplus || defined _MSC_VER)
 805            static void
 806            yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
 807            #else
 808 kumpf 1.17 static void
 809            yy_symbol_print (yyoutput, yytype, yyvaluep)
 810                FILE *yyoutput;
 811                int yytype;
 812                YYSTYPE const * const yyvaluep;
 813            #endif
 814            {
 815              if (yytype < YYNTOKENS)
 816                YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
 817              else
 818                YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
 819            
 820              yy_symbol_value_print (yyoutput, yytype, yyvaluep);
 821              YYFPRINTF (yyoutput, ")");
 822            }
 823 karl  1.15 
 824            /*------------------------------------------------------------------.
 825            | yy_stack_print -- Print the state stack from its BOTTOM up to its |
 826            | TOP (included).                                                   |
 827            `------------------------------------------------------------------*/
 828            
 829 kumpf 1.17 #if (defined __STDC__ || defined __C99__FUNC__ \
 830                 || defined __cplusplus || defined _MSC_VER)
 831 karl  1.15 static void
 832 kumpf 1.17 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
 833 mike  1.2  #else
 834 karl  1.15 static void
 835            yy_stack_print (bottom, top)
 836 kumpf 1.17     yytype_int16 *bottom;
 837                yytype_int16 *top;
 838 karl  1.12 #endif
 839 karl  1.15 {
 840              YYFPRINTF (stderr, "Stack now");
 841 kumpf 1.17   for (; bottom <= top; ++bottom)
 842 karl  1.15     YYFPRINTF (stderr, " %d", *bottom);
 843              YYFPRINTF (stderr, "\n");
 844            }
 845 karl  1.13 
 846 karl  1.15 # define YY_STACK_PRINT(Bottom, Top)				\
 847            do {								\
 848              if (yydebug)							\
 849                yy_stack_print ((Bottom), (Top));				\
 850 kumpf 1.17 } while (YYID (0))
 851 karl  1.13 
 852            
 853 karl  1.15 /*------------------------------------------------.
 854            | Report that the YYRULE is going to be reduced.  |
 855            `------------------------------------------------*/
 856 karl  1.13 
 857 kumpf 1.17 #if (defined __STDC__ || defined __C99__FUNC__ \
 858                 || defined __cplusplus || defined _MSC_VER)
 859 karl  1.15 static void
 860 kumpf 1.17 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
 861 karl  1.15 #else
 862            static void
 863 kumpf 1.17 yy_reduce_print (yyvsp, yyrule)
 864                YYSTYPE *yyvsp;
 865 karl  1.15     int yyrule;
 866 karl  1.12 #endif
 867 karl  1.15 {
 868 kumpf 1.17   int yynrhs = yyr2[yyrule];
 869 karl  1.15   int yyi;
 870 kumpf 1.17   unsigned long int yylno = yyrline[yyrule];
 871              YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
 872            	     yyrule - 1, yylno);
 873              /* The symbols being reduced.  */
 874              for (yyi = 0; yyi < yynrhs; yyi++)
 875                {
 876                  fprintf (stderr, "   $%d = ", yyi + 1);
 877                  yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
 878            		       &(yyvsp[(yyi + 1) - (yynrhs)])
 879            		       		       );
 880                  fprintf (stderr, "\n");
 881                }
 882 karl  1.15 }
 883 karl  1.12 
 884 karl  1.15 # define YY_REDUCE_PRINT(Rule)		\
 885            do {					\
 886              if (yydebug)				\
 887 kumpf 1.17     yy_reduce_print (yyvsp, Rule); \
 888            } while (YYID (0))
 889 karl  1.15 
 890            /* Nonzero means print parse trace.  It is left uninitialized so that
 891               multiple parsers can coexist.  */
 892            int yydebug;
 893            #else /* !YYDEBUG */
 894            # define YYDPRINTF(Args)
 895 kumpf 1.17 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
 896 karl  1.15 # define YY_STACK_PRINT(Bottom, Top)
 897            # define YY_REDUCE_PRINT(Rule)
 898            #endif /* !YYDEBUG */
 899 karl  1.12 
 900            
 901 karl  1.15 /* YYINITDEPTH -- initial size of the parser's stacks.  */
 902 karl  1.12 #ifndef	YYINITDEPTH
 903 karl  1.15 # define YYINITDEPTH 200
 904 karl  1.12 #endif
 905            
 906 karl  1.15 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
 907               if the built-in stack extension method is used).
 908            
 909               Do not make this value too large; the results are undefined if
 910 kumpf 1.17    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
 911 karl  1.15    evaluated with infinite-precision integer arithmetic.  */
 912 karl  1.12 
 913            #ifndef YYMAXDEPTH
 914 karl  1.15 # define YYMAXDEPTH 10000
 915 mike  1.2  #endif
 916 karl  1.15 
 917 karl  1.12 
 918            
 919 karl  1.15 #if YYERROR_VERBOSE
 920            
 921            # ifndef yystrlen
 922 kumpf 1.17 #  if defined __GLIBC__ && defined _STRING_H
 923 karl  1.15 #   define yystrlen strlen
 924            #  else
 925            /* Return the length of YYSTR.  */
 926 kumpf 1.17 #if (defined __STDC__ || defined __C99__FUNC__ \
 927                 || defined __cplusplus || defined _MSC_VER)
 928 karl  1.15 static YYSIZE_T
 929            yystrlen (const char *yystr)
 930 kumpf 1.17 #else
 931            static YYSIZE_T
 932 karl  1.15 yystrlen (yystr)
 933 kumpf 1.17     const char *yystr;
 934            #endif
 935 karl  1.15 {
 936 kumpf 1.17   YYSIZE_T yylen;
 937              for (yylen = 0; yystr[yylen]; yylen++)
 938 karl  1.15     continue;
 939 kumpf 1.17   return yylen;
 940 karl  1.15 }
 941            #  endif
 942            # endif
 943            
 944            # ifndef yystpcpy
 945 kumpf 1.17 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
 946 karl  1.15 #   define yystpcpy stpcpy
 947            #  else
 948            /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
 949               YYDEST.  */
 950 kumpf 1.17 #if (defined __STDC__ || defined __C99__FUNC__ \
 951                 || defined __cplusplus || defined _MSC_VER)
 952 karl  1.15 static char *
 953            yystpcpy (char *yydest, const char *yysrc)
 954 kumpf 1.17 #else
 955            static char *
 956 karl  1.15 yystpcpy (yydest, yysrc)
 957 kumpf 1.17     char *yydest;
 958                const char *yysrc;
 959            #endif
 960 karl  1.15 {
 961 kumpf 1.17   char *yyd = yydest;
 962              const char *yys = yysrc;
 963 karl  1.15 
 964              while ((*yyd++ = *yys++) != '\0')
 965                continue;
 966 karl  1.12 
 967 karl  1.15   return yyd - 1;
 968 karl  1.12 }
 969 karl  1.15 #  endif
 970            # endif
 971 karl  1.13 
 972 kumpf 1.17 # ifndef yytnamerr
 973            /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
 974               quotes and backslashes, so that it's suitable for yyerror.  The
 975               heuristic is that double-quoting is unnecessary unless the string
 976               contains an apostrophe, a comma, or backslash (other than
 977               backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
 978               null, do not copy; instead, return the length of what the result
 979               would have been.  */
 980            static YYSIZE_T
 981            yytnamerr (char *yyres, const char *yystr)
 982            {
 983              if (*yystr == '"')
 984                {
 985                  YYSIZE_T yyn = 0;
 986                  char const *yyp = yystr;
 987            
 988                  for (;;)
 989            	switch (*++yyp)
 990            	  {
 991            	  case '\'':
 992            	  case ',':
 993 kumpf 1.17 	    goto do_not_strip_quotes;
 994            
 995            	  case '\\':
 996            	    if (*++yyp != '\\')
 997            	      goto do_not_strip_quotes;
 998            	    /* Fall through.  */
 999            	  default:
1000            	    if (yyres)
1001            	      yyres[yyn] = *yyp;
1002            	    yyn++;
1003            	    break;
1004            
1005            	  case '"':
1006            	    if (yyres)
1007            	      yyres[yyn] = '\0';
1008            	    return yyn;
1009            	  }
1010                do_not_strip_quotes: ;
1011                }
1012 karl  1.13 
1013 kumpf 1.17   if (! yyres)
1014                return yystrlen (yystr);
1015 karl  1.15 
1016 kumpf 1.17   return yystpcpy (yyres, yystr) - yyres;
1017            }
1018            # endif
1019 karl  1.15 
1020 kumpf 1.17 /* Copy into YYRESULT an error message about the unexpected token
1021               YYCHAR while in state YYSTATE.  Return the number of bytes copied,
1022               including the terminating null byte.  If YYRESULT is null, do not
1023               copy anything; just return the number of bytes that would be
1024               copied.  As a special case, return 0 if an ordinary "syntax error"
1025               message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
1026               size calculation.  */
1027            static YYSIZE_T
1028            yysyntax_error (char *yyresult, int yystate, int yychar)
1029 karl  1.12 {
1030 kumpf 1.17   int yyn = yypact[yystate];
1031 karl  1.13 
1032 kumpf 1.17   if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1033                return 0;
1034              else
1035 karl  1.15     {
1036 kumpf 1.17       int yytype = YYTRANSLATE (yychar);
1037                  YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1038                  YYSIZE_T yysize = yysize0;
1039                  YYSIZE_T yysize1;
1040                  int yysize_overflow = 0;
1041                  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1042                  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1043                  int yyx;
1044            
1045            # if 0
1046                  /* This is so xgettext sees the translatable formats that are
1047            	 constructed on the fly.  */
1048                  YY_("syntax error, unexpected %s");
1049                  YY_("syntax error, unexpected %s, expecting %s");
1050                  YY_("syntax error, unexpected %s, expecting %s or %s");
1051                  YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1052                  YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1053 karl  1.15 # endif
1054 kumpf 1.17       char *yyfmt;
1055                  char const *yyf;
1056                  static char const yyunexpected[] = "syntax error, unexpected %s";
1057                  static char const yyexpecting[] = ", expecting %s";
1058                  static char const yyor[] = " or %s";
1059                  char yyformat[sizeof yyunexpected
1060            		    + sizeof yyexpecting - 1
1061            		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1062            		       * (sizeof yyor - 1))];
1063                  char const *yyprefix = yyexpecting;
1064            
1065                  /* Start YYX at -YYN if negative to avoid negative indexes in
1066            	 YYCHECK.  */
1067                  int yyxbegin = yyn < 0 ? -yyn : 0;
1068            
1069                  /* Stay within bounds of both yycheck and yytname.  */
1070                  int yychecklim = YYLAST - yyn + 1;
1071                  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1072                  int yycount = 1;
1073            
1074                  yyarg[0] = yytname[yytype];
1075 kumpf 1.17       yyfmt = yystpcpy (yyformat, yyunexpected);
1076            
1077                  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1078            	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1079            	  {
1080            	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1081            	      {
1082            		yycount = 1;
1083            		yysize = yysize0;
1084            		yyformat[sizeof yyunexpected - 1] = '\0';
1085            		break;
1086            	      }
1087            	    yyarg[yycount++] = yytname[yyx];
1088            	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1089            	    yysize_overflow |= (yysize1 < yysize);
1090            	    yysize = yysize1;
1091            	    yyfmt = yystpcpy (yyfmt, yyprefix);
1092            	    yyprefix = yyor;
1093            	  }
1094            
1095                  yyf = YY_(yyformat);
1096 kumpf 1.17       yysize1 = yysize + yystrlen (yyf);
1097                  yysize_overflow |= (yysize1 < yysize);
1098                  yysize = yysize1;
1099            
1100                  if (yysize_overflow)
1101            	return YYSIZE_MAXIMUM;
1102 karl  1.15 
1103 kumpf 1.17       if (yyresult)
1104            	{
1105            	  /* Avoid sprintf, as that infringes on the user's name space.
1106            	     Don't have undefined behavior even if the translation
1107            	     produced a string with the wrong number of "%s"s.  */
1108            	  char *yyp = yyresult;
1109            	  int yyi = 0;
1110            	  while ((*yyp = *yyf) != '\0')
1111            	    {
1112            	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1113            		{
1114            		  yyp += yytnamerr (yyp, yyarg[yyi++]);
1115            		  yyf += 2;
1116            		}
1117            	      else
1118            		{
1119            		  yyp++;
1120            		  yyf++;
1121            		}
1122            	    }
1123            	}
1124 kumpf 1.17       return yysize;
1125 karl  1.15     }
1126 karl  1.12 }
1127 kumpf 1.17 #endif /* YYERROR_VERBOSE */
1128            
1129 karl  1.12 
1130 karl  1.15 /*-----------------------------------------------.
1131            | Release the memory associated to this symbol.  |
1132            `-----------------------------------------------*/
1133            
1134 kumpf 1.17 /*ARGSUSED*/
1135            #if (defined __STDC__ || defined __C99__FUNC__ \
1136                 || defined __cplusplus || defined _MSC_VER)
1137 karl  1.15 static void
1138 kumpf 1.17 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1139 karl  1.15 #else
1140            static void
1141 kumpf 1.17 yydestruct (yymsg, yytype, yyvaluep)
1142                const char *yymsg;
1143 karl  1.15     int yytype;
1144                YYSTYPE *yyvaluep;
1145 mike  1.2  #endif
1146 karl  1.15 {
1147 kumpf 1.17   YYUSE (yyvaluep);
1148            
1149              if (!yymsg)
1150                yymsg = "Deleting";
1151              YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1152 karl  1.15 
1153              switch (yytype)
1154                {
1155            
1156                  default:
1157 kumpf 1.17 	break;
1158 karl  1.15     }
1159            }
1160 karl  1.12 
1161 mike  1.2  
1162 karl  1.15 /* Prevent warnings from -Wmissing-prototypes.  */
1163 karl  1.12 
1164            #ifdef YYPARSE_PARAM
1165 kumpf 1.17 #if defined __STDC__ || defined __cplusplus
1166 karl  1.15 int yyparse (void *YYPARSE_PARAM);
1167 kumpf 1.17 #else
1168 karl  1.15 int yyparse ();
1169 kumpf 1.17 #endif
1170 karl  1.15 #else /* ! YYPARSE_PARAM */
1171 kumpf 1.17 #if defined __STDC__ || defined __cplusplus
1172 karl  1.15 int yyparse (void);
1173            #else
1174            int yyparse ();
1175            #endif
1176            #endif /* ! YYPARSE_PARAM */
1177            
1178            
1179            
1180 kumpf 1.17 /* The look-ahead symbol.  */
1181 karl  1.15 int yychar;
1182            
1183 kumpf 1.17 /* The semantic value of the look-ahead symbol.  */
1184 karl  1.15 YYSTYPE yylval;
1185            
1186            /* Number of syntax errors so far.  */
1187            int yynerrs;
1188            
1189            
1190            
1191            /*----------.
1192            | yyparse.  |
1193            `----------*/
1194 karl  1.12 
1195            #ifdef YYPARSE_PARAM
1196 kumpf 1.17 #if (defined __STDC__ || defined __C99__FUNC__ \
1197                 || defined __cplusplus || defined _MSC_VER)
1198            int
1199            yyparse (void *YYPARSE_PARAM)
1200            #else
1201            int
1202            yyparse (YYPARSE_PARAM)
1203                void *YYPARSE_PARAM;
1204            #endif
1205 karl  1.15 #else /* ! YYPARSE_PARAM */
1206 kumpf 1.17 #if (defined __STDC__ || defined __C99__FUNC__ \
1207                 || defined __cplusplus || defined _MSC_VER)
1208 karl  1.15 int
1209            yyparse (void)
1210 karl  1.12 #else
1211 karl  1.15 int
1212            yyparse ()
1213            
1214 karl  1.12 #endif
1215 mike  1.2  #endif
1216            {
1217 karl  1.15   
1218 kumpf 1.17   int yystate;
1219              int yyn;
1220 karl  1.15   int yyresult;
1221              /* Number of tokens to shift before error messages enabled.  */
1222              int yyerrstatus;
1223 kumpf 1.17   /* Look-ahead token as an internal (translated) token number.  */
1224 karl  1.15   int yytoken = 0;
1225 kumpf 1.17 #if YYERROR_VERBOSE
1226              /* Buffer for error messages, and its allocated size.  */
1227              char yymsgbuf[128];
1228              char *yymsg = yymsgbuf;
1229              YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1230            #endif
1231 karl  1.15 
1232              /* Three stacks and their tools:
1233                 `yyss': related to states,
1234                 `yyvs': related to semantic values,
1235                 `yyls': related to locations.
1236            
1237                 Refer to the stacks thru separate pointers, to allow yyoverflow
1238                 to reallocate them elsewhere.  */
1239            
1240              /* The state stack.  */
1241 kumpf 1.17   yytype_int16 yyssa[YYINITDEPTH];
1242              yytype_int16 *yyss = yyssa;
1243              yytype_int16 *yyssp;
1244 karl  1.15 
1245              /* The semantic value stack.  */
1246              YYSTYPE yyvsa[YYINITDEPTH];
1247              YYSTYPE *yyvs = yyvsa;
1248 kumpf 1.17   YYSTYPE *yyvsp;
1249 karl  1.13 
1250 karl  1.12 
1251            
1252 kumpf 1.17 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1253 karl  1.12 
1254 karl  1.15   YYSIZE_T yystacksize = YYINITDEPTH;
1255 karl  1.12 
1256 karl  1.15   /* The variables used to return semantic value and location from the
1257                 action routines.  */
1258              YYSTYPE yyval;
1259 karl  1.12 
1260            
1261 kumpf 1.17   /* The number of symbols on the RHS of the reduced rule.
1262                 Keep to zero when no symbol should be popped.  */
1263              int yylen = 0;
1264 karl  1.12 
1265 karl  1.15   YYDPRINTF ((stderr, "Starting parse\n"));
1266 karl  1.12 
1267              yystate = 0;
1268              yyerrstatus = 0;
1269              yynerrs = 0;
1270              yychar = YYEMPTY;		/* Cause a token to be read.  */
1271            
1272              /* Initialize stack pointers.
1273                 Waste one element of value and location stack
1274                 so that they stay on the same level as the state stack.
1275                 The wasted elements are never initialized.  */
1276            
1277 karl  1.15   yyssp = yyss;
1278 karl  1.12   yyvsp = yyvs;
1279            
1280 karl  1.15   goto yysetstate;
1281            
1282            /*------------------------------------------------------------.
1283            | yynewstate -- Push a new state, which is found in yystate.  |
1284            `------------------------------------------------------------*/
1285             yynewstate:
1286              /* In all cases, when you get here, the value and location stacks
1287 kumpf 1.17      have just been pushed.  So pushing a state here evens the stacks.  */
1288 karl  1.15   yyssp++;
1289 karl  1.13 
1290 karl  1.15  yysetstate:
1291              *yyssp = yystate;
1292 karl  1.12 
1293 karl  1.15   if (yyss + yystacksize - 1 <= yyssp)
1294 karl  1.14     {
1295 karl  1.12       /* Get the current used size of the three stacks, in elements.  */
1296 karl  1.15       YYSIZE_T yysize = yyssp - yyss + 1;
1297 karl  1.12 
1298            #ifdef yyoverflow
1299 karl  1.15       {
1300 kumpf 1.17 	/* Give user a chance to reallocate the stack.  Use copies of
1301 karl  1.15 	   these so that the &'s don't force the real ones into
1302            	   memory.  */
1303            	YYSTYPE *yyvs1 = yyvs;
1304 kumpf 1.17 	yytype_int16 *yyss1 = yyss;
1305 karl  1.15 
1306            
1307            	/* Each stack pointer address is followed by the size of the
1308            	   data in use in that stack, in bytes.  This used to be a
1309            	   conditional around just the two extra args, but that might
1310            	   be undefined if yyoverflow is a macro.  */
1311 kumpf 1.17 	yyoverflow (YY_("memory exhausted"),
1312 karl  1.15 		    &yyss1, yysize * sizeof (*yyssp),
1313            		    &yyvs1, yysize * sizeof (*yyvsp),
1314            
1315            		    &yystacksize);
1316            
1317            	yyss = yyss1;
1318            	yyvs = yyvs1;
1319                  }
1320 karl  1.12 #else /* no yyoverflow */
1321 karl  1.15 # ifndef YYSTACK_RELOCATE
1322 kumpf 1.17       goto yyexhaustedlab;
1323 karl  1.15 # else
1324 karl  1.12       /* Extend the stack our own way.  */
1325 karl  1.15       if (YYMAXDEPTH <= yystacksize)
1326 kumpf 1.17 	goto yyexhaustedlab;
1327 karl  1.12       yystacksize *= 2;
1328 karl  1.15       if (YYMAXDEPTH < yystacksize)
1329 karl  1.12 	yystacksize = YYMAXDEPTH;
1330 karl  1.15 
1331                  {
1332 kumpf 1.17 	yytype_int16 *yyss1 = yyss;
1333 karl  1.15 	union yyalloc *yyptr =
1334            	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1335            	if (! yyptr)
1336 kumpf 1.17 	  goto yyexhaustedlab;
1337 karl  1.15 	YYSTACK_RELOCATE (yyss);
1338            	YYSTACK_RELOCATE (yyvs);
1339            
1340            #  undef YYSTACK_RELOCATE
1341            	if (yyss1 != yyssa)
1342            	  YYSTACK_FREE (yyss1);
1343                  }
1344            # endif
1345 karl  1.12 #endif /* no yyoverflow */
1346            
1347 karl  1.15       yyssp = yyss + yysize - 1;
1348                  yyvsp = yyvs + yysize - 1;
1349            
1350 karl  1.13 
1351 karl  1.15       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1352            		  (unsigned long int) yystacksize));
1353 karl  1.12 
1354 karl  1.15       if (yyss + yystacksize - 1 <= yyssp)
1355 karl  1.12 	YYABORT;
1356                }
1357            
1358 karl  1.15   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1359 karl  1.12 
1360              goto yybackup;
1361 karl  1.15 
1362            /*-----------.
1363            | yybackup.  |
1364            `-----------*/
1365            yybackup:
1366 karl  1.12 
1367 kumpf 1.17   /* Do appropriate processing given the current state.  Read a
1368                 look-ahead token if we need one and don't already have one.  */
1369 karl  1.12 
1370 kumpf 1.17   /* First try to decide what to do without reference to look-ahead token.  */
1371 karl  1.12   yyn = yypact[yystate];
1372 karl  1.15   if (yyn == YYPACT_NINF)
1373 karl  1.12     goto yydefault;
1374            
1375 kumpf 1.17   /* Not known => get a look-ahead token if don't already have one.  */
1376 karl  1.12 
1377 kumpf 1.17   /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
1378 karl  1.12   if (yychar == YYEMPTY)
1379                {
1380 karl  1.15       YYDPRINTF ((stderr, "Reading a token: "));
1381 karl  1.12       yychar = YYLEX;
1382                }
1383            
1384 karl  1.15   if (yychar <= YYEOF)
1385 karl  1.12     {
1386 karl  1.15       yychar = yytoken = YYEOF;
1387                  YYDPRINTF ((stderr, "Now at end of input.\n"));
1388 karl  1.12     }
1389              else
1390                {
1391 karl  1.15       yytoken = YYTRANSLATE (yychar);
1392 kumpf 1.17       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1393 karl  1.12     }
1394            
1395 karl  1.15   /* If the proper action on seeing token YYTOKEN is to reduce or to
1396                 detect an error, take that action.  */
1397              yyn += yytoken;
1398              if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1399 karl  1.12     goto yydefault;
1400              yyn = yytable[yyn];
1401 karl  1.15   if (yyn <= 0)
1402 karl  1.12     {
1403 karl  1.15       if (yyn == 0 || yyn == YYTABLE_NINF)
1404 karl  1.12 	goto yyerrlab;
1405                  yyn = -yyn;
1406                  goto yyreduce;
1407                }
1408            
1409              if (yyn == YYFINAL)
1410                YYACCEPT;
1411            
1412 kumpf 1.17   /* Count tokens shifted since error; after three, turn off error
1413                 status.  */
1414              if (yyerrstatus)
1415                yyerrstatus--;
1416            
1417              /* Shift the look-ahead token.  */
1418              YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1419 karl  1.12 
1420 kumpf 1.17   /* Discard the shifted token unless it is eof.  */
1421 karl  1.12   if (yychar != YYEOF)
1422                yychar = YYEMPTY;
1423            
1424 kumpf 1.17   yystate = yyn;
1425 karl  1.12   *++yyvsp = yylval;
1426            
1427              goto yynewstate;
1428            
1429 karl  1.15 
1430            /*-----------------------------------------------------------.
1431            | yydefault -- do the default action for the current state.  |
1432            `-----------------------------------------------------------*/
1433 karl  1.14 yydefault:
1434 karl  1.12   yyn = yydefact[yystate];
1435              if (yyn == 0)
1436                goto yyerrlab;
1437 karl  1.15   goto yyreduce;
1438            
1439 karl  1.12 
1440 karl  1.15 /*-----------------------------.
1441            | yyreduce -- Do a reduction.  |
1442            `-----------------------------*/
1443 mike  1.2  yyreduce:
1444 karl  1.15   /* yyn is the number of a rule to reduce with.  */
1445 karl  1.12   yylen = yyr2[yyn];
1446            
1447 karl  1.15   /* If YYLEN is nonzero, implement the default value of the action:
1448                 `$$ = $1'.
1449 karl  1.12 
1450 karl  1.15      Otherwise, the following line sets YYVAL to garbage.
1451                 This behavior is undocumented and Bison
1452                 users should not rely upon it.  Assigning to YYVAL
1453                 unconditionally makes the parser a bit smaller, and it avoids a
1454                 GCC warning that YYVAL may be used uninitialized.  */
1455              yyval = yyvsp[1-yylen];
1456 karl  1.12 
1457            
1458 karl  1.15   YY_REDUCE_PRINT (yyn);
1459              switch (yyn)
1460                {
1461                    case 2:
1462 karl  1.18 #line 161 "WQL.y"
1463 karl  1.15     {
1464 karl  1.18     WQL_TRACE(("YACC: start\n"));
1465 karl  1.15     ;}
1466                break;
1467 karl  1.12 
1468 karl  1.15   case 3:
1469 karl  1.18 #line 167 "WQL.y"
1470 karl  1.15     {
1471 karl  1.12 
1472 karl  1.15     ;}
1473                break;
1474 mike  1.2  
1475 karl  1.15   case 4:
1476 karl  1.18 #line 173 "WQL.y"
1477 karl  1.15     {
1478 karl  1.18     globalParserState->statement->setAllProperties(true);
1479 karl  1.15     ;}
1480                break;
1481            
1482              case 5:
1483 karl  1.18 #line 177 "WQL.y"
1484 karl  1.15     {
1485            
1486                ;}
1487                break;
1488 karl  1.13 
1489 karl  1.15   case 6:
1490 karl  1.18 #line 183 "WQL.y"
1491 karl  1.15     {
1492 karl  1.18     globalParserState->statement->appendSelectPropertyName(CIMName((yyvsp[(1) - (1)].strValue)));
1493 karl  1.15     ;}
1494                break;
1495            
1496              case 7:
1497 karl  1.18 #line 187 "WQL.y"
1498 karl  1.15     {
1499 karl  1.18     globalParserState->statement->appendSelectPropertyName(CIMName((yyvsp[(3) - (3)].strValue)));
1500 karl  1.15     ;}
1501                break;
1502            
1503              case 8:
1504 karl  1.18 #line 193 "WQL.y"
1505 karl  1.15     {
1506            
1507                ;}
1508                break;
1509            
1510              case 9:
1511 karl  1.18 #line 197 "WQL.y"
1512 karl  1.15     {
1513            
1514                ;}
1515                break;
1516            
1517              case 10:
1518 karl  1.18 #line 203 "WQL.y"
1519 karl  1.15     {
1520 karl  1.18     WQL_TRACE(("YACC: fromClause: TOK_FROM className(%s)\n", (yyvsp[(2) - (2)].strValue)));
1521                globalParserState->statement->setClassName(CIMName((yyvsp[(2) - (2)].strValue)));
1522 karl  1.15     ;}
1523                break;
1524            
1525              case 11:
1526 karl  1.18 #line 210 "WQL.y"
1527 karl  1.15     {
1528            
1529                ;}
1530                break;
1531 karl  1.13 
1532 karl  1.15   case 12:
1533 karl  1.18 #line 216 "WQL.y"
1534 karl  1.15     {
1535 karl  1.18     WQL_TRACE(("YACC: TOK_OR\n"));
1536                globalParserState->statement->appendOperation(WQL_OR);
1537 karl  1.15     ;}
1538                break;
1539            
1540              case 13:
1541 karl  1.18 #line 221 "WQL.y"
1542 karl  1.15     {
1543 karl  1.18     WQL_TRACE(("YACC: TOK_AND\n"));
1544                globalParserState->statement->appendOperation(WQL_AND);
1545 karl  1.15     ;}
1546                break;
1547            
1548              case 14:
1549 karl  1.18 #line 226 "WQL.y"
1550 karl  1.15     {
1551 karl  1.18     WQL_TRACE(("YACC: TOK_NOT\n"));
1552 mike  1.2  
1553 karl  1.18     globalParserState->statement->appendOperation(WQL_NOT);
1554 karl  1.15     ;}
1555                break;
1556            
1557              case 15:
1558 karl  1.18 #line 232 "WQL.y"
1559 karl  1.15     {
1560            
1561                ;}
1562                break;
1563            
1564              case 16:
1565 karl  1.18 #line 236 "WQL.y"
1566 karl  1.15     {
1567            
1568                ;}
1569                break;
1570            
1571              case 17:
1572 karl  1.18 #line 240 "WQL.y"
1573 karl  1.15     {
1574 karl  1.18     WQLOperation op = (yyvsp[(3) - (3)].intValue) ? WQL_IS_TRUE : WQL_IS_FALSE;
1575                globalParserState->statement->appendOperation(op);
1576 karl  1.15     ;}
1577                break;
1578            
1579              case 18:
1580 karl  1.18 #line 245 "WQL.y"
1581 karl  1.15     {
1582 karl  1.18     WQLOperation op = (yyvsp[(4) - (4)].intValue) ? WQL_IS_NOT_TRUE : WQL_IS_NOT_FALSE;
1583                globalParserState->statement->appendOperation(op);
1584 karl  1.15     ;}
1585                break;
1586            
1587              case 19:
1588 karl  1.18 #line 254 "WQL.y"
1589 karl  1.15     {
1590            
1591                ;}
1592                break;
1593            
1594              case 20:
1595 karl  1.18 #line 258 "WQL.y"
1596 karl  1.15     {
1597            
1598                ;}
1599                break;
1600            
1601              case 21:
1602 karl  1.18 #line 264 "WQL.y"
1603 karl  1.15     {
1604 karl  1.18     WQL_TRACE(("YACC: TOK_LT\n"));
1605                globalParserState->statement->appendOperation(WQL_LT);
1606 karl  1.15     ;}
1607                break;
1608            
1609              case 22:
1610 karl  1.18 #line 269 "WQL.y"
1611 karl  1.15     {
1612 karl  1.18     WQL_TRACE(("YACC: TOK_GT\n"));
1613                globalParserState->statement->appendOperation(WQL_GT);
1614 karl  1.15     ;}
1615                break;
1616            
1617              case 23:
1618 karl  1.18 #line 274 "WQL.y"
1619 karl  1.15     {
1620 karl  1.18     WQL_TRACE(("YACC: TOK_LE\n"));
1621                globalParserState->statement->appendOperation(WQL_LE);
1622 karl  1.15     ;}
1623                break;
1624            
1625              case 24:
1626 karl  1.18 #line 279 "WQL.y"
1627 karl  1.15     {
1628 karl  1.18     WQL_TRACE(("YACC: TOK_GE\n"));
1629                globalParserState->statement->appendOperation(WQL_GE);
1630 karl  1.15     ;}
1631                break;
1632            
1633              case 25:
1634 karl  1.18 #line 284 "WQL.y"
1635 karl  1.15     {
1636 karl  1.18     WQL_TRACE(("YACC: TOK_EQ\n"));
1637                globalParserState->statement->appendOperation(WQL_EQ);
1638 karl  1.15     ;}
1639                break;
1640            
1641              case 26:
1642 karl  1.18 #line 289 "WQL.y"
1643 karl  1.15     {
1644 karl  1.18     WQL_TRACE(("YACC: TOK_NE\n"));
1645                globalParserState->statement->appendOperation(WQL_NE);
1646 karl  1.15     ;}
1647                break;
1648            
1649              case 27:
1650 karl  1.18 #line 294 "WQL.y"
1651 karl  1.15     {
1652 karl  1.13     WQL_TRACE(("YACC: TOK_ISA\n"));
1653 karl  1.14 #ifndef PEGASUS_SNIA_EXTENSIONS
1654                    // If SNIA tests, allow the ISA but do not pass className
1655 karl  1.13         yyerror("ISA Token Not Supported");
1656 karl  1.14 #endif
1657 karl  1.15     ;}
1658                break;
1659            
1660              case 28:
1661 karl  1.18 #line 304 "WQL.y"
1662 karl  1.15     {
1663 karl  1.18     WQL_TRACE(("YACC: nullPredicate : comparisonTerm IS NULL\n"));
1664                globalParserState->statement->appendOperation(WQL_IS_NULL);
1665 karl  1.15     ;}
1666                break;
1667            
1668              case 29:
1669 karl  1.18 #line 309 "WQL.y"
1670 karl  1.15     {
1671 karl  1.18     WQL_TRACE(("YACC: nullPredicate : comparisonTerm IS NOT NULL\n"));
1672                globalParserState->statement->appendOperation(WQL_IS_NOT_NULL);
1673 karl  1.15     ;}
1674                break;
1675            
1676              case 30:
1677 karl  1.18 #line 316 "WQL.y"
1678 karl  1.15     {
1679 karl  1.18     (yyval.intValue) = 1;
1680 karl  1.15     ;}
1681                break;
1682            
1683              case 31:
1684 karl  1.18 #line 320 "WQL.y"
1685 karl  1.15     {
1686 karl  1.18     (yyval.intValue) = 0;
1687 karl  1.15     ;}
1688                break;
1689            
1690              case 32:
1691 karl  1.18 #line 333 "WQL.y"
1692 karl  1.15     {
1693 kumpf 1.17         WQL_TRACE(("YACC: propertyName : TOK_IDENTIFIER(%s)\n", (yyvsp[(1) - (1)].strValue)));
1694                    (yyval.strValue) = (yyvsp[(1) - (1)].strValue);
1695 karl  1.15     ;}
1696                break;
1697            
1698              case 33:
1699 karl  1.18 #line 338 "WQL.y"
1700 karl  1.15     {
1701 kumpf 1.17         WQL_TRACE(("YACC: propertyName : TOK_IDENTIFIER(%s.%s)\n", (yyvsp[(1) - (3)].strValue), (yyvsp[(3) - (3)].strValue)));
1702 karl  1.14 #ifdef PEGASUS_SNIA_EXTENSIONS
1703                    // Pass anything as a property name to fool parser for SNIA testing
1704 kumpf 1.17         (yyval.strValue) = strdup("dummy");
1705 karl  1.14 #else
1706                    yyerror("Scoped (dotted) property names not supported");
1707            #endif
1708 karl  1.15     ;}
1709                break;
1710            
1711              case 34:
1712 karl  1.18 #line 350 "WQL.y"
1713 karl  1.15     {
1714 karl  1.18     WQL_TRACE(("YACC: TOK_IDENTIFIER %s\n", (yyvsp[(1) - (1)].strValue)));
1715                (yyval.strValue) = (yyvsp[(1) - (1)].strValue);
1716 karl  1.15     ;}
1717                break;
1718            
1719              case 35:
1720 karl  1.18 #line 357 "WQL.y"
1721 karl  1.15     {
1722 karl  1.18     globalParserState->statement->appendOperand(
1723                    WQLOperand((yyvsp[(1) - (1)].strValue), WQL_PROPERTY_NAME_TAG));
1724                globalParserState->statement->appendWherePropertyName(CIMName((yyvsp[(1) - (1)].strValue)));
1725 karl  1.15     ;}
1726                break;
1727            
1728              case 36:
1729 karl  1.18 #line 363 "WQL.y"
1730 karl  1.15     {
1731 karl  1.18     globalParserState->statement->appendOperand(
1732                    WQLOperand((yyvsp[(1) - (1)].intValue), WQL_INTEGER_VALUE_TAG));
1733 karl  1.15     ;}
1734                break;
1735            
1736              case 37:
1737 karl  1.18 #line 368 "WQL.y"
1738 karl  1.15     {
1739 karl  1.18     globalParserState->statement->appendOperand(
1740                    WQLOperand((yyvsp[(1) - (1)].doubleValue), WQL_DOUBLE_VALUE_TAG));
1741 karl  1.15     ;}
1742                break;
1743            
1744              case 38:
1745 karl  1.18 #line 373 "WQL.y"
1746 karl  1.15     {
1747 karl  1.18     globalParserState->statement->appendOperand(
1748                    WQLOperand((yyvsp[(1) - (1)].strValue), WQL_STRING_VALUE_TAG));
1749 karl  1.15     ;}
1750                break;
1751            
1752              case 39:
1753 karl  1.18 #line 378 "WQL.y"
1754 karl  1.15     {
1755 karl  1.18     globalParserState->statement->appendOperand(
1756                    WQLOperand((yyvsp[(1) - (1)].intValue) != 0, WQL_BOOLEAN_VALUE_TAG));
1757 karl  1.15     ;}
1758                break;
1759            
1760            
1761 kumpf 1.17 /* Line 1267 of yacc.c.  */
1762            #line 1760 "WQLtemp"
1763                  default: break;
1764 karl  1.15     }
1765 kumpf 1.17   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1766 karl  1.15 
1767 kumpf 1.17   YYPOPSTACK (yylen);
1768              yylen = 0;
1769 karl  1.15   YY_STACK_PRINT (yyss, yyssp);
1770 karl  1.12 
1771              *++yyvsp = yyval;
1772            
1773            
1774 karl  1.15   /* Now `shift' the result of the reduction.  Determine what state
1775                 that goes to, based on the state we popped back to and the rule
1776                 number reduced by.  */
1777 karl  1.12 
1778              yyn = yyr1[yyn];
1779            
1780 karl  1.15   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1781              if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1782 karl  1.12     yystate = yytable[yystate];
1783              else
1784 karl  1.15     yystate = yydefgoto[yyn - YYNTOKENS];
1785 karl  1.12 
1786              goto yynewstate;
1787            
1788            
1789 karl  1.15 /*------------------------------------.
1790            | yyerrlab -- here on detecting error |
1791            `------------------------------------*/
1792            yyerrlab:
1793              /* If not already recovering from an error, report this error.  */
1794              if (!yyerrstatus)
1795 karl  1.12     {
1796                  ++yynerrs;
1797 kumpf 1.17 #if ! YYERROR_VERBOSE
1798                  yyerror (YY_("syntax error"));
1799            #else
1800                  {
1801            	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
1802            	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
1803            	  {
1804            	    YYSIZE_T yyalloc = 2 * yysize;
1805            	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
1806            	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
1807            	    if (yymsg != yymsgbuf)
1808            	      YYSTACK_FREE (yymsg);
1809            	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
1810            	    if (yymsg)
1811            	      yymsg_alloc = yyalloc;
1812            	    else
1813 karl  1.15 	      {
1814 kumpf 1.17 		yymsg = yymsgbuf;
1815            		yymsg_alloc = sizeof yymsgbuf;
1816 karl  1.15 	      }
1817 kumpf 1.17 	  }
1818 karl  1.12 
1819 kumpf 1.17 	if (0 < yysize && yysize <= yymsg_alloc)
1820            	  {
1821            	    (void) yysyntax_error (yymsg, yystate, yychar);
1822            	    yyerror (yymsg);
1823            	  }
1824            	else
1825            	  {
1826            	    yyerror (YY_("syntax error"));
1827            	    if (yysize != 0)
1828            	      goto yyexhaustedlab;
1829            	  }
1830                  }
1831            #endif
1832 mike  1.2      }
1833 karl  1.12 
1834 karl  1.15 
1835 karl  1.12 
1836              if (yyerrstatus == 3)
1837                {
1838 kumpf 1.17       /* If just tried and failed to reuse look-ahead token after an
1839 karl  1.15 	 error, discard it.  */
1840 karl  1.12 
1841 karl  1.15       if (yychar <= YYEOF)
1842 kumpf 1.17 	{
1843            	  /* Return failure if at end of input.  */
1844 karl  1.15 	  if (yychar == YYEOF)
1845 kumpf 1.17 	    YYABORT;
1846            	}
1847 karl  1.15       else
1848            	{
1849 kumpf 1.17 	  yydestruct ("Error: discarding",
1850            		      yytoken, &yylval);
1851 karl  1.15 	  yychar = YYEMPTY;
1852            	}
1853 mike  1.2      }
1854 karl  1.12 
1855 kumpf 1.17   /* Else will try to reuse look-ahead token after shifting the error
1856 karl  1.15      token.  */
1857              goto yyerrlab1;
1858 karl  1.14 
1859 karl  1.12 
1860 karl  1.15 /*---------------------------------------------------.
1861            | yyerrorlab -- error raised explicitly by YYERROR.  |
1862            `---------------------------------------------------*/
1863            yyerrorlab:
1864 karl  1.12 
1865 kumpf 1.17   /* Pacify compilers like GCC when the user code never invokes
1866                 YYERROR and the label yyerrorlab therefore never appears in user
1867                 code.  */
1868              if (/*CONSTCOND*/ 0)
1869 karl  1.15      goto yyerrorlab;
1870 karl  1.12 
1871 kumpf 1.17   /* Do not reclaim the symbols of the rule which action triggered
1872                 this YYERROR.  */
1873              YYPOPSTACK (yylen);
1874              yylen = 0;
1875              YY_STACK_PRINT (yyss, yyssp);
1876 karl  1.15   yystate = *yyssp;
1877              goto yyerrlab1;
1878 karl  1.12 
1879 karl  1.14 
1880 karl  1.15 /*-------------------------------------------------------------.
1881            | yyerrlab1 -- common code for both syntax error and YYERROR.  |
1882            `-------------------------------------------------------------*/
1883            yyerrlab1:
1884              yyerrstatus = 3;	/* Each real token shifted decrements this.  */
1885 karl  1.12 
1886 karl  1.15   for (;;)
1887 karl  1.14     {
1888 karl  1.15       yyn = yypact[yystate];
1889                  if (yyn != YYPACT_NINF)
1890            	{
1891            	  yyn += YYTERROR;
1892            	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1893            	    {
1894            	      yyn = yytable[yyn];
1895            	      if (0 < yyn)
1896            		break;
1897            	    }
1898            	}
1899 karl  1.12 
1900 karl  1.15       /* Pop the current state because it cannot handle the error token.  */
1901                  if (yyssp == yyss)
1902            	YYABORT;
1903 karl  1.12 
1904 kumpf 1.17 
1905                  yydestruct ("Error: popping",
1906            		  yystos[yystate], yyvsp);
1907                  YYPOPSTACK (1);
1908 karl  1.15       yystate = *yyssp;
1909                  YY_STACK_PRINT (yyss, yyssp);
1910 karl  1.12     }
1911            
1912              if (yyn == YYFINAL)
1913                YYACCEPT;
1914            
1915 kumpf 1.17   *++yyvsp = yylval;
1916 karl  1.12 
1917 karl  1.15 
1918 kumpf 1.17   /* Shift the error token.  */
1919              YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1920 karl  1.12 
1921              yystate = yyn;
1922              goto yynewstate;
1923            
1924            
1925 karl  1.15 /*-------------------------------------.
1926            | yyacceptlab -- YYACCEPT comes here.  |
1927            `-------------------------------------*/
1928            yyacceptlab:
1929              yyresult = 0;
1930              goto yyreturn;
1931            
1932            /*-----------------------------------.
1933            | yyabortlab -- YYABORT comes here.  |
1934            `-----------------------------------*/
1935            yyabortlab:
1936              yyresult = 1;
1937              goto yyreturn;
1938            
1939            #ifndef yyoverflow
1940 kumpf 1.17 /*-------------------------------------------------.
1941            | yyexhaustedlab -- memory exhaustion comes here.  |
1942            `-------------------------------------------------*/
1943            yyexhaustedlab:
1944              yyerror (YY_("memory exhausted"));
1945 karl  1.15   yyresult = 2;
1946              /* Fall through.  */
1947            #endif
1948            
1949            yyreturn:
1950 kumpf 1.17   if (yychar != YYEOF && yychar != YYEMPTY)
1951                 yydestruct ("Cleanup: discarding lookahead",
1952            		 yytoken, &yylval);
1953              /* Do not reclaim the symbols of the rule which action triggered
1954                 this YYABORT or YYACCEPT.  */
1955              YYPOPSTACK (yylen);
1956              YY_STACK_PRINT (yyss, yyssp);
1957              while (yyssp != yyss)
1958                {
1959                  yydestruct ("Cleanup: popping",
1960            		  yystos[*yyssp], yyvsp);
1961                  YYPOPSTACK (1);
1962                }
1963 karl  1.15 #ifndef yyoverflow
1964              if (yyss != yyssa)
1965                YYSTACK_FREE (yyss);
1966 karl  1.12 #endif
1967 kumpf 1.17 #if YYERROR_VERBOSE
1968              if (yymsg != yymsgbuf)
1969                YYSTACK_FREE (yymsg);
1970            #endif
1971              /* Make sure YYID is used.  */
1972              return YYID (yyresult);
1973 mike  1.2  }
1974 karl  1.15 
1975            
1976 karl  1.18 #line 383 "WQL.y"
1977 karl  1.15 
1978 karl  1.12 

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2