From: Akim Demaille Date: Mon, 2 Apr 2012 14:43:26 +0000 (+0200) Subject: doc: fix documentation of YYERROR. X-Git-Tag: v2.5.1_rc2~60 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/4a11b8524992872c28f02d67cc4188c366f2b4bc?ds=sidebyside doc: fix documentation of YYERROR. * doc/bison.texinfo (Table of Symbols): Fix the documentation of YYERROR by copying that from "Action Features". --- diff --git a/doc/bison.texinfo b/doc/bison.texinfo index 76a7dbae..3212be91 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.