[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 23:33:01 -0400 (EDT)

On Thu, 22 Jun 2006, Paul Eggert wrote:

> "Joel E. Denny" <address@hidden> writes:
> > To keep things less confusing, the user should be advised to do things 
> > either the Yacc way or the new way with order-independent declarations.  
> Yes, that makes sense.  How about requiring that?  I.e., report an
> error if the user confusingly tries to use both methods.  That way, we
> don't have to define what happens after you shoot yourself in the
> foot.

That might be best, and would be fine for my usage.

However, I was imagining a user who just wants to add a 
%before-definitions and/or %after-definitions to an existing grammar file.  
Should he be forced to convert all his (other) prologue blocks to 
%before-header and %after-header?

I guess we could go with the restriction and re-evaluate if someone 

> One notational thought.  Perhaps we should change "before-definitions"
> to "start-header", and "after-definitions" to "end-header"?  That
> might help people remember better the relationships among the
> %*-header directives.  Also, it will give them the pattern "%*-header"
> to remember the concepts by.

Yes, that's good.  I've been thinking someone might mistakenly use 
%before-definitions as the old Yacc pre-prologue.  That's fine for the 
code file, but he might unexpectedly pollute his header that way.  
%start-header helps to clarify that it's part of the header.


reply via email to

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