On Thu, 22 Jun 2006, Paul Eggert wrote: > "Joel E. Denny" <[EMAIL PROTECTED]> 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. Thanks. Joel
