mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 06:43:03 +00:00
c: rename yyparse_context_t as yypcontext_t
The first name is too long. We already have `yypstate`, so `yypcontext` is ok. We are also migrating to using `*_t` for our types. * NEWS, data/skeletons/glr.c, data/skeletons/yacc.c, doc/bison.texi, * examples/c/bistromathic/parse.y, src/parse-gram.y, tests/local.at: (yyparse_context_t, yyparse_context_location, yyparse_context_token): Rename as... (yypcontext_t, yypcontext_location, yypcontext_token): these.
This commit is contained in:
@@ -799,7 +799,7 @@ epilogue.opt:
|
||||
%%
|
||||
|
||||
int
|
||||
yyreport_syntax_error (const yyparse_context_t *ctx)
|
||||
yyreport_syntax_error (const yypcontext_t *ctx)
|
||||
{
|
||||
int res = 0;
|
||||
/* Arguments of format: reported tokens (one for the "unexpected",
|
||||
@@ -807,7 +807,7 @@ yyreport_syntax_error (const yyparse_context_t *ctx)
|
||||
enum { ARGS_MAX = 5 };
|
||||
const char *argv[ARGS_MAX];
|
||||
int argc = 0;
|
||||
yysymbol_type_t unexpected = yyparse_context_token (ctx);
|
||||
yysymbol_type_t unexpected = yypcontext_token (ctx);
|
||||
if (unexpected != YYSYMBOL_YYEMPTY)
|
||||
{
|
||||
argv[argc++] = yysymbol_name (unexpected);
|
||||
@@ -819,7 +819,7 @@ yyreport_syntax_error (const yyparse_context_t *ctx)
|
||||
for (int i = 0; i < nexpected; ++i)
|
||||
argv[argc++] = yysymbol_name (expected[i]);
|
||||
}
|
||||
syntax_error (*yyparse_context_location (ctx), argc, argv);
|
||||
syntax_error (*yypcontext_location (ctx), argc, argv);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user