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

   1 karl  1.5 //%2003////////////////////////////////////////////////////////////////////////
   2           //
   3           // Copyright (c) 2000, 2001, 2002  BMC Software, Hewlett-Packard Development
   4           // Company, L. P., IBM Corp., The Open Group, Tivoli Systems.
   5           // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.;
   6           // IBM Corp.; EMC Corporation, The Open Group.
   7           //
   8           // Permission is hereby granted, free of charge, to any person obtaining a copy
   9           // of this software and associated documentation files (the "Software"), to
  10           // deal in the Software without restriction, including without limitation the
  11           // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  12           // sell copies of the Software, and to permit persons to whom the Software is
  13           // furnished to do so, subject to the following conditions:
  14           // 
  15           // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
  16           // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
  17           // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
  18           // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  19           // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  20           // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  21           // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  22 karl  1.5 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  23           //
  24           //==============================================================================
  25 mike  1.2 
  26 kumpf 1.3 /*  A Bison parser, made from WQL.y
  27               by GNU Bison version 1.28  */
  28 mike  1.2 
  29           #define YYBISON 1  /* Identify Bison output.  */
  30           
  31           #define yyparse WQL_parse
  32           #define yylex WQL_lex
  33           #define yyerror WQL_error
  34           #define yylval WQL_lval
  35           #define yychar WQL_char
  36           #define yydebug WQL_debug
  37           #define yynerrs WQL_nerrs
  38 kumpf 1.3 #define	TOK_INTEGER	257
  39           #define	TOK_DOUBLE	258
  40           #define	TOK_STRING	259
  41           #define	TOK_TRUE	260
  42           #define	TOK_FALSE	261
  43           #define	TOK_NULL	262
  44           #define	TOK_EQ	263
  45           #define	TOK_NE	264
  46           #define	TOK_LT	265
  47           #define	TOK_LE	266
  48           #define	TOK_GT	267
  49           #define	TOK_GE	268
  50           #define	TOK_NOT	269
  51           #define	TOK_OR	270
  52           #define	TOK_AND	271
  53           #define	TOK_IS	272
  54           #define	TOK_IDENTIFIER	273
  55           #define	TOK_SELECT	274
  56           #define	TOK_WHERE	275
  57           #define	TOK_FROM	276
  58           #define	TOK_UNEXPECTED_CHAR	277
  59 mike  1.2 
  60 kumpf 1.3 #line 9 "WQL.y"
  61 mike  1.2 
  62           
  63           #include <Pegasus/Common/Config.h>
  64           #include <Pegasus/WQL/WQLOperation.h>
  65           #include <Pegasus/WQL/WQLOperand.h>
  66           #include <Pegasus/WQL/WQLParserState.h>
  67           #include <Pegasus/WQL/WQLSelectStatement.h>
  68           #include <string.h>
  69           #include <stdlib.h>
  70           
  71           #ifdef PEGASUS_OS_TYPE_WINDOWS
  72           # include <malloc.h>
  73           #endif
  74           
  75           #if defined(PEGASUS_COMPILER_ACC) && defined(PEGASUS_OS_HPUX)
  76           # include <alloca.h>
  77           #endif
  78           
  79           #if 0
  80           # define WQL_TRACE(X) printf X
  81           #else
  82 mike  1.2 # define WQL_TRACE(X)
  83           #endif
  84           
  85           extern int WQL_lex();
  86 kumpf 1.3 extern int WQL_error(const char*);
  87 mike  1.2 
  88           //
  89           // Define the global parser state object:
  90           //
  91           
  92           PEGASUS_USING_PEGASUS;
  93           
  94           PEGASUS_NAMESPACE_BEGIN
  95           
  96           extern WQLParserState* globalParserState;
  97           
  98           PEGASUS_NAMESPACE_END
  99           
 100           
 101 kumpf 1.3 #line 58 "WQL.y"
 102 mike  1.2 typedef union 
 103           {
 104              int intValue;
 105              double doubleValue;
 106              char* strValue;
 107              void* nodeValue;
 108           } YYSTYPE;
 109           #include <stdio.h>
 110           
 111           #ifndef __cplusplus
 112           #ifndef __STDC__
 113           #define const
 114           #endif
 115           #endif
 116           
 117           
 118           
 119           #define	YYFINAL		60
 120           #define	YYFLAG		-32768
 121           #define	YYNTBASE	28
 122           
 123 kumpf 1.3 #define YYTRANSLATE(x) ((unsigned)(x) <= 277 ? yytranslate[x] : 43)
 124 mike  1.2 
 125           static const char yytranslate[] = {     0,
 126                2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 127                2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 128                2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 129                2,     2,     2,     2,     2,     2,     2,     2,     2,    26,
 130               27,    24,     2,    25,     2,     2,     2,     2,     2,     2,
 131                2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 132                2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 133                2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 134                2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 135                2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 136                2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 137                2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 138                2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 139                2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 140                2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 141                2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 142                2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 143                2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 144                2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 145 mike  1.2      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 146                2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 147                2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 148                2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 149                2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 150                2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 151 kumpf 1.3      2,     2,     2,     2,     2,     1,     3,     4,     5,     6,
 152                7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
 153               17,    18,    19,    20,    21,    22,    23
 154 mike  1.2 };
 155           
 156           #if YYDEBUG != 0
 157           static const short yyprhs[] = {     0,
 158                0,     2,     6,     8,    10,    12,    16,    19,    21,    24,
 159               27,    31,    35,    38,    42,    44,    48,    53,    55,    57,
 160               61,    65,    69,    73,    77,    81,    85,    90,    92,    94,
 161               96,    98,   100,   102,   104,   106
 162           };
 163           
 164           static const short yyrhs[] = {    29,
 165                0,    20,    30,    32,     0,    24,     0,    31,     0,    40,
 166                0,    31,    25,    40,     0,    33,    34,     0,    33,     0,
 167               22,    41,     0,    21,    35,     0,    35,    16,    35,     0,
 168               35,    17,    35,     0,    15,    35,     0,    26,    35,    27,
 169                0,    36,     0,    36,    18,    39,     0,    36,    18,    15,
 170               39,     0,    37,     0,    38,     0,    42,    11,    42,     0,
 171               42,    13,    42,     0,    42,    12,    42,     0,    42,    14,
 172               42,     0,    42,     9,    42,     0,    42,    10,    42,     0,
 173               42,    18,     8,     0,    42,    18,    15,     8,     0,     6,
 174                0,     7,     0,    19,     0,    19,     0,    40,     0,     3,
 175 mike  1.2      0,     4,     0,     5,     0,    39,     0
 176           };
 177           
 178           #endif
 179           
 180           #if YYDEBUG != 0
 181           static const short yyrline[] = { 0,
 182              130,   136,   142,   146,   152,   156,   162,   166,   172,   179,
 183              185,   190,   195,   201,   205,   209,   214,   223,   227,   233,
 184              238,   243,   248,   253,   258,   265,   270,   277,   281,   287,
 185              293,   300,   306,   311,   316,   321
 186           };
 187 kumpf 1.3 #endif
 188           
 189           
 190           #if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
 191 mike  1.2 
 192           static const char * const yytname[] = {   "$","error","$undefined.","TOK_INTEGER",
 193           "TOK_DOUBLE","TOK_STRING","TOK_TRUE","TOK_FALSE","TOK_NULL","TOK_EQ","TOK_NE",
 194           "TOK_LT","TOK_LE","TOK_GT","TOK_GE","TOK_NOT","TOK_OR","TOK_AND","TOK_IS","TOK_IDENTIFIER",
 195           "TOK_SELECT","TOK_WHERE","TOK_FROM","TOK_UNEXPECTED_CHAR","'*'","','","'('",
 196           "')'","start","selectStatement","selectList","propertyList","selectExpression",
 197           "fromClause","whereClause","searchCondition","predicate","comparisonPredicate",
 198 kumpf 1.3 "nullPredicate","truthValue","propertyName","className","comparisonTerm", NULL
 199 mike  1.2 };
 200           #endif
 201           
 202           static const short yyr1[] = {     0,
 203               28,    29,    30,    30,    31,    31,    32,    32,    33,    34,
 204               35,    35,    35,    35,    35,    35,    35,    36,    36,    37,
 205               37,    37,    37,    37,    37,    38,    38,    39,    39,    40,
 206               41,    42,    42,    42,    42,    42
 207           };
 208           
 209           static const short yyr2[] = {     0,
 210                1,     3,     1,     1,     1,     3,     2,     1,     2,     2,
 211                3,     3,     2,     3,     1,     3,     4,     1,     1,     3,
 212                3,     3,     3,     3,     3,     3,     4,     1,     1,     1,
 213                1,     1,     1,     1,     1,     1
 214           };
 215           
 216           static const short yydefact[] = {     0,
 217                0,     1,    30,     3,     0,     4,     5,     0,     2,     8,
 218                0,    31,     9,     0,     7,     6,    33,    34,    35,    28,
 219               29,     0,     0,    10,    15,    18,    19,    36,    32,     0,
 220 mike  1.2     13,     0,     0,     0,     0,     0,     0,     0,     0,     0,
 221                0,     0,    14,    11,    12,     0,    16,    24,    25,    20,
 222               22,    21,    23,    26,     0,    17,    27,     0,     0,     0
 223           };
 224           
 225           static const short yydefgoto[] = {    58,
 226                2,     5,     6,     9,    10,    15,    24,    25,    26,    27,
 227               28,    29,    13,    30
 228           };
 229           
 230           static const short yypact[] = {    -5,
 231               18,-32768,-32768,-32768,     5,    16,-32768,    24,-32768,    33,
 232               26,-32768,-32768,    -3,-32768,-32768,-32768,-32768,-32768,-32768,
 233           -32768,    -3,    -3,    23,    37,-32768,-32768,-32768,-32768,    20,
 234           -32768,     1,    -3,    -3,    29,     2,     2,     2,     2,     2,
 235                2,    11,-32768,    39,-32768,    46,-32768,-32768,-32768,-32768,
 236           -32768,-32768,-32768,-32768,    49,-32768,-32768,    58,    59,-32768
 237           };
 238           
 239           static const short yypgoto[] = {-32768,
 240           -32768,-32768,-32768,-32768,-32768,-32768,    -9,-32768,-32768,-32768,
 241 mike  1.2    -24,     9,-32768,    10
 242           };
 243           
 244           
 245           #define	YYLAST		59
 246           
 247           
 248           static const short yytable[] = {    17,
 249               18,    19,    20,    21,    17,    18,    19,    20,    21,     7,
 250               47,    22,    31,    32,     1,     3,    33,    34,    54,    16,
 251                3,    56,    23,    44,    45,    55,     8,    43,    36,    37,
 252               38,    39,    40,    41,    20,    21,     3,    42,    33,    34,
 253               11,     4,    12,    46,     3,    48,    49,    50,    51,    52,
 254               53,    20,    21,    14,    35,    34,    57,    59,    60
 255           };
 256           
 257           static const short yycheck[] = {     3,
 258                4,     5,     6,     7,     3,     4,     5,     6,     7,     1,
 259               35,    15,    22,    23,    20,    19,    16,    17,     8,    11,
 260               19,    46,    26,    33,    34,    15,    22,    27,     9,    10,
 261               11,    12,    13,    14,     6,     7,    19,    18,    16,    17,
 262 mike  1.2     25,    24,    19,    15,    19,    36,    37,    38,    39,    40,
 263               41,     6,     7,    21,    18,    17,     8,     0,     0
 264           };
 265           /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
 266           #line 3 "bison.simple"
 267           /* This file comes from bison-@bison_version@.  */
 268           
 269           /* Skeleton output parser for bison,
 270              Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
 271           
 272              This program is free software; you can redistribute it and/or modify
 273              it under the terms of the GNU General Public License as published by
 274              the Free Software Foundation; either version 2, or (at your option)
 275              any later version.
 276           
 277              This program is distributed in the hope that it will be useful,
 278              but WITHOUT ANY WARRANTY; without even the implied warranty of
 279              MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 280              GNU General Public License for more details.
 281           
 282              You should have received a copy of the GNU General Public License
 283 mike  1.2    along with this program; if not, write to the Free Software
 284              Foundation, Inc., 59 Temple Place - Suite 330,
 285              Boston, MA 02111-1307, USA.  */
 286           
 287           /* As a special exception, when this file is copied by Bison into a
 288              Bison output file, you may use that output file without restriction.
 289              This special exception was added by the Free Software Foundation
 290              in version 1.24 of Bison.  */
 291           
 292           /* This is the parser code that is written into each bison parser
 293             when the %semantic_parser declaration is not specified in the grammar.
 294             It was written by Richard Stallman by simplifying the hairy parser
 295             used when %semantic_parser is specified.  */
 296           
 297           #ifndef YYSTACK_USE_ALLOCA
 298           #ifdef alloca
 299           #define YYSTACK_USE_ALLOCA
 300           #else /* alloca not defined */
 301           #ifdef __GNUC__
 302           #define YYSTACK_USE_ALLOCA
 303           #define alloca __builtin_alloca
 304 mike  1.2 #else /* not GNU C.  */
 305           #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
 306           #define YYSTACK_USE_ALLOCA
 307           #include <alloca.h>
 308           #else /* not sparc */
 309           /* We think this test detects Watcom and Microsoft C.  */
 310           /* This used to test MSDOS, but that is a bad idea
 311              since that symbol is in the user namespace.  */
 312           #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
 313           #if 0 /* No need for malloc.h, which pollutes the namespace;
 314           	 instead, just don't use alloca.  */
 315           #include <malloc.h>
 316           #endif
 317           #else /* not MSDOS, or __TURBOC__ */
 318           #if defined(_AIX)
 319           /* I don't know what this was needed for, but it pollutes the namespace.
 320              So I turned it off.   rms, 2 May 1997.  */
 321           /* #include <malloc.h>  */
 322            #pragma alloca
 323           #define YYSTACK_USE_ALLOCA
 324           #else /* not MSDOS, or __TURBOC__, or _AIX */
 325 mike  1.2 #if 0
 326           #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
 327           		 and on HPUX 10.  Eventually we can turn this on.  */
 328           #define YYSTACK_USE_ALLOCA
 329           #define alloca __builtin_alloca
 330           #endif /* __hpux */
 331           #endif
 332           #endif /* not _AIX */
 333           #endif /* not MSDOS, or __TURBOC__ */
 334           #endif /* not sparc */
 335           #endif /* not GNU C */
 336           #endif /* alloca not defined */
 337           #endif /* YYSTACK_USE_ALLOCA not defined */
 338           
 339           #ifdef YYSTACK_USE_ALLOCA
 340           #define YYSTACK_ALLOC alloca
 341           #else
 342           #define YYSTACK_ALLOC malloc
 343           #endif
 344           
 345           /* Note: there must be only one dollar sign in this file.
 346 mike  1.2    It is replaced by the list of actions, each action
 347              as one case of the switch.  */
 348           
 349           #define yyerrok		(yyerrstatus = 0)
 350           #define yyclearin	(yychar = YYEMPTY)
 351           #define YYEMPTY		-2
 352           #define YYEOF		0
 353           #define YYACCEPT	goto yyacceptlab
 354           #define YYABORT 	goto yyabortlab
 355           #define YYERROR		goto yyerrlab1
 356           /* Like YYERROR except do call yyerror.
 357              This remains here temporarily to ease the
 358              transition to the new meaning of YYERROR, for GCC.
 359              Once GCC version 2 has supplanted version 1, this can go.  */
 360           #define YYFAIL		goto yyerrlab
 361           #define YYRECOVERING()  (!!yyerrstatus)
 362           #define YYBACKUP(token, value) \
 363           do								\
 364             if (yychar == YYEMPTY && yylen == 1)				\
 365               { yychar = (token), yylval = (value);			\
 366                 yychar1 = YYTRANSLATE (yychar);				\
 367 mike  1.2       YYPOPSTACK;						\
 368                 goto yybackup;						\
 369               }								\
 370             else								\
 371               { yyerror ("syntax error: cannot back up"); YYERROR; }	\
 372           while (0)
 373           
 374           #define YYTERROR	1
 375           #define YYERRCODE	256
 376           
 377           #ifndef YYPURE
 378           #define YYLEX		yylex()
 379           #endif
 380           
 381           #ifdef YYPURE
 382           #ifdef YYLSP_NEEDED
 383           #ifdef YYLEX_PARAM
 384           #define YYLEX		yylex(&yylval, &yylloc, YYLEX_PARAM)
 385           #else
 386           #define YYLEX		yylex(&yylval, &yylloc)
 387           #endif
 388 mike  1.2 #else /* not YYLSP_NEEDED */
 389           #ifdef YYLEX_PARAM
 390           #define YYLEX		yylex(&yylval, YYLEX_PARAM)
 391           #else
 392           #define YYLEX		yylex(&yylval)
 393           #endif
 394           #endif /* not YYLSP_NEEDED */
 395           #endif
 396           
 397           /* If nonreentrant, generate the variables here */
 398           
 399           #ifndef YYPURE
 400           
 401           int	yychar;			/*  the lookahead symbol		*/
 402           YYSTYPE	yylval;			/*  the semantic value of the		*/
 403           				/*  lookahead symbol			*/
 404           
 405           #ifdef YYLSP_NEEDED
 406           YYLTYPE yylloc;			/*  location data for the lookahead	*/
 407           				/*  symbol				*/
 408           #endif
 409 mike  1.2 
 410           int yynerrs;			/*  number of parse errors so far       */
 411           #endif  /* not YYPURE */
 412           
 413           #if YYDEBUG != 0
 414           int yydebug;			/*  nonzero means print parse trace	*/
 415           /* Since this is uninitialized, it does not stop multiple parsers
 416              from coexisting.  */
 417           #endif
 418           
 419           /*  YYINITDEPTH indicates the initial size of the parser's stacks	*/
 420           
 421           #ifndef	YYINITDEPTH
 422           #define YYINITDEPTH 200
 423           #endif
 424           
 425           /*  YYMAXDEPTH is the maximum size the stacks can grow to
 426               (effective only if the built-in stack extension method is used).  */
 427           
 428           #if YYMAXDEPTH == 0
 429           #undef YYMAXDEPTH
 430 mike  1.2 #endif
 431           
 432           #ifndef YYMAXDEPTH
 433           #define YYMAXDEPTH 10000
 434           #endif
 435           
 436           /* Define __yy_memcpy.  Note that the size argument
 437              should be passed with type unsigned int, because that is what the non-GCC
 438              definitions require.  With GCC, __builtin_memcpy takes an arg
 439              of type size_t, but it can handle unsigned int.  */
 440           
 441           #if __GNUC__ > 1		/* GNU C and GNU C++ define this.  */
 442           #define __yy_memcpy(TO,FROM,COUNT)	__builtin_memcpy(TO,FROM,COUNT)
 443           #else				/* not GNU C or C++ */
 444           #ifndef __cplusplus
 445           
 446           /* This is the most reliable way to avoid incompatibilities
 447              in available built-in functions on various systems.  */
 448           static void
 449           __yy_memcpy (to, from, count)
 450                char *to;
 451 mike  1.2      char *from;
 452                unsigned int count;
 453           {
 454             register char *f = from;
 455             register char *t = to;
 456             register int i = count;
 457           
 458             while (i-- > 0)
 459               *t++ = *f++;
 460           }
 461           
 462           #else /* __cplusplus */
 463           
 464           /* This is the most reliable way to avoid incompatibilities
 465              in available built-in functions on various systems.  */
 466           static void
 467           __yy_memcpy (char *to, char *from, unsigned int count)
 468           {
 469             register char *t = to;
 470             register char *f = from;
 471             register int i = count;
 472 mike  1.2 
 473             while (i-- > 0)
 474               *t++ = *f++;
 475           }
 476           
 477           #endif
 478           #endif
 479           
 480           #line 217 "bison.simple"
 481           
 482           /* The user can define YYPARSE_PARAM as the name of an argument to be passed
 483              into yyparse.  The argument should have type void *.
 484              It should actually point to an object.
 485              Grammar actions can access the variable by casting it
 486              to the proper pointer type.  */
 487           
 488           #ifdef YYPARSE_PARAM
 489           #ifdef __cplusplus
 490           #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
 491           #define YYPARSE_PARAM_DECL
 492           #else /* not __cplusplus */
 493 mike  1.2 #define YYPARSE_PARAM_ARG YYPARSE_PARAM
 494           #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
 495           #endif /* not __cplusplus */
 496           #else /* not YYPARSE_PARAM */
 497           #define YYPARSE_PARAM_ARG
 498           #define YYPARSE_PARAM_DECL
 499           #endif /* not YYPARSE_PARAM */
 500           
 501           /* Prevent warning if -Wstrict-prototypes.  */
 502           #ifdef __GNUC__
 503           #ifdef YYPARSE_PARAM
 504           int yyparse (void *);
 505           #else
 506           int yyparse (void);
 507           #endif
 508           #endif
 509           
 510           int
 511           yyparse(YYPARSE_PARAM_ARG)
 512                YYPARSE_PARAM_DECL
 513           {
 514 mike  1.2   register int yystate;
 515             register int yyn;
 516             register short *yyssp;
 517             register YYSTYPE *yyvsp;
 518             int yyerrstatus;	/*  number of tokens to shift before error messages enabled */
 519             int yychar1 = 0;		/*  lookahead token as an internal (translated) token number */
 520           
 521             short	yyssa[YYINITDEPTH];	/*  the state stack			*/
 522             YYSTYPE yyvsa[YYINITDEPTH];	/*  the semantic value stack		*/
 523           
 524             short *yyss = yyssa;		/*  refer to the stacks thru separate pointers */
 525             YYSTYPE *yyvs = yyvsa;	/*  to allow yyoverflow to reallocate them elsewhere */
 526           
 527           #ifdef YYLSP_NEEDED
 528             YYLTYPE yylsa[YYINITDEPTH];	/*  the location stack			*/
 529             YYLTYPE *yyls = yylsa;
 530             YYLTYPE *yylsp;
 531           
 532           #define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
 533           #else
 534           #define YYPOPSTACK   (yyvsp--, yyssp--)
 535 mike  1.2 #endif
 536           
 537             int yystacksize = YYINITDEPTH;
 538             int yyfree_stacks = 0;
 539           
 540           #ifdef YYPURE
 541             int yychar;
 542             YYSTYPE yylval;
 543             int yynerrs;
 544           #ifdef YYLSP_NEEDED
 545             YYLTYPE yylloc;
 546           #endif
 547           #endif
 548           
 549             YYSTYPE yyval;		/*  the variable used to return		*/
 550           				/*  semantic values from the action	*/
 551           				/*  routines				*/
 552           
 553             int yylen;
 554           
 555           #if YYDEBUG != 0
 556 mike  1.2   if (yydebug)
 557               fprintf(stderr, "Starting parse\n");
 558           #endif
 559           
 560             yystate = 0;
 561             yyerrstatus = 0;
 562             yynerrs = 0;
 563             yychar = YYEMPTY;		/* Cause a token to be read.  */
 564           
 565             /* Initialize stack pointers.
 566                Waste one element of value and location stack
 567                so that they stay on the same level as the state stack.
 568                The wasted elements are never initialized.  */
 569           
 570             yyssp = yyss - 1;
 571             yyvsp = yyvs;
 572           #ifdef YYLSP_NEEDED
 573             yylsp = yyls;
 574           #endif
 575           
 576           /* Push a new state, which is found in  yystate  .  */
 577 mike  1.2 /* In all cases, when you get here, the value and location stacks
 578              have just been pushed. so pushing a state here evens the stacks.  */
 579           yynewstate:
 580           
 581             *++yyssp = yystate;
 582           
 583             if (yyssp >= yyss + yystacksize - 1)
 584               {
 585                 /* Give user a chance to reallocate the stack */
 586                 /* Use copies of these so that the &'s don't force the real ones into memory. */
 587                 YYSTYPE *yyvs1 = yyvs;
 588                 short *yyss1 = yyss;
 589           #ifdef YYLSP_NEEDED
 590                 YYLTYPE *yyls1 = yyls;
 591           #endif
 592           
 593                 /* Get the current used size of the three stacks, in elements.  */
 594                 int size = yyssp - yyss + 1;
 595           
 596           #ifdef yyoverflow
 597                 /* Each stack pointer address is followed by the size of
 598 mike  1.2 	 the data in use in that stack, in bytes.  */
 599           #ifdef YYLSP_NEEDED
 600                 /* This used to be a conditional around just the two extra args,
 601           	 but that might be undefined if yyoverflow is a macro.  */
 602                 yyoverflow("parser stack overflow",
 603           		 &yyss1, size * sizeof (*yyssp),
 604           		 &yyvs1, size * sizeof (*yyvsp),
 605           		 &yyls1, size * sizeof (*yylsp),
 606           		 &yystacksize);
 607           #else
 608                 yyoverflow("parser stack overflow",
 609           		 &yyss1, size * sizeof (*yyssp),
 610           		 &yyvs1, size * sizeof (*yyvsp),
 611           		 &yystacksize);
 612           #endif
 613           
 614                 yyss = yyss1; yyvs = yyvs1;
 615           #ifdef YYLSP_NEEDED
 616                 yyls = yyls1;
 617           #endif
 618           #else /* no yyoverflow */
 619 mike  1.2       /* Extend the stack our own way.  */
 620                 if (yystacksize >= YYMAXDEPTH)
 621           	{
 622           	  yyerror("parser stack overflow");
 623           	  if (yyfree_stacks)
 624           	    {
 625           	      free (yyss);
 626           	      free (yyvs);
 627           #ifdef YYLSP_NEEDED
 628           	      free (yyls);
 629           #endif
 630           	    }
 631           	  return 2;
 632           	}
 633                 yystacksize *= 2;
 634                 if (yystacksize > YYMAXDEPTH)
 635           	yystacksize = YYMAXDEPTH;
 636           #ifndef YYSTACK_USE_ALLOCA
 637                 yyfree_stacks = 1;
 638           #endif
 639                 yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
 640 mike  1.2       __yy_memcpy ((char *)yyss, (char *)yyss1,
 641           		   size * (unsigned int) sizeof (*yyssp));
 642                 yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
 643                 __yy_memcpy ((char *)yyvs, (char *)yyvs1,
 644           		   size * (unsigned int) sizeof (*yyvsp));
 645           #ifdef YYLSP_NEEDED
 646                 yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
 647                 __yy_memcpy ((char *)yyls, (char *)yyls1,
 648           		   size * (unsigned int) sizeof (*yylsp));
 649           #endif
 650           #endif /* no yyoverflow */
 651           
 652                 yyssp = yyss + size - 1;
 653                 yyvsp = yyvs + size - 1;
 654           #ifdef YYLSP_NEEDED
 655                 yylsp = yyls + size - 1;
 656           #endif
 657           
 658           #if YYDEBUG != 0
 659                 if (yydebug)
 660           	fprintf(stderr, "Stack size increased to %d\n", yystacksize);
 661 mike  1.2 #endif
 662           
 663                 if (yyssp >= yyss + yystacksize - 1)
 664           	YYABORT;
 665               }
 666           
 667           #if YYDEBUG != 0
 668             if (yydebug)
 669               fprintf(stderr, "Entering state %d\n", yystate);
 670           #endif
 671           
 672             goto yybackup;
 673            yybackup:
 674           
 675           /* Do appropriate processing given the current state.  */
 676           /* Read a lookahead token if we need one and don't already have one.  */
 677           /* yyresume: */
 678           
 679             /* First try to decide what to do without reference to lookahead token.  */
 680           
 681             yyn = yypact[yystate];
 682 mike  1.2   if (yyn == YYFLAG)
 683               goto yydefault;
 684           
 685             /* Not known => get a lookahead token if don't already have one.  */
 686           
 687             /* yychar is either YYEMPTY or YYEOF
 688                or a valid token in external form.  */
 689           
 690             if (yychar == YYEMPTY)
 691               {
 692           #if YYDEBUG != 0
 693                 if (yydebug)
 694           	fprintf(stderr, "Reading a token: ");
 695           #endif
 696                 yychar = YYLEX;
 697               }
 698           
 699             /* Convert token to internal form (in yychar1) for indexing tables with */
 700           
 701             if (yychar <= 0)		/* This means end of input. */
 702               {
 703 mike  1.2       yychar1 = 0;
 704                 yychar = YYEOF;		/* Don't call YYLEX any more */
 705           
 706           #if YYDEBUG != 0
 707                 if (yydebug)
 708           	fprintf(stderr, "Now at end of input.\n");
 709           #endif
 710               }
 711             else
 712               {
 713                 yychar1 = YYTRANSLATE(yychar);
 714           
 715           #if YYDEBUG != 0
 716                 if (yydebug)
 717           	{
 718           	  fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
 719           	  /* Give the individual parser a way to print the precise meaning
 720           	     of a token, for further debugging info.  */
 721           #ifdef YYPRINT
 722           	  YYPRINT (stderr, yychar, yylval);
 723           #endif
 724 mike  1.2 	  fprintf (stderr, ")\n");
 725           	}
 726           #endif
 727               }
 728           
 729             yyn += yychar1;
 730             if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
 731               goto yydefault;
 732           
 733             yyn = yytable[yyn];
 734           
 735             /* yyn is what to do for this token type in this state.
 736                Negative => reduce, -yyn is rule number.
 737                Positive => shift, yyn is new state.
 738                  New state is final state => don't bother to shift,
 739                  just return success.
 740                0, or most negative number => error.  */
 741           
 742             if (yyn < 0)
 743               {
 744                 if (yyn == YYFLAG)
 745 mike  1.2 	goto yyerrlab;
 746                 yyn = -yyn;
 747                 goto yyreduce;
 748               }
 749             else if (yyn == 0)
 750               goto yyerrlab;
 751           
 752             if (yyn == YYFINAL)
 753               YYACCEPT;
 754           
 755             /* Shift the lookahead token.  */
 756           
 757           #if YYDEBUG != 0
 758             if (yydebug)
 759               fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
 760           #endif
 761           
 762             /* Discard the token being shifted unless it is eof.  */
 763             if (yychar != YYEOF)
 764               yychar = YYEMPTY;
 765           
 766 mike  1.2   *++yyvsp = yylval;
 767           #ifdef YYLSP_NEEDED
 768             *++yylsp = yylloc;
 769           #endif
 770           
 771             /* count tokens shifted since error; after three, turn off error status.  */
 772             if (yyerrstatus) yyerrstatus--;
 773           
 774             yystate = yyn;
 775             goto yynewstate;
 776           
 777           /* Do the default action for the current state.  */
 778           yydefault:
 779           
 780             yyn = yydefact[yystate];
 781             if (yyn == 0)
 782               goto yyerrlab;
 783           
 784           /* Do a reduction.  yyn is the number of a rule to reduce with.  */
 785           yyreduce:
 786             yylen = yyr2[yyn];
 787 mike  1.2   if (yylen > 0)
 788               yyval = yyvsp[1-yylen]; /* implement default value of the action */
 789           
 790           #if YYDEBUG != 0
 791             if (yydebug)
 792               {
 793                 int i;
 794           
 795                 fprintf (stderr, "Reducing via rule %d (line %d), ",
 796           	       yyn, yyrline[yyn]);
 797           
 798                 /* Print the symbols being reduced, and their result.  */
 799                 for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
 800           	fprintf (stderr, "%s ", yytname[yyrhs[i]]);
 801                 fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
 802               }
 803           #endif
 804           
 805           
 806             switch (yyn) {
 807           
 808 mike  1.2 case 1:
 809 kumpf 1.3 #line 131 "WQL.y"
 810 mike  1.2 {
 811           	WQL_TRACE(("YACC: start\n"));
 812               ;
 813               break;}
 814           case 2:
 815 kumpf 1.3 #line 137 "WQL.y"
 816 mike  1.2 {
 817           
 818               ;
 819               break;}
 820           case 3:
 821 kumpf 1.3 #line 143 "WQL.y"
 822 mike  1.2 {
 823 kumpf 1.4 	globalParserState->statement->setAllProperties(true);
 824 mike  1.2     ;
 825               break;}
 826           case 4:
 827 kumpf 1.3 #line 147 "WQL.y"
 828 mike  1.2 {
 829           
 830               ;
 831               break;}
 832           case 5:
 833 kumpf 1.3 #line 153 "WQL.y"
 834 mike  1.2 {
 835 kumpf 1.4 	globalParserState->statement->appendSelectPropertyName(CIMName(yyvsp[0].strValue));
 836 mike  1.2     ;
 837               break;}
 838           case 6:
 839 kumpf 1.3 #line 157 "WQL.y"
 840 mike  1.2 {
 841 kumpf 1.4 	globalParserState->statement->appendSelectPropertyName(CIMName(yyvsp[0].strValue));
 842 mike  1.2     ;
 843               break;}
 844           case 7:
 845 kumpf 1.3 #line 163 "WQL.y"
 846 mike  1.2 {
 847           
 848               ;
 849               break;}
 850           case 8:
 851 kumpf 1.3 #line 167 "WQL.y"
 852 mike  1.2 {
 853           
 854               ;
 855               break;}
 856           case 9:
 857 kumpf 1.3 #line 173 "WQL.y"
 858 mike  1.2 {
 859           	WQL_TRACE(("YACC: fromClause: TOK_FROM className(%s)\n", yyvsp[0].strValue));
 860 kumpf 1.4 	globalParserState->statement->setClassName(CIMName(yyvsp[0].strValue));
 861 mike  1.2     ;
 862               break;}
 863           case 10:
 864 kumpf 1.3 #line 180 "WQL.y"
 865 mike  1.2 {
 866           
 867               ;
 868               break;}
 869           case 11:
 870 kumpf 1.3 #line 186 "WQL.y"
 871 mike  1.2 {
 872           	WQL_TRACE(("YACC: TOK_OR\n"));
 873           	globalParserState->statement->appendOperation(WQL_OR);
 874               ;
 875               break;}
 876           case 12:
 877 kumpf 1.3 #line 191 "WQL.y"
 878 mike  1.2 {
 879           	WQL_TRACE(("YACC: TOK_AND\n"));
 880           	globalParserState->statement->appendOperation(WQL_AND);
 881               ;
 882               break;}
 883           case 13:
 884 kumpf 1.3 #line 196 "WQL.y"
 885 mike  1.2 {
 886           	WQL_TRACE(("YACC: TOK_NOT\n"));
 887           
 888           	globalParserState->statement->appendOperation(WQL_NOT);
 889               ;
 890               break;}
 891           case 14:
 892 kumpf 1.3 #line 202 "WQL.y"
 893 mike  1.2 {
 894           
 895               ;
 896               break;}
 897           case 15:
 898 kumpf 1.3 #line 206 "WQL.y"
 899 mike  1.2 {
 900           
 901               ;
 902               break;}
 903           case 16:
 904 kumpf 1.3 #line 210 "WQL.y"
 905 mike  1.2 {
 906           	WQLOperation op = yyvsp[0].intValue ? WQL_IS_TRUE : WQL_IS_FALSE;
 907           	globalParserState->statement->appendOperation(op);
 908               ;
 909               break;}
 910           case 17:
 911 kumpf 1.3 #line 215 "WQL.y"
 912 mike  1.2 {
 913           	WQLOperation op = yyvsp[0].intValue ? WQL_IS_NOT_TRUE : WQL_IS_NOT_FALSE;
 914           	globalParserState->statement->appendOperation(op);
 915               ;
 916               break;}
 917           case 18:
 918 kumpf 1.3 #line 224 "WQL.y"
 919 mike  1.2 {
 920           
 921               ;
 922               break;}
 923           case 19:
 924 kumpf 1.3 #line 228 "WQL.y"
 925 mike  1.2 {
 926           
 927               ;
 928               break;}
 929           case 20:
 930 kumpf 1.3 #line 234 "WQL.y"
 931 mike  1.2 {
 932           	WQL_TRACE(("YACC: TOK_LT\n"));
 933           	globalParserState->statement->appendOperation(WQL_LT);
 934               ;
 935               break;}
 936           case 21:
 937 kumpf 1.3 #line 239 "WQL.y"
 938 mike  1.2 {
 939           	WQL_TRACE(("YACC: TOK_GT\n"));
 940           	globalParserState->statement->appendOperation(WQL_GT);
 941               ;
 942               break;}
 943           case 22:
 944 kumpf 1.3 #line 244 "WQL.y"
 945 mike  1.2 {
 946           	WQL_TRACE(("YACC: TOK_LE\n"));
 947           	globalParserState->statement->appendOperation(WQL_LE);
 948               ;
 949               break;}
 950           case 23:
 951 kumpf 1.3 #line 249 "WQL.y"
 952 mike  1.2 {
 953           	WQL_TRACE(("YACC: TOK_GE\n"));
 954           	globalParserState->statement->appendOperation(WQL_GE);
 955               ;
 956               break;}
 957           case 24:
 958 kumpf 1.3 #line 254 "WQL.y"
 959 mike  1.2 {
 960           	WQL_TRACE(("YACC: TOK_EQ\n"));
 961           	globalParserState->statement->appendOperation(WQL_EQ);
 962               ;
 963               break;}
 964           case 25:
 965 kumpf 1.3 #line 259 "WQL.y"
 966 mike  1.2 {
 967           	WQL_TRACE(("YACC: TOK_NE\n"));
 968           	globalParserState->statement->appendOperation(WQL_NE);
 969               ;
 970               break;}
 971           case 26:
 972 kumpf 1.3 #line 266 "WQL.y"
 973 mike  1.2 {
 974           	WQL_TRACE(("YACC: nullPredicate : comparisonTerm IS NULL\n"));
 975           	globalParserState->statement->appendOperation(WQL_IS_NULL);
 976               ;
 977               break;}
 978           case 27:
 979 kumpf 1.3 #line 271 "WQL.y"
 980 mike  1.2 {
 981           	WQL_TRACE(("YACC: nullPredicate : comparisonTerm IS NOT NULL\n"));
 982           	globalParserState->statement->appendOperation(WQL_IS_NOT_NULL);
 983               ;
 984               break;}
 985           case 28:
 986 kumpf 1.3 #line 278 "WQL.y"
 987 mike  1.2 {
 988           	yyval.intValue = 1;
 989               ;
 990               break;}
 991           case 29:
 992 kumpf 1.3 #line 282 "WQL.y"
 993 mike  1.2 {
 994           	yyval.intValue = 0;
 995               ;
 996               break;}
 997           case 30:
 998 kumpf 1.3 #line 288 "WQL.y"
 999 mike  1.2 {
1000           	WQL_TRACE(("YACC: propertyName : TOK_IDENTIFIER(%s)\n", yyvsp[0].strValue));
1001           	yyval.strValue = yyvsp[0].strValue;
1002               ;
1003               break;}
1004           case 31:
1005 kumpf 1.3 #line 294 "WQL.y"
1006 mike  1.2 {
1007           	WQL_TRACE(("YACC: TOK_IDENTIFIER %s\n", yyvsp[0].strValue));
1008           	yyval.strValue = yyvsp[0].strValue;
1009               ;
1010               break;}
1011           case 32:
1012 kumpf 1.3 #line 301 "WQL.y"
1013 mike  1.2 {
1014           	globalParserState->statement->appendOperand(
1015           	    WQLOperand(yyvsp[0].strValue, WQL_PROPERTY_NAME_TAG));
1016 kumpf 1.4 	globalParserState->statement->appendWherePropertyName(CIMName(yyvsp[0].strValue));
1017 mike  1.2     ;
1018               break;}
1019           case 33:
1020 kumpf 1.3 #line 307 "WQL.y"
1021 mike  1.2 {
1022           	globalParserState->statement->appendOperand(
1023           	    WQLOperand(yyvsp[0].intValue, WQL_INTEGER_VALUE_TAG));
1024               ;
1025               break;}
1026           case 34:
1027 kumpf 1.3 #line 312 "WQL.y"
1028 mike  1.2 {
1029           	globalParserState->statement->appendOperand(
1030           	    WQLOperand(yyvsp[0].doubleValue, WQL_DOUBLE_VALUE_TAG));
1031               ;
1032               break;}
1033           case 35:
1034 kumpf 1.3 #line 317 "WQL.y"
1035 mike  1.2 {
1036           	globalParserState->statement->appendOperand(
1037           	    WQLOperand(yyvsp[0].strValue, WQL_STRING_VALUE_TAG));
1038               ;
1039               break;}
1040           case 36:
1041 kumpf 1.3 #line 322 "WQL.y"
1042 mike  1.2 {
1043           	globalParserState->statement->appendOperand(
1044           	    WQLOperand(yyvsp[0].intValue != 0, WQL_BOOLEAN_VALUE_TAG));
1045               ;
1046               break;}
1047           }
1048              /* the action file gets copied in in place of this dollarsign */
1049           #line 543 "bison.simple"
1050           
1051             yyvsp -= yylen;
1052             yyssp -= yylen;
1053           #ifdef YYLSP_NEEDED
1054             yylsp -= yylen;
1055           #endif
1056           
1057           #if YYDEBUG != 0
1058             if (yydebug)
1059               {
1060                 short *ssp1 = yyss - 1;
1061                 fprintf (stderr, "state stack now");
1062                 while (ssp1 != yyssp)
1063 mike  1.2 	fprintf (stderr, " %d", *++ssp1);
1064                 fprintf (stderr, "\n");
1065               }
1066           #endif
1067           
1068             *++yyvsp = yyval;
1069           
1070           #ifdef YYLSP_NEEDED
1071             yylsp++;
1072             if (yylen == 0)
1073               {
1074                 yylsp->first_line = yylloc.first_line;
1075                 yylsp->first_column = yylloc.first_column;
1076                 yylsp->last_line = (yylsp-1)->last_line;
1077                 yylsp->last_column = (yylsp-1)->last_column;
1078                 yylsp->text = 0;
1079               }
1080             else
1081               {
1082                 yylsp->last_line = (yylsp+yylen-1)->last_line;
1083                 yylsp->last_column = (yylsp+yylen-1)->last_column;
1084 mike  1.2     }
1085           #endif
1086           
1087             /* Now "shift" the result of the reduction.
1088                Determine what state that goes to,
1089                based on the state we popped back to
1090                and the rule number reduced by.  */
1091           
1092             yyn = yyr1[yyn];
1093           
1094             yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
1095             if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1096               yystate = yytable[yystate];
1097             else
1098               yystate = yydefgoto[yyn - YYNTBASE];
1099           
1100             goto yynewstate;
1101           
1102           yyerrlab:   /* here on detecting error */
1103           
1104             if (! yyerrstatus)
1105 mike  1.2     /* If not already recovering from an error, report this error.  */
1106               {
1107                 ++yynerrs;
1108           
1109           #ifdef YYERROR_VERBOSE
1110                 yyn = yypact[yystate];
1111           
1112                 if (yyn > YYFLAG && yyn < YYLAST)
1113           	{
1114           	  int size = 0;
1115           	  char *msg;
1116           	  int x, count;
1117           
1118           	  count = 0;
1119           	  /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
1120           	  for (x = (yyn < 0 ? -yyn : 0);
1121           	       x < (sizeof(yytname) / sizeof(char *)); x++)
1122           	    if (yycheck[x + yyn] == x)
1123           	      size += strlen(yytname[x]) + 15, count++;
1124           	  msg = (char *) malloc(size + 15);
1125           	  if (msg != 0)
1126 mike  1.2 	    {
1127           	      strcpy(msg, "parse error");
1128           
1129           	      if (count < 5)
1130           		{
1131           		  count = 0;
1132           		  for (x = (yyn < 0 ? -yyn : 0);
1133           		       x < (sizeof(yytname) / sizeof(char *)); x++)
1134           		    if (yycheck[x + yyn] == x)
1135           		      {
1136           			strcat(msg, count == 0 ? ", expecting `" : " or `");
1137           			strcat(msg, yytname[x]);
1138           			strcat(msg, "'");
1139           			count++;
1140           		      }
1141           		}
1142           	      yyerror(msg);
1143           	      free(msg);
1144           	    }
1145           	  else
1146           	    yyerror ("parse error; also virtual memory exceeded");
1147 mike  1.2 	}
1148                 else
1149           #endif /* YYERROR_VERBOSE */
1150           	yyerror("parse error");
1151               }
1152           
1153             goto yyerrlab1;
1154           yyerrlab1:   /* here on error raised explicitly by an action */
1155           
1156             if (yyerrstatus == 3)
1157               {
1158                 /* if just tried and failed to reuse lookahead token after an error, discard it.  */
1159           
1160                 /* return failure if at end of input */
1161                 if (yychar == YYEOF)
1162           	YYABORT;
1163           
1164           #if YYDEBUG != 0
1165                 if (yydebug)
1166           	fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
1167           #endif
1168 mike  1.2 
1169                 yychar = YYEMPTY;
1170               }
1171           
1172             /* Else will try to reuse lookahead token
1173                after shifting the error token.  */
1174           
1175             yyerrstatus = 3;		/* Each real token shifted decrements this */
1176           
1177             goto yyerrhandle;
1178           
1179           yyerrdefault:  /* current state does not do anything special for the error token. */
1180           
1181           #if 0
1182             /* This is wrong; only states that explicitly want error tokens
1183                should shift them.  */
1184             yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
1185             if (yyn) goto yydefault;
1186           #endif
1187           
1188           yyerrpop:   /* pop the current state because it cannot handle the error token */
1189 mike  1.2 
1190             if (yyssp == yyss) YYABORT;
1191             yyvsp--;
1192             yystate = *--yyssp;
1193           #ifdef YYLSP_NEEDED
1194             yylsp--;
1195           #endif
1196           
1197           #if YYDEBUG != 0
1198             if (yydebug)
1199               {
1200                 short *ssp1 = yyss - 1;
1201                 fprintf (stderr, "Error: state stack now");
1202                 while (ssp1 != yyssp)
1203           	fprintf (stderr, " %d", *++ssp1);
1204                 fprintf (stderr, "\n");
1205               }
1206           #endif
1207           
1208           yyerrhandle:
1209           
1210 mike  1.2   yyn = yypact[yystate];
1211             if (yyn == YYFLAG)
1212               goto yyerrdefault;
1213           
1214             yyn += YYTERROR;
1215             if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
1216               goto yyerrdefault;
1217           
1218             yyn = yytable[yyn];
1219             if (yyn < 0)
1220               {
1221                 if (yyn == YYFLAG)
1222           	goto yyerrpop;
1223                 yyn = -yyn;
1224                 goto yyreduce;
1225               }
1226             else if (yyn == 0)
1227               goto yyerrpop;
1228           
1229             if (yyn == YYFINAL)
1230               YYACCEPT;
1231 mike  1.2 
1232           #if YYDEBUG != 0
1233             if (yydebug)
1234               fprintf(stderr, "Shifting error token, ");
1235           #endif
1236           
1237             *++yyvsp = yylval;
1238           #ifdef YYLSP_NEEDED
1239             *++yylsp = yylloc;
1240           #endif
1241           
1242             yystate = yyn;
1243             goto yynewstate;
1244           
1245            yyacceptlab:
1246             /* YYACCEPT comes here.  */
1247             if (yyfree_stacks)
1248               {
1249                 free (yyss);
1250                 free (yyvs);
1251           #ifdef YYLSP_NEEDED
1252 mike  1.2       free (yyls);
1253           #endif
1254               }
1255             return 0;
1256           
1257            yyabortlab:
1258             /* YYABORT comes here.  */
1259             if (yyfree_stacks)
1260               {
1261                 free (yyss);
1262                 free (yyvs);
1263           #ifdef YYLSP_NEEDED
1264                 free (yyls);
1265           #endif
1266               }
1267             return 1;
1268           }
1269 kumpf 1.3 #line 327 "WQL.y"
1270 mike  1.2 

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2