bison-patches
[Top][All Lists]
Advanced

[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: Thu, 4 Jan 2007 11:20:00 -0500 (EST)

On Thu, 4 Jan 2007, Paolo Bonzini wrote:

> Okay, so we'd have only %code, %code "imports", and the epilogue.

Yes.  Does that sound reasonable to you?

> I would love to have "%code" be synonym with a particular QUALIFIER, rather
> than a separate muscle.  Bonus points if you can make it skeleton-defined: so,
> in Java, %code would be synonym with %code "methods"; in C/C++, with %code
> "prototypes" (made up, but you get the idea).

If we're going to give the default a name, why have a default at all?  
Imagine reading a grammar file containing the following two directives:

  %code { CODE }

  %code "methods" { CODE }

They look different, so my intuition says they should do something 
different, but you're proposing that they do the same thing.

Why do you want to do this?




reply via email to

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