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 m4_define_default([b4_input_suffix], [.y])
25 m4_define_default([b4_output_parser_suffix],
26 [m4_translit(b4_input_suffix, [yY], [cC])])
28 m4_define_default([b4_output_parser_name],
29 [b4_output_prefix[]b4_output_infix[]b4_output_parser_suffix[]])
32 m4_define_default([b4_output_header_suffix],
33 [m4_translit(b4_input_suffix, [yY], [hH])])
35 m4_define_default([b4_output_header_name],
36 [b4_output_prefix[]b4_output_infix[]b4_output_header_suffix[]])
38 m4_define_default([b4_header_guard],
39 [m4_bpatsubst(m4_toupper([BISON_]b4_output_header_name),
40 [[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]], [_])])
43 # b4_token_defines(TOKEN-NAME, TOKEN-NUMBER)
44 # ------------------------------------------
45 # Output the definition of this token as #define.
46 m4_define([b4_token_define],
51 # b4_token_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
52 # -------------------------------------------------------
53 # Output the definition of the tokens as #define.
54 m4_define([b4_token_defines],
55 [m4_map([b4_token_define], [$@])])
59 #output "b4_output_parser_name"
60 /* A Bison parser, made from b4_filename
61 by GNU bison b4_version. */
63 /* Skeleton output parser for Bison,
64 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
67 This program is free software; you can redistribute it and/or modify
68 it under the terms of the GNU General Public License as published by
69 the Free Software Foundation; either version 2, or (at your option)
72 This program is distributed in the hope that it will be useful,
73 but WITHOUT ANY WARRANTY; without even the implied warranty of
74 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75 GNU General Public License for more details.
77 You should have received a copy of the GNU General Public License
78 along with this program; if not, write to the Free Software
79 Foundation, Inc., 59 Temple Place - Suite 330,
80 Boston, MA 02111-1307, USA. */
82 /* As a special exception, when this file is copied by Bison into a
83 Bison output file, you may use that output file without restriction.
84 This special exception was added by the Free Software Foundation
85 in version 1.24 of Bison. */
87 /* This is the parser code that is written into each bison parser when
88 the %semantic_parser declaration is not specified in the grammar.
89 It was written by Richard Stallman by simplifying the hairy parser
90 used when %semantic_parser is specified. */
92 /* All symbols defined below should begin with yy or YY, to avoid
93 infringing on user name space. This should be done even for local
94 variables, as they might otherwise be expanded by user macros.
95 There are some unavoidable exceptions within include files to
96 define necessary library symbols; they are noted "INFRINGES ON
97 USER NAME SPACE" below. */
99 /* Identify Bison output. */
103 #define YYPURE b4_pure
105 /* Using locations. */
106 #define YYLSP_NEEDED b4_locations_flag
108 m4_if(b4_prefix[], [yy], [],
109 [/* If NAME_PREFIX is specified substitute the variables and functions
111 #define yyparse b4_prefix[]parse
112 #define yylex b4_prefix[]lex
113 #define yyerror b4_prefix[]error
114 #define yylval b4_prefix[]lval
115 #define yychar b4_prefix[]char
116 #define yydebug b4_prefix[]debug
117 #define yynerrs b4_prefix[]nerrs
119 # define yylloc b4_prefix[]lloc
123 /* Copy the user declarations. */
126 /* Enabling traces. */
128 # define YYDEBUG b4_debug
131 /* Enabling verbose error messages. */
132 #ifdef YYERROR_VERBOSE
133 # undef YYERROR_VERBOSE
134 # define YYERROR_VERBOSE 1
136 # define YYERROR_VERBOSE b4_error_verbose
140 m4_ifdef([b4_stype_line],
141 [#line b4_stype_line "b4_filename"
143 typedef b4_stype yystype;
144 # define YYSTYPE yystype
148 typedef struct yyltype
155 # define YYLTYPE b4_ltype
158 /* Line __line__ of __file__. */
159 #line __oline__ "__ofile__"
161 #if ! defined (yyoverflow) || YYERROR_VERBOSE
163 /* The parser invokes alloca or malloc; define the necessary symbols. */
165 # if YYSTACK_USE_ALLOCA
166 # define YYSTACK_ALLOC alloca
168 # ifndef YYSTACK_USE_ALLOCA
169 # if defined (alloca) || defined (_ALLOCA_H)
170 # define YYSTACK_ALLOC alloca
173 # define YYSTACK_ALLOC __builtin_alloca
179 # ifdef YYSTACK_ALLOC
180 /* Pacify GCC's `empty if-body' warning. */
181 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
183 # if defined (__STDC__) || defined (__cplusplus)
184 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
185 # define YYSIZE_T size_t
187 # define YYSTACK_ALLOC malloc
188 # define YYSTACK_FREE free
190 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
193 #if (! defined (yyoverflow) \
194 && (! defined (__cplusplus) \
195 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
197 /* A type that is properly aligned for any stack member. */
207 /* The size of the maximum gap between one aligned stack and the next. */
208 # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
210 /* The size of an array large to enough to hold all stacks, each with
213 # define YYSTACK_BYTES(N) \
214 ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
215 + 2 * YYSTACK_GAP_MAX)
217 # define YYSTACK_BYTES(N) \
218 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
222 /* Copy COUNT objects from FROM to TO. The source and destination do
226 # define YYCOPY(To, From, Count) \
227 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
229 # define YYCOPY(To, From, Count) \
232 register YYSIZE_T yyi; \
233 for (yyi = 0; yyi < (Count); yyi++) \
234 (To)[yyi] = (From)[yyi]; \
240 /* Relocate STACK from its old location to the new one. The
241 local variables YYSIZE and YYSTACKSIZE give the old and new number of
242 elements in the stack, and YYPTR gives the new location of the
243 stack. Advance YYPTR to a properly aligned location for the next
245 # define YYSTACK_RELOCATE(Stack) \
248 YYSIZE_T yynewbytes; \
249 YYCOPY (&yyptr->Stack, Stack, yysize); \
250 Stack = &yyptr->Stack; \
251 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
252 yyptr += yynewbytes / sizeof (*yyptr); \
259 b4_token_defines(b4_tokens)
261 /* YYFINAL -- State number of the termination state. */
262 #define YYFINAL b4_final
263 #define YYFLAG b4_flag
264 #define YYLAST b4_last
266 /* YYNTOKENS -- Number of terminals. */
267 #define YYNTOKENS b4_ntokens
268 /* YYNNTS -- Number of nonterminals. */
269 #define YYNNTS b4_nnts
270 /* YYNRULES -- Number of rules. */
271 #define YYNRULES b4_nrules
272 /* YYNRULES -- Number of states. */
273 #define YYNSTATES b4_nstates
275 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
276 #define YYUNDEFTOK b4_undef_token_number
277 #define YYMAXUTOK b4_user_token_number_max
279 typedef b4_uint_type(b4_token_number_max) yy_token_number_type;
280 #define YYTRANSLATE(X) \
281 ((unsigned)(X) <= YYMAXUTOK ? yytranslate[[X]] : YYUNDEFTOK)
283 /* YYTRANSLATE[[YYLEX]] -- Bison symbol number corresponding to YYLEX. */
284 static const yy_token_number_type yytranslate[[]] =
290 /* YYPRHS[[YYN]] -- Index of the first RHS symbol of rule number YYN in
292 static const short yyprhs[[]] =
297 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
298 typedef b4_sint_type(b4_rhs_number_max) yyrhs_t;
299 static const yyrhs_t yyrhs[[]] =
304 /* YYRLINE[[YYN]] -- source line where rule number YYN was defined. */
305 static const short yyrline[[]] =
311 #if (YYDEBUG) || YYERROR_VERBOSE
312 /* YYTNME[[SYMBOL-NUM]] -- String name of the symbol SYMBOL-NUM.
313 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
314 static const char *const yytname[[]] =
320 /* YYTOKNUM[[YYN]] -- Index in YYTNAME corresponding to YYLEX. */
321 static const short yytoknum[[]] =
326 /* YYR1[[YYN]] -- Symbol number of symbol that rule YYN derives. */
327 static const yy_token_number_type yyr1[[]] =
332 /* YYR2[[YYN]] -- Number of symbols composing right hand side of rule YYN. */
333 static const short yyr2[[]] =
338 /* YYDEFACT[[S]] -- default rule to reduce with in state S when YYTABLE
339 doesn't specify something else to do. Zero means the default is an
341 static const short yydefact[[]] =
346 /* YYPGOTO[[NTERM-NUM]]. */
347 static const short yydefgoto[[]] =
352 /* YYPACT[[STATE-NUM]] -- Index in YYTABLE of the portion describing
354 static const short yypact[[]] =
359 /* YYPGOTO[[NTERM-NUM]]. */
360 static const short yypgoto[[]] =
365 /* YYTABLE[[YYPACT[STATE-NUM]]]. What to do in state STATE-NUM. If
366 positive, shift that token. If negative, reduce the rule which
367 number is the opposite. If zero, do what YYDEFACT says. */
368 static const short yytable[[]] =
373 static const short yycheck[[]] =
379 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
380 # define YYSIZE_T __SIZE_TYPE__
382 #if ! defined (YYSIZE_T) && defined (size_t)
383 # define YYSIZE_T size_t
385 #if ! defined (YYSIZE_T)
386 # if defined (__STDC__) || defined (__cplusplus)
387 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
388 # define YYSIZE_T size_t
391 #if ! defined (YYSIZE_T)
392 # define YYSIZE_T unsigned int
395 #define yyerrok (yyerrstatus = 0)
396 #define yyclearin (yychar = YYEMPTY)
400 #define YYACCEPT goto yyacceptlab
401 #define YYABORT goto yyabortlab
402 #define YYERROR goto yyerrlab1
404 /* Like YYERROR except do call yyerror. This remains here temporarily
405 to ease the transition to the new meaning of YYERROR, for GCC.
406 Once GCC version 2 has supplanted version 1, this can go. */
408 #define YYFAIL goto yyerrlab
410 #define YYRECOVERING() (!!yyerrstatus)
412 #define YYBACKUP(Token, Value) \
414 if (yychar == YYEMPTY && yylen == 1) \
418 yychar1 = YYTRANSLATE (yychar); \
424 yyerror ("syntax error: cannot back up"); \
430 #define YYERRCODE 256
432 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
435 When YYLLOC_DEFAULT is run, CURRENT is set the location of the
436 first token. By default, to implement support for ranges, extend
437 its range to the last symbol. */
439 #ifndef YYLLOC_DEFAULT
440 # define YYLLOC_DEFAULT(Current, Rhs, N) \
441 Current.last_line = Rhs[[N]].last_line; \
442 Current.last_column = Rhs[[N]].last_column;
445 /* YYLEX -- calling `yylex' with the right arguments. */
450 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
452 # define YYLEX yylex (&yylval, &yylloc)
454 # else /* !YYLSP_NEEDED */
456 # define YYLEX yylex (&yylval, YYLEX_PARAM)
458 # define YYLEX yylex (&yylval)
460 # endif /* !YYLSP_NEEDED */
462 # define YYLEX yylex ()
465 /* Enable debugging if requested. */
469 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
470 # define YYFPRINTF fprintf
473 # define YYDPRINTF(Args) \
478 /* Nonzero means print parse trace. It is left uninitialized so that
479 multiple parsers can coexist. */
482 # define YYDPRINTF(Args)
483 #endif /* !YYDEBUG */
485 /* YYINITDEPTH -- initial size of the parser's stacks. */
487 # define YYINITDEPTH b4_initdepth
490 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
491 if the built-in stack extension method is used).
493 Do not make this value too large; the results are undefined if
494 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
495 evaluated with infinite-precision integer arithmetic. */
502 # define YYMAXDEPTH b4_maxdepth
510 # if defined (__GLIBC__) && defined (_STRING_H)
511 # define yystrlen strlen
513 /* Return the length of YYSTR. */
515 # if defined (__STDC__) || defined (__cplusplus)
516 yystrlen (const char *yystr)
522 register const char *yys = yystr;
524 while (*yys++ != '\0')
527 return yys - yystr - 1;
533 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
534 # define yystpcpy stpcpy
536 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
539 # if defined (__STDC__) || defined (__cplusplus)
540 yystpcpy (char *yydest, const char *yysrc)
542 yystpcpy (yydest, yysrc)
547 register char *yyd = yydest;
548 register const char *yys = yysrc;
550 while ((*yyd++ = *yys++) != '\0')
558 #endif /* !YYERROR_VERBOSE */
562 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
563 into yyparse. The argument should have type void *.
564 It should actually point to an object.
565 Grammar actions can access the variable by casting it
566 to the proper pointer type. */
569 # if defined (__STDC__) || defined (__cplusplus)
570 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
571 # define YYPARSE_PARAM_DECL
573 # define YYPARSE_PARAM_ARG YYPARSE_PARAM
574 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
576 #else /* !YYPARSE_PARAM */
577 # define YYPARSE_PARAM_ARG
578 # define YYPARSE_PARAM_DECL
579 #endif /* !YYPARSE_PARAM */
581 /* Prevent warning if -Wstrict-prototypes. */
583 # ifdef YYPARSE_PARAM
584 int yyparse (void *);
590 /* YY_DECL_VARIABLES -- depending whether we use a pure parser,
591 variables are global, or local to YYPARSE. */
593 #define YY_DECL_NON_LSP_VARIABLES \
594 /* The lookahead symbol. */ \
597 /* The semantic value of the lookahead symbol. */ \
600 /* Number of parse errors so far. */ \
604 # define YY_DECL_VARIABLES \
605 YY_DECL_NON_LSP_VARIABLES \
607 /* Location data for the lookahead symbol. */ \
610 # define YY_DECL_VARIABLES \
611 YY_DECL_NON_LSP_VARIABLES
614 /* If nonreentrant, generate the variables here. */
621 yyparse (YYPARSE_PARAM_ARG)
624 /* If reentrant, generate the variables here. */
629 register int yystate;
632 /* Number of tokens to shift before error messages enabled. */
634 /* Lookahead token as an internal (translated) token number. */
637 /* Three stacks and their tools:
638 `yyss': related to states,
639 `yyvs': related to semantic values,
640 `yyls': related to locations.
642 Refer to the stacks thru separate pointers, to allow yyoverflow
643 to reallocate them elsewhere. */
645 /* The state stack. */
646 short yyssa[YYINITDEPTH];
648 register short *yyssp;
650 /* The semantic value stack. */
651 YYSTYPE yyvsa[YYINITDEPTH];
652 YYSTYPE *yyvs = yyvsa;
653 register YYSTYPE *yyvsp;
656 /* The location stack. */
657 YYLTYPE yylsa[YYINITDEPTH];
658 YYLTYPE *yyls = yylsa;
663 # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
665 # define YYPOPSTACK (yyvsp--, yyssp--)
668 YYSIZE_T yystacksize = YYINITDEPTH;
670 /* The variables used to return semantic value and location from the
677 /* When reducing, the number of symbols on the RHS of the reduced
681 YYDPRINTF ((stderr, "Starting parse\n"));
686 yychar = YYEMPTY; /* Cause a token to be read. */
688 /* Initialize stack pointers.
689 Waste one element of value and location stack
690 so that they stay on the same level as the state stack.
691 The wasted elements are never initialized. */
700 /*------------------------------------------------------------.
701 | yynewstate -- Push a new state, which is found in yystate. |
702 `------------------------------------------------------------*/
704 /* In all cases, when you get here, the value and location stacks
705 have just been pushed. so pushing a state here evens the stacks.
712 if (yyssp >= yyss + yystacksize - 1)
714 /* Get the current used size of the three stacks, in elements. */
715 YYSIZE_T yysize = yyssp - yyss + 1;
719 /* Give user a chance to reallocate the stack. Use copies of
720 these so that the &'s don't force the real ones into
722 YYSTYPE *yyvs1 = yyvs;
725 /* Each stack pointer address is followed by the size of the
726 data in use in that stack, in bytes. */
728 YYLTYPE *yyls1 = yyls;
729 /* This used to be a conditional around just the two extra args,
730 but that might be undefined if yyoverflow is a macro. */
731 yyoverflow ("parser stack overflow",
732 &yyss1, yysize * sizeof (*yyssp),
733 &yyvs1, yysize * sizeof (*yyvsp),
734 &yyls1, yysize * sizeof (*yylsp),
738 yyoverflow ("parser stack overflow",
739 &yyss1, yysize * sizeof (*yyssp),
740 &yyvs1, yysize * sizeof (*yyvsp),
746 #else /* no yyoverflow */
747 # ifndef YYSTACK_RELOCATE
750 /* Extend the stack our own way. */
751 if (yystacksize >= YYMAXDEPTH)
754 if (yystacksize > YYMAXDEPTH)
755 yystacksize = YYMAXDEPTH;
759 union yyalloc *yyptr =
760 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
763 YYSTACK_RELOCATE (yyss);
764 YYSTACK_RELOCATE (yyvs);
766 YYSTACK_RELOCATE (yyls);
768 # undef YYSTACK_RELOCATE
770 YYSTACK_FREE (yyss1);
773 #endif /* no yyoverflow */
775 yyssp = yyss + yysize - 1;
776 yyvsp = yyvs + yysize - 1;
778 yylsp = yyls + yysize - 1;
781 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
782 (unsigned long int) yystacksize));
784 if (yyssp >= yyss + yystacksize - 1)
788 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
797 /* Do appropriate processing given the current state. */
798 /* Read a lookahead token if we need one and don't already have one. */
801 /* First try to decide what to do without reference to lookahead token. */
803 yyn = yypact[yystate];
807 /* Not known => get a lookahead token if don't already have one. */
809 /* yychar is either YYEMPTY or YYEOF
810 or a valid token in external form. */
812 if (yychar == YYEMPTY)
814 YYDPRINTF ((stderr, "Reading a token: "));
818 /* Convert token to internal form (in yychar1) for indexing tables with. */
820 if (yychar <= 0) /* This means end of input. */
823 yychar = YYEOF; /* Don't call YYLEX any more. */
825 YYDPRINTF ((stderr, "Now at end of input.\n"));
829 yychar1 = YYTRANSLATE (yychar);
832 /* We have to keep this `#if YYDEBUG', since we use variables
833 which are defined only if `YYDEBUG' is set. */
836 YYFPRINTF (stderr, "Next token is %d (%s",
837 yychar, yytname[yychar1]);
838 /* Give the individual parser a way to print the precise
839 meaning of a token, for further debugging info. */
841 YYPRINT (stderr, yychar, yylval);
843 YYFPRINTF (stderr, ")\n");
849 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
854 /* yyn is what to do for this token type in this state.
855 Negative => reduce, -yyn is rule number.
856 Positive => shift, yyn is new state.
857 New state is final state => don't bother to shift,
859 0, or most negative number => error. */
874 /* Shift the lookahead token. */
875 YYDPRINTF ((stderr, "Shifting token %d (%s), ",
876 yychar, yytname[yychar1]));
878 /* Discard the token being shifted unless it is eof. */
887 /* Count tokens shifted since error; after three, turn off error
896 /*-----------------------------------------------------------.
897 | yydefault -- do the default action for the current state. |
898 `-----------------------------------------------------------*/
900 yyn = yydefact[yystate];
906 /*-----------------------------.
907 | yyreduce -- Do a reduction. |
908 `-----------------------------*/
910 /* yyn is the number of a rule to reduce with. */
913 /* If YYLEN is nonzero, implement the default value of the action:
916 Otherwise, the following line sets YYVAL to the semantic value of
917 the lookahead token. This behavior is undocumented and Bison
918 users should not rely upon it. Assigning to YYVAL
919 unconditionally makes the parser a bit smaller, and it avoids a
920 GCC warning that YYVAL may be used uninitialized. */
921 yyval = yyvsp[1-yylen];
924 /* Similarly for the default location. Let the user run additional
925 commands if for instance locations are ranges. */
926 yyloc = yylsp[1-yylen];
927 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
931 /* We have to keep this `#if YYDEBUG', since we use variables which
932 are defined only if `YYDEBUG' is set. */
937 YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
938 yyn - 1, yyrline[yyn]);
940 /* Print the symbols being reduced, and their result. */
941 for (yyi = yyprhs[yyn]; yyrhs[yyi] >= 0; yyi++)
942 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
943 YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
951 /* Line __line__ of __file__. */
952 #line __oline__ "__ofile__"
963 short *yyssp1 = yyss - 1;
964 YYFPRINTF (stderr, "state stack now");
965 while (yyssp1 != yyssp)
966 YYFPRINTF (stderr, " %d", *++yyssp1);
967 YYFPRINTF (stderr, "\n");
976 /* Now `shift' the result of the reduction. Determine what state
977 that goes to, based on the state we popped back to and the rule
978 number reduced by. */
982 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
983 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
984 yystate = yytable[yystate];
986 yystate = yydefgoto[yyn - YYNTOKENS];
991 /*------------------------------------.
992 | yyerrlab -- here on detecting error |
993 `------------------------------------*/
995 /* If not already recovering from an error, report this error. */
1001 yyn = yypact[yystate];
1003 if (yyn > YYFLAG && yyn < YYLAST)
1005 YYSIZE_T yysize = 0;
1010 /* Start YYX at -YYN if negative to avoid negative indexes in
1012 for (yyx = yyn < 0 ? -yyn : 0;
1013 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
1014 if (yycheck[yyx + yyn] == yyx)
1015 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
1016 yysize += yystrlen ("parse error, unexpected ") + 1;
1017 yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
1018 yymsg = (char *) YYSTACK_ALLOC (yysize);
1021 char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
1022 yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
1027 for (yyx = yyn < 0 ? -yyn : 0;
1028 yyx < (int) (sizeof (yytname) / sizeof (char *));
1030 if (yycheck[yyx + yyn] == yyx)
1032 const char *yyq = ! yycount ? ", expecting " : " or ";
1033 yyp = yystpcpy (yyp, yyq);
1034 yyp = yystpcpy (yyp, yytname[yyx]);
1039 YYSTACK_FREE (yymsg);
1042 yyerror ("parse error; also virtual memory exhausted");
1045 #endif /* YYERROR_VERBOSE */
1046 yyerror ("parse error");
1051 /*----------------------------------------------------.
1052 | yyerrlab1 -- error raised explicitly by an action. |
1053 `----------------------------------------------------*/
1055 if (yyerrstatus == 3)
1057 /* If just tried and failed to reuse lookahead token after an
1058 error, discard it. */
1060 /* Return failure if at end of input. */
1061 if (yychar == YYEOF)
1063 YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
1064 yychar, yytname[yychar1]));
1068 /* Else will try to reuse lookahead token after shifting the error
1071 yyerrstatus = 3; /* Each real token shifted decrements this. */
1076 /*-------------------------------------------------------------------.
1077 | yyerrdefault -- current state does not do anything special for the |
1079 `-------------------------------------------------------------------*/
1082 /* This is wrong; only states that explicitly want error tokens
1083 should shift them. */
1085 /* If its default is to accept any token, ok. Otherwise pop it. */
1086 yyn = yydefact[yystate];
1092 /*---------------------------------------------------------------.
1093 | yyerrpop -- pop the current state because it cannot handle the |
1095 `---------------------------------------------------------------*/
1108 short *yyssp1 = yyss - 1;
1109 YYFPRINTF (stderr, "Error: state stack now");
1110 while (yyssp1 != yyssp)
1111 YYFPRINTF (stderr, " %d", *++yyssp1);
1112 YYFPRINTF (stderr, "\n");
1120 yyn = yypact[yystate];
1125 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
1142 YYDPRINTF ((stderr, "Shifting error token, "));
1153 /*-------------------------------------.
1154 | yyacceptlab -- YYACCEPT comes here. |
1155 `-------------------------------------*/
1160 /*-----------------------------------.
1161 | yyabortlab -- YYABORT comes here. |
1162 `-----------------------------------*/
1167 /*---------------------------------------------.
1168 | yyoverflowab -- parser overflow comes here. |
1169 `---------------------------------------------*/
1171 yyerror ("parser stack overflow");
1178 YYSTACK_FREE (yyss);
1184 m4_if(b4_defines_flag, 0, [],
1185 [#output "b4_output_header_name"
1186 #ifndef b4_header_guard
1187 # define b4_header_guard
1189 b4_token_defines(b4_tokens)
1192 m4_ifdef([b4_stype_line],
1193 [#line b4_stype_line "b4_filename"
1197 # define YYSTYPE yystype
1201 [extern YYSTYPE b4_prefix[]lval;])
1203 m4_if(b4_locations_flag, [0], [],
1205 typedef struct yyltype
1212 # define YYLTYPE yyltype
1216 [extern YYLTYPE b4_prefix[]lloc;])
1218 #endif /* not b4_header_guard */