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