X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/fb8135fa993b77b8cfc0ff652b02424aea3c6754..29c017256a980c07f898d8a4e5f6a630a5bf70b7:/data/yacc.c diff --git a/data/yacc.c b/data/yacc.c index c96586d5..cd933733 100644 --- a/data/yacc.c +++ b/data/yacc.c @@ -2,7 +2,8 @@ m4_divert(-1) -*- C -*- m4_include([c.m4]) # Yacc compatible skeleton for Bison -# Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc. +# Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 +# Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,6 +20,78 @@ m4_include([c.m4]) # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # 02111-1307 USA + + +## ---------------- ## +## Default values. ## +## ---------------- ## + +# Stack parameters. +m4_define_default([b4_stack_depth_max], [10000]) +m4_define_default([b4_stack_depth_init], [200]) + +# Location type. +m4_define_default([b4_location_type], [yyltype]) + + +## ------------------------ ## +## Pure/impure interfaces. ## +## ------------------------ ## + + +# b4_Pure_if(IF-TRUE, IF-FALSE) +# ----------------------------- +# Expand IF-TRUE, if %pure-parser and %parse-param, IF-FALSE otherwise. +m4_define([b4_Pure_if], +[b4_pure_if([m4_ifset([b4_parse_param], + [$1], [$2])], + [$2])]) + + +# b4_pure_args +# ------------ +# Arguments passed to yyerror: user args plus yylloc. +m4_define([b4_pure_args], +[b4_Pure_if([b4_location_if([, &yylloc])])[]b4_user_args]) + + +# b4_lex_param +# ------------ +# Accumule in b4_lex_param all the yylex arguments. +# b4_lex_param arrives quoted twice, but we want to keep only one level. +m4_define([b4_lex_param], +m4_dquote(b4_pure_if([[[[YYSTYPE *]], [[&yylval]]][]dnl +b4_location_if([, [[YYLTYPE *], [&yylloc]]])])dnl +m4_ifdef([b4_lex_param], [, ]b4_lex_param))) + + + +## ------------ ## +## Data Types. ## +## ------------ ## + +# b4_int_type(MIN, MAX) +# --------------------- +# Return the smallest int type able to handle numbers ranging from +# MIN to MAX (included). We overwrite the version from c.m4 which relies +# on "signed char" which is not portable to old K&R compilers. +m4_define([b4_int_type], +[m4_if(b4_ints_in($@, [0], [255]), [1], [unsigned char], + b4_ints_in($@, [-128], [127]), [1], [yysigned_char], + + b4_ints_in($@, [0], [65535]), [1], [unsigned short], + b4_ints_in($@, [-32768], [32767]), [1], [short], + + m4_eval([0 <= $1]), [1], [unsigned int], + + [int])]) + + +## ----------------- ## +## Semantic Values. ## +## ----------------- ## + + # b4_lhs_value([TYPE]) # -------------------- # Expansion of $$. @@ -39,15 +112,6 @@ m4_define([b4_rhs_value], ## Locations. ## ## ----------- ## -# b4_location_if(IF-TRUE, IF-FALSE) -# --------------------------------- -# Expand IF-TRUE, if locations are used, IF-FALSE otherwise. -m4_define([b4_location_if], -[m4_if(b4_locations_flag, [1], - [$1], - [$2])]) - - # b4_lhs_location() # ----------------- # Expansion of @$. @@ -64,19 +128,6 @@ m4_define([b4_rhs_location], -## -------------- ## -## %pure-parser. ## -## -------------- ## - -# b4_pure_if(IF-TRUE, IF-FALSE) -# ----------------------------- -# Expand IF-TRUE, if %pure-parser, IF-FALSE otherwise. -m4_define([b4_pure_if], -[m4_if(b4_pure, [1], - [$1], - [$2])]) - - ## ------------------- ## ## Output file names. ## ## ------------------- ## @@ -123,12 +174,18 @@ m4_popdef([b4_dollar_dollar])dnl ]) - +# We do want M4 expansion after # for CPP macros. +m4_changecom() m4_divert(0)dnl #output "b4_output_parser_name" b4_copyright([Skeleton parser for Yacc-like parsing with Bison], [1984, 1989, 1990, 2000, 2001, 2002]) +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + /* Written by Richard Stallman by simplifying the original so called ``semantic'' parser. */ @@ -139,15 +196,7 @@ b4_copyright([Skeleton parser for Yacc-like parsing with Bison], define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ -/* Identify Bison output. */ -#define YYBISON 1 - -/* Pure parsers. */ -#define YYPURE b4_pure - -/* Using locations. */ -#define YYLSP_NEEDED b4_locations_flag - +b4_identification m4_if(b4_prefix[], [yy], [], [/* If NAME_PREFIX is specified substitute the variables and functions names. */ @@ -160,11 +209,11 @@ m4_if(b4_prefix[], [yy], [], #define yynerrs b4_prefix[]nerrs b4_location_if([#define yylloc b4_prefix[]lloc])]) +b4_token_defines(b4_tokens) + /* Copy the first part of user declarations. */ b4_pre_prologue -b4_token_defines(b4_tokens) - /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG b4_debug @@ -197,7 +246,7 @@ typedef struct yyltype int last_line; int last_column; } yyltype; -# define YYLTYPE b4_ltype +# define YYLTYPE b4_location_type # define YYLTYPE_IS_TRIVIAL 1 #endif @@ -301,19 +350,25 @@ b4_location_if( #endif +#if defined (__STDC__) || defined (__cplusplus) + typedef signed char yysigned_char; +#else + typedef short yysigned_char; +#endif + /* YYFINAL -- State number of the termination state. */ -#define YYFINAL b4_final -#define YYFLAG b4_flag +#define YYFINAL b4_final_state_number +/* YYLAST -- Last index in YYTABLE. */ #define YYLAST b4_last /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS b4_ntokens +#define YYNTOKENS b4_tokens_number /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS b4_nnts +#define YYNNTS b4_nterms_number /* YYNRULES -- Number of rules. */ -#define YYNRULES b4_nrules +#define YYNRULES b4_rules_number /* YYNRULES -- Number of states. */ -#define YYNSTATES b4_nstates +#define YYNSTATES b4_states_number /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK b4_undef_token_number @@ -323,7 +378,7 @@ b4_location_if( ((unsigned)(X) <= YYMAXUTOK ? yytranslate[[X]] : YYUNDEFTOK) /* YYTRANSLATE[[YYLEX]] -- Bison symbol number corresponding to YYLEX. */ -static const b4_uint_type(b4_translate_max) yytranslate[[]] = +static const b4_int_type_for([b4_translate]) yytranslate[[]] = { b4_translate }; @@ -331,19 +386,19 @@ static const b4_uint_type(b4_translate_max) yytranslate[[]] = #if YYDEBUG /* YYPRHS[[YYN]] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ -static const b4_uint_type(b4_prhs_max) yyprhs[[]] = +static const b4_int_type_for([b4_prhs]) yyprhs[[]] = { b4_prhs }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const b4_sint_type(b4_rhs_max) yyrhs[[]] = +static const b4_int_type_for([b4_rhs]) yyrhs[[]] = { b4_rhs }; /* YYRLINE[[YYN]] -- source line where rule number YYN was defined. */ -static const b4_uint_type(b4_rline_max) yyrline[[]] = +static const b4_int_type_for([b4_rline]) yyrline[[]] = { b4_rline }; @@ -358,21 +413,23 @@ static const char *const yytname[[]] = }; #endif +# ifdef YYPRINT /* YYTOKNUM[[YYLEX-NUM]] -- Internal token number corresponding to token YYLEX-NUM. */ -static const short yytoknum[[]] = +static const b4_int_type_for([b4_toknum]) yytoknum[[]] = { b4_toknum }; +# endif /* YYR1[[YYN]] -- Symbol number of symbol that rule YYN derives. */ -static const b4_uint_type(b4_r1_max) yyr1[[]] = +static const b4_int_type_for([b4_r1]) yyr1[[]] = { b4_r1 }; /* YYR2[[YYN]] -- Number of symbols composing right hand side of rule YYN. */ -static const b4_uint_type(b4_r2_max) yyr2[[]] = +static const b4_int_type_for([b4_r2]) yyr2[[]] = { b4_r2 }; @@ -380,46 +437,49 @@ static const b4_uint_type(b4_r2_max) yyr2[[]] = /* YYDEFACT[[STATE-NAME]] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ -static const short yydefact[[]] = +static const b4_int_type_for([b4_defact]) yydefact[[]] = { b4_defact }; -/* YYPGOTO[[NTERM-NUM]]. */ -static const short yydefgoto[[]] = +/* YYDEFGOTO[[NTERM-NUM]]. */ +static const b4_int_type_for([b4_defgoto]) yydefgoto[[]] = { b4_defgoto }; /* YYPACT[[STATE-NUM]] -- Index in YYTABLE of the portion describing STATE-NUM. */ -static const short yypact[[]] = +#define YYPACT_NINF b4_pact_ninf +static const b4_int_type_for([b4_pact]) yypact[[]] = { b4_pact }; /* YYPGOTO[[NTERM-NUM]]. */ -static const short yypgoto[[]] = +static const b4_int_type_for([b4_pgoto]) yypgoto[[]] = { b4_pgoto }; /* YYTABLE[[YYPACT[STATE-NUM]]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. */ -static const short yytable[[]] = + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, parse error. */ +#define YYTABLE_NINF b4_table_ninf +static const b4_int_type_for([b4_table]) yytable[[]] = { b4_table }; -static const short yycheck[[]] = +static const b4_int_type_for([b4_check]) yycheck[[]] = { b4_check }; /* YYSTOS[[STATE-NUM]] -- The (internal number of the) accessing symbol of state STATE-NUM. */ -static const b4_uint_type(b4_stos_max) yystos[[]] = +static const b4_int_type_for([b4_stos]) yystos[[]] = { b4_stos }; @@ -469,7 +529,7 @@ do \ } \ else \ { \ - yyerror ("syntax error: cannot back up"); \ + yyerror ("syntax error: cannot back up"b4_pure_args); \ YYERROR; \ } \ while (0) @@ -490,13 +550,11 @@ while (0) /* YYLEX -- calling `yylex' with the right arguments. */ -b4_pure_if( -[#ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval[]b4_location_if([, &yylloc]), YYLEX_PARAM) +#ifdef YYLEX_PARAM +# define YYLEX yylex (b4_pure_if([&yylval[]b4_location_if([, &yylloc]), ])YYLEX_PARAM) #else -# define YYLEX yylex (&yylval[]b4_location_if([, &yylloc])) -#endif], -[#define YYLEX yylex ()]) +# define YYLEX b4_c_function_call([yylex], [int], b4_lex_param) +#endif /* Enable debugging if requested. */ #if YYDEBUG @@ -526,7 +584,7 @@ int yydebug; /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH -# define YYINITDEPTH b4_initdepth +# define YYINITDEPTH b4_stack_depth_init #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only @@ -541,7 +599,7 @@ int yydebug; #endif #ifndef YYMAXDEPTH -# define YYMAXDEPTH b4_maxdepth +# define YYMAXDEPTH b4_stack_depth_max #endif @@ -601,48 +659,87 @@ yystpcpy (yydest, yysrc) -/* The user can define YYPARSE_PARAM as the name of an argument to be passed - into yyparse. The argument should have type void *. - It should actually point to an object. - Grammar actions can access the variable by casting it - to the proper pointer type. */ +#if YYDEBUG +/*-----------------------------. +| Print this symbol on YYOUT. | +`-----------------------------*/ + +b4_c_function_def([yysymprint], + [static void], + [[FILE *yyout], [yyout]], + [[int yytype], [yytype]], + [[YYSTYPE yyvalue], [yyvalue]]b4_location_if([, + [[YYLTYPE yylocation], [yylocation]]])) +{ + /* Pacify ``unused variable'' warnings. */ + (void) yyvalue; +b4_location_if([ (void) yylocation; +])dnl + + if (yytype < YYNTOKENS) + { + YYFPRINTF (yyout, "token %s (", yytname[[yytype]]); +# ifdef YYPRINT + YYPRINT (yyout, yytoknum[[yytype]], yyvalue); +# endif + } + else + YYFPRINTF (yyout, "nterm %s (", yytname[[yytype]]); + + switch (yytype) + { +m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))dnl + default: + break; + } + YYFPRINTF (yyout, ")"); +} +#endif /* YYDEBUG. */ + + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +b4_c_function_def([yydestruct], + [static void], + [[int yytype], [yytype]], + [[YYSTYPE yyvalue], [yyvalue]]b4_location_if([, + [[YYLTYPE yylocation], [yylocation]]])) +{ + /* Pacify ``unused variable'' warnings. */ + (void) yyvalue; +b4_location_if([ (void) yylocation; +])dnl + + switch (yytype) + { +m4_map([b4_symbol_actions], m4_defn([b4_symbol_destructors]))dnl + default: + break; + } +} + + + +/* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM # if defined (__STDC__) || defined (__cplusplus) -# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM -# define YYPARSE_PARAM_DECL -# else -# define YYPARSE_PARAM_ARG YYPARSE_PARAM -# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; -# endif -#else /* !YYPARSE_PARAM */ -# define YYPARSE_PARAM_ARG -# define YYPARSE_PARAM_DECL -#endif /* !YYPARSE_PARAM */ - -/* Prevent warning if -Wstrict-prototypes. */ -#ifdef __GNUC__ -# ifdef YYPARSE_PARAM -int yyparse (void *); +int yyparse (void *YYPARSE_PARAM); # else -int yyparse (void); +int yyparse (); # endif +#else /* ! YYPARSE_PARAM */ +b4_c_function_decl([yyparse], [int], b4_parse_param) #endif -#if defined (__STDC__) || defined (__cplusplus) -static void yydestruct (int yytype, - YYSTYPE yyvalue[]b4_location_if([, YYLTYPE yylocation])); -# if YYDEBUG -static void yysymprint (FILE* out, int yytype, - YYSTYPE yyvalue[]b4_location_if([, YYLTYPE yylocation])); -# endif -#endif m4_divert_push([KILL])# ======================== M4 code. # b4_declare_parser_variables # --------------------------- # Declare the variables that are global, or local to YYPARSE if -# pure-parser +# pure-parser. m4_define([b4_declare_parser_variables], [/* The lookahead symbol. */ int yychar; @@ -660,9 +757,21 @@ m4_divert_pop([KILL])dnl# ====================== End of M4 code. b4_pure_if([], [b4_declare_parser_variables]) -int -yyparse (YYPARSE_PARAM_ARG) - YYPARSE_PARAM_DECL + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +# if defined (__STDC__) || defined (__cplusplus) +int yyparse (void *YYPARSE_PARAM) +# else +int yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +# endif +#else /* ! YYPARSE_PARAM */ +b4_c_function_def([yyparse], [int], b4_parse_param) +#endif {[ ]b4_pure_if([b4_declare_parser_variables])[ register int yystate; @@ -739,7 +848,7 @@ yyparse (YYPARSE_PARAM_ARG) yysetstate: *yyssp = yystate; - if (yyssp >= yyss + yystacksize - 1) + if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; @@ -771,10 +880,10 @@ yyparse (YYPARSE_PARAM_ARG) goto yyoverflowlab; # else /* Extend the stack our own way. */ - if (yystacksize >= YYMAXDEPTH) + if (YYMAXDEPTH <= yystacksize) goto yyoverflowlab; yystacksize *= 2; - if (yystacksize > YYMAXDEPTH) + if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { @@ -800,7 +909,7 @@ yyparse (YYPARSE_PARAM_ARG) YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); - if (yyssp >= yyss + yystacksize - 1) + if (yyss + yystacksize - 1 <= yyssp) YYABORT; } @@ -820,7 +929,7 @@ yybackup: /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yyn == YYFLAG) + if (yyn == YYPACT_NINF) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ @@ -854,28 +963,19 @@ yybackup: YYDPRINTF ((stderr, "\n")); } + /* If the proper action on seeing token YYCHAR1 is to reduce or to + detect an error, take that action. */ yyn += yychar1; - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yychar1) goto yydefault; - yyn = yytable[yyn]; - - /* yyn is what to do for this token type in this state. - Negative => reduce, -yyn is rule number. - Positive => shift, yyn is new state. - New state is final state => don't bother to shift, - just return success. - 0, or most negative number => error. */ - - if (yyn < 0) + if (yyn <= 0) { - if (yyn == YYFLAG) + if (yyn == 0 || yyn == YYTABLE_NINF) goto yyerrlab; yyn = -yyn; goto yyreduce; } - else if (yyn == 0) - goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; @@ -920,8 +1020,8 @@ yyreduce: /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. - Otherwise, the following line sets YYVAL to the semantic value of - the lookahead token. This behavior is undocumented and Bison + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ @@ -942,7 +1042,7 @@ yyreduce: yyn - 1, yyrline[yyn]); /* Print the symbols being reduced, and their result. */ - for (yyi = yyprhs[yyn]; yyrhs[yyi] >= 0; yyi++) + for (yyi = yyprhs[yyn]; 0 <= yyrhs[yyi]; yyi++) YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); } @@ -980,7 +1080,7 @@ yyreduce: yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; @@ -996,13 +1096,13 @@ yyerrlab: if (!yyerrstatus) { ++yynerrs; - #if YYERROR_VERBOSE yyn = yypact[yystate]; - if (yyn > YYFLAG && yyn < YYLAST) + if (YYPACT_NINF < yyn && yyn < YYLAST) { YYSIZE_T yysize = 0; + int yytype = YYTRANSLATE (yychar); char *yymsg; int yyx, yycount; @@ -1011,15 +1111,15 @@ yyerrlab: YYCHECK. */ for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) - if (yycheck[yyx + yyn] == yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) yysize += yystrlen (yytname[yyx]) + 15, yycount++; yysize += yystrlen ("parse error, unexpected ") + 1; - yysize += yystrlen (yytname[YYTRANSLATE (yychar)]); + yysize += yystrlen (yytname[yytype]); yymsg = (char *) YYSTACK_ALLOC (yysize); if (yymsg != 0) { char *yyp = yystpcpy (yymsg, "parse error, unexpected "); - yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]); + yyp = yystpcpy (yyp, yytname[yytype]); if (yycount < 5) { @@ -1027,7 +1127,7 @@ yyerrlab: for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) - if (yycheck[yyx + yyn] == yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { const char *yyq = ! yycount ? ", expecting " : " or "; yyp = yystpcpy (yyp, yyq); @@ -1035,15 +1135,15 @@ yyerrlab: yycount++; } } - yyerror (yymsg); + yyerror (yymsg]b4_pure_args[); YYSTACK_FREE (yymsg); - } - else - yyerror ("parse error; also virtual memory exhausted"); - } + } + else + yyerror ("parse error; also virtual memory exhausted"]b4_pure_args[); + } else #endif /* YYERROR_VERBOSE */ - yyerror ("parse error"); + yyerror ("parse error"]b4_pure_args[); } goto yyerrlab1; @@ -1063,7 +1163,7 @@ yyerrlab1: /* Pop the error token. */ YYPOPSTACK; /* Pop the rest of the stack. */ - while (yyssp > yyss) + while (yyss < yyssp) { YYDPRINTF ((stderr, "Error: popping ")); YYDSYMPRINT ((stderr, @@ -1090,7 +1190,7 @@ yyerrlab1: for (;;) { yyn = yypact[yystate]; - if (yyn != YYFLAG) + if (yyn != YYPACT_NINF) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) @@ -1158,7 +1258,7 @@ yyabortlab: | yyoverflowlab -- parser overflow comes here. | `----------------------------------------------*/ yyoverflowlab: - yyerror ("parser stack overflow"); + yyerror ("parser stack overflow"]b4_pure_args[); yyresult = 2; /* Fall through. */ #endif @@ -1172,67 +1272,17 @@ yyreturn: ]} -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -static void -yydestruct (int yytype, - YYSTYPE yyvalue[]b4_location_if([, YYLTYPE yylocation])) -{ - /* Pacify ``unused variable'' warnings. */ - (void) yyvalue; -b4_location_if([ (void) yylocation; -])dnl - - switch (yytype) - { -m4_map([b4_symbol_actions], m4_defn([b4_symbol_destructors]))dnl - default: - break; - } -} - - -#if YYDEBUG -/*-----------------------------. -| Print this symbol on YYOUT. | -`-----------------------------*/ - -static void -yysymprint (FILE* yyout, int yytype, - YYSTYPE yyvalue[]b4_location_if([, YYLTYPE yylocation])) -{ - /* Pacify ``unused variable'' warnings. */ - (void) yyvalue; -b4_location_if([ (void) yylocation; -])dnl - - if (yytype < YYNTOKENS) - { - YYFPRINTF (yyout, "token %s (", yytname[[yytype]]); -# ifdef YYPRINT - YYPRINT (yyout, yytoknum[[yytype]], yyvalue); -# endif - } - else - YYFPRINTF (yyout, "nterm %s (", yytname[[yytype]]); - - switch (yytype) - { -m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))dnl - default: - break; - } - YYFPRINTF (yyout, ")"); -} -#endif /* YYDEBUG. */ - b4_epilogue m4_if(b4_defines_flag, 0, [], -[b4_copyright([Skeleton parser for Yacc-like parsing with Bison], - [1984, 1989, 1990, 2000, 2001, 2002]) -#output "b4_output_header_name" +[#output "b4_output_header_name" +b4_copyright([Skeleton parser for Yacc-like parsing with Bison], + [1984, 1989, 1990, 2000, 2001, 2002]) + +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + #ifndef b4_header_guard # define b4_header_guard