`"%code top" blocks' instead of `%code "top" blocks'.
* data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
Clean up whitespace in the output a little.
+2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ * data/bison.m4 (b4_percent_code_get): Output %code block comments like
+ `"%code top" blocks' instead of `%code "top" blocks'.
+ * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
+ Clean up whitespace in the output a little.
+
2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
Fix documentation problems reported by Tim Josling at
2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
Fix documentation problems reported by Tim Josling at
glr.cc has already defined b4_pure_flag.
* data/push.c: Define b4_pure_if based on `%define api.pure'.
Remove YYPUSH and YYPULL since they're back in b4_identification again.
glr.cc has already defined b4_pure_flag.
* data/push.c: Define b4_pure_if based on `%define api.pure'.
Remove YYPUSH and YYPULL since they're back in b4_identification again.
- * data/yacc.c Define b4_pure_if based on `%define api.pure'.
+ * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
* doc/bison.texinfo (Pure Decl): Update.
(Push Decl): Update.
(Decl Summary): Add api.pure to %define entry.
* doc/bison.texinfo (Pure Decl): Update.
(Push Decl): Update.
(Decl Summary): Add api.pure to %define entry.
-*- Autoconf -*-
# Language-independent M4 Macros for Bison.
-*- Autoconf -*-
# Language-independent M4 Macros for Bison.
-# Copyright (C) 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008 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
# 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
m4_ifval([$1], [m4_define([b4_percent_code_bison_qualifiers(]$1[)])])dnl
m4_ifdef(b4_macro_name,
[b4_comment([m4_if([$#], [0], [[Unqualified %code]],
m4_ifval([$1], [m4_define([b4_percent_code_bison_qualifiers(]$1[)])])dnl
m4_ifdef(b4_macro_name,
[b4_comment([m4_if([$#], [0], [[Unqualified %code]],
- [[%code "]$1["]])[ blocks.]])
+ [["%code ]$1["]])[ blocks.]])
b4_user_code([m4_indir(b4_macro_name)])
])dnl
m4_popdef([b4_macro_name])])
b4_user_code([m4_indir(b4_macro_name)])
])dnl
m4_popdef([b4_macro_name])])
# Yacc compatible skeleton for Bison
# Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
# Yacc compatible skeleton for Bison
# Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-# 2007 Free Software Foundation, Inc.
+# 2007, 2008 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
# 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
USER NAME SPACE" below. */
]b4_identification
USER NAME SPACE" below. */
]b4_identification
b4_percent_code_get([[top]])[]dnl
m4_if(b4_prefix, [yy], [],
[[/* Substitute the variable and function names. */
b4_percent_code_get([[top]])[]dnl
m4_if(b4_prefix, [yy], [],
[[/* Substitute the variable and function names. */
# define YYSTYPE_IS_TRIVIAL 1]])])[
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1]])])[
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
+#endif]b4_locations_if([[
-]b4_locations_if([#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
+#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
typedef struct YYLTYPE
{
int first_line;
typedef struct YYLTYPE
{
int first_line;
# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
# define YYLTYPE_IS_DECLARED 1
# define YYLTYPE_IS_TRIVIAL 1
# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
# define YYLTYPE_IS_DECLARED 1
# define YYLTYPE_IS_TRIVIAL 1
-b4_push_if([[#ifndef YYPUSH_DECLS
# define YYPUSH_DECLS
struct yypstate;
typedef struct yypstate yypstate;
# define YYPUSH_DECLS
struct yypstate;
typedef struct yypstate yypstate;
b4_c_function_decl([[yypstate_new]], [[yypstate *]], [[[void]], []])
b4_c_function_decl([[yypstate_delete]], [[void]],
[[[yypstate *yyps]], [[yyps]]])[
b4_c_function_decl([[yypstate_new]], [[yypstate *]], [[[void]], []])
b4_c_function_decl([[yypstate_delete]], [[void]],
[[[yypstate *yyps]], [[yyps]]])[
b4_percent_code_get([[provides]])[]dnl
[/* Copy the second part of user declarations. */
b4_percent_code_get([[provides]])[]dnl
[/* Copy the second part of user declarations. */
union yyalloc
{
yytype_int16 yyss_alloc;
union yyalloc
{
yytype_int16 yyss_alloc;
- YYSTYPE yyvs_alloc;
- ]b4_locations_if([ YYLTYPE yyls_alloc;
-])dnl
-[};
+ YYSTYPE yyvs_alloc;]b4_locations_if([
+ YYLTYPE yyls_alloc;])[
+};
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
- /* Three stacks and their tools:
- `yyss': related to states,
- `yyvs': related to semantic values,
- `yyls': related to locations.
+ /* The stacks and their tools:
+ `yyss': related to states.
+ `yyvs': related to semantic values.]b4_locations_if([[
+ `yyls': related to locations.]])[
Refer to the stacks thru separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
Refer to the stacks thru separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
#define yyerror_range yyps->yyerror_range
]])[#define yystacksize yyps->yystacksize
]])[
#define yyerror_range yyps->yyerror_range
]])[#define yystacksize yyps->yystacksize
]])[
/*-------------------------.
| yyparse or yypush_parse. |
`-------------------------*/
/*-------------------------.
| yyparse or yypush_parse. |
`-------------------------*/
]b4_push_if([
b4_c_function_def([[yypush_parse]], [[int]],
[[[yypstate *yyps]], [[yyps]]]b4_pure_if([,
]b4_push_if([
b4_c_function_def([[yypush_parse]], [[int]],
[[[yypstate *yyps]], [[yyps]]]b4_pure_if([,
[b4_declare_parser_state_variables])[
int yyn;
int yyresult;
[b4_declare_parser_state_variables])[
int yyn;
int yyresult;
- /* Look-ahead token as an internal (translated) token number. */
+ /* Lookahead token as an internal (translated) token number. */
int yytoken;
/* The variables used to return semantic value and location from the
action routines. */
int yytoken;
/* The variables used to return semantic value and location from the
action routines. */
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
yyssp = yyss;
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
yyssp = yyss;
- yyvsp = yyvs;
-]b4_locations_if([[ yylsp = yyls;
+ yyvsp = yyvs;]b4_locations_if([[
+ yylsp = yyls;
#if YYLTYPE_IS_TRIVIAL
/* Initialize the default location before parsing starts. */
yylloc.first_line = yylloc.last_line = ]b4_location_initial_line[;
yylloc.first_column = yylloc.last_column = ]b4_location_initial_column[;
#if YYLTYPE_IS_TRIVIAL
/* Initialize the default location before parsing starts. */
yylloc.first_line = yylloc.last_line = ]b4_location_initial_line[;
yylloc.first_column = yylloc.last_column = ]b4_location_initial_column[;
-#endif
-]])
-m4_ifdef([b4_initial_action], [
+#endif]])
+m4_ifdef([b4_initial_action],[
m4_pushdef([b4_at_dollar], [m4_define([b4_at_dollar_used])yylloc])dnl
m4_pushdef([b4_dollar_dollar], [m4_define([b4_dollar_dollar_used])yylval])dnl
/* User initialization code. */
m4_pushdef([b4_at_dollar], [m4_define([b4_at_dollar_used])yylloc])dnl
m4_pushdef([b4_dollar_dollar], [m4_define([b4_dollar_dollar_used])yylval])dnl
/* User initialization code. */
m4_ifdef([b4_dollar_dollar_used],[[ yyvsp[0] = yylval;
]])dnl
m4_ifdef([b4_at_dollar_used], [[ yylsp[0] = yylloc;
m4_ifdef([b4_dollar_dollar_used],[[ yyvsp[0] = yylval;
]])dnl
m4_ifdef([b4_at_dollar_used], [[ yylsp[0] = yylloc;
goto yysetstate;
/*------------------------------------------------------------.
goto yysetstate;
/*------------------------------------------------------------.
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
- yytype_int16 *yyss1 = yyss;
-]b4_locations_if([ YYLTYPE *yyls1 = yyls;])[
+ yytype_int16 *yyss1 = yyss;]b4_locations_if([
+ YYLTYPE *yyls1 = yyls;])[
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
be undefined if yyoverflow is a macro. */
yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
be undefined if yyoverflow is a macro. */
yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
-]b4_locations_if([ &yyls1, yysize * sizeof (*yylsp),])[
+ &yyvs1, yysize * sizeof (*yyvsp),]b4_locations_if([
+ &yyls1, yysize * sizeof (*yylsp),])[
-]b4_locations_if([ yyls = yyls1;])[
+]b4_locations_if([
+ yyls = yyls1;])[
yyss = yyss1;
yyvs = yyvs1;
}
yyss = yyss1;
yyvs = yyvs1;
}
if (! yyptr)
goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss_alloc, yyss);
if (! yyptr)
goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
-]b4_locations_if([ YYSTACK_RELOCATE (yyls_alloc, yyls);])[
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);]b4_locations_if([
+ YYSTACK_RELOCATE (yyls_alloc, yyls);])[
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
#endif /* no yyoverflow */
yyssp = yyss + yysize - 1;
#endif /* no yyoverflow */
yyssp = yyss + yysize - 1;
- yyvsp = yyvs + yysize - 1;
-]b4_locations_if([ yylsp = yyls + yysize - 1;])[
+ yyvsp = yyvs + yysize - 1;]b4_locations_if([
+ yylsp = yyls + yysize - 1;])[
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
yylen = 0;
YY_STACK_PRINT (yyss, yyssp);
yylen = 0;
YY_STACK_PRINT (yyss, yyssp);
- *++yyvsp = yyval;
-]b4_locations_if([ *++yylsp = yyloc;])[
+ *++yyvsp = yyval;]b4_locations_if([
+ *++yylsp = yyloc;])[
/* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
/* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
yyresult = 1;
goto yyreturn;
yyresult = 1;
goto yyreturn;
+#if !defined(yyoverflow) || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
]b4_pure_if([], [[extern YYLTYPE ]b4_prefix[lloc;]])
)dnl b4_locations_if
]b4_pure_if([], [[extern YYLTYPE ]b4_prefix[lloc;]])
)dnl b4_locations_if
-
-b4_push_if([[#ifndef YYPUSH_DECLS
+b4_push_if([[
+#ifndef YYPUSH_DECLS
# define YYPUSH_DECLS
struct ]b4_prefix[pstate;
typedef struct ]b4_prefix[pstate ]b4_prefix[pstate;
# define YYPUSH_DECLS
struct ]b4_prefix[pstate;
typedef struct ]b4_prefix[pstate ]b4_prefix[pstate;