help-bison
[Top][All Lists]
Advanced

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

Re: warning: unused value: $3


From: henrik . sorensen
Subject: Re: warning: unused value: $3
Date: Thu, 26 Oct 2006 21:14:08 +0200
User-agent: KMail/1.9.1

On Thursday 26 October 2006 20:45, Joel E. Denny wrote:
> On Thu, 26 Oct 2006 address@hidden wrote:
> > On Thursday 26 October 2006 02:27, Joel E. Denny wrote:

> 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.
The grammar

procoptionlist:
  { $<pol>$ = newProcOptionList(); } 
          procoption 
  { $$ = $<pol>1; }
|       procoptionlist procoption {$$=$1;}
|       procoptionlist ',' {$$=$1;} procoption {$$=$1;}
        ;

procoption:
        MAIN { if(setTristateAttribute(&($<pol>0)->main,1)<0) YYERROR; }
;

so the procoption can be separated by either blanks or comma.

I would be interested in knowing other solutions to this ...

Henrik




reply via email to

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