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],
14 # Return the smallest unsigned int type able to handle the number MAX.
15 m4_define([b4_uint_type],
16 [m4_if(m4_eval([$1 <= 255]), [1], [unsigned char],
17 m4_eval([$1 <= 65535]), [1], [unsigned short],
21 # b4_lhs_value([TYPE])
22 # --------------------
23 # Expansion of $<TYPE>$.
24 m4_define([b4_lhs_value],
25 [yyval[]m4_ifval([$1], [.$1])])
28 # b4_rhs_value(RULE-LENGTH, NUM, [TYPE])
29 # --------------------------------------
30 # Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH
32 m4_define([b4_rhs_value],
33 [yyvsp@<:@m4_eval([$2 - $1])@:>@m4_ifval([$3], [.$3])])
39 m4_define([b4_lhs_location],
43 # b4_rhs_location(RULE-LENGTH, NUM)
44 # ---------------------------------
45 # Expansion of @NUM, where the current rule has RULE-LENGTH symbols
47 m4_define([b4_rhs_location],
48 [yylsp@<:@m4_eval([$2 - $1])@:>@])
51 m4_define_default([b4_input_suffix], [.y])
53 m4_define_default([b4_output_parser_suffix],
54 [m4_translit(b4_input_suffix, [yY], [cC])])
56 m4_define_default([b4_output_parser_name],
57 [b4_output_prefix[]b4_output_infix[]b4_output_parser_suffix[]])
60 m4_define_default([b4_output_header_suffix],
61 [m4_translit(b4_input_suffix, [yY], [hH])])
63 m4_define_default([b4_output_header_name],
64 [b4_output_prefix[]b4_output_infix[]b4_output_header_suffix[]])
66 m4_define_default([b4_header_guard],
67 [m4_bpatsubst(m4_toupper([BISON_]b4_output_header_name),
68 [[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]], [_])])
71 # b4_token_define(TOKEN-NAME, TOKEN-NUMBER)
72 # -----------------------------------------
73 # Output the definition of this token as #define.
74 m4_define([b4_token_define],
79 # b4_token_enum(TOKEN-NAME, TOKEN-NUMBER)
80 # ---------------------------------------
81 # Output the definition of this token as an enum.
82 m4_define([b4_token_enum],
86 # b4_token_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
87 # -------------------------------------------------------
88 # Output the definition of the tokens (if there are) as enums and #define.
89 m4_define([b4_token_defines],
90 [m4_if([$@], [[]], [],
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], [,
102 /* POSIX requires `int' for tokens in interfaces. */
103 # define YYTOKENTYPE int
104 #endif /* !YYTOKENTYPE */
105 m4_map([b4_token_define], [$@])
111 #output "b4_output_parser_name"
112 /* A Bison parser, made from b4_filename
113 by GNU bison b4_version. */
115 /* Skeleton output parser for Bison,
116 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
119 This program is free software; you can redistribute it and/or modify
120 it under the terms of the GNU General Public License as published by
121 the Free Software Foundation; either version 2, or (at your option)
124 This program is distributed in the hope that it will be useful,
125 but WITHOUT ANY WARRANTY; without even the implied warranty of
126 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
127 GNU General Public License for more details.
129 You should have received a copy of the GNU General Public License
130 along with this program; if not, write to the Free Software
131 Foundation, Inc., 59 Temple Place - Suite 330,
132 Boston, MA 02111-1307, USA. */
134 /* As a special exception, when this file is copied by Bison into a
135 Bison output file, you may use that output file without restriction.
136 This special exception was added by the Free Software Foundation
137 in version 1.24 of Bison. */
139 /* This is the parser code that is written into each bison parser when
140 the %semantic_parser declaration is not specified in the grammar.
141 It was written by Richard Stallman by simplifying the original so
142 called ``semantic'' parser. */
144 /* All symbols defined below should begin with yy or YY, to avoid
145 infringing on user name space. This should be done even for local
146 variables, as they might otherwise be expanded by user macros.
147 There are some unavoidable exceptions within include files to
148 define necessary library symbols; they are noted "INFRINGES ON
149 USER NAME SPACE" below. */
151 /* Identify Bison output. */
155 #define YYPURE b4_pure
157 /* Using locations. */
158 #define YYLSP_NEEDED b4_locations_flag
160 m4_if(b4_prefix[], [yy], [],
161 [/* If NAME_PREFIX is specified substitute the variables and functions
163 #define yyparse b4_prefix[]parse
164 #define yylex b4_prefix[]lex
165 #define yyerror b4_prefix[]error
166 #define yylval b4_prefix[]lval
167 #define yychar b4_prefix[]char
168 #define yydebug b4_prefix[]debug
169 #define yynerrs b4_prefix[]nerrs
171 # define yylloc b4_prefix[]lloc
175 /* Copy the first part of user declarations. */
178 b4_token_defines(b4_tokens)
180 /* Enabling traces. */
182 # define YYDEBUG b4_debug
185 /* Enabling verbose error messages. */
186 #ifdef YYERROR_VERBOSE
187 # undef YYERROR_VERBOSE
188 # define YYERROR_VERBOSE 1
190 # define YYERROR_VERBOSE b4_error_verbose
195 [#line b4_stype_line "b4_filename"
196 typedef union b4_stype yystype;
197 /* Line __line__ of __file__. */
198 #line __oline__ "__ofile__"],
199 [typedef int yystype;])
200 # define YYSTYPE yystype
201 # define YYSTYPE_IS_TRIVIAL 1
205 typedef struct yyltype
212 # define YYLTYPE b4_ltype
213 # define YYLTYPE_IS_TRIVIAL 1
216 /* Copy the second part of user declarations. */
219 /* Line __line__ of __file__. */
220 #line __oline__ "__ofile__"
222 #if ! defined (yyoverflow) || YYERROR_VERBOSE
224 /* The parser invokes alloca or malloc; define the necessary symbols. */
226 # if YYSTACK_USE_ALLOCA
227 # define YYSTACK_ALLOC alloca
229 # ifndef YYSTACK_USE_ALLOCA
230 # if defined (alloca) || defined (_ALLOCA_H)
231 # define YYSTACK_ALLOC alloca
234 # define YYSTACK_ALLOC __builtin_alloca
240 # ifdef YYSTACK_ALLOC
241 /* Pacify GCC's `empty if-body' warning. */
242 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
244 # if defined (__STDC__) || defined (__cplusplus)
245 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
246 # define YYSIZE_T size_t
248 # define YYSTACK_ALLOC malloc
249 # define YYSTACK_FREE free
251 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
254 #if (! defined (yyoverflow) \
255 && (! defined (__cplusplus) \
256 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
258 /* A type that is properly aligned for any stack member. */
268 /* The size of the maximum gap between one aligned stack and the next. */
269 # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
271 /* The size of an array large to enough to hold all stacks, each with
274 # define YYSTACK_BYTES(N) \
275 ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
276 + 2 * YYSTACK_GAP_MAX)
278 # define YYSTACK_BYTES(N) \
279 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
283 /* Copy COUNT objects from FROM to TO. The source and destination do
287 # define YYCOPY(To, From, Count) \
288 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
290 # define YYCOPY(To, From, Count) \
293 register YYSIZE_T yyi; \
294 for (yyi = 0; yyi < (Count); yyi++) \
295 (To)[[yyi]] = (From)[[yyi]]; \
301 /* Relocate STACK from its old location to the new one. The
302 local variables YYSIZE and YYSTACKSIZE give the old and new number of
303 elements in the stack, and YYPTR gives the new location of the
304 stack. Advance YYPTR to a properly aligned location for the next
306 # define YYSTACK_RELOCATE(Stack) \
309 YYSIZE_T yynewbytes; \
310 YYCOPY (&yyptr->Stack, Stack, yysize); \
311 Stack = &yyptr->Stack; \
312 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
313 yyptr += yynewbytes / sizeof (*yyptr); \
319 /* YYFINAL -- State number of the termination state. */
320 #define YYFINAL b4_final
321 #define YYFLAG b4_flag
322 #define YYLAST b4_last
324 /* YYNTOKENS -- Number of terminals. */
325 #define YYNTOKENS b4_ntokens
326 /* YYNNTS -- Number of nonterminals. */
327 #define YYNNTS b4_nnts
328 /* YYNRULES -- Number of rules. */
329 #define YYNRULES b4_nrules
330 /* YYNRULES -- Number of states. */
331 #define YYNSTATES b4_nstates
333 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
334 #define YYUNDEFTOK b4_undef_token_number
335 #define YYMAXUTOK b4_user_token_number_max
337 #define YYTRANSLATE(X) \
338 ((unsigned)(X) <= YYMAXUTOK ? yytranslate[[X]] : YYUNDEFTOK)
340 /* YYTRANSLATE[[YYLEX]] -- Bison symbol number corresponding to YYLEX. */
341 static const b4_uint_type(b4_translate_max) yytranslate[[]] =
347 /* YYPRHS[[YYN]] -- Index of the first RHS symbol of rule number YYN in
349 static const b4_uint_type(b4_prhs_max) yyprhs[[]] =
354 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
355 static const b4_sint_type(b4_rhs_max) yyrhs[[]] =
360 /* YYRLINE[[YYN]] -- source line where rule number YYN was defined. */
361 static const b4_uint_type(b4_rline_max) yyrline[[]] =
367 #if YYDEBUG || YYERROR_VERBOSE
368 /* YYTNME[[SYMBOL-NUM]] -- String name of the symbol SYMBOL-NUM.
369 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
370 static const char *const yytname[[]] =
376 /* YYTOKNUM[[YYLEX-NUM]] -- Internal token number corresponding to
378 static const short yytoknum[[]] =
383 /* YYR1[[YYN]] -- Symbol number of symbol that rule YYN derives. */
384 static const b4_uint_type(b4_r1_max) yyr1[[]] =
389 /* YYR2[[YYN]] -- Number of symbols composing right hand side of rule YYN. */
390 static const b4_uint_type(b4_r2_max) yyr2[[]] =
395 /* YYDEFACT[[STATE-NAME]] -- Default rule to reduce with in state
396 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
397 means the default is an error. */
398 static const short yydefact[[]] =
403 /* YYPGOTO[[NTERM-NUM]]. */
404 static const short yydefgoto[[]] =
409 /* YYPACT[[STATE-NUM]] -- Index in YYTABLE of the portion describing
411 static const short yypact[[]] =
416 /* YYPGOTO[[NTERM-NUM]]. */
417 static const short yypgoto[[]] =
422 /* YYTABLE[[YYPACT[STATE-NUM]]]. What to do in state STATE-NUM. If
423 positive, shift that token. If negative, reduce the rule which
424 number is the opposite. If zero, do what YYDEFACT says. */
425 static const short yytable[[]] =
430 static const short yycheck[[]] =
436 /* YYSTOS[[STATE-NUM]] -- The (internal number of the) accessing
437 symbol of state STATE-NUM. */
438 static const b4_uint_type(b4_stos_max) yystos[[]] =
444 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
445 # define YYSIZE_T __SIZE_TYPE__
447 #if ! defined (YYSIZE_T) && defined (size_t)
448 # define YYSIZE_T size_t
450 #if ! defined (YYSIZE_T)
451 # if defined (__STDC__) || defined (__cplusplus)
452 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
453 # define YYSIZE_T size_t
456 #if ! defined (YYSIZE_T)
457 # define YYSIZE_T unsigned int
460 #define yyerrok (yyerrstatus = 0)
461 #define yyclearin (yychar = YYEMPTY)
465 #define YYACCEPT goto yyacceptlab
466 #define YYABORT goto yyabortlab
467 #define YYERROR goto yyerrlab1
469 /* Like YYERROR except do call yyerror. This remains here temporarily
470 to ease the transition to the new meaning of YYERROR, for GCC.
471 Once GCC version 2 has supplanted version 1, this can go. */
473 #define YYFAIL goto yyerrlab
475 #define YYRECOVERING() (!!yyerrstatus)
477 #define YYBACKUP(Token, Value) \
479 if (yychar == YYEMPTY && yylen == 1) \
483 yychar1 = YYTRANSLATE (yychar); \
489 yyerror ("syntax error: cannot back up"); \
495 #define YYERRCODE 256
497 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
500 #ifndef YYLLOC_DEFAULT
501 # define YYLLOC_DEFAULT(Current, Rhs, N) \
502 Current.first_line = Rhs[[1]].first_line; \
503 Current.first_column = Rhs[[1]].first_column; \
504 Current.last_line = Rhs[[N]].last_line; \
505 Current.last_column = Rhs[[N]].last_column;
508 /* YYLEX -- calling `yylex' with the right arguments. */
513 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
515 # define YYLEX yylex (&yylval, &yylloc)
517 # else /* !YYLSP_NEEDED */
519 # define YYLEX yylex (&yylval, YYLEX_PARAM)
521 # define YYLEX yylex (&yylval)
523 # endif /* !YYLSP_NEEDED */
525 # define YYLEX yylex ()
528 /* Enable debugging if requested. */
532 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
533 # define YYFPRINTF fprintf
536 # define YYDPRINTF(Args) \
541 /* Nonzero means print parse trace. It is left uninitialized so that
542 multiple parsers can coexist. */
545 # define YYDPRINTF(Args)
546 #endif /* !YYDEBUG */
548 /* YYINITDEPTH -- initial size of the parser's stacks. */
550 # define YYINITDEPTH b4_initdepth
553 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
554 if the built-in stack extension method is used).
556 Do not make this value too large; the results are undefined if
557 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
558 evaluated with infinite-precision integer arithmetic. */
565 # define YYMAXDEPTH b4_maxdepth
573 # if defined (__GLIBC__) && defined (_STRING_H)
574 # define yystrlen strlen
576 /* Return the length of YYSTR. */
578 # if defined (__STDC__) || defined (__cplusplus)
579 yystrlen (const char *yystr)
585 register const char *yys = yystr;
587 while (*yys++ != '\0')
590 return yys - yystr - 1;
596 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
597 # define yystpcpy stpcpy
599 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
602 # if defined (__STDC__) || defined (__cplusplus)
603 yystpcpy (char *yydest, const char *yysrc)
605 yystpcpy (yydest, yysrc)
610 register char *yyd = yydest;
611 register const char *yys = yysrc;
613 while ((*yyd++ = *yys++) != '\0')
621 #endif /* !YYERROR_VERBOSE */
625 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
626 into yyparse. The argument should have type void *.
627 It should actually point to an object.
628 Grammar actions can access the variable by casting it
629 to the proper pointer type. */
632 # if defined (__STDC__) || defined (__cplusplus)
633 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
634 # define YYPARSE_PARAM_DECL
636 # define YYPARSE_PARAM_ARG YYPARSE_PARAM
637 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
639 #else /* !YYPARSE_PARAM */
640 # define YYPARSE_PARAM_ARG
641 # define YYPARSE_PARAM_DECL
642 #endif /* !YYPARSE_PARAM */
644 /* Prevent warning if -Wstrict-prototypes. */
646 # ifdef YYPARSE_PARAM
647 int yyparse (void *);
653 /* YY_DECL_VARIABLES -- depending whether we use a pure parser,
654 variables are global, or local to YYPARSE. */
656 #define YY_DECL_NON_LSP_VARIABLES \
657 /* The lookahead symbol. */ \
660 /* The semantic value of the lookahead symbol. */ \
663 /* Number of parse errors so far. */ \
667 # define YY_DECL_VARIABLES \
668 YY_DECL_NON_LSP_VARIABLES \
670 /* Location data for the lookahead symbol. */ \
673 # define YY_DECL_VARIABLES \
674 YY_DECL_NON_LSP_VARIABLES
677 /* If nonreentrant, generate the variables here. */
684 yyparse (YYPARSE_PARAM_ARG)
687 /* If reentrant, generate the variables here. */
692 register int yystate;
695 /* Number of tokens to shift before error messages enabled. */
697 /* Lookahead token as an internal (translated) token number. */
700 /* Three stacks and their tools:
701 `yyss': related to states,
702 `yyvs': related to semantic values,
703 `yyls': related to locations.
705 Refer to the stacks thru separate pointers, to allow yyoverflow
706 to reallocate them elsewhere. */
708 /* The state stack. */
709 short yyssa[YYINITDEPTH];
711 register short *yyssp;
713 /* The semantic value stack. */
714 YYSTYPE yyvsa[YYINITDEPTH];
715 YYSTYPE *yyvs = yyvsa;
716 register YYSTYPE *yyvsp;
719 /* The location stack. */
720 YYLTYPE yylsa[YYINITDEPTH];
721 YYLTYPE *yyls = yylsa;
726 # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
728 # define YYPOPSTACK (yyvsp--, yyssp--)
731 YYSIZE_T yystacksize = YYINITDEPTH;
733 /* The variables used to return semantic value and location from the
740 /* When reducing, the number of symbols on the RHS of the reduced
744 YYDPRINTF ((stderr, "Starting parse\n"));
749 yychar = YYEMPTY; /* Cause a token to be read. */
751 /* Initialize stack pointers.
752 Waste one element of value and location stack
753 so that they stay on the same level as the state stack.
754 The wasted elements are never initialized. */
763 /*------------------------------------------------------------.
764 | yynewstate -- Push a new state, which is found in yystate. |
765 `------------------------------------------------------------*/
767 /* In all cases, when you get here, the value and location stacks
768 have just been pushed. so pushing a state here evens the stacks.
775 if (yyssp >= yyss + yystacksize - 1)
777 /* Get the current used size of the three stacks, in elements. */
778 YYSIZE_T yysize = yyssp - yyss + 1;
782 /* Give user a chance to reallocate the stack. Use copies of
783 these so that the &'s don't force the real ones into
785 YYSTYPE *yyvs1 = yyvs;
788 /* Each stack pointer address is followed by the size of the
789 data in use in that stack, in bytes. */
791 YYLTYPE *yyls1 = yyls;
792 /* This used to be a conditional around just the two extra args,
793 but that might be undefined if yyoverflow is a macro. */
794 yyoverflow ("parser stack overflow",
795 &yyss1, yysize * sizeof (*yyssp),
796 &yyvs1, yysize * sizeof (*yyvsp),
797 &yyls1, yysize * sizeof (*yylsp),
801 yyoverflow ("parser stack overflow",
802 &yyss1, yysize * sizeof (*yyssp),
803 &yyvs1, yysize * sizeof (*yyvsp),
809 #else /* no yyoverflow */
810 # ifndef YYSTACK_RELOCATE
813 /* Extend the stack our own way. */
814 if (yystacksize >= YYMAXDEPTH)
817 if (yystacksize > YYMAXDEPTH)
818 yystacksize = YYMAXDEPTH;
822 union yyalloc *yyptr =
823 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
826 YYSTACK_RELOCATE (yyss);
827 YYSTACK_RELOCATE (yyvs);
829 YYSTACK_RELOCATE (yyls);
831 # undef YYSTACK_RELOCATE
833 YYSTACK_FREE (yyss1);
836 #endif /* no yyoverflow */
838 yyssp = yyss + yysize - 1;
839 yyvsp = yyvs + yysize - 1;
841 yylsp = yyls + yysize - 1;
844 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
845 (unsigned long int) yystacksize));
847 if (yyssp >= yyss + yystacksize - 1)
851 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
860 /* Do appropriate processing given the current state. */
861 /* Read a lookahead token if we need one and don't already have one. */
864 /* First try to decide what to do without reference to lookahead token. */
866 yyn = yypact[yystate];
870 /* Not known => get a lookahead token if don't already have one. */
872 /* yychar is either YYEMPTY or YYEOF
873 or a valid token in external form. */
875 if (yychar == YYEMPTY)
877 YYDPRINTF ((stderr, "Reading a token: "));
881 /* Convert token to internal form (in yychar1) for indexing tables with. */
883 if (yychar <= 0) /* This means end of input. */
886 yychar = YYEOF; /* Don't call YYLEX any more. */
888 YYDPRINTF ((stderr, "Now at end of input.\n"));
892 yychar1 = YYTRANSLATE (yychar);
895 /* We have to keep this `#if YYDEBUG', since we use variables
896 which are defined only if `YYDEBUG' is set. */
899 YYFPRINTF (stderr, "Next token is %d (%s",
900 yychar, yytname[yychar1]);
901 /* Give the individual parser a way to print the precise
902 meaning of a token, for further debugging info. */
904 YYPRINT (stderr, yychar, yylval);
906 YYFPRINTF (stderr, ")\n");
912 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
917 /* yyn is what to do for this token type in this state.
918 Negative => reduce, -yyn is rule number.
919 Positive => shift, yyn is new state.
920 New state is final state => don't bother to shift,
922 0, or most negative number => error. */
937 /* Shift the lookahead token. */
938 YYDPRINTF ((stderr, "Shifting token %d (%s), ",
939 yychar, yytname[yychar1]));
941 /* Discard the token being shifted unless it is eof. */
950 /* Count tokens shifted since error; after three, turn off error
959 /*-----------------------------------------------------------.
960 | yydefault -- do the default action for the current state. |
961 `-----------------------------------------------------------*/
963 yyn = yydefact[yystate];
969 /*-----------------------------.
970 | yyreduce -- Do a reduction. |
971 `-----------------------------*/
973 /* yyn is the number of a rule to reduce with. */
976 /* If YYLEN is nonzero, implement the default value of the action:
979 Otherwise, the following line sets YYVAL to the semantic value of
980 the lookahead token. This behavior is undocumented and Bison
981 users should not rely upon it. Assigning to YYVAL
982 unconditionally makes the parser a bit smaller, and it avoids a
983 GCC warning that YYVAL may be used uninitialized. */
984 yyval = yyvsp[1-yylen];
987 /* Default location. */
988 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
992 /* We have to keep this `#if YYDEBUG', since we use variables which
993 are defined only if `YYDEBUG' is set. */
998 YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
999 yyn - 1, yyrline[yyn]);
1001 /* Print the symbols being reduced, and their result. */
1002 for (yyi = yyprhs[yyn]; yyrhs[yyi] >= 0; yyi++)
1003 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
1004 YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
1012 /* Line __line__ of __file__. */
1013 #line __oline__ "__ofile__"
1024 short *yyssp1 = yyss - 1;
1025 YYFPRINTF (stderr, "state stack now");
1026 while (yyssp1 != yyssp)
1027 YYFPRINTF (stderr, " %d", *++yyssp1);
1028 YYFPRINTF (stderr, "\n");
1037 /* Now `shift' the result of the reduction. Determine what state
1038 that goes to, based on the state we popped back to and the rule
1039 number reduced by. */
1043 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1044 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1045 yystate = yytable[yystate];
1047 yystate = yydefgoto[yyn - YYNTOKENS];
1052 /*------------------------------------.
1053 | yyerrlab -- here on detecting error |
1054 `------------------------------------*/
1056 /* If not already recovering from an error, report this error. */
1062 yyn = yypact[yystate];
1064 if (yyn > YYFLAG && yyn < YYLAST)
1066 YYSIZE_T yysize = 0;
1071 /* Start YYX at -YYN if negative to avoid negative indexes in
1073 for (yyx = yyn < 0 ? -yyn : 0;
1074 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
1075 if (yycheck[yyx + yyn] == yyx)
1076 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
1077 yysize += yystrlen ("parse error, unexpected ") + 1;
1078 yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
1079 yymsg = (char *) YYSTACK_ALLOC (yysize);
1082 char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
1083 yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
1088 for (yyx = yyn < 0 ? -yyn : 0;
1089 yyx < (int) (sizeof (yytname) / sizeof (char *));
1091 if (yycheck[yyx + yyn] == yyx)
1093 const char *yyq = ! yycount ? ", expecting " : " or ";
1094 yyp = yystpcpy (yyp, yyq);
1095 yyp = yystpcpy (yyp, yytname[yyx]);
1100 YYSTACK_FREE (yymsg);
1103 yyerror ("parse error; also virtual memory exhausted");
1106 #endif /* YYERROR_VERBOSE */
1107 yyerror ("parse error");
1112 /*----------------------------------------------------.
1113 | yyerrlab1 -- error raised explicitly by an action. |
1114 `----------------------------------------------------*/
1116 if (yyerrstatus == 3)
1118 /* If just tried and failed to reuse lookahead token after an
1119 error, discard it. */
1121 /* Return failure if at end of input. */
1122 if (yychar == YYEOF)
1124 YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
1125 yychar, yytname[yychar1]));
1129 /* Else will try to reuse lookahead token after shifting the error
1132 yyerrstatus = 3; /* Each real token shifted decrements this. */
1136 yyn = yypact[yystate];
1140 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1148 /* Pop the current state because it cannot handle the error token. */
1155 if (yystos[yystate] < YYNTOKENS)
1157 YYFPRINTF (stderr, "Error: popping token %d (%s",
1158 yytoknum[yystos[yystate]], yytname[yystos[yystate]]);
1160 YYPRINT (stderr, yytoknum[yystos[yystate]], *yyvsp);
1162 YYFPRINTF (stderr, ")\n");
1166 YYFPRINTF (stderr, "Error: popping nonterminal (%s)\n",
1167 yytname[yystos[yystate]]);
1181 short *yyssp1 = yyss - 1;
1182 YYFPRINTF (stderr, "Error: state stack now");
1183 while (yyssp1 != yyssp)
1184 YYFPRINTF (stderr, " %d", *++yyssp1);
1185 YYFPRINTF (stderr, "\n");
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],
1244 [#line b4_stype_line "b4_filename"
1245 typedef union b4_stype yystype;
1246 /* Line __line__ of __file__. */
1247 #line __oline__ "__ofile__"],
1248 [typedef int yystype;])
1249 # define YYSTYPE yystype
1253 [extern YYSTYPE b4_prefix[]lval;])
1255 m4_if(b4_locations_flag, [0], [],
1257 typedef struct yyltype
1264 # define YYLTYPE yyltype
1268 [extern YYLTYPE b4_prefix[]lloc;])
1270 #endif /* not b4_header_guard */