mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 16:23:04 +00:00
c++: fix a few style issues
* data/skeletons/lalr1.cc (yystack_print_, yy_reduce_print_): Add missing const. (yystack_print_): Rename as... (yy_stack_print_): this. * data/skeletons/glr.cc (yy_symbol_value_print_, yy_symbol_print_): Add missing const.
This commit is contained in:
@@ -167,7 +167,7 @@ m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
|
|||||||
void
|
void
|
||||||
]b4_parser_class[::yy_symbol_value_print_ (symbol_kind_type yykind,
|
]b4_parser_class[::yy_symbol_value_print_ (symbol_kind_type yykind,
|
||||||
const semantic_type* yyvaluep]b4_locations_if([[,
|
const semantic_type* yyvaluep]b4_locations_if([[,
|
||||||
const location_type* yylocationp]])[)
|
const location_type* yylocationp]])[) const
|
||||||
{]b4_locations_if([[
|
{]b4_locations_if([[
|
||||||
YYUSE (yylocationp);]])[
|
YYUSE (yylocationp);]])[
|
||||||
YYUSE (yyvaluep);
|
YYUSE (yyvaluep);
|
||||||
@@ -181,7 +181,7 @@ m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
|
|||||||
void
|
void
|
||||||
]b4_parser_class[::yy_symbol_print_ (symbol_kind_type yykind,
|
]b4_parser_class[::yy_symbol_print_ (symbol_kind_type yykind,
|
||||||
const semantic_type* yyvaluep]b4_locations_if([[,
|
const semantic_type* yyvaluep]b4_locations_if([[,
|
||||||
const location_type* yylocationp]])[)
|
const location_type* yylocationp]])[) const
|
||||||
{
|
{
|
||||||
*yycdebug_ << (yykind < YYNTOKENS ? "token" : "nterm")
|
*yycdebug_ << (yykind < YYNTOKENS ? "token" : "nterm")
|
||||||
<< ' ' << yytname[yykind] << " ("]b4_locations_if([[
|
<< ' ' << yytname[yykind] << " ("]b4_locations_if([[
|
||||||
@@ -317,16 +317,16 @@ b4_percent_code_get([[requires]])[
|
|||||||
/// \param yylocationp Its location.]])[
|
/// \param yylocationp Its location.]])[
|
||||||
virtual void yy_symbol_value_print_ (symbol_kind_type yykind,
|
virtual void yy_symbol_value_print_ (symbol_kind_type yykind,
|
||||||
const semantic_type* yyvaluep]b4_locations_if([[,
|
const semantic_type* yyvaluep]b4_locations_if([[,
|
||||||
const location_type* yylocationp]])[);
|
const location_type* yylocationp]])[) const;
|
||||||
/// \brief Report a symbol on the debug stream.
|
/// \brief Report a symbol on the debug stream.
|
||||||
/// \param yykind The symbol kind.
|
/// \param yykind The symbol kind.
|
||||||
/// \param yyvaluep Its semantic value.]b4_locations_if([[
|
/// \param yyvaluep Its semantic value.]b4_locations_if([[
|
||||||
/// \param yylocationp Its location.]])[
|
/// \param yylocationp Its location.]])[
|
||||||
virtual void yy_symbol_print_ (symbol_kind_type yykind,
|
virtual void yy_symbol_print_ (symbol_kind_type yykind,
|
||||||
const semantic_type* yyvaluep]b4_locations_if([[,
|
const semantic_type* yyvaluep]b4_locations_if([[,
|
||||||
const location_type* yylocationp]])[);
|
const location_type* yylocationp]])[) const;
|
||||||
private:
|
private:
|
||||||
// Debugging.
|
/// Debug stream.
|
||||||
std::ostream* yycdebug_;
|
std::ostream* yycdebug_;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -331,9 +331,9 @@ m4_define([b4_shared_declarations],
|
|||||||
]b4_integral_parser_table_declare([rline], [b4_rline],
|
]b4_integral_parser_table_declare([rline], [b4_rline],
|
||||||
[[YYRLINE[YYN] -- Source line where rule number YYN was defined.]])[
|
[[YYRLINE[YYN] -- Source line where rule number YYN was defined.]])[
|
||||||
/// Report on the debug stream that the rule \a r is going to be reduced.
|
/// Report on the debug stream that the rule \a r is going to be reduced.
|
||||||
virtual void yy_reduce_print_ (int r);
|
virtual void yy_reduce_print_ (int r) const;
|
||||||
/// Print the state stack on the debug stream.
|
/// Print the state stack on the debug stream.
|
||||||
virtual void yystack_print_ ();
|
virtual void yy_stack_print_ () const;
|
||||||
|
|
||||||
/// Debugging level.
|
/// Debugging level.
|
||||||
int yydebug_;
|
int yydebug_;
|
||||||
@@ -567,7 +567,7 @@ m4_if(b4_prefix, [yy], [],
|
|||||||
# define YY_STACK_PRINT() \
|
# define YY_STACK_PRINT() \
|
||||||
do { \
|
do { \
|
||||||
if (yydebug_) \
|
if (yydebug_) \
|
||||||
yystack_print_ (); \
|
yy_stack_print_ (); \
|
||||||
} while (false)
|
} while (false)
|
||||||
|
|
||||||
#else // !]b4_api_PREFIX[DEBUG
|
#else // !]b4_api_PREFIX[DEBUG
|
||||||
@@ -1538,7 +1538,7 @@ b4_dollar_popdef])[]dnl
|
|||||||
]b4_integral_parser_table_define([rline], [b4_rline])[
|
]b4_integral_parser_table_define([rline], [b4_rline])[
|
||||||
|
|
||||||
void
|
void
|
||||||
]b4_parser_class[::yystack_print_ ()
|
]b4_parser_class[::yy_stack_print_ () const
|
||||||
{
|
{
|
||||||
*yycdebug_ << "Stack now";
|
*yycdebug_ << "Stack now";
|
||||||
for (stack_type::const_iterator
|
for (stack_type::const_iterator
|
||||||
@@ -1550,7 +1550,7 @@ b4_dollar_popdef])[]dnl
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
]b4_parser_class[::yy_reduce_print_ (int yyrule)
|
]b4_parser_class[::yy_reduce_print_ (int yyrule) const
|
||||||
{
|
{
|
||||||
int yylno = yyrline_[yyrule];
|
int yylno = yyrline_[yyrule];
|
||||||
int yynrhs = yyr2_[yyrule];
|
int yynrhs = yyr2_[yyrule];
|
||||||
|
|||||||
Reference in New Issue
Block a user