On Mon, 19 Dec 2005, Akim Demaille wrote:

> >>> "Joel" == Joel E Denny <[EMAIL PROTECTED]> writes:
> 
>  > On Wed, 7 Dec 2005, Akim Demaille wrote:
>  >> 
>  >> Right :)  Consider the %printers and %destructors for instance.
> 
>  > In those cases, it also seems reasonable to leave it in the hands of the 
>  > user.  That is, if the user doesn't reference a semantic value in its 
>  > printer or destructor, why did he declare its printer or destructor?  Is 
>  > this a legitimate usage?  Shouldn't he be warned *somehow*?  Maybe even by 
>  > bison?  Whether $$ occurs can be computed.
> 
> In the case of %printer the issue is a bit different: if you use
> %parse-param, these additional arguments are available in the printers
> and dtors.  So is the location: you might be willing to use it for
> instance of log something.  So it makes sense to provide them in all
> the cases.

I didn't mean to argue against providing them. In the case of locations, 
the occurrence of @$ can be computed. In the case of %parse-param, I was 
arguing that the user could pacify lint himself if he cares to.

However, Paul seems to have found nice lint conventions that solve this 
problem.  Thus, maybe it isn't necessary to go the route of trying to 
compute usages, remove declarations for unused variables, and leave the 
uncomputable usages in the hands of the user code.

Joel


_______________________________________________
Help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to