[Top][All Lists]

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

Re: proposal: simplify prologue alternatives into %code

From: Joel E. Denny
Subject: Re: proposal: simplify prologue alternatives into %code
Date: Fri, 12 Jan 2007 17:21:02 -0500 (EST)

Another ignored message.

On Tue, 9 Jan 2007, Joel E. Denny wrote:

> On Tue, 9 Jan 2007, Paolo Bonzini wrote:
> > As the code is now, %{ ... %} and %code are different beasts, which are not
> > kept together.  That is, %{...%} ends up before "%code top" and %code 
> > blocks,
> > rather than intermixed.
> `%code top' and the unqualified %code end up surrounding the prologues.  
> That is, `%code top' is first, and the unqualified %code is last.
> > This complicates the documentation quite a lot.
> How so?  Why should most users even worry about the interaction between 
> %{...%} and %code?  I've documented %code as an alternative not an 
> extension to %{...%}.
> > Are you going to keep this, or do you want to consolidate them together (as 
> > my
> > patch did)?
> I intentionally separated them.  In my opinion, trying to make %{...%} an 
> alias for %code complicates the implementation (especially since the 
> qualifier choices would be skeleton specific) for no real gain.  Since 
> %{...%} and %code are different directives, I think it's ok that their 
> code is not mixed... just as no two %code qualifiers will mix their code.
> Besides, I think any grammar file that uses both %{...%} and %code is 
> going to be confusing either way.  I wish new skeletons wouldn't use 
> %{...%} at all and would warn if the grammar file uses it.  I understand 
> that %{...%} is not as complicated for Java since there's no %union, but 
> isn't %code sufficient?  What purpose does %{...%} serve?

reply via email to

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