summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
fab5b11)
The ISO C++ standard is extremely clear about it: stderr is
considered a macro, not a regular symbol (see table 94 `Header
<cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
Therefore std:: does not apply to it. It still does with fprintf.
Also, s/cstdio.h/cstdio/.
+2002-01-03 Akim Demaille <akim@epita.fr>
+
+ * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
+ The ISO C++ standard is extremely clear about it: stderr is
+ considered a macro, not a regular symbol (see table 94 `Header
+ <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
+ Therefore std:: does not apply to it. It still does with fprintf.
+ Also, s/cstdio.h/cstdio/.
+
2002-01-03 Akim Demaille <akim@epita.fr>
* lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
2002-01-03 Akim Demaille <akim@epita.fr>
* lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
# ifndef YYFPRINTF
# ifdef __cplusplus
# ifndef YYFPRINTF
# ifdef __cplusplus
-# include <cstdio.h> /* INFRINGES ON USER NAME SPACE */
+# include <cstdio> /* INFRINGES ON USER NAME SPACE */
# else
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
# endif
# define YYFPRINTF YYSTD (fprintf)
# else
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
# endif
# define YYFPRINTF YYSTD (fprintf)
-# define YYSTDERR YYSTD (stderr)
# endif
# define YYDPRINTF(Args) \
# endif
# define YYDPRINTF(Args) \
- YYDPRINTF ((YYSTDERR, "Starting parse\n"));
+ YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yystate = 0;
yyerrstatus = 0;
yylsp = yyls + yysize - 1;
#endif
yylsp = yyls + yysize - 1;
#endif
- YYDPRINTF ((YYSTDERR, "Stack size increased to %lu\n",
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
if (yyssp >= yyss + yystacksize - 1)
YYABORT;
}
(unsigned long int) yystacksize));
if (yyssp >= yyss + yystacksize - 1)
YYABORT;
}
- YYDPRINTF ((YYSTDERR, "Entering state %d\n", yystate));
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
- YYDPRINTF ((YYSTDERR, "Reading a token: "));
+ YYDPRINTF ((stderr, "Reading a token: "));
yychar1 = 0;
yychar = YYEOF; /* Don't call YYLEX any more. */
yychar1 = 0;
yychar = YYEOF; /* Don't call YYLEX any more. */
- YYDPRINTF ((YYSTDERR, "Now at end of input.\n"));
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
which are defined only if `YYDEBUG' is set. */
if (yydebug)
{
which are defined only if `YYDEBUG' is set. */
if (yydebug)
{
- YYFPRINTF (YYSTDERR, "Next token is %d (%s",
+ YYFPRINTF (stderr, "Next token is %d (%s",
yychar, yytname[yychar1]);
/* Give the individual parser a way to print the precise
meaning of a token, for further debugging info. */
# ifdef YYPRINT
yychar, yytname[yychar1]);
/* Give the individual parser a way to print the precise
meaning of a token, for further debugging info. */
# ifdef YYPRINT
- YYPRINT (YYSTDERR, yychar, yylval);
+ YYPRINT (stderr, yychar, yylval);
- YYFPRINTF (YYSTDERR, ")\n");
+ YYFPRINTF (stderr, ")\n");
YYACCEPT;
/* Shift the lookahead token. */
YYACCEPT;
/* Shift the lookahead token. */
- YYDPRINTF ((YYSTDERR, "Shifting token %d (%s), ",
+ YYDPRINTF ((stderr, "Shifting token %d (%s), ",
yychar, yytname[yychar1]));
/* Discard the token being shifted unless it is eof. */
yychar, yytname[yychar1]));
/* Discard the token being shifted unless it is eof. */
- YYFPRINTF (YYSTDERR, "Reducing via rule %d (line %d), ",
+ YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
yyn - 1, yyrline[yyn]);
/* Print the symbols being reduced, and their result. */
for (yyi = yyprhs[yyn]; yyrhs[yyi] >= 0; yyi++)
yyn - 1, yyrline[yyn]);
/* Print the symbols being reduced, and their result. */
for (yyi = yyprhs[yyn]; yyrhs[yyi] >= 0; yyi++)
- YYFPRINTF (YYSTDERR, "%s ", yytname[yyrhs[yyi]]);
- YYFPRINTF (YYSTDERR, " -> %s\n", yytname[yyr1[yyn]]);
+ YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
+ YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
if (yydebug)
{
short *yyssp1 = yyss - 1;
if (yydebug)
{
short *yyssp1 = yyss - 1;
- YYFPRINTF (YYSTDERR, "state stack now");
+ YYFPRINTF (stderr, "state stack now");
- YYFPRINTF (YYSTDERR, " %d", *++yyssp1);
- YYFPRINTF (YYSTDERR, "\n");
+ YYFPRINTF (stderr, " %d", *++yyssp1);
+ YYFPRINTF (stderr, "\n");
/* Return failure if at end of input. */
if (yychar == YYEOF)
YYABORT;
/* Return failure if at end of input. */
if (yychar == YYEOF)
YYABORT;
- YYDPRINTF ((YYSTDERR, "Discarding token %d (%s).\n",
+ YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
yychar, yytname[yychar1]));
yychar = YYEMPTY;
}
yychar, yytname[yychar1]));
yychar = YYEMPTY;
}
if (yydebug)
{
short *yyssp1 = yyss - 1;
if (yydebug)
{
short *yyssp1 = yyss - 1;
- YYFPRINTF (YYSTDERR, "Error: state stack now");
+ YYFPRINTF (stderr, "Error: state stack now");
- YYFPRINTF (YYSTDERR, " %d", *++yyssp1);
- YYFPRINTF (YYSTDERR, "\n");
+ YYFPRINTF (stderr, " %d", *++yyssp1);
+ YYFPRINTF (stderr, "\n");
if (yyn == YYFINAL)
YYACCEPT;
if (yyn == YYFINAL)
YYACCEPT;
- YYDPRINTF ((YYSTDERR, "Shifting error token, "));
+ YYDPRINTF ((stderr, "Shifting error token, "));
*++yyvsp = yylval;
#if YYLSP_NEEDED
*++yyvsp = yylval;
#if YYLSP_NEEDED