Parses a wide variety of command-line arguments in single-pass and multipass strategies.