[Top][All Lists]

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

Re: symbol declarations after rules

From: Joel E. Denny
Subject: Re: symbol declarations after rules
Date: Thu, 22 Jun 2006 18:35:35 -0400 (EDT)

On Thu, 22 Jun 2006, Paul Eggert wrote:

> "Joel E. Denny" <address@hidden> writes:
> > Agreed?  Is there anything else like this?
> Usually it's better if order of declarations doesn't matter.

I do agree it's more flexible.  This is similar to the 
%after-definitions/%before-definitions vs. %header discussion.

I was originally thinking the error messages would be easier to implement 
even if only as a short-term fix.  However, I'm now thinking it won't be 
too difficult to move the rule checks to after parsing the entire grammar 
file.  I should probably implement this before implementing the 
%destructor/%printer extensions.

By the way, I'm looking forward to your patch to make Bison detect <tag> 
usage.  I think it will have an impact on the patches I'm working on.

> Does order matter elsewhere?

A few places at least.  %union for dividing the pre-prologue blocks from 
the post-prologue blocks.  One %define can override an earlier %define.  
Precedence declarations.  Computing the start symbol (assuming no %start).  
Reduce-reduce conflict resolution.  But past bad decisions are not 
justification for future bad decisions.



reply via email to

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