Re: ANN: OP Command Line Parser 0.9.1
Berend de Boer <[email protected]>
| Newsgroups | gmane.comp.lang.eiffel.gobo.general |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bernd Schoeller <[email protected]> writes: > You are touching a sensitive point here, a discussion that I have > already had with Andreas Leitner: He also favors a full-fledged XML > configuration file that describes all the different details of the > options and then generates classes for parsing the command line (he > also thinks that the command line should be specified as a regular > grammar, see http://raboof.sourceforge.net/). > > My questions were: Is this really necessary? Are the options changing > so often that it is necessary to define then in an extra file? What is > the benefit of having them in a extra file? Benefits: 1. You can create (part of) the man page that way. 2. You can include it in your manual. 3. You can create the --help automatically. 4. It's easier to localise (yes, that's with a s outside America, my point!) your application. Options are usually not that simple. Try to look at what tar/cpio support, and the most complex of them all: find. Some options are only allowed if others are present. Some options are mutually exclusive. All this things are much clearer presented and written in XML. BTW, here some more things you should support: 1. -- should mark the end of reading options, that way you can work with files that start with a '-'. 2. Do you support something like zeroOrMore? I.e. everything else gets into a list of files or so? > PS: A final question: if I add support of some XML configuration, > should I develop a code-generator that translates XML into Eiffel > code, or should I configure the command line options dynamically > by reading the XML every time I run the program? Translate into Eiffel code is good enough for me. - -- Live long and prosper, Berend de Boer (PGP public key: http://www.pobox.com/~berend/berend-public-key.txt) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/> iD8DBQFEJJUvIyuuaiRyjTYRArppAJ4oCtVSnXzMgqRA/VubEzljW1BQEACg4Vzi 2DBVqVla6DlYBjSYc9+Od2M= =GwDe -----END PGP SIGNATURE----- To Post a message, send it to: [email protected] To Unsubscribe, send a blank message to: [email protected] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/gobo-eiffel/ <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/