[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3] Add command line option to map file prefixes
From: |
Akim Demaille |
Subject: |
Re: [PATCH v3] Add command line option to map file prefixes |
Date: |
Tue, 12 May 2020 06:31:34 +0200 |
Hi Joshua,
Thanks for this clean up!
> Le 12 mai 2020 à 04:42, Joshua Watt <address@hidden> a écrit :
>
> @@ -712,6 +716,23 @@ getargs (int argc, char *argv[])
> language_argmatch (optarg, command_line_prio, loc);
> break;
>
> + case 'M': // -MOLDPREFIX=NEWPREFIX
> + if (optarg)
> + {
> + char *newprefix = strchr (optarg, '=');
> + if (newprefix)
> + {
> + *newprefix = '\0';
> + add_prefix_map (optarg, newprefix + 1);
> + }
> + else
> + {
> + complain (&loc, complaint, _("invalid argument for %s: %s"),
> + quote ("--file-prefix-map"), quotearg_n(1,
> optarg));
space paren.
> + }
> + }
> + break;
This gives the impression that it's ok not to have an argument, but the
argument is (fortunately) mandatory. You should remove the if.
And, FTR (and then again, I can do it, I don't know if you forgot about
it, or meant not to do it), doc/bison.texi needs to be updated.
Cheers!