Module bpaf::_documentation::_1_tutorials::_1_combinatoric_api
source · Available on crate feature
extradocs
only.Expand description
§Combinatoric API
Parse arguments without using proc macros
When making a parser in the Combinatoric style API you usually go through those steps
- Design data type your application will receive
- Design command line options user will have to pass
- Create a set of simple parsers
- Combine and transform simple parsers to create the final data type
- Transform the resulting
Parser
intoOptionParser
and run it
Let’s go through some of them in more detail:
- Making a simple parser
- Transforming parsers
- Combining multiple simple parsers
- Subcommand parsers
- Improving the user experience