48 #define YYBISON_VERSION "2.4.2"
51 #define YYSKELETON_NAME "yacc.c"
63 #define YYLSP_NEEDED 0
66 #define yyparse khtmlxpathyyparse
67 #define yylex khtmlxpathyylex
68 #define yyerror khtmlxpathyyerror
69 #define yylval khtmlxpathyylval
70 #define yychar khtmlxpathyychar
71 #define yydebug khtmlxpathyydebug
72 #define yynerrs khtmlxpathyynerrs
93 #include "xml/dom_stringimpl.h"
94 #include "xml/dom3_xpathimpl.h"
97 using namespace DOM::XPath;
98 using namespace khtml;
99 using namespace khtml::XPath;
117 #line 118 "parser.tab.c"
125 #ifdef YYERROR_VERBOSE
126 # undef YYERROR_VERBOSE
127 # define YYERROR_VERBOSE 1
129 # define YYERROR_VERBOSE 0
133 #ifndef YYTOKEN_TABLE
134 # define YYTOKEN_TABLE 0
167 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
188 #line 189 "parser.tab.c"
190 # define YYSTYPE_IS_TRIVIAL 1
191 # define yystype YYSTYPE
192 # define YYSTYPE_IS_DECLARED 1
204 #line 205 "parser.tab.c"
218 #elif (defined __STDC__ || defined __C99__FUNC__ \
219 || defined __cplusplus || defined _MSC_VER)
238 # ifdef __SIZE_TYPE__
239 # define YYSIZE_T __SIZE_TYPE__
240 # elif defined size_t
241 # define YYSIZE_T size_t
242 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
243 || defined __cplusplus || defined _MSC_VER)
245 # define YYSIZE_T size_t
247 # define YYSIZE_T unsigned int
251 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
254 # if defined YYENABLE_NLS && YYENABLE_NLS
256 # include <libintl.h>
257 # define YY_(msgid) dgettext ("bison-runtime", msgid)
261 # define YY_(msgid) msgid
266 #if ! defined lint || defined __GNUC__
267 # define YYUSE(e) ((void) (e))
276 #if (defined __STDC__ || defined __C99__FUNC__ \
277 || defined __cplusplus || defined _MSC_VER)
290 #if ! defined yyoverflow || YYERROR_VERBOSE
294 # ifdef YYSTACK_USE_ALLOCA
295 # if YYSTACK_USE_ALLOCA
297 # define YYSTACK_ALLOC __builtin_alloca
298 # elif defined __BUILTIN_VA_ARG_INCR
301 # define YYSTACK_ALLOC __alloca
302 # elif defined _MSC_VER
304 # define alloca _alloca
306 # define YYSTACK_ALLOC alloca
307 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
308 || defined __cplusplus || defined _MSC_VER)
318 # ifdef YYSTACK_ALLOC
320 # define YYSTACK_FREE(Ptr) do { ; } while (YYID (0))
321 # ifndef YYSTACK_ALLOC_MAXIMUM
326 # define YYSTACK_ALLOC_MAXIMUM 4032
329 # define YYSTACK_ALLOC YYMALLOC
330 # define YYSTACK_FREE YYFREE
331 # ifndef YYSTACK_ALLOC_MAXIMUM
332 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
334 # if (defined __cplusplus && ! defined _STDLIB_H \
335 && ! ((defined YYMALLOC || defined malloc) \
336 && (defined YYFREE || defined free)))
343 # define YYMALLOC malloc
344 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
345 || defined __cplusplus || defined _MSC_VER)
351 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
352 || defined __cplusplus || defined _MSC_VER)
360 #if (! defined yyoverflow \
361 && (! defined __cplusplus \
362 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
372 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
376 # define YYSTACK_BYTES(N) \
377 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
378 + YYSTACK_GAP_MAXIMUM)
383 # if defined __GNUC__ && 1 < __GNUC__
384 # define YYCOPY(To, From, Count) \
385 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
387 # define YYCOPY(To, From, Count) \
391 for (yyi = 0; yyi < (Count); yyi++) \
392 (To)[yyi] = (From)[yyi]; \
403 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
406 YYSIZE_T yynewbytes; \
407 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
408 Stack = &yyptr->Stack_alloc; \
409 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
410 yyptr += yynewbytes / sizeof (*yyptr); \
432 #define YYMAXUTOK 275
434 #define YYTRANSLATE(YYX) \
435 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
440 0, 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, 2, 2, 2, 2, 2, 2,
443 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
444 23, 24, 2, 2, 28, 2, 27, 21, 2, 2,
445 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
446 2, 2, 2, 2, 22, 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, 25, 2, 26, 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, 29, 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, 2, 2, 2, 2,
465 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
466 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
467 15, 16, 17, 18, 19, 20
475 0, 0, 3, 5, 7, 9, 11, 14, 17, 19,
476 23, 27, 29, 32, 35, 39, 41, 43, 45, 47,
477 51, 55, 60, 62, 65, 69, 71, 73, 75, 77,
478 81, 83, 85, 87, 91, 96, 98, 102, 104, 106,
479 110, 112, 114, 118, 122, 124, 127, 129, 133, 135,
480 139, 141, 145, 147, 151, 153, 157, 161, 163, 167,
487 31, 0, -1, 49, -1, 34, -1, 33, -1, 21,
488 -1, 21, 34, -1, 40, 34, -1, 35, -1, 34,
489 21, 35, -1, 34, 40, 35, -1, 37, -1, 37,
490 38, -1, 36, 37, -1, 36, 37, 38, -1, 41,
491 -1, 10, -1, 22, -1, 19, -1, 11, 23, 24,
492 -1, 12, 23, 24, -1, 12, 23, 14, 24, -1,
493 39, -1, 38, 39, -1, 25, 31, 26, -1, 18,
494 -1, 27, -1, 17, -1, 15, -1, 23, 31, 24,
495 -1, 14, -1, 16, -1, 43, -1, 13, 23, 24,
496 -1, 13, 23, 44, 24, -1, 45, -1, 44, 28,
497 45, -1, 31, -1, 47, -1, 46, 29, 47, -1,
498 32, -1, 48, -1, 48, 21, 34, -1, 48, 40,
499 34, -1, 42, -1, 42, 38, -1, 50, -1, 49,
500 9, 50, -1, 51, -1, 50, 8, 51, -1, 52,
501 -1, 51, 3, 52, -1, 53, -1, 52, 4, 53,
502 -1, 54, -1, 53, 7, 54, -1, 53, 6, 54,
503 -1, 55, -1, 54, 5, 55, -1, 46, -1, 6,
510 0, 93, 93, 100, 105, 112, 117, 122, 130, 136,
511 141, 149, 155, 162, 168, 175, 179, 181, 188, 202,
512 207, 209, 220, 226, 233, 240, 247, 252, 259, 265,
513 270, 276, 282, 286, 298, 312, 318, 325, 330, 332,
514 341, 346, 351, 356, 364, 369, 376, 378, 385, 387,
515 394, 396, 403, 405, 412, 414, 419, 426, 428, 435,
520 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
525 "$end",
"error",
"$undefined",
"EQOP",
"RELOP",
"MULOP",
"MINUS",
526 "PLUS",
"AND",
"OR",
"AXISNAME",
"NODETYPE",
"PI",
"FUNCTIONNAME",
527 "LITERAL",
"VARIABLEREFERENCE",
"NUMBER",
"DOTDOT",
"SLASHSLASH",
528 "NAMETEST",
"ERROR",
"'/'",
"'@'",
"'('",
"')'",
"'['",
"']'",
"'.'",
529 "','",
"'|'",
"$accept",
"Expr",
"LocationPath",
"AbsoluteLocationPath",
530 "RelativeLocationPath",
"Step",
"AxisSpecifier",
"NodeTest",
531 "PredicateList",
"Predicate",
"DescendantOrSelf",
"AbbreviatedStep",
532 "PrimaryExpr",
"FunctionCall",
"ArgumentList",
"Argument",
"UnionExpr",
533 "PathExpr",
"FilterExpr",
"OrExpr",
"AndExpr",
"EqualityExpr",
534 "RelationalExpr",
"AdditiveExpr",
"MultiplicativeExpr",
"UnaryExpr", 0
543 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
544 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
545 275, 47, 64, 40, 41, 91, 93, 46, 44, 124
552 0, 30, 31, 32, 32, 33, 33, 33, 34, 34,
553 34, 35, 35, 35, 35, 35, 36, 36, 37, 37,
554 37, 37, 38, 38, 39, 40, 41, 41, 42, 42,
555 42, 42, 42, 43, 43, 44, 44, 45, 46, 46,
556 47, 47, 47, 47, 48, 48, 49, 49, 50, 50,
557 51, 51, 52, 52, 53, 53, 53, 54, 54, 55,
564 0, 2, 1, 1, 1, 1, 2, 2, 1, 3,
565 3, 1, 2, 2, 3, 1, 1, 1, 1, 3,
566 3, 4, 1, 2, 3, 1, 1, 1, 1, 3,
567 1, 1, 1, 3, 4, 1, 3, 1, 1, 3,
568 1, 1, 3, 3, 1, 2, 1, 3, 1, 3,
569 1, 3, 1, 3, 1, 3, 3, 1, 3, 1,
578 0, 0, 16, 0, 0, 0, 30, 28, 31, 27,
579 25, 18, 5, 17, 0, 26, 0, 40, 4, 3,
580 8, 0, 11, 0, 15, 44, 32, 59, 38, 41,
581 2, 46, 48, 50, 52, 54, 57, 60, 0, 0,
582 0, 6, 0, 1, 0, 0, 13, 0, 12, 22,
583 7, 45, 0, 0, 0, 0, 0, 0, 0, 0,
584 0, 0, 19, 0, 20, 33, 37, 0, 35, 29,
585 9, 10, 14, 0, 23, 39, 42, 43, 47, 49,
586 51, 53, 56, 55, 58, 21, 34, 0, 24, 36
592 -1, 66, 17, 18, 19, 20, 21, 22, 48, 49,
593 23, 24, 25, 26, 67, 68, 27, 28, 29, 30,
594 31, 32, 33, 34, 35, 36
599 #define YYPACT_NINF -45
602 70, 70, -45, -17, 4, 14, -45, -45, -45, -45,
603 -45, -45, -2, -45, 70, -45, 39, -45, -45, 3,
604 -45, 19, 17, -2, -45, 17, -45, 18, -45, 15,
605 34, 38, 45, 46, 6, 47, -45, -45, 27, 5,
606 51, 3, 29, -45, -2, -2, 17, 70, 17, -45,
607 3, 17, 88, -2, -2, 70, 70, 70, 70, 70,
608 70, 70, -45, 30, -45, -45, -45, -6, -45, -45,
609 -45, -45, 17, 53, -45, -45, 3, 3, 38, 45,
610 46, 6, 47, 47, -45, -45, -45, 70, -45, -45
616 -45, 2, -45, -45, -9, -10, -45, 35, -20, -44,
617 -18, -45, -45, -45, -45, -32, -45, 25, -45, -45,
618 16, 40, 33, 36, -19, -1
625 #define YYTABLE_NINF -1
628 37, 45, 16, 41, 74, 51, 38, 74, 2, 3,
629 4, 54, 59, 60, 50, 9, 42, 11, 86, 63,
630 13, 10, 87, 45, 44, 15, 72, 39, 74, 64,
631 3, 4, 45, 10, 70, 71, 53, 40, 11, 43,
632 82, 83, 47, 55, 76, 77, 56, 52, 57, 73,
633 58, 62, 61, 69, 85, 89, 46, 1, 45, 45,
634 84, 2, 3, 4, 5, 6, 7, 8, 9, 10,
635 11, 78, 12, 13, 14, 65, 1, 75, 15, 88,
636 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
637 80, 12, 13, 14, 81, 0, 79, 15, 2, 3,
638 4, 5, 6, 7, 8, 9, 10, 11, 0, 12,
644 1, 19, 0, 12, 48, 25, 23, 51, 10, 11,
645 12, 29, 6, 7, 23, 17, 14, 19, 24, 14,
646 22, 18, 28, 41, 21, 27, 46, 23, 72, 24,
647 11, 12, 50, 18, 44, 45, 21, 23, 19, 0,
648 59, 60, 25, 9, 53, 54, 8, 29, 3, 47,
649 4, 24, 5, 24, 24, 87, 21, 6, 76, 77,
650 61, 10, 11, 12, 13, 14, 15, 16, 17, 18,
651 19, 55, 21, 22, 23, 24, 6, 52, 27, 26,
652 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
653 57, 21, 22, 23, 58, -1, 56, 27, 10, 11,
654 12, 13, 14, 15, 16, 17, 18, 19, -1, 21,
655 22, 23, -1, -1, -1, 27
662 0, 6, 10, 11, 12, 13, 14, 15, 16, 17,
663 18, 19, 21, 22, 23, 27, 31, 32, 33, 34,
664 35, 36, 37, 40, 41, 42, 43, 46, 47, 48,
665 49, 50, 51, 52, 53, 54, 55, 55, 23, 23,
666 23, 34, 31, 0, 21, 40, 37, 25, 38, 39,
667 34, 38, 29, 21, 40, 9, 8, 3, 4, 6,
668 7, 5, 24, 14, 24, 24, 31, 44, 45, 24,
669 35, 35, 38, 31, 39, 47, 34, 34, 50, 51,
670 52, 53, 54, 54, 55, 24, 24, 28, 26, 45
673 #define yyerrok (yyerrstatus = 0)
674 #define yyclearin (yychar = YYEMPTY)
678 #define YYACCEPT goto yyacceptlab
679 #define YYABORT goto yyabortlab
680 #define YYERROR goto yyerrorlab
690 #define YYFAIL goto yyerrlab
698 #define YYRECOVERING() (!!yyerrstatus)
700 #define YYBACKUP(Token, Value) \
702 if (yychar == YYEMPTY && yylen == 1) \
706 yytoken = YYTRANSLATE (yychar); \
712 yyerror (YY_("syntax error: cannot back up")); \
719 #define YYERRCODE 256
726 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
727 #ifndef YYLLOC_DEFAULT
728 # define YYLLOC_DEFAULT(Current, Rhs, N) \
732 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
733 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
734 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
735 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
739 (Current).first_line = (Current).last_line = \
740 YYRHSLOC (Rhs, 0).last_line; \
741 (Current).first_column = (Current).last_column = \
742 YYRHSLOC (Rhs, 0).last_column; \
752 #ifndef YY_LOCATION_PRINT
753 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
754 # define YY_LOCATION_PRINT(File, Loc) \
755 fprintf (File, "%d.%d-%d.%d", \
756 (Loc).first_line, (Loc).first_column, \
757 (Loc).last_line, (Loc).last_column)
759 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
767 # define YYLEX yylex (YYLEX_PARAM)
769 # define YYLEX yylex ()
777 # define YYFPRINTF fprintf
780 # define YYDPRINTF(Args) \
786 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
790 YYFPRINTF (stderr, "%s ", Title); \
791 yy_symbol_print (stderr, \
793 YYFPRINTF (stderr, "\n"); \
803 #if (defined __STDC__ || defined __C99__FUNC__ \
804 || defined __cplusplus || defined _MSC_VER)
819 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
835 #if (defined __STDC__ || defined __C99__FUNC__ \
836 || defined __cplusplus || defined _MSC_VER)
844 YYSTYPE const * const yyvaluep;
861 #if (defined __STDC__ || defined __C99__FUNC__ \
862 || defined __cplusplus || defined _MSC_VER)
873 for (; yybottom <=
yytop; yybottom++)
875 int yybot = *yybottom;
881 # define YY_STACK_PRINT(Bottom, Top) \
884 yy_stack_print ((Bottom), (Top)); \
892 #if (defined __STDC__ || defined __C99__FUNC__ \
893 || defined __cplusplus || defined _MSC_VER)
906 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
909 for (yyi = 0; yyi < yynrhs; yyi++)
913 &(yyvsp[(yyi + 1) - (yynrhs)])
919 # define YY_REDUCE_PRINT(Rule) \
922 yy_reduce_print (yyvsp, Rule); \
929 # define YYDPRINTF(Args)
930 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
931 # define YY_STACK_PRINT(Bottom, Top)
932 # define YY_REDUCE_PRINT(Rule)
938 # define YYINITDEPTH 200
949 # define YYMAXDEPTH 10000
957 # if defined __GLIBC__ && defined _STRING_H
958 # define yystrlen strlen
961 #if (defined __STDC__ || defined __C99__FUNC__ \
962 || defined __cplusplus || defined _MSC_VER)
964 yystrlen (
const char *yystr)
972 for (yylen = 0; yystr[yylen]; yylen++)
980 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
981 # define yystpcpy stpcpy
985 #if (defined __STDC__ || defined __C99__FUNC__ \
986 || defined __cplusplus || defined _MSC_VER)
988 yystpcpy (
char *yydest,
const char *yysrc)
991 yystpcpy (yydest, yysrc)
997 const char *yys = yysrc;
999 while ((*yyd++ = *yys++) !=
'\0')
1016 yytnamerr (
char *yyres,
const char *yystr)
1021 char const *yyp = yystr;
1028 goto do_not_strip_quotes;
1032 goto do_not_strip_quotes;
1045 do_not_strip_quotes: ;
1049 return yystrlen (yystr);
1051 return yystpcpy (yyres, yystr) - yyres;
1063 yysyntax_error (
char *yyresult,
int yystate,
int yychar)
1065 int yyn =
yypact[yystate];
1075 int yysize_overflow = 0;
1076 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1077 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1083 YY_(
"syntax error, unexpected %s");
1084 YY_(
"syntax error, unexpected %s, expecting %s");
1085 YY_(
"syntax error, unexpected %s, expecting %s or %s");
1086 YY_(
"syntax error, unexpected %s, expecting %s or %s or %s");
1087 YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s");
1091 static char const yyunexpected[] =
"syntax error, unexpected %s";
1092 static char const yyexpecting[] =
", expecting %s";
1093 static char const yyor[] =
" or %s";
1094 char yyformat[
sizeof yyunexpected
1095 +
sizeof yyexpecting - 1
1096 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1097 * (
sizeof yyor - 1))];
1098 char const *yyprefix = yyexpecting;
1102 int yyxbegin = yyn < 0 ? -yyn : 0;
1105 int yychecklim =
YYLAST - yyn + 1;
1110 yyfmt = yystpcpy (yyformat, yyunexpected);
1112 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1115 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1119 yyformat[
sizeof yyunexpected - 1] =
'\0';
1122 yyarg[yycount++] =
yytname[yyx];
1123 yysize1 = yysize + yytnamerr (0,
yytname[yyx]);
1124 yysize_overflow |= (yysize1 < yysize);
1126 yyfmt = yystpcpy (yyfmt, yyprefix);
1130 yyf =
YY_(yyformat);
1131 yysize1 = yysize + yystrlen (yyf);
1132 yysize_overflow |= (yysize1 < yysize);
1135 if (yysize_overflow)
1143 char *yyp = yyresult;
1145 while ((*yyp = *yyf) !=
'\0')
1147 if (*yyp ==
'%' && yyf[1] ==
's' && yyi < yycount)
1149 yyp += yytnamerr (yyp, yyarg[yyi++]);
1170 #if (defined __STDC__ || defined __C99__FUNC__ \
1171 || defined __cplusplus || defined _MSC_VER)
1197 #ifdef YYPARSE_PARAM
1198 #if defined __STDC__ || defined __cplusplus
1199 int yyparse (
void *YYPARSE_PARAM);
1204 #if defined __STDC__ || defined __cplusplus
1227 #ifdef YYPARSE_PARAM
1228 #if (defined __STDC__ || defined __C99__FUNC__ \
1229 || defined __cplusplus || defined _MSC_VER)
1235 void *YYPARSE_PARAM;
1238 #if (defined __STDC__ || defined __C99__FUNC__ \
1239 || defined __cplusplus || defined _MSC_VER)
1285 char *yymsg = yymsgbuf;
1286 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1289 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1300 YYDPRINTF ((stderr,
"Starting parse\n"));
1327 if (yyss + yystacksize - 1 <= yyssp)
1330 YYSIZE_T yysize = yyssp - yyss + 1;
1344 yyoverflow (
YY_(
"memory exhausted"),
1345 &yyss1, yysize *
sizeof (*yyssp),
1346 &yyvs1, yysize *
sizeof (*yyvsp),
1353 # ifndef YYSTACK_RELOCATE
1354 goto yyexhaustedlab;
1358 goto yyexhaustedlab;
1365 union yyalloc *yyptr =
1368 goto yyexhaustedlab;
1371 # undef YYSTACK_RELOCATE
1378 yyssp = yyss + yysize - 1;
1379 yyvsp = yyvs + yysize - 1;
1381 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1382 (
unsigned long int) yystacksize));
1384 if (yyss + yystacksize - 1 <= yyssp)
1388 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1413 YYDPRINTF ((stderr,
"Reading a token: "));
1417 if (yychar <=
YYEOF)
1419 yychar = yytoken =
YYEOF;
1420 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1484 yyval = yyvsp[1-yylen];
1495 _topExpr = (yyvsp[(1) - (1)].expr);
1502 #line 101 "parser.y"
1504 (yyval.locationPath)->m_absolute =
false;
1511 #line 106 "parser.y"
1513 (yyval.locationPath)->m_absolute =
true;
1520 #line 113 "parser.y"
1529 #line 118 "parser.y"
1531 (yyval.locationPath) = (yyvsp[(2) - (2)].locationPath);
1538 #line 123 "parser.y"
1540 (yyval.locationPath) = (yyvsp[(2) - (2)].locationPath);
1541 (yyval.locationPath)->m_steps.prepend( (yyvsp[(1) - (2)].step) );
1548 #line 131 "parser.y"
1551 (yyval.locationPath)->m_steps.append( (yyvsp[(1) - (1)].step) );
1558 #line 137 "parser.y"
1560 (yyval.locationPath)->m_steps.append( (yyvsp[(3) - (3)].step) );
1567 #line 142 "parser.y"
1569 (yyval.locationPath)->m_steps.append( (yyvsp[(2) - (3)].step) );
1570 (yyval.locationPath)->m_steps.append( (yyvsp[(3) - (3)].step) );
1577 #line 150 "parser.y"
1579 (yyval.step) =
new Step( Step::ChildAxis, *(yyvsp[(1) - (1)].str) );
1580 delete (yyvsp[(1) - (1)].str);
1587 #line 156 "parser.y"
1589 (yyval.step) =
new Step( Step::ChildAxis, *(yyvsp[(1) - (2)].str), *(yyvsp[(2) - (2)].predList) );
1590 delete (yyvsp[(1) - (2)].str);
1591 delete (yyvsp[(2) - (2)].predList);
1598 #line 163 "parser.y"
1600 (yyval.step) =
new Step( (yyvsp[(1) - (2)].axisType), *(yyvsp[(2) - (2)].str) );
1601 delete (yyvsp[(2) - (2)].str);
1608 #line 169 "parser.y"
1610 (yyval.step) =
new Step( (yyvsp[(1) - (3)].axisType), *(yyvsp[(2) - (3)].str), *(yyvsp[(3) - (3)].predList) );
1611 delete (yyvsp[(2) - (3)].str);
1612 delete (yyvsp[(3) - (3)].predList);
1619 #line 182 "parser.y"
1621 (yyval.axisType) = Step::AttributeAxis;
1628 #line 189 "parser.y"
1630 const int colon = (yyvsp[(1) - (1)].str)->
find(
':' );
1633 XPathNSResolverImpl *resolver = Expression::evaluationContext().resolver;
1634 if ( !resolver || resolver->lookupNamespaceURI( prefix ).isNull() ) {
1635 kWarning(6011) <<
"Found unknown namespace prefix " << prefix.
string();
1646 #line 203 "parser.y"
1655 #line 210 "parser.y"
1657 QString s = (yyvsp[(1) - (4)].str)->
string() + QLatin1Char(
' ') + (yyvsp[(3) - (4)].str)->
string();
1660 delete (yyvsp[(1) - (4)].str);
1661 delete (yyvsp[(3) - (4)].str);
1668 #line 221 "parser.y"
1671 (yyval.predList)->append(
new Predicate( (yyvsp[(1) - (1)].expr) ) );
1678 #line 227 "parser.y"
1680 (yyval.predList)->append(
new Predicate( (yyvsp[(2) - (2)].expr) ) );
1687 #line 234 "parser.y"
1689 (yyval.expr) = (yyvsp[(2) - (3)].expr);
1696 #line 241 "parser.y"
1698 (yyval.step) =
new Step( Step::DescendantOrSelfAxis,
"node()" );
1705 #line 248 "parser.y"
1707 (yyval.step) =
new Step( Step::SelfAxis,
"node()" );
1714 #line 253 "parser.y"
1716 (yyval.step) =
new Step( Step::ParentAxis,
"node()" );
1723 #line 260 "parser.y"
1726 delete (yyvsp[(1) - (1)].str);
1733 #line 266 "parser.y"
1735 (yyval.expr) = (yyvsp[(2) - (3)].expr);
1742 #line 271 "parser.y"
1744 (yyval.expr) =
new String( *(yyvsp[(1) - (1)].str) );
1745 delete (yyvsp[(1) - (1)].str);
1752 #line 277 "parser.y"
1754 (yyval.expr) =
new Number( (yyvsp[(1) - (1)].str)->toFloat() );
1755 delete (yyvsp[(1) - (1)].str);
1762 #line 287 "parser.y"
1765 delete (yyvsp[(1) - (3)].str);
1778 #line 299 "parser.y"
1781 delete (yyvsp[(1) - (4)].str);
1782 delete (yyvsp[(3) - (4)].argList);
1794 #line 313 "parser.y"
1797 (yyval.argList)->append( (yyvsp[(1) - (1)].expr) );
1804 #line 319 "parser.y"
1806 (yyval.argList)->append( (yyvsp[(3) - (3)].expr) );
1813 #line 333 "parser.y"
1815 (yyval.expr) =
new Union;
1816 (yyval.expr)->addSubExpression( (yyvsp[(1) - (3)].expr) );
1817 (yyval.expr)->addSubExpression( (yyvsp[(3) - (3)].expr) );
1824 #line 342 "parser.y"
1826 (yyval.expr) = (yyvsp[(1) - (1)].locationPath);
1833 #line 347 "parser.y"
1835 (yyval.expr) = (yyvsp[(1) - (1)].expr);
1842 #line 352 "parser.y"
1844 (yyval.expr) =
new Path( static_cast<Filter *>( (yyvsp[(1) - (3)].expr) ), (yyvsp[(3) - (3)].locationPath) );
1851 #line 357 "parser.y"
1853 (yyvsp[(3) - (3)].locationPath)->m_steps.prepend( (yyvsp[(2) - (3)].step) );
1854 (yyval.expr) =
new Path( static_cast<Filter *>( (yyvsp[(1) - (3)].expr) ), (yyvsp[(3) - (3)].locationPath) );
1861 #line 365 "parser.y"
1863 (yyval.expr) = (yyvsp[(1) - (1)].expr);
1870 #line 370 "parser.y"
1872 (yyval.expr) =
new Filter( (yyvsp[(1) - (2)].expr), *(yyvsp[(2) - (2)].predList) );
1879 #line 379 "parser.y"
1881 (yyval.expr) =
new LogicalOp( LogicalOp::OP_Or, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr) );
1888 #line 388 "parser.y"
1890 (yyval.expr) =
new LogicalOp( LogicalOp::OP_And, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr) );
1897 #line 397 "parser.y"
1899 (yyval.expr) =
new RelationOp( (yyvsp[(2) - (3)].num), (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr) );
1906 #line 406 "parser.y"
1908 (yyval.expr) =
new RelationOp( (yyvsp[(2) - (3)].num), (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr) );
1915 #line 415 "parser.y"
1917 (yyval.expr) =
new NumericOp( NumericOp::OP_Add, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr) );
1924 #line 420 "parser.y"
1926 (yyval.expr) =
new NumericOp( NumericOp::OP_Sub, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr) );
1933 #line 429 "parser.y"
1935 (yyval.expr) =
new NumericOp( (yyvsp[(2) - (3)].num), (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr) );
1942 #line 438 "parser.y"
1945 (yyval.expr)->addSubExpression( (yyvsp[(2) - (2)].expr) );
1952 #line 1953 "parser.tab.c"
1970 if (0 <= yystate && yystate <=
YYLAST &&
yycheck[yystate] == *yyssp)
1986 #if ! YYERROR_VERBOSE
1990 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
1996 if (yymsg != yymsgbuf)
2000 yymsg_alloc = yyalloc;
2004 yymsg_alloc =
sizeof yymsgbuf;
2008 if (0 < yysize && yysize <= yymsg_alloc)
2010 (void) yysyntax_error (yymsg, yystate, yychar);
2017 goto yyexhaustedlab;
2025 if (yyerrstatus == 3)
2030 if (yychar <=
YYEOF)
2033 if (yychar ==
YYEOF)
2125 #if !defined(yyoverflow) || YYERROR_VERBOSE
2143 while (yyssp != yyss)
2154 if (yymsg != yymsgbuf)
2158 return YYID (yyresult);
2164 #line 444 "parser.y"
2186 fprintf(stderr,
"error: %s\n", str);
static void yy_symbol_value_print(yyoutput, yytype, yyvaluep) FILE *yyoutput
#define YY_REDUCE_PRINT(Rule)
void khtmlxpathyyerror(const char *str)
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
YYSTYPE const *const yyvaluep
Expression * khtmlParseXPathStatement(const DOM::DOMString &statement, int &ec)
static const yytype_int8 yydefgoto[]
static const char *const yytname[]
static Expression * _topExpr
static const yytype_uint8 yyprhs[]
static const yytype_int8 yypact[]
KAction * find(const QObject *recvr, const char *slot, QObject *parent)
void initTokenizer(QString s)
static const yytype_uint8 yyr1[]
static const yytype_uint8 yytable[]
unsigned short int yytype_uint16
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
static int toCode(int xpathCode)
#define YY_STACK_PRINT(Bottom, Top)
static void yy_symbol_print(yyoutput, yytype, yyvaluep) FILE *yyoutput
static const yytype_uint8 yytranslate[]
#define YYSTACK_ALLOC_MAXIMUM
static void yydestruct(yymsg, yytype, yyvaluep) const char *yymsg
unsigned char yytype_uint8
This class implements the basic string we use in the DOM.
static const yytype_int8 yycheck[]
static const yytype_int8 yypgoto[]
static void yy_stack_print(yybottom, yytop) yytype_int16 *yybottom
static const yytype_int8 yyrhs[]
static int xpathParseException
static const yytype_uint8 yyr2[]
static KJavaAppletServer * self
static void yy_reduce_print(yyvsp, yyrule) YYSTYPE *yyvsp
static const yytype_uint8 yystos[]
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
static const yytype_uint8 yydefact[]
static const yytype_uint16 yyrline[]