4935 |
you always define @code{YYDEBUG} so that debugging is always possible. |
you always define @code{YYDEBUG} so that debugging is always possible. |
4936 |
|
|
4937 |
The trace facility outputs messages with macro calls of the form |
The trace facility outputs messages with macro calls of the form |
4938 |
@code{YYFPRINTF (YYSTDERR, @var{format}, @var{args})} where |
@code{YYFPRINTF (stderr, @var{format}, @var{args})} where |
4939 |
@var{format} and @var{args} are the usual @code{printf} format and |
@var{format} and @var{args} are the usual @code{printf} format and |
4940 |
arguments. If you define @code{YYDEBUG} to a nonzero value but do not |
arguments. If you define @code{YYDEBUG} to a nonzero value but do not |
4941 |
define @code{YYFPRINTF}, @code{<stdio.h>} is automatically included |
define @code{YYFPRINTF}, @code{<stdio.h>} is automatically included |
4942 |
and the macros are defined to @code{fprintf} and @code{stderr}. In |
and @code{YYPRINTF} is defined to @code{fprintf}. In the same |
4943 |
the same situation, C++ parsers include @code{<cstdio.h>} instead, and |
situation, C++ parsers include @code{<cstdio>} and use |
4944 |
use @code{std::fprintf} and @code{std::stderr}. |
@code{std::fprintf} instead. |
4945 |
|
|
4946 |
Once you have compiled the program with trace facilities, the way to |
Once you have compiled the program with trace facilities, the way to |
4947 |
request a trace is to store a nonzero value in the variable @code{yydebug}. |
request a trace is to store a nonzero value in the variable @code{yydebug}. |