www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Command line parsers

reply JP <joris.putcuyps skynet.be> writes:
Hello

In my experience as a c/c++ programmer I've seen a lot of quick and 
dirty, primitive command line parsing implementations. Time and time 
again because they needed something that compiles on both linux(gcc) and 
windows(msvc) and avoid using external libraries.

Even very simple console application often needs some command line parsing.

Could one, simple, implementation be part of phobos, providing portability?

Some references I found:

- Derick Eddington 30 May 2005 "optparse.d -- good enough to be 
std.optparse?"
http://www.digitalmars.com/d/archives/digitalmars/D/announce/553.html

- Daniel Keep 15 April 2006 "optparse module"
http://www.digitalmars.com/d/archives/digitalmars/D/36768.html

- doost dsource project
http://www.dsource.org/projects/doost/browser/trunk/doost/program_options

- DDL dsource project
http://www.dsource.org/projects/ddl/browser/trunk/utils/ArgParser.d

Greets

Joris
Dec 24 2006
parent JP <joris.putcuyps skynet.be> writes:
JP wrote:
 Hello
 
 In my experience as a c/c++ programmer I've seen a lot of quick and 
 dirty, primitive command line parsing implementations. Time and time 
 again because they needed something that compiles on both linux(gcc) and 
 windows(msvc) and avoid using external libraries.
 
 Even very simple console application often needs some command line parsing.
 
 Could one, simple, implementation be part of phobos, providing portability?
 
 Some references I found:
 
 - Derick Eddington 30 May 2005 "optparse.d -- good enough to be 
 std.optparse?"
 http://www.digitalmars.com/d/archives/digitalmars/D/announce/553.html
 
 - Daniel Keep 15 April 2006 "optparse module"
 http://www.digitalmars.com/d/archives/digitalmars/D/36768.html
 
 - doost dsource project
 http://www.dsource.org/projects/doost/browser/trunk/doost/program_options
 
 - DDL dsource project
 http://www.dsource.org/projects/ddl/browser/trunk/utils/ArgParser.d
 
 Greets
 
 Joris

Another reference: - Juanjo Álvarez Martínez http://www.prowiki.org/wiki4d/wiki.cgi?Phobos/PosixGetOpt
Dec 24 2006