bison-patches
[Top][All Lists]
Advanced

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

Re: %name-prefix overrides --name-prefix?


From: Joel E. Denny
Subject: Re: %name-prefix overrides --name-prefix?
Date: Thu, 14 Dec 2006 15:08:19 -0500 (EST)

[continuing a discussion from "Re: warn about conflicting 
 skeleton-generated files"]

On Wed, 13 Dec 2006, Hans Aberg wrote:

> One may just go in,
> changing the skeleton file at one of the places, and if there is something
> already written, all will look normal. So perhaps, in the case of the
> precedence rule, one should give a warning if both methods are used.

It's clear to me that %foo overriding --foo is misleading to the user 
invoking Bison from the command line.

I think you're now saying the reverse could also be misleading.  I agree. 
Imagine the user who edits the grammar file and then types make.  He may 
not realize that the makefile invokes Bison with --foo overriding the %foo 
he just wrote.

Maybe we're trying to be too helpful, but I'm not sure.
   
Here's another proposal.  Bison would complain about any conflict between 
--foo and %foo.  However, it would let --force-foo override %foo.

I believe there are only a handful of options for which this should 
actually be done:

  --defines
  --output
  --name-prefix
  --file-prefix
  --skeleton

By the way, should there even be a --language?  Isn't the target language 
always so tightly coupled with the grammar file that %language should 
always be used instead?  Why would anyone ever want to override it?  
Paolo, what do you think?




reply via email to

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