mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-20 17:53:02 +00:00
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:
2
NEWS
2
NEWS
@@ -41,7 +41,7 @@ GNU Bison NEWS
|
|||||||
{
|
{
|
||||||
enum { ARGMAX = 10 };
|
enum { ARGMAX = 10 };
|
||||||
int arg[ARGMAX];
|
int arg[ARGMAX];
|
||||||
int n = yysyntax_error_arguments (ctx, arg, ARGMAX);
|
int n = yy_syntax_error_arguments (ctx, arg, ARGMAX);
|
||||||
if (n == -2)
|
if (n == -2)
|
||||||
return 2; // Memory exhausted.
|
return 2; // Memory exhausted.
|
||||||
YY_LOCATION_PRINT (stderr, *yypcontext_location (ctx));
|
YY_LOCATION_PRINT (stderr, *yypcontext_location (ctx));
|
||||||
|
|||||||
@@ -2151,8 +2151,8 @@ yypcontext_location (const yyGLRStack *yystackp)
|
|||||||
}]])],
|
}]])],
|
||||||
[detailed\|verbose],
|
[detailed\|verbose],
|
||||||
[[static int
|
[[static int
|
||||||
yysyntax_error_arguments (const yyGLRStack* yystackp,
|
yy_syntax_error_arguments (const yyGLRStack* yystackp,
|
||||||
yysymbol_type_t yyarg[], int yyargn)
|
yysymbol_type_t yyarg[], int yyargn)
|
||||||
{
|
{
|
||||||
yysymbol_type_t yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
|
yysymbol_type_t yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
|
||||||
/* Actual size of YYARG. */
|
/* Actual size of YYARG. */
|
||||||
@@ -2225,7 +2225,7 @@ yyreportSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
|
|||||||
|
|
||||||
/* Actual size of YYARG. */
|
/* Actual size of YYARG. */
|
||||||
int yycount
|
int yycount
|
||||||
= yysyntax_error_arguments (yystackp, yyarg, YYARGS_MAX);
|
= yy_syntax_error_arguments (yystackp, yyarg, YYARGS_MAX);
|
||||||
if (yycount == YYNOMEM)
|
if (yycount == YYNOMEM)
|
||||||
yyMemoryExhausted (yystackp);
|
yyMemoryExhausted (yystackp);
|
||||||
|
|
||||||
|
|||||||
@@ -279,8 +279,8 @@ m4_define([b4_shared_declarations],
|
|||||||
void yyreport_syntax_error (const context& yyctx) const;]],
|
void yyreport_syntax_error (const context& yyctx) const;]],
|
||||||
[detailed\|verbose], [[
|
[detailed\|verbose], [[
|
||||||
/// The arguments of the error message.
|
/// 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;
|
symbol_type_type yyarg[], int yyargn) const;
|
||||||
|
|
||||||
/// Generate an error message.
|
/// Generate an error message.
|
||||||
/// \param yyctx the context in which the error occurred.
|
/// \param yyctx the context in which the error occurred.
|
||||||
@@ -1422,8 +1422,8 @@ b4_dollar_popdef])[]dnl
|
|||||||
}]])b4_parse_error_bmatch([detailed\|verbose], [[
|
}]])b4_parse_error_bmatch([detailed\|verbose], [[
|
||||||
|
|
||||||
int
|
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
|
symbol_type_type yyarg[], int yyargn) const
|
||||||
{
|
{
|
||||||
/* There are many possibilities here to consider:
|
/* There are many possibilities here to consider:
|
||||||
- If this state is a consistent state with a default action, then
|
- If this state is a consistent state with a default action, then
|
||||||
@@ -1473,7 +1473,7 @@ b4_dollar_popdef])[]dnl
|
|||||||
enum { YYARGS_MAX = 5 };
|
enum { YYARGS_MAX = 5 };
|
||||||
// Arguments of yyformat.
|
// Arguments of yyformat.
|
||||||
symbol_type_type yyarg[YYARGS_MAX];
|
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;
|
char const* yyformat = YY_NULLPTR;
|
||||||
switch (yycount)
|
switch (yycount)
|
||||||
|
|||||||
@@ -1323,8 +1323,8 @@ yytnamerr (char *yyres, const char *yystr)
|
|||||||
]])[
|
]])[
|
||||||
|
|
||||||
static int
|
static int
|
||||||
yysyntax_error_arguments (const yypcontext_t *yyctx,
|
yy_syntax_error_arguments (const yypcontext_t *yyctx,
|
||||||
yysymbol_type_t yyarg[], int yyargn)
|
yysymbol_type_t yyarg[], int yyargn)
|
||||||
{
|
{
|
||||||
/* Actual size of YYARG. */
|
/* Actual size of YYARG. */
|
||||||
int yycount = 0;
|
int yycount = 0;
|
||||||
@@ -1396,7 +1396,7 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
|
|||||||
YYPTRDIFF_T yysize = 0;
|
YYPTRDIFF_T yysize = 0;
|
||||||
|
|
||||||
/* Actual size of YYARG. */
|
/* 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)
|
if (yycount == YYNOMEM)
|
||||||
return YYNOMEM;
|
return YYNOMEM;
|
||||||
|
|
||||||
|
|||||||
@@ -7408,7 +7408,7 @@ The location of the syntax error.
|
|||||||
@end deftypefun
|
@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
|
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
|
error, then the internal numbers of the expected tokens. Never put more
|
||||||
than @var{argc} elements into @var{argv}, and on success return the
|
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 @};
|
enum @{ ARGMAX = 10 @};
|
||||||
int arg[ARGMAX];
|
int arg[ARGMAX];
|
||||||
int n = yysyntax_error_arguments (ctx, arg, ARGMAX);
|
int n = yy_syntax_error_arguments (ctx, arg, ARGMAX);
|
||||||
if (n == -2)
|
if (n == -2)
|
||||||
return 2;
|
return 2;
|
||||||
fprintf (stderr, "syntax error");
|
fprintf (stderr, "syntax error");
|
||||||
|
|||||||
Reference in New Issue
Block a user