mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +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:
@@ -282,10 +282,10 @@ yylex (const char **line, YYSTYPE *yylval, YYLTYPE *yylloc)
|
||||
`---------*/
|
||||
|
||||
int
|
||||
yyreport_syntax_error (const yyparse_context_t *ctx)
|
||||
yyreport_syntax_error (const yypcontext_t *ctx)
|
||||
{
|
||||
int res = 0;
|
||||
YY_LOCATION_PRINT (stderr, *yyparse_context_location (ctx));
|
||||
YY_LOCATION_PRINT (stderr, *yypcontext_location (ctx));
|
||||
fprintf (stderr, ": syntax error");
|
||||
{
|
||||
enum { TOKENMAX = 10 };
|
||||
@@ -300,7 +300,7 @@ yyreport_syntax_error (const yyparse_context_t *ctx)
|
||||
i == 0 ? ": expected" : " or", yysymbol_name (expected[i]));
|
||||
}
|
||||
{
|
||||
yysymbol_type_t lookahead = yyparse_context_token (ctx);
|
||||
yysymbol_type_t lookahead = yypcontext_token (ctx);
|
||||
if (lookahead != YYEMPTY)
|
||||
fprintf (stderr, " before %s", yysymbol_name (lookahead));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user