[Top][All Lists]
[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.
- Re: warning: unused value: $3, (continued)
Re: warning: unused value: $3, Joel E. Denny, 2006/10/25
Re: warning: unused value: $3, Joel E. Denny, 2006/10/25
- Re: warning: unused value: $3, henrik . sorensen, 2006/10/26
- Re: warning: unused value: $3,
Joel E. Denny <=
- Re: warning: unused value: $3, henrik . sorensen, 2006/10/26
- Re: warning: unused value: $3, Joel E. Denny, 2006/10/26
- Re: warning: unused value: $3, henrik . sorensen, 2006/10/26
- Re: warning: unused value: $3, Joel E. Denny, 2006/10/26
- Re: warning: unused value: $3, henrik . sorensen, 2006/10/26
- Re: warning: unused value: $3, Joel E. Denny, 2006/10/26
- Re: warning: unused value: $3, henrik . sorensen, 2006/10/27
- Re: warning: unused value: $3, Joel E. Denny, 2006/10/27
- Re: warning: unused value: $3, Hans Aberg, 2006/10/27
- Re: warning: unused value: $3, Joel E. Denny, 2006/10/27