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