Expand description
The input: argv as a slice of words.
Argv is a winnow Stream whose tokens are the words of the command
line, borrowed as BStr, so nothing is copied or joined and any byte,
NUL included, can appear in a word. A word is never re-split: "a b" is
one token, the same as the shell handed it over.
Offsets are counted in bytes as if every word were followed by one
separator, so a position inside a bundle of short flags (-vq) is still
a single number that shrinks as the lexer reads a letter. That keeps
repeat’s “parser must consume” check and error offsets meaningful.
Structs§
- Argv
- A command line being parsed: the
Streamevery parser in this crate reads. - Iter
Offsets - Iterator over the remaining words with their offsets.
Enums§
- Mode
- Where in the grammar a position is.