1 /* A Bison parser, made by GNU Bison 1.875d. */
3 /* Skeleton parser for Yacc-like parsing with Bison,
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
21 /* As a special exception, when this file is copied by Bison into a
22 Bison output file, you may use that output file without restriction.
23 This special exception was added by the Free Software Foundation
24 in version 1.24 of Bison. */
26 /* Written by Richard Stallman by simplifying the original so called
27 ``semantic'' parser. */
29 /* All symbols defined below should begin with yy or YY, to avoid
30 infringing on user name space. This should be done even for local
31 variables, as they might otherwise be expanded by user macros.
32 There are some unavoidable exceptions within include files to
33 define necessary library symbols; they are noted "INFRINGES ON
34 USER NAME SPACE" below. */
36 /* Identify Bison output. */
40 #define YYSKELETON_NAME "yacc.c"
45 /* Using locations. */
46 #define YYLSP_NEEDED 0
48 /* If NAME_PREFIX is specified substitute the variables and functions
50 #define yyparse syckparse
52 #define yyerror syckerror
53 #define yylval sycklval
54 #define yychar syckchar
55 #define yydebug syckdebug
56 #define yynerrs sycknerrs
62 /* Put the tokens into the symbol table, so that GDB and other debuggers
79 #define YAML_ANCHOR 258
80 #define YAML_ALIAS 259
81 #define YAML_TRANSFER 260
82 #define YAML_TAGURI 261
83 #define YAML_ITRANSFER 262
85 #define YAML_PLAIN 264
86 #define YAML_BLOCK 265
87 #define YAML_DOCSEP 266
88 #define YAML_IOPEN 267
89 #define YAML_INDENT 268
95 /* Copy the first part of user declarations. */
101 void apply_seq_in_map( SyckParser
*parser
, SyckNode
*n
);
103 #define YYPARSE_PARAM parser
104 #define YYLEX_PARAM parser
106 #define NULL_NODE(parser, node) \
107 SyckNode *node = syck_new_str( "", scalar_plain ); \
108 if ( ((SyckParser *)parser)->taguri_expansion == 1 ) \
110 node->type_id = syck_taguri( YAML_DOMAIN, "null", 4 ); \
114 node->type_id = syck_strndup( "null", 4 ); \
118 /* Enabling traces. */
123 /* Enabling verbose error messages. */
124 #ifdef YYERROR_VERBOSE
125 # undef YYERROR_VERBOSE
126 # define YYERROR_VERBOSE 1
128 # define YYERROR_VERBOSE 0
131 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
133 typedef union YYSTYPE
{
138 /* Line 191 of yacc.c. */
140 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
141 # define YYSTYPE_IS_DECLARED 1
142 # define YYSTYPE_IS_TRIVIAL 1
147 /* Copy the second part of user declarations. */
150 /* Line 214 of yacc.c. */
153 #if ! defined (yyoverflow) || YYERROR_VERBOSE
159 # define YYMALLOC malloc
162 /* The parser invokes alloca or malloc; define the necessary symbols. */
164 # ifdef YYSTACK_USE_ALLOCA
165 # if YYSTACK_USE_ALLOCA
166 # define YYSTACK_ALLOC alloca
169 # if defined (alloca) || defined (_ALLOCA_H)
170 # define YYSTACK_ALLOC alloca
173 # define YYSTACK_ALLOC __builtin_alloca
178 # ifdef YYSTACK_ALLOC
179 /* Pacify GCC's `empty if-body' warning. */
180 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
182 # if defined (__STDC__) || defined (__cplusplus)
183 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
184 # define YYSIZE_T size_t
186 # define YYSTACK_ALLOC YYMALLOC
187 # define YYSTACK_FREE YYFREE
189 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
192 #if (! defined (yyoverflow) \
193 && (! defined (__cplusplus) \
194 || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
196 /* A type that is properly aligned for any stack member. */
203 /* The size of the maximum gap between one aligned stack and the next. */
204 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
206 /* The size of an array large to enough to hold all stacks, each with
208 # define YYSTACK_BYTES(N) \
209 ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
210 + YYSTACK_GAP_MAXIMUM)
212 /* Copy COUNT objects from FROM to TO. The source and destination do
215 # if defined (__GNUC__) && 1 < __GNUC__
216 # define YYCOPY(To, From, Count) \
217 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
219 # define YYCOPY(To, From, Count) \
222 register YYSIZE_T yyi; \
223 for (yyi = 0; yyi < (Count); yyi++) \
224 (To)[yyi] = (From)[yyi]; \
230 /* Relocate STACK from its old location to the new one. The
231 local variables YYSIZE and YYSTACKSIZE give the old and new number of
232 elements in the stack, and YYPTR gives the new location of the
233 stack. Advance YYPTR to a properly aligned location for the next
235 # define YYSTACK_RELOCATE(Stack) \
238 YYSIZE_T yynewbytes; \
239 YYCOPY (&yyptr->Stack, Stack, yysize); \
240 Stack = &yyptr->Stack; \
241 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
242 yyptr += yynewbytes / sizeof (*yyptr); \
248 #if defined (__STDC__) || defined (__cplusplus)
249 typedef signed char yysigned_char
;
251 typedef short int yysigned_char
;
254 /* YYFINAL -- State number of the termination state. */
256 /* YYLAST -- Last index in YYTABLE. */
259 /* YYNTOKENS -- Number of terminals. */
261 /* YYNNTS -- Number of nonterminals. */
263 /* YYNRULES -- Number of rules. */
265 /* YYNRULES -- Number of states. */
266 #define YYNSTATES 128
268 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
270 #define YYMAXUTOK 269
272 #define YYTRANSLATE(YYX) \
273 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
275 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
276 static const unsigned char yytranslate
[] =
278 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
279 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
280 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
281 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
282 2, 2, 2, 2, 21, 15, 2, 2, 2, 2,
283 2, 2, 2, 2, 2, 2, 2, 2, 16, 2,
284 2, 2, 2, 22, 2, 2, 2, 2, 2, 2,
285 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
286 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
287 2, 17, 2, 18, 2, 2, 2, 2, 2, 2,
288 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
289 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
290 2, 2, 2, 19, 2, 20, 2, 2, 2, 2,
291 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
292 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
293 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
294 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
295 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
296 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
297 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
298 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
299 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
300 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
301 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
302 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
303 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
304 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
308 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
310 static const unsigned char yyprhs
[] =
312 0, 0, 3, 5, 8, 9, 11, 13, 15, 18,
313 21, 24, 28, 30, 32, 36, 37, 40, 43, 46,
314 49, 51, 54, 56, 58, 60, 63, 66, 69, 72,
315 75, 77, 79, 81, 85, 87, 89, 91, 93, 95,
316 99, 103, 106, 110, 113, 117, 120, 124, 127, 129,
317 133, 136, 140, 143, 145, 149, 151, 153, 157, 161,
318 165, 168, 172, 175, 179, 182, 184, 188, 190, 194,
319 196, 200, 204, 207, 211, 215, 218, 220, 224, 226
322 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
323 static const yysigned_char yyrhs
[] =
325 24, 0, -1, 25, -1, 11, 27, -1, -1, 33,
326 -1, 26, -1, 34, -1, 5, 26, -1, 6, 26,
327 -1, 3, 26, -1, 29, 26, 32, -1, 25, -1,
328 28, -1, 29, 28, 30, -1, -1, 7, 28, -1,
329 5, 28, -1, 6, 28, -1, 3, 28, -1, 12,
330 -1, 29, 13, -1, 14, -1, 13, -1, 14, -1,
331 31, 32, -1, 5, 33, -1, 6, 33, -1, 7,
332 33, -1, 3, 33, -1, 4, -1, 8, -1, 9,
333 -1, 29, 33, 32, -1, 10, -1, 35, -1, 39,
334 -1, 42, -1, 49, -1, 29, 37, 30, -1, 29,
335 38, 30, -1, 15, 27, -1, 5, 31, 38, -1,
336 5, 37, -1, 6, 31, 38, -1, 6, 37, -1,
337 3, 31, 38, -1, 3, 37, -1, 36, -1, 38,
338 31, 36, -1, 38, 31, -1, 17, 40, 18, -1,
339 17, 18, -1, 41, -1, 40, 21, 41, -1, 25,
340 -1, 48, -1, 29, 43, 30, -1, 29, 47, 30,
341 -1, 5, 31, 47, -1, 5, 43, -1, 6, 31,
342 47, -1, 6, 43, -1, 3, 31, 47, -1, 3,
343 43, -1, 33, -1, 22, 25, 31, -1, 27, -1,
344 44, 16, 45, -1, 46, -1, 47, 31, 36, -1,
345 47, 31, 46, -1, 47, 31, -1, 25, 16, 27,
346 -1, 19, 50, 20, -1, 19, 20, -1, 51, -1,
347 50, 21, 51, -1, 25, -1, 48, -1
350 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
351 static const unsigned short int yyrline
[] =
353 0, 56, 56, 60, 65, 70, 71, 74, 75, 80,
354 85, 94, 100, 101, 104, 109, 113, 121, 126, 131,
355 145, 146, 149, 152, 155, 156, 164, 169, 174, 182,
356 186, 194, 207, 208, 218, 219, 220, 221, 222, 228,
357 232, 238, 244, 249, 254, 259, 264, 268, 274, 278,
358 283, 292, 296, 302, 306, 313, 314, 320, 325, 332,
359 337, 342, 347, 352, 356, 362, 363, 369, 379, 396,
360 397, 409, 417, 426, 434, 438, 444, 445, 454, 461
364 #if YYDEBUG || YYERROR_VERBOSE
365 /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
366 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
367 static const char *const yytname
[] =
369 "$end", "error", "$undefined", "YAML_ANCHOR", "YAML_ALIAS",
370 "YAML_TRANSFER", "YAML_TAGURI", "YAML_ITRANSFER", "YAML_WORD",
371 "YAML_PLAIN", "YAML_BLOCK", "YAML_DOCSEP", "YAML_IOPEN", "YAML_INDENT",
372 "YAML_IEND", "'-'", "':'", "'['", "']'", "'{'", "'}'", "','", "'?'",
373 "$accept", "doc", "atom", "ind_rep", "atom_or_empty", "empty",
374 "indent_open", "indent_end", "indent_sep", "indent_flex_end", "word_rep",
375 "struct_rep", "implicit_seq", "basic_seq", "top_imp_seq",
376 "in_implicit_seq", "inline_seq", "in_inline_seq", "inline_seq_atom",
377 "implicit_map", "top_imp_map", "complex_key", "complex_value",
378 "complex_mapping", "in_implicit_map", "basic_mapping", "inline_map",
379 "in_inline_map", "inline_map_atom", 0
384 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
386 static const unsigned short int yytoknum
[] =
388 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
389 265, 266, 267, 268, 269, 45, 58, 91, 93, 123,
394 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
395 static const unsigned char yyr1
[] =
397 0, 23, 24, 24, 24, 25, 25, 26, 26, 26,
398 26, 26, 27, 27, 28, 28, 28, 28, 28, 28,
399 29, 29, 30, 31, 32, 32, 33, 33, 33, 33,
400 33, 33, 33, 33, 34, 34, 34, 34, 34, 35,
401 35, 36, 37, 37, 37, 37, 37, 37, 38, 38,
402 38, 39, 39, 40, 40, 41, 41, 42, 42, 43,
403 43, 43, 43, 43, 43, 44, 44, 45, 46, 47,
404 47, 47, 47, 48, 49, 49, 50, 50, 51, 51
407 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
408 static const unsigned char yyr2
[] =
410 0, 2, 1, 2, 0, 1, 1, 1, 2, 2,
411 2, 3, 1, 1, 3, 0, 2, 2, 2, 2,
412 1, 2, 1, 1, 1, 2, 2, 2, 2, 2,
413 1, 1, 1, 3, 1, 1, 1, 1, 1, 3,
414 3, 2, 3, 2, 3, 2, 3, 2, 1, 3,
415 2, 3, 2, 1, 3, 1, 1, 3, 3, 3,
416 2, 3, 2, 3, 2, 1, 3, 1, 3, 1,
417 3, 3, 2, 3, 3, 2, 1, 3, 1, 1
420 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
421 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
422 means the default is an error. */
423 static const unsigned char yydefact
[] =
425 4, 0, 30, 0, 0, 0, 31, 32, 34, 15,
426 20, 0, 0, 0, 2, 6, 0, 5, 7, 35,
427 36, 37, 38, 10, 29, 8, 26, 9, 27, 0,
428 0, 0, 0, 28, 15, 15, 15, 15, 12, 3,
429 13, 15, 52, 55, 0, 53, 56, 75, 78, 79,
430 0, 76, 1, 0, 0, 0, 21, 15, 0, 0,
431 65, 48, 0, 0, 0, 0, 69, 0, 0, 19,
432 17, 18, 15, 15, 15, 16, 15, 15, 15, 15,
433 0, 15, 51, 0, 74, 0, 23, 0, 47, 64,
434 0, 43, 60, 0, 45, 62, 41, 0, 24, 0,
435 11, 33, 22, 39, 40, 50, 57, 15, 58, 72,
436 14, 73, 54, 77, 65, 46, 63, 42, 59, 44,
437 61, 66, 25, 49, 67, 68, 70, 71
440 /* YYDEFGOTO[NTERM-NUM]. */
441 static const yysigned_char yydefgoto
[] =
443 -1, 13, 38, 15, 39, 40, 16, 103, 99, 101,
444 17, 18, 19, 61, 62, 63, 20, 44, 45, 21,
445 64, 65, 125, 66, 67, 46, 22, 50, 51
448 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
450 #define YYPACT_NINF -97
451 static const short int yypact
[] =
453 250, 318, -97, 318, 318, 374, -97, -97, -97, 335,
454 -97, 267, 232, 7, -97, -97, 192, -97, -97, -97,
455 -97, -97, -97, -97, -97, -97, -97, -97, -97, 374,
456 374, 374, 352, -97, 335, 335, 335, 384, -97, -97,
457 -97, 212, -97, 10, 0, -97, -97, -97, 10, -97,
458 -4, -97, -97, 284, 284, 284, -97, 335, 318, 30,
459 30, -97, -2, 36, -2, 16, -97, 36, 30, -97,
460 -97, -97, 384, 384, 384, -97, 363, 301, 301, 301,
461 -2, 335, -97, 318, -97, 318, -97, 158, -97, -97,
462 158, -97, -97, 158, -97, -97, -97, 24, -97, 30,
463 -97, -97, -97, -97, -97, 26, -97, 335, -97, 158,
464 -97, -97, -97, -97, -97, 24, 24, 24, 24, 24,
465 24, -97, -97, -97, -97, -97, -97, -97
468 /* YYPGOTO[NTERM-NUM]. */
469 static const yysigned_char yypgoto
[] =
471 -97, -97, 8, 81, -56, 109, 33, -53, 74, -54,
472 -1, -97, -97, -96, -31, -32, -97, -97, -44, -97,
473 77, -97, -97, -52, 9, -6, -97, -97, -29
476 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
477 positive, shift that token. If negative, reduce the rule which
478 number is the opposite. If zero, do what YYDEFACT says.
479 If YYTABLE_NINF, syntax error. */
480 #define YYTABLE_NINF -1
481 static const unsigned char yytable
[] =
483 24, 96, 26, 28, 33, 100, 49, 52, 14, 123,
484 104, 106, 102, 126, 108, 60, 84, 85, 82, 43,
485 48, 83, 88, 91, 94, 111, 81, 110, 24, 26,
486 28, 68, 107, 24, 26, 28, 33, 86, 32, 112,
487 60, 57, 41, 86, 98, 122, 88, 91, 94, 86,
488 102, 124, 24, 26, 28, 115, 113, 127, 117, 0,
489 0, 119, 32, 32, 32, 32, 97, 41, 41, 41,
490 76, 24, 26, 28, 41, 68, 24, 26, 28, 49,
491 0, 0, 23, 0, 25, 27, 114, 0, 0, 114,
492 41, 43, 114, 48, 0, 0, 116, 59, 0, 118,
493 0, 0, 120, 0, 0, 76, 76, 76, 114, 76,
494 41, 41, 41, 0, 41, 23, 25, 27, 0, 0,
495 32, 0, 59, 32, 0, 0, 32, 87, 90, 93,
496 89, 92, 95, 0, 23, 25, 27, 105, 0, 0,
497 41, 109, 32, 69, 70, 71, 75, 0, 0, 0,
498 80, 87, 90, 93, 89, 92, 95, 0, 23, 25,
499 27, 29, 2, 30, 31, 5, 6, 7, 0, 0,
500 10, 121, 0, 57, 0, 0, 0, 0, 0, 0,
501 58, 69, 70, 71, 0, 80, 69, 70, 71, 105,
502 109, 105, 109, 105, 109, 53, 2, 54, 55, 5,
503 6, 7, 8, 0, 10, 56, 0, 57, 0, 11,
504 0, 12, 0, 0, 58, 77, 2, 78, 79, 37,
505 6, 7, 8, 0, 10, 56, 0, 57, 0, 11,
506 0, 12, 0, 0, 58, 1, 2, 3, 4, 5,
507 6, 7, 8, 0, 10, 0, 0, 0, 0, 11,
508 0, 12, 47, 1, 2, 3, 4, 5, 6, 7,
509 8, 9, 10, 0, 0, 0, 0, 11, 0, 12,
510 1, 2, 3, 4, 5, 6, 7, 8, 0, 10,
511 0, 0, 0, 0, 11, 42, 12, 53, 2, 54,
512 55, 5, 6, 7, 8, 0, 10, 86, 0, 0,
513 0, 11, 0, 12, 77, 2, 78, 79, 37, 6,
514 7, 8, 0, 10, 86, 0, 0, 0, 11, 0,
515 12, 1, 2, 3, 4, 5, 6, 7, 8, 0,
516 10, 0, 0, 0, 0, 11, 0, 12, 34, 2,
517 35, 36, 37, 6, 7, 8, 0, 10, 0, 0,
518 0, 0, 11, 0, 12, 29, 2, 30, 31, 5,
519 6, 7, 0, 0, 10, 56, 72, 2, 73, 74,
520 37, 6, 7, 0, 0, 10, 56, 29, 2, 30,
521 31, 5, 6, 7, 0, 0, 10, 72, 2, 73,
522 74, 37, 6, 7, 0, 0, 10
525 static const yysigned_char yycheck
[] =
527 1, 57, 3, 4, 5, 59, 12, 0, 0, 105,
528 63, 64, 14, 109, 67, 16, 20, 21, 18, 11,
529 12, 21, 53, 54, 55, 81, 16, 80, 29, 30,
530 31, 32, 16, 34, 35, 36, 37, 13, 5, 83,
531 41, 15, 9, 13, 14, 99, 77, 78, 79, 13,
532 14, 107, 53, 54, 55, 87, 85, 109, 90, -1,
533 -1, 93, 29, 30, 31, 32, 58, 34, 35, 36,
534 37, 72, 73, 74, 41, 76, 77, 78, 79, 85,
535 -1, -1, 1, -1, 3, 4, 87, -1, -1, 90,
536 57, 83, 93, 85, -1, -1, 87, 16, -1, 90,
537 -1, -1, 93, -1, -1, 72, 73, 74, 109, 76,
538 77, 78, 79, -1, 81, 34, 35, 36, -1, -1,
539 87, -1, 41, 90, -1, -1, 93, 53, 54, 55,
540 53, 54, 55, -1, 53, 54, 55, 63, -1, -1,
541 107, 67, 109, 34, 35, 36, 37, -1, -1, -1,
542 41, 77, 78, 79, 77, 78, 79, -1, 77, 78,
543 79, 3, 4, 5, 6, 7, 8, 9, -1, -1,
544 12, 97, -1, 15, -1, -1, -1, -1, -1, -1,
545 22, 72, 73, 74, -1, 76, 77, 78, 79, 115,
546 116, 117, 118, 119, 120, 3, 4, 5, 6, 7,
547 8, 9, 10, -1, 12, 13, -1, 15, -1, 17,
548 -1, 19, -1, -1, 22, 3, 4, 5, 6, 7,
549 8, 9, 10, -1, 12, 13, -1, 15, -1, 17,
550 -1, 19, -1, -1, 22, 3, 4, 5, 6, 7,
551 8, 9, 10, -1, 12, -1, -1, -1, -1, 17,
552 -1, 19, 20, 3, 4, 5, 6, 7, 8, 9,
553 10, 11, 12, -1, -1, -1, -1, 17, -1, 19,
554 3, 4, 5, 6, 7, 8, 9, 10, -1, 12,
555 -1, -1, -1, -1, 17, 18, 19, 3, 4, 5,
556 6, 7, 8, 9, 10, -1, 12, 13, -1, -1,
557 -1, 17, -1, 19, 3, 4, 5, 6, 7, 8,
558 9, 10, -1, 12, 13, -1, -1, -1, 17, -1,
559 19, 3, 4, 5, 6, 7, 8, 9, 10, -1,
560 12, -1, -1, -1, -1, 17, -1, 19, 3, 4,
561 5, 6, 7, 8, 9, 10, -1, 12, -1, -1,
562 -1, -1, 17, -1, 19, 3, 4, 5, 6, 7,
563 8, 9, -1, -1, 12, 13, 3, 4, 5, 6,
564 7, 8, 9, -1, -1, 12, 13, 3, 4, 5,
565 6, 7, 8, 9, -1, -1, 12, 3, 4, 5,
566 6, 7, 8, 9, -1, -1, 12
569 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
570 symbol of state STATE-NUM. */
571 static const unsigned char yystos
[] =
573 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
574 12, 17, 19, 24, 25, 26, 29, 33, 34, 35,
575 39, 42, 49, 26, 33, 26, 33, 26, 33, 3,
576 5, 6, 29, 33, 3, 5, 6, 7, 25, 27,
577 28, 29, 18, 25, 40, 41, 48, 20, 25, 48,
578 50, 51, 0, 3, 5, 6, 13, 15, 22, 26,
579 33, 36, 37, 38, 43, 44, 46, 47, 33, 28,
580 28, 28, 3, 5, 6, 28, 29, 3, 5, 6,
581 28, 16, 18, 21, 20, 21, 13, 31, 37, 43,
582 31, 37, 43, 31, 37, 43, 27, 25, 14, 31,
583 32, 32, 14, 30, 30, 31, 30, 16, 30, 31,
584 30, 27, 41, 51, 33, 38, 47, 38, 47, 38,
585 47, 31, 32, 36, 27, 45, 36, 46
588 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
589 # define YYSIZE_T __SIZE_TYPE__
591 #if ! defined (YYSIZE_T) && defined (size_t)
592 # define YYSIZE_T size_t
594 #if ! defined (YYSIZE_T)
595 # if defined (__STDC__) || defined (__cplusplus)
596 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
597 # define YYSIZE_T size_t
600 #if ! defined (YYSIZE_T)
601 # define YYSIZE_T unsigned int
604 #define yyerrok (yyerrstatus = 0)
605 #define yyclearin (yychar = YYEMPTY)
609 #define YYACCEPT goto yyacceptlab
610 #define YYABORT goto yyabortlab
611 #define YYERROR goto yyerrorlab
614 /* Like YYERROR except do call yyerror. This remains here temporarily
615 to ease the transition to the new meaning of YYERROR, for GCC.
616 Once GCC version 2 has supplanted version 1, this can go. */
618 #define YYFAIL goto yyerrlab
620 #define YYRECOVERING() (!!yyerrstatus)
622 #define YYBACKUP(Token, Value) \
624 if (yychar == YYEMPTY && yylen == 1) \
628 yytoken = YYTRANSLATE (yychar); \
634 yyerror ("syntax error: cannot back up");\
640 #define YYERRCODE 256
642 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
645 #ifndef YYLLOC_DEFAULT
646 # define YYLLOC_DEFAULT(Current, Rhs, N) \
647 ((Current).first_line = (Rhs)[1].first_line, \
648 (Current).first_column = (Rhs)[1].first_column, \
649 (Current).last_line = (Rhs)[N].last_line, \
650 (Current).last_column = (Rhs)[N].last_column)
653 /* YYLEX -- calling `yylex' with the right arguments. */
656 # define YYLEX yylex (&yylval, YYLEX_PARAM)
658 # define YYLEX yylex (&yylval)
661 /* Enable debugging if requested. */
665 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
666 # define YYFPRINTF fprintf
669 # define YYDPRINTF(Args) \
675 # define YYDSYMPRINT(Args) \
681 # define YYDSYMPRINTF(Title, Token, Value, Location) \
685 YYFPRINTF (stderr, "%s ", Title); \
686 yysymprint (stderr, \
688 YYFPRINTF (stderr, "\n"); \
692 /*------------------------------------------------------------------.
693 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
695 `------------------------------------------------------------------*/
697 #if defined (__STDC__) || defined (__cplusplus)
699 yy_stack_print (short int *bottom
, short int *top
)
702 yy_stack_print (bottom
, top
)
707 YYFPRINTF (stderr
, "Stack now");
708 for (/* Nothing. */; bottom
<= top
; ++bottom
)
709 YYFPRINTF (stderr
, " %d", *bottom
);
710 YYFPRINTF (stderr
, "\n");
713 # define YY_STACK_PRINT(Bottom, Top) \
716 yy_stack_print ((Bottom), (Top)); \
720 /*------------------------------------------------.
721 | Report that the YYRULE is going to be reduced. |
722 `------------------------------------------------*/
724 #if defined (__STDC__) || defined (__cplusplus)
726 yy_reduce_print (int yyrule
)
729 yy_reduce_print (yyrule
)
734 unsigned int yylno
= yyrline
[yyrule
];
735 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %u), ",
737 /* Print the symbols being reduced, and their result. */
738 for (yyi
= yyprhs
[yyrule
]; 0 <= yyrhs
[yyi
]; yyi
++)
739 YYFPRINTF (stderr
, "%s ", yytname
[yyrhs
[yyi
]]);
740 YYFPRINTF (stderr
, "-> %s\n", yytname
[yyr1
[yyrule
]]);
743 # define YY_REDUCE_PRINT(Rule) \
746 yy_reduce_print (Rule); \
749 /* Nonzero means print parse trace. It is left uninitialized so that
750 multiple parsers can coexist. */
753 # define YYDPRINTF(Args)
754 # define YYDSYMPRINT(Args)
755 # define YYDSYMPRINTF(Title, Token, Value, Location)
756 # define YY_STACK_PRINT(Bottom, Top)
757 # define YY_REDUCE_PRINT(Rule)
758 #endif /* !YYDEBUG */
761 /* YYINITDEPTH -- initial size of the parser's stacks. */
763 # define YYINITDEPTH 200
766 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
767 if the built-in stack extension method is used).
769 Do not make this value too large; the results are undefined if
770 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
771 evaluated with infinite-precision integer arithmetic. */
773 #if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
778 # define YYMAXDEPTH 10000
786 # if defined (__GLIBC__) && defined (_STRING_H)
787 # define yystrlen strlen
789 /* Return the length of YYSTR. */
791 # if defined (__STDC__) || defined (__cplusplus)
792 yystrlen (const char *yystr
)
798 register const char *yys
= yystr
;
800 while (*yys
++ != '\0')
803 return yys
- yystr
- 1;
809 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
810 # define yystpcpy stpcpy
812 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
815 # if defined (__STDC__) || defined (__cplusplus)
816 yystpcpy (char *yydest
, const char *yysrc
)
818 yystpcpy (yydest
, yysrc
)
823 register char *yyd
= yydest
;
824 register const char *yys
= yysrc
;
826 while ((*yyd
++ = *yys
++) != '\0')
834 #endif /* !YYERROR_VERBOSE */
839 /*--------------------------------.
840 | Print this symbol on YYOUTPUT. |
841 `--------------------------------*/
843 #if defined (__STDC__) || defined (__cplusplus)
845 yysymprint (FILE *yyoutput
, int yytype
, YYSTYPE
*yyvaluep
)
848 yysymprint (yyoutput
, yytype
, yyvaluep
)
854 /* Pacify ``unused variable'' warnings. */
857 if (yytype
< YYNTOKENS
)
859 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
861 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
865 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
872 YYFPRINTF (yyoutput
, ")");
875 #endif /* ! YYDEBUG */
876 /*-----------------------------------------------.
877 | Release the memory associated to this symbol. |
878 `-----------------------------------------------*/
880 #if defined (__STDC__) || defined (__cplusplus)
882 yydestruct (int yytype
, YYSTYPE
*yyvaluep
)
885 yydestruct (yytype
, yyvaluep
)
890 /* Pacify ``unused variable'' warnings. */
902 /* Prevent warnings from -Wmissing-prototypes. */
905 # if defined (__STDC__) || defined (__cplusplus)
906 int yyparse (void *YYPARSE_PARAM
);
910 #else /* ! YYPARSE_PARAM */
911 #if defined (__STDC__) || defined (__cplusplus)
916 #endif /* ! YYPARSE_PARAM */
928 # if defined (__STDC__) || defined (__cplusplus)
929 int yyparse (void *YYPARSE_PARAM
)
931 int yyparse (YYPARSE_PARAM
)
934 #else /* ! YYPARSE_PARAM */
935 #if defined (__STDC__) || defined (__cplusplus)
945 /* The lookahead symbol. */
948 /* The semantic value of the lookahead symbol. */
951 /* Number of syntax errors so far. */
954 register int yystate
;
957 /* Number of tokens to shift before error messages enabled. */
959 /* Lookahead token as an internal (translated) token number. */
962 /* Three stacks and their tools:
963 `yyss': related to states,
964 `yyvs': related to semantic values,
965 `yyls': related to locations.
967 Refer to the stacks thru separate pointers, to allow yyoverflow
968 to reallocate them elsewhere. */
970 /* The state stack. */
971 short int yyssa
[YYINITDEPTH
];
972 short int *yyss
= yyssa
;
973 register short int *yyssp
;
975 /* The semantic value stack. */
976 YYSTYPE yyvsa
[YYINITDEPTH
];
977 YYSTYPE
*yyvs
= yyvsa
;
978 register YYSTYPE
*yyvsp
;
982 #define YYPOPSTACK (yyvsp--, yyssp--)
984 YYSIZE_T yystacksize
= YYINITDEPTH
;
986 /* The variables used to return semantic value and location from the
991 /* When reducing, the number of symbols on the RHS of the reduced
995 YYDPRINTF ((stderr
, "Starting parse\n"));
1000 yychar
= YYEMPTY
; /* Cause a token to be read. */
1002 /* Initialize stack pointers.
1003 Waste one element of value and location stack
1004 so that they stay on the same level as the state stack.
1005 The wasted elements are never initialized. */
1013 /*------------------------------------------------------------.
1014 | yynewstate -- Push a new state, which is found in yystate. |
1015 `------------------------------------------------------------*/
1017 /* In all cases, when you get here, the value and location stacks
1018 have just been pushed. so pushing a state here evens the stacks.
1025 if (yyss
+ yystacksize
- 1 <= yyssp
)
1027 /* Get the current used size of the three stacks, in elements. */
1028 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
1032 /* Give user a chance to reallocate the stack. Use copies of
1033 these so that the &'s don't force the real ones into
1035 YYSTYPE
*yyvs1
= yyvs
;
1036 short int *yyss1
= yyss
;
1039 /* Each stack pointer address is followed by the size of the
1040 data in use in that stack, in bytes. This used to be a
1041 conditional around just the two extra args, but that might
1042 be undefined if yyoverflow is a macro. */
1043 yyoverflow ("parser stack overflow",
1044 &yyss1
, yysize
* sizeof (*yyssp
),
1045 &yyvs1
, yysize
* sizeof (*yyvsp
),
1052 #else /* no yyoverflow */
1053 # ifndef YYSTACK_RELOCATE
1056 /* Extend the stack our own way. */
1057 if (YYMAXDEPTH
<= yystacksize
)
1060 if (YYMAXDEPTH
< yystacksize
)
1061 yystacksize
= YYMAXDEPTH
;
1064 short int *yyss1
= yyss
;
1065 union yyalloc
*yyptr
=
1066 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
1069 YYSTACK_RELOCATE (yyss
);
1070 YYSTACK_RELOCATE (yyvs
);
1072 # undef YYSTACK_RELOCATE
1074 YYSTACK_FREE (yyss1
);
1077 #endif /* no yyoverflow */
1079 yyssp
= yyss
+ yysize
- 1;
1080 yyvsp
= yyvs
+ yysize
- 1;
1083 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
1084 (unsigned long int) yystacksize
));
1086 if (yyss
+ yystacksize
- 1 <= yyssp
)
1090 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
1099 /* Do appropriate processing given the current state. */
1100 /* Read a lookahead token if we need one and don't already have one. */
1103 /* First try to decide what to do without reference to lookahead token. */
1105 yyn
= yypact
[yystate
];
1106 if (yyn
== YYPACT_NINF
)
1109 /* Not known => get a lookahead token if don't already have one. */
1111 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1112 if (yychar
== YYEMPTY
)
1114 YYDPRINTF ((stderr
, "Reading a token: "));
1118 if (yychar
<= YYEOF
)
1120 yychar
= yytoken
= YYEOF
;
1121 YYDPRINTF ((stderr
, "Now at end of input.\n"));
1125 yytoken
= YYTRANSLATE (yychar
);
1126 YYDSYMPRINTF ("Next token is", yytoken
, &yylval
, &yylloc
);
1129 /* If the proper action on seeing token YYTOKEN is to reduce or to
1130 detect an error, take that action. */
1132 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
1137 if (yyn
== 0 || yyn
== YYTABLE_NINF
)
1146 /* Shift the lookahead token. */
1147 YYDPRINTF ((stderr
, "Shifting token %s, ", yytname
[yytoken
]));
1149 /* Discard the token being shifted unless it is eof. */
1150 if (yychar
!= YYEOF
)
1156 /* Count tokens shifted since error; after three, turn off error
1165 /*-----------------------------------------------------------.
1166 | yydefault -- do the default action for the current state. |
1167 `-----------------------------------------------------------*/
1169 yyn
= yydefact
[yystate
];
1175 /*-----------------------------.
1176 | yyreduce -- Do a reduction. |
1177 `-----------------------------*/
1179 /* yyn is the number of a rule to reduce with. */
1182 /* If YYLEN is nonzero, implement the default value of the action:
1185 Otherwise, the following line sets YYVAL to garbage.
1186 This behavior is undocumented and Bison
1187 users should not rely upon it. Assigning to YYVAL
1188 unconditionally makes the parser a bit smaller, and it avoids a
1189 GCC warning that YYVAL may be used uninitialized. */
1190 yyval
= yyvsp
[1-yylen
];
1193 YY_REDUCE_PRINT (yyn
);
1199 ((SyckParser
*)parser
)->root
= syck_hdlr_add_node( (SyckParser
*)parser
, yyvsp
[0].nodeData
);
1206 ((SyckParser
*)parser
)->root
= syck_hdlr_add_node( (SyckParser
*)parser
, yyvsp
[0].nodeData
);
1213 ((SyckParser
*)parser
)->eof
= 1;
1220 syck_add_transfer( yyvsp
[-1].name
, yyvsp
[0].nodeData
, ((SyckParser
*)parser
)->taguri_expansion
);
1221 yyval
.nodeData
= yyvsp
[0].nodeData
;
1228 syck_add_transfer( yyvsp
[-1].name
, yyvsp
[0].nodeData
, 0 );
1229 yyval
.nodeData
= yyvsp
[0].nodeData
;
1237 * _Anchors_: The language binding must keep a separate symbol table
1238 * for anchors. The actual ID in the symbol table is returned to the
1239 * higher nodes, though.
1241 yyval
.nodeData
= syck_hdlr_add_anchor( (SyckParser
*)parser
, yyvsp
[-1].name
, yyvsp
[0].nodeData
);
1248 yyval
.nodeData
= yyvsp
[-1].nodeData
;
1255 yyval
.nodeData
= yyvsp
[-1].nodeData
;
1262 NULL_NODE( parser
, n
);
1270 if ( ((SyckParser
*)parser
)->implicit_typing
== 1 )
1272 try_tag_implicit( yyvsp
[0].nodeData
, ((SyckParser
*)parser
)->taguri_expansion
);
1274 yyval
.nodeData
= yyvsp
[0].nodeData
;
1281 syck_add_transfer( yyvsp
[-1].name
, yyvsp
[0].nodeData
, ((SyckParser
*)parser
)->taguri_expansion
);
1282 yyval
.nodeData
= yyvsp
[0].nodeData
;
1289 syck_add_transfer( yyvsp
[-1].name
, yyvsp
[0].nodeData
, 0 );
1290 yyval
.nodeData
= yyvsp
[0].nodeData
;
1298 * _Anchors_: The language binding must keep a separate symbol table
1299 * for anchors. The actual ID in the symbol table is returned to the
1300 * higher nodes, though.
1302 yyval
.nodeData
= syck_hdlr_add_anchor( (SyckParser
*)parser
, yyvsp
[-1].name
, yyvsp
[0].nodeData
);
1309 syck_add_transfer( yyvsp
[-1].name
, yyvsp
[0].nodeData
, ((SyckParser
*)parser
)->taguri_expansion
);
1310 yyval
.nodeData
= yyvsp
[0].nodeData
;
1317 syck_add_transfer( yyvsp
[-1].name
, yyvsp
[0].nodeData
, 0 );
1318 yyval
.nodeData
= yyvsp
[0].nodeData
;
1325 if ( ((SyckParser
*)parser
)->implicit_typing
== 1 )
1327 try_tag_implicit( yyvsp
[0].nodeData
, ((SyckParser
*)parser
)->taguri_expansion
);
1329 yyval
.nodeData
= yyvsp
[0].nodeData
;
1336 yyval
.nodeData
= syck_hdlr_add_anchor( (SyckParser
*)parser
, yyvsp
[-1].name
, yyvsp
[0].nodeData
);
1344 * _Aliases_: The anchor symbol table is scanned for the anchor name.
1345 * The anchor's ID in the language's symbol table is returned.
1347 yyval
.nodeData
= syck_hdlr_get_anchor( (SyckParser
*)parser
, yyvsp
[0].name
);
1354 SyckNode
*n
= yyvsp
[0].nodeData
;
1355 if ( ((SyckParser
*)parser
)->taguri_expansion
== 1 )
1357 n
->type_id
= syck_taguri( YAML_DOMAIN
, "str", 3 );
1361 n
->type_id
= syck_strndup( "str", 3 );
1370 yyval
.nodeData
= yyvsp
[-1].nodeData
;
1377 yyval
.nodeData
= yyvsp
[-1].nodeData
;
1384 yyval
.nodeData
= yyvsp
[-1].nodeData
;
1391 yyval
.nodeId
= syck_hdlr_add_node( (SyckParser
*)parser
, yyvsp
[0].nodeData
);
1398 syck_add_transfer( yyvsp
[-2].name
, yyvsp
[0].nodeData
, ((SyckParser
*)parser
)->taguri_expansion
);
1399 yyval
.nodeData
= yyvsp
[0].nodeData
;
1406 syck_add_transfer( yyvsp
[-1].name
, yyvsp
[0].nodeData
, ((SyckParser
*)parser
)->taguri_expansion
);
1407 yyval
.nodeData
= yyvsp
[0].nodeData
;
1414 syck_add_transfer( yyvsp
[-2].name
, yyvsp
[0].nodeData
, 0 );
1415 yyval
.nodeData
= yyvsp
[0].nodeData
;
1422 syck_add_transfer( yyvsp
[-1].name
, yyvsp
[0].nodeData
, 0 );
1423 yyval
.nodeData
= yyvsp
[0].nodeData
;
1430 yyval
.nodeData
= syck_hdlr_add_anchor( (SyckParser
*)parser
, yyvsp
[-2].name
, yyvsp
[0].nodeData
);
1437 yyval
.nodeData
= syck_hdlr_add_anchor( (SyckParser
*)parser
, yyvsp
[-1].name
, yyvsp
[0].nodeData
);
1444 yyval
.nodeData
= syck_new_seq( yyvsp
[0].nodeId
);
1451 syck_seq_add( yyvsp
[-2].nodeData
, yyvsp
[0].nodeId
);
1452 yyval
.nodeData
= yyvsp
[-2].nodeData
;
1459 yyval
.nodeData
= yyvsp
[-1].nodeData
;
1466 yyval
.nodeData
= yyvsp
[-1].nodeData
;
1473 yyval
.nodeData
= syck_alloc_seq();
1480 yyval
.nodeData
= syck_new_seq( syck_hdlr_add_node( (SyckParser
*)parser
, yyvsp
[0].nodeData
) );
1487 syck_seq_add( yyvsp
[-2].nodeData
, syck_hdlr_add_node( (SyckParser
*)parser
, yyvsp
[0].nodeData
) );
1488 yyval
.nodeData
= yyvsp
[-2].nodeData
;
1495 apply_seq_in_map( (SyckParser
*)parser
, yyvsp
[-1].nodeData
);
1496 yyval
.nodeData
= yyvsp
[-1].nodeData
;
1503 apply_seq_in_map( (SyckParser
*)parser
, yyvsp
[-1].nodeData
);
1504 yyval
.nodeData
= yyvsp
[-1].nodeData
;
1511 syck_add_transfer( yyvsp
[-2].name
, yyvsp
[0].nodeData
, ((SyckParser
*)parser
)->taguri_expansion
);
1512 yyval
.nodeData
= yyvsp
[0].nodeData
;
1519 syck_add_transfer( yyvsp
[-1].name
, yyvsp
[0].nodeData
, ((SyckParser
*)parser
)->taguri_expansion
);
1520 yyval
.nodeData
= yyvsp
[0].nodeData
;
1527 syck_add_transfer( yyvsp
[-2].name
, yyvsp
[0].nodeData
, 0 );
1528 yyval
.nodeData
= yyvsp
[0].nodeData
;
1535 syck_add_transfer( yyvsp
[-1].name
, yyvsp
[0].nodeData
, 0 );
1536 yyval
.nodeData
= yyvsp
[0].nodeData
;
1543 yyval
.nodeData
= syck_hdlr_add_anchor( (SyckParser
*)parser
, yyvsp
[-2].name
, yyvsp
[0].nodeData
);
1550 yyval
.nodeData
= syck_hdlr_add_anchor( (SyckParser
*)parser
, yyvsp
[-1].name
, yyvsp
[0].nodeData
);
1557 yyval
.nodeData
= yyvsp
[-1].nodeData
;
1564 yyval
.nodeData
= syck_new_map(
1565 syck_hdlr_add_node( (SyckParser
*)parser
, yyvsp
[-2].nodeData
),
1566 syck_hdlr_add_node( (SyckParser
*)parser
, yyvsp
[0].nodeData
) );
1573 if ( yyvsp
[-2].nodeData
->shortcut
== NULL
)
1575 yyvsp
[-2].nodeData
->shortcut
= syck_new_seq( yyvsp
[0].nodeId
);
1579 syck_seq_add( yyvsp
[-2].nodeData
->shortcut
, yyvsp
[0].nodeId
);
1581 yyval
.nodeData
= yyvsp
[-2].nodeData
;
1588 apply_seq_in_map( (SyckParser
*)parser
, yyvsp
[-2].nodeData
);
1589 syck_map_update( yyvsp
[-2].nodeData
, yyvsp
[0].nodeData
);
1590 syck_free_node( yyvsp
[0].nodeData
);
1591 yyvsp
[0].nodeData
= NULL
;
1592 yyval
.nodeData
= yyvsp
[-2].nodeData
;
1599 yyval
.nodeData
= yyvsp
[-1].nodeData
;
1606 yyval
.nodeData
= syck_new_map(
1607 syck_hdlr_add_node( (SyckParser
*)parser
, yyvsp
[-2].nodeData
),
1608 syck_hdlr_add_node( (SyckParser
*)parser
, yyvsp
[0].nodeData
) );
1615 yyval
.nodeData
= yyvsp
[-1].nodeData
;
1622 yyval
.nodeData
= syck_alloc_map();
1629 syck_map_update( yyvsp
[-2].nodeData
, yyvsp
[0].nodeData
);
1630 syck_free_node( yyvsp
[0].nodeData
);
1631 yyvsp
[0].nodeData
= NULL
;
1632 yyval
.nodeData
= yyvsp
[-2].nodeData
;
1639 NULL_NODE( parser
, n
);
1640 yyval
.nodeData
= syck_new_map(
1641 syck_hdlr_add_node( (SyckParser
*)parser
, yyvsp
[0].nodeData
),
1642 syck_hdlr_add_node( (SyckParser
*)parser
, n
) );
1649 /* Line 1010 of yacc.c. */
1656 YY_STACK_PRINT (yyss
, yyssp
);
1661 /* Now `shift' the result of the reduction. Determine what state
1662 that goes to, based on the state we popped back to and the rule
1663 number reduced by. */
1667 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
1668 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
1669 yystate
= yytable
[yystate
];
1671 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
1676 /*------------------------------------.
1677 | yyerrlab -- here on detecting error |
1678 `------------------------------------*/
1680 /* If not already recovering from an error, report this error. */
1685 yyn
= yypact
[yystate
];
1687 if (YYPACT_NINF
< yyn
&& yyn
< YYLAST
)
1689 YYSIZE_T yysize
= 0;
1690 int yytype
= YYTRANSLATE (yychar
);
1691 const char* yyprefix
;
1695 /* Start YYX at -YYN if negative to avoid negative indexes in
1697 int yyxbegin
= yyn
< 0 ? -yyn
: 0;
1699 /* Stay within bounds of both yycheck and yytname. */
1700 int yychecklim
= YYLAST
- yyn
;
1701 int yyxend
= yychecklim
< YYNTOKENS
? yychecklim
: YYNTOKENS
;
1704 yyprefix
= ", expecting ";
1705 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
1706 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
)
1708 yysize
+= yystrlen (yyprefix
) + yystrlen (yytname
[yyx
]);
1716 yysize
+= (sizeof ("syntax error, unexpected ")
1717 + yystrlen (yytname
[yytype
]));
1718 yymsg
= (char *) YYSTACK_ALLOC (yysize
);
1721 char *yyp
= yystpcpy (yymsg
, "syntax error, unexpected ");
1722 yyp
= yystpcpy (yyp
, yytname
[yytype
]);
1726 yyprefix
= ", expecting ";
1727 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
1728 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
)
1730 yyp
= yystpcpy (yyp
, yyprefix
);
1731 yyp
= yystpcpy (yyp
, yytname
[yyx
]);
1736 YYSTACK_FREE (yymsg
);
1739 yyerror ("syntax error; also virtual memory exhausted");
1742 #endif /* YYERROR_VERBOSE */
1743 yyerror ("syntax error");
1748 if (yyerrstatus
== 3)
1750 /* If just tried and failed to reuse lookahead token after an
1751 error, discard it. */
1753 if (yychar
<= YYEOF
)
1755 /* If at end of input, pop the error token,
1756 then the rest of the stack, then return failure. */
1757 if (yychar
== YYEOF
)
1763 YYDSYMPRINTF ("Error: popping", yystos
[*yyssp
], yyvsp
, yylsp
);
1764 yydestruct (yystos
[*yyssp
], yyvsp
);
1769 YYDSYMPRINTF ("Error: discarding", yytoken
, &yylval
, &yylloc
);
1770 yydestruct (yytoken
, &yylval
);
1776 /* Else will try to reuse lookahead token after shifting the error
1781 /*---------------------------------------------------.
1782 | yyerrorlab -- error raised explicitly by YYERROR. |
1783 `---------------------------------------------------*/
1787 /* Pacify GCC when the user code never invokes YYERROR and the label
1788 yyerrorlab therefore never appears in user code. */
1799 /*-------------------------------------------------------------.
1800 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1801 `-------------------------------------------------------------*/
1803 yyerrstatus
= 3; /* Each real token shifted decrements this. */
1807 yyn
= yypact
[yystate
];
1808 if (yyn
!= YYPACT_NINF
)
1811 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
1819 /* Pop the current state because it cannot handle the error token. */
1823 YYDSYMPRINTF ("Error: popping", yystos
[*yyssp
], yyvsp
, yylsp
);
1824 yydestruct (yystos
[yystate
], yyvsp
);
1827 YY_STACK_PRINT (yyss
, yyssp
);
1833 YYDPRINTF ((stderr
, "Shifting error token, "));
1842 /*-------------------------------------.
1843 | yyacceptlab -- YYACCEPT comes here. |
1844 `-------------------------------------*/
1849 /*-----------------------------------.
1850 | yyabortlab -- YYABORT comes here. |
1851 `-----------------------------------*/
1857 /*----------------------------------------------.
1858 | yyoverflowlab -- parser overflow comes here. |
1859 `----------------------------------------------*/
1861 yyerror ("parser stack overflow");
1869 YYSTACK_FREE (yyss
);
1879 apply_seq_in_map( SyckParser
*parser
, SyckNode
*n
)
1882 if ( n
->shortcut
== NULL
)
1887 map_len
= syck_map_count( n
);
1888 syck_map_assign( n
, map_value
, map_len
- 1,
1889 syck_hdlr_add_node( parser
, n
->shortcut
) );