3 # m4_define_default(MACRO, VALUE)
4 # -------------------------------
5 # Define MACRO to VALUE, unless already defined.
6 m4_define([m4_define_default],
7 [m4_ifdef([$1], [], [m4_define($@)])])
9 m4_define_default([b4_input_suffix], [.y])
11 m4_define_default([b4_output_parser_suffix],
12 [m4_translit(b4_input_suffix, [yY], [cC])])
14 m4_define_default([b4_output_parser_name],
15 [b4_output_prefix[]b4_output_infix[]b4_output_parser_suffix[]])
18 m4_define_default([b4_output_header_suffix],
19 [m4_translit(b4_input_suffix, [yY], [hH])])
21 m4_define_default([b4_output_header_name],
22 [b4_output_prefix[]b4_output_infix[]b4_output_header_suffix[]])
24 m4_define_default([b4_header_guard],
25 [m4_bpatsubst(m4_toupper([BISON_]b4_output_header_name),
26 [[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]], [_])])
29 #output "b4_output_parser_name"
30 /* A Bison parser, made from b4_filename
31 by GNU bison b4_version. */
33 /* Skeleton output parser for Bison,
34 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
37 This program is free software; you can redistribute it and/or modify
38 it under the terms of the GNU General Public License as published by
39 the Free Software Foundation; either version 2, or (at your option)
42 This program is distributed in the hope that it will be useful,
43 but WITHOUT ANY WARRANTY; without even the implied warranty of
44 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45 GNU General Public License for more details.
47 You should have received a copy of the GNU General Public License
48 along with this program; if not, write to the Free Software
49 Foundation, Inc., 59 Temple Place - Suite 330,
50 Boston, MA 02111-1307, USA. */
52 /* As a special exception, when this file is copied by Bison into a
53 Bison output file, you may use that output file without restriction.
54 This special exception was added by the Free Software Foundation
55 in version 1.24 of Bison. */
57 /* This is the parser code that is written into each bison parser when
58 the %semantic_parser declaration is not specified in the grammar.
59 It was written by Richard Stallman by simplifying the hairy parser
60 used when %semantic_parser is specified. */
62 /* Identify Bison output. */
66 #define YYPURE b4_pure
68 /* Using locations. */
69 #define YYLSP_NEEDED b4_locations_flag
71 m4_if(b4_prefix[], [yy], [],
72 [/* If NAME_PREFIX is specified substitute the variables and functions
74 #define yyparse b4_prefix[]parse
75 #define yylex b4_prefix[]lex
76 #define yyerror b4_prefix[]error
77 #define yylval b4_prefix[]lval
78 #define yychar b4_prefix[]char
79 #define yydebug b4_prefix[]debug
80 #define yynerrs b4_prefix[]nerrs
82 # define yylloc b4_prefix[]lloc
86 /* Copy the user declarations. */
89 /* Enabling traces. */
91 # define YYDEBUG b4_debug
94 /* Enabling verbose error messages. */
95 #ifdef YYERROR_VERBOSE
96 # undef YYERROR_VERBOSE
97 # define YYERROR_VERBOSE 1
99 # define YYERROR_VERBOSE b4_error_verbose
103 typedef b4_stype yystype;
104 # define YYSTYPE yystype
108 typedef struct yyltype
115 # define YYLTYPE b4_ltype
118 /* Line __line__ of __file__. */
119 #line __oline__ "b4_output_parser_name"
121 /* All symbols defined below should begin with yy or YY, to avoid
122 infringing on user name space. This should be done even for local
123 variables, as they might otherwise be expanded by user macros.
124 There are some unavoidable exceptions within include files to
125 define necessary library symbols; they are noted "INFRINGES ON
126 USER NAME SPACE" below. */
129 # define YYSTD(x) std::x
134 #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
136 /* The parser invokes alloca or malloc; define the necessary symbols. */
138 # if YYSTACK_USE_ALLOCA
139 # define YYSTACK_ALLOC alloca
141 # ifndef YYSTACK_USE_ALLOCA
142 # if defined (alloca) || defined (_ALLOCA_H)
143 # define YYSTACK_ALLOC alloca
146 # define YYSTACK_ALLOC __builtin_alloca
152 # ifdef YYSTACK_ALLOC
153 /* Pacify GCC's `empty if-body' warning. */
154 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
157 # include <cstdlib> /* INFRINGES ON USER NAME SPACE */
158 # define YYSIZE_T std::size_t
161 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
162 # define YYSIZE_T size_t
165 # define YYSTACK_ALLOC YYSTD (malloc)
166 # define YYSTACK_FREE YYSTD (free)
169 /* A type that is properly aligned for any stack member. */
179 /* The size of the maximum gap between one aligned stack and the next. */
180 # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
182 /* The size of an array large to enough to hold all stacks, each with
185 # define YYSTACK_BYTES(N) \
186 ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
187 + 2 * YYSTACK_GAP_MAX)
189 # define YYSTACK_BYTES(N) \
190 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
194 /* Relocate the TYPE STACK from its old location to the new one. The
195 local variables YYSIZE and YYSTACKSIZE give the old and new number of
196 elements in the stack, and YYPTR gives the new location of the
197 stack. Advance YYPTR to a properly aligned location for the next
199 # define YYSTACK_RELOCATE(Type, Stack) \
202 YYSIZE_T yynewbytes; \
203 yymemcpy ((char *) yyptr, (char *) (Stack), \
204 yysize * (YYSIZE_T) sizeof (Type)); \
205 Stack = &yyptr->Stack; \
206 yynewbytes = yystacksize * sizeof (Type) + YYSTACK_GAP_MAX; \
207 yyptr += yynewbytes / sizeof (*yyptr); \
211 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
216 /* YYFINAL -- State number of the termination state. */
217 #define YYFINAL b4_final
218 #define YYFLAG b4_flag
219 #define YYLAST b4_last
221 /* YYNTOKENS -- Number of terminals. */
222 #define YYNTOKENS b4_ntokens
223 /* YYNNTS -- Number of nonterminals. */
224 #define YYNNTS b4_nnts
225 /* YYNRULES -- Number of rules. */
226 #define YYNRULES b4_nrules
227 /* YYNRULES -- Number of states. */
228 #define YYNSTATES b4_nstates
229 #define YYMAXUTOK b4_maxtok
231 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
232 #define YYTRANSLATE(x) ((unsigned)(x) <= b4_maxtok ? yytranslate[[x]] : b4_nsym)
234 /* YYTRANSLATE[[YYLEX]] -- Bison symbol number corresponding to YYLEX. */
235 static const char yytranslate[[]] =
241 /* YYPRHS[[YYN]] -- Index of the first RHS symbol of rule number YYN in
243 static const short yyprhs[[]] =
248 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
249 static const short yyrhs[[]] =
254 /* YYRLINE[[YYN]] -- source line where rule number YYN was defined. */
255 static const short yyrline[[]] =
261 #if (YYDEBUG) || YYERROR_VERBOSE
262 /* YYTNME[[SYMBOL-NUM]] -- String name of the symbol SYMBOL-NUM.
263 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
264 static const char *const yytname[[]] =
270 /* YYTOKNUM[[YYN]] -- Index in YYTNAME corresponding to YYLEX. */
271 static const short yytoknum[[]] =
276 /* YYR1[[YYN]] -- Symbol number of symbol that rule YYN derives. */
277 static const short yyr1[[]] =
282 /* YYR2[[YYN]] -- Number of symbols composing right hand side of rule YYN. */
283 static const short yyr2[[]] =
288 /* YYDEFACT[[S]] -- default rule to reduce with in state S when YYTABLE
289 doesn't specify something else to do. Zero means the default is an
291 static const short yydefact[[]] =
296 /* YYPGOTO[[NTERM-NUM]]. */
297 static const short yydefgoto[[]] =
302 /* YYPACT[[STATE-NUM]] -- Index in YYTABLE of the portion describing
304 static const short yypact[[]] =
309 /* YYPGOTO[[NTERM-NUM]]. */
310 static const short yypgoto[[]] =
315 /* YYTABLE[[YYPACT[STATE-NUM]]]. What to do in state STATE-NUM. If
316 positive, shift that token. If negative, reduce the rule which
317 number is the opposite. If zero, do what YYDEFACT says. */
318 static const short yytable[[]] =
323 static const short yycheck[[]] =
329 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
330 # define YYSIZE_T __SIZE_TYPE__
332 #if ! defined (YYSIZE_T) && defined (size_t)
333 # define YYSIZE_T size_t
335 #if ! defined (YYSIZE_T)
337 # include <cstddef> /* INFRINGES ON USER NAME SPACE */
338 # define YYSIZE_T std::size_t
341 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
342 # define YYSIZE_T size_t
346 #if ! defined (YYSIZE_T)
347 # define YYSIZE_T unsigned int
350 #define yyerrok (yyerrstatus = 0)
351 #define yyclearin (yychar = YYEMPTY)
355 #define YYACCEPT goto yyacceptlab
356 #define YYABORT goto yyabortlab
357 #define YYERROR goto yyerrlab1
359 /* Like YYERROR except do call yyerror. This remains here temporarily
360 to ease the transition to the new meaning of YYERROR, for GCC.
361 Once GCC version 2 has supplanted version 1, this can go. */
363 #define YYFAIL goto yyerrlab
365 #define YYRECOVERING() (!!yyerrstatus)
367 #define YYBACKUP(Token, Value) \
369 if (yychar == YYEMPTY && yylen == 1) \
373 yychar1 = YYTRANSLATE (yychar); \
379 yyerror ("syntax error: cannot back up"); \
385 #define YYERRCODE 256
387 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
390 When YYLLOC_DEFAULT is run, CURRENT is set the location of the
391 first token. By default, to implement support for ranges, extend
392 its range to the last symbol. */
394 #ifndef YYLLOC_DEFAULT
395 # define YYLLOC_DEFAULT(Current, Rhs, N) \
396 Current.last_line = Rhs[[N]].last_line; \
397 Current.last_column = Rhs[[N]].last_column;
400 /* YYLEX -- calling `yylex' with the right arguments. */
405 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
407 # define YYLEX yylex (&yylval, &yylloc)
409 # else /* !YYLSP_NEEDED */
411 # define YYLEX yylex (&yylval, YYLEX_PARAM)
413 # define YYLEX yylex (&yylval)
415 # endif /* !YYLSP_NEEDED */
417 # define YYLEX yylex ()
420 /* Enable debugging if requested. */
425 # include <cstdio> /* INFRINGES ON USER NAME SPACE */
427 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
429 # define YYFPRINTF YYSTD (fprintf)
432 # define YYDPRINTF(Args) \
437 /* Nonzero means print parse trace. Since this is uninitialized, it
438 does not stop multiple parsers from coexisting. */
441 # define YYDPRINTF(Args)
442 #endif /* !YYDEBUG */
444 /* YYINITDEPTH -- initial size of the parser's stacks. */
446 # define YYINITDEPTH b4_initdepth
449 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
450 if the built-in stack extension method is used).
452 Do not make this value too large; the results are undefined if
453 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
454 evaluated with infinite-precision integer arithmetic. */
461 # define YYMAXDEPTH b4_maxdepth
466 #if ! defined (yyoverflow) && ! defined (yymemcpy)
467 # if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
468 # define yymemcpy __builtin_memcpy
469 # else /* not GNU C or C++ */
471 /* This is the most reliable way to avoid incompatibilities
472 in available built-in functions on various systems. */
474 # if defined (__STDC__) || defined (__cplusplus)
475 yymemcpy (char *yyto, const char *yyfrom, YYSIZE_T yycount)
477 yymemcpy (yyto, yyfrom, yycount)
483 register const char *yyf = yyfrom;
484 register char *yyt = yyto;
485 register YYSIZE_T yyi = yycount;
496 # if defined (__GLIBC__) && defined (_STRING_H)
497 # define yystrlen strlen
499 /* Return the length of YYSTR. */
501 # if defined (__STDC__) || defined (__cplusplus)
502 yystrlen (const char *yystr)
508 register const char *yys = yystr;
510 while (*yys++ != '\0')
513 return yys - yystr - 1;
519 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
520 # define yystpcpy stpcpy
522 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
525 # if defined (__STDC__) || defined (__cplusplus)
526 yystpcpy (char *yydest, const char *yysrc)
528 yystpcpy (yydest, yysrc)
533 register char *yyd = yydest;
534 register const char *yys = yysrc;
536 while ((*yyd++ = *yys++) != '\0')
544 #endif /* !YYERROR_VERBOSE */
548 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
549 into yyparse. The argument should have type void *.
550 It should actually point to an object.
551 Grammar actions can access the variable by casting it
552 to the proper pointer type. */
556 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
557 # define YYPARSE_PARAM_DECL
558 # else /* !__cplusplus */
559 # define YYPARSE_PARAM_ARG YYPARSE_PARAM
560 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
561 # endif /* !__cplusplus */
562 #else /* !YYPARSE_PARAM */
563 # define YYPARSE_PARAM_ARG
564 # define YYPARSE_PARAM_DECL
565 #endif /* !YYPARSE_PARAM */
567 /* Prevent warning if -Wstrict-prototypes. */
569 # ifdef YYPARSE_PARAM
570 int yyparse (void *);
576 /* YY_DECL_VARIABLES -- depending whether we use a pure parser,
577 variables are global, or local to YYPARSE. */
579 #define YY_DECL_NON_LSP_VARIABLES \
580 /* The lookahead symbol. */ \
583 /* The semantic value of the lookahead symbol. */ \
586 /* Number of parse errors so far. */ \
590 # define YY_DECL_VARIABLES \
591 YY_DECL_NON_LSP_VARIABLES \
593 /* Location data for the lookahead symbol. */ \
596 # define YY_DECL_VARIABLES \
597 YY_DECL_NON_LSP_VARIABLES
600 /* If nonreentrant, generate the variables here. */
607 yyparse (YYPARSE_PARAM_ARG)
610 /* If reentrant, generate the variables here. */
615 register int yystate;
618 /* Number of tokens to shift before error messages enabled. */
620 /* Lookahead token as an internal (translated) token number. */
623 /* Three stacks and their tools:
624 `yyss': related to states,
625 `yyvs': related to semantic values,
626 `yyls': related to locations.
628 Refer to the stacks thru separate pointers, to allow yyoverflow
629 to reallocate them elsewhere. */
631 /* The state stack. */
632 short yyssa[YYINITDEPTH];
634 register short *yyssp;
636 /* The semantic value stack. */
637 YYSTYPE yyvsa[YYINITDEPTH];
638 YYSTYPE *yyvs = yyvsa;
639 register YYSTYPE *yyvsp;
642 /* The location stack. */
643 YYLTYPE yylsa[YYINITDEPTH];
644 YYLTYPE *yyls = yylsa;
649 # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
651 # define YYPOPSTACK (yyvsp--, yyssp--)
654 YYSIZE_T yystacksize = YYINITDEPTH;
656 /* The variables used to return semantic value and location from the
663 /* When reducing, the number of symbols on the RHS of the reduced
667 YYDPRINTF ((stderr, "Starting parse\n"));
672 yychar = YYEMPTY; /* Cause a token to be read. */
674 /* Initialize stack pointers.
675 Waste one element of value and location stack
676 so that they stay on the same level as the state stack.
677 The wasted elements are never initialized. */
686 /*------------------------------------------------------------.
687 | yynewstate -- Push a new state, which is found in yystate. |
688 `------------------------------------------------------------*/
690 /* In all cases, when you get here, the value and location stacks
691 have just been pushed. so pushing a state here evens the stacks.
698 if (yyssp >= yyss + yystacksize - 1)
700 /* Get the current used size of the three stacks, in elements. */
701 YYSIZE_T yysize = yyssp - yyss + 1;
705 /* Give user a chance to reallocate the stack. Use copies of
706 these so that the &'s don't force the real ones into
708 YYSTYPE *yyvs1 = yyvs;
711 /* Each stack pointer address is followed by the size of the
712 data in use in that stack, in bytes. */
714 YYLTYPE *yyls1 = yyls;
715 /* This used to be a conditional around just the two extra args,
716 but that might be undefined if yyoverflow is a macro. */
717 yyoverflow ("parser stack overflow",
718 &yyss1, yysize * sizeof (*yyssp),
719 &yyvs1, yysize * sizeof (*yyvsp),
720 &yyls1, yysize * sizeof (*yylsp),
724 yyoverflow ("parser stack overflow",
725 &yyss1, yysize * sizeof (*yyssp),
726 &yyvs1, yysize * sizeof (*yyvsp),
732 #else /* no yyoverflow */
733 /* Extend the stack our own way. */
734 if (yystacksize >= YYMAXDEPTH)
737 if (yystacksize > YYMAXDEPTH)
738 yystacksize = YYMAXDEPTH;
742 union yyalloc *yyptr =
743 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
746 YYSTACK_RELOCATE (short, yyss);
747 YYSTACK_RELOCATE (YYSTYPE, yyvs);
749 YYSTACK_RELOCATE (YYLTYPE, yyls);
751 # undef YYSTACK_RELOCATE
753 YYSTACK_FREE (yyss1);
755 #endif /* no yyoverflow */
757 yyssp = yyss + yysize - 1;
758 yyvsp = yyvs + yysize - 1;
760 yylsp = yyls + yysize - 1;
763 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
764 (unsigned long int) yystacksize));
766 if (yyssp >= yyss + yystacksize - 1)
770 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
779 /* Do appropriate processing given the current state. */
780 /* Read a lookahead token if we need one and don't already have one. */
783 /* First try to decide what to do without reference to lookahead token. */
785 yyn = yypact[yystate];
789 /* Not known => get a lookahead token if don't already have one. */
791 /* yychar is either YYEMPTY or YYEOF
792 or a valid token in external form. */
794 if (yychar == YYEMPTY)
796 YYDPRINTF ((stderr, "Reading a token: "));
800 /* Convert token to internal form (in yychar1) for indexing tables with. */
802 if (yychar <= 0) /* This means end of input. */
805 yychar = YYEOF; /* Don't call YYLEX any more. */
807 YYDPRINTF ((stderr, "Now at end of input.\n"));
811 yychar1 = YYTRANSLATE (yychar);
814 /* We have to keep this `#if YYDEBUG', since we use variables
815 which are defined only if `YYDEBUG' is set. */
818 YYFPRINTF (stderr, "Next token is %d (%s",
819 yychar, yytname[yychar1]);
820 /* Give the individual parser a way to print the precise
821 meaning of a token, for further debugging info. */
823 YYPRINT (stderr, yychar, yylval);
825 YYFPRINTF (stderr, ")\n");
831 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
836 /* yyn is what to do for this token type in this state.
837 Negative => reduce, -yyn is rule number.
838 Positive => shift, yyn is new state.
839 New state is final state => don't bother to shift,
841 0, or most negative number => error. */
856 /* Shift the lookahead token. */
857 YYDPRINTF ((stderr, "Shifting token %d (%s), ",
858 yychar, yytname[yychar1]));
860 /* Discard the token being shifted unless it is eof. */
869 /* Count tokens shifted since error; after three, turn off error
878 /*-----------------------------------------------------------.
879 | yydefault -- do the default action for the current state. |
880 `-----------------------------------------------------------*/
882 yyn = yydefact[yystate];
888 /*-----------------------------.
889 | yyreduce -- Do a reduction. |
890 `-----------------------------*/
892 /* yyn is the number of a rule to reduce with. */
895 /* If YYLEN is nonzero, implement the default value of the action:
898 Otherwise, the following line sets YYVAL to the semantic value of
899 the lookahead token. This behavior is undocumented and Bison
900 users should not rely upon it. Assigning to YYVAL
901 unconditionally makes the parser a bit smaller, and it avoids a
902 GCC warning that YYVAL may be used uninitialized. */
903 yyval = yyvsp[1-yylen];
906 /* Similarly for the default location. Let the user run additional
907 commands if for instance locations are ranges. */
908 yyloc = yylsp[1-yylen];
909 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
913 /* We have to keep this `#if YYDEBUG', since we use variables which
914 are defined only if `YYDEBUG' is set. */
919 YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
920 yyn - 1, yyrline[yyn]);
922 /* Print the symbols being reduced, and their result. */
923 for (yyi = yyprhs[yyn]; yyrhs[yyi] >= 0; yyi++)
924 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
925 YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
933 /* Line __line__ of __file__. */
934 #line __oline__ "b4_output_parser_name"
945 short *yyssp1 = yyss - 1;
946 YYFPRINTF (stderr, "state stack now");
947 while (yyssp1 != yyssp)
948 YYFPRINTF (stderr, " %d", *++yyssp1);
949 YYFPRINTF (stderr, "\n");
958 /* Now `shift' the result of the reduction. Determine what state
959 that goes to, based on the state we popped back to and the rule
960 number reduced by. */
964 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
965 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
966 yystate = yytable[yystate];
968 yystate = yydefgoto[yyn - YYNTOKENS];
973 /*------------------------------------.
974 | yyerrlab -- here on detecting error |
975 `------------------------------------*/
977 /* If not already recovering from an error, report this error. */
983 yyn = yypact[yystate];
985 if (yyn > YYFLAG && yyn < YYLAST)
992 /* Start YYX at -YYN if negative to avoid negative indexes in
994 for (yyx = yyn < 0 ? -yyn : 0;
995 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
996 if (yycheck[yyx + yyn] == yyx)
997 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
998 yysize += yystrlen ("parse error, unexpected ") + 1;
999 yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
1000 yymsg = (char *) YYSTACK_ALLOC (yysize);
1003 char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
1004 yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
1009 for (yyx = yyn < 0 ? -yyn : 0;
1010 yyx < (int) (sizeof (yytname) / sizeof (char *));
1012 if (yycheck[yyx + yyn] == yyx)
1014 const char *yyq = ! yycount ? ", expecting " : " or ";
1015 yyp = yystpcpy (yyp, yyq);
1016 yyp = yystpcpy (yyp, yytname[yyx]);
1021 YYSTACK_FREE (yymsg);
1024 yyerror ("parse error; also virtual memory exhausted");
1027 #endif /* YYERROR_VERBOSE */
1028 yyerror ("parse error");
1033 /*----------------------------------------------------.
1034 | yyerrlab1 -- error raised explicitly by an action. |
1035 `----------------------------------------------------*/
1037 if (yyerrstatus == 3)
1039 /* If just tried and failed to reuse lookahead token after an
1040 error, discard it. */
1042 /* Return failure if at end of input. */
1043 if (yychar == YYEOF)
1045 YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
1046 yychar, yytname[yychar1]));
1050 /* Else will try to reuse lookahead token after shifting the error
1053 yyerrstatus = 3; /* Each real token shifted decrements this. */
1058 /*-------------------------------------------------------------------.
1059 | yyerrdefault -- current state does not do anything special for the |
1061 `-------------------------------------------------------------------*/
1064 /* This is wrong; only states that explicitly want error tokens
1065 should shift them. */
1067 /* If its default is to accept any token, ok. Otherwise pop it. */
1068 yyn = yydefact[yystate];
1074 /*---------------------------------------------------------------.
1075 | yyerrpop -- pop the current state because it cannot handle the |
1077 `---------------------------------------------------------------*/
1090 short *yyssp1 = yyss - 1;
1091 YYFPRINTF (stderr, "Error: state stack now");
1092 while (yyssp1 != yyssp)
1093 YYFPRINTF (stderr, " %d", *++yyssp1);
1094 YYFPRINTF (stderr, "\n");
1102 yyn = yypact[yystate];
1107 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
1124 YYDPRINTF ((stderr, "Shifting error token, "));
1135 /*-------------------------------------.
1136 | yyacceptlab -- YYACCEPT comes here. |
1137 `-------------------------------------*/
1142 /*-----------------------------------.
1143 | yyabortlab -- YYABORT comes here. |
1144 `-----------------------------------*/
1149 /*---------------------------------------------.
1150 | yyoverflowab -- parser overflow comes here. |
1151 `---------------------------------------------*/
1153 yyerror ("parser stack overflow");
1160 YYSTACK_FREE (yyss);
1166 m4_if(b4_defines_flag, 0, [],
1167 [#output "b4_output_header_name"
1168 #ifndef b4_header_guard
1169 # define b4_header_guard
1176 # define YYSTYPE yystype
1180 [extern YYSTYPE b4_prefix[]lval;])
1182 m4_if(b4_locations_flag, [0], [],
1184 typedef struct yyltype
1191 # define YYLTYPE yyltype
1195 [extern YYLTYPE b4_prefix[]lloc;])
1197 #endif /* not b4_header_guard */