Synchronize with trunk revision 59636 (just before Alex's CreateProcess revamp).
[reactos.git] / dll / win32 / msxml3 / xslpattern.tab.c
1
2 /* A Bison parser, made by GNU Bison 2.4.1. */
3
4 /* Skeleton implementation for Bison's Yacc-like parsers in C
5
6 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7 Free Software Foundation, Inc.
8
9 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21
22 /* As a special exception, you may create a larger work that contains
23 part or all of the Bison parser skeleton and distribute that work
24 under terms of your choice, so long as that work isn't itself a
25 parser generator using the skeleton or a modified version thereof
26 as a parser skeleton. Alternatively, if you modify or redistribute
27 the parser skeleton itself, you may (at your option) remove this
28 special exception, which will cause the skeleton and the resulting
29 Bison output files to be licensed under the GNU General Public
30 License without this special exception.
31
32 This special exception was added by the Free Software Foundation in
33 version 2.2 of Bison. */
34
35 /* C LALR(1) parser skeleton written by Richard Stallman, by
36 simplifying the original so-called "semantic" parser. */
37
38 /* All symbols defined below should begin with yy or YY, to avoid
39 infringing on user name space. This should be done even for local
40 variables, as they might otherwise be expanded by user macros.
41 There are some unavoidable exceptions within include files to
42 define necessary library symbols; they are noted "INFRINGES ON
43 USER NAME SPACE" below. */
44
45 /* Identify Bison output. */
46 #define YYBISON 1
47
48 /* Bison version. */
49 #define YYBISON_VERSION "2.4.1"
50
51 /* Skeleton name. */
52 #define YYSKELETON_NAME "yacc.c"
53
54 /* Pure parsers. */
55 #define YYPURE 1
56
57 /* Push parsers. */
58 #define YYPUSH 0
59
60 /* Pull parsers. */
61 #define YYPULL 1
62
63 /* Using locations. */
64 #define YYLSP_NEEDED 0
65
66 /* Substitute the variable and function names. */
67 #define yyparse 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
74
75
76 /* Copy the first part of user declarations. */
77
78 /* Line 189 of yacc.c */
79 #line 21 "xslpattern.y"
80
81 #include <config.h>
82 #include <wine/port.h>
83
84 #ifdef HAVE_LIBXML2
85 #include "xslpattern.h"
86 #include <libxml/xpathInternals.h>
87 #include <wine/debug.h>
88
89 WINE_DEFAULT_DEBUG_CHANNEL(msxml);
90
91
92 static const xmlChar NameTest_mod_pre[] = "*[name()='";
93 static const xmlChar NameTest_mod_post[] = "']";
94
95 #define U(str) BAD_CAST str
96
97 static inline BOOL is_literal(xmlChar const* tok)
98 {
99 return (tok && tok[0] && tok[1] &&
100 tok[0]== tok[xmlStrlen(tok)-1] &&
101 (tok[0] == '\'' || tok[0] == '"'));
102 }
103
104 static void xslpattern_error(parser_param* param, void const* scanner, char const* msg)
105 {
106 FIXME("%s:\n"
107 " param {\n"
108 " yyscanner=%p\n"
109 " ctx=%p\n"
110 " in=\"%s\"\n"
111 " pos=%i\n"
112 " len=%i\n"
113 " out=\"%s\"\n"
114 " err=%i\n"
115 " }\n"
116 " scanner=%p\n",
117 msg, param->yyscanner, param->ctx, param->in, param->pos,
118 param->len, param->out, ++param->err, scanner);
119 }
120
121
122
123 /* Line 189 of yacc.c */
124 #line 125 "xslpattern.tab.c"
125
126 /* Enabling traces. */
127 #ifndef YYDEBUG
128 # define YYDEBUG 0
129 #endif
130
131 /* Enabling verbose error messages. */
132 #ifdef YYERROR_VERBOSE
133 # undef YYERROR_VERBOSE
134 # define YYERROR_VERBOSE 1
135 #else
136 # define YYERROR_VERBOSE 0
137 #endif
138
139 /* Enabling the token table. */
140 #ifndef YYTOKEN_TABLE
141 # define YYTOKEN_TABLE 0
142 #endif
143
144
145 /* Tokens. */
146 #ifndef YYTOKENTYPE
147 # define YYTOKENTYPE
148 /* Put the tokens into the symbol table, so that GDB and other debuggers
149 know about them. */
150 enum yytokentype {
151 TOK_Parent = 258,
152 TOK_Self = 259,
153 TOK_DblFSlash = 260,
154 TOK_FSlash = 261,
155 TOK_Axis = 262,
156 TOK_Colon = 263,
157 TOK_OpAnd = 264,
158 TOK_OpOr = 265,
159 TOK_OpNot = 266,
160 TOK_OpEq = 267,
161 TOK_OpIEq = 268,
162 TOK_OpNEq = 269,
163 TOK_OpINEq = 270,
164 TOK_OpLt = 271,
165 TOK_OpILt = 272,
166 TOK_OpGt = 273,
167 TOK_OpIGt = 274,
168 TOK_OpLEq = 275,
169 TOK_OpILEq = 276,
170 TOK_OpGEq = 277,
171 TOK_OpIGEq = 278,
172 TOK_OpAll = 279,
173 TOK_OpAny = 280,
174 TOK_NCName = 281,
175 TOK_Literal = 282,
176 TOK_Number = 283
177 };
178 #endif
179
180
181
182 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
183 typedef int YYSTYPE;
184 # define YYSTYPE_IS_TRIVIAL 1
185 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
186 # define YYSTYPE_IS_DECLARED 1
187 #endif
188
189
190 /* Copy the second part of user declarations. */
191
192
193 /* Line 264 of yacc.c */
194 #line 195 "xslpattern.tab.c"
195
196 #ifdef short
197 # undef short
198 #endif
199
200 #ifdef YYTYPE_UINT8
201 typedef YYTYPE_UINT8 yytype_uint8;
202 #else
203 typedef unsigned char yytype_uint8;
204 #endif
205
206 #ifdef YYTYPE_INT8
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;
211 #else
212 typedef short int yytype_int8;
213 #endif
214
215 #ifdef YYTYPE_UINT16
216 typedef YYTYPE_UINT16 yytype_uint16;
217 #else
218 typedef unsigned short int yytype_uint16;
219 #endif
220
221 #ifdef YYTYPE_INT16
222 typedef YYTYPE_INT16 yytype_int16;
223 #else
224 typedef short int yytype_int16;
225 #endif
226
227 #ifndef YYSIZE_T
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
236 # else
237 # define YYSIZE_T unsigned int
238 # endif
239 #endif
240
241 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
242
243 #ifndef YY_
244 # if YYENABLE_NLS
245 # if ENABLE_NLS
246 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
247 # define YY_(msgid) dgettext ("bison-runtime", msgid)
248 # endif
249 # endif
250 # ifndef YY_
251 # define YY_(msgid) msgid
252 # endif
253 #endif
254
255 /* Suppress unused-variable warnings by "using" E. */
256 #if ! defined lint || defined __GNUC__
257 # define YYUSE(e) ((void) (e))
258 #else
259 # define YYUSE(e) /* empty */
260 #endif
261
262 /* Identity function, used to suppress warnings about constant conditions. */
263 #ifndef lint
264 # define YYID(n) (n)
265 #else
266 #if (defined __STDC__ || defined __C99__FUNC__ \
267 || defined __cplusplus || defined _MSC_VER)
268 static int
269 YYID (int yyi)
270 #else
271 static int
272 YYID (yyi)
273 int yyi;
274 #endif
275 {
276 return yyi;
277 }
278 #endif
279
280 #if ! defined yyoverflow || YYERROR_VERBOSE
281
282 /* The parser invokes alloca or malloc; define the necessary symbols. */
283
284 # ifdef YYSTACK_USE_ALLOCA
285 # if YYSTACK_USE_ALLOCA
286 # ifdef __GNUC__
287 # define YYSTACK_ALLOC __builtin_alloca
288 # elif defined __BUILTIN_VA_ARG_INCR
289 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
290 # elif defined _AIX
291 # define YYSTACK_ALLOC __alloca
292 # elif defined _MSC_VER
293 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
294 # define alloca _alloca
295 # else
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 */
300 # ifndef _STDLIB_H
301 # define _STDLIB_H 1
302 # endif
303 # endif
304 # endif
305 # endif
306 # endif
307
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 */
317 # endif
318 # else
319 # define YYSTACK_ALLOC YYMALLOC
320 # define YYSTACK_FREE YYFREE
321 # ifndef YYSTACK_ALLOC_MAXIMUM
322 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
323 # endif
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 */
328 # ifndef _STDLIB_H
329 # define _STDLIB_H 1
330 # endif
331 # endif
332 # ifndef YYMALLOC
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 */
337 # endif
338 # endif
339 # ifndef YYFREE
340 # define YYFREE free
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 */
344 # endif
345 # endif
346 # endif
347 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
348
349
350 #if (! defined yyoverflow \
351 && (! defined __cplusplus \
352 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
353
354 /* A type that is properly aligned for any stack member. */
355 union yyalloc
356 {
357 yytype_int16 yyss_alloc;
358 YYSTYPE yyvs_alloc;
359 };
360
361 /* The size of the maximum gap between one aligned stack and the next. */
362 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
363
364 /* The size of an array large to enough to hold all stacks, each with
365 N elements. */
366 # define YYSTACK_BYTES(N) \
367 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
368 + YYSTACK_GAP_MAXIMUM)
369
370 /* Copy COUNT objects from FROM to TO. The source and destination do
371 not overlap. */
372 # ifndef YYCOPY
373 # if defined __GNUC__ && 1 < __GNUC__
374 # define YYCOPY(To, From, Count) \
375 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
376 # else
377 # define YYCOPY(To, From, Count) \
378 do \
379 { \
380 YYSIZE_T yyi; \
381 for (yyi = 0; yyi < (Count); yyi++) \
382 (To)[yyi] = (From)[yyi]; \
383 } \
384 while (YYID (0))
385 # endif
386 # endif
387
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
392 stack. */
393 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
394 do \
395 { \
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); \
401 } \
402 while (YYID (0))
403
404 #endif
405
406 /* YYFINAL -- State number of the termination state. */
407 #define YYFINAL 57
408 /* YYLAST -- Last index in YYTABLE. */
409 #define YYLAST 176
410
411 /* YYNTOKENS -- Number of terminals. */
412 #define YYNTOKENS 38
413 /* YYNNTS -- Number of nonterminals. */
414 #define YYNNTS 39
415 /* YYNRULES -- Number of rules. */
416 #define YYNRULES 103
417 /* YYNRULES -- Number of states. */
418 #define YYNSTATES 156
419
420 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
421 #define YYUNDEFTOK 2
422 #define YYMAXUTOK 283
423
424 #define YYTRANSLATE(YYX) \
425 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
426
427 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
428 static const yytype_uint8 yytranslate[] =
429 {
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,
458 25, 26, 27, 28
459 };
460
461 #if YYDEBUG
462 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
463 YYRHS. */
464 static const yytype_uint16 yyprhs[] =
465 {
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,
476 285, 289, 293, 297
477 };
478
479 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
480 static const yytype_int8 yyrhs[] =
481 {
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,
512 -1
513 };
514
515 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
516 static const yytype_uint16 yyrline[] =
517 {
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,
528 705, 715, 725, 735
529 };
530 #endif
531
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[] =
536 {
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
553 };
554 #endif
555
556 # ifdef YYPRINT
557 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
558 token YYLEX-NUM. */
559 static const yytype_uint16 yytoknum[] =
560 {
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
565 };
566 # endif
567
568 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
569 static const yytype_uint8 yyr1[] =
570 {
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,
581 76, 76, 76, 76
582 };
583
584 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
585 static const yytype_uint8 yyr2[] =
586 {
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,
597 3, 3, 3, 3
598 };
599
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[] =
604 {
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
621 };
622
623 /* YYDEFGOTO[NTERM-NUM]. */
624 static const yytype_int8 yydefgoto[] =
625 {
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
630 };
631
632 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
633 STATE-NUM. */
634 #define YYPACT_NINF -34
635 static const yytype_int16 yypact[] =
636 {
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
653 };
654
655 /* YYPGOTO[NTERM-NUM]. */
656 static const yytype_int8 yypgoto[] =
657 {
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
662 };
663
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[] =
670 {
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
689 };
690
691 static const yytype_int16 yycheck[] =
692 {
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
711 };
712
713 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
714 symbol of state STATE-NUM. */
715 static const yytype_uint8 yystos[] =
716 {
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
733 };
734
735 #define yyerrok (yyerrstatus = 0)
736 #define yyclearin (yychar = YYEMPTY)
737 #define YYEMPTY (-2)
738 #define YYEOF 0
739
740 #define YYACCEPT goto yyacceptlab
741 #define YYABORT goto yyabortlab
742 #define YYERROR goto yyerrorlab
743
744
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. */
748
749 #define YYFAIL goto yyerrlab
750
751 #define YYRECOVERING() (!!yyerrstatus)
752
753 #define YYBACKUP(Token, Value) \
754 do \
755 if (yychar == YYEMPTY && yylen == 1) \
756 { \
757 yychar = (Token); \
758 yylval = (Value); \
759 yytoken = YYTRANSLATE (yychar); \
760 YYPOPSTACK (1); \
761 goto yybackup; \
762 } \
763 else \
764 { \
765 yyerror (p, scanner, YY_("syntax error: cannot back up")); \
766 YYERROR; \
767 } \
768 while (YYID (0))
769
770
771 #define YYTERROR 1
772 #define YYERRCODE 256
773
774
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). */
778
779 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
780 #ifndef YYLLOC_DEFAULT
781 # define YYLLOC_DEFAULT(Current, Rhs, N) \
782 do \
783 if (YYID (N)) \
784 { \
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; \
789 } \
790 else \
791 { \
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; \
796 } \
797 while (YYID (0))
798 #endif
799
800
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. */
804
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)
811 # else
812 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
813 # endif
814 #endif
815
816
817 /* YYLEX -- calling `yylex' with the right arguments. */
818
819 #ifdef YYLEX_PARAM
820 # define YYLEX yylex (&yylval, YYLEX_PARAM)
821 #else
822 # define YYLEX yylex (&yylval, scanner)
823 #endif
824
825 /* Enable debugging if requested. */
826 #if YYDEBUG
827
828 # ifndef YYFPRINTF
829 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
830 # define YYFPRINTF fprintf
831 # endif
832
833 # define YYDPRINTF(Args) \
834 do { \
835 if (yydebug) \
836 YYFPRINTF Args; \
837 } while (YYID (0))
838
839 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
840 do { \
841 if (yydebug) \
842 { \
843 YYFPRINTF (stderr, "%s ", Title); \
844 yy_symbol_print (stderr, \
845 Type, Value, p, scanner); \
846 YYFPRINTF (stderr, "\n"); \
847 } \
848 } while (YYID (0))
849
850
851 /*--------------------------------.
852 | Print this symbol on YYOUTPUT. |
853 `--------------------------------*/
854
855 /*ARGSUSED*/
856 #if (defined __STDC__ || defined __C99__FUNC__ \
857 || defined __cplusplus || defined _MSC_VER)
858 static void
859 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, parser_param* p, void* scanner)
860 #else
861 static void
862 yy_symbol_value_print (yyoutput, yytype, yyvaluep, p, scanner)
863 FILE *yyoutput;
864 int yytype;
865 YYSTYPE const * const yyvaluep;
866 parser_param* p;
867 void* scanner;
868 #endif
869 {
870 if (!yyvaluep)
871 return;
872 YYUSE (p);
873 YYUSE (scanner);
874 # ifdef YYPRINT
875 if (yytype < YYNTOKENS)
876 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
877 # else
878 YYUSE (yyoutput);
879 # endif
880 switch (yytype)
881 {
882 default:
883 break;
884 }
885 }
886
887
888 /*--------------------------------.
889 | Print this symbol on YYOUTPUT. |
890 `--------------------------------*/
891
892 #if (defined __STDC__ || defined __C99__FUNC__ \
893 || defined __cplusplus || defined _MSC_VER)
894 static void
895 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, parser_param* p, void* scanner)
896 #else
897 static void
898 yy_symbol_print (yyoutput, yytype, yyvaluep, p, scanner)
899 FILE *yyoutput;
900 int yytype;
901 YYSTYPE const * const yyvaluep;
902 parser_param* p;
903 void* scanner;
904 #endif
905 {
906 if (yytype < YYNTOKENS)
907 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
908 else
909 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
910
911 yy_symbol_value_print (yyoutput, yytype, yyvaluep, p, scanner);
912 YYFPRINTF (yyoutput, ")");
913 }
914
915 /*------------------------------------------------------------------.
916 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
917 | TOP (included). |
918 `------------------------------------------------------------------*/
919
920 #if (defined __STDC__ || defined __C99__FUNC__ \
921 || defined __cplusplus || defined _MSC_VER)
922 static void
923 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
924 #else
925 static void
926 yy_stack_print (yybottom, yytop)
927 yytype_int16 *yybottom;
928 yytype_int16 *yytop;
929 #endif
930 {
931 YYFPRINTF (stderr, "Stack now");
932 for (; yybottom <= yytop; yybottom++)
933 {
934 int yybot = *yybottom;
935 YYFPRINTF (stderr, " %d", yybot);
936 }
937 YYFPRINTF (stderr, "\n");
938 }
939
940 # define YY_STACK_PRINT(Bottom, Top) \
941 do { \
942 if (yydebug) \
943 yy_stack_print ((Bottom), (Top)); \
944 } while (YYID (0))
945
946
947 /*------------------------------------------------.
948 | Report that the YYRULE is going to be reduced. |
949 `------------------------------------------------*/
950
951 #if (defined __STDC__ || defined __C99__FUNC__ \
952 || defined __cplusplus || defined _MSC_VER)
953 static void
954 yy_reduce_print (YYSTYPE *yyvsp, int yyrule, parser_param* p, void* scanner)
955 #else
956 static void
957 yy_reduce_print (yyvsp, yyrule, p, scanner)
958 YYSTYPE *yyvsp;
959 int yyrule;
960 parser_param* p;
961 void* scanner;
962 #endif
963 {
964 int yynrhs = yyr2[yyrule];
965 int yyi;
966 unsigned long int yylno = yyrline[yyrule];
967 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
968 yyrule - 1, yylno);
969 /* The symbols being reduced. */
970 for (yyi = 0; yyi < yynrhs; yyi++)
971 {
972 YYFPRINTF (stderr, " $%d = ", yyi + 1);
973 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
974 &(yyvsp[(yyi + 1) - (yynrhs)])
975 , p, scanner);
976 YYFPRINTF (stderr, "\n");
977 }
978 }
979
980 # define YY_REDUCE_PRINT(Rule) \
981 do { \
982 if (yydebug) \
983 yy_reduce_print (yyvsp, Rule, p, scanner); \
984 } while (YYID (0))
985
986 /* Nonzero means print parse trace. It is left uninitialized so that
987 multiple parsers can coexist. */
988 int yydebug;
989 #else /* !YYDEBUG */
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 */
995
996
997 /* YYINITDEPTH -- initial size of the parser's stacks. */
998 #ifndef YYINITDEPTH
999 # define YYINITDEPTH 200
1000 #endif
1001
1002 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1003 if the built-in stack extension method is used).
1004
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. */
1008
1009 #ifndef YYMAXDEPTH
1010 # define YYMAXDEPTH 10000
1011 #endif
1012
1013 \f
1014
1015 #if YYERROR_VERBOSE
1016
1017 # ifndef yystrlen
1018 # if defined __GLIBC__ && defined _STRING_H
1019 # define yystrlen strlen
1020 # else
1021 /* Return the length of YYSTR. */
1022 #if (defined __STDC__ || defined __C99__FUNC__ \
1023 || defined __cplusplus || defined _MSC_VER)
1024 static YYSIZE_T
1025 yystrlen (const char *yystr)
1026 #else
1027 static YYSIZE_T
1028 yystrlen (yystr)
1029 const char *yystr;
1030 #endif
1031 {
1032 YYSIZE_T yylen;
1033 for (yylen = 0; yystr[yylen]; yylen++)
1034 continue;
1035 return yylen;
1036 }
1037 # endif
1038 # endif
1039
1040 # ifndef yystpcpy
1041 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1042 # define yystpcpy stpcpy
1043 # else
1044 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1045 YYDEST. */
1046 #if (defined __STDC__ || defined __C99__FUNC__ \
1047 || defined __cplusplus || defined _MSC_VER)
1048 static char *
1049 yystpcpy (char *yydest, const char *yysrc)
1050 #else
1051 static char *
1052 yystpcpy (yydest, yysrc)
1053 char *yydest;
1054 const char *yysrc;
1055 #endif
1056 {
1057 char *yyd = yydest;
1058 const char *yys = yysrc;
1059
1060 while ((*yyd++ = *yys++) != '\0')
1061 continue;
1062
1063 return yyd - 1;
1064 }
1065 # endif
1066 # endif
1067
1068 # ifndef yytnamerr
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
1075 would have been. */
1076 static YYSIZE_T
1077 yytnamerr (char *yyres, const char *yystr)
1078 {
1079 if (*yystr == '"')
1080 {
1081 YYSIZE_T yyn = 0;
1082 char const *yyp = yystr;
1083
1084 for (;;)
1085 switch (*++yyp)
1086 {
1087 case '\'':
1088 case ',':
1089 goto do_not_strip_quotes;
1090
1091 case '\\':
1092 if (*++yyp != '\\')
1093 goto do_not_strip_quotes;
1094 /* Fall through. */
1095 default:
1096 if (yyres)
1097 yyres[yyn] = *yyp;
1098 yyn++;
1099 break;
1100
1101 case '"':
1102 if (yyres)
1103 yyres[yyn] = '\0';
1104 return yyn;
1105 }
1106 do_not_strip_quotes: ;
1107 }
1108
1109 if (! yyres)
1110 return yystrlen (yystr);
1111
1112 return yystpcpy (yyres, yystr) - yyres;
1113 }
1114 # endif
1115
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. */
1123 static YYSIZE_T
1124 yysyntax_error (char *yyresult, int yystate, int yychar)
1125 {
1126 int yyn = yypact[yystate];
1127
1128 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1129 return 0;
1130 else
1131 {
1132 int yytype = YYTRANSLATE (yychar);
1133 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1134 YYSIZE_T yysize = yysize0;
1135 YYSIZE_T yysize1;
1136 int yysize_overflow = 0;
1137 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1138 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1139 int yyx;
1140
1141 # if 0
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");
1149 # endif
1150 char *yyfmt;
1151 char const *yyf;
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;
1160
1161 /* Start YYX at -YYN if negative to avoid negative indexes in
1162 YYCHECK. */
1163 int yyxbegin = yyn < 0 ? -yyn : 0;
1164
1165 /* Stay within bounds of both yycheck and yytname. */
1166 int yychecklim = YYLAST - yyn + 1;
1167 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1168 int yycount = 1;
1169
1170 yyarg[0] = yytname[yytype];
1171 yyfmt = yystpcpy (yyformat, yyunexpected);
1172
1173 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1174 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1175 {
1176 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1177 {
1178 yycount = 1;
1179 yysize = yysize0;
1180 yyformat[sizeof yyunexpected - 1] = '\0';
1181 break;
1182 }
1183 yyarg[yycount++] = yytname[yyx];
1184 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1185 yysize_overflow |= (yysize1 < yysize);
1186 yysize = yysize1;
1187 yyfmt = yystpcpy (yyfmt, yyprefix);
1188 yyprefix = yyor;
1189 }
1190
1191 yyf = YY_(yyformat);
1192 yysize1 = yysize + yystrlen (yyf);
1193 yysize_overflow |= (yysize1 < yysize);
1194 yysize = yysize1;
1195
1196 if (yysize_overflow)
1197 return YYSIZE_MAXIMUM;
1198
1199 if (yyresult)
1200 {
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;
1205 int yyi = 0;
1206 while ((*yyp = *yyf) != '\0')
1207 {
1208 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1209 {
1210 yyp += yytnamerr (yyp, yyarg[yyi++]);
1211 yyf += 2;
1212 }
1213 else
1214 {
1215 yyp++;
1216 yyf++;
1217 }
1218 }
1219 }
1220 return yysize;
1221 }
1222 }
1223 #endif /* YYERROR_VERBOSE */
1224 \f
1225
1226 /*-----------------------------------------------.
1227 | Release the memory associated to this symbol. |
1228 `-----------------------------------------------*/
1229
1230 /*ARGSUSED*/
1231 #if (defined __STDC__ || defined __C99__FUNC__ \
1232 || defined __cplusplus || defined _MSC_VER)
1233 static void
1234 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, parser_param* p, void* scanner)
1235 #else
1236 static void
1237 yydestruct (yymsg, yytype, yyvaluep, p, scanner)
1238 const char *yymsg;
1239 int yytype;
1240 YYSTYPE *yyvaluep;
1241 parser_param* p;
1242 void* scanner;
1243 #endif
1244 {
1245 YYUSE (yyvaluep);
1246 YYUSE (p);
1247 YYUSE (scanner);
1248
1249 if (!yymsg)
1250 yymsg = "Deleting";
1251 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1252
1253 switch (yytype)
1254 {
1255
1256 default:
1257 break;
1258 }
1259 }
1260
1261 /* Prevent warnings from -Wmissing-prototypes. */
1262 #ifdef YYPARSE_PARAM
1263 #if defined __STDC__ || defined __cplusplus
1264 int yyparse (void *YYPARSE_PARAM);
1265 #else
1266 int yyparse ();
1267 #endif
1268 #else /* ! YYPARSE_PARAM */
1269 #if defined __STDC__ || defined __cplusplus
1270 int yyparse (parser_param* p, void* scanner);
1271 #else
1272 int yyparse ();
1273 #endif
1274 #endif /* ! YYPARSE_PARAM */
1275
1276
1277
1278
1279
1280 /*-------------------------.
1281 | yyparse or yypush_parse. |
1282 `-------------------------*/
1283
1284 #ifdef YYPARSE_PARAM
1285 #if (defined __STDC__ || defined __C99__FUNC__ \
1286 || defined __cplusplus || defined _MSC_VER)
1287 int
1288 yyparse (void *YYPARSE_PARAM)
1289 #else
1290 int
1291 yyparse (YYPARSE_PARAM)
1292 void *YYPARSE_PARAM;
1293 #endif
1294 #else /* ! YYPARSE_PARAM */
1295 #if (defined __STDC__ || defined __C99__FUNC__ \
1296 || defined __cplusplus || defined _MSC_VER)
1297 int
1298 yyparse (parser_param* p, void* scanner)
1299 #else
1300 int
1301 yyparse (p, scanner)
1302 parser_param* p;
1303 void* scanner;
1304 #endif
1305 #endif
1306 {
1307 /* The lookahead symbol. */
1308 int yychar;
1309
1310 /* The semantic value of the lookahead symbol. */
1311 YYSTYPE yylval;
1312
1313 /* Number of syntax errors so far. */
1314 int yynerrs;
1315
1316 int yystate;
1317 /* Number of tokens to shift before error messages enabled. */
1318 int yyerrstatus;
1319
1320 /* The stacks and their tools:
1321 `yyss': related to states.
1322 `yyvs': related to semantic values.
1323
1324 Refer to the stacks thru separate pointers, to allow yyoverflow
1325 to reallocate them elsewhere. */
1326
1327 /* The state stack. */
1328 yytype_int16 yyssa[YYINITDEPTH];
1329 yytype_int16 *yyss;
1330 yytype_int16 *yyssp;
1331
1332 /* The semantic value stack. */
1333 YYSTYPE yyvsa[YYINITDEPTH];
1334 YYSTYPE *yyvs;
1335 YYSTYPE *yyvsp;
1336
1337 YYSIZE_T yystacksize;
1338
1339 int yyn;
1340 int yyresult;
1341 /* Lookahead token as an internal (translated) token number. */
1342 int yytoken;
1343 /* The variables used to return semantic value and location from the
1344 action routines. */
1345 YYSTYPE yyval;
1346
1347 #if YYERROR_VERBOSE
1348 /* Buffer for error messages, and its allocated size. */
1349 char yymsgbuf[128];
1350 char *yymsg = yymsgbuf;
1351 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1352 #endif
1353
1354 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1355
1356 /* The number of symbols on the RHS of the reduced rule.
1357 Keep to zero when no symbol should be popped. */
1358 int yylen = 0;
1359
1360 yytoken = 0;
1361 yyss = yyssa;
1362 yyvs = yyvsa;
1363 yystacksize = YYINITDEPTH;
1364
1365 YYDPRINTF ((stderr, "Starting parse\n"));
1366
1367 yystate = 0;
1368 yyerrstatus = 0;
1369 yynerrs = 0;
1370 yychar = YYEMPTY; /* Cause a token to be read. */
1371
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. */
1376 yyssp = yyss;
1377 yyvsp = yyvs;
1378
1379 goto yysetstate;
1380
1381 /*------------------------------------------------------------.
1382 | yynewstate -- Push a new state, which is found in yystate. |
1383 `------------------------------------------------------------*/
1384 yynewstate:
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. */
1387 yyssp++;
1388
1389 yysetstate:
1390 *yyssp = yystate;
1391
1392 if (yyss + yystacksize - 1 <= yyssp)
1393 {
1394 /* Get the current used size of the three stacks, in elements. */
1395 YYSIZE_T yysize = yyssp - yyss + 1;
1396
1397 #ifdef yyoverflow
1398 {
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
1401 memory. */
1402 YYSTYPE *yyvs1 = yyvs;
1403 yytype_int16 *yyss1 = yyss;
1404
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),
1412 &yystacksize);
1413
1414 yyss = yyss1;
1415 yyvs = yyvs1;
1416 }
1417 #else /* no yyoverflow */
1418 # ifndef YYSTACK_RELOCATE
1419 goto yyexhaustedlab;
1420 # else
1421 /* Extend the stack our own way. */
1422 if (YYMAXDEPTH <= yystacksize)
1423 goto yyexhaustedlab;
1424 yystacksize *= 2;
1425 if (YYMAXDEPTH < yystacksize)
1426 yystacksize = YYMAXDEPTH;
1427
1428 {
1429 yytype_int16 *yyss1 = yyss;
1430 union yyalloc *yyptr =
1431 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1432 if (! yyptr)
1433 goto yyexhaustedlab;
1434 YYSTACK_RELOCATE (yyss_alloc, yyss);
1435 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1436 # undef YYSTACK_RELOCATE
1437 if (yyss1 != yyssa)
1438 YYSTACK_FREE (yyss1);
1439 }
1440 # endif
1441 #endif /* no yyoverflow */
1442
1443 yyssp = yyss + yysize - 1;
1444 yyvsp = yyvs + yysize - 1;
1445
1446 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1447 (unsigned long int) yystacksize));
1448
1449 if (yyss + yystacksize - 1 <= yyssp)
1450 YYABORT;
1451 }
1452
1453 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1454
1455 if (yystate == YYFINAL)
1456 YYACCEPT;
1457
1458 goto yybackup;
1459
1460 /*-----------.
1461 | yybackup. |
1462 `-----------*/
1463 yybackup:
1464
1465 /* Do appropriate processing given the current state. Read a
1466 lookahead token if we need one and don't already have one. */
1467
1468 /* First try to decide what to do without reference to lookahead token. */
1469 yyn = yypact[yystate];
1470 if (yyn == YYPACT_NINF)
1471 goto yydefault;
1472
1473 /* Not known => get a lookahead token if don't already have one. */
1474
1475 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1476 if (yychar == YYEMPTY)
1477 {
1478 YYDPRINTF ((stderr, "Reading a token: "));
1479 yychar = YYLEX;
1480 }
1481
1482 if (yychar <= YYEOF)
1483 {
1484 yychar = yytoken = YYEOF;
1485 YYDPRINTF ((stderr, "Now at end of input.\n"));
1486 }
1487 else
1488 {
1489 yytoken = YYTRANSLATE (yychar);
1490 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1491 }
1492
1493 /* If the proper action on seeing token YYTOKEN is to reduce or to
1494 detect an error, take that action. */
1495 yyn += yytoken;
1496 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1497 goto yydefault;
1498 yyn = yytable[yyn];
1499 if (yyn <= 0)
1500 {
1501 if (yyn == 0 || yyn == YYTABLE_NINF)
1502 goto yyerrlab;
1503 yyn = -yyn;
1504 goto yyreduce;
1505 }
1506
1507 /* Count tokens shifted since error; after three, turn off error
1508 status. */
1509 if (yyerrstatus)
1510 yyerrstatus--;
1511
1512 /* Shift the lookahead token. */
1513 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1514
1515 /* Discard the shifted token. */
1516 yychar = YYEMPTY;
1517
1518 yystate = yyn;
1519 *++yyvsp = yylval;
1520
1521 goto yynewstate;
1522
1523
1524 /*-----------------------------------------------------------.
1525 | yydefault -- do the default action for the current state. |
1526 `-----------------------------------------------------------*/
1527 yydefault:
1528 yyn = yydefact[yystate];
1529 if (yyn == 0)
1530 goto yyerrlab;
1531 goto yyreduce;
1532
1533
1534 /*-----------------------------.
1535 | yyreduce -- Do a reduction. |
1536 `-----------------------------*/
1537 yyreduce:
1538 /* yyn is the number of a rule to reduce with. */
1539 yylen = yyr2[yyn];
1540
1541 /* If YYLEN is nonzero, implement the default value of the action:
1542 `$$ = $1'.
1543
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];
1550
1551
1552 YY_REDUCE_PRINT (yyn);
1553 switch (yyn)
1554 {
1555 case 2:
1556
1557 /* Line 1455 of yacc.c */
1558 #line 87 "xslpattern.y"
1559 {
1560 p->out = (yyvsp[(1) - (1)]);
1561 ;}
1562 break;
1563
1564 case 5:
1565
1566 /* Line 1455 of yacc.c */
1567 #line 100 "xslpattern.y"
1568 {
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)]));
1574 ;}
1575 break;
1576
1577 case 6:
1578
1579 /* Line 1455 of yacc.c */
1580 #line 109 "xslpattern.y"
1581 {
1582 TRACE("Got UnprefixedName: \"%s\"\n", (yyvsp[(1) - (1)]));
1583 (yyval)=(yyvsp[(1) - (1)]);
1584 ;}
1585 break;
1586
1587 case 9:
1588
1589 /* Line 1455 of yacc.c */
1590 #line 123 "xslpattern.y"
1591 {
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)]));
1596 ;}
1597 break;
1598
1599 case 10:
1600
1601 /* Line 1455 of yacc.c */
1602 #line 130 "xslpattern.y"
1603 {
1604 TRACE("Got AbsoluteLocationPath: \"/\"\n");
1605 (yyval)=xmlStrdup(U("/"));
1606 ;}
1607 break;
1608
1609 case 13:
1610
1611 /* Line 1455 of yacc.c */
1612 #line 138 "xslpattern.y"
1613 {
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)]));
1619 ;}
1620 break;
1621
1622 case 15:
1623
1624 /* Line 1455 of yacc.c */
1625 #line 149 "xslpattern.y"
1626 {
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)]));
1633 ;}
1634 break;
1635
1636 case 16:
1637
1638 /* Line 1455 of yacc.c */
1639 #line 158 "xslpattern.y"
1640 {
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)]));
1645 ;}
1646 break;
1647
1648 case 17:
1649
1650 /* Line 1455 of yacc.c */
1651 #line 165 "xslpattern.y"
1652 {
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)]));
1657 ;}
1658 break;
1659
1660 case 21:
1661
1662 /* Line 1455 of yacc.c */
1663 #line 176 "xslpattern.y"
1664 {
1665 TRACE("Got AxisSpecifier: \"%s::\"\n", (yyvsp[(1) - (2)]));
1666 (yyval)=(yyvsp[(1) - (2)]);
1667 (yyval)=xmlStrcat((yyval),U("::"));
1668 ;}
1669 break;
1670
1671 case 22:
1672
1673 /* Line 1455 of yacc.c */
1674 #line 183 "xslpattern.y"
1675 {
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)]));
1680 ;}
1681 break;
1682
1683 case 25:
1684
1685 /* Line 1455 of yacc.c */
1686 #line 196 "xslpattern.y"
1687 {
1688 TRACE("Got NameTest: \"*\"\n");
1689 (yyval)=xmlStrdup(U("*"));
1690 ;}
1691 break;
1692
1693 case 26:
1694
1695 /* Line 1455 of yacc.c */
1696 #line 201 "xslpattern.y"
1697 {
1698 TRACE("Got NameTest: \"%s:*\"\n", (yyvsp[(1) - (3)]));
1699 (yyval)=(yyvsp[(1) - (3)]);
1700 (yyval)=xmlStrcat((yyval),U(":*"));
1701 ;}
1702 break;
1703
1704 case 27:
1705
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)]));
1711
1712 if (registeredNsURI)
1713 (yyval)=xmlStrdup(U(""));
1714 else
1715 (yyval)=xmlStrdup(NameTest_mod_pre);
1716
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)]));
1722
1723 if (!registeredNsURI)
1724 (yyval)=xmlStrcat((yyval),NameTest_mod_post);
1725 ;}
1726 break;
1727
1728 case 28:
1729
1730 /* Line 1455 of yacc.c */
1731 #line 226 "xslpattern.y"
1732 {
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);
1737 ;}
1738 break;
1739
1740 case 29:
1741
1742 /* Line 1455 of yacc.c */
1743 #line 234 "xslpattern.y"
1744 {
1745 (yyval)=(yyvsp[(1) - (2)]);
1746 (yyval)=xmlStrcat((yyval),(yyvsp[(2) - (2)]));
1747 xmlFree((yyvsp[(2) - (2)]));
1748 ;}
1749 break;
1750
1751 case 31:
1752
1753 /* Line 1455 of yacc.c */
1754 #line 242 "xslpattern.y"
1755 {
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("]"));
1761 ;}
1762 break;
1763
1764 case 32:
1765
1766 /* Line 1455 of yacc.c */
1767 #line 251 "xslpattern.y"
1768 {
1769 (yyval)=xmlStrdup(U("index()="));
1770 (yyval)=xmlStrcat((yyval),(yyvsp[(1) - (1)]));
1771 xmlFree((yyvsp[(1) - (1)]));
1772 ;}
1773 break;
1774
1775 case 36:
1776
1777 /* Line 1455 of yacc.c */
1778 #line 262 "xslpattern.y"
1779 {
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)]));
1784 ;}
1785 break;
1786
1787 case 37:
1788
1789 /* Line 1455 of yacc.c */
1790 #line 270 "xslpattern.y"
1791 {
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)]));
1797 ;}
1798 break;
1799
1800 case 38:
1801
1802 /* Line 1455 of yacc.c */
1803 #line 279 "xslpattern.y"
1804 {
1805 TRACE("Got AbbreviatedStep: \"..\"\n");
1806 (yyval)=xmlStrdup(U(".."));
1807 ;}
1808 break;
1809
1810 case 39:
1811
1812 /* Line 1455 of yacc.c */
1813 #line 284 "xslpattern.y"
1814 {
1815 TRACE("Got AbbreviatedStep: \".\"\n");
1816 (yyval)=xmlStrdup(U("."));
1817 ;}
1818 break;
1819
1820 case 47:
1821
1822 /* Line 1455 of yacc.c */
1823 #line 302 "xslpattern.y"
1824 {
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(")"));
1830 ;}
1831 break;
1832
1833 case 48:
1834
1835 /* Line 1455 of yacc.c */
1836 #line 310 "xslpattern.y"
1837 {
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)]));
1843 ;}
1844 break;
1845
1846 case 51:
1847
1848 /* Line 1455 of yacc.c */
1849 #line 322 "xslpattern.y"
1850 {
1851 TRACE("Got FunctionCall: \"%s(%s)\"\n", (yyvsp[(1) - (4)]), (yyvsp[(3) - (4)]));
1852 if (xmlStrEqual((yyvsp[(1) - (4)]),U("ancestor")))
1853 {
1854 (yyval)=(yyvsp[(1) - (4)]);
1855 (yyval)=xmlStrcat((yyval),U("::"));
1856 (yyval)=xmlStrcat((yyval),(yyvsp[(3) - (4)]));
1857 xmlFree((yyvsp[(3) - (4)]));
1858 }
1859 else if (xmlStrEqual((yyvsp[(1) - (4)]),U("attribute")))
1860 {
1861 if (is_literal((yyvsp[(3) - (4)])))
1862 {
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("]"));
1868 }
1869 else
1870 {
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')"));
1877 }
1878 }
1879 else if (xmlStrEqual((yyvsp[(1) - (4)]),U("element")))
1880 {
1881 if (is_literal((yyvsp[(3) - (4)])))
1882 {
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("]"));
1888 }
1889 else
1890 {
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')"));
1897 }
1898 }
1899 else
1900 {
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(")"));
1906 }
1907 ;}
1908 break;
1909
1910 case 52:
1911
1912 /* Line 1455 of yacc.c */
1913 #line 381 "xslpattern.y"
1914 {
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")))
1918 {
1919 (yyval)=xmlStrdup(U("@*"));
1920 xmlFree((yyvsp[(1) - (3)]));
1921 }
1922 else if (xmlStrEqual((yyvsp[(1) - (3)]),U("element")))
1923 {
1924 (yyval)=xmlStrdup(U("node()[nodeType()=1]"));
1925 xmlFree((yyvsp[(1) - (3)]));
1926 }
1927 else if (xmlStrEqual((yyvsp[(1) - (3)]),U("pi")))
1928 {
1929 (yyval)=xmlStrdup(U("processing-instruction()"));
1930 xmlFree((yyvsp[(1) - (3)]));
1931 }
1932 else if (xmlStrEqual((yyvsp[(1) - (3)]),U("textnode")))
1933 {
1934 (yyval)=xmlStrdup(U("text()"));
1935 xmlFree((yyvsp[(1) - (3)]));
1936 }
1937 else
1938 {
1939 (yyval)=(yyvsp[(1) - (3)]);
1940 (yyval)=xmlStrcat((yyval),U("()"));
1941 }
1942 ;}
1943 break;
1944
1945 case 53:
1946
1947 /* Line 1455 of yacc.c */
1948 #line 412 "xslpattern.y"
1949 {
1950 (yyval)=(yyvsp[(1) - (3)]);
1951 (yyval)=xmlStrcat((yyval),U(","));
1952 (yyval)=xmlStrcat((yyval),(yyvsp[(3) - (3)]));
1953 xmlFree((yyvsp[(3) - (3)]));
1954 ;}
1955 break;
1956
1957 case 57:
1958
1959 /* Line 1455 of yacc.c */
1960 #line 425 "xslpattern.y"
1961 {
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)]));
1967 ;}
1968 break;
1969
1970 case 59:
1971
1972 /* Line 1455 of yacc.c */
1973 #line 435 "xslpattern.y"
1974 {
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)]));
1980 ;}
1981 break;
1982
1983 case 60:
1984
1985 /* Line 1455 of yacc.c */
1986 #line 443 "xslpattern.y"
1987 {
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)]));
1993 ;}
1994 break;
1995
1996 case 63:
1997
1998 /* Line 1455 of yacc.c */
1999 #line 454 "xslpattern.y"
2000 {
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)]));
2005 ;}
2006 break;
2007
2008 case 66:
2009
2010 /* Line 1455 of yacc.c */
2011 #line 466 "xslpattern.y"
2012 {
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)]));
2018 ;}
2019 break;
2020
2021 case 69:
2022
2023 /* Line 1455 of yacc.c */
2024 #line 478 "xslpattern.y"
2025 {
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)]));
2031 ;}
2032 break;
2033
2034 case 72:
2035
2036 /* Line 1455 of yacc.c */
2037 #line 490 "xslpattern.y"
2038 {
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)]));
2044 ;}
2045 break;
2046
2047 case 73:
2048
2049 /* Line 1455 of yacc.c */
2050 #line 498 "xslpattern.y"
2051 {
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(")"));
2060 ;}
2061 break;
2062
2063 case 74:
2064
2065 /* Line 1455 of yacc.c */
2066 #line 509 "xslpattern.y"
2067 {
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)]));
2073 ;}
2074 break;
2075
2076 case 75:
2077
2078 /* Line 1455 of yacc.c */
2079 #line 517 "xslpattern.y"
2080 {
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(")"));
2089 ;}
2090 break;
2091
2092 case 78:
2093
2094 /* Line 1455 of yacc.c */
2095 #line 532 "xslpattern.y"
2096 {
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)]));
2102 ;}
2103 break;
2104
2105 case 79:
2106
2107 /* Line 1455 of yacc.c */
2108 #line 540 "xslpattern.y"
2109 {
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(")"));
2118 ;}
2119 break;
2120
2121 case 80:
2122
2123 /* Line 1455 of yacc.c */
2124 #line 551 "xslpattern.y"
2125 {
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)]));
2131 ;}
2132 break;
2133
2134 case 81:
2135
2136 /* Line 1455 of yacc.c */
2137 #line 559 "xslpattern.y"
2138 {
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(")"));
2147 ;}
2148 break;
2149
2150 case 82:
2151
2152 /* Line 1455 of yacc.c */
2153 #line 570 "xslpattern.y"
2154 {
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)]));
2160 ;}
2161 break;
2162
2163 case 83:
2164
2165 /* Line 1455 of yacc.c */
2166 #line 578 "xslpattern.y"
2167 {
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(")"));
2176 ;}
2177 break;
2178
2179 case 84:
2180
2181 /* Line 1455 of yacc.c */
2182 #line 589 "xslpattern.y"
2183 {
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)]));
2189 ;}
2190 break;
2191
2192 case 85:
2193
2194 /* Line 1455 of yacc.c */
2195 #line 597 "xslpattern.y"
2196 {
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(")"));
2205 ;}
2206 break;
2207
2208 case 88:
2209
2210 /* Line 1455 of yacc.c */
2211 #line 614 "xslpattern.y"
2212 {
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(")"));
2218 ;}
2219 break;
2220
2221 case 89:
2222
2223 /* Line 1455 of yacc.c */
2224 #line 622 "xslpattern.y"
2225 {
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(")"));
2231 ;}
2232 break;
2233
2234 case 90:
2235
2236 /* Line 1455 of yacc.c */
2237 #line 630 "xslpattern.y"
2238 {
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(")"));
2244 ;}
2245 break;
2246
2247 case 91:
2248
2249 /* Line 1455 of yacc.c */
2250 #line 638 "xslpattern.y"
2251 {
2252 FIXME("Unrecognized $all$ expression - ignoring\n");
2253 (yyval)=xmlStrdup(U(""));
2254 ;}
2255 break;
2256
2257 case 92:
2258
2259 /* Line 1455 of yacc.c */
2260 #line 644 "xslpattern.y"
2261 {
2262 (yyval)=(yyvsp[(1) - (3)]);
2263 (yyval)=xmlStrcat((yyval),U("!="));
2264 (yyval)=xmlStrcat((yyval),(yyvsp[(3) - (3)]));
2265 xmlFree((yyvsp[(3) - (3)]));
2266 ;}
2267 break;
2268
2269 case 93:
2270
2271 /* Line 1455 of yacc.c */
2272 #line 651 "xslpattern.y"
2273 {
2274 (yyval)=(yyvsp[(1) - (3)]);
2275 (yyval)=xmlStrcat((yyval),U("="));
2276 (yyval)=xmlStrcat((yyval),(yyvsp[(3) - (3)]));
2277 xmlFree((yyvsp[(3) - (3)]));
2278 ;}
2279 break;
2280
2281 case 94:
2282
2283 /* Line 1455 of yacc.c */
2284 #line 658 "xslpattern.y"
2285 {
2286 (yyval)=(yyvsp[(1) - (3)]);
2287 (yyval)=xmlStrcat((yyval),U(">="));
2288 (yyval)=xmlStrcat((yyval),(yyvsp[(3) - (3)]));
2289 xmlFree((yyvsp[(3) - (3)]));
2290 ;}
2291 break;
2292
2293 case 95:
2294
2295 /* Line 1455 of yacc.c */
2296 #line 665 "xslpattern.y"
2297 {
2298 (yyval)=(yyvsp[(1) - (3)]);
2299 (yyval)=xmlStrcat((yyval),U(">"));
2300 (yyval)=xmlStrcat((yyval),(yyvsp[(3) - (3)]));
2301 xmlFree((yyvsp[(3) - (3)]));
2302 ;}
2303 break;
2304
2305 case 96:
2306
2307 /* Line 1455 of yacc.c */
2308 #line 672 "xslpattern.y"
2309 {
2310 (yyval)=(yyvsp[(1) - (3)]);
2311 (yyval)=xmlStrcat((yyval),U("<="));
2312 (yyval)=xmlStrcat((yyval),(yyvsp[(3) - (3)]));
2313 xmlFree((yyvsp[(3) - (3)]));
2314 ;}
2315 break;
2316
2317 case 97:
2318
2319 /* Line 1455 of yacc.c */
2320 #line 679 "xslpattern.y"
2321 {
2322 (yyval)=(yyvsp[(1) - (3)]);
2323 (yyval)=xmlStrcat((yyval),U("<"));
2324 (yyval)=xmlStrcat((yyval),(yyvsp[(3) - (3)]));
2325 xmlFree((yyvsp[(3) - (3)]));
2326 ;}
2327 break;
2328
2329 case 98:
2330
2331 /* Line 1455 of yacc.c */
2332 #line 686 "xslpattern.y"
2333 {
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(")"));
2341 ;}
2342 break;
2343
2344 case 99:
2345
2346 /* Line 1455 of yacc.c */
2347 #line 696 "xslpattern.y"
2348 {
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(")"));
2356 ;}
2357 break;
2358
2359 case 100:
2360
2361 /* Line 1455 of yacc.c */
2362 #line 706 "xslpattern.y"
2363 {
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(")"));
2371 ;}
2372 break;
2373
2374 case 101:
2375
2376 /* Line 1455 of yacc.c */
2377 #line 716 "xslpattern.y"
2378 {
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(")"));
2386 ;}
2387 break;
2388
2389 case 102:
2390
2391 /* Line 1455 of yacc.c */
2392 #line 726 "xslpattern.y"
2393 {
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(")"));
2401 ;}
2402 break;
2403
2404 case 103:
2405
2406 /* Line 1455 of yacc.c */
2407 #line 736 "xslpattern.y"
2408 {
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(")"));
2416 ;}
2417 break;
2418
2419
2420
2421 /* Line 1455 of yacc.c */
2422 #line 2423 "xslpattern.tab.c"
2423 default: break;
2424 }
2425 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2426
2427 YYPOPSTACK (yylen);
2428 yylen = 0;
2429 YY_STACK_PRINT (yyss, yyssp);
2430
2431 *++yyvsp = yyval;
2432
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. */
2436
2437 yyn = yyr1[yyn];
2438
2439 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2440 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2441 yystate = yytable[yystate];
2442 else
2443 yystate = yydefgoto[yyn - YYNTOKENS];
2444
2445 goto yynewstate;
2446
2447
2448 /*------------------------------------.
2449 | yyerrlab -- here on detecting error |
2450 `------------------------------------*/
2451 yyerrlab:
2452 /* If not already recovering from an error, report this error. */
2453 if (!yyerrstatus)
2454 {
2455 ++yynerrs;
2456 #if ! YYERROR_VERBOSE
2457 yyerror (p, scanner, YY_("syntax error"));
2458 #else
2459 {
2460 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
2461 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
2462 {
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);
2469 if (yymsg)
2470 yymsg_alloc = yyalloc;
2471 else
2472 {
2473 yymsg = yymsgbuf;
2474 yymsg_alloc = sizeof yymsgbuf;
2475 }
2476 }
2477
2478 if (0 < yysize && yysize <= yymsg_alloc)
2479 {
2480 (void) yysyntax_error (yymsg, yystate, yychar);
2481 yyerror (p, scanner, yymsg);
2482 }
2483 else
2484 {
2485 yyerror (p, scanner, YY_("syntax error"));
2486 if (yysize != 0)
2487 goto yyexhaustedlab;
2488 }
2489 }
2490 #endif
2491 }
2492
2493
2494
2495 if (yyerrstatus == 3)
2496 {
2497 /* If just tried and failed to reuse lookahead token after an
2498 error, discard it. */
2499
2500 if (yychar <= YYEOF)
2501 {
2502 /* Return failure if at end of input. */
2503 if (yychar == YYEOF)
2504 YYABORT;
2505 }
2506 else
2507 {
2508 yydestruct ("Error: discarding",
2509 yytoken, &yylval, p, scanner);
2510 yychar = YYEMPTY;
2511 }
2512 }
2513
2514 /* Else will try to reuse lookahead token after shifting the error
2515 token. */
2516 goto yyerrlab1;
2517
2518
2519 /*---------------------------------------------------.
2520 | yyerrorlab -- error raised explicitly by YYERROR. |
2521 `---------------------------------------------------*/
2522 yyerrorlab:
2523
2524 /* Pacify compilers like GCC when the user code never invokes
2525 YYERROR and the label yyerrorlab therefore never appears in user
2526 code. */
2527 if (/*CONSTCOND*/ 0)
2528 goto yyerrorlab;
2529
2530 /* Do not reclaim the symbols of the rule which action triggered
2531 this YYERROR. */
2532 YYPOPSTACK (yylen);
2533 yylen = 0;
2534 YY_STACK_PRINT (yyss, yyssp);
2535 yystate = *yyssp;
2536 goto yyerrlab1;
2537
2538
2539 /*-------------------------------------------------------------.
2540 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2541 `-------------------------------------------------------------*/
2542 yyerrlab1:
2543 yyerrstatus = 3; /* Each real token shifted decrements this. */
2544
2545 for (;;)
2546 {
2547 yyn = yypact[yystate];
2548 if (yyn != YYPACT_NINF)
2549 {
2550 yyn += YYTERROR;
2551 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2552 {
2553 yyn = yytable[yyn];
2554 if (0 < yyn)
2555 break;
2556 }
2557 }
2558
2559 /* Pop the current state because it cannot handle the error token. */
2560 if (yyssp == yyss)
2561 YYABORT;
2562
2563
2564 yydestruct ("Error: popping",
2565 yystos[yystate], yyvsp, p, scanner);
2566 YYPOPSTACK (1);
2567 yystate = *yyssp;
2568 YY_STACK_PRINT (yyss, yyssp);
2569 }
2570
2571 *++yyvsp = yylval;
2572
2573
2574 /* Shift the error token. */
2575 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2576
2577 yystate = yyn;
2578 goto yynewstate;
2579
2580
2581 /*-------------------------------------.
2582 | yyacceptlab -- YYACCEPT comes here. |
2583 `-------------------------------------*/
2584 yyacceptlab:
2585 yyresult = 0;
2586 goto yyreturn;
2587
2588 /*-----------------------------------.
2589 | yyabortlab -- YYABORT comes here. |
2590 `-----------------------------------*/
2591 yyabortlab:
2592 yyresult = 1;
2593 goto yyreturn;
2594
2595 #if !defined(yyoverflow) || YYERROR_VERBOSE
2596 /*-------------------------------------------------.
2597 | yyexhaustedlab -- memory exhaustion comes here. |
2598 `-------------------------------------------------*/
2599 yyexhaustedlab:
2600 yyerror (p, scanner, YY_("memory exhausted"));
2601 yyresult = 2;
2602 /* Fall through. */
2603 #endif
2604
2605 yyreturn:
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. */
2611 YYPOPSTACK (yylen);
2612 YY_STACK_PRINT (yyss, yyssp);
2613 while (yyssp != yyss)
2614 {
2615 yydestruct ("Cleanup: popping",
2616 yystos[*yyssp], yyvsp, p, scanner);
2617 YYPOPSTACK (1);
2618 }
2619 #ifndef yyoverflow
2620 if (yyss != yyssa)
2621 YYSTACK_FREE (yyss);
2622 #endif
2623 #if YYERROR_VERBOSE
2624 if (yymsg != yymsgbuf)
2625 YYSTACK_FREE (yymsg);
2626 #endif
2627 /* Make sure YYID is used. */
2628 return YYID (yyresult);
2629 }
2630
2631
2632
2633 /* Line 1675 of yacc.c */
2634 #line 747 "xslpattern.y"
2635
2636
2637 #endif /* HAVE_LIBXML2 */
2638