public class Parsers extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Parsers.Failure |
static interface |
Parsers.Function3<A,B,C,R> |
static interface |
Parsers.Function4<A,B,C,D,R> |
static interface |
Parsers.Function5<A,B,C,D,E,R> |
static interface |
Parsers.Function6<A,B,C,D,E,F,R> |
static interface |
Parsers.Function7<A,B,C,D,E,F,G,R> |
static interface |
Parsers.Function8<A,B,C,D,E,F,G,H,R> |
static interface |
Parsers.Function9<A,B,C,D,E,F,G,H,I,R> |
static class |
Parsers.Input |
static class |
Parsers.Pair<X,Y> |
static class |
Parsers.RegexParser |
static class |
Parsers.SkipParser |
| Constructor and Description |
|---|
Parsers() |
| Modifier and Type | Method and Description |
|---|---|
static Parser<?> |
begin() |
static <B> Parser<B> |
choice(Parser<B> parser,
Parser<B>... parsers) |
static Parser<?> |
empty() |
static Parser<?> |
end() |
static <B> Parser<B> |
failure(String cause) |
static <A,B,R> Function<Parsers.Pair<A,B>,R> |
match(BiFunction<A,B,R> f)
Match two values, like the result of string("A").then(string("B"))
|
static <A,R> Function<A,R> |
match(Function<A,R> f)
Match a single value, like the result of string("A") - note that match is mostly useful when dealing with multiple values.
|
static <A,B,C,R> Function<Parsers.Pair<Parsers.Pair<A,B>,C>,R> |
match(Parsers.Function3<A,B,C,R> f)
Match three values, like the result of string("A").then(string("B")).then(string("C"))
|
static <A,B,C,D,R> |
match(Parsers.Function4<A,B,C,D,R> f)
Match four values, like the result of string("A").then(string("B")).then(string("C")).then(string("D"))
|
static <A,B,C,D,E,R> |
match(Parsers.Function5<A,B,C,D,E,R> f)
Match five values, like the result of string("A").then(string("B")).then(string("C")).then(string("D")).then(string("E"))
|
static <A,B,C,D,E,F,R> |
match(Parsers.Function6<A,B,C,D,E,F,R> f)
Match six values, like the result of string("A").then(string("B")).then(string("C"))...then(string("F"))
|
static <A,B,C,D,E,F,G,R> |
match(Parsers.Function7<A,B,C,D,E,F,G,R> f)
Match seven values, like the result of string("A").then(string("B")).then(string("C"))...then(string("G"))
|
static <A,B,C,D,E,F,G,H,R> |
match(Parsers.Function8<A,B,C,D,E,F,G,H,R> f)
Match eight values, like the result of string("A").then(string("B")).then(string("C"))...then(string("H"))
|
static <A,B,C,D,E,F,G,H,I,R> |
match(Parsers.Function9<A,B,C,D,E,F,G,H,I,R> f)
Match nine values, like the result of string("A").then(string("B")).then(string("C"))...then(string("I"))
|
static Parser<MatchResult> |
regex(Pattern pattern) |
static Parser<MatchResult> |
regex(String regex) |
static Parsers.SkipParser |
skip(Parser<?> parser) |
static Parser<String> |
string(String string) |
static <B> Parser<B> |
success(B value) |
static <B> Parser<B> |
then(Supplier<Parser<B>> parser) |
public static Object unit
public static Parser<?> empty()
public static <B> Parser<B> success(B value)
@SafeVarargs public static <B> Parser<B> choice(Parser<B> parser, Parser<B>... parsers)
public static Parsers.SkipParser skip(Parser<?> parser)
public static Parser<?> begin()
public static Parser<?> end()
public static Parser<MatchResult> regex(String regex)
public static Parser<MatchResult> regex(Pattern pattern)
public static <A,R> Function<A,R> match(Function<A,R> f)
public static <A,B,R> Function<Parsers.Pair<A,B>,R> match(BiFunction<A,B,R> f)
public static <A,B,C,R> Function<Parsers.Pair<Parsers.Pair<A,B>,C>,R> match(Parsers.Function3<A,B,C,R> f)
public static <A,B,C,D,R> Function<Parsers.Pair<Parsers.Pair<Parsers.Pair<A,B>,C>,D>,R> match(Parsers.Function4<A,B,C,D,R> f)
public static <A,B,C,D,E,R> Function<Parsers.Pair<Parsers.Pair<Parsers.Pair<Parsers.Pair<A,B>,C>,D>,E>,R> match(Parsers.Function5<A,B,C,D,E,R> f)
public static <A,B,C,D,E,F,R> Function<Parsers.Pair<Parsers.Pair<Parsers.Pair<Parsers.Pair<Parsers.Pair<A,B>,C>,D>,E>,F>,R> match(Parsers.Function6<A,B,C,D,E,F,R> f)
public static <A,B,C,D,E,F,G,R> Function<Parsers.Pair<Parsers.Pair<Parsers.Pair<Parsers.Pair<Parsers.Pair<Parsers.Pair<A,B>,C>,D>,E>,F>,G>,R> match(Parsers.Function7<A,B,C,D,E,F,G,R> f)
public static <A,B,C,D,E,F,G,H,R> Function<Parsers.Pair<Parsers.Pair<Parsers.Pair<Parsers.Pair<Parsers.Pair<Parsers.Pair<Parsers.Pair<A,B>,C>,D>,E>,F>,G>,H>,R> match(Parsers.Function8<A,B,C,D,E,F,G,H,R> f)
public static <A,B,C,D,E,F,G,H,I,R> Function<Parsers.Pair<Parsers.Pair<Parsers.Pair<Parsers.Pair<Parsers.Pair<Parsers.Pair<Parsers.Pair<Parsers.Pair<A,B>,C>,D>,E>,F>,G>,H>,I>,R> match(Parsers.Function9<A,B,C,D,E,F,G,H,I,R> f)
Copyright © 2020 MuleSoft, Inc.. All rights reserved.