doc: fix index.

http://lists.gnu.org/archive/html/bison-patches/2012-04/msg00006.html

* doc/bison.texinfo: Avoid using @def* variant with more
than the defined entity as main entity, as it results in
an incorrect index.  For instance, don't document
{return YYERROR;}, which results in a single index entry
"return YYERROR;", but rather as typed function whose
return type is "type", and whose argument list is ";".
This commit is contained in:
Akim Demaille
2012-04-03 13:15:20 +02:00
parent 4a11b85249
commit 34a41a93c7

View File

@@ -5659,7 +5659,7 @@ This function is available if either the @code{%define api.push-pull push} or
@code{%define api.push-pull both} declaration is used. @code{%define api.push-pull both} declaration is used.
@xref{Push Decl, ,A Push Parser}. @xref{Push Decl, ,A Push Parser}.
@deftypefun yypstate *yypstate_new (void) @deftypefun {yypstate*} yypstate_new (void)
The function will return a valid parser instance if there was memory available The function will return a valid parser instance if there was memory available
or 0 if no memory was available. or 0 if no memory was available.
In impure mode, it will also return 0 if a parser instance is currently In impure mode, it will also return 0 if a parser instance is currently
@@ -6081,17 +6081,17 @@ union specified by the @code{%union} declaration.
@xref{Action Types, ,Data Types of Values in Actions}. @xref{Action Types, ,Data Types of Values in Actions}.
@end deffn @end deffn
@deffn {Macro} YYABORT; @deffn {Macro} YYABORT @code{;}
Return immediately from @code{yyparse}, indicating failure. Return immediately from @code{yyparse}, indicating failure.
@xref{Parser Function, ,The Parser Function @code{yyparse}}. @xref{Parser Function, ,The Parser Function @code{yyparse}}.
@end deffn @end deffn
@deffn {Macro} YYACCEPT; @deffn {Macro} YYACCEPT @code{;}
Return immediately from @code{yyparse}, indicating success. Return immediately from @code{yyparse}, indicating success.
@xref{Parser Function, ,The Parser Function @code{yyparse}}. @xref{Parser Function, ,The Parser Function @code{yyparse}}.
@end deffn @end deffn
@deffn {Macro} YYBACKUP (@var{token}, @var{value}); @deffn {Macro} YYBACKUP (@var{token}, @var{value})@code{;}
@findex YYBACKUP @findex YYBACKUP
Unshift a token. This macro is allowed only for rules that reduce Unshift a token. This macro is allowed only for rules that reduce
a single value, and only when there is no lookahead token. a single value, and only when there is no lookahead token.
@@ -6109,18 +6109,15 @@ In either case, the rest of the action is not executed.
@end deffn @end deffn
@deffn {Macro} YYEMPTY @deffn {Macro} YYEMPTY
@vindex YYEMPTY
Value stored in @code{yychar} when there is no lookahead token. Value stored in @code{yychar} when there is no lookahead token.
@end deffn @end deffn
@deffn {Macro} YYEOF @deffn {Macro} YYEOF
@vindex YYEOF
Value stored in @code{yychar} when the lookahead is the end of the input Value stored in @code{yychar} when the lookahead is the end of the input
stream. stream.
@end deffn @end deffn
@deffn {Macro} YYERROR; @deffn {Macro} YYERROR @code{;}
@findex YYERROR
Cause an immediate syntax error. This statement initiates error Cause an immediate syntax error. This statement initiates error
recovery just as if the parser itself had detected an error; however, it recovery just as if the parser itself had detected an error; however, it
does not call @code{yyerror}, and does not print any message. If you does not call @code{yyerror}, and does not print any message. If you
@@ -6144,7 +6141,7 @@ Actions}).
@xref{Lookahead, ,Lookahead Tokens}. @xref{Lookahead, ,Lookahead Tokens}.
@end deffn @end deffn
@deffn {Macro} yyclearin; @deffn {Macro} yyclearin @code{;}
Discard the current lookahead token. This is useful primarily in Discard the current lookahead token. This is useful primarily in
error rules. error rules.
Do not invoke @code{yyclearin} in a deferred semantic action (@pxref{GLR Do not invoke @code{yyclearin} in a deferred semantic action (@pxref{GLR
@@ -6152,7 +6149,7 @@ Semantic Actions}).
@xref{Error Recovery}. @xref{Error Recovery}.
@end deffn @end deffn
@deffn {Macro} yyerrok; @deffn {Macro} yyerrok @code{;}
Resume generating error messages immediately for subsequent syntax Resume generating error messages immediately for subsequent syntax
errors. This is useful primarily in error rules. errors. This is useful primarily in error rules.
@xref{Error Recovery}. @xref{Error Recovery}.
@@ -9922,20 +9919,20 @@ The location information of the grouping made by the current rule.
@xref{Java Location Values}. @xref{Java Location Values}.
@end defvar @end defvar
@deffn {Statement} {return YYABORT;} @deftypefn {Statement} return YYABORT @code{;}
Return immediately from the parser, indicating failure. Return immediately from the parser, indicating failure.
@xref{Java Parser Interface}. @xref{Java Parser Interface}.
@end deffn @end deftypefn
@deffn {Statement} {return YYACCEPT;} @deftypefn {Statement} return YYACCEPT @code{;}
Return immediately from the parser, indicating success. Return immediately from the parser, indicating success.
@xref{Java Parser Interface}. @xref{Java Parser Interface}.
@end deffn @end deftypefn
@deffn {Statement} {return YYERROR;} @deftypefn {Statement} {return} YYERROR @code{;}
Start error recovery (without printing an error message). Start error recovery (without printing an error message).
@xref{Error Recovery}. @xref{Error Recovery}.
@end deffn @end deftypefn
@deftypefn {Function} {boolean} recovering () @deftypefn {Function} {boolean} recovering ()
Return whether error recovery is being done. In this state, the parser Return whether error recovery is being done. In this state, the parser