On Thursday 26 October 2006 20:45, Joel E. Denny wrote:
> On Thu, 26 Oct 2006 [EMAIL PROTECTED] 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


_______________________________________________
[email protected] http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to