On Mon, 17 Jan 2005, Mark Taylor wrote:
> On Mon, 17 Jan 2005, Peter W. Draper wrote:
>
> > > This is a workaround for a definite and easily-fixed bug in
> > > (at least Cygwin) yacc though - will you make/have you made a Cygwin
> > > bug report? If you've lost the minimal yacc source file I wrote to
> > > demonstrate it I can probably find a Cygwin machine to reproduce it on.
> >
> > It's no longer a Cygwin bug, but what looks more like a Bison bug or maybe
> > just incompatibility (bison is not yacc), so I guess that's the right
> > place to submit a bug report. I have the minimal file you created.
>
> Hmm, I see what you mean - bison on RH9 gives the same error.
> Seems unlikely that this would have gone unnoticed in bison till now.
> I'll take a look at the bison & yacc docs and see if I can see what's up.
well - on further investigation, the bison manual doesn't actually say
you can use yyerrok in a function called from a rule, only from the rule
itself. It seems a bit perverse if you can't since (a) it seems to
work fine in classic yacc and (b) it seems to work OK for yyclearin
which is described in just the same terms as yyerrok in the bison manual.
However, I wouldn't say for sure that it's definitely a bug, so
maybe best to let sleeping yaccs lie.
I considered modifying the *.y files (again) to try to make them more
robust against the details of yacc/bison implementations, but looking
at the manuals I can't be sure I'd make it better rather than worse,
so again, I'll leave it as it is.
Mark
--
Mark Taylor Starlink Programmer Physics, Bristol University, UK
[log in to unmask] +44-117-928-8776 http://www.star.bris.ac.uk/~mbt/
|