Friday, March 24, 2006
Option Parser for Eiffel
Bernd Schoeller has just released a very nice library for parsing command line options in Eiffel. It makes it easy to add full-featured command line parsing to any Eiffel application, without the need to use configuration files or run a preprocessor.
Object Parser for Eiffel is simple to use yet powerful, and is based on modern conventions for command-line options.
Features include:
Links:
Object Parser for Eiffel is simple to use yet powerful, and is based on modern conventions for command-line options.
Features include:
- Different types of options: flags, strings, integers, booleans ...
- Long (--make-love) and short (-l) options are supported.
- Short form can be joined (-abc instead of -a -b -c), assuming that every one but the last is a flag (does not require an argument).
- Arguments to the short form can be added with or without space (-ltoday or -l today).
- Arguments to the long form can be added with '=' or with a space (--make-love=today or --make-love today).
- Option termination introduced by '--'.
- Usage instructions and a help text will be generated automatically from the options.
- An agent can be called every time a certain option is found.
- Good default values, minimal code is required for standard applications.
Links: