bison-patches
[Top][All Lists]
Advanced

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

Re: [bison-1_29-branch] files.patch


From: Akim Demaille
Subject: Re: [bison-1_29-branch] files.patch
Date: 10 Sep 2001 15:11:03 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence)

| Hello,

Hi Marc,

Thanks for having worked this patch so quickly.  I hope this time Hans
will be happy.


| +  src_extension = tr (ext, 'y', 'c');
| +  src_extension = tr (src_extension, 'Y', 'C');
| +  if (!header_extension)
|      {
|        header_extension = tr (ext, 'y', 'h');
|        header_extension = tr (header_extension, 'Y', 'H');
| @@ -280,12 +275,12 @@
| +  if (!header_extension)
| +    {
| +      header_extension = tr (ext, 'c', 'h');
| +      header_extension = tr (header_extension, 'C', 'H');
| +    }

That's weird.  Are you sure it is logical to have this twice?  It
might, I trust you if you think it is needed.


| +  /* If --defines=FILE is used.  */
| +  if (spec_defines_file)
| +    {
| +      ext_index = get_extension_index (spec_defines_file);
| +      if (ext_index)
| +     ext_index = 
| +       (strspn (spec_defines_file + ext_index + 1, "hH")) ? ext_index : 0;
| +      if (ext_index)
| +     header_extension = xstrdup (spec_defines_file + ext_index);

I'm a bit lost here.  What are you doing?  If --define=foo.h is
specified, I don't see much to be computed.



|    if (defines_flag)
| -    defines_obstack_save (stringappend (base_name, header_extension));
| +    defines_obstack_save (spec_defines_file ?
| +                       spec_defines_file : stringappend (base_name, 
| +                                                         header_extension));

I'd rather put a default value to spec_defines_file or something like
that.  Compute it only in one place.


| @@ -474,5 +482,6 @@
|                 stringappend (short_base_name, EXT_OUTPUT));
|  
|    if (graph_flag)
| -    obstack_save (&graph_obstack, stringappend (short_base_name, ".vcg"));
| +    obstack_save (&graph_obstack, spec_graph_file ? 
| +               spec_graph_file : stringappend (short_base_name, ".vcg"));
|  }

Likewise.


Fine!



reply via email to

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