Lars Gullik Bjønnes wrote: > Angus Leeming <[EMAIL PROTECTED]> writes: > > | Lars, can I get you to add boost/spirit to the boost tree please? > > Hmm da hmm... can you wait for 1.32? > It should be there is just few days now.
Certainly. However, I'm going on holiday for two weeks on Friday, so perhaps it's best if I don't shove 'glob' into the repository until my return? Either way, when you upload boost 1.32 can you add the boost.spirit stuff, please. > | The attached patch gives us a platform-independent glob function. > | It's the necessary first step towards a command-line parser. > > But the for command line globbing is only needed on Win? Well, certainly I could write a wrapper for the system glob function with the same interface as this. However, not all globs support '{foo,bar}' syntax for example. Given that at least one platform will require this, or something like it, it would be nice to trial it for all platforms. > And just to check... you did look at the boost.program_options? > (or is this not the intended usage at all?) No, it's the other end of the same problem. The parent program launches a child. The child process receives an argv array through main() and tries to make sense of it. It's this that boost.program_options is intended to help with. My stuff is meant to make it easier for the parent to launch the child process in the first place. Whatever interface is used to do so (gspawn_process, QProcess or our own ForkedCall) must act on some data. Eg an argv array and some redirection of stdin,stdout,stderr streams. My 'command line parser' generates this data by parsing a string such as our converter definitions. Using a formal parser gives us a lot of power. It can handle all the weird quoting rules of the Bourne shell and redirection. Perhaps most importantly, it can prevent misuse such as command substitution. That in turn means that we can allow individual insets to pass tunable parameter lists to a converter. Eg, if the converter is defined as my_converter $$p $$i > $$o then we could now allow the user to specify '$$p' on a per-inset basis as '`rm -f *`' can be recognized and rejected. -- Angus