Package | Description |
---|---|
eu.bandm.tools.ramus.runtime2 |
Modifier and Type | Class and Description |
---|---|
class |
Blockage<R,M,O> |
class |
Choice<R,M,O>
Choice node class of the parsing search-tree monad.
|
class |
Diagnosis<R,M,O> |
class |
Success<R,M,O>
Leaf node class of the parsing search-tree monad.
|
Modifier and Type | Method and Description |
---|---|
abstract Action<Parser.Output<D,T>,SimpleMessage<D>,Parser.Input<D,T>> |
Parser.apply(Parser.Input<D,T> in,
Success<?,SimpleMessage<D>,Parser.Input<D,T>> recyclable)
Applies this continuation, possibly using a recyclable leaf
node.
|
default Action<S,M,O> |
Action.Continuation.apply(R arg)
Applies this continuation, ignoring any recyclable leaf
node.
|
default Action<T,M,O> |
Action.BiContinuation.apply(R arg1,
S arg2) |
Action<T,M,O> |
Action.BiContinuation.apply(R arg1,
S arg2,
Success<?,M,O> recyclable)
Applies this continuation, possibly using a recyclable leaf
node.
|
Action<S,M,O> |
Action.Continuation.apply(R arg,
Success<?,M,O> recyclable)
Applies this continuation, possibly using a recyclable leaf
node.
|
abstract <S> Action<S,M,O> |
Action.bind(Action.Continuation<? super R,S,M,O> cont)
Applies a monadic continuation to all leaves of this search tree
(transition operation).
|
<S> Action<S,M,O> |
Diagnosis.bind(Action.Continuation<? super R,S,M,O> cont) |
<S> Action<S,M,O> |
Choice.bind(Action.Continuation<? super R,S,M,O> cont) |
<S> Action<S,M,O> |
Blockage.bind(Action.Continuation<? super R,S,M,O> cont) |
<S> Action<S,M,O> |
Success.bind(Action.Continuation<? super R,S,M,O> cont)
Applies a monadic continuation to all leaves of this search tree
(transition operation).
|
static <R,M,O> Action<R,M,O> |
Action.choice(Action<R,M,O>... alts)
Creates a search tree from a choice of alternative subtrees
|
static <D,T> Action<Parser.Output<D,T>,SimpleMessage<D>,Parser.Input<D,T>> |
Parser.diagnoseUnexpectedToken(Action<Parser.Output<D,T>,SimpleMessage<D>,Parser.Input<D,T>> body,
Location<D> location,
@Opt String description) |
static <R,M,O> Action<R,M,O> |
Action.diagnosis(Action<R,M,O> body,
List<? extends M> msgs)
Creates a search tree with diagnostic message attached to the
root.
|
static <R,M,O> Action<R,M,O> |
Action.diagnosis(Action<R,M,O> body,
M... msgs)
Creates a search tree with diagnostic message attached to the
root.
|
<R> Action<State,SimpleMessage<D>,State> |
Reducer.Context.eval(eu.bandm.tools.ramus.runtime2.Reducer.BoundConstructor<D,R> cons,
Success<?,SimpleMessage<D>,State> recyclable) |
static <R,M,O> Action<R,M,O> |
Action.fail()
Creates a search tree with no alternatives.
|
static <R,M,O> Action<R,M,O> |
Action.fail(O obstruction)
Creates a search tree with no alternatives but an obstruction.
|
Action<? extends R,M,O> |
Diagnosis.getBody() |
<S> Action<S,M,O> |
Action.map(Function<? super R,? extends S> fun)
Applies a function to all leaves of this search tree (transition
operation).
|
static <R,M,O> Action<R,M,O> |
Action.optional(Optional<? extends R> opt) |
static <R,S,M,O> Action<R,M,O> |
Action.optional(Optional<S> opt,
Function<? super S,? extends R> convert) |
Action<State,SimpleMessage<D>,State> |
Parser.process(Parser.Input<D,T> in,
Action.Visitor<Parser.Output<D,T>,SimpleMessage<D>,Parser.Input<D,T>> errorVisitor) |
abstract <Q> Action<? extends R,M,Q> |
Action.prune()
Simplifies this search tree by removing redundant choice nodes
and all obstructions (transition operation).
|
<Q> Action<? extends R,M,Q> |
Diagnosis.prune() |
<Q> Action<? extends R,M,Q> |
Choice.prune() |
<Q> Action<R,M,Q> |
Blockage.prune() |
<Q> Action<R,M,Q> |
Success.prune() |
static <R,M,O> Action<R,M,O> |
Action.succeed(R result)
Creates a search tree with a single leaf.
|
static <R,M,O> Action<R,M,O> |
Action.succeed(R result,
Success<?,M,O> recyclable)
Creates a search tree with a single leaf, possibly using a
recyclable leaf node.
|
Modifier and Type | Method and Description |
---|---|
List<Action<? extends R,M,O>> |
Choice.getAlts() |
Modifier and Type | Method and Description |
---|---|
static <R,M,O> Action<R,M,O> |
Action.choice(Action<R,M,O>... alts)
Creates a search tree from a choice of alternative subtrees
|
static <D,T> Action<Parser.Output<D,T>,SimpleMessage<D>,Parser.Input<D,T>> |
Parser.diagnoseUnexpectedToken(Action<Parser.Output<D,T>,SimpleMessage<D>,Parser.Input<D,T>> body,
Location<D> location,
@Opt String description) |
static <R,M,O> Action<R,M,O> |
Action.diagnosis(Action<R,M,O> body,
List<? extends M> msgs)
Creates a search tree with diagnostic message attached to the
root.
|
static <R,M,O> Action<R,M,O> |
Action.diagnosis(Action<R,M,O> body,
M... msgs)
Creates a search tree with diagnostic message attached to the
root.
|
static <R,M,O> Choice<R,M,O> |
Choice.either(Action<R,M,O> first,
Action<R,M,O> second) |
static <R,M,O> Choice<R,M,O> |
Choice.either(Action<R,M,O> first,
Action<R,M,O> second) |
Modifier and Type | Method and Description |
---|---|
static <R,S,T,M,O> |
Action.BiContinuation.forget(BiFunction<? super R,? super S,? extends Action<T,M,O>> fun)
Lifts a monadic function on parsing results to a continuation.
|
static <R,S,M,O> Action.Continuation<R,S,M,O> |
Action.Continuation.forget(Function<? super R,? extends Action<S,M,O>> fun)
Lifts a monadic function on parsing results to a continuation.
|
protected <Q> boolean |
Action.pruneTo(List<? super Action<? extends R,M,Q>> alts)
Adds a pruned variant of this search subtree to a list of choice
alternatives.
|
protected <Q> boolean |
Choice.pruneTo(List<? super Action<? extends R,M,Q>> alts) |
Constructor and Description |
---|
Diagnosis(Action<? extends R,M,O> body,
List<? extends M> msgs) |
Diagnosis(Action<? extends R,M,O> body,
M... msgs) |
see also the complete user documentation .