From 4e03e2015c9193c7150287474ff4b0403c35b3d3 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 25 Aug 2003 10:35:38 +0000 Subject: [PATCH] * doc/bison.texinfo: Don't promote stdout for error messages. --- ChangeLog | 4 ++++ doc/bison.texinfo | 18 +++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 15bccb4d..d17f18a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2003-08-25 Akim Demaille + + * doc/bison.texinfo: Don't promote stdout for error messages. + 2003-08-25 Akim Demaille * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi. diff --git a/doc/bison.texinfo b/doc/bison.texinfo index 536b2cba..b316d430 100644 --- a/doc/bison.texinfo +++ b/doc/bison.texinfo @@ -1415,7 +1415,7 @@ here is the definition we will use: void yyerror (char const *s) @{ - printf ("%s\n", s); + fprintf (stderr, "%s\n", s); @} @end group @end example @@ -3082,8 +3082,6 @@ Though grammar rules and semantic actions are enough to write a fully functional parser, it can be useful to process some additional information, especially symbol locations. -@c (terminal or not) ? - The way locations are handled is defined by providing a data type, and actions to take when rules are matched. @@ -3148,9 +3146,10 @@ exp: @dots{} else @{ $$ = 1; - printf("Division by zero, l%d,c%d-l%d,c%d", - @@3.first_line, @@3.first_column, - @@3.last_line, @@3.last_column); + fprintf (stderr, + "Division by zero, l%d,c%d-l%d,c%d", + @@3.first_line, @@3.first_column, + @@3.last_line, @@3.last_column); @} @} @end group @@ -3174,9 +3173,10 @@ exp: @dots{} else @{ $$ = 1; - printf("Division by zero, l%d,c%d-l%d,c%d", - @@3.first_line, @@3.first_column, - @@3.last_line, @@3.last_column); + fprintf (stderr, + "Division by zero, l%d,c%d-l%d,c%d", + @@3.first_line, @@3.first_column, + @@3.last_line, @@3.last_column); @} @} @end group -- 2.45.2