def parse(tokens = ARGV)
            @show_usage = nil
            @show_help = nil
            @errors = []
            begin
                pos_vals, kw_vals, rest_vals = classify_tokens(tokens)
                args = process_args(pos_vals, kw_vals, rest_vals) unless @show_help
            rescue NoSuchArgumentError => ex
                self.errors << ex.message
                @show_usage = true
            end
            (@show_usage || @show_help) ? false : args
        end
def parse(tokens = ARGV)
            @show_usage = nil
            @show_help = nil
            @errors = []
            begin
                pos_vals, kw_vals, rest_vals = classify_tokens(tokens)
                args = process_args(pos_vals, kw_vals, rest_vals) unless @show_help
            rescue NoSuchArgumentError => ex
                self.errors << ex.message
                @show_usage = true
            end
            (@show_usage || @show_help) ? false : args
        end
Instantiates a new command-line parser, with the specified command-
 line definition. A Parser instance delegates unknown methods to the
 Definition, so its possible to work only with a Parser instance to
 both define and parse a command-line.

 @param [Definition] definition A Definition object that defines the
   possible arguments that may appear in a command-line. If no definition
   is supplied, an empty definition is created.
 Parse the specified Array[String] of +tokens+, or ARGV if +tokens+ is
 nil. Returns false if unable to parse successfully, or an OpenStruct
 with accessors for every defined argument. Arguments whose values are
 not specified will contain the agument default value, or nil if no
 default is specified.