2 /* A Bison parser, made by GNU Bison 2.4.1. */
4 /* Skeleton implementation for Bison's Yacc-like parsers in C
6 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7 Free Software Foundation, Inc.
9 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
22 /* As a special exception, you may create a larger work that contains
23 part or all of the Bison parser skeleton and distribute that work
24 under terms of your choice, so long as that work isn't itself a
25 parser generator using the skeleton or a modified version thereof
26 as a parser skeleton. Alternatively, if you modify or redistribute
27 the parser skeleton itself, you may (at your option) remove this
28 special exception, which will cause the skeleton and the resulting
29 Bison output files to be licensed under the GNU General Public
30 License without this special exception.
32 This special exception was added by the Free Software Foundation in
33 version 2.2 of Bison. */
35 /* C LALR(1) parser skeleton written by Richard Stallman, by
36 simplifying the original so-called "semantic" parser. */
38 /* All symbols defined below should begin with yy or YY, to avoid
39 infringing on user name space. This should be done even for local
40 variables, as they might otherwise be expanded by user macros.
41 There are some unavoidable exceptions within include files to
42 define necessary library symbols; they are noted "INFRINGES ON
43 USER NAME SPACE" below. */
45 /* Identify Bison output. */
49 #define YYBISON_VERSION "2.4.1"
52 #define YYSKELETON_NAME "yacc.c"
63 /* Using locations. */
64 #define YYLSP_NEEDED 0
66 /* Substitute the variable and function names. */
67 #define yyparse xslpattern_parse
68 #define yylex xslpattern_lex
69 #define yyerror xslpattern_error
70 #define yylval xslpattern_lval
71 #define yychar xslpattern_char
72 #define yydebug xslpattern_debug
73 #define yynerrs xslpattern_nerrs
76 /* Copy the first part of user declarations. */
78 /* Line 189 of yacc.c */
79 #line 21 "xslpattern.y"
82 #include <wine/port.h>
85 #include "xslpattern.h"
86 #include <libxml/xpathInternals.h>
87 #include <wine/debug.h>
89 WINE_DEFAULT_DEBUG_CHANNEL(msxml
);
92 static const xmlChar NameTest_mod_pre
[] = "*[name()='";
93 static const xmlChar NameTest_mod_post
[] = "']";
95 #define U(str) BAD_CAST str
97 static inline BOOL
is_literal(xmlChar
const* tok
)
99 return (tok
&& tok
[0] && tok
[1] &&
100 tok
[0]== tok
[xmlStrlen(tok
)-1] &&
101 (tok
[0] == '\'' || tok
[0] == '"'));
104 static void xslpattern_error(parser_param
* param
, void const* scanner
, char const* msg
)
117 msg
, param
->yyscanner
, param
->ctx
, param
->in
, param
->pos
,
118 param
->len
, param
->out
, ++param
->err
, scanner
);
123 /* Line 189 of yacc.c */
124 #line 125 "xslpattern.tab.c"
126 /* Enabling traces. */
131 /* Enabling verbose error messages. */
132 #ifdef YYERROR_VERBOSE
133 # undef YYERROR_VERBOSE
134 # define YYERROR_VERBOSE 1
136 # define YYERROR_VERBOSE 0
139 /* Enabling the token table. */
140 #ifndef YYTOKEN_TABLE
141 # define YYTOKEN_TABLE 0
148 /* Put the tokens into the symbol table, so that GDB and other debuggers
182 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
184 # define YYSTYPE_IS_TRIVIAL 1
185 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
186 # define YYSTYPE_IS_DECLARED 1
190 /* Copy the second part of user declarations. */
193 /* Line 264 of yacc.c */
194 #line 195 "xslpattern.tab.c"
201 typedef YYTYPE_UINT8 yytype_uint8
;
203 typedef unsigned char yytype_uint8
;
207 typedef YYTYPE_INT8 yytype_int8
;
208 #elif (defined __STDC__ || defined __C99__FUNC__ \
209 || defined __cplusplus || defined _MSC_VER)
210 typedef signed char yytype_int8
;
212 typedef short int yytype_int8
;
216 typedef YYTYPE_UINT16 yytype_uint16
;
218 typedef unsigned short int yytype_uint16
;
222 typedef YYTYPE_INT16 yytype_int16
;
224 typedef short int yytype_int16
;
228 # ifdef __SIZE_TYPE__
229 # define YYSIZE_T __SIZE_TYPE__
230 # elif defined size_t
231 # define YYSIZE_T size_t
232 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
233 || defined __cplusplus || defined _MSC_VER)
234 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
235 # define YYSIZE_T size_t
237 # define YYSIZE_T unsigned int
241 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
246 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
247 # define YY_(msgid) dgettext ("bison-runtime", msgid)
251 # define YY_(msgid) msgid
255 /* Suppress unused-variable warnings by "using" E. */
256 #if ! defined lint || defined __GNUC__
257 # define YYUSE(e) ((void) (e))
259 # define YYUSE(e) /* empty */
262 /* Identity function, used to suppress warnings about constant conditions. */
266 #if (defined __STDC__ || defined __C99__FUNC__ \
267 || defined __cplusplus || defined _MSC_VER)
280 #if ! defined yyoverflow || YYERROR_VERBOSE
282 /* The parser invokes alloca or malloc; define the necessary symbols. */
284 # ifdef YYSTACK_USE_ALLOCA
285 # if YYSTACK_USE_ALLOCA
287 # define YYSTACK_ALLOC __builtin_alloca
288 # elif defined __BUILTIN_VA_ARG_INCR
289 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
291 # define YYSTACK_ALLOC __alloca
292 # elif defined _MSC_VER
293 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
294 # define alloca _alloca
296 # define YYSTACK_ALLOC alloca
297 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
298 || defined __cplusplus || defined _MSC_VER)
299 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
308 # ifdef YYSTACK_ALLOC
309 /* Pacify GCC's `empty if-body' warning. */
310 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
311 # ifndef YYSTACK_ALLOC_MAXIMUM
312 /* The OS might guarantee only one guard page at the bottom of the stack,
313 and a page size can be as small as 4096 bytes. So we cannot safely
314 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
315 to allow for a few compiler-allocated temporary stack slots. */
316 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
319 # define YYSTACK_ALLOC YYMALLOC
320 # define YYSTACK_FREE YYFREE
321 # ifndef YYSTACK_ALLOC_MAXIMUM
322 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
324 # if (defined __cplusplus && ! defined _STDLIB_H \
325 && ! ((defined YYMALLOC || defined malloc) \
326 && (defined YYFREE || defined free)))
327 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
333 # define YYMALLOC malloc
334 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
335 || defined __cplusplus || defined _MSC_VER)
336 void *malloc (YYSIZE_T
); /* INFRINGES ON USER NAME SPACE */
341 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
342 || defined __cplusplus || defined _MSC_VER)
343 void free (void *); /* INFRINGES ON USER NAME SPACE */
347 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
350 #if (! defined yyoverflow \
351 && (! defined __cplusplus \
352 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
354 /* A type that is properly aligned for any stack member. */
357 yytype_int16 yyss_alloc
;
361 /* The size of the maximum gap between one aligned stack and the next. */
362 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
364 /* The size of an array large to enough to hold all stacks, each with
366 # define YYSTACK_BYTES(N) \
367 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
368 + YYSTACK_GAP_MAXIMUM)
370 /* Copy COUNT objects from FROM to TO. The source and destination do
373 # if defined __GNUC__ && 1 < __GNUC__
374 # define YYCOPY(To, From, Count) \
375 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
377 # define YYCOPY(To, From, Count) \
381 for (yyi = 0; yyi < (Count); yyi++) \
382 (To)[yyi] = (From)[yyi]; \
388 /* Relocate STACK from its old location to the new one. The
389 local variables YYSIZE and YYSTACKSIZE give the old and new number of
390 elements in the stack, and YYPTR gives the new location of the
391 stack. Advance YYPTR to a properly aligned location for the next
393 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
396 YYSIZE_T yynewbytes; \
397 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
398 Stack = &yyptr->Stack_alloc; \
399 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
400 yyptr += yynewbytes / sizeof (*yyptr); \
406 /* YYFINAL -- State number of the termination state. */
408 /* YYLAST -- Last index in YYTABLE. */
411 /* YYNTOKENS -- Number of terminals. */
413 /* YYNNTS -- Number of nonterminals. */
415 /* YYNRULES -- Number of rules. */
417 /* YYNRULES -- Number of states. */
418 #define YYNSTATES 156
420 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
422 #define YYMAXUTOK 283
424 #define YYTRANSLATE(YYX) \
425 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
427 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
428 static const yytype_uint8 yytranslate
[] =
430 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
431 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
432 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
433 2, 2, 2, 35, 2, 2, 2, 2, 2, 2,
434 33, 34, 30, 2, 36, 2, 2, 2, 2, 2,
435 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
436 2, 2, 2, 2, 29, 2, 2, 2, 2, 2,
437 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
438 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
439 2, 31, 2, 32, 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, 2, 37, 2, 2, 2, 2, 2,
443 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
444 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
445 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
446 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
447 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
448 2, 2, 2, 2, 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, 2, 2, 2, 2, 2, 2,
452 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
453 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
454 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
455 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
456 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
457 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
462 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
464 static const yytype_uint16 yyprhs
[] =
466 0, 0, 3, 5, 7, 9, 13, 15, 17, 19,
467 22, 24, 26, 28, 32, 34, 38, 41, 44, 46,
468 48, 50, 53, 56, 58, 60, 62, 66, 70, 72,
469 75, 77, 81, 83, 85, 87, 89, 92, 96, 98,
470 100, 102, 104, 106, 108, 110, 112, 114, 118, 122,
471 124, 126, 131, 135, 139, 141, 143, 145, 149, 151,
472 155, 159, 161, 163, 166, 168, 170, 174, 176, 178,
473 182, 184, 186, 190, 194, 198, 202, 204, 206, 210,
474 214, 218, 222, 226, 230, 234, 238, 240, 242, 245,
475 248, 251, 253, 257, 261, 265, 269, 273, 277, 281,
479 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
480 static const yytype_int8 yyrhs
[] =
482 39, 0, -1, 57, -1, 41, -1, 42, -1, 26,
483 8, 26, -1, 26, -1, 45, -1, 44, -1, 6,
484 45, -1, 6, -1, 54, -1, 46, -1, 45, 6,
485 46, -1, 55, -1, 47, 49, 51, -1, 49, 51,
486 -1, 47, 49, -1, 49, -1, 48, -1, 56, -1,
487 26, 7, -1, 29, 40, -1, 50, -1, 60, -1,
488 30, -1, 26, 8, 30, -1, 26, 8, 26, -1,
489 42, -1, 51, 52, -1, 52, -1, 31, 53, 32,
490 -1, 28, -1, 58, -1, 48, -1, 26, -1, 5,
491 45, -1, 45, 5, 46, -1, 3, -1, 4, -1,
492 66, -1, 60, -1, 75, -1, 73, -1, 71, -1,
493 69, -1, 67, -1, 33, 57, 34, -1, 64, 35,
494 60, -1, 27, -1, 28, -1, 40, 33, 61, 34,
495 -1, 40, 33, 34, -1, 62, 36, 61, -1, 62,
496 -1, 57, -1, 64, -1, 63, 37, 64, -1, 43,
497 -1, 65, 6, 45, -1, 65, 5, 45, -1, 65,
498 -1, 59, -1, 65, 52, -1, 68, -1, 67, -1,
499 66, 10, 68, -1, 70, -1, 69, -1, 68, 9,
500 70, -1, 72, -1, 71, -1, 70, 12, 72, -1,
501 70, 13, 72, -1, 70, 14, 72, -1, 70, 15,
502 72, -1, 74, -1, 73, -1, 72, 16, 74, -1,
503 72, 17, 74, -1, 72, 18, 74, -1, 72, 19,
504 74, -1, 72, 20, 74, -1, 72, 21, 74, -1,
505 72, 22, 74, -1, 72, 23, 74, -1, 63, -1,
506 75, -1, 11, 74, -1, 25, 57, -1, 24, 76,
507 -1, 24, -1, 64, 12, 64, -1, 64, 14, 64,
508 -1, 64, 16, 64, -1, 64, 20, 64, -1, 64,
509 18, 64, -1, 64, 22, 64, -1, 64, 13, 64,
510 -1, 64, 15, 64, -1, 64, 17, 64, -1, 64,
511 21, 64, -1, 64, 19, 64, -1, 64, 23, 64,
515 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
516 static const yytype_uint16 yyrline
[] =
518 0, 86, 86, 96, 97, 99, 108, 119, 120, 122,
519 129, 134, 136, 137, 145, 148, 157, 164, 171, 172,
520 173, 175, 182, 192, 193, 195, 200, 206, 225, 233,
521 239, 241, 250, 256, 257, 258, 261, 269, 278, 283,
522 292, 294, 295, 296, 297, 298, 299, 301, 309, 317,
523 318, 321, 380, 411, 418, 420, 423, 424, 433, 434,
524 442, 450, 452, 453, 462, 463, 465, 474, 475, 477,
525 486, 487, 489, 497, 508, 516, 528, 529, 531, 539,
526 550, 558, 569, 577, 588, 596, 610, 611, 613, 621,
527 629, 637, 643, 650, 657, 664, 671, 678, 685, 695,
532 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
533 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
534 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
535 static const char *const yytname
[] =
537 "$end", "error", "$undefined", "TOK_Parent", "TOK_Self",
538 "TOK_DblFSlash", "TOK_FSlash", "TOK_Axis", "TOK_Colon", "TOK_OpAnd",
539 "TOK_OpOr", "TOK_OpNot", "TOK_OpEq", "TOK_OpIEq", "TOK_OpNEq",
540 "TOK_OpINEq", "TOK_OpLt", "TOK_OpILt", "TOK_OpGt", "TOK_OpIGt",
541 "TOK_OpLEq", "TOK_OpILEq", "TOK_OpGEq", "TOK_OpIGEq", "TOK_OpAll",
542 "TOK_OpAny", "TOK_NCName", "TOK_Literal", "TOK_Number", "'@'", "'*'",
543 "'['", "']'", "'('", "')'", "'!'", "','", "'|'", "$accept", "XSLPattern",
544 "QName", "PrefixedName", "UnprefixedName", "LocationPath",
545 "AbsoluteLocationPath", "RelativeLocationPath", "Step", "AxisSpecifier",
546 "Attribute", "NodeTest", "NameTest", "Predicates", "Predicate",
547 "PredicateExpr", "AbbreviatedAbsoluteLocationPath",
548 "AbbreviatedRelativeLocationPath", "AbbreviatedStep", "Expr", "BoolExpr",
549 "PrimaryExpr", "FunctionCall", "Arguments", "Argument", "UnionExpr",
550 "PathExpr", "FilterExpr", "OrExpr", "BoolOrExpr", "AndExpr",
551 "BoolAndExpr", "EqualityExpr", "BoolEqualityExpr", "RelationalExpr",
552 "BoolRelationalExpr", "UnaryExpr", "BoolUnaryExpr", "AllExpr", 0
557 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
559 static const yytype_uint16 yytoknum
[] =
561 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
562 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
563 275, 276, 277, 278, 279, 280, 281, 282, 283, 64,
564 42, 91, 93, 40, 41, 33, 44, 124
568 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
569 static const yytype_uint8 yyr1
[] =
571 0, 38, 39, 40, 40, 41, 42, 43, 43, 44,
572 44, 44, 45, 45, 45, 46, 46, 46, 46, 46,
573 46, 47, 48, 49, 49, 50, 50, 50, 50, 51,
574 51, 52, 53, 53, 53, 53, 54, 55, 56, 56,
575 57, 58, 58, 58, 58, 58, 58, 59, 59, 59,
576 59, 60, 60, 61, 61, 62, 63, 63, 64, 64,
577 64, 64, 65, 65, 66, 66, 67, 68, 68, 69,
578 70, 70, 71, 71, 71, 71, 72, 72, 73, 73,
579 73, 73, 73, 73, 73, 73, 74, 74, 75, 75,
580 75, 75, 76, 76, 76, 76, 76, 76, 76, 76,
584 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
585 static const yytype_uint8 yyr2
[] =
587 0, 2, 1, 1, 1, 3, 1, 1, 1, 2,
588 1, 1, 1, 3, 1, 3, 2, 2, 1, 1,
589 1, 2, 2, 1, 1, 1, 3, 3, 1, 2,
590 1, 3, 1, 1, 1, 1, 2, 3, 1, 1,
591 1, 1, 1, 1, 1, 1, 1, 3, 3, 1,
592 1, 4, 3, 3, 1, 1, 1, 3, 1, 3,
593 3, 1, 1, 2, 1, 1, 3, 1, 1, 3,
594 1, 1, 3, 3, 3, 3, 1, 1, 3, 3,
595 3, 3, 3, 3, 3, 3, 1, 1, 2, 2,
596 2, 1, 3, 3, 3, 3, 3, 3, 3, 3,
600 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
601 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
602 means the default is an error. */
603 static const yytype_uint8 yydefact
[] =
605 0, 38, 39, 0, 10, 0, 91, 0, 6, 49,
606 50, 0, 25, 0, 0, 0, 3, 28, 58, 8,
607 7, 12, 0, 19, 18, 23, 11, 14, 20, 2,
608 62, 24, 86, 56, 61, 40, 65, 64, 68, 67,
609 71, 70, 77, 76, 87, 36, 9, 88, 0, 90,
610 89, 21, 0, 6, 22, 4, 0, 1, 0, 0,
611 0, 6, 17, 0, 16, 30, 0, 0, 0, 0,
612 63, 0, 0, 0, 0, 0, 0, 0, 0, 0,
613 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
614 0, 0, 0, 0, 0, 0, 0, 27, 26, 0,
615 47, 52, 55, 0, 54, 37, 13, 15, 6, 50,
616 19, 0, 33, 24, 0, 46, 68, 71, 77, 87,
617 29, 57, 48, 60, 59, 66, 69, 72, 73, 74,
618 75, 78, 79, 80, 81, 82, 83, 84, 85, 92,
619 98, 93, 99, 94, 100, 96, 102, 95, 101, 97,
620 103, 5, 51, 0, 31, 53
623 /* YYDEFGOTO[NTERM-NUM]. */
624 static const yytype_int8 yydefgoto
[] =
626 -1, 14, 15, 16, 17, 18, 19, 20, 21, 22,
627 23, 24, 25, 64, 65, 111, 26, 27, 28, 102,
628 112, 30, 31, 103, 104, 32, 33, 34, 35, 36,
629 37, 38, 39, 40, 41, 42, 43, 44, 49
632 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
634 #define YYPACT_NINF -34
635 static const yytype_int16 yypact
[] =
637 21, -34, -34, 26, 26, 21, 105, 21, 0, -34,
638 -34, -16, -34, 21, 16, -12, -34, 11, -34, -34,
639 53, -34, -21, -34, -3, -34, -34, -34, -34, -34,
640 -34, -34, -14, 28, 35, 51, -34, 64, -34, 57,
641 -34, 135, -34, -34, -34, 53, 53, -34, 127, -34,
642 -34, -34, -8, 95, -34, -34, 70, -34, 9, 26,
643 26, 104, -3, 96, -3, -34, 105, -16, 26, 26,
644 -34, 21, 21, 21, 21, 21, 21, 21, 21, 21,
645 21, 21, 21, 21, 21, 105, 105, 105, 105, 105,
646 105, 105, 105, 105, 105, 105, 105, 80, -34, 88,
647 -34, -34, -34, 81, 82, -34, -34, -3, 98, 84,
648 85, 87, -34, 128, 51, 117, 129, 131, 132, 133,
649 -34, 28, -34, 53, 53, -34, 57, 135, 135, 135,
650 135, -34, -34, -34, -34, -34, -34, -34, -34, 28,
651 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
652 28, -34, -34, 21, -34, -34
655 /* YYPGOTO[NTERM-NUM]. */
656 static const yytype_int8 yypgoto
[] =
658 -34, -34, 125, -34, -5, -34, -34, -1, 5, -34,
659 65, 115, -34, 97, -33, -34, -34, -34, -34, 4,
660 -34, -34, -10, 13, -34, -34, -6, -34, 106, 107,
661 100, 109, 101, 111, 2, 112, 14, 113, -34
664 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
665 positive, shift that token. If negative, reduce the rule which
666 number is the opposite. If zero, do what YYDEFACT says.
667 If YYTABLE_NINF, syntax error. */
668 #define YYTABLE_NINF -66
669 static const yytype_int16 yytable
[] =
671 48, 70, 45, 46, 29, 61, 55, 51, 52, 12,
672 53, 50, 1, 2, 3, 4, 57, 56, 97, 47,
673 5, 58, 98, 66, 1, 2, 3, 4, 63, 1,
674 2, 120, 5, 6, 7, 8, 9, 10, 11, 12,
675 68, 69, 13, 101, -4, 6, 7, 8, 9, 10,
676 11, 12, 8, 113, 13, 11, 12, 122, 59, 60,
677 121, 71, 55, 67, 105, 106, 63, 123, 124, 73,
678 74, 75, 76, 72, 120, 127, 128, 129, 130, 139,
679 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
680 150, 131, 132, 133, 134, 135, 136, 137, 138, 1,
681 2, 3, 4, 99, 100, 51, 52, 5, 1, 2,
682 3, 4, 52, -5, 151, 152, -32, -34, 153, 154,
683 6, 7, 108, 9, 109, 11, 12, -65, 110, 13,
684 -35, 8, 9, 10, 11, 12, 54, 62, 13, 85,
685 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
686 96, 77, 78, 79, 80, 81, 82, 83, 84, 107,
687 -41, -45, 67, -44, -43, -42, 155, 0, 0, 114,
688 115, 125, 116, 126, 117, 118, 119
691 static const yytype_int16 yycheck
[] =
693 6, 34, 3, 4, 0, 26, 11, 7, 8, 30,
694 26, 7, 3, 4, 5, 6, 0, 13, 26, 5,
695 11, 33, 30, 37, 3, 4, 5, 6, 31, 3,
696 4, 64, 11, 24, 25, 26, 27, 28, 29, 30,
697 5, 6, 33, 34, 33, 24, 25, 26, 27, 28,
698 29, 30, 26, 63, 33, 29, 30, 67, 5, 6,
699 66, 10, 67, 35, 59, 60, 31, 68, 69, 12,
700 13, 14, 15, 9, 107, 73, 74, 75, 76, 85,
701 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
702 96, 77, 78, 79, 80, 81, 82, 83, 84, 3,
703 4, 5, 6, 8, 34, 7, 8, 11, 3, 4,
704 5, 6, 8, 33, 26, 34, 32, 32, 36, 32,
705 24, 25, 26, 27, 28, 29, 30, 10, 63, 33,
706 32, 26, 27, 28, 29, 30, 11, 22, 33, 12,
707 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
708 23, 16, 17, 18, 19, 20, 21, 22, 23, 62,
709 32, 32, 35, 32, 32, 32, 153, -1, -1, 63,
710 63, 71, 63, 72, 63, 63, 63
713 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
714 symbol of state STATE-NUM. */
715 static const yytype_uint8 yystos
[] =
717 0, 3, 4, 5, 6, 11, 24, 25, 26, 27,
718 28, 29, 30, 33, 39, 40, 41, 42, 43, 44,
719 45, 46, 47, 48, 49, 50, 54, 55, 56, 57,
720 59, 60, 63, 64, 65, 66, 67, 68, 69, 70,
721 71, 72, 73, 74, 75, 45, 45, 74, 64, 76,
722 57, 7, 8, 26, 40, 42, 57, 0, 33, 5,
723 6, 26, 49, 31, 51, 52, 37, 35, 5, 6,
724 52, 10, 9, 12, 13, 14, 15, 16, 17, 18,
725 19, 20, 21, 22, 23, 12, 13, 14, 15, 16,
726 17, 18, 19, 20, 21, 22, 23, 26, 30, 8,
727 34, 34, 57, 61, 62, 46, 46, 51, 26, 28,
728 48, 53, 58, 60, 66, 67, 69, 71, 73, 75,
729 52, 64, 60, 45, 45, 68, 70, 72, 72, 72,
730 72, 74, 74, 74, 74, 74, 74, 74, 74, 64,
731 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
732 64, 26, 34, 36, 32, 61
735 #define yyerrok (yyerrstatus = 0)
736 #define yyclearin (yychar = YYEMPTY)
740 #define YYACCEPT goto yyacceptlab
741 #define YYABORT goto yyabortlab
742 #define YYERROR goto yyerrorlab
745 /* Like YYERROR except do call yyerror. This remains here temporarily
746 to ease the transition to the new meaning of YYERROR, for GCC.
747 Once GCC version 2 has supplanted version 1, this can go. */
749 #define YYFAIL goto yyerrlab
751 #define YYRECOVERING() (!!yyerrstatus)
753 #define YYBACKUP(Token, Value) \
755 if (yychar == YYEMPTY && yylen == 1) \
759 yytoken = YYTRANSLATE (yychar); \
765 yyerror (p, scanner, YY_("syntax error: cannot back up")); \
772 #define YYERRCODE 256
775 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
776 If N is 0, then set CURRENT to the empty location which ends
777 the previous symbol: RHS[0] (always defined). */
779 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
780 #ifndef YYLLOC_DEFAULT
781 # define YYLLOC_DEFAULT(Current, Rhs, N) \
785 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
786 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
787 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
788 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
792 (Current).first_line = (Current).last_line = \
793 YYRHSLOC (Rhs, 0).last_line; \
794 (Current).first_column = (Current).last_column = \
795 YYRHSLOC (Rhs, 0).last_column; \
801 /* YY_LOCATION_PRINT -- Print the location on the stream.
802 This macro was not mandated originally: define only if we know
803 we won't break user code: when these are the locations we know. */
805 #ifndef YY_LOCATION_PRINT
806 # if YYLTYPE_IS_TRIVIAL
807 # define YY_LOCATION_PRINT(File, Loc) \
808 fprintf (File, "%d.%d-%d.%d", \
809 (Loc).first_line, (Loc).first_column, \
810 (Loc).last_line, (Loc).last_column)
812 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
817 /* YYLEX -- calling `yylex' with the right arguments. */
820 # define YYLEX yylex (&yylval, YYLEX_PARAM)
822 # define YYLEX yylex (&yylval, scanner)
825 /* Enable debugging if requested. */
829 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
830 # define YYFPRINTF fprintf
833 # define YYDPRINTF(Args) \
839 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
843 YYFPRINTF (stderr, "%s ", Title); \
844 yy_symbol_print (stderr, \
845 Type, Value, p, scanner); \
846 YYFPRINTF (stderr, "\n"); \
851 /*--------------------------------.
852 | Print this symbol on YYOUTPUT. |
853 `--------------------------------*/
856 #if (defined __STDC__ || defined __C99__FUNC__ \
857 || defined __cplusplus || defined _MSC_VER)
859 yy_symbol_value_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
, parser_param
* p
, void* scanner
)
862 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
, p
, scanner
)
865 YYSTYPE
const * const yyvaluep
;
875 if (yytype
< YYNTOKENS
)
876 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
888 /*--------------------------------.
889 | Print this symbol on YYOUTPUT. |
890 `--------------------------------*/
892 #if (defined __STDC__ || defined __C99__FUNC__ \
893 || defined __cplusplus || defined _MSC_VER)
895 yy_symbol_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
, parser_param
* p
, void* scanner
)
898 yy_symbol_print (yyoutput
, yytype
, yyvaluep
, p
, scanner
)
901 YYSTYPE
const * const yyvaluep
;
906 if (yytype
< YYNTOKENS
)
907 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
909 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
911 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
, p
, scanner
);
912 YYFPRINTF (yyoutput
, ")");
915 /*------------------------------------------------------------------.
916 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
918 `------------------------------------------------------------------*/
920 #if (defined __STDC__ || defined __C99__FUNC__ \
921 || defined __cplusplus || defined _MSC_VER)
923 yy_stack_print (yytype_int16
*yybottom
, yytype_int16
*yytop
)
926 yy_stack_print (yybottom
, yytop
)
927 yytype_int16
*yybottom
;
931 YYFPRINTF (stderr
, "Stack now");
932 for (; yybottom
<= yytop
; yybottom
++)
934 int yybot
= *yybottom
;
935 YYFPRINTF (stderr
, " %d", yybot
);
937 YYFPRINTF (stderr
, "\n");
940 # define YY_STACK_PRINT(Bottom, Top) \
943 yy_stack_print ((Bottom), (Top)); \
947 /*------------------------------------------------.
948 | Report that the YYRULE is going to be reduced. |
949 `------------------------------------------------*/
951 #if (defined __STDC__ || defined __C99__FUNC__ \
952 || defined __cplusplus || defined _MSC_VER)
954 yy_reduce_print (YYSTYPE
*yyvsp
, int yyrule
, parser_param
* p
, void* scanner
)
957 yy_reduce_print (yyvsp
, yyrule
, p
, scanner
)
964 int yynrhs
= yyr2
[yyrule
];
966 unsigned long int yylno
= yyrline
[yyrule
];
967 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %lu):\n",
969 /* The symbols being reduced. */
970 for (yyi
= 0; yyi
< yynrhs
; yyi
++)
972 YYFPRINTF (stderr
, " $%d = ", yyi
+ 1);
973 yy_symbol_print (stderr
, yyrhs
[yyprhs
[yyrule
] + yyi
],
974 &(yyvsp
[(yyi
+ 1) - (yynrhs
)])
976 YYFPRINTF (stderr
, "\n");
980 # define YY_REDUCE_PRINT(Rule) \
983 yy_reduce_print (yyvsp, Rule, p, scanner); \
986 /* Nonzero means print parse trace. It is left uninitialized so that
987 multiple parsers can coexist. */
990 # define YYDPRINTF(Args)
991 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
992 # define YY_STACK_PRINT(Bottom, Top)
993 # define YY_REDUCE_PRINT(Rule)
994 #endif /* !YYDEBUG */
997 /* YYINITDEPTH -- initial size of the parser's stacks. */
999 # define YYINITDEPTH 200
1002 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1003 if the built-in stack extension method is used).
1005 Do not make this value too large; the results are undefined if
1006 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1007 evaluated with infinite-precision integer arithmetic. */
1010 # define YYMAXDEPTH 10000
1018 # if defined __GLIBC__ && defined _STRING_H
1019 # define yystrlen strlen
1021 /* Return the length of YYSTR. */
1022 #if (defined __STDC__ || defined __C99__FUNC__ \
1023 || defined __cplusplus || defined _MSC_VER)
1025 yystrlen (const char *yystr
)
1033 for (yylen
= 0; yystr
[yylen
]; yylen
++)
1041 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1042 # define yystpcpy stpcpy
1044 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1046 #if (defined __STDC__ || defined __C99__FUNC__ \
1047 || defined __cplusplus || defined _MSC_VER)
1049 yystpcpy (char *yydest
, const char *yysrc
)
1052 yystpcpy (yydest
, yysrc
)
1058 const char *yys
= yysrc
;
1060 while ((*yyd
++ = *yys
++) != '\0')
1069 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1070 quotes and backslashes, so that it's suitable for yyerror. The
1071 heuristic is that double-quoting is unnecessary unless the string
1072 contains an apostrophe, a comma, or backslash (other than
1073 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1074 null, do not copy; instead, return the length of what the result
1077 yytnamerr (char *yyres
, const char *yystr
)
1082 char const *yyp
= yystr
;
1089 goto do_not_strip_quotes
;
1093 goto do_not_strip_quotes
;
1106 do_not_strip_quotes
: ;
1110 return yystrlen (yystr
);
1112 return yystpcpy (yyres
, yystr
) - yyres
;
1116 /* Copy into YYRESULT an error message about the unexpected token
1117 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1118 including the terminating null byte. If YYRESULT is null, do not
1119 copy anything; just return the number of bytes that would be
1120 copied. As a special case, return 0 if an ordinary "syntax error"
1121 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1122 size calculation. */
1124 yysyntax_error (char *yyresult
, int yystate
, int yychar
)
1126 int yyn
= yypact
[yystate
];
1128 if (! (YYPACT_NINF
< yyn
&& yyn
<= YYLAST
))
1132 int yytype
= YYTRANSLATE (yychar
);
1133 YYSIZE_T yysize0
= yytnamerr (0, yytname
[yytype
]);
1134 YYSIZE_T yysize
= yysize0
;
1136 int yysize_overflow
= 0;
1137 enum { YYERROR_VERBOSE_ARGS_MAXIMUM
= 5 };
1138 char const *yyarg
[YYERROR_VERBOSE_ARGS_MAXIMUM
];
1142 /* This is so xgettext sees the translatable formats that are
1143 constructed on the fly. */
1144 YY_("syntax error, unexpected %s");
1145 YY_("syntax error, unexpected %s, expecting %s");
1146 YY_("syntax error, unexpected %s, expecting %s or %s");
1147 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1148 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1152 static char const yyunexpected
[] = "syntax error, unexpected %s";
1153 static char const yyexpecting
[] = ", expecting %s";
1154 static char const yyor
[] = " or %s";
1155 char yyformat
[sizeof yyunexpected
1156 + sizeof yyexpecting
- 1
1157 + ((YYERROR_VERBOSE_ARGS_MAXIMUM
- 2)
1158 * (sizeof yyor
- 1))];
1159 char const *yyprefix
= yyexpecting
;
1161 /* Start YYX at -YYN if negative to avoid negative indexes in
1163 int yyxbegin
= yyn
< 0 ? -yyn
: 0;
1165 /* Stay within bounds of both yycheck and yytname. */
1166 int yychecklim
= YYLAST
- yyn
+ 1;
1167 int yyxend
= yychecklim
< YYNTOKENS
? yychecklim
: YYNTOKENS
;
1170 yyarg
[0] = yytname
[yytype
];
1171 yyfmt
= yystpcpy (yyformat
, yyunexpected
);
1173 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
1174 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
)
1176 if (yycount
== YYERROR_VERBOSE_ARGS_MAXIMUM
)
1180 yyformat
[sizeof yyunexpected
- 1] = '\0';
1183 yyarg
[yycount
++] = yytname
[yyx
];
1184 yysize1
= yysize
+ yytnamerr (0, yytname
[yyx
]);
1185 yysize_overflow
|= (yysize1
< yysize
);
1187 yyfmt
= yystpcpy (yyfmt
, yyprefix
);
1191 yyf
= YY_(yyformat
);
1192 yysize1
= yysize
+ yystrlen (yyf
);
1193 yysize_overflow
|= (yysize1
< yysize
);
1196 if (yysize_overflow
)
1197 return YYSIZE_MAXIMUM
;
1201 /* Avoid sprintf, as that infringes on the user's name space.
1202 Don't have undefined behavior even if the translation
1203 produced a string with the wrong number of "%s"s. */
1204 char *yyp
= yyresult
;
1206 while ((*yyp
= *yyf
) != '\0')
1208 if (*yyp
== '%' && yyf
[1] == 's' && yyi
< yycount
)
1210 yyp
+= yytnamerr (yyp
, yyarg
[yyi
++]);
1223 #endif /* YYERROR_VERBOSE */
1226 /*-----------------------------------------------.
1227 | Release the memory associated to this symbol. |
1228 `-----------------------------------------------*/
1231 #if (defined __STDC__ || defined __C99__FUNC__ \
1232 || defined __cplusplus || defined _MSC_VER)
1234 yydestruct (const char *yymsg
, int yytype
, YYSTYPE
*yyvaluep
, parser_param
* p
, void* scanner
)
1237 yydestruct (yymsg
, yytype
, yyvaluep
, p
, scanner
)
1251 YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
);
1261 /* Prevent warnings from -Wmissing-prototypes. */
1262 #ifdef YYPARSE_PARAM
1263 #if defined __STDC__ || defined __cplusplus
1264 int yyparse (void *YYPARSE_PARAM
);
1268 #else /* ! YYPARSE_PARAM */
1269 #if defined __STDC__ || defined __cplusplus
1270 int yyparse (parser_param
* p
, void* scanner
);
1274 #endif /* ! YYPARSE_PARAM */
1280 /*-------------------------.
1281 | yyparse or yypush_parse. |
1282 `-------------------------*/
1284 #ifdef YYPARSE_PARAM
1285 #if (defined __STDC__ || defined __C99__FUNC__ \
1286 || defined __cplusplus || defined _MSC_VER)
1288 yyparse (void *YYPARSE_PARAM
)
1291 yyparse (YYPARSE_PARAM
)
1292 void *YYPARSE_PARAM
;
1294 #else /* ! YYPARSE_PARAM */
1295 #if (defined __STDC__ || defined __C99__FUNC__ \
1296 || defined __cplusplus || defined _MSC_VER)
1298 yyparse (parser_param
* p
, void* scanner
)
1301 yyparse (p
, scanner
)
1307 /* The lookahead symbol. */
1310 /* The semantic value of the lookahead symbol. */
1313 /* Number of syntax errors so far. */
1317 /* Number of tokens to shift before error messages enabled. */
1320 /* The stacks and their tools:
1321 `yyss': related to states.
1322 `yyvs': related to semantic values.
1324 Refer to the stacks thru separate pointers, to allow yyoverflow
1325 to reallocate them elsewhere. */
1327 /* The state stack. */
1328 yytype_int16 yyssa
[YYINITDEPTH
];
1330 yytype_int16
*yyssp
;
1332 /* The semantic value stack. */
1333 YYSTYPE yyvsa
[YYINITDEPTH
];
1337 YYSIZE_T yystacksize
;
1341 /* Lookahead token as an internal (translated) token number. */
1343 /* The variables used to return semantic value and location from the
1348 /* Buffer for error messages, and its allocated size. */
1350 char *yymsg
= yymsgbuf
;
1351 YYSIZE_T yymsg_alloc
= sizeof yymsgbuf
;
1354 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1356 /* The number of symbols on the RHS of the reduced rule.
1357 Keep to zero when no symbol should be popped. */
1363 yystacksize
= YYINITDEPTH
;
1365 YYDPRINTF ((stderr
, "Starting parse\n"));
1370 yychar
= YYEMPTY
; /* Cause a token to be read. */
1372 /* Initialize stack pointers.
1373 Waste one element of value and location stack
1374 so that they stay on the same level as the state stack.
1375 The wasted elements are never initialized. */
1381 /*------------------------------------------------------------.
1382 | yynewstate -- Push a new state, which is found in yystate. |
1383 `------------------------------------------------------------*/
1385 /* In all cases, when you get here, the value and location stacks
1386 have just been pushed. So pushing a state here evens the stacks. */
1392 if (yyss
+ yystacksize
- 1 <= yyssp
)
1394 /* Get the current used size of the three stacks, in elements. */
1395 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
1399 /* Give user a chance to reallocate the stack. Use copies of
1400 these so that the &'s don't force the real ones into
1402 YYSTYPE
*yyvs1
= yyvs
;
1403 yytype_int16
*yyss1
= yyss
;
1405 /* Each stack pointer address is followed by the size of the
1406 data in use in that stack, in bytes. This used to be a
1407 conditional around just the two extra args, but that might
1408 be undefined if yyoverflow is a macro. */
1409 yyoverflow (YY_("memory exhausted"),
1410 &yyss1
, yysize
* sizeof (*yyssp
),
1411 &yyvs1
, yysize
* sizeof (*yyvsp
),
1417 #else /* no yyoverflow */
1418 # ifndef YYSTACK_RELOCATE
1419 goto yyexhaustedlab
;
1421 /* Extend the stack our own way. */
1422 if (YYMAXDEPTH
<= yystacksize
)
1423 goto yyexhaustedlab
;
1425 if (YYMAXDEPTH
< yystacksize
)
1426 yystacksize
= YYMAXDEPTH
;
1429 yytype_int16
*yyss1
= yyss
;
1430 union yyalloc
*yyptr
=
1431 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
1433 goto yyexhaustedlab
;
1434 YYSTACK_RELOCATE (yyss_alloc
, yyss
);
1435 YYSTACK_RELOCATE (yyvs_alloc
, yyvs
);
1436 # undef YYSTACK_RELOCATE
1438 YYSTACK_FREE (yyss1
);
1441 #endif /* no yyoverflow */
1443 yyssp
= yyss
+ yysize
- 1;
1444 yyvsp
= yyvs
+ yysize
- 1;
1446 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
1447 (unsigned long int) yystacksize
));
1449 if (yyss
+ yystacksize
- 1 <= yyssp
)
1453 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
1455 if (yystate
== YYFINAL
)
1465 /* Do appropriate processing given the current state. Read a
1466 lookahead token if we need one and don't already have one. */
1468 /* First try to decide what to do without reference to lookahead token. */
1469 yyn
= yypact
[yystate
];
1470 if (yyn
== YYPACT_NINF
)
1473 /* Not known => get a lookahead token if don't already have one. */
1475 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1476 if (yychar
== YYEMPTY
)
1478 YYDPRINTF ((stderr
, "Reading a token: "));
1482 if (yychar
<= YYEOF
)
1484 yychar
= yytoken
= YYEOF
;
1485 YYDPRINTF ((stderr
, "Now at end of input.\n"));
1489 yytoken
= YYTRANSLATE (yychar
);
1490 YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
);
1493 /* If the proper action on seeing token YYTOKEN is to reduce or to
1494 detect an error, take that action. */
1496 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
1501 if (yyn
== 0 || yyn
== YYTABLE_NINF
)
1507 /* Count tokens shifted since error; after three, turn off error
1512 /* Shift the lookahead token. */
1513 YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
);
1515 /* Discard the shifted token. */
1524 /*-----------------------------------------------------------.
1525 | yydefault -- do the default action for the current state. |
1526 `-----------------------------------------------------------*/
1528 yyn
= yydefact
[yystate
];
1534 /*-----------------------------.
1535 | yyreduce -- Do a reduction. |
1536 `-----------------------------*/
1538 /* yyn is the number of a rule to reduce with. */
1541 /* If YYLEN is nonzero, implement the default value of the action:
1544 Otherwise, the following line sets YYVAL to garbage.
1545 This behavior is undocumented and Bison
1546 users should not rely upon it. Assigning to YYVAL
1547 unconditionally makes the parser a bit smaller, and it avoids a
1548 GCC warning that YYVAL may be used uninitialized. */
1549 yyval
= yyvsp
[1-yylen
];
1552 YY_REDUCE_PRINT (yyn
);
1557 /* Line 1455 of yacc.c */
1558 #line 87 "xslpattern.y"
1560 p
->out
= (yyvsp
[(1) - (1)]);
1566 /* Line 1455 of yacc.c */
1567 #line 100 "xslpattern.y"
1569 TRACE("Got PrefixedName: \"%s:%s\"\n", (yyvsp
[(1) - (3)]), (yyvsp
[(3) - (3)]));
1570 (yyval
)=(yyvsp
[(1) - (3)]);
1571 (yyval
)=xmlStrcat((yyval
),U(":"));
1572 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
1573 xmlFree((yyvsp
[(3) - (3)]));
1579 /* Line 1455 of yacc.c */
1580 #line 109 "xslpattern.y"
1582 TRACE("Got UnprefixedName: \"%s\"\n", (yyvsp
[(1) - (1)]));
1583 (yyval
)=(yyvsp
[(1) - (1)]);
1589 /* Line 1455 of yacc.c */
1590 #line 123 "xslpattern.y"
1592 TRACE("Got AbsoluteLocationPath: \"/%s\"\n", (yyvsp
[(2) - (2)]));
1593 (yyval
)=xmlStrdup(U("/"));
1594 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(2) - (2)]));
1595 xmlFree((yyvsp
[(2) - (2)]));
1601 /* Line 1455 of yacc.c */
1602 #line 130 "xslpattern.y"
1604 TRACE("Got AbsoluteLocationPath: \"/\"\n");
1605 (yyval
)=xmlStrdup(U("/"));
1611 /* Line 1455 of yacc.c */
1612 #line 138 "xslpattern.y"
1614 TRACE("Got RelativeLocationPath: \"%s/%s\"\n", (yyvsp
[(1) - (3)]), (yyvsp
[(3) - (3)]));
1615 (yyval
)=(yyvsp
[(1) - (3)]);
1616 (yyval
)=xmlStrcat((yyval
),U("/"));
1617 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
1618 xmlFree((yyvsp
[(3) - (3)]));
1624 /* Line 1455 of yacc.c */
1625 #line 149 "xslpattern.y"
1627 TRACE("Got Step: \"%s%s%s\"\n", (yyvsp
[(1) - (3)]), (yyvsp
[(2) - (3)]), (yyvsp
[(3) - (3)]));
1628 (yyval
)=(yyvsp
[(1) - (3)]);
1629 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(2) - (3)]));
1630 xmlFree((yyvsp
[(2) - (3)]));
1631 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
1632 xmlFree((yyvsp
[(3) - (3)]));
1638 /* Line 1455 of yacc.c */
1639 #line 158 "xslpattern.y"
1641 TRACE("Got Step: \"%s%s\"\n", (yyvsp
[(1) - (2)]), (yyvsp
[(2) - (2)]));
1642 (yyval
)=(yyvsp
[(1) - (2)]);
1643 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(2) - (2)]));
1644 xmlFree((yyvsp
[(2) - (2)]));
1650 /* Line 1455 of yacc.c */
1651 #line 165 "xslpattern.y"
1653 TRACE("Got Step: \"%s%s\"\n", (yyvsp
[(1) - (2)]), (yyvsp
[(2) - (2)]));
1654 (yyval
)=(yyvsp
[(1) - (2)]);
1655 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(2) - (2)]));
1656 xmlFree((yyvsp
[(2) - (2)]));
1662 /* Line 1455 of yacc.c */
1663 #line 176 "xslpattern.y"
1665 TRACE("Got AxisSpecifier: \"%s::\"\n", (yyvsp
[(1) - (2)]));
1666 (yyval
)=(yyvsp
[(1) - (2)]);
1667 (yyval
)=xmlStrcat((yyval
),U("::"));
1673 /* Line 1455 of yacc.c */
1674 #line 183 "xslpattern.y"
1676 TRACE("Got Attribute: \"@%s\"\n", (yyvsp
[(2) - (2)]));
1677 (yyval
)=xmlStrdup(U("@"));
1678 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(2) - (2)]));
1679 xmlFree((yyvsp
[(2) - (2)]));
1685 /* Line 1455 of yacc.c */
1686 #line 196 "xslpattern.y"
1688 TRACE("Got NameTest: \"*\"\n");
1689 (yyval
)=xmlStrdup(U("*"));
1695 /* Line 1455 of yacc.c */
1696 #line 201 "xslpattern.y"
1698 TRACE("Got NameTest: \"%s:*\"\n", (yyvsp
[(1) - (3)]));
1699 (yyval
)=(yyvsp
[(1) - (3)]);
1700 (yyval
)=xmlStrcat((yyval
),U(":*"));
1706 /* Line 1455 of yacc.c */
1707 #line 207 "xslpattern.y"
1708 { /* PrefixedName */
1709 xmlChar
const* registeredNsURI
= xmlXPathNsLookup(p
->ctx
, (yyvsp
[(1) - (3)]));
1710 TRACE("Got PrefixedName: \"%s:%s\"\n", (yyvsp
[(1) - (3)]), (yyvsp
[(3) - (3)]));
1712 if (registeredNsURI
)
1713 (yyval
)=xmlStrdup(U(""));
1715 (yyval
)=xmlStrdup(NameTest_mod_pre
);
1717 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(1) - (3)]));
1718 xmlFree((yyvsp
[(1) - (3)]));
1719 (yyval
)=xmlStrcat((yyval
),U(":"));
1720 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
1721 xmlFree((yyvsp
[(3) - (3)]));
1723 if (!registeredNsURI
)
1724 (yyval
)=xmlStrcat((yyval
),NameTest_mod_post
);
1730 /* Line 1455 of yacc.c */
1731 #line 226 "xslpattern.y"
1733 (yyval
)=xmlStrdup(NameTest_mod_pre
);
1734 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(1) - (1)]));
1735 xmlFree((yyvsp
[(1) - (1)]));
1736 (yyval
)=xmlStrcat((yyval
),NameTest_mod_post
);
1742 /* Line 1455 of yacc.c */
1743 #line 234 "xslpattern.y"
1745 (yyval
)=(yyvsp
[(1) - (2)]);
1746 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(2) - (2)]));
1747 xmlFree((yyvsp
[(2) - (2)]));
1753 /* Line 1455 of yacc.c */
1754 #line 242 "xslpattern.y"
1756 TRACE("Got Predicate: \"[%s]\"\n", (yyvsp
[(2) - (3)]));
1757 (yyval
)=xmlStrdup(U("["));
1758 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(2) - (3)]));
1759 xmlFree((yyvsp
[(2) - (3)]));
1760 (yyval
)=xmlStrcat((yyval
),U("]"));
1766 /* Line 1455 of yacc.c */
1767 #line 251 "xslpattern.y"
1769 (yyval
)=xmlStrdup(U("index()="));
1770 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(1) - (1)]));
1771 xmlFree((yyvsp
[(1) - (1)]));
1777 /* Line 1455 of yacc.c */
1778 #line 262 "xslpattern.y"
1780 TRACE("Got AbbreviatedAbsoluteLocationPath: \"//%s\"\n", (yyvsp
[(2) - (2)]));
1781 (yyval
)=xmlStrdup(U("//"));
1782 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(2) - (2)]));
1783 xmlFree((yyvsp
[(2) - (2)]));
1789 /* Line 1455 of yacc.c */
1790 #line 270 "xslpattern.y"
1792 TRACE("Got AbbreviatedRelativeLocationPath: \"%s//%s\"\n", (yyvsp
[(1) - (3)]), (yyvsp
[(3) - (3)]));
1793 (yyval
)=(yyvsp
[(1) - (3)]);
1794 (yyval
)=xmlStrcat((yyval
),U("//"));
1795 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
1796 xmlFree((yyvsp
[(3) - (3)]));
1802 /* Line 1455 of yacc.c */
1803 #line 279 "xslpattern.y"
1805 TRACE("Got AbbreviatedStep: \"..\"\n");
1806 (yyval
)=xmlStrdup(U(".."));
1812 /* Line 1455 of yacc.c */
1813 #line 284 "xslpattern.y"
1815 TRACE("Got AbbreviatedStep: \".\"\n");
1816 (yyval
)=xmlStrdup(U("."));
1822 /* Line 1455 of yacc.c */
1823 #line 302 "xslpattern.y"
1825 TRACE("Got PrimaryExpr: \"(%s)\"\n", (yyvsp
[(1) - (3)]));
1826 (yyval
)=xmlStrdup(U("("));
1827 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(2) - (3)]));
1828 xmlFree((yyvsp
[(2) - (3)]));
1829 (yyval
)=xmlStrcat((yyval
),U(")"));
1835 /* Line 1455 of yacc.c */
1836 #line 310 "xslpattern.y"
1838 TRACE("Got PrimaryExpr: \"%s!%s\"\n", (yyvsp
[(1) - (3)]), (yyvsp
[(3) - (3)]));
1839 (yyval
)=(yyvsp
[(1) - (3)]);
1840 (yyval
)=xmlStrcat((yyval
),U("/"));
1841 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
1842 xmlFree((yyvsp
[(3) - (3)]));
1848 /* Line 1455 of yacc.c */
1849 #line 322 "xslpattern.y"
1851 TRACE("Got FunctionCall: \"%s(%s)\"\n", (yyvsp
[(1) - (4)]), (yyvsp
[(3) - (4)]));
1852 if (xmlStrEqual((yyvsp
[(1) - (4)]),U("ancestor")))
1854 (yyval
)=(yyvsp
[(1) - (4)]);
1855 (yyval
)=xmlStrcat((yyval
),U("::"));
1856 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (4)]));
1857 xmlFree((yyvsp
[(3) - (4)]));
1859 else if (xmlStrEqual((yyvsp
[(1) - (4)]),U("attribute")))
1861 if (is_literal((yyvsp
[(3) - (4)])))
1863 (yyval
)=xmlStrdup(U("@*[name()="));
1864 xmlFree((yyvsp
[(1) - (4)]));
1865 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (4)]));
1866 xmlFree((yyvsp
[(3) - (4)]));
1867 (yyval
)=xmlStrcat((yyval
),U("]"));
1871 /* XML_XPATH_INVALID_TYPE */
1872 (yyval
)=xmlStrdup(U("error(1211, 'Error: attribute("));
1873 xmlFree((yyvsp
[(1) - (4)]));
1874 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (4)]));
1875 xmlFree((yyvsp
[(3) - (4)]));
1876 (yyval
)=xmlStrcat((yyval
),U("): invalid argument')"));
1879 else if (xmlStrEqual((yyvsp
[(1) - (4)]),U("element")))
1881 if (is_literal((yyvsp
[(3) - (4)])))
1883 (yyval
)=xmlStrdup(U("node()[nodeType()=1][name()="));
1884 xmlFree((yyvsp
[(1) - (4)]));
1885 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (4)]));
1886 xmlFree((yyvsp
[(3) - (4)]));
1887 (yyval
)=xmlStrcat((yyval
),U("]"));
1891 /* XML_XPATH_INVALID_TYPE */
1892 (yyval
)=xmlStrdup(U("error(1211, 'Error: element("));
1893 xmlFree((yyvsp
[(1) - (4)]));
1894 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (4)]));
1895 xmlFree((yyvsp
[(3) - (4)]));
1896 (yyval
)=xmlStrcat((yyval
),U("): invalid argument')"));
1901 (yyval
)=(yyvsp
[(1) - (4)]);
1902 (yyval
)=xmlStrcat((yyval
),U("("));
1903 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (4)]));
1904 xmlFree((yyvsp
[(3) - (4)]));
1905 (yyval
)=xmlStrcat((yyval
),U(")"));
1912 /* Line 1455 of yacc.c */
1913 #line 381 "xslpattern.y"
1915 TRACE("Got FunctionCall: \"%s()\"\n", (yyvsp
[(1) - (3)]));
1916 /* comment() & node() work the same in XPath */
1917 if (xmlStrEqual((yyvsp
[(1) - (3)]),U("attribute")))
1919 (yyval
)=xmlStrdup(U("@*"));
1920 xmlFree((yyvsp
[(1) - (3)]));
1922 else if (xmlStrEqual((yyvsp
[(1) - (3)]),U("element")))
1924 (yyval
)=xmlStrdup(U("node()[nodeType()=1]"));
1925 xmlFree((yyvsp
[(1) - (3)]));
1927 else if (xmlStrEqual((yyvsp
[(1) - (3)]),U("pi")))
1929 (yyval
)=xmlStrdup(U("processing-instruction()"));
1930 xmlFree((yyvsp
[(1) - (3)]));
1932 else if (xmlStrEqual((yyvsp
[(1) - (3)]),U("textnode")))
1934 (yyval
)=xmlStrdup(U("text()"));
1935 xmlFree((yyvsp
[(1) - (3)]));
1939 (yyval
)=(yyvsp
[(1) - (3)]);
1940 (yyval
)=xmlStrcat((yyval
),U("()"));
1947 /* Line 1455 of yacc.c */
1948 #line 412 "xslpattern.y"
1950 (yyval
)=(yyvsp
[(1) - (3)]);
1951 (yyval
)=xmlStrcat((yyval
),U(","));
1952 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
1953 xmlFree((yyvsp
[(3) - (3)]));
1959 /* Line 1455 of yacc.c */
1960 #line 425 "xslpattern.y"
1962 TRACE("Got UnionExpr: \"%s|%s\"\n", (yyvsp
[(1) - (3)]), (yyvsp
[(3) - (3)]));
1963 (yyval
)=(yyvsp
[(1) - (3)]);
1964 (yyval
)=xmlStrcat((yyval
),U("|"));
1965 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
1966 xmlFree((yyvsp
[(3) - (3)]));
1972 /* Line 1455 of yacc.c */
1973 #line 435 "xslpattern.y"
1975 TRACE("Got PathExpr: \"%s/%s\"\n", (yyvsp
[(1) - (3)]), (yyvsp
[(3) - (3)]));
1976 (yyval
)=(yyvsp
[(1) - (3)]);
1977 (yyval
)=xmlStrcat((yyval
),U("/"));
1978 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
1979 xmlFree((yyvsp
[(3) - (3)]));
1985 /* Line 1455 of yacc.c */
1986 #line 443 "xslpattern.y"
1988 TRACE("Got PathExpr: \"%s//%s\"\n", (yyvsp
[(1) - (3)]), (yyvsp
[(3) - (3)]));
1989 (yyval
)=(yyvsp
[(1) - (3)]);
1990 (yyval
)=xmlStrcat((yyval
),U("//"));
1991 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
1992 xmlFree((yyvsp
[(3) - (3)]));
1998 /* Line 1455 of yacc.c */
1999 #line 454 "xslpattern.y"
2001 TRACE("Got FilterExpr: \"%s%s\"\n", (yyvsp
[(1) - (2)]), (yyvsp
[(2) - (2)]));
2002 (yyval
)=(yyvsp
[(1) - (2)]);
2003 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(2) - (2)]));
2004 xmlFree((yyvsp
[(2) - (2)]));
2010 /* Line 1455 of yacc.c */
2011 #line 466 "xslpattern.y"
2013 TRACE("Got OrExpr: \"%s $or$ %s\"\n", (yyvsp
[(1) - (3)]), (yyvsp
[(3) - (3)]));
2014 (yyval
)=(yyvsp
[(1) - (3)]);
2015 (yyval
)=xmlStrcat((yyval
),U(" or "));
2016 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
2017 xmlFree((yyvsp
[(3) - (3)]));
2023 /* Line 1455 of yacc.c */
2024 #line 478 "xslpattern.y"
2026 TRACE("Got AndExpr: \"%s $and$ %s\"\n", (yyvsp
[(1) - (3)]), (yyvsp
[(3) - (3)]));
2027 (yyval
)=(yyvsp
[(1) - (3)]);
2028 (yyval
)=xmlStrcat((yyval
),U(" and "));
2029 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
2030 xmlFree((yyvsp
[(3) - (3)]));
2036 /* Line 1455 of yacc.c */
2037 #line 490 "xslpattern.y"
2039 TRACE("Got EqualityExpr: \"%s $eq$ %s\"\n", (yyvsp
[(1) - (3)]), (yyvsp
[(3) - (3)]));
2040 (yyval
)=(yyvsp
[(1) - (3)]);
2041 (yyval
)=xmlStrcat((yyval
),U("="));
2042 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
2043 xmlFree((yyvsp
[(3) - (3)]));
2049 /* Line 1455 of yacc.c */
2050 #line 498 "xslpattern.y"
2052 TRACE("Got EqualityExpr: \"%s $ieq$ %s\"\n", (yyvsp
[(1) - (3)]), (yyvsp
[(3) - (3)]));
2053 (yyval
)=xmlStrdup(U("OP_IEq("));
2054 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(1) - (3)]));
2055 xmlFree((yyvsp
[(1) - (3)]));
2056 (yyval
)=xmlStrcat((yyval
),U(","));
2057 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
2058 xmlFree((yyvsp
[(3) - (3)]));
2059 (yyval
)=xmlStrcat((yyval
),U(")"));
2065 /* Line 1455 of yacc.c */
2066 #line 509 "xslpattern.y"
2068 TRACE("Got EqualityExpr: \"%s $ne$ %s\"\n", (yyvsp
[(1) - (3)]), (yyvsp
[(3) - (3)]));
2069 (yyval
)=(yyvsp
[(1) - (3)]);
2070 (yyval
)=xmlStrcat((yyval
),U("!="));
2071 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
2072 xmlFree((yyvsp
[(3) - (3)]));
2078 /* Line 1455 of yacc.c */
2079 #line 517 "xslpattern.y"
2081 TRACE("Got EqualityExpr: \"%s $ine$ %s\"\n", (yyvsp
[(1) - (3)]), (yyvsp
[(3) - (3)]));
2082 (yyval
)=xmlStrdup(U("OP_INEq("));
2083 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(1) - (3)]));
2084 xmlFree((yyvsp
[(1) - (3)]));
2085 (yyval
)=xmlStrcat((yyval
),U(","));
2086 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
2087 xmlFree((yyvsp
[(3) - (3)]));
2088 (yyval
)=xmlStrcat((yyval
),U(")"));
2094 /* Line 1455 of yacc.c */
2095 #line 532 "xslpattern.y"
2097 TRACE("Got RelationalExpr: \"%s $lt$ %s\"\n", (yyvsp
[(1) - (3)]), (yyvsp
[(3) - (3)]));
2098 (yyval
)=(yyvsp
[(1) - (3)]);
2099 (yyval
)=xmlStrcat((yyval
),U("<"));
2100 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
2101 xmlFree((yyvsp
[(3) - (3)]));
2107 /* Line 1455 of yacc.c */
2108 #line 540 "xslpattern.y"
2110 TRACE("Got RelationalExpr: \"%s $ilt$ %s\"\n", (yyvsp
[(1) - (3)]), (yyvsp
[(3) - (3)]));
2111 (yyval
)=xmlStrdup(U("OP_ILt("));
2112 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(1) - (3)]));
2113 xmlFree((yyvsp
[(1) - (3)]));
2114 (yyval
)=xmlStrcat((yyval
),U(","));
2115 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
2116 xmlFree((yyvsp
[(3) - (3)]));
2117 (yyval
)=xmlStrcat((yyval
),U(")"));
2123 /* Line 1455 of yacc.c */
2124 #line 551 "xslpattern.y"
2126 TRACE("Got RelationalExpr: \"%s $gt$ %s\"\n", (yyvsp
[(1) - (3)]), (yyvsp
[(3) - (3)]));
2127 (yyval
)=(yyvsp
[(1) - (3)]);
2128 (yyval
)=xmlStrcat((yyval
),U(">"));
2129 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
2130 xmlFree((yyvsp
[(3) - (3)]));
2136 /* Line 1455 of yacc.c */
2137 #line 559 "xslpattern.y"
2139 TRACE("Got RelationalExpr: \"%s $igt$ %s\"\n", (yyvsp
[(1) - (3)]), (yyvsp
[(3) - (3)]));
2140 (yyval
)=xmlStrdup(U("OP_IGt("));
2141 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(1) - (3)]));
2142 xmlFree((yyvsp
[(1) - (3)]));
2143 (yyval
)=xmlStrcat((yyval
),U(","));
2144 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
2145 xmlFree((yyvsp
[(3) - (3)]));
2146 (yyval
)=xmlStrcat((yyval
),U(")"));
2152 /* Line 1455 of yacc.c */
2153 #line 570 "xslpattern.y"
2155 TRACE("Got RelationalExpr: \"%s $le$ %s\"\n", (yyvsp
[(1) - (3)]), (yyvsp
[(3) - (3)]));
2156 (yyval
)=(yyvsp
[(1) - (3)]);
2157 (yyval
)=xmlStrcat((yyval
),U("<="));
2158 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
2159 xmlFree((yyvsp
[(3) - (3)]));
2165 /* Line 1455 of yacc.c */
2166 #line 578 "xslpattern.y"
2168 TRACE("Got RelationalExpr: \"%s $ile$ %s\"\n", (yyvsp
[(1) - (3)]), (yyvsp
[(3) - (3)]));
2169 (yyval
)=xmlStrdup(U("OP_ILEq("));
2170 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(1) - (3)]));
2171 xmlFree((yyvsp
[(1) - (3)]));
2172 (yyval
)=xmlStrcat((yyval
),U(","));
2173 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
2174 xmlFree((yyvsp
[(3) - (3)]));
2175 (yyval
)=xmlStrcat((yyval
),U(")"));
2181 /* Line 1455 of yacc.c */
2182 #line 589 "xslpattern.y"
2184 TRACE("Got RelationalExpr: \"%s $ge$ %s\"\n", (yyvsp
[(1) - (3)]), (yyvsp
[(3) - (3)]));
2185 (yyval
)=(yyvsp
[(1) - (3)]);
2186 (yyval
)=xmlStrcat((yyval
),U(">="));
2187 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
2188 xmlFree((yyvsp
[(3) - (3)]));
2194 /* Line 1455 of yacc.c */
2195 #line 597 "xslpattern.y"
2197 TRACE("Got RelationalExpr: \"%s $ige$ %s\"\n", (yyvsp
[(1) - (3)]), (yyvsp
[(3) - (3)]));
2198 (yyval
)=xmlStrdup(U("OP_IGEq("));
2199 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(1) - (3)]));
2200 xmlFree((yyvsp
[(1) - (3)]));
2201 (yyval
)=xmlStrcat((yyval
),U(","));
2202 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
2203 xmlFree((yyvsp
[(3) - (3)]));
2204 (yyval
)=xmlStrcat((yyval
),U(")"));
2210 /* Line 1455 of yacc.c */
2211 #line 614 "xslpattern.y"
2213 TRACE("Got UnaryExpr: \"$not$ %s\"\n", (yyvsp
[(2) - (2)]));
2214 (yyval
)=xmlStrdup(U(" not("));
2215 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(2) - (2)]));
2216 xmlFree((yyvsp
[(2) - (2)]));
2217 (yyval
)=xmlStrcat((yyval
),U(")"));
2223 /* Line 1455 of yacc.c */
2224 #line 622 "xslpattern.y"
2226 TRACE("Got UnaryExpr: \"$any$ %s\"\n", (yyvsp
[(2) - (2)]));
2227 (yyval
)=xmlStrdup(U("boolean("));
2228 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(2) - (2)]));
2229 xmlFree((yyvsp
[(2) - (2)]));
2230 (yyval
)=xmlStrcat((yyval
),U(")"));
2236 /* Line 1455 of yacc.c */
2237 #line 630 "xslpattern.y"
2239 TRACE("Got UnaryExpr: \"$all$ %s\"\n", (yyvsp
[(2) - (2)]));
2240 (yyval
)=xmlStrdup(U("not("));
2241 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(2) - (2)]));
2242 xmlFree((yyvsp
[(2) - (2)]));
2243 (yyval
)=xmlStrcat((yyval
),U(")"));
2249 /* Line 1455 of yacc.c */
2250 #line 638 "xslpattern.y"
2252 FIXME("Unrecognized $all$ expression - ignoring\n");
2253 (yyval
)=xmlStrdup(U(""));
2259 /* Line 1455 of yacc.c */
2260 #line 644 "xslpattern.y"
2262 (yyval
)=(yyvsp
[(1) - (3)]);
2263 (yyval
)=xmlStrcat((yyval
),U("!="));
2264 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
2265 xmlFree((yyvsp
[(3) - (3)]));
2271 /* Line 1455 of yacc.c */
2272 #line 651 "xslpattern.y"
2274 (yyval
)=(yyvsp
[(1) - (3)]);
2275 (yyval
)=xmlStrcat((yyval
),U("="));
2276 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
2277 xmlFree((yyvsp
[(3) - (3)]));
2283 /* Line 1455 of yacc.c */
2284 #line 658 "xslpattern.y"
2286 (yyval
)=(yyvsp
[(1) - (3)]);
2287 (yyval
)=xmlStrcat((yyval
),U(">="));
2288 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
2289 xmlFree((yyvsp
[(3) - (3)]));
2295 /* Line 1455 of yacc.c */
2296 #line 665 "xslpattern.y"
2298 (yyval
)=(yyvsp
[(1) - (3)]);
2299 (yyval
)=xmlStrcat((yyval
),U(">"));
2300 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
2301 xmlFree((yyvsp
[(3) - (3)]));
2307 /* Line 1455 of yacc.c */
2308 #line 672 "xslpattern.y"
2310 (yyval
)=(yyvsp
[(1) - (3)]);
2311 (yyval
)=xmlStrcat((yyval
),U("<="));
2312 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
2313 xmlFree((yyvsp
[(3) - (3)]));
2319 /* Line 1455 of yacc.c */
2320 #line 679 "xslpattern.y"
2322 (yyval
)=(yyvsp
[(1) - (3)]);
2323 (yyval
)=xmlStrcat((yyval
),U("<"));
2324 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
2325 xmlFree((yyvsp
[(3) - (3)]));
2331 /* Line 1455 of yacc.c */
2332 #line 686 "xslpattern.y"
2334 (yyval
)=xmlStrdup(U("OP_INEq("));
2335 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(1) - (3)]));
2336 xmlFree((yyvsp
[(1) - (3)]));
2337 (yyval
)=xmlStrcat((yyval
),U(","));
2338 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
2339 xmlFree((yyvsp
[(3) - (3)]));
2340 (yyval
)=xmlStrcat((yyval
),U(")"));
2346 /* Line 1455 of yacc.c */
2347 #line 696 "xslpattern.y"
2349 (yyval
)=xmlStrdup(U("OP_IEq("));
2350 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(1) - (3)]));
2351 xmlFree((yyvsp
[(1) - (3)]));
2352 (yyval
)=xmlStrcat((yyval
),U(","));
2353 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
2354 xmlFree((yyvsp
[(3) - (3)]));
2355 (yyval
)=xmlStrcat((yyval
),U(")"));
2361 /* Line 1455 of yacc.c */
2362 #line 706 "xslpattern.y"
2364 (yyval
)=xmlStrdup(U("OP_IGEq("));
2365 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(1) - (3)]));
2366 xmlFree((yyvsp
[(1) - (3)]));
2367 (yyval
)=xmlStrcat((yyval
),U(","));
2368 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
2369 xmlFree((yyvsp
[(3) - (3)]));
2370 (yyval
)=xmlStrcat((yyval
),U(")"));
2376 /* Line 1455 of yacc.c */
2377 #line 716 "xslpattern.y"
2379 (yyval
)=xmlStrdup(U("OP_IGt("));
2380 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(1) - (3)]));
2381 xmlFree((yyvsp
[(1) - (3)]));
2382 (yyval
)=xmlStrcat((yyval
),U(","));
2383 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
2384 xmlFree((yyvsp
[(3) - (3)]));
2385 (yyval
)=xmlStrcat((yyval
),U(")"));
2391 /* Line 1455 of yacc.c */
2392 #line 726 "xslpattern.y"
2394 (yyval
)=xmlStrdup(U("OP_ILEq("));
2395 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(1) - (3)]));
2396 xmlFree((yyvsp
[(1) - (3)]));
2397 (yyval
)=xmlStrcat((yyval
),U(","));
2398 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
2399 xmlFree((yyvsp
[(3) - (3)]));
2400 (yyval
)=xmlStrcat((yyval
),U(")"));
2406 /* Line 1455 of yacc.c */
2407 #line 736 "xslpattern.y"
2409 (yyval
)=xmlStrdup(U("OP_ILt("));
2410 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(1) - (3)]));
2411 xmlFree((yyvsp
[(1) - (3)]));
2412 (yyval
)=xmlStrcat((yyval
),U(","));
2413 (yyval
)=xmlStrcat((yyval
),(yyvsp
[(3) - (3)]));
2414 xmlFree((yyvsp
[(3) - (3)]));
2415 (yyval
)=xmlStrcat((yyval
),U(")"));
2421 /* Line 1455 of yacc.c */
2422 #line 2423 "xslpattern.tab.c"
2425 YY_SYMBOL_PRINT ("-> $$ =", yyr1
[yyn
], &yyval
, &yyloc
);
2429 YY_STACK_PRINT (yyss
, yyssp
);
2433 /* Now `shift' the result of the reduction. Determine what state
2434 that goes to, based on the state we popped back to and the rule
2435 number reduced by. */
2439 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
2440 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
2441 yystate
= yytable
[yystate
];
2443 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
2448 /*------------------------------------.
2449 | yyerrlab -- here on detecting error |
2450 `------------------------------------*/
2452 /* If not already recovering from an error, report this error. */
2456 #if ! YYERROR_VERBOSE
2457 yyerror (p
, scanner
, YY_("syntax error"));
2460 YYSIZE_T yysize
= yysyntax_error (0, yystate
, yychar
);
2461 if (yymsg_alloc
< yysize
&& yymsg_alloc
< YYSTACK_ALLOC_MAXIMUM
)
2463 YYSIZE_T yyalloc
= 2 * yysize
;
2464 if (! (yysize
<= yyalloc
&& yyalloc
<= YYSTACK_ALLOC_MAXIMUM
))
2465 yyalloc
= YYSTACK_ALLOC_MAXIMUM
;
2466 if (yymsg
!= yymsgbuf
)
2467 YYSTACK_FREE (yymsg
);
2468 yymsg
= (char *) YYSTACK_ALLOC (yyalloc
);
2470 yymsg_alloc
= yyalloc
;
2474 yymsg_alloc
= sizeof yymsgbuf
;
2478 if (0 < yysize
&& yysize
<= yymsg_alloc
)
2480 (void) yysyntax_error (yymsg
, yystate
, yychar
);
2481 yyerror (p
, scanner
, yymsg
);
2485 yyerror (p
, scanner
, YY_("syntax error"));
2487 goto yyexhaustedlab
;
2495 if (yyerrstatus
== 3)
2497 /* If just tried and failed to reuse lookahead token after an
2498 error, discard it. */
2500 if (yychar
<= YYEOF
)
2502 /* Return failure if at end of input. */
2503 if (yychar
== YYEOF
)
2508 yydestruct ("Error: discarding",
2509 yytoken
, &yylval
, p
, scanner
);
2514 /* Else will try to reuse lookahead token after shifting the error
2519 /*---------------------------------------------------.
2520 | yyerrorlab -- error raised explicitly by YYERROR. |
2521 `---------------------------------------------------*/
2524 /* Pacify compilers like GCC when the user code never invokes
2525 YYERROR and the label yyerrorlab therefore never appears in user
2527 if (/*CONSTCOND*/ 0)
2530 /* Do not reclaim the symbols of the rule which action triggered
2534 YY_STACK_PRINT (yyss
, yyssp
);
2539 /*-------------------------------------------------------------.
2540 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2541 `-------------------------------------------------------------*/
2543 yyerrstatus
= 3; /* Each real token shifted decrements this. */
2547 yyn
= yypact
[yystate
];
2548 if (yyn
!= YYPACT_NINF
)
2551 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
2559 /* Pop the current state because it cannot handle the error token. */
2564 yydestruct ("Error: popping",
2565 yystos
[yystate
], yyvsp
, p
, scanner
);
2568 YY_STACK_PRINT (yyss
, yyssp
);
2574 /* Shift the error token. */
2575 YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
);
2581 /*-------------------------------------.
2582 | yyacceptlab -- YYACCEPT comes here. |
2583 `-------------------------------------*/
2588 /*-----------------------------------.
2589 | yyabortlab -- YYABORT comes here. |
2590 `-----------------------------------*/
2595 #if !defined(yyoverflow) || YYERROR_VERBOSE
2596 /*-------------------------------------------------.
2597 | yyexhaustedlab -- memory exhaustion comes here. |
2598 `-------------------------------------------------*/
2600 yyerror (p
, scanner
, YY_("memory exhausted"));
2606 if (yychar
!= YYEMPTY
)
2607 yydestruct ("Cleanup: discarding lookahead",
2608 yytoken
, &yylval
, p
, scanner
);
2609 /* Do not reclaim the symbols of the rule which action triggered
2610 this YYABORT or YYACCEPT. */
2612 YY_STACK_PRINT (yyss
, yyssp
);
2613 while (yyssp
!= yyss
)
2615 yydestruct ("Cleanup: popping",
2616 yystos
[*yyssp
], yyvsp
, p
, scanner
);
2621 YYSTACK_FREE (yyss
);
2624 if (yymsg
!= yymsgbuf
)
2625 YYSTACK_FREE (yymsg
);
2627 /* Make sure YYID is used. */
2628 return YYID (yyresult
);
2633 /* Line 1675 of yacc.c */
2634 #line 747 "xslpattern.y"
2637 #endif /* HAVE_LIBXML2 */