mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-20 17:53:02 +00:00
tests: handle locations in the generic yyerror functions.
* tests/local.at (AT_YYERROR_DECLARE_EXTERN, AT_YYERROR_DECLARE) (AT_YYERROR_DEFINE): Handle locations for C and C++. * tests/calc.at: Use it for C++ (as C has extra arguments which are not yet handled by AT_BISON_OPTION_PUSHDEFS). * tests/actions.at: Adjust.
This commit is contained in:
@@ -376,15 +376,7 @@ power (int base, int exponent)
|
||||
return o;
|
||||
}
|
||||
]])
|
||||
|
||||
/* A C++ error reporting function. */
|
||||
void
|
||||
AT_NAME_PREFIX::parser::error (const location_type& l, const std::string& m)
|
||||
{
|
||||
(void) l;
|
||||
std::cerr << AT_LOCATION_IF([l << ": " << ])m << std::endl;
|
||||
}
|
||||
],
|
||||
AT_YYERROR_DEFINE],
|
||||
[/* A C error reporting function. */
|
||||
static void
|
||||
yyerror (AT_YYERROR_ARG_LOC_IF([YYLTYPE *llocp, ])
|
||||
|
||||
Reference in New Issue
Block a user