1 /* A Bison parser, made by GNU Bison 3.0. */
3 /* Bison implementation for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
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.
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.
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/>. */
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.
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
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. */
43 /* Identify Bison output. */
47 #define YYBISON_VERSION "3.0"
50 #define YYSKELETON_NAME "yacc.c"
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
70 /* Copy the first part of user declarations. */
71 #line 21 "xslpattern.y" /* yacc.c:339 */
74 #include "wine/port.h"
77 #include "xslpattern.h"
78 #include <libxml/xpathInternals.h>
79 #include "wine/debug.h"
81 WINE_DEFAULT_DEBUG_CHANNEL(msxml
);
84 static const xmlChar NameTest_mod_pre
[] = "*[name()='";
85 static const xmlChar NameTest_mod_post
[] = "']";
87 #define U(str) BAD_CAST str
89 static inline BOOL
is_literal(xmlChar
const* tok
)
91 return (tok
&& tok
[0] && tok
[1] &&
92 tok
[0]== tok
[xmlStrlen(tok
)-1] &&
93 (tok
[0] == '\'' || tok
[0] == '"'));
96 static void xslpattern_error(parser_param
* param
, void const* scanner
, char const* msg
)
109 msg
, param
->yyscanner
, param
->ctx
, param
->in
, param
->pos
,
110 param
->len
, param
->out
, ++param
->err
, scanner
);
114 #line 115 "xslpattern.tab.c" /* yacc.c:339 */
117 # if defined __cplusplus && 201103L <= __cplusplus
118 # define YY_NULL nullptr
124 /* Enabling verbose error messages. */
125 #ifdef YYERROR_VERBOSE
126 # undef YYERROR_VERBOSE
127 # define YYERROR_VERBOSE 1
129 # define YYERROR_VERBOSE 0
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
141 extern int xslpattern_debug
;
179 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
181 # define YYSTYPE_IS_TRIVIAL 1
182 # define YYSTYPE_IS_DECLARED 1
187 int xslpattern_parse (parser_param
* p
, void* scanner
);
189 #endif /* !YY_XSLPATTERN_E_REACTOSSYNC_GCC_DLL_WIN32_MSXML3_XSLPATTERN_TAB_H_INCLUDED */
191 /* Copy the second part of user declarations. */
193 #line 194 "xslpattern.tab.c" /* yacc.c:358 */
200 typedef YYTYPE_UINT8 yytype_uint8
;
202 typedef unsigned char yytype_uint8
;
206 typedef YYTYPE_INT8 yytype_int8
;
208 typedef signed char yytype_int8
;
212 typedef YYTYPE_UINT16 yytype_uint16
;
214 typedef unsigned short int yytype_uint16
;
218 typedef YYTYPE_INT16 yytype_int16
;
220 typedef short int yytype_int16
;
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
232 # define YYSIZE_T unsigned int
236 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
239 # if defined YYENABLE_NLS && YYENABLE_NLS
241 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
242 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
246 # define YY_(Msgid) Msgid
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 */
258 /* Suppress unused-variable warnings by "using" E. */
259 #if ! defined lint || defined __GNUC__
260 # define YYUSE(E) ((void) (E))
262 # define YYUSE(E) /* empty */
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")
274 # define YY_INITIAL_VALUE(Value) Value
276 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
277 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
278 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
280 #ifndef YY_INITIAL_VALUE
281 # define YY_INITIAL_VALUE(Value) /* Nothing. */
285 #if ! defined yyoverflow || YYERROR_VERBOSE
287 /* The parser invokes alloca or malloc; define the necessary symbols. */
289 # ifdef YYSTACK_USE_ALLOCA
290 # if YYSTACK_USE_ALLOCA
292 # define YYSTACK_ALLOC __builtin_alloca
293 # elif defined __BUILTIN_VA_ARG_INCR
294 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
296 # define YYSTACK_ALLOC __alloca
297 # elif defined _MSC_VER
298 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
299 # define alloca _alloca
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
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 */
324 # define YYSTACK_ALLOC YYMALLOC
325 # define YYSTACK_FREE YYFREE
326 # ifndef YYSTACK_ALLOC_MAXIMUM
327 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
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
338 # define YYMALLOC malloc
339 # if ! defined malloc && ! defined EXIT_SUCCESS
340 void *malloc (YYSIZE_T
); /* INFRINGES ON USER NAME SPACE */
345 # if ! defined free && ! defined EXIT_SUCCESS
346 void free (void *); /* INFRINGES ON USER NAME SPACE */
350 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
353 #if (! defined yyoverflow \
354 && (! defined __cplusplus \
355 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
357 /* A type that is properly aligned for any stack member. */
360 yytype_int16 yyss_alloc
;
364 /* The size of the maximum gap between one aligned stack and the next. */
365 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
367 /* The size of an array large to enough to hold all stacks, each with
369 # define YYSTACK_BYTES(N) \
370 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
371 + YYSTACK_GAP_MAXIMUM)
373 # define YYCOPY_NEEDED 1
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
380 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
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); \
393 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
394 /* Copy COUNT objects from SRC to DST. The source and destination do
397 # if defined __GNUC__ && 1 < __GNUC__
398 # define YYCOPY(Dst, Src, Count) \
399 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
401 # define YYCOPY(Dst, Src, Count) \
405 for (yyi = 0; yyi < (Count); yyi++) \
406 (Dst)[yyi] = (Src)[yyi]; \
411 #endif /* !YYCOPY_NEEDED */
413 /* YYFINAL -- State number of the termination state. */
415 /* YYLAST -- Last index in YYTABLE. */
418 /* YYNTOKENS -- Number of terminals. */
420 /* YYNNTS -- Number of nonterminals. */
422 /* YYNRULES -- Number of rules. */
424 /* YYNSTATES -- Number of states. */
425 #define YYNSTATES 157
427 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
428 by yylex, with out-of-bounds checking. */
430 #define YYMAXUTOK 283
432 #define YYTRANSLATE(YYX) \
433 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
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
[] =
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,
471 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
472 static const yytype_uint16 yyrline
[] =
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
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
[] =
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
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
[] =
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
524 #define YYPACT_NINF -34
526 #define yypact_value_is_default(Yystate) \
527 (!!((Yystate) == (-34)))
529 #define YYTABLE_NINF -67
531 #define yytable_value_is_error(Yytable_value) \
534 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
536 static const yytype_int16 yypact
[] =
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
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
[] =
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
579 /* YYPGOTO[NTERM-NUM]. */
580 static const yytype_int16 yypgoto
[] =
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
588 /* YYDEFGOTO[NTERM-NUM]. */
589 static const yytype_int8 yydefgoto
[] =
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
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
[] =
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
622 static const yytype_uint8 yycheck
[] =
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
644 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
645 symbol of state STATE-NUM. */
646 static const yytype_uint8 yystos
[] =
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
666 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
667 static const yytype_uint8 yyr1
[] =
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,
682 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
683 static const yytype_uint8 yyr2
[] =
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,
699 #define yyerrok (yyerrstatus = 0)
700 #define yyclearin (yychar = YYEMPTY)
704 #define YYACCEPT goto yyacceptlab
705 #define YYABORT goto yyabortlab
706 #define YYERROR goto yyerrorlab
709 #define YYRECOVERING() (!!yyerrstatus)
711 #define YYBACKUP(Token, Value) \
713 if (yychar == YYEMPTY) \
717 YYPOPSTACK (yylen); \
723 yyerror (p, scanner, YY_("syntax error: cannot back up")); \
728 /* Error token number */
730 #define YYERRCODE 256
734 /* Enable debugging if requested. */
738 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
739 # define YYFPRINTF fprintf
742 # define YYDPRINTF(Args) \
748 /* This macro is provided for backward compatibility. */
749 #ifndef YY_LOCATION_PRINT
750 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
754 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
758 YYFPRINTF (stderr, "%s ", Title); \
759 yy_symbol_print (stderr, \
760 Type, Value, p, scanner); \
761 YYFPRINTF (stderr, "\n"); \
766 /*----------------------------------------.
767 | Print this symbol's value on YYOUTPUT. |
768 `----------------------------------------*/
771 yy_symbol_value_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
, parser_param
* p
, void* scanner
)
773 FILE *yyo
= yyoutput
;
780 if (yytype
< YYNTOKENS
)
781 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
787 /*--------------------------------.
788 | Print this symbol on YYOUTPUT. |
789 `--------------------------------*/
792 yy_symbol_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
, parser_param
* p
, void* scanner
)
794 YYFPRINTF (yyoutput
, "%s %s (",
795 yytype
< YYNTOKENS
? "token" : "nterm", yytname
[yytype
]);
797 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
, p
, scanner
);
798 YYFPRINTF (yyoutput
, ")");
801 /*------------------------------------------------------------------.
802 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
804 `------------------------------------------------------------------*/
807 yy_stack_print (yytype_int16
*yybottom
, yytype_int16
*yytop
)
809 YYFPRINTF (stderr
, "Stack now");
810 for (; yybottom
<= yytop
; yybottom
++)
812 int yybot
= *yybottom
;
813 YYFPRINTF (stderr
, " %d", yybot
);
815 YYFPRINTF (stderr
, "\n");
818 # define YY_STACK_PRINT(Bottom, Top) \
821 yy_stack_print ((Bottom), (Top)); \
825 /*------------------------------------------------.
826 | Report that the YYRULE is going to be reduced. |
827 `------------------------------------------------*/
830 yy_reduce_print (yytype_int16
*yyssp
, YYSTYPE
*yyvsp
, int yyrule
, parser_param
* p
, void* scanner
)
832 unsigned long int yylno
= yyrline
[yyrule
];
833 int yynrhs
= yyr2
[yyrule
];
835 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %lu):\n",
837 /* The symbols being reduced. */
838 for (yyi
= 0; yyi
< yynrhs
; yyi
++)
840 YYFPRINTF (stderr
, " $%d = ", yyi
+ 1);
841 yy_symbol_print (stderr
,
842 yystos
[yyssp
[yyi
+ 1 - yynrhs
]],
843 &(yyvsp
[(yyi
+ 1) - (yynrhs
)])
845 YYFPRINTF (stderr
, "\n");
849 # define YY_REDUCE_PRINT(Rule) \
852 yy_reduce_print (yyssp, yyvsp, Rule, p, scanner); \
855 /* Nonzero means print parse trace. It is left uninitialized so that
856 multiple parsers can coexist. */
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 */
866 /* YYINITDEPTH -- initial size of the parser's stacks. */
868 # define YYINITDEPTH 200
871 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
872 if the built-in stack extension method is used).
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. */
879 # define YYMAXDEPTH 10000
886 # if defined __GLIBC__ && defined _STRING_H
887 # define yystrlen strlen
889 /* Return the length of YYSTR. */
891 yystrlen (const char *yystr
)
894 for (yylen
= 0; yystr
[yylen
]; yylen
++)
902 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
903 # define yystpcpy stpcpy
905 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
908 yystpcpy (char *yydest
, const char *yysrc
)
911 const char *yys
= yysrc
;
913 while ((*yyd
++ = *yys
++) != '\0')
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
930 yytnamerr (char *yyres
, const char *yystr
)
935 char const *yyp
= yystr
;
942 goto do_not_strip_quotes
;
946 goto do_not_strip_quotes
;
959 do_not_strip_quotes
: ;
963 return yystrlen (yystr
);
965 return yystpcpy (yyres
, yystr
) - yyres
;
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
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. */
978 yysyntax_error (YYSIZE_T
*yymsg_alloc
, char **yymsg
,
979 yytype_int16
*yyssp
, int yytoken
)
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
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.
1015 if (yytoken
!= YYEMPTY
)
1017 int yyn
= yypact
[*yyssp
];
1018 yyarg
[yycount
++] = yytname
[yytoken
];
1019 if (!yypact_value_is_default (yyn
))
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
;
1030 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
1031 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
1032 && !yytable_value_is_error (yytable
[yyx
+ yyn
]))
1034 if (yycount
== YYERROR_VERBOSE_ARGS_MAXIMUM
)
1040 yyarg
[yycount
++] = yytname
[yyx
];
1042 YYSIZE_T yysize1
= yysize
+ yytnamerr (YY_NULL
, yytname
[yyx
]);
1043 if (! (yysize
<= yysize1
1044 && yysize1
<= YYSTACK_ALLOC_MAXIMUM
))
1054 # define YYCASE_(N, S) \
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"));
1068 YYSIZE_T yysize1
= yysize
+ yystrlen (yyformat
);
1069 if (! (yysize
<= yysize1
&& yysize1
<= YYSTACK_ALLOC_MAXIMUM
))
1074 if (*yymsg_alloc
< yysize
)
1076 *yymsg_alloc
= 2 * yysize
;
1077 if (! (yysize
<= *yymsg_alloc
1078 && *yymsg_alloc
<= YYSTACK_ALLOC_MAXIMUM
))
1079 *yymsg_alloc
= YYSTACK_ALLOC_MAXIMUM
;
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. */
1089 while ((*yyp
= *yyformat
) != '\0')
1090 if (*yyp
== '%' && yyformat
[1] == 's' && yyi
< yycount
)
1092 yyp
+= yytnamerr (yyp
, yyarg
[yyi
++]);
1103 #endif /* YYERROR_VERBOSE */
1105 /*-----------------------------------------------.
1106 | Release the memory associated to this symbol. |
1107 `-----------------------------------------------*/
1110 yydestruct (const char *yymsg
, int yytype
, YYSTYPE
*yyvaluep
, parser_param
* p
, void* scanner
)
1117 YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
);
1119 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1121 YY_IGNORE_MAYBE_UNINITIALIZED_END
1132 yyparse (parser_param
* p
, void* scanner
)
1134 /* The lookahead symbol. */
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
);
1144 /* Number of syntax errors so far. */
1148 /* Number of tokens to shift before error messages enabled. */
1151 /* The stacks and their tools:
1152 'yyss': related to states.
1153 'yyvs': related to semantic values.
1155 Refer to the stacks through separate pointers, to allow yyoverflow
1156 to reallocate them elsewhere. */
1158 /* The state stack. */
1159 yytype_int16 yyssa
[YYINITDEPTH
];
1161 yytype_int16
*yyssp
;
1163 /* The semantic value stack. */
1164 YYSTYPE yyvsa
[YYINITDEPTH
];
1168 YYSIZE_T yystacksize
;
1172 /* Lookahead token as an internal (translated) token number. */
1174 /* The variables used to return semantic value and location from the
1179 /* Buffer for error messages, and its allocated size. */
1181 char *yymsg
= yymsgbuf
;
1182 YYSIZE_T yymsg_alloc
= sizeof yymsgbuf
;
1185 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1187 /* The number of symbols on the RHS of the reduced rule.
1188 Keep to zero when no symbol should be popped. */
1191 yyssp
= yyss
= yyssa
;
1192 yyvsp
= yyvs
= yyvsa
;
1193 yystacksize
= YYINITDEPTH
;
1195 YYDPRINTF ((stderr
, "Starting parse\n"));
1200 yychar
= YYEMPTY
; /* Cause a token to be read. */
1203 /*------------------------------------------------------------.
1204 | yynewstate -- Push a new state, which is found in yystate. |
1205 `------------------------------------------------------------*/
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. */
1214 if (yyss
+ yystacksize
- 1 <= yyssp
)
1216 /* Get the current used size of the three stacks, in elements. */
1217 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
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
1224 YYSTYPE
*yyvs1
= yyvs
;
1225 yytype_int16
*yyss1
= yyss
;
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
),
1239 #else /* no yyoverflow */
1240 # ifndef YYSTACK_RELOCATE
1241 goto yyexhaustedlab
;
1243 /* Extend the stack our own way. */
1244 if (YYMAXDEPTH
<= yystacksize
)
1245 goto yyexhaustedlab
;
1247 if (YYMAXDEPTH
< yystacksize
)
1248 yystacksize
= YYMAXDEPTH
;
1251 yytype_int16
*yyss1
= yyss
;
1252 union yyalloc
*yyptr
=
1253 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
1255 goto yyexhaustedlab
;
1256 YYSTACK_RELOCATE (yyss_alloc
, yyss
);
1257 YYSTACK_RELOCATE (yyvs_alloc
, yyvs
);
1258 # undef YYSTACK_RELOCATE
1260 YYSTACK_FREE (yyss1
);
1263 #endif /* no yyoverflow */
1265 yyssp
= yyss
+ yysize
- 1;
1266 yyvsp
= yyvs
+ yysize
- 1;
1268 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
1269 (unsigned long int) yystacksize
));
1271 if (yyss
+ yystacksize
- 1 <= yyssp
)
1275 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
1277 if (yystate
== YYFINAL
)
1287 /* Do appropriate processing given the current state. Read a
1288 lookahead token if we need one and don't already have one. */
1290 /* First try to decide what to do without reference to lookahead token. */
1291 yyn
= yypact
[yystate
];
1292 if (yypact_value_is_default (yyn
))
1295 /* Not known => get a lookahead token if don't already have one. */
1297 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1298 if (yychar
== YYEMPTY
)
1300 YYDPRINTF ((stderr
, "Reading a token: "));
1301 yychar
= yylex (&yylval
, scanner
);
1304 if (yychar
<= YYEOF
)
1306 yychar
= yytoken
= YYEOF
;
1307 YYDPRINTF ((stderr
, "Now at end of input.\n"));
1311 yytoken
= YYTRANSLATE (yychar
);
1312 YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
);
1315 /* If the proper action on seeing token YYTOKEN is to reduce or to
1316 detect an error, take that action. */
1318 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
1323 if (yytable_value_is_error (yyn
))
1329 /* Count tokens shifted since error; after three, turn off error
1334 /* Shift the lookahead token. */
1335 YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
);
1337 /* Discard the shifted token. */
1341 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1343 YY_IGNORE_MAYBE_UNINITIALIZED_END
1348 /*-----------------------------------------------------------.
1349 | yydefault -- do the default action for the current state. |
1350 `-----------------------------------------------------------*/
1352 yyn
= yydefact
[yystate
];
1358 /*-----------------------------.
1359 | yyreduce -- Do a reduction. |
1360 `-----------------------------*/
1362 /* yyn is the number of a rule to reduce with. */
1365 /* If YYLEN is nonzero, implement the default value of the action:
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
];
1376 YY_REDUCE_PRINT (yyn
);
1380 #line 87 "xslpattern.y" /* yacc.c:1646 */
1382 p
->out
= (yyvsp
[0]);
1384 #line 1385 "xslpattern.tab.c" /* yacc.c:1646 */
1388 #line 100 "xslpattern.y" /* yacc.c:1646 */
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]));
1396 #line 1397 "xslpattern.tab.c" /* yacc.c:1646 */
1400 #line 109 "xslpattern.y" /* yacc.c:1646 */
1402 TRACE("Got UnprefixedName: \"%s\"\n", (yyvsp
[0]));
1405 #line 1406 "xslpattern.tab.c" /* yacc.c:1646 */
1409 #line 123 "xslpattern.y" /* yacc.c:1646 */
1411 TRACE("Got AbsoluteLocationPath: \"/%s\"\n", (yyvsp
[0]));
1412 (yyval
)=xmlStrdup(U("/"));
1413 (yyval
)=xmlStrcat((yyval
),(yyvsp
[0]));
1414 xmlFree((yyvsp
[0]));
1416 #line 1417 "xslpattern.tab.c" /* yacc.c:1646 */
1420 #line 130 "xslpattern.y" /* yacc.c:1646 */
1422 TRACE("Got AbsoluteLocationPath: \"/\"\n");
1423 (yyval
)=xmlStrdup(U("/"));
1425 #line 1426 "xslpattern.tab.c" /* yacc.c:1646 */
1429 #line 138 "xslpattern.y" /* yacc.c:1646 */
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]));
1437 #line 1438 "xslpattern.tab.c" /* yacc.c:1646 */
1441 #line 149 "xslpattern.y" /* yacc.c:1646 */
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]));
1450 #line 1451 "xslpattern.tab.c" /* yacc.c:1646 */
1454 #line 158 "xslpattern.y" /* yacc.c:1646 */
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]));
1461 #line 1462 "xslpattern.tab.c" /* yacc.c:1646 */
1465 #line 165 "xslpattern.y" /* yacc.c:1646 */
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]));
1472 #line 1473 "xslpattern.tab.c" /* yacc.c:1646 */
1476 #line 176 "xslpattern.y" /* yacc.c:1646 */
1478 TRACE("Got AxisSpecifier: \"%s::\"\n", (yyvsp
[-1]));
1479 (yyval
)=(yyvsp
[-1]);
1480 (yyval
)=xmlStrcat((yyval
),U("::"));
1482 #line 1483 "xslpattern.tab.c" /* yacc.c:1646 */
1486 #line 183 "xslpattern.y" /* yacc.c:1646 */
1488 TRACE("Got Attribute: \"@%s\"\n", (yyvsp
[0]));
1489 (yyval
)=xmlStrdup(U("@"));
1490 (yyval
)=xmlStrcat((yyval
),(yyvsp
[0]));
1491 xmlFree((yyvsp
[0]));
1493 #line 1494 "xslpattern.tab.c" /* yacc.c:1646 */
1497 #line 190 "xslpattern.y" /* yacc.c:1646 */
1499 TRACE("Got All attributes pattern: \"@*\"\n");
1500 (yyval
)=xmlStrdup(U("@*"));
1502 #line 1503 "xslpattern.tab.c" /* yacc.c:1646 */
1506 #line 201 "xslpattern.y" /* yacc.c:1646 */
1508 TRACE("Got NameTest: \"*\"\n");
1509 (yyval
)=xmlStrdup(U("*"));
1511 #line 1512 "xslpattern.tab.c" /* yacc.c:1646 */
1515 #line 206 "xslpattern.y" /* yacc.c:1646 */
1517 TRACE("Got NameTest: \"%s:*\"\n", (yyvsp
[-2]));
1518 (yyval
)=(yyvsp
[-2]);
1519 (yyval
)=xmlStrcat((yyval
),U(":*"));
1521 #line 1522 "xslpattern.tab.c" /* yacc.c:1646 */
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]));
1530 if (registeredNsURI
)
1531 (yyval
)=xmlStrdup(U(""));
1533 (yyval
)=xmlStrdup(NameTest_mod_pre
);
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]));
1541 if (!registeredNsURI
)
1542 (yyval
)=xmlStrcat((yyval
),NameTest_mod_post
);
1544 #line 1545 "xslpattern.tab.c" /* yacc.c:1646 */
1548 #line 231 "xslpattern.y" /* yacc.c:1646 */
1550 (yyval
)=xmlStrdup(NameTest_mod_pre
);
1551 (yyval
)=xmlStrcat((yyval
),(yyvsp
[0]));
1552 xmlFree((yyvsp
[0]));
1553 (yyval
)=xmlStrcat((yyval
),NameTest_mod_post
);
1555 #line 1556 "xslpattern.tab.c" /* yacc.c:1646 */
1559 #line 239 "xslpattern.y" /* yacc.c:1646 */
1561 (yyval
)=(yyvsp
[-1]);
1562 (yyval
)=xmlStrcat((yyval
),(yyvsp
[0]));
1563 xmlFree((yyvsp
[0]));
1565 #line 1566 "xslpattern.tab.c" /* yacc.c:1646 */
1569 #line 247 "xslpattern.y" /* yacc.c:1646 */
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("]"));
1577 #line 1578 "xslpattern.tab.c" /* yacc.c:1646 */
1581 #line 256 "xslpattern.y" /* yacc.c:1646 */
1583 (yyval
)=xmlStrdup(U("index()="));
1584 (yyval
)=xmlStrcat((yyval
),(yyvsp
[0]));
1585 xmlFree((yyvsp
[0]));
1587 #line 1588 "xslpattern.tab.c" /* yacc.c:1646 */
1591 #line 267 "xslpattern.y" /* yacc.c:1646 */
1593 TRACE("Got AbbreviatedAbsoluteLocationPath: \"//%s\"\n", (yyvsp
[0]));
1594 (yyval
)=xmlStrdup(U("//"));
1595 (yyval
)=xmlStrcat((yyval
),(yyvsp
[0]));
1596 xmlFree((yyvsp
[0]));
1598 #line 1599 "xslpattern.tab.c" /* yacc.c:1646 */
1602 #line 275 "xslpattern.y" /* yacc.c:1646 */
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]));
1610 #line 1611 "xslpattern.tab.c" /* yacc.c:1646 */
1614 #line 284 "xslpattern.y" /* yacc.c:1646 */
1616 TRACE("Got AbbreviatedStep: \"..\"\n");
1617 (yyval
)=xmlStrdup(U(".."));
1619 #line 1620 "xslpattern.tab.c" /* yacc.c:1646 */
1623 #line 289 "xslpattern.y" /* yacc.c:1646 */
1625 TRACE("Got AbbreviatedStep: \".\"\n");
1626 (yyval
)=xmlStrdup(U("."));
1628 #line 1629 "xslpattern.tab.c" /* yacc.c:1646 */
1632 #line 307 "xslpattern.y" /* yacc.c:1646 */
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(")"));
1640 #line 1641 "xslpattern.tab.c" /* yacc.c:1646 */
1644 #line 315 "xslpattern.y" /* yacc.c:1646 */
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]));
1652 #line 1653 "xslpattern.tab.c" /* yacc.c:1646 */
1656 #line 327 "xslpattern.y" /* yacc.c:1646 */
1658 TRACE("Got FunctionCall: \"%s(%s)\"\n", (yyvsp
[-3]), (yyvsp
[-1]));
1659 if (xmlStrEqual((yyvsp
[-3]),U("ancestor")))
1661 (yyval
)=(yyvsp
[-3]);
1662 (yyval
)=xmlStrcat((yyval
),U("::"));
1663 (yyval
)=xmlStrcat((yyval
),(yyvsp
[-1]));
1664 xmlFree((yyvsp
[-1]));
1666 else if (xmlStrEqual((yyvsp
[-3]),U("attribute")))
1668 if (is_literal((yyvsp
[-1])))
1670 (yyval
)=xmlStrdup(U("@*[name()="));
1671 xmlFree((yyvsp
[-3]));
1672 (yyval
)=xmlStrcat((yyval
),(yyvsp
[-1]));
1673 xmlFree((yyvsp
[-1]));
1674 (yyval
)=xmlStrcat((yyval
),U("]"));
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')"));
1686 else if (xmlStrEqual((yyvsp
[-3]),U("element")))
1688 if (is_literal((yyvsp
[-1])))
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("]"));
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')"));
1708 (yyval
)=(yyvsp
[-3]);
1709 (yyval
)=xmlStrcat((yyval
),U("("));
1710 (yyval
)=xmlStrcat((yyval
),(yyvsp
[-1]));
1711 xmlFree((yyvsp
[-1]));
1712 (yyval
)=xmlStrcat((yyval
),U(")"));
1715 #line 1716 "xslpattern.tab.c" /* yacc.c:1646 */
1719 #line 386 "xslpattern.y" /* yacc.c:1646 */
1721 TRACE("Got FunctionCall: \"%s()\"\n", (yyvsp
[-2]));
1722 /* comment() & node() work the same in XPath */
1723 if (xmlStrEqual((yyvsp
[-2]),U("attribute")))
1725 (yyval
)=xmlStrdup(U("@*"));
1726 xmlFree((yyvsp
[-2]));
1728 else if (xmlStrEqual((yyvsp
[-2]),U("element")))
1730 (yyval
)=xmlStrdup(U("node()[nodeType()=1]"));
1731 xmlFree((yyvsp
[-2]));
1733 else if (xmlStrEqual((yyvsp
[-2]),U("pi")))
1735 (yyval
)=xmlStrdup(U("processing-instruction()"));
1736 xmlFree((yyvsp
[-2]));
1738 else if (xmlStrEqual((yyvsp
[-2]),U("textnode")))
1740 (yyval
)=xmlStrdup(U("text()"));
1741 xmlFree((yyvsp
[-2]));
1745 (yyval
)=(yyvsp
[-2]);
1746 (yyval
)=xmlStrcat((yyval
),U("()"));
1749 #line 1750 "xslpattern.tab.c" /* yacc.c:1646 */
1753 #line 417 "xslpattern.y" /* yacc.c:1646 */
1755 (yyval
)=(yyvsp
[-2]);
1756 (yyval
)=xmlStrcat((yyval
),U(","));
1757 (yyval
)=xmlStrcat((yyval
),(yyvsp
[0]));
1758 xmlFree((yyvsp
[0]));
1760 #line 1761 "xslpattern.tab.c" /* yacc.c:1646 */
1764 #line 430 "xslpattern.y" /* yacc.c:1646 */
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]));
1772 #line 1773 "xslpattern.tab.c" /* yacc.c:1646 */
1776 #line 440 "xslpattern.y" /* yacc.c:1646 */
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]));
1784 #line 1785 "xslpattern.tab.c" /* yacc.c:1646 */
1788 #line 448 "xslpattern.y" /* yacc.c:1646 */
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]));
1796 #line 1797 "xslpattern.tab.c" /* yacc.c:1646 */
1800 #line 459 "xslpattern.y" /* yacc.c:1646 */
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]));
1807 #line 1808 "xslpattern.tab.c" /* yacc.c:1646 */
1811 #line 471 "xslpattern.y" /* yacc.c:1646 */
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]));
1819 #line 1820 "xslpattern.tab.c" /* yacc.c:1646 */
1823 #line 483 "xslpattern.y" /* yacc.c:1646 */
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]));
1831 #line 1832 "xslpattern.tab.c" /* yacc.c:1646 */
1835 #line 495 "xslpattern.y" /* yacc.c:1646 */
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]));
1843 #line 1844 "xslpattern.tab.c" /* yacc.c:1646 */
1847 #line 503 "xslpattern.y" /* yacc.c:1646 */
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(")"));
1858 #line 1859 "xslpattern.tab.c" /* yacc.c:1646 */
1862 #line 514 "xslpattern.y" /* yacc.c:1646 */
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]));
1870 #line 1871 "xslpattern.tab.c" /* yacc.c:1646 */
1874 #line 522 "xslpattern.y" /* yacc.c:1646 */
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(")"));
1885 #line 1886 "xslpattern.tab.c" /* yacc.c:1646 */
1889 #line 537 "xslpattern.y" /* yacc.c:1646 */
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]));
1897 #line 1898 "xslpattern.tab.c" /* yacc.c:1646 */
1901 #line 545 "xslpattern.y" /* yacc.c:1646 */
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(")"));
1912 #line 1913 "xslpattern.tab.c" /* yacc.c:1646 */
1916 #line 556 "xslpattern.y" /* yacc.c:1646 */
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]));
1924 #line 1925 "xslpattern.tab.c" /* yacc.c:1646 */
1928 #line 564 "xslpattern.y" /* yacc.c:1646 */
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(")"));
1939 #line 1940 "xslpattern.tab.c" /* yacc.c:1646 */
1943 #line 575 "xslpattern.y" /* yacc.c:1646 */
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]));
1951 #line 1952 "xslpattern.tab.c" /* yacc.c:1646 */
1955 #line 583 "xslpattern.y" /* yacc.c:1646 */
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(")"));
1966 #line 1967 "xslpattern.tab.c" /* yacc.c:1646 */
1970 #line 594 "xslpattern.y" /* yacc.c:1646 */
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]));
1978 #line 1979 "xslpattern.tab.c" /* yacc.c:1646 */
1982 #line 602 "xslpattern.y" /* yacc.c:1646 */
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(")"));
1993 #line 1994 "xslpattern.tab.c" /* yacc.c:1646 */
1997 #line 619 "xslpattern.y" /* yacc.c:1646 */
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(")"));
2005 #line 2006 "xslpattern.tab.c" /* yacc.c:1646 */
2009 #line 627 "xslpattern.y" /* yacc.c:1646 */
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(")"));
2017 #line 2018 "xslpattern.tab.c" /* yacc.c:1646 */
2021 #line 635 "xslpattern.y" /* yacc.c:1646 */
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(")"));
2029 #line 2030 "xslpattern.tab.c" /* yacc.c:1646 */
2033 #line 643 "xslpattern.y" /* yacc.c:1646 */
2035 FIXME("Unrecognized $all$ expression - ignoring\n");
2036 (yyval
)=xmlStrdup(U(""));
2038 #line 2039 "xslpattern.tab.c" /* yacc.c:1646 */
2042 #line 649 "xslpattern.y" /* yacc.c:1646 */
2044 (yyval
)=(yyvsp
[-2]);
2045 (yyval
)=xmlStrcat((yyval
),U("!="));
2046 (yyval
)=xmlStrcat((yyval
),(yyvsp
[0]));
2047 xmlFree((yyvsp
[0]));
2049 #line 2050 "xslpattern.tab.c" /* yacc.c:1646 */
2053 #line 656 "xslpattern.y" /* yacc.c:1646 */
2055 (yyval
)=(yyvsp
[-2]);
2056 (yyval
)=xmlStrcat((yyval
),U("="));
2057 (yyval
)=xmlStrcat((yyval
),(yyvsp
[0]));
2058 xmlFree((yyvsp
[0]));
2060 #line 2061 "xslpattern.tab.c" /* yacc.c:1646 */
2064 #line 663 "xslpattern.y" /* yacc.c:1646 */
2066 (yyval
)=(yyvsp
[-2]);
2067 (yyval
)=xmlStrcat((yyval
),U(">="));
2068 (yyval
)=xmlStrcat((yyval
),(yyvsp
[0]));
2069 xmlFree((yyvsp
[0]));
2071 #line 2072 "xslpattern.tab.c" /* yacc.c:1646 */
2075 #line 670 "xslpattern.y" /* yacc.c:1646 */
2077 (yyval
)=(yyvsp
[-2]);
2078 (yyval
)=xmlStrcat((yyval
),U(">"));
2079 (yyval
)=xmlStrcat((yyval
),(yyvsp
[0]));
2080 xmlFree((yyvsp
[0]));
2082 #line 2083 "xslpattern.tab.c" /* yacc.c:1646 */
2086 #line 677 "xslpattern.y" /* yacc.c:1646 */
2088 (yyval
)=(yyvsp
[-2]);
2089 (yyval
)=xmlStrcat((yyval
),U("<="));
2090 (yyval
)=xmlStrcat((yyval
),(yyvsp
[0]));
2091 xmlFree((yyvsp
[0]));
2093 #line 2094 "xslpattern.tab.c" /* yacc.c:1646 */
2097 #line 684 "xslpattern.y" /* yacc.c:1646 */
2099 (yyval
)=(yyvsp
[-2]);
2100 (yyval
)=xmlStrcat((yyval
),U("<"));
2101 (yyval
)=xmlStrcat((yyval
),(yyvsp
[0]));
2102 xmlFree((yyvsp
[0]));
2104 #line 2105 "xslpattern.tab.c" /* yacc.c:1646 */
2108 #line 691 "xslpattern.y" /* yacc.c:1646 */
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(")"));
2118 #line 2119 "xslpattern.tab.c" /* yacc.c:1646 */
2122 #line 701 "xslpattern.y" /* yacc.c:1646 */
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(")"));
2132 #line 2133 "xslpattern.tab.c" /* yacc.c:1646 */
2136 #line 711 "xslpattern.y" /* yacc.c:1646 */
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(")"));
2146 #line 2147 "xslpattern.tab.c" /* yacc.c:1646 */
2150 #line 721 "xslpattern.y" /* yacc.c:1646 */
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(")"));
2160 #line 2161 "xslpattern.tab.c" /* yacc.c:1646 */
2164 #line 731 "xslpattern.y" /* yacc.c:1646 */
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(")"));
2174 #line 2175 "xslpattern.tab.c" /* yacc.c:1646 */
2178 #line 741 "xslpattern.y" /* yacc.c:1646 */
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(")"));
2188 #line 2189 "xslpattern.tab.c" /* yacc.c:1646 */
2192 #line 2193 "xslpattern.tab.c" /* yacc.c:1646 */
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
);
2210 YY_STACK_PRINT (yyss
, yyssp
);
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. */
2220 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
2221 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
2222 yystate
= yytable
[yystate
];
2224 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
2229 /*--------------------------------------.
2230 | yyerrlab -- here on detecting error. |
2231 `--------------------------------------*/
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
);
2237 /* If not already recovering from an error, report this error. */
2241 #if ! YYERROR_VERBOSE
2242 yyerror (p
, scanner
, YY_("syntax error"));
2244 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2247 char const *yymsgp
= YY_("syntax error");
2248 int yysyntax_error_status
;
2249 yysyntax_error_status
= YYSYNTAX_ERROR
;
2250 if (yysyntax_error_status
== 0)
2252 else if (yysyntax_error_status
== 1)
2254 if (yymsg
!= yymsgbuf
)
2255 YYSTACK_FREE (yymsg
);
2256 yymsg
= (char *) YYSTACK_ALLOC (yymsg_alloc
);
2260 yymsg_alloc
= sizeof yymsgbuf
;
2261 yysyntax_error_status
= 2;
2265 yysyntax_error_status
= YYSYNTAX_ERROR
;
2269 yyerror (p
, scanner
, yymsgp
);
2270 if (yysyntax_error_status
== 2)
2271 goto yyexhaustedlab
;
2273 # undef YYSYNTAX_ERROR
2279 if (yyerrstatus
== 3)
2281 /* If just tried and failed to reuse lookahead token after an
2282 error, discard it. */
2284 if (yychar
<= YYEOF
)
2286 /* Return failure if at end of input. */
2287 if (yychar
== YYEOF
)
2292 yydestruct ("Error: discarding",
2293 yytoken
, &yylval
, p
, scanner
);
2298 /* Else will try to reuse lookahead token after shifting the error
2303 /*---------------------------------------------------.
2304 | yyerrorlab -- error raised explicitly by YYERROR. |
2305 `---------------------------------------------------*/
2308 /* Pacify compilers like GCC when the user code never invokes
2309 YYERROR and the label yyerrorlab therefore never appears in user
2311 if (/*CONSTCOND*/ 0)
2314 /* Do not reclaim the symbols of the rule whose action triggered
2318 YY_STACK_PRINT (yyss
, yyssp
);
2323 /*-------------------------------------------------------------.
2324 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2325 `-------------------------------------------------------------*/
2327 yyerrstatus
= 3; /* Each real token shifted decrements this. */
2331 yyn
= yypact
[yystate
];
2332 if (!yypact_value_is_default (yyn
))
2335 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
2343 /* Pop the current state because it cannot handle the error token. */
2348 yydestruct ("Error: popping",
2349 yystos
[yystate
], yyvsp
, p
, scanner
);
2352 YY_STACK_PRINT (yyss
, yyssp
);
2355 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2357 YY_IGNORE_MAYBE_UNINITIALIZED_END
2360 /* Shift the error token. */
2361 YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
);
2367 /*-------------------------------------.
2368 | yyacceptlab -- YYACCEPT comes here. |
2369 `-------------------------------------*/
2374 /*-----------------------------------.
2375 | yyabortlab -- YYABORT comes here. |
2376 `-----------------------------------*/
2381 #if !defined yyoverflow || YYERROR_VERBOSE
2382 /*-------------------------------------------------.
2383 | yyexhaustedlab -- memory exhaustion comes here. |
2384 `-------------------------------------------------*/
2386 yyerror (p
, scanner
, YY_("memory exhausted"));
2392 if (yychar
!= YYEMPTY
)
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
);
2400 /* Do not reclaim the symbols of the rule whose action triggered
2401 this YYABORT or YYACCEPT. */
2403 YY_STACK_PRINT (yyss
, yyssp
);
2404 while (yyssp
!= yyss
)
2406 yydestruct ("Cleanup: popping",
2407 yystos
[*yyssp
], yyvsp
, p
, scanner
);
2412 YYSTACK_FREE (yyss
);
2415 if (yymsg
!= yymsgbuf
)
2416 YYSTACK_FREE (yymsg
);
2420 #line 752 "xslpattern.y" /* yacc.c:1906 */
2423 #endif /* HAVE_LIBXML2 */