bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GNU bison 1.75b] testsuite.log: 14 failures


From: Bruce Lilly
Subject: Re: [GNU bison 1.75b] testsuite.log: 14 failures
Date: Fri, 13 Dec 2002 11:28:48 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130

Paul,

ca. line 4147 in doc/bison.texinfo:

If @samp{%parse-param "int *nastiness"  "nastiness"} is used, then:

@example
void yyerror (int *randomness, const char *msg);  /* Yacc parsers.  */
void yyerror (int *randomness, const char *msg);  /* GLR parsers.   */
@end example


I was using such a %parse-param declaration with a pure parser.
Mind you, I don't *want* two args to yyerror, I prefer compatibility
with current bison.

N.B. this is w/o "location tracking".

Best regards,
  Bruce Lilly

Paul Eggert wrote:
From: Bruce Lilly <address@hidden>
Date: Sat, 23 Nov 2002 11:23:07 -0500

There also appears to be a documentation bug: when %pure-parser
is used with #define ERROR_VERBOSE, yyerror takes only one argument,
not two (same as earlier versions of bison).  The documentation
states that with %pure-parser (no mention of ERROR-VERBOSE
interaction), yyerror takes two arguments.


Sorry, I don't quite follow this point.  The 1.75b documentation says
this:

   Obviously, in location tracking pure parsers, @code{yyerror} should have
   an access to the current location.  This is indeed the case for the GLR
   parsers, but not for the Yacc parser, for historical reasons.  I.e., if
   @samp{%locations %pure-parser} is passed then the prototypes for
   @code{yyerror} are:

   @example
   void yyerror (const char *msg);                 /* Yacc parsers.  */
   void yyerror (YYLTYPE *locp, const char *msg);  /* GLR parsers.   */
   @end example

so for yacc parsers, the documentation says yyerror takes only one
argument.  Perhaps you were looking at a different part of the
documentation?






reply via email to

[Prev in Thread] Current Thread [Next in Thread]