[Top][All Lists]

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

Re: FYI: [MAIN] tests-yyerror-verbose.patch

From: Robert Anisko
Subject: Re: FYI: [MAIN] tests-yyerror-verbose.patch
Date: Sun, 2 Sep 2001 21:05:02 +0200

> > if YYERROR_VERBOSE is not defined, we defined it with the zero value
> > (%%verbose).  And user cann't change %%verbose value.

Well, I don't think we need big changes to correct this.
The only wrong line was:

MACRO_INSERT_INT ("verbose", 0);

If you suppress that, everything works fine, and the user
can set YYERROR_VERBOSE both with #define and

> > else we do nothing, but user need to define himself YYERROR_VERBOSE and
> > set it with a value different of zero.
> For the moment.
> > This is absolutly not interesting, Bison doesn't need to know if
> > YYERROR_VERBOSE is defined.  And with this code, user always uses CPP,
> > cann't defined his YYERROR_VERBOSE and set it with zero.
> For the moment! It just change the fact that the user must give
> an explicit value. After, we will add a %error_verbose for example...

Slow down, people! We don't need '%error_verbose' at all,
we already have '%define verbose', and it should work if you
remove the line above.

> > An idea could be
> > #if defined (YYERROR_VERBOSE) || %%verbose
> > but criticals are sames.

Code production is now straightforward, and we cannot output code
conditionnaly anymore. This is why I don't like playing with 'ifdef' or
'defined' that much: we should try to rely on the values of cpp macros.

reply via email to

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