1 /* A Bison parser, made from res.y, by GNU bison 1.75. */
3 /* Skeleton parser for Yacc-like parsing with Bison,
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 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. */
42 /* Using locations. */
43 #define YYLSP_NEEDED 0
45 /* If NAME_PREFIX is specified substitute the variables and functions
47 #define yyparse ResParserparse
48 #define yylex ResParserlex
49 #define yyerror ResParsererror
50 #define yylval ResParserlval
51 #define yychar ResParserchar
52 #define yydebug ResParserdebug
53 #define yynerrs ResParsernerrs
59 /* Put the tokens into the symbol table, so that GDB and other debuggers
67 #define STRING_TOKEN 259
72 /* Copy the first part of user declarations. */
79 /* Some addn'l includes, necessary but not included by the
85 /* prototypes for the parser callbacks.
91 extern resparse_data *rpd_ptr;
92 extern std::vector<std::string> res_attr_vec;
93 extern std::vector<std::string> res_val_vec;
94 extern std::string res_a, res_v;
102 /* Enabling traces. */
107 /* Enabling verbose error messages. */
108 #ifdef YYERROR_VERBOSE
109 # undef YYERROR_VERBOSE
110 # define YYERROR_VERBOSE 1
112 # define YYERROR_VERBOSE 0
123 /* for FTA definition. */
126 /* Line 193 of /usr/local/share/bison/yacc.c. */
127 #line 128 "res.tab.cc"
128 # define YYSTYPE yystype
129 # define YYSTYPE_IS_TRIVIAL 1
133 typedef struct yyltype
140 # define YYLTYPE yyltype
141 # define YYLTYPE_IS_TRIVIAL 1
144 /* Copy the second part of user declarations. */
147 /* Line 213 of /usr/local/share/bison/yacc.c. */
148 #line 149 "res.tab.cc"
150 #if ! defined (yyoverflow) || YYERROR_VERBOSE
152 /* The parser invokes alloca or malloc; define the necessary symbols. */
154 # if YYSTACK_USE_ALLOCA
155 # define YYSTACK_ALLOC alloca
157 # ifndef YYSTACK_USE_ALLOCA
158 # if defined (alloca) || defined (_ALLOCA_H)
159 # define YYSTACK_ALLOC alloca
162 # define YYSTACK_ALLOC __builtin_alloca
168 # ifdef YYSTACK_ALLOC
169 /* Pacify GCC's `empty if-body' warning. */
170 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
172 # if defined (__STDC__) || defined (__cplusplus)
173 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
174 # define YYSIZE_T size_t
176 # define YYSTACK_ALLOC malloc
177 # define YYSTACK_FREE free
179 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
182 #if (! defined (yyoverflow) \
183 && (! defined (__cplusplus) \
184 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
186 /* A type that is properly aligned for any stack member. */
193 /* The size of the maximum gap between one aligned stack and the next. */
194 # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
196 /* The size of an array large to enough to hold all stacks, each with
198 # define YYSTACK_BYTES(N) \
199 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
202 /* Copy COUNT objects from FROM to TO. The source and destination do
206 # define YYCOPY(To, From, Count) \
207 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
209 # define YYCOPY(To, From, Count) \
212 register YYSIZE_T yyi; \
213 for (yyi = 0; yyi < (Count); yyi++) \
214 (To)[yyi] = (From)[yyi]; \
220 /* Relocate STACK from its old location to the new one. The
221 local variables YYSIZE and YYSTACKSIZE give the old and new number of
222 elements in the stack, and YYPTR gives the new location of the
223 stack. Advance YYPTR to a properly aligned location for the next
225 # define YYSTACK_RELOCATE(Stack) \
228 YYSIZE_T yynewbytes; \
229 YYCOPY (&yyptr->Stack, Stack, yysize); \
230 Stack = &yyptr->Stack; \
231 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
232 yyptr += yynewbytes / sizeof (*yyptr); \
238 #if defined (__STDC__) || defined (__cplusplus)
239 typedef signed char yysigned_char;
241 typedef short yysigned_char;
244 /* YYFINAL -- State number of the termination state. */
248 /* YYNTOKENS -- Number of terminals. */
250 /* YYNNTS -- Number of nonterminals. */
252 /* YYNRULES -- Number of rules. */
254 /* YYNRULES -- Number of states. */
257 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
259 #define YYMAXUTOK 259
261 #define YYTRANSLATE(X) \
262 ((unsigned)(X) <= YYMAXUTOK ? yytranslate[X] : YYUNDEFTOK)
264 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
265 static const unsigned char yytranslate[] =
267 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
268 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
269 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
270 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
271 2, 2, 2, 2, 2, 2, 2, 6, 2, 2,
272 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
273 5, 8, 7, 2, 2, 2, 2, 2, 2, 2,
274 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
275 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
276 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
277 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
278 2, 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, 2, 2, 2, 2, 2, 2,
283 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
284 2, 2, 2, 2, 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, 2, 2, 2, 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, 2, 2, 2, 2, 2, 2, 2,
291 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
292 2, 2, 2, 2, 2, 2, 1, 2, 3, 4
296 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
298 static const unsigned char yyprhs[] =
300 0, 0, 3, 5, 9, 12, 18, 23, 28, 30,
304 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
305 static const yysigned_char yyrhs[] =
307 10, 0, -1, 11, -1, 12, 14, 13, -1, 12,
308 13, -1, 5, 3, 15, 6, 7, -1, 5, 3,
309 15, 7, -1, 5, 6, 3, 7, -1, 11, -1,
310 14, 11, -1, 16, -1, -1, 17, -1, 16, 17,
314 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
315 static const unsigned char yyrline[] =
317 0, 57, 57, 60, 62, 63, 69, 73, 78, 80,
322 #if YYDEBUG || YYERROR_VERBOSE
323 /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
324 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
325 static const char *const yytname[] =
327 "$end", "error", "$undefined", "NAME", "STRING_TOKEN", "'<'", "'/'",
328 "'>'", "'='", "$accept", "parse_result", "resource", "start_tag",
329 "end_tag", "res_list", "opt_val_list", "val_list", "val", 0
334 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
336 static const unsigned short yytoknum[] =
338 0, 256, 257, 258, 259, 60, 47, 62, 61
342 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
343 static const unsigned char yyr1[] =
345 0, 9, 10, 11, 11, 11, 12, 13, 14, 14,
349 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
350 static const unsigned char yyr2[] =
352 0, 2, 1, 3, 2, 5, 4, 4, 1, 2,
356 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
357 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
358 means the default is an error. */
359 static const unsigned char yydefact[] =
361 0, 0, 0, 2, 0, 11, 1, 0, 8, 4,
362 0, 0, 0, 10, 12, 0, 9, 3, 0, 0,
366 /* YYDEFGOTO[NTERM-NUM]. */
367 static const yysigned_char yydefgoto[] =
369 -1, 2, 3, 4, 9, 10, 12, 13, 14
372 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
374 #define YYPACT_NINF -5
375 static const yysigned_char yypact[] =
377 -3, 0, 5, -5, 4, 7, -5, -2, -5, -5,
378 4, 3, 1, 7, -5, 9, -5, -5, 10, 6,
379 -5, -5, 8, -5, -5, -5
382 /* YYPGOTO[NTERM-NUM]. */
383 static const yysigned_char yypgoto[] =
385 -5, -5, -4, -5, 11, -5, -5, -5, 12
388 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
389 positive, shift that token. If negative, reduce the rule which
390 number is the opposite. If zero, do what YYDEFACT says.
391 If YYTABLE_NINF, parse error. */
392 #define YYTABLE_NINF -1
393 static const unsigned char yytable[] =
395 8, 5, 1, 5, 15, 6, 16, 19, 20, 7,
396 11, 18, 22, 24, 23, 25, 0, 0, 0, 0,
400 static const yysigned_char yycheck[] =
402 4, 3, 5, 3, 6, 0, 10, 6, 7, 5,
403 3, 8, 3, 7, 4, 7, -1, -1, -1, -1,
404 -1, 10, -1, -1, -1, 13
407 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
408 symbol of state STATE-NUM. */
409 static const unsigned char yystos[] =
411 0, 5, 10, 11, 12, 3, 0, 5, 11, 13,
412 14, 3, 15, 16, 17, 6, 11, 13, 8, 6,
416 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
417 # define YYSIZE_T __SIZE_TYPE__
419 #if ! defined (YYSIZE_T) && defined (size_t)
420 # define YYSIZE_T size_t
422 #if ! defined (YYSIZE_T)
423 # if defined (__STDC__) || defined (__cplusplus)
424 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
425 # define YYSIZE_T size_t
428 #if ! defined (YYSIZE_T)
429 # define YYSIZE_T unsigned int
432 #define yyerrok (yyerrstatus = 0)
433 #define yyclearin (yychar = YYEMPTY)
437 #define YYACCEPT goto yyacceptlab
438 #define YYABORT goto yyabortlab
439 #define YYERROR goto yyerrlab1
441 /* Like YYERROR except do call yyerror. This remains here temporarily
442 to ease the transition to the new meaning of YYERROR, for GCC.
443 Once GCC version 2 has supplanted version 1, this can go. */
445 #define YYFAIL goto yyerrlab
447 #define YYRECOVERING() (!!yyerrstatus)
449 #define YYBACKUP(Token, Value) \
451 if (yychar == YYEMPTY && yylen == 1) \
455 yychar1 = YYTRANSLATE (yychar); \
461 yyerror ("syntax error: cannot back up"); \
467 #define YYERRCODE 256
469 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
472 #ifndef YYLLOC_DEFAULT
473 # define YYLLOC_DEFAULT(Current, Rhs, N) \
474 Current.first_line = Rhs[1].first_line; \
475 Current.first_column = Rhs[1].first_column; \
476 Current.last_line = Rhs[N].last_line; \
477 Current.last_column = Rhs[N].last_column;
480 /* YYLEX -- calling `yylex' with the right arguments. */
482 #define YYLEX yylex ()
484 /* Enable debugging if requested. */
488 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
489 # define YYFPRINTF fprintf
492 # define YYDPRINTF(Args) \
497 # define YYDSYMPRINT(Args) \
502 /* Nonzero means print parse trace. It is left uninitialized so that
503 multiple parsers can coexist. */
506 # define YYDPRINTF(Args)
507 # define YYDSYMPRINT(Args)
508 #endif /* !YYDEBUG */
510 /* YYINITDEPTH -- initial size of the parser's stacks. */
512 # define YYINITDEPTH 200
515 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
516 if the built-in stack extension method is used).
518 Do not make this value too large; the results are undefined if
519 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
520 evaluated with infinite-precision integer arithmetic. */
527 # define YYMAXDEPTH 10000
535 # if defined (__GLIBC__) && defined (_STRING_H)
536 # define yystrlen strlen
538 /* Return the length of YYSTR. */
540 # if defined (__STDC__) || defined (__cplusplus)
541 yystrlen (const char *yystr)
547 register const char *yys = yystr;
549 while (*yys++ != '\0')
552 return yys - yystr - 1;
558 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
559 # define yystpcpy stpcpy
561 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
564 # if defined (__STDC__) || defined (__cplusplus)
565 yystpcpy (char *yydest, const char *yysrc)
567 yystpcpy (yydest, yysrc)
572 register char *yyd = yydest;
573 register const char *yys = yysrc;
575 while ((*yyd++ = *yys++) != '\0')
583 #endif /* !YYERROR_VERBOSE */
588 /*-----------------------------.
589 | Print this symbol on YYOUT. |
590 `-----------------------------*/
593 #if defined (__STDC__) || defined (__cplusplus)
594 yysymprint (FILE* yyout, int yytype, YYSTYPE yyvalue)
596 yysymprint (yyout, yytype, yyvalue)
602 /* Pacify ``unused variable'' warnings. */
605 if (yytype < YYNTOKENS)
607 YYFPRINTF (yyout, "token %s (", yytname[yytype]);
609 YYPRINT (yyout, yytoknum[yytype], yyvalue);
613 YYFPRINTF (yyout, "nterm %s (", yytname[yytype]);
620 YYFPRINTF (yyout, ")");
622 #endif /* YYDEBUG. */
625 /*-----------------------------------------------.
626 | Release the memory associated to this symbol. |
627 `-----------------------------------------------*/
630 #if defined (__STDC__) || defined (__cplusplus)
631 yydestruct (int yytype, YYSTYPE yyvalue)
633 yydestruct (yytype, yyvalue)
638 /* Pacify ``unused variable'' warnings. */
650 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
651 into yyparse. The argument should have type void *.
652 It should actually point to an object.
653 Grammar actions can access the variable by casting it
654 to the proper pointer type. */
657 # if defined (__STDC__) || defined (__cplusplus)
658 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
659 # define YYPARSE_PARAM_DECL
661 # define YYPARSE_PARAM_ARG YYPARSE_PARAM
662 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
664 #else /* !YYPARSE_PARAM */
665 # define YYPARSE_PARAM_ARG
666 # define YYPARSE_PARAM_DECL
667 #endif /* !YYPARSE_PARAM */
669 /* Prevent warning if -Wstrict-prototypes. */
671 # ifdef YYPARSE_PARAM
672 int yyparse (void *);
679 /* The lookahead symbol. */
682 /* The semantic value of the lookahead symbol. */
685 /* Number of parse errors so far. */
690 yyparse (YYPARSE_PARAM_ARG)
694 register int yystate;
697 /* Number of tokens to shift before error messages enabled. */
699 /* Lookahead token as an internal (translated) token number. */
702 /* Three stacks and their tools:
703 `yyss': related to states,
704 `yyvs': related to semantic values,
705 `yyls': related to locations.
707 Refer to the stacks thru separate pointers, to allow yyoverflow
708 to reallocate them elsewhere. */
710 /* The state stack. */
711 short yyssa[YYINITDEPTH];
713 register short *yyssp;
715 /* The semantic value stack. */
716 YYSTYPE yyvsa[YYINITDEPTH];
717 YYSTYPE *yyvs = yyvsa;
718 register YYSTYPE *yyvsp;
722 #define YYPOPSTACK (yyvsp--, yyssp--)
724 YYSIZE_T yystacksize = YYINITDEPTH;
726 /* The variables used to return semantic value and location from the
731 /* When reducing, the number of symbols on the RHS of the reduced
735 YYDPRINTF ((stderr, "Starting parse\n"));
740 yychar = YYEMPTY; /* Cause a token to be read. */
742 /* Initialize stack pointers.
743 Waste one element of value and location stack
744 so that they stay on the same level as the state stack.
745 The wasted elements are never initialized. */
752 /*------------------------------------------------------------.
753 | yynewstate -- Push a new state, which is found in yystate. |
754 `------------------------------------------------------------*/
756 /* In all cases, when you get here, the value and location stacks
757 have just been pushed. so pushing a state here evens the stacks.
764 if (yyssp >= yyss + yystacksize - 1)
766 /* Get the current used size of the three stacks, in elements. */
767 YYSIZE_T yysize = yyssp - yyss + 1;
771 /* Give user a chance to reallocate the stack. Use copies of
772 these so that the &'s don't force the real ones into
774 YYSTYPE *yyvs1 = yyvs;
778 /* Each stack pointer address is followed by the size of the
779 data in use in that stack, in bytes. This used to be a
780 conditional around just the two extra args, but that might
781 be undefined if yyoverflow is a macro. */
782 yyoverflow ("parser stack overflow",
783 &yyss1, yysize * sizeof (*yyssp),
784 &yyvs1, yysize * sizeof (*yyvsp),
791 #else /* no yyoverflow */
792 # ifndef YYSTACK_RELOCATE
795 /* Extend the stack our own way. */
796 if (yystacksize >= YYMAXDEPTH)
799 if (yystacksize > YYMAXDEPTH)
800 yystacksize = YYMAXDEPTH;
804 union yyalloc *yyptr =
805 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
808 YYSTACK_RELOCATE (yyss);
809 YYSTACK_RELOCATE (yyvs);
811 # undef YYSTACK_RELOCATE
813 YYSTACK_FREE (yyss1);
816 #endif /* no yyoverflow */
818 yyssp = yyss + yysize - 1;
819 yyvsp = yyvs + yysize - 1;
822 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
823 (unsigned long int) yystacksize));
825 if (yyssp >= yyss + yystacksize - 1)
829 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
838 /* Do appropriate processing given the current state. */
839 /* Read a lookahead token if we need one and don't already have one. */
842 /* First try to decide what to do without reference to lookahead token. */
844 yyn = yypact[yystate];
845 if (yyn == YYPACT_NINF)
848 /* Not known => get a lookahead token if don't already have one. */
850 /* yychar is either YYEMPTY or YYEOF
851 or a valid token in external form. */
853 if (yychar == YYEMPTY)
855 YYDPRINTF ((stderr, "Reading a token: "));
859 /* Convert token to internal form (in yychar1) for indexing tables with. */
861 if (yychar <= 0) /* This means end of input. */
864 yychar = YYEOF; /* Don't call YYLEX any more. */
866 YYDPRINTF ((stderr, "Now at end of input.\n"));
870 yychar1 = YYTRANSLATE (yychar);
872 /* We have to keep this `#if YYDEBUG', since we use variables
873 which are defined only if `YYDEBUG' is set. */
874 YYDPRINTF ((stderr, "Next token is "));
875 YYDSYMPRINT ((stderr, yychar1, yylval));
876 YYDPRINTF ((stderr, "\n"));
879 /* If the proper action on seeing token YYCHAR1 is to reduce or to
880 detect an error, take that action. */
882 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yychar1)
887 if (yyn == 0 || yyn == YYTABLE_NINF)
896 /* Shift the lookahead token. */
897 YYDPRINTF ((stderr, "Shifting token %d (%s), ",
898 yychar, yytname[yychar1]));
900 /* Discard the token being shifted unless it is eof. */
907 /* Count tokens shifted since error; after three, turn off error
916 /*-----------------------------------------------------------.
917 | yydefault -- do the default action for the current state. |
918 `-----------------------------------------------------------*/
920 yyn = yydefact[yystate];
926 /*-----------------------------.
927 | yyreduce -- Do a reduction. |
928 `-----------------------------*/
930 /* yyn is the number of a rule to reduce with. */
933 /* If YYLEN is nonzero, implement the default value of the action:
936 Otherwise, the following line sets YYVAL to garbage.
937 This behavior is undocumented and Bison
938 users should not rely upon it. Assigning to YYVAL
939 unconditionally makes the parser a bit smaller, and it avoids a
940 GCC warning that YYVAL may be used uninitialized. */
941 yyval = yyvsp[1-yylen];
946 /* We have to keep this `#if YYDEBUG', since we use variables which
947 are defined only if `YYDEBUG' is set. */
952 YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
953 yyn - 1, yyrline[yyn]);
955 /* Print the symbols being reduced, and their result. */
956 for (yyi = yyprhs[yyn]; yyrhs[yyi] >= 0; yyi++)
957 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
958 YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
965 {startElement(rpd_ptr, yyvsp[-3].strval, res_attr_vec, res_val_vec);
966 endElement(rpd_ptr, yyvsp[-3].strval);
972 {startElement(rpd_ptr, yyvsp[-2].strval, res_attr_vec, res_val_vec);}
977 {endElement(rpd_ptr, yyvsp[-1].strval);}
982 {res_attr_vec.clear(); res_val_vec.clear();}
987 {res_attr_vec.clear(); res_attr_vec.push_back(res_a);
988 res_val_vec.clear(); res_val_vec.push_back(res_v); }
993 {res_attr_vec.push_back(res_a);
994 res_val_vec.push_back(res_v); }
999 {res_a = yyvsp[-2].strval; res_v = yyvsp[0].strval;}
1005 /* Line 1016 of /usr/local/share/bison/yacc.c. */
1006 #line 1007 "res.tab.cc"
1015 short *yyssp1 = yyss - 1;
1016 YYFPRINTF (stderr, "state stack now");
1017 while (yyssp1 != yyssp)
1018 YYFPRINTF (stderr, " %d", *++yyssp1);
1019 YYFPRINTF (stderr, "\n");
1026 /* Now `shift' the result of the reduction. Determine what state
1027 that goes to, based on the state we popped back to and the rule
1028 number reduced by. */
1032 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1033 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1034 yystate = yytable[yystate];
1036 yystate = yydefgoto[yyn - YYNTOKENS];
1041 /*------------------------------------.
1042 | yyerrlab -- here on detecting error |
1043 `------------------------------------*/
1045 /* If not already recovering from an error, report this error. */
1050 yyn = yypact[yystate];
1052 if (YYPACT_NINF < yyn && yyn < YYLAST)
1054 YYSIZE_T yysize = 0;
1055 int yytype = YYTRANSLATE (yychar);
1060 /* Start YYX at -YYN if negative to avoid negative indexes in
1062 for (yyx = yyn < 0 ? -yyn : 0;
1063 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
1064 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1065 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
1066 yysize += yystrlen ("parse error, unexpected ") + 1;
1067 yysize += yystrlen (yytname[yytype]);
1068 yymsg = (char *) YYSTACK_ALLOC (yysize);
1071 char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
1072 yyp = yystpcpy (yyp, yytname[yytype]);
1077 for (yyx = yyn < 0 ? -yyn : 0;
1078 yyx < (int) (sizeof (yytname) / sizeof (char *));
1080 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1082 const char *yyq = ! yycount ? ", expecting " : " or ";
1083 yyp = yystpcpy (yyp, yyq);
1084 yyp = yystpcpy (yyp, yytname[yyx]);
1089 YYSTACK_FREE (yymsg);
1092 yyerror ("parse error; also virtual memory exhausted");
1095 #endif /* YYERROR_VERBOSE */
1096 yyerror ("parse error");
1101 /*----------------------------------------------------.
1102 | yyerrlab1 -- error raised explicitly by an action. |
1103 `----------------------------------------------------*/
1105 if (yyerrstatus == 3)
1107 /* If just tried and failed to reuse lookahead token after an
1108 error, discard it. */
1110 /* Return failure if at end of input. */
1111 if (yychar == YYEOF)
1113 /* Pop the error token. */
1115 /* Pop the rest of the stack. */
1116 while (yyssp > yyss)
1118 YYDPRINTF ((stderr, "Error: popping "));
1119 YYDSYMPRINT ((stderr,
1122 YYDPRINTF ((stderr, "\n"));
1123 yydestruct (yystos[*yyssp], *yyvsp);
1129 YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
1130 yychar, yytname[yychar1]));
1131 yydestruct (yychar1, yylval);
1135 /* Else will try to reuse lookahead token after shifting the error
1138 yyerrstatus = 3; /* Each real token shifted decrements this. */
1142 yyn = yypact[yystate];
1143 if (yyn != YYPACT_NINF)
1146 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1154 /* Pop the current state because it cannot handle the error token. */
1158 YYDPRINTF ((stderr, "Error: popping "));
1159 YYDSYMPRINT ((stderr,
1160 yystos[*yyssp], *yyvsp));
1161 YYDPRINTF ((stderr, "\n"));
1163 yydestruct (yystos[yystate], *yyvsp);
1171 short *yyssp1 = yyss - 1;
1172 YYFPRINTF (stderr, "Error: state stack now");
1173 while (yyssp1 != yyssp)
1174 YYFPRINTF (stderr, " %d", *++yyssp1);
1175 YYFPRINTF (stderr, "\n");
1183 YYDPRINTF ((stderr, "Shifting error token, "));
1192 /*-------------------------------------.
1193 | yyacceptlab -- YYACCEPT comes here. |
1194 `-------------------------------------*/
1199 /*-----------------------------------.
1200 | yyabortlab -- YYABORT comes here. |
1201 `-----------------------------------*/
1207 /*----------------------------------------------.
1208 | yyoverflowlab -- parser overflow comes here. |
1209 `----------------------------------------------*/
1211 yyerror ("parser stack overflow");
1219 YYSTACK_FREE (yyss);