help-bison
[Top][All Lists]
Advanced

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

Re: warning: unused value: $3


From: Joel E. Denny
Subject: Re: warning: unused value: $3
Date: Thu, 26 Oct 2006 14:45:31 -0400 (EDT)

On Thu, 26 Oct 2006 address@hidden wrote:

> On Thursday 26 October 2006 02:27, Joel E. Denny wrote:
> > > Line 873 contains: |??procoptionlist ',' {$$=$1;} procoption {$$=$1;}
> > > $3 refers to the embedded action after the comma.
> >
> > In the last semantic action above, write:
> >
> > ? USE($3)
> >
> > > My grammar set a number of attributes in an allocated structure using $0
> > > to reference the structure on the stack. The full rules are as follow
> >
> > How frequently do you do this in your grammar? ?In other words, how
> > painful will it be to add the USE macro invocation to all those rules?
> I could change the rule to
> procoptionlist ',' {$$=$1;} procoption {$$=$3;}
> 
> and the warning will be gone. 

That's nice.  I'm wondering why the grammar doesn't use $-1 and drop the 
mid-rule entirely, but I haven't test this.  I'm thinking there may always 
be a solution similar to these to avoid USE for mid-rules.

reply via email to

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