public class Expression<D,T,A> extends AbstractExpression<D,T,A>
Modifier and Type | Class and Description |
---|---|
static class |
Expression.Result<D,T,A> |
Constructor and Description |
---|
Expression(Parser<D,T> syntax,
Data.View<A> semantics) |
Modifier and Type | Method and Description |
---|---|
static <D,T,A> Expression<D,T,A> |
access(Class<A> type,
Object key) |
Expression<D,T,A> |
append(Parser<D,T> suffix) |
Expression<D,T,A> |
append(T... prefix) |
Expression<D,T,A> |
append(T suffix) |
Expression<D,T,A> |
assigning(Object key) |
static <D,T,A> Expression<D,T,A> |
choice(Expression<D,T,? extends A>... alts) |
static <D,T,A> Expression<D,T,A> |
constant(Parser<D,T> syntax,
A value) |
static <D,T,A> Expression<D,T,A> |
constant(T type,
A value) |
static <D,T,A> Expression<D,T,A> |
constant(T type,
String text,
A value) |
static <D,T,A> Expression<D,T,A> |
constantEpsilon(A value) |
static <D,T> Expression<D,T,Content<D,T>> |
content(Parser<D,T> syntax) |
static <D,T> Expression<D,T,Content<D,T>> |
content(T... types) |
static <D,T,A> Expression<D,T,A> |
counit(A value) |
static <D,T,A> Expression<D,T,A> |
fix(Function<Expression<D,T,A>,Expression<D,T,A>> loop) |
Expression<D,T,A> |
guard(Predicate<? super A> condition,
Function<? super A,List<SimpleMessage<D>>> error) |
static <D,T,A> Expression<D,T,A> |
ifThenElse(T type,
Expression<D,T,? extends A> thenBranch,
Expression<D,T,? extends A> elseBranch) |
static <D,T,A> Expression<D,T,A> |
lookahead(Map<T,Expression<D,T,? extends A>> map) |
static <D,T,A> Expression<D,T,A> |
lookup(Class<A> type,
Map<T,? extends A> model) |
static <D,T,A> Expression<D,T,A> |
lookup(Map<T,? extends A> model) |
<B> Expression<D,T,B> |
map(Function<? super A,? extends B> fun) |
<B> Expression<D,T,Map.Entry<A,B>> |
mapsTo(Expression<D,T,B> other) |
Expression<D,T,A> |
mapSyntax(Function<? super Parser<D,T>,? extends Parser<D,T>> fun) |
Expression<D,T,Optional<A>> |
optional(Parser.Pragma... pragmas) |
Expression<D,T,Optional<A>> |
optional(T defaultType) |
Expression<D,T,A> |
orElse(A defaultValue,
Parser.Pragma... pragmas) |
Expression<D,T,A> |
orElse(Expression<D,T,A> other) |
Expression<D,T,A> |
orElseGet(Supplier<? extends A> defaultValue,
Parser.Pragma... pragmas) |
Expression<D,T,List<A>> |
plus(Parser.Pragma... pragmas) |
Expression<D,T,List<A>> |
plus(Parser<D,T> sep,
Parser.Pragma... pragmas) |
Expression<D,T,List<A>> |
plus(T sep,
Parser.Pragma... pragmas) |
Expression<D,T,A> |
prepend(Parser<D,T> prefix) |
Expression<D,T,A> |
prepend(T... suffix) |
Expression<D,T,A> |
prepend(T prefix) |
Expression.Result<D,T,A> |
process(Parser.Input<D,T> in) |
Expression.Result<D,T,A> |
process(Supplier<? extends Parser.Token<D,T>> in) |
Expression<D,T,List<A>> |
star(Parser.Pragma... pragmas) |
Expression<D,T,List<A>> |
star(Parser<D,T> sep,
Parser.Pragma... pragmas) |
Expression<D,T,List<A>> |
star(T sep,
Parser.Pragma... pragmas) |
String |
toString() |
static <D,T> Expression<D,T,T> |
type(T... types) |
static <D,T> Expression<D,T,Void> |
unit() |
static <D,T> Expression<D,T,Void> |
unit(Parser<D,T> syntax) |
static <D,T> Expression<D,T,Void> |
unit(T... types) |
Expression<D,T,A> |
withScope(Map<Object,? extends Data> initializers) |
Expression<D,T,A> |
wrap(Parser<D,T> prefix,
Parser<D,T> suffix) |
Expression<D,T,A> |
wrap(T prefix,
T suffix) |
assign, assign, getProjection, getSemantics, getSyntax
public static <D,T> Expression<D,T,Content<D,T>> content(Parser<D,T> syntax)
@SafeVarargs public static <D,T> Expression<D,T,Content<D,T>> content(T... types)
@SafeVarargs public static <D,T> Expression<D,T,T> type(T... types)
public <B> Expression<D,T,B> map(Function<? super A,? extends B> fun)
public Expression<D,T,A> prepend(T prefix)
public Expression<D,T,A> append(T suffix)
@SafeVarargs public final Expression<D,T,A> prepend(T... suffix)
@SafeVarargs public final Expression<D,T,A> append(T... prefix)
public Expression<D,T,A> orElse(A defaultValue, Parser.Pragma... pragmas)
public Expression<D,T,A> orElseGet(Supplier<? extends A> defaultValue, Parser.Pragma... pragmas)
public Expression<D,T,Optional<A>> optional(Parser.Pragma... pragmas)
public Expression<D,T,List<A>> star(Parser.Pragma... pragmas)
public Expression<D,T,List<A>> star(Parser<D,T> sep, Parser.Pragma... pragmas)
public Expression<D,T,List<A>> star(T sep, Parser.Pragma... pragmas)
public Expression<D,T,List<A>> plus(Parser.Pragma... pragmas)
public Expression<D,T,List<A>> plus(Parser<D,T> sep, Parser.Pragma... pragmas)
public Expression<D,T,List<A>> plus(T sep, Parser.Pragma... pragmas)
public static <D,T,A> Expression<D,T,A> constant(Parser<D,T> syntax, A value)
public static <D,T,A> Expression<D,T,A> constant(T type, A value)
public static <D,T,A> Expression<D,T,A> constant(T type, String text, A value)
public static <D,T,A> Expression<D,T,A> constantEpsilon(A value)
@SafeVarargs public static <D,T,A> Expression<D,T,A> choice(Expression<D,T,? extends A>... alts)
public Expression<D,T,A> orElse(Expression<D,T,A> other)
public static <D,T,A> Expression<D,T,A> lookup(Class<A> type, Map<T,? extends A> model)
public static <D,T,A> Expression<D,T,A> lookup(Map<T,? extends A> model)
public static <D,T,A> Expression<D,T,A> lookahead(Map<T,Expression<D,T,? extends A>> map)
public <B> Expression<D,T,Map.Entry<A,B>> mapsTo(Expression<D,T,B> other)
public static <D,T,A> Expression<D,T,A> fix(Function<Expression<D,T,A>,Expression<D,T,A>> loop)
public static <D,T> Expression<D,T,Void> unit(Parser<D,T> syntax)
@SafeVarargs public static <D,T> Expression<D,T,Void> unit(T... types)
public static <D,T> Expression<D,T,Void> unit()
public static <D,T,A> Expression<D,T,A> counit(A value)
public static <D,T,A> Expression<D,T,A> ifThenElse(T type, Expression<D,T,? extends A> thenBranch, Expression<D,T,? extends A> elseBranch)
public static <D,T,A> Expression<D,T,A> access(Class<A> type, Object key)
public Expression<D,T,A> assigning(Object key)
public Expression<D,T,A> mapSyntax(Function<? super Parser<D,T>,? extends Parser<D,T>> fun)
public Expression<D,T,A> guard(Predicate<? super A> condition, Function<? super A,List<SimpleMessage<D>>> error)
public Expression.Result<D,T,A> process(Supplier<? extends Parser.Token<D,T>> in)
public Expression.Result<D,T,A> process(Parser.Input<D,T> in)
see also the complete user documentation .