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

@@ -801,14 +801,14 @@ epilogue.opt:
int
yyreport_syntax_error (const yyparse_context_t *ctx)
{
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
enum { ARGS_MAX = 5 };
/* Arguments of format: reported tokens (one for the "unexpected",
one per "expected"). */
int arg[YYERROR_VERBOSE_ARGS_MAXIMUM];
int n = yysyntax_error_arguments (ctx, arg, YYERROR_VERBOSE_ARGS_MAXIMUM);
int arg[ARGS_MAX];
int n = yysyntax_error_arguments (ctx, arg, ARGS_MAX);
if (n == -2)
return 2;
const char *argv[YYERROR_VERBOSE_ARGS_MAXIMUM];
const char *argv[ARGS_MAX];
for (int i = 0; i < n; ++i)
argv[i] = yysymbol_name (arg[i]);
syntax_error (*yyparse_context_location (ctx), n, argv);