# C++ skeleton for Bison
-# Copyright (C) 2002-2011 Free Software Foundation, Inc.
+# Copyright (C) 2002-2012 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
m4_pushdef([b4_copyright_years],
- [2002-2011])
+ [2002-2012])
m4_define([b4_parser_class_name],
[b4_percent_define_get([[parser_class_name]])])
yyfinal_ = ]b4_final_state_number[, //< Termination state number.
yyterror_ = 1,
yyerrcode_ = 256,
- yyntokens_ = ]b4_tokens_number[, //< Number of tokens.
+ yyntokens_ = ]b4_tokens_number[ //< Number of tokens.
};
]b4_parse_param_vars[
} \
} while (false)
-# define YY_REDUCE_PRINT(Rule) \
- do { \
+# define YY_REDUCE_PRINT(Rule) \
+ do { \
if (yydebug_) \
- yy_reduce_print_ (Rule); \
+ yy_reduce_print_ (Rule); \
} while (false)
-# define YY_STACK_PRINT() \
- do { \
+# define YY_STACK_PRINT() \
+ do { \
if (yydebug_) \
yystack_print_ (); \
} while (false)
{
]b4_symbol_foreach([b4_symbol_printer])dnl
[ default:
- break;
+ break;
}
yyo << ')';
}
[ yyla = b4_c_function_call([yylex], [symbol_type],
m4_ifdef([b4_lex_param], b4_lex_param));],
[ yyla.type = yytranslate_ (b4_c_function_call([yylex], [int],
- [[YYSTYPE*], [&yyla.value]][]dnl
+ [[YYSTYPE*], [&yyla.value]][]dnl
b4_locations_if([, [[location*], [&yyla.location]]])dnl
m4_ifdef([b4_lex_param], [, ]b4_lex_param)));])[
yyempty = false;
yyn = yytable_[yyn];
if (yyn <= 0)
{
- if (yy_table_value_is_error_ (yyn))
- goto yyerrlab;
- yyn = -yyn;
- goto yyreduce;
+ if (yy_table_value_is_error_ (yyn))
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
}
/* Discard the token being shifted. */
switch (yyn)
{
]b4_user_actions[
- default:
+ default:
break;
}
}
/* If not already recovering from an error, report this error. */
if (!yyerrstatus_)
{
- ++yynerrs_;
- error (]b4_args(b4_locations_if([yyla.location]),
+ ++yynerrs_;
+ error (]b4_args(b4_locations_if([yyla.location]),
[[yysyntax_error_ (yystack_[0].state,
yyempty ? yyempty_ : yyla.type)]])[);
}
yyerror_range[1].location = yyla.location;]])[
if (yyerrstatus_ == 3)
{
- /* If just tried and failed to reuse lookahead token after an
+ /* If just tried and failed to reuse lookahead token after an
error, discard it. */
/* Return failure if at end of input. */
{
yy_destroy_ ("Error: discarding", yyla);
yyempty = true;
- }
+ }
}
/* Else will try to reuse lookahead token after shifting the error
| yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
yyerrlab1:
- yyerrstatus_ = 3; /* Each real token shifted decrements this. */
+ yyerrstatus_ = 3; /* Each real token shifted decrements this. */
{
stack_symbol_type error_token;
for (;;)
yypop_ (yylen);
while (yystack_.size () != 1)
{
- yy_destroy_ ("Cleanup: popping", yystack_[0]);
- yypop_ ();
+ yy_destroy_ ("Cleanup: popping", yystack_[0]);
+ yypop_ ();
}
return yyresult;
for (stack_type::const_iterator
i = yystack_.begin (),
i_end = yystack_.end ();
- i != i_end; ++i)
+ i != i_end; ++i)
*yycdebug_ << ' ' << i->state;
*yycdebug_ << std::endl;
}
int yynrhs = yyr2_[yyrule];
/* Print the symbols being reduced, and their result. */
*yycdebug_ << "Reducing stack by rule " << yyrule - 1
- << " (line " << yylno << "):" << std::endl;
+ << " (line " << yylno << "):" << std::endl;
/* The symbols being reduced. */
for (int yyi = 0; yyi < yynrhs; yyi++)
YY_SYMBOL_PRINT (" $" << yyi + 1 << " =",