style: rename yysyntax_error_arguments as yy_syntax_error_arguments

It's a private implementation detail.

* NEWS, data/skeletons/glr.c, data/skeletons/lalr1.cc,
* data/skeletons/yacc.c, doc/bison.texi: here.
This commit is contained in:
Akim Demaille
2020-04-04 19:28:30 +02:00
parent 76e11b5a3e
commit 4e26809ab9
5 changed files with 14 additions and 14 deletions

2
NEWS
View File

@@ -41,7 +41,7 @@ GNU Bison NEWS
{
enum { ARGMAX = 10 };
int arg[ARGMAX];
int n = yysyntax_error_arguments (ctx, arg, ARGMAX);
int n = yy_syntax_error_arguments (ctx, arg, ARGMAX);
if (n == -2)
return 2; // Memory exhausted.
YY_LOCATION_PRINT (stderr, *yypcontext_location (ctx));

View File

@@ -2151,7 +2151,7 @@ yypcontext_location (const yyGLRStack *yystackp)
}]])],
[detailed\|verbose],
[[static int
yysyntax_error_arguments (const yyGLRStack* yystackp,
yy_syntax_error_arguments (const yyGLRStack* yystackp,
yysymbol_type_t yyarg[], int yyargn)
{
yysymbol_type_t yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
@@ -2225,7 +2225,7 @@ yyreportSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
/* Actual size of YYARG. */
int yycount
= yysyntax_error_arguments (yystackp, yyarg, YYARGS_MAX);
= yy_syntax_error_arguments (yystackp, yyarg, YYARGS_MAX);
if (yycount == YYNOMEM)
yyMemoryExhausted (yystackp);

View File

@@ -279,7 +279,7 @@ m4_define([b4_shared_declarations],
void yyreport_syntax_error (const context& yyctx) const;]],
[detailed\|verbose], [[
/// The arguments of the error message.
int yysyntax_error_arguments_ (const context& yyctx,
int yy_syntax_error_arguments_ (const context& yyctx,
symbol_type_type yyarg[], int yyargn) const;
/// Generate an error message.
@@ -1422,7 +1422,7 @@ b4_dollar_popdef])[]dnl
}]])b4_parse_error_bmatch([detailed\|verbose], [[
int
]b4_parser_class[::yysyntax_error_arguments_ (const context& yyctx,
]b4_parser_class[::yy_syntax_error_arguments_ (const context& yyctx,
symbol_type_type yyarg[], int yyargn) const
{
/* There are many possibilities here to consider:
@@ -1473,7 +1473,7 @@ b4_dollar_popdef])[]dnl
enum { YYARGS_MAX = 5 };
// Arguments of yyformat.
symbol_type_type yyarg[YYARGS_MAX];
int yycount = yysyntax_error_arguments_ (yyctx, yyarg, YYARGS_MAX);
int yycount = yy_syntax_error_arguments_ (yyctx, yyarg, YYARGS_MAX);
char const* yyformat = YY_NULLPTR;
switch (yycount)

View File

@@ -1323,7 +1323,7 @@ yytnamerr (char *yyres, const char *yystr)
]])[
static int
yysyntax_error_arguments (const yypcontext_t *yyctx,
yy_syntax_error_arguments (const yypcontext_t *yyctx,
yysymbol_type_t yyarg[], int yyargn)
{
/* Actual size of YYARG. */
@@ -1396,7 +1396,7 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
YYPTRDIFF_T yysize = 0;
/* Actual size of YYARG. */
int yycount = yysyntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
if (yycount == YYNOMEM)
return YYNOMEM;

View File

@@ -7408,7 +7408,7 @@ The location of the syntax error.
@end deftypefun
@deftypefun int yysyntax_error_arguments (@code{const yypcontext_t *}ctx, @code{int} @var{argv}@code{[]}, @code{int} @var{argc})
@deftypefun int yy_syntax_error_arguments (@code{const yypcontext_t *}ctx, @code{int} @var{argv}@code{[]}, @code{int} @var{argc})
Fill @var{argv} with first the internal number of the token that caused the
error, then the internal numbers of the expected tokens. Never put more
than @var{argc} elements into @var{argv}, and on success return the
@@ -7432,7 +7432,7 @@ yyreport_syntax_error (const yypcontext_t *ctx)
@{
enum @{ ARGMAX = 10 @};
int arg[ARGMAX];
int n = yysyntax_error_arguments (ctx, arg, ARGMAX);
int n = yy_syntax_error_arguments (ctx, arg, ARGMAX);
if (n == -2)
return 2;
fprintf (stderr, "syntax error");