style: reduce length of private constant

* data/skeletons/glr.c, data/skeletons/lalr1.cc, data/skeletons/yacc.c
(YYERROR_VERBOSE_ARGS_MAXIMUM): Rename as...
(YYARGS_MAX): this.
* src/parse-gram.y (YYERROR_VERBOSE_ARGS_MAXIMUM): Rename as...
(ARGS_MAX): this.
This commit is contained in:
Akim Demaille
2020-03-21 09:56:01 +01:00
parent e364bcdbc5
commit 1079595b2a
4 changed files with 13 additions and 14 deletions

View File

@@ -2198,18 +2198,18 @@ yyreportSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
[[ {
yybool yysize_overflow = yyfalse;
char* yymsg = YY_NULLPTR;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
enum { YYARGS_MAX = 5 };
/* Internationalized format string. */
const char *yyformat = YY_NULLPTR;
/* Arguments of yyformat: reported tokens (one for the "unexpected",
one per "expected"). */
yySymbol yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
yySymbol yyarg[YYARGS_MAX];
/* Cumulated lengths of YYARG. */
ptrdiff_t yysize = 0;
/* Actual size of YYARG. */
int yycount
= yysyntax_error_arguments (yystackp, yyarg, YYERROR_VERBOSE_ARGS_MAXIMUM);
= yysyntax_error_arguments (yystackp, yyarg, YYARGS_MAX);
if (yycount == -2)
yyMemoryExhausted (yystackp);

View File

@@ -1467,10 +1467,10 @@ b4_dollar_popdef])[]dnl
]b4_parser_class[::yysyntax_error_ (const context& yyctx) const
{
// Its maximum.
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
enum { YYARGS_MAX = 5 };
// Arguments of yyformat.
int yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
int yycount = yyctx.yysyntax_error_arguments (yyarg, YYERROR_VERBOSE_ARGS_MAXIMUM);
int yyarg[YYARGS_MAX];
int yycount = yyctx.yysyntax_error_arguments (yyarg, YYARGS_MAX);
char const* yyformat = YY_NULLPTR;
switch (yycount)

View File

@@ -1367,18 +1367,17 @@ static int
yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
const yyparse_context_t *yyctx)
{
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
enum { YYARGS_MAX = 5 };
/* Internationalized format string. */
const char *yyformat = YY_NULLPTR;
/* Arguments of yyformat: reported tokens (one for the "unexpected",
one per "expected"). */
int yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
int yyarg[YYARGS_MAX];
/* Cumulated lengths of YYARG. */
YYPTRDIFF_T yysize = 0;
/* Actual size of YYARG. */
int yycount
= yysyntax_error_arguments (yyctx, yyarg, YYERROR_VERBOSE_ARGS_MAXIMUM);
int yycount = yysyntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
if (yycount == -2)
return 2;