Class Grammar
Static class to provide parser monads for parsing a command line
Inheritance
Inherited Members
Namespace: Ubiquity.CommandlineParsing.Monad
Assembly: Ubiquity.CommandlineParsing.Monad.dll
Syntax
public static class Grammar
Remarks
The fields of this class are the lexer rules, while the Properties are the parser rules. The methods are utility combinators used to build the other rules.
Fields
Colon | Parser monad for the ':' symbol |
CommonOptionStart | Parser monad for common command line option start (e.g. '/' | '-' | '--' ) |
Dash | Parser monad for the '-' symbol |
DoubleDash | Parser monad for a double dash sequence (e.g. '--') |
DoubleQuote | Parser monad for a double quote character |
Equal | Parser monad for the '=' symbol |
EqualOrColon | Parser monad for either the '=' or ':' symbols |
Identifier | Parser monad for a common identifier (e.g. IdentifierChar*) |
IdentifierChar | Parser for a single character as part of an identifier |
NonWhiteSpaceChar | Parser monad to parse non-whitespace characters |
Option | Parser monad for a command line option that accepts values |
QuotedString | Parser monad for a Quoted string (either single or double quotes) |
SingleQuote | Parser monad for a single quote character |
Slash | Parser monad for the '/' symbol |
UnquotedValue | Parser monad for an unquoted positional value or the value of an option |
Properties
CommandLine | Gets the Top level parser to parse a command line into a sequence of ICommandlineArgument |
CommandlineArg | Gets a parser for a single command line argument |
PositionalArg | Gets a Parser monad for a position argument that matches the ValueContent parser |
ValueContent | Gets a Parser monad for a value (either a positional argument or the value of a switch/option) |
Methods
BlockString(Parser<IEnumerable<Char>>) | Parser combinator for a delimited string |
BlockString(Parser<IEnumerable<Char>>, Parser<IEnumerable<Char>>) | Block quoted string, with custom open and closing delimiter parsers |
OnMatch<T>(Parser<T>, Action<IResult<T>>) | Parser combinator to provide semantic action support for matched parsers |
OptionParser(Parser<IEnumerable<Char>>) | Parser combinator for a command line switch/option |
OptionParser(Parser<IEnumerable<Char>>, Parser<IEnumerable<Char>>) | Parser combinator for a command line switch/option |
SepAndValue(Parser<IEnumerable<Char>>) | Parser monad to parse a value separator and value |