Package eu.bandm.tools.ramus.runtime2
Interface Action.Continuation<R,S,M,O>
- Type Parameters:
R
- the input type of parsing resultsS
- the output type of parsing resultsM
- the type of diagnostic messagesO
- the type of obstructions to continuation
- All Known Implementing Classes:
Parser
,Parser.Proxy
,Update
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public static interface Action.Continuation<R,S,M,O>
extends Function<R,Action<S,M,O>>
Functional interface for continuations.
-
Method Summary
Modifier and TypeMethodDescriptionApplies this continuation, ignoring any recyclable leaf node.Applies this continuation, possibly using a recyclable leaf node.static <R,
S, M, O> Action.Continuation<R, S, M, O> Lifts a monadic function on parsing results to a continuation.static <R,
S, M, O> Action.Continuation<R, S, M, O> Lifts a function on parsing results to a monadic continuation.
-
Method Details
-
apply
Applies this continuation, possibly using a recyclable leaf node.- Parameters:
arg
- the input parsing resultrecyclable
- a recyclable leaf node, ornull
if not available- Returns:
- a leaf node with a newly computed parsing result;
either
recyclable
if available ornew
. - See Also:
-
apply
Applies this continuation, ignoring any recyclable leaf node. -
forget
static <R,S, Action.Continuation<R,M, O> S, forgetM, O> (Function<? super R, ? extends Action<S, M, O>> fun) Lifts a monadic function on parsing results to a continuation.- Parameters:
fun
- the function- Returns:
- a continuation that applies the function
- Throws:
IllegalArgumentException
- iffun == null
-
map
Lifts a function on parsing results to a monadic continuation.- Parameters:
fun
- the function- Returns:
- a continuation that applies the function
- Throws:
IllegalArgumentException
- iffun == null
-