> > +For example, trying to rewrite the previous example as 
 > > +
 > > +...@smallexample
 > > +widget :
 > > +          @{ if (!new_syntax) YYERROR; @} "widget" id new_args  @{ $$ = 
 > > f($3, $4); @}
 > > +       |  @{ if (new_syntax) YYERROR; @} "widget" id old_args   @{ $$ = 
 > > f($3, $4); @}
 > > +       ;
 > > +...@end smallexample
 > 
 > The "(!new_syntax)" and "(new_syntax)" should be swapped here.
 > 

Actually, no: the example is supposed to be an attempt to get the effect
of %? with ordinary actions.  

   { if (!new_syntax) YYERROR; } 

is in fact what %?{new_syntax} expands to (except that it is immediate 
rather than deferred).

Paul H.

Reply via email to