private static ParsedArguments Parse(string args) { var parser = PosixStyleArgumentGrammar.GetParser(); var arguments = parser.List().Parse(args).Value.ToList(); return(new ParsedArguments(arguments)); }
/// <summary> /// Use a POSIX-style argument syntax similar to many existing POSIX utilities /// </summary> /// <param name="setup"></param> /// <returns></returns> public static IParserSetup UsePosixStyleArgumentParser(this IParserSetup setup) { Assert.ArgumentNotNull(setup, nameof(setup)); return(setup.UseArgumentParser(PosixStyleArgumentGrammar.GetParser())); }