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