Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost.Program_options: Parsing arguments like "+a" possible?
From: Diederick C. Niehorster (dcnieho_at_[hidden])
Date: 2011-08-08 07:15:50


You'll have to read through the source code (which isn't straight
forward). There will be a parser somewhere (maybe its easiest to find
the right file by putting a breakpoint before a call to
program_options and stepping through till you're in the parser. Once
there, the change is probably pretty trivial. And if you can do it in
a nice configurable way with a user exposed setting, the maintainers
might accept a patch. Though I'm worried about how you are going to
internally distinguish the + and - options...

Best,
Dee

On Mon, Aug 8, 2011 at 19:10, <boost_mailinglist_at_[hidden]> wrote:
>
>
> Am 08.08.2011 12:52, schrieb Leo Cacciari:
>>
>> Il 08/08/2011 12:47 PM, boost_mailinglist_at_[hidden] ha scritto:
>>
>>> Hello,
>>>
>>> the app is grown up step by step and a other person has taken the
>>> decission to use the "+" as a sign for an argument. (All the letters for
>>> the - are used.)
>>> My task is more or less to rewrite the old case() parser to a new one,
>>> possible based on boost.program_options, to get a clear structure. At
>>> the moment I'm not very interesting to change the argument style,
>>> because all the example and more has also to be change to the new style.
>>>
>> Well then I believe you're out of luck. AFAIK and as is stated in the
>> library documentation, start character for short options is - or / (the
>> latter to conform to windows usage).
>>
> Is there a way to get the library "patched" and replace the / through +?
> The app will only be used under linux.
>
> Thanks
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net