static   class   ParseExtensions

Extensions for Superpower parsers.

static   TextParser<T> ThenIgnore<T U> (thisTextParser<T> self,TextParser<U> other)

Try self, and then other. If both succeed then return the value of self.

T
U
self:
other:
returns:

static   TokenListParser<TKind T> ThenIgnore<TKind T U> (thisTokenListParser<TKind T> self,TokenListParser<TKind U> other)

Parse self, then other, returning the result of self.

TKind
T
U
self:
other:
returns:

static   TokenListParser<TKind IEnumerable<T>> SeparatedBy<TKind T U> (thisTokenListParser<TKind T> self,TokenListParser<TKind U> separator)

Parse any number of element separated by the separator element.

TKind
T
U
self:
separator:
returns:

static   TokenListParser<TKind T> Between<TKind T U V> (thisTokenListParser<TKind T> self,TokenListParser<TKind U> before,TokenListParser<TKind V> after)

Parse elements between before and after.

TKind
T
U
V
self:
before:
after:
returns:

static   TextParser<T> Between<T U> (thisTextParser<T> self,TextParser<U> other)

Parse an element between other.

T
U
self:
other:
returns:

static   TokenListParser<TKind T> Between<TKind T U V> (thisTokenListParser<TKind T> self,TokenListParser<TKind U> other)

Parse an element between other.

TKind
T
U
V
self:
other:
returns:

static   TextParser<T> EnumParser<T>()

Parse any string matching the name of the provided enum.

T
returns:

static   TextParser<string> StringIn (params string[] source)

Return the result if it matches any of the provided source strings.

source:
returns:

static   TextParser<string> AsString (thisTextParser<char> charParser,bool atLeastOnce = false)

Convert the character parser to a string.

charParser:
atLeastOnce:
returns:

static   TextParser<IEnumerable<T>> UpTo<T> (thisTextParser<T> source,int value)

Parse multiple elements up to the provided value.

T
source:
value:
returns: