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 /* Identify Bison output. */
96 #define YYPURE b4_pure
98 /* Using locations. */
99 #define YYLSP_NEEDED b4_locations_flag
101 m4_if(b4_prefix[], [yy], [],
102 [/* If NAME_PREFIX is specified substitute the variables and functions
104 #define yyparse b4_prefix[]parse
105 #define yylex b4_prefix[]lex
106 #define yyerror b4_prefix[]error
107 #define yylval b4_prefix[]lval
108 #define yychar b4_prefix[]char
109 #define yydebug b4_prefix[]debug
110 #define yynerrs b4_prefix[]nerrs
112 # define yylloc b4_prefix[]lloc
116 /* Copy the user declarations. */
119 /* Enabling traces. */
121 # define YYDEBUG b4_debug
124 /* Enabling verbose error messages. */
125 #ifdef YYERROR_VERBOSE
126 # undef YYERROR_VERBOSE
127 # define YYERROR_VERBOSE 1
129 # define YYERROR_VERBOSE b4_error_verbose
133 m4_ifdef([b4_stype_line],
134 [#line b4_stype_line "b4_filename"
136 typedef b4_stype yystype;
137 # define YYSTYPE yystype
141 typedef struct yyltype
148 # define YYLTYPE b4_ltype
151 /* Line __line__ of __file__. */
152 #line __oline__ "__ofile__"
154 /* All symbols defined below should begin with yy or YY, to avoid
155 infringing on user name space. This should be done even for local
156 variables, as they might otherwise be expanded by user macros.
157 There are some unavoidable exceptions within include files to
158 define necessary library symbols; they are noted "INFRINGES ON
159 USER NAME SPACE" below. */
161 #if ! defined (yyoverflow) || defined (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
191 /* A type that is properly aligned for any stack member. */
201 /* The size of the maximum gap between one aligned stack and the next. */
202 # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
204 /* The size of an array large to enough to hold all stacks, each with
207 # define YYSTACK_BYTES(N) \
208 ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
209 + 2 * YYSTACK_GAP_MAX)
211 # define YYSTACK_BYTES(N) \
212 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
216 /* Copy COUNT objects from FROM to TO. The source and destination do
220 # define YYCOPY(To, From, Count) \
221 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
223 # define YYCOPY(To, From, Count) \
226 register YYSIZE_T yyi; \
227 for (yyi = 0; yyi < (Count); yyi++) \
228 (To)[yyi] = (From)[yyi]; \
234 /* Relocate STACK from its old location to the new one. The
235 local variables YYSIZE and YYSTACKSIZE give the old and new number of
236 elements in the stack, and YYPTR gives the new location of the
237 stack. Advance YYPTR to a properly aligned location for the next
239 # define YYSTACK_RELOCATE(Stack) \
242 YYSIZE_T yynewbytes; \
243 YYCOPY (&yyptr->Stack, Stack, yysize); \
244 Stack = &yyptr->Stack; \
245 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
246 yyptr += yynewbytes / sizeof (*yyptr); \
250 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
253 b4_token_defines(b4_tokens)
255 /* YYFINAL -- State number of the termination state. */
256 #define YYFINAL b4_final
257 #define YYFLAG b4_flag
258 #define YYLAST b4_last
260 /* YYNTOKENS -- Number of terminals. */
261 #define YYNTOKENS b4_ntokens
262 /* YYNNTS -- Number of nonterminals. */
263 #define YYNNTS b4_nnts
264 /* YYNRULES -- Number of rules. */
265 #define YYNRULES b4_nrules
266 /* YYNRULES -- Number of states. */
267 #define YYNSTATES b4_nstates
268 #define YYMAXUTOK b4_maxtok
270 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
271 typedef b4_uint_type(b4_token_number_max) yy_token_number_type;
272 #define YYTRANSLATE(x) ((unsigned)(x) <= b4_maxtok ? yytranslate[[x]] : b4_nsym)
274 /* YYTRANSLATE[[YYLEX]] -- Bison symbol number corresponding to YYLEX. */
275 static const yy_token_number_type yytranslate[[]] =
281 /* YYPRHS[[YYN]] -- Index of the first RHS symbol of rule number YYN in
283 static const short yyprhs[[]] =
288 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
289 typedef b4_sint_type(b4_rhs_number_max) yyrhs_t;
290 static const yyrhs_t yyrhs[[]] =
295 /* YYRLINE[[YYN]] -- source line where rule number YYN was defined. */
296 static const short yyrline[[]] =
302 #if (YYDEBUG) || YYERROR_VERBOSE
303 /* YYTNME[[SYMBOL-NUM]] -- String name of the symbol SYMBOL-NUM.
304 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
305 static const char *const yytname[[]] =
311 /* YYTOKNUM[[YYN]] -- Index in YYTNAME corresponding to YYLEX. */
312 static const short yytoknum[[]] =
317 /* YYR1[[YYN]] -- Symbol number of symbol that rule YYN derives. */
318 static const short yyr1[[]] =
323 /* YYR2[[YYN]] -- Number of symbols composing right hand side of rule YYN. */
324 static const short yyr2[[]] =
329 /* YYDEFACT[[S]] -- default rule to reduce with in state S when YYTABLE
330 doesn't specify something else to do. Zero means the default is an
332 static const short yydefact[[]] =
337 /* YYPGOTO[[NTERM-NUM]]. */
338 static const short yydefgoto[[]] =
343 /* YYPACT[[STATE-NUM]] -- Index in YYTABLE of the portion describing
345 static const short yypact[[]] =
350 /* YYPGOTO[[NTERM-NUM]]. */
351 static const short yypgoto[[]] =
356 /* YYTABLE[[YYPACT[STATE-NUM]]]. What to do in state STATE-NUM. If
357 positive, shift that token. If negative, reduce the rule which
358 number is the opposite. If zero, do what YYDEFACT says. */
359 static const short yytable[[]] =
364 static const short yycheck[[]] =
370 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
371 # define YYSIZE_T __SIZE_TYPE__
373 #if ! defined (YYSIZE_T) && defined (size_t)
374 # define YYSIZE_T size_t
376 #if ! defined (YYSIZE_T)
377 # if defined (__STDC__) || defined (__cplusplus)
378 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
379 # define YYSIZE_T size_t
382 #if ! defined (YYSIZE_T)
383 # define YYSIZE_T unsigned int
386 #define yyerrok (yyerrstatus = 0)
387 #define yyclearin (yychar = YYEMPTY)
391 #define YYACCEPT goto yyacceptlab
392 #define YYABORT goto yyabortlab
393 #define YYERROR goto yyerrlab1
395 /* Like YYERROR except do call yyerror. This remains here temporarily
396 to ease the transition to the new meaning of YYERROR, for GCC.
397 Once GCC version 2 has supplanted version 1, this can go. */
399 #define YYFAIL goto yyerrlab
401 #define YYRECOVERING() (!!yyerrstatus)
403 #define YYBACKUP(Token, Value) \
405 if (yychar == YYEMPTY && yylen == 1) \
409 yychar1 = YYTRANSLATE (yychar); \
415 yyerror ("syntax error: cannot back up"); \
421 #define YYERRCODE 256
423 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
426 When YYLLOC_DEFAULT is run, CURRENT is set the location of the
427 first token. By default, to implement support for ranges, extend
428 its range to the last symbol. */
430 #ifndef YYLLOC_DEFAULT
431 # define YYLLOC_DEFAULT(Current, Rhs, N) \
432 Current.last_line = Rhs[[N]].last_line; \
433 Current.last_column = Rhs[[N]].last_column;
436 /* YYLEX -- calling `yylex' with the right arguments. */
441 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
443 # define YYLEX yylex (&yylval, &yylloc)
445 # else /* !YYLSP_NEEDED */
447 # define YYLEX yylex (&yylval, YYLEX_PARAM)
449 # define YYLEX yylex (&yylval)
451 # endif /* !YYLSP_NEEDED */
453 # define YYLEX yylex ()
456 /* Enable debugging if requested. */
460 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
461 # define YYFPRINTF fprintf
464 # define YYDPRINTF(Args) \
469 /* Nonzero means print parse trace. Since this is uninitialized, it
470 does not stop multiple parsers from coexisting. */
473 # define YYDPRINTF(Args)
474 #endif /* !YYDEBUG */
476 /* YYINITDEPTH -- initial size of the parser's stacks. */
478 # define YYINITDEPTH b4_initdepth
481 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
482 if the built-in stack extension method is used).
484 Do not make this value too large; the results are undefined if
485 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
486 evaluated with infinite-precision integer arithmetic. */
493 # define YYMAXDEPTH b4_maxdepth
501 # if defined (__GLIBC__) && defined (_STRING_H)
502 # define yystrlen strlen
504 /* Return the length of YYSTR. */
506 # if defined (__STDC__) || defined (__cplusplus)
507 yystrlen (const char *yystr)
513 register const char *yys = yystr;
515 while (*yys++ != '\0')
518 return yys - yystr - 1;
524 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
525 # define yystpcpy stpcpy
527 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
530 # if defined (__STDC__) || defined (__cplusplus)
531 yystpcpy (char *yydest, const char *yysrc)
533 yystpcpy (yydest, yysrc)
538 register char *yyd = yydest;
539 register const char *yys = yysrc;
541 while ((*yyd++ = *yys++) != '\0')
549 #endif /* !YYERROR_VERBOSE */
553 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
554 into yyparse. The argument should have type void *.
555 It should actually point to an object.
556 Grammar actions can access the variable by casting it
557 to the proper pointer type. */
560 # if defined (__STDC__) || defined (__cplusplus)
561 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
562 # define YYPARSE_PARAM_DECL
564 # define YYPARSE_PARAM_ARG YYPARSE_PARAM
565 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
567 #else /* !YYPARSE_PARAM */
568 # define YYPARSE_PARAM_ARG
569 # define YYPARSE_PARAM_DECL
570 #endif /* !YYPARSE_PARAM */
572 /* Prevent warning if -Wstrict-prototypes. */
574 # ifdef YYPARSE_PARAM
575 int yyparse (void *);
581 /* YY_DECL_VARIABLES -- depending whether we use a pure parser,
582 variables are global, or local to YYPARSE. */
584 #define YY_DECL_NON_LSP_VARIABLES \
585 /* The lookahead symbol. */ \
588 /* The semantic value of the lookahead symbol. */ \
591 /* Number of parse errors so far. */ \
595 # define YY_DECL_VARIABLES \
596 YY_DECL_NON_LSP_VARIABLES \
598 /* Location data for the lookahead symbol. */ \
601 # define YY_DECL_VARIABLES \
602 YY_DECL_NON_LSP_VARIABLES
605 /* If nonreentrant, generate the variables here. */
612 yyparse (YYPARSE_PARAM_ARG)
615 /* If reentrant, generate the variables here. */
620 register int yystate;
623 /* Number of tokens to shift before error messages enabled. */
625 /* Lookahead token as an internal (translated) token number. */
628 /* Three stacks and their tools:
629 `yyss': related to states,
630 `yyvs': related to semantic values,
631 `yyls': related to locations.
633 Refer to the stacks thru separate pointers, to allow yyoverflow
634 to reallocate them elsewhere. */
636 /* The state stack. */
637 short yyssa[YYINITDEPTH];
639 register short *yyssp;
641 /* The semantic value stack. */
642 YYSTYPE yyvsa[YYINITDEPTH];
643 YYSTYPE *yyvs = yyvsa;
644 register YYSTYPE *yyvsp;
647 /* The location stack. */
648 YYLTYPE yylsa[YYINITDEPTH];
649 YYLTYPE *yyls = yylsa;
654 # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
656 # define YYPOPSTACK (yyvsp--, yyssp--)
659 YYSIZE_T yystacksize = YYINITDEPTH;
661 /* The variables used to return semantic value and location from the
668 /* When reducing, the number of symbols on the RHS of the reduced
672 YYDPRINTF ((stderr, "Starting parse\n"));
677 yychar = YYEMPTY; /* Cause a token to be read. */
679 /* Initialize stack pointers.
680 Waste one element of value and location stack
681 so that they stay on the same level as the state stack.
682 The wasted elements are never initialized. */
691 /*------------------------------------------------------------.
692 | yynewstate -- Push a new state, which is found in yystate. |
693 `------------------------------------------------------------*/
695 /* In all cases, when you get here, the value and location stacks
696 have just been pushed. so pushing a state here evens the stacks.
703 if (yyssp >= yyss + yystacksize - 1)
705 /* Get the current used size of the three stacks, in elements. */
706 YYSIZE_T yysize = yyssp - yyss + 1;
710 /* Give user a chance to reallocate the stack. Use copies of
711 these so that the &'s don't force the real ones into
713 YYSTYPE *yyvs1 = yyvs;
716 /* Each stack pointer address is followed by the size of the
717 data in use in that stack, in bytes. */
719 YYLTYPE *yyls1 = yyls;
720 /* This used to be a conditional around just the two extra args,
721 but that might be undefined if yyoverflow is a macro. */
722 yyoverflow ("parser stack overflow",
723 &yyss1, yysize * sizeof (*yyssp),
724 &yyvs1, yysize * sizeof (*yyvsp),
725 &yyls1, yysize * sizeof (*yylsp),
729 yyoverflow ("parser stack overflow",
730 &yyss1, yysize * sizeof (*yyssp),
731 &yyvs1, yysize * sizeof (*yyvsp),
737 #else /* no yyoverflow */
738 /* Extend the stack our own way. */
739 if (yystacksize >= YYMAXDEPTH)
742 if (yystacksize > YYMAXDEPTH)
743 yystacksize = YYMAXDEPTH;
747 union yyalloc *yyptr =
748 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
751 YYSTACK_RELOCATE (yyss);
752 YYSTACK_RELOCATE (yyvs);
754 YYSTACK_RELOCATE (yyls);
756 # undef YYSTACK_RELOCATE
758 YYSTACK_FREE (yyss1);
760 #endif /* no yyoverflow */
762 yyssp = yyss + yysize - 1;
763 yyvsp = yyvs + yysize - 1;
765 yylsp = yyls + yysize - 1;
768 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
769 (unsigned long int) yystacksize));
771 if (yyssp >= yyss + yystacksize - 1)
775 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
784 /* Do appropriate processing given the current state. */
785 /* Read a lookahead token if we need one and don't already have one. */
788 /* First try to decide what to do without reference to lookahead token. */
790 yyn = yypact[yystate];
794 /* Not known => get a lookahead token if don't already have one. */
796 /* yychar is either YYEMPTY or YYEOF
797 or a valid token in external form. */
799 if (yychar == YYEMPTY)
801 YYDPRINTF ((stderr, "Reading a token: "));
805 /* Convert token to internal form (in yychar1) for indexing tables with. */
807 if (yychar <= 0) /* This means end of input. */
810 yychar = YYEOF; /* Don't call YYLEX any more. */
812 YYDPRINTF ((stderr, "Now at end of input.\n"));
816 yychar1 = YYTRANSLATE (yychar);
819 /* We have to keep this `#if YYDEBUG', since we use variables
820 which are defined only if `YYDEBUG' is set. */
823 YYFPRINTF (stderr, "Next token is %d (%s",
824 yychar, yytname[yychar1]);
825 /* Give the individual parser a way to print the precise
826 meaning of a token, for further debugging info. */
828 YYPRINT (stderr, yychar, yylval);
830 YYFPRINTF (stderr, ")\n");
836 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
841 /* yyn is what to do for this token type in this state.
842 Negative => reduce, -yyn is rule number.
843 Positive => shift, yyn is new state.
844 New state is final state => don't bother to shift,
846 0, or most negative number => error. */
861 /* Shift the lookahead token. */
862 YYDPRINTF ((stderr, "Shifting token %d (%s), ",
863 yychar, yytname[yychar1]));
865 /* Discard the token being shifted unless it is eof. */
874 /* Count tokens shifted since error; after three, turn off error
883 /*-----------------------------------------------------------.
884 | yydefault -- do the default action for the current state. |
885 `-----------------------------------------------------------*/
887 yyn = yydefact[yystate];
893 /*-----------------------------.
894 | yyreduce -- Do a reduction. |
895 `-----------------------------*/
897 /* yyn is the number of a rule to reduce with. */
900 /* If YYLEN is nonzero, implement the default value of the action:
903 Otherwise, the following line sets YYVAL to the semantic value of
904 the lookahead token. This behavior is undocumented and Bison
905 users should not rely upon it. Assigning to YYVAL
906 unconditionally makes the parser a bit smaller, and it avoids a
907 GCC warning that YYVAL may be used uninitialized. */
908 yyval = yyvsp[1-yylen];
911 /* Similarly for the default location. Let the user run additional
912 commands if for instance locations are ranges. */
913 yyloc = yylsp[1-yylen];
914 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
918 /* We have to keep this `#if YYDEBUG', since we use variables which
919 are defined only if `YYDEBUG' is set. */
924 YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
925 yyn - 1, yyrline[yyn]);
927 /* Print the symbols being reduced, and their result. */
928 for (yyi = yyprhs[yyn]; yyrhs[yyi] >= 0; yyi++)
929 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
930 YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
938 /* Line __line__ of __file__. */
939 #line __oline__ "__ofile__"
950 short *yyssp1 = yyss - 1;
951 YYFPRINTF (stderr, "state stack now");
952 while (yyssp1 != yyssp)
953 YYFPRINTF (stderr, " %d", *++yyssp1);
954 YYFPRINTF (stderr, "\n");
963 /* Now `shift' the result of the reduction. Determine what state
964 that goes to, based on the state we popped back to and the rule
965 number reduced by. */
969 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
970 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
971 yystate = yytable[yystate];
973 yystate = yydefgoto[yyn - YYNTOKENS];
978 /*------------------------------------.
979 | yyerrlab -- here on detecting error |
980 `------------------------------------*/
982 /* If not already recovering from an error, report this error. */
988 yyn = yypact[yystate];
990 if (yyn > YYFLAG && yyn < YYLAST)
997 /* Start YYX at -YYN if negative to avoid negative indexes in
999 for (yyx = yyn < 0 ? -yyn : 0;
1000 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
1001 if (yycheck[yyx + yyn] == yyx)
1002 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
1003 yysize += yystrlen ("parse error, unexpected ") + 1;
1004 yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
1005 yymsg = (char *) YYSTACK_ALLOC (yysize);
1008 char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
1009 yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
1014 for (yyx = yyn < 0 ? -yyn : 0;
1015 yyx < (int) (sizeof (yytname) / sizeof (char *));
1017 if (yycheck[yyx + yyn] == yyx)
1019 const char *yyq = ! yycount ? ", expecting " : " or ";
1020 yyp = yystpcpy (yyp, yyq);
1021 yyp = yystpcpy (yyp, yytname[yyx]);
1026 YYSTACK_FREE (yymsg);
1029 yyerror ("parse error; also virtual memory exhausted");
1032 #endif /* YYERROR_VERBOSE */
1033 yyerror ("parse error");
1038 /*----------------------------------------------------.
1039 | yyerrlab1 -- error raised explicitly by an action. |
1040 `----------------------------------------------------*/
1042 if (yyerrstatus == 3)
1044 /* If just tried and failed to reuse lookahead token after an
1045 error, discard it. */
1047 /* Return failure if at end of input. */
1048 if (yychar == YYEOF)
1050 YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
1051 yychar, yytname[yychar1]));
1055 /* Else will try to reuse lookahead token after shifting the error
1058 yyerrstatus = 3; /* Each real token shifted decrements this. */
1063 /*-------------------------------------------------------------------.
1064 | yyerrdefault -- current state does not do anything special for the |
1066 `-------------------------------------------------------------------*/
1069 /* This is wrong; only states that explicitly want error tokens
1070 should shift them. */
1072 /* If its default is to accept any token, ok. Otherwise pop it. */
1073 yyn = yydefact[yystate];
1079 /*---------------------------------------------------------------.
1080 | yyerrpop -- pop the current state because it cannot handle the |
1082 `---------------------------------------------------------------*/
1095 short *yyssp1 = yyss - 1;
1096 YYFPRINTF (stderr, "Error: state stack now");
1097 while (yyssp1 != yyssp)
1098 YYFPRINTF (stderr, " %d", *++yyssp1);
1099 YYFPRINTF (stderr, "\n");
1107 yyn = yypact[yystate];
1112 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
1129 YYDPRINTF ((stderr, "Shifting error token, "));
1140 /*-------------------------------------.
1141 | yyacceptlab -- YYACCEPT comes here. |
1142 `-------------------------------------*/
1147 /*-----------------------------------.
1148 | yyabortlab -- YYABORT comes here. |
1149 `-----------------------------------*/
1154 /*---------------------------------------------.
1155 | yyoverflowab -- parser overflow comes here. |
1156 `---------------------------------------------*/
1158 yyerror ("parser stack overflow");
1165 YYSTACK_FREE (yyss);
1171 m4_if(b4_defines_flag, 0, [],
1172 [#output "b4_output_header_name"
1173 #ifndef b4_header_guard
1174 # define b4_header_guard
1176 b4_token_defines(b4_tokens)
1179 m4_ifdef([b4_stype_line],
1180 [#line b4_stype_line "b4_filename"
1184 # define YYSTYPE yystype
1188 [extern YYSTYPE b4_prefix[]lval;])
1190 m4_if(b4_locations_flag, [0], [],
1192 typedef struct yyltype
1199 # define YYLTYPE yyltype
1203 [extern YYLTYPE b4_prefix[]lloc;])
1205 #endif /* not b4_header_guard */