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__. */
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 static const short yyrhs[[]] =
294 /* YYRLINE[[YYN]] -- source line where rule number YYN was defined. */
295 static const short yyrline[[]] =
301 #if (YYDEBUG) || YYERROR_VERBOSE
302 /* YYTNME[[SYMBOL-NUM]] -- String name of the symbol SYMBOL-NUM.
303 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
304 static const char *const yytname[[]] =
310 /* YYTOKNUM[[YYN]] -- Index in YYTNAME corresponding to YYLEX. */
311 static const short yytoknum[[]] =
316 /* YYR1[[YYN]] -- Symbol number of symbol that rule YYN derives. */
317 static const short yyr1[[]] =
322 /* YYR2[[YYN]] -- Number of symbols composing right hand side of rule YYN. */
323 static const short yyr2[[]] =
328 /* YYDEFACT[[S]] -- default rule to reduce with in state S when YYTABLE
329 doesn't specify something else to do. Zero means the default is an
331 static const short yydefact[[]] =
336 /* YYPGOTO[[NTERM-NUM]]. */
337 static const short yydefgoto[[]] =
342 /* YYPACT[[STATE-NUM]] -- Index in YYTABLE of the portion describing
344 static const short yypact[[]] =
349 /* YYPGOTO[[NTERM-NUM]]. */
350 static const short yypgoto[[]] =
355 /* YYTABLE[[YYPACT[STATE-NUM]]]. What to do in state STATE-NUM. If
356 positive, shift that token. If negative, reduce the rule which
357 number is the opposite. If zero, do what YYDEFACT says. */
358 static const short yytable[[]] =
363 static const short yycheck[[]] =
369 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
370 # define YYSIZE_T __SIZE_TYPE__
372 #if ! defined (YYSIZE_T) && defined (size_t)
373 # define YYSIZE_T size_t
375 #if ! defined (YYSIZE_T)
376 # if defined (__STDC__) || defined (__cplusplus)
377 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
378 # define YYSIZE_T size_t
381 #if ! defined (YYSIZE_T)
382 # define YYSIZE_T unsigned int
385 #define yyerrok (yyerrstatus = 0)
386 #define yyclearin (yychar = YYEMPTY)
390 #define YYACCEPT goto yyacceptlab
391 #define YYABORT goto yyabortlab
392 #define YYERROR goto yyerrlab1
394 /* Like YYERROR except do call yyerror. This remains here temporarily
395 to ease the transition to the new meaning of YYERROR, for GCC.
396 Once GCC version 2 has supplanted version 1, this can go. */
398 #define YYFAIL goto yyerrlab
400 #define YYRECOVERING() (!!yyerrstatus)
402 #define YYBACKUP(Token, Value) \
404 if (yychar == YYEMPTY && yylen == 1) \
408 yychar1 = YYTRANSLATE (yychar); \
414 yyerror ("syntax error: cannot back up"); \
420 #define YYERRCODE 256
422 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
425 When YYLLOC_DEFAULT is run, CURRENT is set the location of the
426 first token. By default, to implement support for ranges, extend
427 its range to the last symbol. */
429 #ifndef YYLLOC_DEFAULT
430 # define YYLLOC_DEFAULT(Current, Rhs, N) \
431 Current.last_line = Rhs[[N]].last_line; \
432 Current.last_column = Rhs[[N]].last_column;
435 /* YYLEX -- calling `yylex' with the right arguments. */
440 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
442 # define YYLEX yylex (&yylval, &yylloc)
444 # else /* !YYLSP_NEEDED */
446 # define YYLEX yylex (&yylval, YYLEX_PARAM)
448 # define YYLEX yylex (&yylval)
450 # endif /* !YYLSP_NEEDED */
452 # define YYLEX yylex ()
455 /* Enable debugging if requested. */
459 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
460 # define YYFPRINTF fprintf
463 # define YYDPRINTF(Args) \
468 /* Nonzero means print parse trace. Since this is uninitialized, it
469 does not stop multiple parsers from coexisting. */
472 # define YYDPRINTF(Args)
473 #endif /* !YYDEBUG */
475 /* YYINITDEPTH -- initial size of the parser's stacks. */
477 # define YYINITDEPTH b4_initdepth
480 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
481 if the built-in stack extension method is used).
483 Do not make this value too large; the results are undefined if
484 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
485 evaluated with infinite-precision integer arithmetic. */
492 # define YYMAXDEPTH b4_maxdepth
500 # if defined (__GLIBC__) && defined (_STRING_H)
501 # define yystrlen strlen
503 /* Return the length of YYSTR. */
505 # if defined (__STDC__) || defined (__cplusplus)
506 yystrlen (const char *yystr)
512 register const char *yys = yystr;
514 while (*yys++ != '\0')
517 return yys - yystr - 1;
523 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
524 # define yystpcpy stpcpy
526 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
529 # if defined (__STDC__) || defined (__cplusplus)
530 yystpcpy (char *yydest, const char *yysrc)
532 yystpcpy (yydest, yysrc)
537 register char *yyd = yydest;
538 register const char *yys = yysrc;
540 while ((*yyd++ = *yys++) != '\0')
548 #endif /* !YYERROR_VERBOSE */
552 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
553 into yyparse. The argument should have type void *.
554 It should actually point to an object.
555 Grammar actions can access the variable by casting it
556 to the proper pointer type. */
559 # if defined (__STDC__) || defined (__cplusplus)
560 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
561 # define YYPARSE_PARAM_DECL
563 # define YYPARSE_PARAM_ARG YYPARSE_PARAM
564 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
566 #else /* !YYPARSE_PARAM */
567 # define YYPARSE_PARAM_ARG
568 # define YYPARSE_PARAM_DECL
569 #endif /* !YYPARSE_PARAM */
571 /* Prevent warning if -Wstrict-prototypes. */
573 # ifdef YYPARSE_PARAM
574 int yyparse (void *);
580 /* YY_DECL_VARIABLES -- depending whether we use a pure parser,
581 variables are global, or local to YYPARSE. */
583 #define YY_DECL_NON_LSP_VARIABLES \
584 /* The lookahead symbol. */ \
587 /* The semantic value of the lookahead symbol. */ \
590 /* Number of parse errors so far. */ \
594 # define YY_DECL_VARIABLES \
595 YY_DECL_NON_LSP_VARIABLES \
597 /* Location data for the lookahead symbol. */ \
600 # define YY_DECL_VARIABLES \
601 YY_DECL_NON_LSP_VARIABLES
604 /* If nonreentrant, generate the variables here. */
611 yyparse (YYPARSE_PARAM_ARG)
614 /* If reentrant, generate the variables here. */
619 register int yystate;
622 /* Number of tokens to shift before error messages enabled. */
624 /* Lookahead token as an internal (translated) token number. */
627 /* Three stacks and their tools:
628 `yyss': related to states,
629 `yyvs': related to semantic values,
630 `yyls': related to locations.
632 Refer to the stacks thru separate pointers, to allow yyoverflow
633 to reallocate them elsewhere. */
635 /* The state stack. */
636 short yyssa[YYINITDEPTH];
638 register short *yyssp;
640 /* The semantic value stack. */
641 YYSTYPE yyvsa[YYINITDEPTH];
642 YYSTYPE *yyvs = yyvsa;
643 register YYSTYPE *yyvsp;
646 /* The location stack. */
647 YYLTYPE yylsa[YYINITDEPTH];
648 YYLTYPE *yyls = yylsa;
653 # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
655 # define YYPOPSTACK (yyvsp--, yyssp--)
658 YYSIZE_T yystacksize = YYINITDEPTH;
660 /* The variables used to return semantic value and location from the
667 /* When reducing, the number of symbols on the RHS of the reduced
671 YYDPRINTF ((stderr, "Starting parse\n"));
676 yychar = YYEMPTY; /* Cause a token to be read. */
678 /* Initialize stack pointers.
679 Waste one element of value and location stack
680 so that they stay on the same level as the state stack.
681 The wasted elements are never initialized. */
690 /*------------------------------------------------------------.
691 | yynewstate -- Push a new state, which is found in yystate. |
692 `------------------------------------------------------------*/
694 /* In all cases, when you get here, the value and location stacks
695 have just been pushed. so pushing a state here evens the stacks.
702 if (yyssp >= yyss + yystacksize - 1)
704 /* Get the current used size of the three stacks, in elements. */
705 YYSIZE_T yysize = yyssp - yyss + 1;
709 /* Give user a chance to reallocate the stack. Use copies of
710 these so that the &'s don't force the real ones into
712 YYSTYPE *yyvs1 = yyvs;
715 /* Each stack pointer address is followed by the size of the
716 data in use in that stack, in bytes. */
718 YYLTYPE *yyls1 = yyls;
719 /* This used to be a conditional around just the two extra args,
720 but that might be undefined if yyoverflow is a macro. */
721 yyoverflow ("parser stack overflow",
722 &yyss1, yysize * sizeof (*yyssp),
723 &yyvs1, yysize * sizeof (*yyvsp),
724 &yyls1, yysize * sizeof (*yylsp),
728 yyoverflow ("parser stack overflow",
729 &yyss1, yysize * sizeof (*yyssp),
730 &yyvs1, yysize * sizeof (*yyvsp),
736 #else /* no yyoverflow */
737 /* Extend the stack our own way. */
738 if (yystacksize >= YYMAXDEPTH)
741 if (yystacksize > YYMAXDEPTH)
742 yystacksize = YYMAXDEPTH;
746 union yyalloc *yyptr =
747 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
750 YYSTACK_RELOCATE (yyss);
751 YYSTACK_RELOCATE (yyvs);
753 YYSTACK_RELOCATE (yyls);
755 # undef YYSTACK_RELOCATE
757 YYSTACK_FREE (yyss1);
759 #endif /* no yyoverflow */
761 yyssp = yyss + yysize - 1;
762 yyvsp = yyvs + yysize - 1;
764 yylsp = yyls + yysize - 1;
767 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
768 (unsigned long int) yystacksize));
770 if (yyssp >= yyss + yystacksize - 1)
774 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
783 /* Do appropriate processing given the current state. */
784 /* Read a lookahead token if we need one and don't already have one. */
787 /* First try to decide what to do without reference to lookahead token. */
789 yyn = yypact[yystate];
793 /* Not known => get a lookahead token if don't already have one. */
795 /* yychar is either YYEMPTY or YYEOF
796 or a valid token in external form. */
798 if (yychar == YYEMPTY)
800 YYDPRINTF ((stderr, "Reading a token: "));
804 /* Convert token to internal form (in yychar1) for indexing tables with. */
806 if (yychar <= 0) /* This means end of input. */
809 yychar = YYEOF; /* Don't call YYLEX any more. */
811 YYDPRINTF ((stderr, "Now at end of input.\n"));
815 yychar1 = YYTRANSLATE (yychar);
818 /* We have to keep this `#if YYDEBUG', since we use variables
819 which are defined only if `YYDEBUG' is set. */
822 YYFPRINTF (stderr, "Next token is %d (%s",
823 yychar, yytname[yychar1]);
824 /* Give the individual parser a way to print the precise
825 meaning of a token, for further debugging info. */
827 YYPRINT (stderr, yychar, yylval);
829 YYFPRINTF (stderr, ")\n");
835 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
840 /* yyn is what to do for this token type in this state.
841 Negative => reduce, -yyn is rule number.
842 Positive => shift, yyn is new state.
843 New state is final state => don't bother to shift,
845 0, or most negative number => error. */
860 /* Shift the lookahead token. */
861 YYDPRINTF ((stderr, "Shifting token %d (%s), ",
862 yychar, yytname[yychar1]));
864 /* Discard the token being shifted unless it is eof. */
873 /* Count tokens shifted since error; after three, turn off error
882 /*-----------------------------------------------------------.
883 | yydefault -- do the default action for the current state. |
884 `-----------------------------------------------------------*/
886 yyn = yydefact[yystate];
892 /*-----------------------------.
893 | yyreduce -- Do a reduction. |
894 `-----------------------------*/
896 /* yyn is the number of a rule to reduce with. */
899 /* If YYLEN is nonzero, implement the default value of the action:
902 Otherwise, the following line sets YYVAL to the semantic value of
903 the lookahead token. This behavior is undocumented and Bison
904 users should not rely upon it. Assigning to YYVAL
905 unconditionally makes the parser a bit smaller, and it avoids a
906 GCC warning that YYVAL may be used uninitialized. */
907 yyval = yyvsp[1-yylen];
910 /* Similarly for the default location. Let the user run additional
911 commands if for instance locations are ranges. */
912 yyloc = yylsp[1-yylen];
913 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
917 /* We have to keep this `#if YYDEBUG', since we use variables which
918 are defined only if `YYDEBUG' is set. */
923 YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
924 yyn - 1, yyrline[yyn]);
926 /* Print the symbols being reduced, and their result. */
927 for (yyi = yyprhs[yyn]; yyrhs[yyi] >= 0; yyi++)
928 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
929 YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
937 /* Line __line__ of __file__. */
949 short *yyssp1 = yyss - 1;
950 YYFPRINTF (stderr, "state stack now");
951 while (yyssp1 != yyssp)
952 YYFPRINTF (stderr, " %d", *++yyssp1);
953 YYFPRINTF (stderr, "\n");
962 /* Now `shift' the result of the reduction. Determine what state
963 that goes to, based on the state we popped back to and the rule
964 number reduced by. */
968 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
969 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
970 yystate = yytable[yystate];
972 yystate = yydefgoto[yyn - YYNTOKENS];
977 /*------------------------------------.
978 | yyerrlab -- here on detecting error |
979 `------------------------------------*/
981 /* If not already recovering from an error, report this error. */
987 yyn = yypact[yystate];
989 if (yyn > YYFLAG && yyn < YYLAST)
996 /* Start YYX at -YYN if negative to avoid negative indexes in
998 for (yyx = yyn < 0 ? -yyn : 0;
999 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
1000 if (yycheck[yyx + yyn] == yyx)
1001 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
1002 yysize += yystrlen ("parse error, unexpected ") + 1;
1003 yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
1004 yymsg = (char *) YYSTACK_ALLOC (yysize);
1007 char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
1008 yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
1013 for (yyx = yyn < 0 ? -yyn : 0;
1014 yyx < (int) (sizeof (yytname) / sizeof (char *));
1016 if (yycheck[yyx + yyn] == yyx)
1018 const char *yyq = ! yycount ? ", expecting " : " or ";
1019 yyp = yystpcpy (yyp, yyq);
1020 yyp = yystpcpy (yyp, yytname[yyx]);
1025 YYSTACK_FREE (yymsg);
1028 yyerror ("parse error; also virtual memory exhausted");
1031 #endif /* YYERROR_VERBOSE */
1032 yyerror ("parse error");
1037 /*----------------------------------------------------.
1038 | yyerrlab1 -- error raised explicitly by an action. |
1039 `----------------------------------------------------*/
1041 if (yyerrstatus == 3)
1043 /* If just tried and failed to reuse lookahead token after an
1044 error, discard it. */
1046 /* Return failure if at end of input. */
1047 if (yychar == YYEOF)
1049 YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
1050 yychar, yytname[yychar1]));
1054 /* Else will try to reuse lookahead token after shifting the error
1057 yyerrstatus = 3; /* Each real token shifted decrements this. */
1062 /*-------------------------------------------------------------------.
1063 | yyerrdefault -- current state does not do anything special for the |
1065 `-------------------------------------------------------------------*/
1068 /* This is wrong; only states that explicitly want error tokens
1069 should shift them. */
1071 /* If its default is to accept any token, ok. Otherwise pop it. */
1072 yyn = yydefact[yystate];
1078 /*---------------------------------------------------------------.
1079 | yyerrpop -- pop the current state because it cannot handle the |
1081 `---------------------------------------------------------------*/
1094 short *yyssp1 = yyss - 1;
1095 YYFPRINTF (stderr, "Error: state stack now");
1096 while (yyssp1 != yyssp)
1097 YYFPRINTF (stderr, " %d", *++yyssp1);
1098 YYFPRINTF (stderr, "\n");
1106 yyn = yypact[yystate];
1111 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
1128 YYDPRINTF ((stderr, "Shifting error token, "));
1139 /*-------------------------------------.
1140 | yyacceptlab -- YYACCEPT comes here. |
1141 `-------------------------------------*/
1146 /*-----------------------------------.
1147 | yyabortlab -- YYABORT comes here. |
1148 `-----------------------------------*/
1153 /*---------------------------------------------.
1154 | yyoverflowab -- parser overflow comes here. |
1155 `---------------------------------------------*/
1157 yyerror ("parser stack overflow");
1164 YYSTACK_FREE (yyss);
1170 m4_if(b4_defines_flag, 0, [],
1171 [#output "b4_output_header_name"
1172 #ifndef b4_header_guard
1173 # define b4_header_guard
1175 b4_token_defines(b4_tokens)
1178 m4_ifdef([b4_stype_line],
1179 [#line b4_stype_line "b4_filename"
1183 # define YYSTYPE yystype
1187 [extern YYSTYPE b4_prefix[]lval;])
1189 m4_if(b4_locations_flag, [0], [],
1191 typedef struct yyltype
1198 # define YYLTYPE yyltype
1202 [extern YYLTYPE b4_prefix[]lloc;])
1204 #endif /* not b4_header_guard */