[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: YYRECOVERING nit
From: |
Paul Eggert |
Subject: |
Re: YYRECOVERING nit |
Date: |
Tue, 30 May 2006 16:46:53 -0700 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
Thanks for reporting that. That's more than a nit, since glr.c and
yacc.c are inadvertantly incompatible here (perhaps because of the
documentation bug?). I installed this:
2006-05-30 Paul Eggert <address@hidden>
* data/glr.c (YYRECOVERING): Define to be a function-like macro
with no arguments, not as an object-like macro. This is for
compatibility with data/yacc.c. Problem reported by John P. Hartmann in
<http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
* doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
Document this.
--- data/glr.c 21 May 2006 08:11:30 -0000 1.177
+++ data/glr.c 30 May 2006 23:37:20 -0000
@@ -906,7 +906,7 @@ yyuserAction (yyRuleNum yyn, int yyrhsle
# undef YYERROR
# define YYERROR return yyerrok, yyerr
# undef YYRECOVERING
-# define YYRECOVERING (yystackp->yyerrState != 0)
+# define YYRECOVERING() (yystackp->yyerrState != 0)
# undef yyclearin
# define yyclearin (yychar = YYEMPTY)
# undef YYFILL
--- doc/bison.texinfo 30 May 2006 06:07:06 -0000 1.190
+++ doc/bison.texinfo 30 May 2006 23:37:20 -0000
@@ -4892,8 +4892,9 @@ the @samp{YYERROR;} statement. @xref{Er
@end deffn
@deffn {Macro} YYRECOVERING
-This macro stands for an expression that has the value 1 when the parser
-is recovering from a syntax error, and 0 the rest of the time.
address@hidden YYRECOVERING
+The expression @code{YYRECOVERING ()} yields 1 when the parser
+is recovering from a syntax error, and 0 otherwise.
@xref{Error Recovery}.
@end deffn
@@ -6003,10 +6004,10 @@ probably correct. The previous look-ahe
with @samp{yyclearin;}.
@vindex YYRECOVERING
-The macro @code{YYRECOVERING} stands for an expression that has the
-value 1 when the parser is recovering from a syntax error, and 0 the
-rest of the time. A value of 1 indicates that error messages are
-currently suppressed for new syntax errors.
+The expression @code{YYRECOVERING ()} yields 1 when the parser
+is recovering from a syntax error, and 0 otherwise.
+Syntax error diagnostics are suppressed while recovering from a syntax
+error.
@node Context Dependency
@chapter Handling Context Dependencies
@@ -8469,8 +8470,9 @@ Conventions for Pure Parsers}.
@end deffn
@deffn {Macro} YYRECOVERING
-Macro whose value indicates whether the parser is recovering from a
-syntax error. @xref{Action Features, ,Special Features for Use in Actions}.
+The expression @code{YYRECOVERING ()} yields 1 when the parser
+is recovering from a syntax error, and 0 otherwise.
address@hidden Features, ,Special Features for Use in Actions}.
@end deffn
@deffn {Macro} YYSTACK_USE_ALLOCA
- YYRECOVERING nit, John P. Hartmann, 2006/05/30
- Re: YYRECOVERING nit,
Paul Eggert <=