mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 08:43:03 +00:00
examples: use YYLOCATION_PRINT
* examples/c/bistromathic/parse.y, examples/c/glr/c++-types.y, * examples/c/lexcalc/parse.y: Don't use the private internal detail `YY_LOCATION_PRINT`, use `YYLOCATION_PRINT`.
This commit is contained in:
@@ -91,7 +91,7 @@
|
||||
|
||||
prog : %empty
|
||||
| prog stmt {
|
||||
YY_LOCATION_PRINT (stdout, @2);
|
||||
YYLOCATION_PRINT (stdout, &@2);
|
||||
fputs (": ", stdout);
|
||||
node_print (stdout, $2);
|
||||
putc ('\n', stdout);
|
||||
@@ -127,10 +127,10 @@ declarator
|
||||
%%
|
||||
|
||||
/* A C error reporting function. */
|
||||
static
|
||||
void yyerror (YYLTYPE const * const llocp, const char *msg)
|
||||
static void
|
||||
yyerror (YYLTYPE const * const loc, const char *msg)
|
||||
{
|
||||
YY_LOCATION_PRINT (stderr, *llocp);
|
||||
YYLOCATION_PRINT (stderr, loc);
|
||||
fprintf (stderr, ": %s\n", msg);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user