As an example, consider writing a pass that that writes the SUIF representation to a given file. The pass therefore requires a filename as an argument. The description will be printed out if the user invokes the pass incorrectly. The system provides the support for many common command line options, such as a collection of optional or repeated flags, which may be followed by a parameter. For example, the OptionString class accepts an input string.
All options have similar interfaces.
The first argument of an option's constructor is its mnemonic name as a string. The second argument is optional, and it corresponds to the address to which the input is to be saved if parsing succeeds. Some options accept additional parameters to change its default behavior. It is also possible to retrieve the inputs using methods supplied by the option class. Table 2 shows all the Option subclasses.