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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2