Return immediately with value 1 (to report failure).
@end defmac
+@c For now, do not document %lex-param and %parse-param, since it's
+@c not clear that the current behavior is stable enough. For example,
+@c we may need to add %error-param.
+@clear documentparam
+
+@ifset documentparam
If you use a reentrant parser, you can optionally pass additional
parameter information to it in a reentrant way. To do so, use the
declaration @code{%parse-param}:
@deffn {Directive} %parse-param @{@var{argument-declaration}@}
@findex %parse-param
Declare that an argument declared by @code{argument-declaration} is an
-additional @code{yyparse} argument. This argument is also passed to
-@code{yyerror}. The @var{argument-declaration} is used when declaring
+additional @code{yyparse} argument.
+The @var{argument-declaration} is used when declaring
functions or prototypes. The last identifier in
@var{argument-declaration} must be the argument name.
@end deffn
@example
exp: @dots{} @{ @dots{}; *randomness += 1; @dots{} @}
@end example
+@end ifset
@node Lexical
only one argument.
+@ifset documentparam
If you wish to pass the additional parameter data to @code{yylex}, use
@code{%lex-param} just like @code{%parse-param} (@pxref{Parser
Function}).
int yylex (YYSTYPE *lvalp, YYLTYPE *llocp, int *nastiness);
int yyparse (int *nastiness, int *randomness);
@end example
+@end ifset
@node Error Reporting
@section The Error Reporting Function @code{yyerror}
void yyerror (YYLTYPE *locp, char const *msg); /* GLR parsers. */
@end example
+@ifset documentparam
If @samp{%parse-param @{int *nastiness@}} is used, then:
@example
int *nastiness, int *randomness,
char const *msg);
@end example
+@end ifset
@noindent
The prototypes are only indications of how the code produced by Bison
@xref{Precedence Decl, ,Operator Precedence}.
@end deffn
+@ifset documentparam
@deffn {Directive} %lex-param @{@var{argument-declaration}@}
Bison declaration to specifying an additional parameter that
@code{yylex} should accept. @xref{Pure Calling,, Calling Conventions
for Pure Parsers}.
@end deffn
+@end ifset
@deffn {Directive} %merge
Bison declaration to assign a merging function to a rule. If there is a
Summary}.
@end deffn
+@ifset documentparam
@deffn {Directive} %parse-param @{@var{argument-declaration}@}
Bison declaration to specifying an additional parameter that
@code{yyparse} should accept. @xref{Parser Function,, The Parser
Function @code{yyparse}}.
@end deffn
+@end ifset
@deffn {Directive} %prec
Bison declaration to assign a precedence to a specific rule.