* doc/bison.texi: Use stderr for error messages.
Meta-variables are usually spelled in lower case.
Use @code for function names.
void
yyerror (char const *s)
@{
void
yyerror (char const *s)
@{
+ fprintf (stderr, "%s\n", s);
the case for Boolean values.
When @code{%define api.pure full} is used, the parser is made reentrant. This
the case for Boolean values.
When @code{%define api.pure full} is used, the parser is made reentrant. This
-changes the signature for yylex (@pxref{Pure Calling}), and also that of
-yyerror when the tracking of locations has been activated, as shown below.
+changes the signature for @code{yylex} (@pxref{Pure Calling}), and also that of
+@code{yyerror} when the tracking of locations has been activated, as shown
+below.
The @code{true} value is very similar to the @code{full} value, the only
difference is in the signature of @code{yyerror} on Yacc parsers without
The @code{true} value is very similar to the @code{full} value, the only
difference is in the signature of @code{yyerror} on Yacc parsers without
parser table construction algorithm by using the @code{%define lr.type}
directive.
parser table construction algorithm by using the @code{%define lr.type}
directive.
-@deffn {Directive} {%define lr.type} @var{TYPE}
+@deffn {Directive} {%define lr.type} @var{type}
Specify the type of parser tables within the LR(1) family. The accepted
Specify the type of parser tables within the LR(1) family. The accepted
-values for @var{TYPE} are:
+values for @var{type} are:
@itemize
@item @code{lalr} (default)
@itemize
@item @code{lalr} (default)
To adjust which states have default reductions enabled, use the
@code{%define lr.default-reductions} directive.
To adjust which states have default reductions enabled, use the
@code{%define lr.default-reductions} directive.
-@deffn {Directive} {%define lr.default-reductions} @var{WHERE}
+@deffn {Directive} {%define lr.default-reductions} @var{where}
Specify the kind of states that are permitted to contain default reductions.
Specify the kind of states that are permitted to contain default reductions.
-The accepted values of @var{WHERE} are:
+The accepted values of @var{where} are:
@itemize
@item @code{most} (default for LALR and IELR)
@item @code{consistent}
@itemize
@item @code{most} (default for LALR and IELR)
@item @code{consistent}
sacrificing @code{%nonassoc}, default reductions, or state merging. You can
enable LAC with the @code{%define parse.lac} directive.
sacrificing @code{%nonassoc}, default reductions, or state merging. You can
enable LAC with the @code{%define parse.lac} directive.
-@deffn {Directive} {%define parse.lac} @var{VALUE}
+@deffn {Directive} {%define parse.lac} @var{value}
Enable LAC to improve syntax error handling.
@itemize
@item @code{none} (default)
Enable LAC to improve syntax error handling.
@itemize
@item @code{none} (default)
keeping unreachable states is sometimes useful when trying to understand the
relationship between the parser and the grammar.
keeping unreachable states is sometimes useful when trying to understand the
relationship between the parser and the grammar.
-@deffn {Directive} {%define lr.keep-unreachable-states} @var{VALUE}
+@deffn {Directive} {%define lr.keep-unreachable-states} @var{value}
Request that Bison allow unreachable states to remain in the parser tables.
Request that Bison allow unreachable states to remain in the parser tables.
-@var{VALUE} must be a Boolean. The default is @code{false}.
+@var{value} must be a Boolean. The default is @code{false}.
@end deffn
There are a few caveats to consider:
@end deffn
There are a few caveats to consider: