mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
yysyntax_error: more preparation for readability of next patch.
There are no behavioral changes here.
* data/glr.c (yyreportSyntaxError): Reorganize.
* data/lalr1.cc (yy::parser::yysyntax_error_): Reorganize.
* tests/conflicts.at (%error-verbose and consistent errors):
Reorganize.
(cherry picked from commit 25a648d8a6)
Conflicts:
tests/conflicts.at
This commit is contained in:
@@ -846,8 +846,8 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param))[;
|
||||
]b4_parser_class_name[::yysyntax_error_ (]dnl
|
||||
b4_error_verbose_if([int yystate, int yytoken],
|
||||
[int, int])[)
|
||||
{
|
||||
std::string yyres;]b4_error_verbose_if([[
|
||||
{]b4_error_verbose_if([[
|
||||
std::string yyres;
|
||||
int yyn = yypact_[yystate];
|
||||
if (yypact_ninf_ < yyn && yyn <= yylast_)
|
||||
{
|
||||
@@ -907,9 +907,9 @@ b4_error_verbose_if([int yystate, int yytoken],
|
||||
yyres += *yyp;
|
||||
}
|
||||
else
|
||||
]])dnl
|
||||
[ yyres = YY_("syntax error");
|
||||
return yyres;
|
||||
yyres = YY_("syntax error");
|
||||
return yyres;]], [[
|
||||
return YY_("syntax error");]])[
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user