1 m4_divert(-1) -*- C -*-
5 # Return the smallest signed int type able to handle the number MAX.
6 m4_define([b4_sint_type],
7 [m4_if(m4_eval([$1 <= 127]), [1], [signed char],
8 m4_eval([$1 <= 32767]), [1], [signed short],
9 m4_eval([$1 <= 2147483647]), [1], [signed int],
10 [m4_fatal([no signed int type for $1])])])
15 # Return the smallest unsigned int type able to handle the number MAX.
16 m4_define([b4_uint_type],
17 [m4_if(m4_eval([$1 <= 255]), [1], [unsigned char],
18 m4_eval([$1 <= 65535]), [1], [unsigned short],
19 m4_eval([$1 <= 4294967295]), [1], [unsigned int],
20 [m4_fatal([no unsigned int type for $1])])])
23 # b4_lhs_value([TYPE])
24 # --------------------
25 # Expansion of $<TYPE>$.
26 m4_define([b4_lhs_value],
27 [yyval[]m4_ifval([$1], [.$1])])
30 # b4_rhs_value(RULE-LENGTH, NUM, [TYPE])
31 # --------------------------------------
32 # Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH
34 m4_define([b4_rhs_value],
35 [yyvsp@<:@m4_eval([$2 - $1])@:>@m4_ifval([$3], [.$3])])
41 m4_define([b4_lhs_location],
45 # b4_rhs_location(RULE-LENGTH, NUM)
46 # ---------------------------------
47 # Expansion of @NUM, where the current rule has RULE-LENGTH symbols
49 m4_define([b4_rhs_location],
50 [yylsp@<:@m4_eval([$2 - $1])@:>@])
53 m4_define_default([b4_input_suffix], [.y])
55 m4_define_default([b4_output_parser_suffix],
56 [m4_translit(b4_input_suffix, [yY], [cC])])
58 m4_define_default([b4_output_parser_name],
59 [b4_output_prefix[]b4_output_infix[]b4_output_parser_suffix[]])
62 m4_define_default([b4_output_header_suffix],
63 [m4_translit(b4_input_suffix, [yY], [hH])])
65 m4_define_default([b4_output_header_name],
66 [b4_output_prefix[]b4_output_infix[]b4_output_header_suffix[]])
68 m4_define_default([b4_header_guard],
69 [m4_bpatsubst(m4_toupper([BISON_]b4_output_header_name),
70 [[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]], [_])])
73 # b4_token_define(TOKEN-NAME, TOKEN-NUMBER)
74 # -----------------------------------------
75 # Output the definition of this token as #define.
76 m4_define([b4_token_define],
81 # b4_token_enum(TOKEN-NAME, TOKEN-NUMBER)
82 # ---------------------------------------
83 # Output the definition of this token as an enum.
84 m4_define([b4_token_enum],
88 # b4_token_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
89 # -------------------------------------------------------
90 # Output the definition of the tokens as #define.
91 m4_define([b4_token_defines],
93 # if defined (__STDC__) || defined (__cplusplus)
94 /* Put the tokens into the symbol table, so that GDB and other debuggers
97 m4_map_sep([ b4_token_enum], [,
101 /* POSIX requires `int' for tokens in interfaces. */
102 # define YYTOKENTYPE int
105 m4_map([b4_token_define], [$@])])
109 #output "b4_output_parser_name"
110 /* A Bison parser, made from b4_filename
111 by GNU bison b4_version. */
113 /* Skeleton output parser for Bison,
114 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
117 This program is free software; you can redistribute it and/or modify
118 it under the terms of the GNU General Public License as published by
119 the Free Software Foundation; either version 2, or (at your option)
122 This program is distributed in the hope that it will be useful,
123 but WITHOUT ANY WARRANTY; without even the implied warranty of
124 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
125 GNU General Public License for more details.
127 You should have received a copy of the GNU General Public License
128 along with this program; if not, write to the Free Software
129 Foundation, Inc., 59 Temple Place - Suite 330,
130 Boston, MA 02111-1307, USA. */
132 /* As a special exception, when this file is copied by Bison into a
133 Bison output file, you may use that output file without restriction.
134 This special exception was added by the Free Software Foundation
135 in version 1.24 of Bison. */
137 /* This is the parser code that is written into each bison parser when
138 the %semantic_parser declaration is not specified in the grammar.
139 It was written by Richard Stallman by simplifying the original so
140 called ``semantic'' parser. */
142 /* All symbols defined below should begin with yy or YY, to avoid
143 infringing on user name space. This should be done even for local
144 variables, as they might otherwise be expanded by user macros.
145 There are some unavoidable exceptions within include files to
146 define necessary library symbols; they are noted "INFRINGES ON
147 USER NAME SPACE" below. */
149 /* Identify Bison output. */
153 #define YYPURE b4_pure
155 /* Using locations. */
156 #define YYLSP_NEEDED b4_locations_flag
158 m4_if(b4_prefix[], [yy], [],
159 [/* If NAME_PREFIX is specified substitute the variables and functions
161 #define yyparse b4_prefix[]parse
162 #define yylex b4_prefix[]lex
163 #define yyerror b4_prefix[]error
164 #define yylval b4_prefix[]lval
165 #define yychar b4_prefix[]char
166 #define yydebug b4_prefix[]debug
167 #define yynerrs b4_prefix[]nerrs
169 # define yylloc b4_prefix[]lloc
173 /* Copy the first part of user declarations. */
176 /* Enabling traces. */
178 # define YYDEBUG b4_debug
181 /* Enabling verbose error messages. */
182 #ifdef YYERROR_VERBOSE
183 # undef YYERROR_VERBOSE
184 # define YYERROR_VERBOSE 1
186 # define YYERROR_VERBOSE b4_error_verbose
190 m4_ifdef([b4_stype_line],
191 [#line b4_stype_line "b4_filename"
193 typedef b4_stype yystype;
194 # define YYSTYPE yystype
195 # define YYSTYPE_IS_TRIVIAL 1
199 typedef struct yyltype
206 # define YYLTYPE b4_ltype
207 # define YYLTYPE_IS_TRIVIAL 1
210 /* Copy the second part of user declarations. */
213 /* Line __line__ of __file__. */
214 #line __oline__ "__ofile__"
216 #if ! defined (yyoverflow) || YYERROR_VERBOSE
218 /* The parser invokes alloca or malloc; define the necessary symbols. */
220 # if YYSTACK_USE_ALLOCA
221 # define YYSTACK_ALLOC alloca
223 # ifndef YYSTACK_USE_ALLOCA
224 # if defined (alloca) || defined (_ALLOCA_H)
225 # define YYSTACK_ALLOC alloca
228 # define YYSTACK_ALLOC __builtin_alloca
234 # ifdef YYSTACK_ALLOC
235 /* Pacify GCC's `empty if-body' warning. */
236 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
238 # if defined (__STDC__) || defined (__cplusplus)
239 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
240 # define YYSIZE_T size_t
242 # define YYSTACK_ALLOC malloc
243 # define YYSTACK_FREE free
245 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
248 #if (! defined (yyoverflow) \
249 && (! defined (__cplusplus) \
250 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
252 /* A type that is properly aligned for any stack member. */
262 /* The size of the maximum gap between one aligned stack and the next. */
263 # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
265 /* The size of an array large to enough to hold all stacks, each with
268 # define YYSTACK_BYTES(N) \
269 ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
270 + 2 * YYSTACK_GAP_MAX)
272 # define YYSTACK_BYTES(N) \
273 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
277 /* Copy COUNT objects from FROM to TO. The source and destination do
281 # define YYCOPY(To, From, Count) \
282 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
284 # define YYCOPY(To, From, Count) \
287 register YYSIZE_T yyi; \
288 for (yyi = 0; yyi < (Count); yyi++) \
289 (To)[[yyi]] = (From)[[yyi]]; \
295 /* Relocate STACK from its old location to the new one. The
296 local variables YYSIZE and YYSTACKSIZE give the old and new number of
297 elements in the stack, and YYPTR gives the new location of the
298 stack. Advance YYPTR to a properly aligned location for the next
300 # define YYSTACK_RELOCATE(Stack) \
303 YYSIZE_T yynewbytes; \
304 YYCOPY (&yyptr->Stack, Stack, yysize); \
305 Stack = &yyptr->Stack; \
306 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
307 yyptr += yynewbytes / sizeof (*yyptr); \
314 b4_token_defines(b4_tokens)
316 /* YYFINAL -- State number of the termination state. */
317 #define YYFINAL b4_final
318 #define YYFLAG b4_flag
319 #define YYLAST b4_last
321 /* YYNTOKENS -- Number of terminals. */
322 #define YYNTOKENS b4_ntokens
323 /* YYNNTS -- Number of nonterminals. */
324 #define YYNNTS b4_nnts
325 /* YYNRULES -- Number of rules. */
326 #define YYNRULES b4_nrules
327 /* YYNRULES -- Number of states. */
328 #define YYNSTATES b4_nstates
330 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
331 #define YYUNDEFTOK b4_undef_token_number
332 #define YYMAXUTOK b4_user_token_number_max
334 typedef b4_uint_type(b4_token_number_max) yy_token_number_type;
335 #define YYTRANSLATE(X) \
336 ((unsigned)(X) <= YYMAXUTOK ? yytranslate[[X]] : YYUNDEFTOK)
338 /* YYTRANSLATE[[YYLEX]] -- Bison symbol number corresponding to YYLEX. */
339 static const yy_token_number_type yytranslate[[]] =
345 /* YYPRHS[[YYN]] -- Index of the first RHS symbol of rule number YYN in
347 static const short yyprhs[[]] =
352 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
353 typedef b4_sint_type(b4_rhs_number_max) yyrhs_t;
354 static const yyrhs_t yyrhs[[]] =
359 /* YYRLINE[[YYN]] -- source line where rule number YYN was defined. */
360 static const short yyrline[[]] =
366 #if (YYDEBUG) || YYERROR_VERBOSE
367 /* YYTNME[[SYMBOL-NUM]] -- String name of the symbol SYMBOL-NUM.
368 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
369 static const char *const yytname[[]] =
375 /* YYTOKNUM[[YYN]] -- Index in YYTNAME corresponding to YYLEX. */
376 static const short yytoknum[[]] =
381 /* YYR1[[YYN]] -- Symbol number of symbol that rule YYN derives. */
382 static const yy_token_number_type yyr1[[]] =
387 /* YYR2[[YYN]] -- Number of symbols composing right hand side of rule YYN. */
388 static const short yyr2[[]] =
393 /* YYDEFACT[[S]] -- default rule to reduce with in state S when YYTABLE
394 doesn't specify something else to do. Zero means the default is an
396 static const short yydefact[[]] =
401 /* YYPGOTO[[NTERM-NUM]]. */
402 static const short yydefgoto[[]] =
407 /* YYPACT[[STATE-NUM]] -- Index in YYTABLE of the portion describing
409 static const short yypact[[]] =
414 /* YYPGOTO[[NTERM-NUM]]. */
415 static const short yypgoto[[]] =
420 /* YYTABLE[[YYPACT[STATE-NUM]]]. What to do in state STATE-NUM. If
421 positive, shift that token. If negative, reduce the rule which
422 number is the opposite. If zero, do what YYDEFACT says. */
423 static const short yytable[[]] =
428 static const short yycheck[[]] =
434 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
435 # define YYSIZE_T __SIZE_TYPE__
437 #if ! defined (YYSIZE_T) && defined (size_t)
438 # define YYSIZE_T size_t
440 #if ! defined (YYSIZE_T)
441 # if defined (__STDC__) || defined (__cplusplus)
442 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
443 # define YYSIZE_T size_t
446 #if ! defined (YYSIZE_T)
447 # define YYSIZE_T unsigned int
450 #define yyerrok (yyerrstatus = 0)
451 #define yyclearin (yychar = YYEMPTY)
455 #define YYACCEPT goto yyacceptlab
456 #define YYABORT goto yyabortlab
457 #define YYERROR goto yyerrlab1
459 /* Like YYERROR except do call yyerror. This remains here temporarily
460 to ease the transition to the new meaning of YYERROR, for GCC.
461 Once GCC version 2 has supplanted version 1, this can go. */
463 #define YYFAIL goto yyerrlab
465 #define YYRECOVERING() (!!yyerrstatus)
467 #define YYBACKUP(Token, Value) \
469 if (yychar == YYEMPTY && yylen == 1) \
473 yychar1 = YYTRANSLATE (yychar); \
479 yyerror ("syntax error: cannot back up"); \
485 #define YYERRCODE 256
487 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
490 #ifndef YYLLOC_DEFAULT
491 # define YYLLOC_DEFAULT(Current, Rhs, N) \
492 Current.first_line = Rhs[[1]].first_line; \
493 Current.first_column = Rhs[[1]].first_column; \
494 Current.last_line = Rhs[[N]].last_line; \
495 Current.last_column = Rhs[[N]].last_column;
498 /* YYLEX -- calling `yylex' with the right arguments. */
503 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
505 # define YYLEX yylex (&yylval, &yylloc)
507 # else /* !YYLSP_NEEDED */
509 # define YYLEX yylex (&yylval, YYLEX_PARAM)
511 # define YYLEX yylex (&yylval)
513 # endif /* !YYLSP_NEEDED */
515 # define YYLEX yylex ()
518 /* Enable debugging if requested. */
522 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
523 # define YYFPRINTF fprintf
526 # define YYDPRINTF(Args) \
531 /* Nonzero means print parse trace. It is left uninitialized so that
532 multiple parsers can coexist. */
535 # define YYDPRINTF(Args)
536 #endif /* !YYDEBUG */
538 /* YYINITDEPTH -- initial size of the parser's stacks. */
540 # define YYINITDEPTH b4_initdepth
543 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
544 if the built-in stack extension method is used).
546 Do not make this value too large; the results are undefined if
547 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
548 evaluated with infinite-precision integer arithmetic. */
555 # define YYMAXDEPTH b4_maxdepth
563 # if defined (__GLIBC__) && defined (_STRING_H)
564 # define yystrlen strlen
566 /* Return the length of YYSTR. */
568 # if defined (__STDC__) || defined (__cplusplus)
569 yystrlen (const char *yystr)
575 register const char *yys = yystr;
577 while (*yys++ != '\0')
580 return yys - yystr - 1;
586 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
587 # define yystpcpy stpcpy
589 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
592 # if defined (__STDC__) || defined (__cplusplus)
593 yystpcpy (char *yydest, const char *yysrc)
595 yystpcpy (yydest, yysrc)
600 register char *yyd = yydest;
601 register const char *yys = yysrc;
603 while ((*yyd++ = *yys++) != '\0')
611 #endif /* !YYERROR_VERBOSE */
615 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
616 into yyparse. The argument should have type void *.
617 It should actually point to an object.
618 Grammar actions can access the variable by casting it
619 to the proper pointer type. */
622 # if defined (__STDC__) || defined (__cplusplus)
623 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
624 # define YYPARSE_PARAM_DECL
626 # define YYPARSE_PARAM_ARG YYPARSE_PARAM
627 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
629 #else /* !YYPARSE_PARAM */
630 # define YYPARSE_PARAM_ARG
631 # define YYPARSE_PARAM_DECL
632 #endif /* !YYPARSE_PARAM */
634 /* Prevent warning if -Wstrict-prototypes. */
636 # ifdef YYPARSE_PARAM
637 int yyparse (void *);
643 /* YY_DECL_VARIABLES -- depending whether we use a pure parser,
644 variables are global, or local to YYPARSE. */
646 #define YY_DECL_NON_LSP_VARIABLES \
647 /* The lookahead symbol. */ \
650 /* The semantic value of the lookahead symbol. */ \
653 /* Number of parse errors so far. */ \
657 # define YY_DECL_VARIABLES \
658 YY_DECL_NON_LSP_VARIABLES \
660 /* Location data for the lookahead symbol. */ \
663 # define YY_DECL_VARIABLES \
664 YY_DECL_NON_LSP_VARIABLES
667 /* If nonreentrant, generate the variables here. */
674 yyparse (YYPARSE_PARAM_ARG)
677 /* If reentrant, generate the variables here. */
682 register int yystate;
685 /* Number of tokens to shift before error messages enabled. */
687 /* Lookahead token as an internal (translated) token number. */
690 /* Three stacks and their tools:
691 `yyss': related to states,
692 `yyvs': related to semantic values,
693 `yyls': related to locations.
695 Refer to the stacks thru separate pointers, to allow yyoverflow
696 to reallocate them elsewhere. */
698 /* The state stack. */
699 short yyssa[YYINITDEPTH];
701 register short *yyssp;
703 /* The semantic value stack. */
704 YYSTYPE yyvsa[YYINITDEPTH];
705 YYSTYPE *yyvs = yyvsa;
706 register YYSTYPE *yyvsp;
709 /* The location stack. */
710 YYLTYPE yylsa[YYINITDEPTH];
711 YYLTYPE *yyls = yylsa;
716 # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
718 # define YYPOPSTACK (yyvsp--, yyssp--)
721 YYSIZE_T yystacksize = YYINITDEPTH;
723 /* The variables used to return semantic value and location from the
730 /* When reducing, the number of symbols on the RHS of the reduced
734 YYDPRINTF ((stderr, "Starting parse\n"));
739 yychar = YYEMPTY; /* Cause a token to be read. */
741 /* Initialize stack pointers.
742 Waste one element of value and location stack
743 so that they stay on the same level as the state stack.
744 The wasted elements are never initialized. */
753 /*------------------------------------------------------------.
754 | yynewstate -- Push a new state, which is found in yystate. |
755 `------------------------------------------------------------*/
757 /* In all cases, when you get here, the value and location stacks
758 have just been pushed. so pushing a state here evens the stacks.
765 if (yyssp >= yyss + yystacksize - 1)
767 /* Get the current used size of the three stacks, in elements. */
768 YYSIZE_T yysize = yyssp - yyss + 1;
772 /* Give user a chance to reallocate the stack. Use copies of
773 these so that the &'s don't force the real ones into
775 YYSTYPE *yyvs1 = yyvs;
778 /* Each stack pointer address is followed by the size of the
779 data in use in that stack, in bytes. */
781 YYLTYPE *yyls1 = yyls;
782 /* This used to be a conditional around just the two extra args,
783 but that might be undefined if yyoverflow is a macro. */
784 yyoverflow ("parser stack overflow",
785 &yyss1, yysize * sizeof (*yyssp),
786 &yyvs1, yysize * sizeof (*yyvsp),
787 &yyls1, yysize * sizeof (*yylsp),
791 yyoverflow ("parser stack overflow",
792 &yyss1, yysize * sizeof (*yyssp),
793 &yyvs1, yysize * sizeof (*yyvsp),
799 #else /* no yyoverflow */
800 # ifndef YYSTACK_RELOCATE
803 /* Extend the stack our own way. */
804 if (yystacksize >= YYMAXDEPTH)
807 if (yystacksize > YYMAXDEPTH)
808 yystacksize = YYMAXDEPTH;
812 union yyalloc *yyptr =
813 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
816 YYSTACK_RELOCATE (yyss);
817 YYSTACK_RELOCATE (yyvs);
819 YYSTACK_RELOCATE (yyls);
821 # undef YYSTACK_RELOCATE
823 YYSTACK_FREE (yyss1);
826 #endif /* no yyoverflow */
828 yyssp = yyss + yysize - 1;
829 yyvsp = yyvs + yysize - 1;
831 yylsp = yyls + yysize - 1;
834 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
835 (unsigned long int) yystacksize));
837 if (yyssp >= yyss + yystacksize - 1)
841 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
850 /* Do appropriate processing given the current state. */
851 /* Read a lookahead token if we need one and don't already have one. */
854 /* First try to decide what to do without reference to lookahead token. */
856 yyn = yypact[yystate];
860 /* Not known => get a lookahead token if don't already have one. */
862 /* yychar is either YYEMPTY or YYEOF
863 or a valid token in external form. */
865 if (yychar == YYEMPTY)
867 YYDPRINTF ((stderr, "Reading a token: "));
871 /* Convert token to internal form (in yychar1) for indexing tables with. */
873 if (yychar <= 0) /* This means end of input. */
876 yychar = YYEOF; /* Don't call YYLEX any more. */
878 YYDPRINTF ((stderr, "Now at end of input.\n"));
882 yychar1 = YYTRANSLATE (yychar);
885 /* We have to keep this `#if YYDEBUG', since we use variables
886 which are defined only if `YYDEBUG' is set. */
889 YYFPRINTF (stderr, "Next token is %d (%s",
890 yychar, yytname[yychar1]);
891 /* Give the individual parser a way to print the precise
892 meaning of a token, for further debugging info. */
894 YYPRINT (stderr, yychar, yylval);
896 YYFPRINTF (stderr, ")\n");
902 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
907 /* yyn is what to do for this token type in this state.
908 Negative => reduce, -yyn is rule number.
909 Positive => shift, yyn is new state.
910 New state is final state => don't bother to shift,
912 0, or most negative number => error. */
927 /* Shift the lookahead token. */
928 YYDPRINTF ((stderr, "Shifting token %d (%s), ",
929 yychar, yytname[yychar1]));
931 /* Discard the token being shifted unless it is eof. */
940 /* Count tokens shifted since error; after three, turn off error
949 /*-----------------------------------------------------------.
950 | yydefault -- do the default action for the current state. |
951 `-----------------------------------------------------------*/
953 yyn = yydefact[yystate];
959 /*-----------------------------.
960 | yyreduce -- Do a reduction. |
961 `-----------------------------*/
963 /* yyn is the number of a rule to reduce with. */
966 /* If YYLEN is nonzero, implement the default value of the action:
969 Otherwise, the following line sets YYVAL to the semantic value of
970 the lookahead token. This behavior is undocumented and Bison
971 users should not rely upon it. Assigning to YYVAL
972 unconditionally makes the parser a bit smaller, and it avoids a
973 GCC warning that YYVAL may be used uninitialized. */
974 yyval = yyvsp[1-yylen];
977 /* Default location. */
978 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
982 /* We have to keep this `#if YYDEBUG', since we use variables which
983 are defined only if `YYDEBUG' is set. */
988 YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
989 yyn - 1, yyrline[yyn]);
991 /* Print the symbols being reduced, and their result. */
992 for (yyi = yyprhs[yyn]; yyrhs[yyi] >= 0; yyi++)
993 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
994 YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
1002 /* Line __line__ of __file__. */
1003 #line __oline__ "__ofile__"
1014 short *yyssp1 = yyss - 1;
1015 YYFPRINTF (stderr, "state stack now");
1016 while (yyssp1 != yyssp)
1017 YYFPRINTF (stderr, " %d", *++yyssp1);
1018 YYFPRINTF (stderr, "\n");
1027 /* Now `shift' the result of the reduction. Determine what state
1028 that goes to, based on the state we popped back to and the rule
1029 number reduced by. */
1033 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1034 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1035 yystate = yytable[yystate];
1037 yystate = yydefgoto[yyn - YYNTOKENS];
1042 /*------------------------------------.
1043 | yyerrlab -- here on detecting error |
1044 `------------------------------------*/
1046 /* If not already recovering from an error, report this error. */
1052 yyn = yypact[yystate];
1054 if (yyn > YYFLAG && yyn < YYLAST)
1056 YYSIZE_T yysize = 0;
1061 /* Start YYX at -YYN if negative to avoid negative indexes in
1063 for (yyx = yyn < 0 ? -yyn : 0;
1064 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
1065 if (yycheck[yyx + yyn] == yyx)
1066 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
1067 yysize += yystrlen ("parse error, unexpected ") + 1;
1068 yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
1069 yymsg = (char *) YYSTACK_ALLOC (yysize);
1072 char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
1073 yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
1078 for (yyx = yyn < 0 ? -yyn : 0;
1079 yyx < (int) (sizeof (yytname) / sizeof (char *));
1081 if (yycheck[yyx + yyn] == yyx)
1083 const char *yyq = ! yycount ? ", expecting " : " or ";
1084 yyp = yystpcpy (yyp, yyq);
1085 yyp = yystpcpy (yyp, yytname[yyx]);
1090 YYSTACK_FREE (yymsg);
1093 yyerror ("parse error; also virtual memory exhausted");
1096 #endif /* YYERROR_VERBOSE */
1097 yyerror ("parse error");
1102 /*----------------------------------------------------.
1103 | yyerrlab1 -- error raised explicitly by an action. |
1104 `----------------------------------------------------*/
1106 if (yyerrstatus == 3)
1108 /* If just tried and failed to reuse lookahead token after an
1109 error, discard it. */
1111 /* Return failure if at end of input. */
1112 if (yychar == YYEOF)
1114 YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
1115 yychar, yytname[yychar1]));
1119 /* Else will try to reuse lookahead token after shifting the error
1122 yyerrstatus = 3; /* Each real token shifted decrements this. */
1127 /*-------------------------------------------------------------------.
1128 | yyerrdefault -- current state does not do anything special for the |
1130 `-------------------------------------------------------------------*/
1133 /* This is wrong; only states that explicitly want error tokens
1134 should shift them. */
1136 /* If its default is to accept any token, ok. Otherwise pop it. */
1137 yyn = yydefact[yystate];
1143 /*---------------------------------------------------------------.
1144 | yyerrpop -- pop the current state because it cannot handle the |
1146 `---------------------------------------------------------------*/
1159 short *yyssp1 = yyss - 1;
1160 YYFPRINTF (stderr, "Error: state stack now");
1161 while (yyssp1 != yyssp)
1162 YYFPRINTF (stderr, " %d", *++yyssp1);
1163 YYFPRINTF (stderr, "\n");
1171 yyn = yypact[yystate];
1176 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
1193 YYDPRINTF ((stderr, "Shifting error token, "));
1204 /*-------------------------------------.
1205 | yyacceptlab -- YYACCEPT comes here. |
1206 `-------------------------------------*/
1211 /*-----------------------------------.
1212 | yyabortlab -- YYABORT comes here. |
1213 `-----------------------------------*/
1218 /*---------------------------------------------.
1219 | yyoverflowab -- parser overflow comes here. |
1220 `---------------------------------------------*/
1222 yyerror ("parser stack overflow");
1229 YYSTACK_FREE (yyss);
1235 m4_if(b4_defines_flag, 0, [],
1236 [#output "b4_output_header_name"
1237 #ifndef b4_header_guard
1238 # define b4_header_guard
1240 b4_token_defines(b4_tokens)
1243 m4_ifdef([b4_stype_line],
1244 [#line b4_stype_line "b4_filename"
1248 # define YYSTYPE yystype
1252 [extern YYSTYPE b4_prefix[]lval;])
1254 m4_if(b4_locations_flag, [0], [],
1256 typedef struct yyltype
1263 # define YYLTYPE yyltype
1267 [extern YYLTYPE b4_prefix[]lloc;])
1269 #endif /* not b4_header_guard */