On Tue, 24 Feb 2009, Wilson Snyder wrote:

> >Why not just put the %type right before the rule in the grammar section?
> >
> >  %%
> >  %type <t> rule1;
> >  rule1: ... ;
> >
> >However, notice that a semicolon is required when declarations are moved 
> >to the grammar section.
> 
> Thanks, I wasn't aware of that syntax that helps a lot.
> Would you be willing to add an extra sentence in the manual
> under "Nonterminal symbols" saying that %type can be used in
> the rule section with the semicolon?  That would have helped
> me out.

Sorry for the slow reply.  Now that I think about it, I don't believe the 
ability to put declarations in the grammar section is documented at all. 
Hopefully we'll get to it soon.


Reply via email to