|
Boost : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-11-24 10:49:09
Hi Jody,
>> > I think it is unreasonable to expect all command lines to be
>> > specified in this way. If --something expects an argument, then 10
>> > is that argument.
>>
>> Well, I obvious don't know if an unknown option expects an argument
>> ;-)
>
>
> Right, but the custom parser better.
Ok, so you'd like to call your existing parser from inside custom parser
that program_options provide? That would indeed solve some of the problems.
> It should hold state and know what
> is supposed to come next. However, it can only do this if the custom
> parser is allowed to eat up the option, leaving the "driver" with
> nothing to do at all for that option (like a Jedi mind trick, "This is
> not the option you are looking for.")
I agree. I already plan that a future version will allow custom parser to
return a vector of options, so you can return 0, 1, or many options, while
eating as many tokens as you like. I'm afraid I don't know when it will be
implemented. "This year" is as accurate estimate as I can provide.
- Volodya
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk