Crate flood_tide[−][src]
Expand description
Command line flag and option parse utilities.
Features
no_std
andstd
are supported.- flags, options, subcommand and free arguments
- short flags and options (like
-a
) - long flags and options (like
--long
) - combined short flags (like
-abc
::=-a
-b
-c
) - single long options (like
-long
) - abbreviate long options (like
--abbr
::=--abbreviate
) - single error or multiple errors
- only UTF-8 arguments
- it can be used optimally by a compile switch with many features.
- minimum support: rustc 1.41.1 (f3e1a954d 2020-02-24)
Todos
- multiple errors
-
no_std
- option suggestion (do you mean? ‘–abc’)
-
windows style (like
/a
) - source code generator support tools
- more easy use
Non-Supports
- procedural macro style
- traditional macro style
- non UTF-8 arguments, multibyte or wide charactor
Examples
in examples directory.
- manual coding style: bsd-sed.rs, gnu-cat.rs
- single long options: ffmpeg.rs
- source code generating by xtask and parse_simple_gnu_style(): curl.rs
Supports
- flood-tide-gen - the generating flood-tide tables
- aki-gsub - the sample used flood-tide
Alternatives
This parser is not a new special idea. It’s just comparing characters one by one. Is there anything simpler than this?
Re-exports
Modules
Structs
Lexical analyzer
Entity as the result of lex
Record type of opt ary table
Tokens as the result of lex
Enums
Option argument
Traits
check help and version of conf
setter subcmd of conf
Functions
Parse simple gnu style.
Parse simple gnu style with sub command.