Wow, I would never had believed there could remain such typos in the documentation...
> commit bfa74976051cc219ecd4d06de4059abd76fe80ed > Author: Richard M. Stallman <[email protected]> > Date: Wed May 19 03:41:36 1993 +0000 > > Initial revision !!! (that's not the first revision of Bison, but of bison.texinfo). We have a lot of doc duplication, especially because of this "Table of Symbols" node which compiles about everything from the documentation. I am not too fond of this, and I'd be happy to get rid of it (either by generating it from the rest of the documentation, or by just stating that "Index" is there for a reason). nevertheless, we have a (minor) issue: > $ git grep '@def.*YYERROR' > doc/bison.texinfo:@deffn {Macro} YYERROR; > doc/bison.texinfo:@deffn {Statement} {return YYERROR;} > doc/bison.texinfo:@deffn {Macro} YYERROR so we have three *different* entries for YYERROR. Actually, looking at the index shows uselessly different entries:
<<inline: index dups.png>>
What do you think we should do about this? - leave as is - factor the @def macros to all use no `;' - try to keep the `;' in the core of the text, but have it appear without the `;' in the Index. From 55d86db169ff5a3dbc897c2acaed28109c10488b Mon Sep 17 00:00:00 2001 From: Akim Demaille <[email protected]> Date: Mon, 2 Apr 2012 16:43:26 +0200 Subject: [PATCH] doc: fix documentation of YYERROR. * doc/bison.texinfo (Table of Symbols): Fix the documentation of YYERROR by copying that from "Action Features". --- doc/bison.texinfo | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/bison.texinfo b/doc/bison.texinfo index 76a7dba..3212be9 100644 --- a/doc/bison.texinfo +++ b/doc/bison.texinfo @@ -9933,7 +9933,7 @@ Return immediately from the parser, indicating success. @end deffn @deffn {Statement} {return YYERROR;} -Start error recovery without printing an error message. +Start error recovery (without printing an error message). @xref{Error Recovery}. @end deffn @@ -10911,10 +10911,11 @@ after a syntax error. @xref{Error Recovery}. @end deffn @deffn {Macro} YYERROR -Macro to pretend that a syntax error has just been detected: call -@code{yyerror} and then perform normal error recovery if possible -(@pxref{Error Recovery}), or (if recovery is impossible) make -@code{yyparse} return 1. @xref{Error Recovery}. +Cause an immediate syntax error. This statement initiates error +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 +want to print an error message, call @code{yyerror} explicitly before +the @samp{YYERROR;} statement. @xref{Error Recovery}. For Java parsers, this functionality is invoked using @code{return YYERROR;} instead. -- 1.7.9.5
