mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 13:23:04 +00:00
* src/reader.h, src/reader.c (gram_error): ... can't get
yycontrol without making too strong assumptions on the parser itself. * src/output.c (prepare_tokens): Use the real 0th value of token_translations instead of `0'. * src/parse-gram.y (yyerror): Don't rely on yycontrol being visible here. * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc for the time being: %locations ought to provide it to yyerror.
This commit is contained in:
@@ -64,11 +64,11 @@ do { \
|
||||
correctly typed access to it. */
|
||||
#define yycontrol ((gram_control_t *) gram_control)
|
||||
|
||||
/* Request detailed parse error messages, and pass them to
|
||||
GRAM_ERROR. */
|
||||
/* Request detailed parse error messages, and pass them to GRAM_ERROR.
|
||||
FIXME: depends on the undocumented availability of YYLLOC.t */
|
||||
#undef yyerror
|
||||
#define yyerror(Msg) \
|
||||
gram_error (yycontrol, &yylloc, Msg)
|
||||
gram_error (&yylloc, Msg)
|
||||
|
||||
#define YYPRINT(File, Type, Value) \
|
||||
yyprint (File, Type, &Value)
|
||||
@@ -459,8 +459,7 @@ yyprint (FILE *file,
|
||||
}
|
||||
|
||||
void
|
||||
gram_error (gram_control_t *control ATTRIBUTE_UNUSED,
|
||||
location_t *yylloc, const char *msg)
|
||||
gram_error (location_t *yylloc, const char *msg)
|
||||
{
|
||||
complain_at (*yylloc, "%s", msg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user