SettableParser<R> class
A parser that is not defined, but that can be set at a later point in time.
- Inheritance
-
- Object
- Parser<
R> - DelegateParser<
R, R> - SettableParser
- Implemented types
- Available extensions
- AcceptParser
- AndParserExtension
- CastListParserExtension
- CastParserExtension
- ChoiceParserExtension
- ConstantParserExtension
- ContinuationParserExtension
- EndOfInputParserExtension
- FlattenParserExtension
- GreedyRepeatingParserExtension
- LabelParserExtension
- LazyRepeatingParserExtension
- MapParserExtension
- MatchesParserExtension
- NotParserExtension
- OptionalParserExtension
- PatternParserExtension
- PermuteParserExtension
- PickParserExtension
- PossessiveRepeatingParserExtension
- RecordParserExtension2
- RecordParserExtension3
- RecordParserExtension4
- RecordParserExtension5
- RecordParserExtension6
- RecordParserExtension7
- RecordParserExtension8
- RecordParserExtension9
- RepeatingCharacterParserExtension
- SeparatedRepeatingParserExtension
- SequenceParserExtension
- SettableParserExtension
- SkipParserExtension
- TokenParserExtension
- TrimmingParserExtension
- WhereParserExtension
Constructors
-
SettableParser(Parser<
R> delegate)
Properties
-
children
→ List<
Parser> -
The list of directly referenced parsers.
no setterinherited
-
delegate
↔ Parser<
R> -
The parser this parser delegates to.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
accept(
String input, {int start = 0}) → bool -
Available on Parser<
Tests if theR> , provided by the AcceptParser extensioninputcan be successfully parsed. -
allMatches(
String input, {int start = 0, bool overlapping = false}) → Iterable< T> -
Available on Parser<
Returns a lazy iterable over all non-overlapping successful parse results of typeT> , provided by the MatchesParserExtension extensionTover the providedinput. -
and(
) → Parser< R> -
Available on Parser<
Returns a parser (logical and-predicate) that succeeds whenever the receiver does, but never consumes input.R> , provided by the AndParserExtension extension -
callCC<
S> (ContinuationHandler< R, S> handler) → Parser<S> -
Available on Parser<
Returns a parser that when activated captures a continuation function and passes it together with the current context into the handler.R> , provided by the ContinuationParserExtension extension -
cast<
S> () → Parser< S> -
Available on Parser<
Returns a parser that casts itself toR> , provided by the CastParserExtension extensionParser<R>. -
castList<
S> () → Parser< List< S> > -
Available on Parser<
Returns a parser that casts itself toR> , provided by the CastListParserExtension extensionParser<List<R>>. -
constant<
S> (S value) → Parser< S> -
Available on Parser<
Returns a parser that returns a constant value.R> , provided by the ConstantParserExtension extension -
copy(
) → SettableParser< R> -
Creates a shallow copy of this parser.
override
-
end(
{String message = 'end of input expected'}) → Parser< R> -
Available on Parser<
Returns a parser that succeeds only if the receiver consumes the complete input, otherwise return a failure with the optionalR> , provided by the EndOfInputParserExtension extensionmessage. -
fastParseOn(
String buffer, int position) → int -
Parses
bufferstarting atpositionwithout allocating a Result.override -
flatten(
{String? message}) → Parser< String> -
Available on Parser, provided by the FlattenParserExtension extension
Returns a parser that discards the result of the receiver and answers the sub-string its delegate consumes. -
hasEqualChildren(
covariant Parser other, Set< Parser> seen) → bool -
Compares the children of this parser with
other.inherited -
hasEqualProperties(
covariant Parser other) → bool -
Compares the properties of this parser with
other.inherited -
isEqualTo(
Parser other, [Set< Parser> ? seen]) → bool -
Tests if this parser is structurally equal to
other.inherited -
labeled(
String label) → LabeledParser< R> -
Available on Parser<
Returns a parser that simply defers to its delegate, but that has aR> , provided by the LabelParserExtension extensionlabelfor debugging purposes. -
map<
S> (Callback< R, S> callback, {bool hasSideEffects = false}) → Parser<S> -
Available on Parser<
Returns a parser that evaluates aR> , provided by the MapParserExtension extensioncallbackas the production action on success of the receiver. -
map2<
R> (R callback(T1, T2), {bool hasSideEffects = false}) → Parser< R> -
Available on Parser<
Maps a parsed Record to(T1, T2)> , provided by the RecordParserExtension2 extensionRusing the providedcallback. -
map3<
R> (R callback(T1, T2, T3), {bool hasSideEffects = false}) → Parser< R> -
Available on Parser<
Maps a parsed Record to(T1, T2, T3)> , provided by the RecordParserExtension3 extensionRusing the providedcallback. -
map4<
R> (R callback(T1, T2, T3, T4), {bool hasSideEffects = false}) → Parser< R> -
Available on Parser<
Maps a parsed Record to(T1, T2, T3, T4)> , provided by the RecordParserExtension4 extensionRusing the providedcallback. -
map5<
R> (R callback(T1, T2, T3, T4, T5), {bool hasSideEffects = false}) → Parser< R> -
Available on Parser<
Maps a parsed Record to(T1, T2, T3, T4, T5)> , provided by the RecordParserExtension5 extensionRusing the providedcallback. -
map6<
R> (R callback(T1, T2, T3, T4, T5, T6), {bool hasSideEffects = false}) → Parser< R> -
Available on Parser<
Maps a parsed Record to(T1, T2, T3, T4, T5, T6)> , provided by the RecordParserExtension6 extensionRusing the providedcallback. -
map7<
R> (R callback(T1, T2, T3, T4, T5, T6, T7), {bool hasSideEffects = false}) → Parser< R> -
Available on Parser<
Maps a parsed Record to(T1, T2, T3, T4, T5, T6, T7)> , provided by the RecordParserExtension7 extensionRusing the providedcallback. -
map8<
R> (R callback(T1, T2, T3, T4, T5, T6, T7, T8), {bool hasSideEffects = false}) → Parser< R> -
Available on Parser<
Maps a parsed Record to(T1, T2, T3, T4, T5, T6, T7, T8)> , provided by the RecordParserExtension8 extensionRusing the providedcallback. -
map9<
R> (R callback(T1, T2, T3, T4, T5, T6, T7, T8, T9), {bool hasSideEffects = false}) → Parser< R> -
Available on Parser<
Maps a parsed Record to(T1, T2, T3, T4, T5, T6, T7, T8, T9)> , provided by the RecordParserExtension9 extensionRusing the providedcallback. -
neg(
{String message = 'input not expected'}) → Parser< String> -
Available on Parser<
Returns a parser that consumes any input token (character), but the receiver.R> , provided by the NotParserExtension extension -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
not(
{String message = 'success not expected'}) → Parser< Failure> -
Available on Parser<
Returns a parser (logical not-predicate) that succeeds with the Failure whenever the receiver fails, but never consumes input.R> , provided by the NotParserExtension extension -
optional(
) → Parser< R?> -
Available on Parser<
Returns a new parser that accepts the receiver, if possible.R> , provided by the OptionalParserExtension extension -
optionalWith(
R value) → Parser< R> -
Available on Parser<
Returns a new parser that accepts the receiver, if possible.R> , provided by the OptionalParserExtension extension -
or(
Parser other, {FailureJoiner? failureJoiner}) → ChoiceParser -
Available on Parser, provided by the ChoiceParserExtension extension
Returns a parser that accepts the receiver orother(ordered choice). -
parse(
String input, {int start = 0}) → Result< R> -
Parses the
inputand returns the parse result.inherited -
parseOn(
Context context) → Result< R> -
Parses the given
context.override -
permute(
List< int> indexes) → Parser<List< R> > -
Available on Parser<
Returns a parser that transforms a successful parse result by returning the permuted elements atList< , provided by the PermuteParserExtension extensionR> >indexesof a list. -
pick(
int index) → Parser< R> -
Available on Parser<
Returns a parser that transforms a successful parse result by returning the element atList< , provided by the PickParserExtension extensionR> >indexof a list. -
plus(
) → Parser< List< R> > -
Available on Parser<
Returns a parser that accepts the receiver one or more times.R> , provided by the PossessiveRepeatingParserExtension extension -
plusGreedy(
Parser< void> limit) → Parser<List< R> > -
Available on Parser<
Returns a parser that parses the receiver one or more times until it reachesR> , provided by the GreedyRepeatingParserExtension extensionlimit. -
plusLazy(
Parser< void> limit) → Parser<List< R> > -
Available on Parser<
Returns a parser that parses the receiver one or more times until it reaches aR> , provided by the LazyRepeatingParserExtension extensionlimit. -
plusSeparated<
S> (Parser< S> separator) → Parser<SeparatedList< R, S> > -
Available on Parser<
Returns a parser that consumes the receiver one or more times separated by theR> , provided by the SeparatedRepeatingParserExtension extensionseparatorparser. -
plusString(
{String? message}) → Parser< String> -
Available on Parser<
Returns a parser that accepts the receiver one or more times.String> , provided by the RepeatingCharacterParserExtension extension -
repeat(
int min, [int? max]) → Parser< List< R> > -
Available on Parser<
Returns a parser that accepts the receiver betweenR> , provided by the PossessiveRepeatingParserExtension extensionminandmaxtimes. -
repeatGreedy(
Parser< void> limit, int min, int max) → Parser<List< R> > -
Available on Parser<
Returns a parser that parses the receiver at leastR> , provided by the GreedyRepeatingParserExtension extensionminand at mostmaxtimes until it reaches alimit. -
repeatLazy(
Parser< void> limit, int min, int max) → Parser<List< R> > -
Available on Parser<
Returns a parser that parses the receiver at leastR> , provided by the LazyRepeatingParserExtension extensionminand at mostmaxtimes until it reaches alimit. -
repeatSeparated<
S> (Parser< S> separator, int min, int max) → Parser<SeparatedList< R, S> > -
Available on Parser<
Returns a parser that consumes the receiver betweenR> , provided by the SeparatedRepeatingParserExtension extensionminandmaxtimes separated by theseparatorparser. -
repeatString(
int min, int max, {String? message}) → Parser< String> -
Available on Parser<
Returns a parser that accepts the receiver betweenString> , provided by the RepeatingCharacterParserExtension extensionminandmaxtimes. -
replace(
Parser source, Parser target) → void -
Replaces
sourcewithtargetin this parser.inherited -
resolve(
) → Parser< R> -
Resolves this parser with another one of the same type.
override
-
seq(
Parser other) → Parser< List> -
Available on Parser<
Returns a parser that accepts the receiver followed byR1> , provided by the SequenceParserExtension extensionother. -
set(
Parser< R> parser) → void -
Sets the receiver to delegate to
parser. -
settable(
) → SettableParser< R> -
Available on Parser<
Returns a parser that points to the receiver, but can be changed to point to something else at a later point in time.R> , provided by the SettableParserExtension extension -
skip(
{Parser< void> ? before, Parser<void> ? after}) → Parser<R> -
Available on Parser<
Returns a parser that consumes inputR> , provided by the SkipParserExtension extensionbeforeandafterthe receiver, but discards the parse results ofbeforeandafterand only returns the result of the receiver. -
star(
) → Parser< List< R> > -
Available on Parser<
Returns a parser that accepts the receiver zero or more times.R> , provided by the PossessiveRepeatingParserExtension extension -
starGreedy(
Parser< void> limit) → Parser<List< R> > -
Available on Parser<
Returns a parser that parses the receiver zero or more times until it reaches aR> , provided by the GreedyRepeatingParserExtension extensionlimit. -
starLazy(
Parser< void> limit) → Parser<List< R> > -
Available on Parser<
Returns a parser that parses the receiver zero or more times until it reaches aR> , provided by the LazyRepeatingParserExtension extensionlimit. -
starSeparated<
S> (Parser< S> separator) → Parser<SeparatedList< R, S> > -
Available on Parser<
Returns a parser that consumes the receiver zero or more times separated by theR> , provided by the SeparatedRepeatingParserExtension extensionseparatorparser. -
starString(
{String? message}) → Parser< String> -
Available on Parser<
Returns a parser that accepts the receiver zero or more times.String> , provided by the RepeatingCharacterParserExtension extension -
then<
R2> (Parser< R2> other) → SequenceParser2<R1, R2> -
Available on Parser<
Returns a parser that sequences the receiver andR1> , provided by the SequenceParserExtension extensionother, returning their results as a typed 2-element Record. -
times(
int count) → Parser< List< R> > -
Available on Parser<
Returns a parser that accepts the receiver exactlyR> , provided by the PossessiveRepeatingParserExtension extensioncounttimes. -
timesSeparated<
S> (Parser< S> separator, int count) → Parser<SeparatedList< R, S> > -
Available on Parser<
Returns a parser that consumes the receiverR> , provided by the SeparatedRepeatingParserExtension extensioncounttimes separated by theseparatorparser. -
timesString(
int count, {String? message}) → Parser< String> -
Available on Parser<
Returns a parser that accepts the receiver exactlyString> , provided by the RepeatingCharacterParserExtension extensioncounttimes. -
token(
) → Parser< Token< R> > -
Available on Parser<
Returns a parser that returns a Token.R> , provided by the TokenParserExtension extension -
toPattern(
) → Pattern -
Available on Parser<
Converts this Parser into a Pattern for basic searches within strings.R> , provided by the PatternParserExtension extension -
toString(
) → String -
A string representation of this object.
inherited
-
trim(
[Parser< void> ? left, Parser<void> ? right]) → Parser<R> -
Available on Parser<
Returns a parser that consumes input before and after the receiver, discards the excess input and only returns the result of the receiver.R> , provided by the TrimmingParserExtension extension -
where(
Predicate< R> predicate, {String? message, FailureFactory<R> ? factory}) → Parser<R> -
Available on Parser<
Returns a parser that evaluates theR> , provided by the WhereParserExtension extensionpredicatewith the successful parse result.
Operators
-
operator &(
Parser other) → Parser< List> -
Available on Parser<
Combines this parser andR1> , provided by the SequenceParserExtension extensionotherinto a sequence, equivalent to calling seq. -
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator |(
Parser other) → ChoiceParser -
Available on Parser, provided by the ChoiceParserExtension extension
Combines this parser andotherinto a choice, equivalent to calling or.