|
Boost Users : |
From: The Grumpiest Man You Know (mrgrumpyguts_at_[hidden])
Date: 2005-03-01 01:43:09
On Thu, 24 Feb 2005 12:21:06 +0300, Vladimir Prus <ghost_at_[hidden]> wrote:
> The Grumpiest Man You Know wrote:
>
> > As context I would like to say that read "The C++ Programming
> > Language" first edition and thought, "That sounds interesting." and
> > then didn't think of it again 'til about a a couple of months ago,
> > when I read Accelerated C++ on the recommendation of a friend and then
> > updated my original copy to the third edition. So I have NO useful
> > C++ experience, please point out even the most obvious things, I
> > really could be that dumb. I have started a non trivial project that
> > I hope will cement some of the things I've read. And that's where
> > boost comes in.
> >
> > I had some success with using boost_filesystem, so I think I am able
> > to extract basic usage out of the documentation but I've failed to
> > find what I'm looking for in program_options.
> >
> > I would really like to parse a line that has the the form:
> > word [options]... nother option-like-non-option-word...
> >
> > so for instance -F after "word" indicates a legitimate value but -F
> > after "nother" shouldn't set or change the value and indeed might not
> > even have a "value"
>
> Can you provide a real example of the syntax you want to support? Why do you
> want "-F" to mean different things depending on the position on the command
> line?
Sorry for the slow response, rl sucks. :)
Well it's because there are two separate lists of options. One to the
program that I'm parsing for and one for code that we just perform a
pass through to. I have no control over the options recognized by the
other guy I just want to stop parsing when I get to them. My solution
was to create a class that defined operator() and use it as the
additional parser. Then once I spot the change from "my" to "his"
part. I stick all the words n a dummy option.
Thanks for taking the time to read and reply.
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