bison-patches
[Top][All Lists]
Advanced

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

Re: warn about conflicting skeleton-generated files


From: Paolo Bonzini
Subject: Re: warn about conflicting skeleton-generated files
Date: Thu, 18 Jan 2007 08:48:23 +0100
User-agent: Thunderbird 1.5.0.9 (Macintosh/20061207)

1. If the file name does not contain a `/', it's one of Bison's installed skeleton files.

2. If the file name does contain a `/', it's an absolute or relative file name. If it's relative, it's relative to where the file name was specified (current working directory for the command-line, and grammar file directory for the grammar file).

No Unix utility behaves like this with respect to data files (even
though your comparison with how shells look in the PATH is right).
IMHO, the right way to do it would be: If the file name does not contain
a `/', and is not found in the current directory, it's one of Bison's
installed files.  This is the same as include paths in C, and it fits
better than the comparison with shells looking up the commands.  This is
partially backwards-incompatible, in case someone has a lalr1.cc file in
their current directory, but people should switch to %language anyway.

I think that this behavior is easy to implement on top of your patch.

Also, you're not modifying -S if I understand correctly.  The
parse-gram.y code should have been in skeleton_arg instead.

Paolo





reply via email to

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