* 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.
This commit is contained in:
Paul Eggert
2006-05-30 23:45:04 +00:00
parent 2c08afa5dd
commit 0210398466
3 changed files with 20 additions and 9 deletions

View File

@@ -1,3 +1,12 @@
2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
* 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.
2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
* src/getargs.c (usage): Back out yesterday's modification of the

View File

@@ -906,7 +906,7 @@ yyuserAction (yyRuleNum yyn, int yyrhslen, yyGLRStackItem* yyvsp,
# 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

View File

@@ -4892,8 +4892,9 @@ the @samp{YYERROR;} statement. @xref{Error Recovery}.
@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.
@findex 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-ahead token ought to be discarded
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.
@xref{Action Features, ,Special Features for Use in Actions}.
@end deffn
@deffn {Macro} YYSTACK_USE_ALLOCA